@coras-io/embed 0.5.1 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/README.md +15 -2
  3. package/dist/components/accordion/accordion-item/accordion-item.component.js +9 -3
  4. package/dist/components/accordion/accordion-item/accordion-item.styles.js +4 -0
  5. package/dist/components/accordion/accordion.component.js +8 -0
  6. package/dist/components/alert/alert.component.d.ts +1 -1
  7. package/dist/components/alert/alert.component.js +4 -3
  8. package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +0 -2
  9. package/dist/components/attraction-card/base/attraction-card.mixin.js +0 -6
  10. package/dist/components/attraction-card/base/attraction-card.types.d.ts +0 -1
  11. package/dist/components/basket-mobile/basket-mobile.component.d.ts +14 -3
  12. package/dist/components/basket-mobile/basket-mobile.component.js +71 -15
  13. package/dist/components/better-carousel/better-carousel.component.d.ts +3 -5
  14. package/dist/components/better-carousel/better-carousel.component.js +13 -34
  15. package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.js +5 -12
  16. package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.js +13 -5
  17. package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +0 -1
  18. package/dist/components/breadcrumbs/breadcrumbs.component.js +5 -8
  19. package/dist/components/breadcrumbs/breadcrumbs.styles.js +8 -2
  20. package/dist/components/button/button.constants.d.ts +1 -2
  21. package/dist/components/button/button.constants.js +0 -1
  22. package/dist/components/calendar/base/calendar.mixin.js +5 -1
  23. package/dist/components/calendar/multi/multi.component.d.ts +2 -2
  24. package/dist/components/calendar/multi/multi.component.js +12 -19
  25. package/dist/components/carousel/carousel.component.js +9 -2
  26. package/dist/components/categories-tree/categories-tree.component.d.ts +5 -3
  27. package/dist/components/categories-tree/categories-tree.component.js +22 -21
  28. package/dist/components/checkbox/checkbox.component.js +5 -1
  29. package/dist/components/checkbox-group/checkbox-group.component.js +1 -1
  30. package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
  31. package/dist/components/chip/chip.component.js +8 -3
  32. package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +6 -0
  33. package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +15 -1
  34. package/dist/components/currencies-list/currencies-list.component.js +0 -1
  35. package/dist/components/dialog/dialog.component.js +52 -21
  36. package/dist/components/drawer/drawer.component.d.ts +3 -2
  37. package/dist/components/drawer/drawer.component.js +13 -18
  38. package/dist/components/drawer/drawer.styles.js +5 -2
  39. package/dist/components/dropdown/dropdown.component.js +6 -9
  40. package/dist/components/expiration-timer/expiration-timer.component.d.ts +2 -3
  41. package/dist/components/expiration-timer/expiration-timer.component.js +10 -8
  42. package/dist/components/explore-card/explore-card.component.js +3 -1
  43. package/dist/components/explore-card/explore-card.styles.js +31 -0
  44. package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
  45. package/dist/components/flag-icon/flag-icon.component.d.ts +4 -2
  46. package/dist/components/flag-icon/flag-icon.component.js +16 -4
  47. package/dist/components/icon/icon.component.js +15 -2
  48. package/dist/components/image/image.component.js +4 -3
  49. package/dist/components/image-viewer/image-viewer.component.js +6 -4
  50. package/dist/components/input-field/input-field.component.js +10 -6
  51. package/dist/components/layout/layout.styles.js +1 -1
  52. package/dist/components/locales-list/locales-list.component.js +0 -1
  53. package/dist/components/location-image/location-image.component.d.ts +4 -4
  54. package/dist/components/location-image/location-image.component.js +6 -7
  55. package/dist/components/locations-results/locations-results.component.d.ts +10 -0
  56. package/dist/components/locations-results/locations-results.component.js +22 -15
  57. package/dist/components/locations-results/locations-results.styles.js +4 -1
  58. package/dist/components/message-card/message-card.component.d.ts +1 -1
  59. package/dist/components/message-card/message-card.component.js +4 -3
  60. package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +0 -1
  61. package/dist/components/mobile-menu-item/mobile-menu-item.component.js +14 -16
  62. package/dist/components/mobile-menu-item/mobile-menu-item.styles.js +9 -5
  63. package/dist/components/option-group/option-chip/option-chip.component.d.ts +4 -1
  64. package/dist/components/option-group/option-chip/option-chip.component.js +23 -10
  65. package/dist/components/option-group/option-group.component.d.ts +3 -1
  66. package/dist/components/option-group/option-group.component.js +10 -3
  67. package/dist/components/overlay/overlay.component.d.ts +0 -5
  68. package/dist/components/overlay/overlay.component.js +3 -15
  69. package/dist/components/phone-country-code/phone-country-code.component.d.ts +4 -0
  70. package/dist/components/phone-country-code/phone-country-code.component.js +37 -0
  71. package/dist/components/phone-country-codes/phone-country-codes.component.js +1 -1
  72. package/dist/components/phone-field/phone-field.component.js +2 -2
  73. package/dist/components/search-button/search-button.component.d.ts +1 -1
  74. package/dist/components/search-button/search-button.component.js +13 -7
  75. package/dist/components/seated-selector/seated-selector.component.js +3 -3
  76. package/dist/components/seats-io/seats-io.component.d.ts +3 -2
  77. package/dist/components/seats-io/seats-io.component.js +31 -13
  78. package/dist/components/seats-io/seats-io.constants.d.ts +0 -2
  79. package/dist/components/seats-io/seats-io.constants.js +0 -3
  80. package/dist/components/seats-io/seats-io.transform.d.ts +1 -6
  81. package/dist/components/seats-io/seats-io.transform.js +1 -20
  82. package/dist/components/select-list/select-list.component.js +7 -2
  83. package/dist/components/select-list/select-option/select-option.component.d.ts +3 -1
  84. package/dist/components/select-list/select-option/select-option.component.js +10 -3
  85. package/dist/components/tabs/tabs.component.d.ts +2 -0
  86. package/dist/components/tabs/tabs.component.js +59 -5
  87. package/dist/components/time-tag/time-tag.component.js +1 -1
  88. package/dist/containers/basket/basket.component.d.ts +1 -1
  89. package/dist/containers/basket/basket.component.js +21 -20
  90. package/dist/containers/navbar/navbar.component.d.ts +12 -8
  91. package/dist/containers/navbar/navbar.component.js +108 -62
  92. package/dist/containers/navbar/navbar.styles.js +23 -5
  93. package/dist/containers/navbar/navbar.utils.js +4 -4
  94. package/dist/contexts/basket/basket.provider.d.ts +3 -4
  95. package/dist/contexts/basket/basket.provider.js +46 -61
  96. package/dist/contexts/basket/basket.types.d.ts +0 -2
  97. package/dist/controllers/time-expiration.d.ts +15 -2
  98. package/dist/controllers/time-expiration.js +47 -17
  99. package/dist/core/api/client.d.ts +9 -0
  100. package/dist/core/api/client.js +26 -0
  101. package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +0 -2
  102. package/dist/core/api/middlewares/booking-session/booking-session.constants.js +0 -2
  103. package/dist/core/api/middlewares/booking-session/booking-session.js +3 -12
  104. package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +0 -1
  105. package/dist/core/api/middlewares/booking-session/booking-session.utils.js +6 -28
  106. package/dist/core/api/middlewares/error-handler/error-handler.js +5 -1
  107. package/dist/core/api/middlewares/retry/retry.constants.d.ts +3 -0
  108. package/dist/core/api/middlewares/retry/retry.constants.js +7 -0
  109. package/dist/core/api/middlewares/retry/retry.d.ts +2 -0
  110. package/dist/core/api/middlewares/retry/retry.js +48 -0
  111. package/dist/core/api/queries.d.ts +13 -38
  112. package/dist/core/api/queries.js +16 -99
  113. package/dist/core/events.d.ts +2 -4
  114. package/dist/core/i18n/date.d.ts +14 -5
  115. package/dist/core/i18n/date.js +47 -20
  116. package/dist/core/i18n/localization.js +10 -3
  117. package/dist/core/images/helpers.js +6 -5
  118. package/dist/core/images/srcset.js +2 -2
  119. package/dist/core/logger.d.ts +17 -0
  120. package/dist/core/logger.js +13 -0
  121. package/dist/core/types/api-schema.d.ts +7872 -0
  122. package/dist/core/types/seats-config.d.ts +5 -4
  123. package/dist/core/types/seats-config.js +10 -3
  124. package/dist/core/utils/crypto-address.d.ts +12 -0
  125. package/dist/core/utils/crypto-address.js +17 -0
  126. package/dist/core/utils/datetime.d.ts +13 -11
  127. package/dist/core/utils/datetime.js +41 -51
  128. package/dist/core/utils/loyalty.d.ts +8 -0
  129. package/dist/core/utils/loyalty.js +10 -0
  130. package/dist/core/utils/redaction.d.ts +9 -0
  131. package/dist/core/utils/redaction.js +58 -0
  132. package/dist/core/utils/time.js +2 -3
  133. package/dist/helpers/helpers.d.ts +6 -0
  134. package/dist/helpers/helpers.js +33 -16
  135. package/dist/locales/ar-SA.d.ts +38 -21
  136. package/dist/locales/ar-SA.js +38 -21
  137. package/dist/locales/da-DK.d.ts +38 -21
  138. package/dist/locales/da-DK.js +38 -21
  139. package/dist/locales/de-DE.d.ts +38 -21
  140. package/dist/locales/de-DE.js +38 -21
  141. package/dist/locales/en-IE.d.ts +38 -21
  142. package/dist/locales/en-IE.js +38 -21
  143. package/dist/locales/en-US.d.ts +38 -21
  144. package/dist/locales/en-US.js +38 -21
  145. package/dist/locales/es-ES.d.ts +38 -21
  146. package/dist/locales/es-ES.js +38 -21
  147. package/dist/locales/fr-FR.d.ts +38 -21
  148. package/dist/locales/fr-FR.js +38 -21
  149. package/dist/locales/fr-MA.d.ts +38 -21
  150. package/dist/locales/fr-MA.js +38 -21
  151. package/dist/locales/is-IS.d.ts +38 -21
  152. package/dist/locales/is-IS.js +38 -21
  153. package/dist/locales/it-IT.d.ts +38 -21
  154. package/dist/locales/it-IT.js +38 -21
  155. package/dist/locales/ms-MY.d.ts +38 -21
  156. package/dist/locales/ms-MY.js +38 -21
  157. package/dist/locales/nb-NO.d.ts +38 -21
  158. package/dist/locales/nb-NO.js +38 -21
  159. package/dist/locales/pl-PL.d.ts +38 -21
  160. package/dist/locales/pl-PL.js +38 -21
  161. package/dist/locales/pt-PT.d.ts +38 -21
  162. package/dist/locales/pt-PT.js +38 -21
  163. package/dist/locales/sv-SE.d.ts +38 -21
  164. package/dist/locales/sv-SE.js +38 -21
  165. package/dist/locales/th-TH.d.ts +38 -21
  166. package/dist/locales/th-TH.js +38 -21
  167. package/dist/locales/tr-TR.d.ts +38 -21
  168. package/dist/locales/tr-TR.js +38 -21
  169. package/dist/locales/zh-CN.d.ts +38 -21
  170. package/dist/locales/zh-CN.js +38 -21
  171. package/dist/locales/zh-HK.d.ts +38 -21
  172. package/dist/locales/zh-HK.js +38 -21
  173. package/dist/mixins/base.mixin.d.ts +3 -1
  174. package/dist/mixins/base.mixin.js +10 -7
  175. package/dist/mixins/coinbase.mixin.d.ts +13 -17
  176. package/dist/mixins/coinbase.mixin.js +251 -288
  177. package/dist/mixins/error-modal.mixin.js +8 -4
  178. package/dist/mixins/location-search/location-search.d.ts +13 -1
  179. package/dist/mixins/location-search/location-search.js +35 -27
  180. package/dist/mixins/overlay/overlay-mixin.js +39 -3
  181. package/dist/mixins/overlay/types.d.ts +1 -0
  182. package/dist/mixins/search-mixin/search-mixin.js +8 -5
  183. package/dist/sdk/diagnostics.js +2 -0
  184. package/dist/sdk/mount.d.ts +10 -0
  185. package/dist/sdk/mount.js +20 -1
  186. package/dist/sdk/page-registry.js +5 -0
  187. package/dist/sdk/params.d.ts +53 -0
  188. package/dist/sdk/params.js +180 -0
  189. package/dist/sdk/redaction.d.ts +1 -4
  190. package/dist/sdk/redaction.js +2 -41
  191. package/dist/sdk/types.d.ts +21 -7
  192. package/dist/sdk/url.d.ts +1 -1
  193. package/dist/sdk/url.js +12 -5
  194. package/dist/sdk/validation.d.ts +1 -26
  195. package/dist/sdk/validation.js +8 -145
  196. package/dist/styles/tokens.d.ts +1 -1
  197. package/dist/styles/tokens.generated.d.ts +1 -1
  198. package/dist/styles/tokens.generated.js +1 -1
  199. package/dist/views/chrome-only-page/chrome-only-page.component.d.ts +30 -0
  200. package/dist/views/chrome-only-page/chrome-only-page.component.js +24 -0
  201. package/dist/views/chrome-only-page/chrome-only-page.d.ts +8 -0
  202. package/dist/views/chrome-only-page/chrome-only-page.js +6 -0
  203. package/dist/views/chrome-only-page/chrome-only-page.styles.js +13 -0
  204. package/dist/views/details-page/details-page.component.d.ts +11 -4
  205. package/dist/views/details-page/details-page.component.js +263 -237
  206. package/dist/views/details-page/details-page.utilts.d.ts +63 -3
  207. package/dist/views/details-page/details-page.utilts.js +53 -5
  208. package/dist/views/details-page/partials/location-categories/location-categories.component.d.ts +29 -0
  209. package/dist/views/details-page/partials/location-categories/location-categories.component.js +149 -0
  210. package/dist/views/details-page/partials/location-categories/location-categories.d.ts +8 -0
  211. package/dist/views/details-page/partials/location-categories/location-categories.js +6 -0
  212. package/dist/views/details-page/partials/location-categories/location-categories.styles.js +35 -0
  213. package/dist/views/details-page/partials/location-highlights/location-highlights.component.d.ts +26 -0
  214. package/dist/views/details-page/partials/location-highlights/location-highlights.component.js +158 -0
  215. package/dist/views/details-page/partials/location-highlights/location-highlights.d.ts +8 -0
  216. package/dist/views/details-page/partials/location-highlights/location-highlights.js +6 -0
  217. package/dist/views/details-page/partials/location-highlights/location-highlights.styles.js +42 -0
  218. package/dist/views/details-page/partials/tour-description/tour-description.component.js +1 -4
  219. package/dist/views/help-page/help-page.component.d.ts +2 -0
  220. package/dist/views/help-page/help-page.component.js +37 -18
  221. package/dist/views/help-page/help-page.utils.js +6 -5
  222. package/dist/views/landing-page/landing-page.component.d.ts +5 -8
  223. package/dist/views/landing-page/landing-page.component.js +82 -97
  224. package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +10 -4
  225. package/dist/views/payment-page/controllers/crypto-auth.controller.js +53 -31
  226. package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +9 -5
  227. package/dist/views/payment-page/controllers/crypto-transfer.controller.js +26 -39
  228. package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +6 -1
  229. package/dist/views/payment-page/controllers/payment-flow.controller.js +1 -0
  230. package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +20 -2
  231. package/dist/views/payment-page/controllers/stripe-payment.controller.js +42 -19
  232. package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +2 -0
  233. package/dist/views/payment-page/partials/activity-details/activity-details.component.js +6 -3
  234. package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +2 -0
  235. package/dist/views/payment-page/partials/billing-address/billing-address.component.js +5 -1
  236. package/dist/views/payment-page/partials/confirmation/confirmation.component.js +2 -3
  237. package/dist/views/payment-page/partials/country-field/country-field.component.js +1 -1
  238. package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +3 -3
  239. package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +2 -0
  240. package/dist/views/payment-page/partials/stripe/stripe.component.js +36 -7
  241. package/dist/views/payment-page/partials/stripe/stripe.utils.js +0 -3
  242. package/dist/views/payment-page/payment-page.component.d.ts +39 -6
  243. package/dist/views/payment-page/payment-page.component.js +302 -178
  244. package/dist/views/payment-page/payment-page.constants.d.ts +1 -27
  245. package/dist/views/payment-page/payment-page.constants.js +3 -30
  246. package/dist/views/payment-page/payment-page.types.d.ts +1 -19
  247. package/dist/views/payment-page/payment-page.utils.d.ts +22 -13
  248. package/dist/views/payment-page/payment-page.utils.js +57 -75
  249. package/dist/views/payment-page/services/payment-api.service.d.ts +16 -34
  250. package/dist/views/payment-page/services/payment-api.service.js +19 -27
  251. package/dist/views/search-page/search-page.component.d.ts +2 -0
  252. package/dist/views/search-page/search-page.component.js +39 -20
  253. package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +1 -0
  254. package/dist/views/suggestion-widget/suggestion-widget.component.js +6 -5
  255. package/package.json +24 -20
  256. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +0 -10
  257. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.js +0 -43
  258. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.d.ts +0 -8
  259. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js +0 -6
  260. package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.js +0 -23
  261. package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +0 -10
  262. package/dist/components/attraction-discovery/attraction-discovery.component.js +0 -52
  263. package/dist/components/attraction-discovery/attraction-discovery.constants.d.ts +0 -4
  264. package/dist/components/attraction-discovery/attraction-discovery.constants.js +0 -5
  265. package/dist/components/attraction-discovery/attraction-discovery.d.ts +0 -8
  266. package/dist/components/attraction-discovery/attraction-discovery.js +0 -6
  267. package/dist/components/attraction-discovery/attraction-discovery.styles.js +0 -193
  268. package/dist/components/basket-rewards/basket-rewards.component.d.ts +0 -10
  269. package/dist/components/basket-rewards/basket-rewards.component.js +0 -52
  270. package/dist/components/basket-rewards/basket-rewards.d.ts +0 -8
  271. package/dist/components/basket-rewards/basket-rewards.js +0 -6
  272. package/dist/components/basket-rewards/basket-rewards.styles.js +0 -18
  273. package/dist/components/filter-chip/filter-chip.component.d.ts +0 -12
  274. package/dist/components/filter-chip/filter-chip.component.js +0 -68
  275. package/dist/components/filter-chip/filter-chip.constants.d.ts +0 -2
  276. package/dist/components/filter-chip/filter-chip.constants.js +0 -2
  277. package/dist/components/filter-chip/filter-chip.d.ts +0 -8
  278. package/dist/components/filter-chip/filter-chip.js +0 -6
  279. package/dist/components/filter-chip/filter-chip.styles.d.ts +0 -2
  280. package/dist/components/filter-chip/filter-chip.styles.js +0 -162
  281. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +0 -10
  282. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.js +0 -43
  283. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.d.ts +0 -8
  284. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.js +0 -6
  285. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.d.ts +0 -2
  286. package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.js +0 -28
  287. package/dist/components/image-carousel/image-carousel.component.d.ts +0 -8
  288. package/dist/components/image-carousel/image-carousel.component.js +0 -36
  289. package/dist/components/image-carousel/image-carousel.d.ts +0 -8
  290. package/dist/components/image-carousel/image-carousel.js +0 -6
  291. package/dist/components/image-carousel/image-carousel.styles.d.ts +0 -2
  292. package/dist/components/image-carousel/image-carousel.styles.js +0 -72
  293. package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +0 -9
  294. package/dist/components/itinerary/itinerary-item/itinerary-item.component.js +0 -45
  295. package/dist/components/itinerary/itinerary-item/itinerary-item.d.ts +0 -8
  296. package/dist/components/itinerary/itinerary-item/itinerary-item.js +0 -6
  297. package/dist/components/itinerary/itinerary-item/itinerary-item.styles.d.ts +0 -2
  298. package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +0 -70
  299. package/dist/components/itinerary/itinerary.component.d.ts +0 -7
  300. package/dist/components/itinerary/itinerary.component.js +0 -23
  301. package/dist/components/itinerary/itinerary.d.ts +0 -8
  302. package/dist/components/itinerary/itinerary.js +0 -6
  303. package/dist/components/itinerary/itinerary.styles.d.ts +0 -2
  304. package/dist/components/itinerary/itinerary.styles.js +0 -15
  305. package/dist/components/marketing-tag/marketing-tag.component.d.ts +0 -5
  306. package/dist/components/marketing-tag/marketing-tag.component.js +0 -8
  307. package/dist/components/marketing-tag/marketing-tag.d.ts +0 -8
  308. package/dist/components/marketing-tag/marketing-tag.js +0 -6
  309. package/dist/components/marketing-tag/marketing-tag.styles.d.ts +0 -2
  310. package/dist/components/marketing-tag/marketing-tag.styles.js +0 -36
  311. package/dist/components/price/price.component.d.ts +0 -12
  312. package/dist/components/price/price.component.js +0 -38
  313. package/dist/components/price/price.d.ts +0 -8
  314. package/dist/components/price/price.js +0 -6
  315. package/dist/components/reviews/review/review.component.d.ts +0 -9
  316. package/dist/components/reviews/review/review.component.js +0 -41
  317. package/dist/components/reviews/review/review.d.ts +0 -8
  318. package/dist/components/reviews/review/review.js +0 -6
  319. package/dist/components/reviews/review/review.styles.d.ts +0 -2
  320. package/dist/components/reviews/review/review.styles.js +0 -45
  321. package/dist/components/reviews/reviews.component.d.ts +0 -9
  322. package/dist/components/reviews/reviews.component.js +0 -56
  323. package/dist/components/reviews/reviews.d.ts +0 -8
  324. package/dist/components/reviews/reviews.js +0 -6
  325. package/dist/components/reviews/reviews.styles.d.ts +0 -2
  326. package/dist/components/reviews/reviews.styles.js +0 -73
  327. package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +0 -10
  328. package/dist/components/selected-tickets-preview/selected-tickets-preview.component.js +0 -51
  329. package/dist/components/selected-tickets-preview/selected-tickets-preview.d.ts +0 -8
  330. package/dist/components/selected-tickets-preview/selected-tickets-preview.js +0 -6
  331. package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.d.ts +0 -2
  332. package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.js +0 -89
  333. package/dist/components/tag/tag.component.d.ts +0 -8
  334. package/dist/components/tag/tag.component.js +0 -33
  335. package/dist/components/tag/tag.constants.d.ts +0 -1
  336. package/dist/components/tag/tag.constants.js +0 -1
  337. package/dist/components/tag/tag.d.ts +0 -8
  338. package/dist/components/tag/tag.js +0 -6
  339. package/dist/components/tag/tag.styles.d.ts +0 -2
  340. package/dist/components/tag/tag.styles.js +0 -56
  341. package/dist/components/tooltip/tooltip.component.d.ts +0 -19
  342. package/dist/components/tooltip/tooltip.component.js +0 -124
  343. package/dist/components/tooltip/tooltip.d.ts +0 -8
  344. package/dist/components/tooltip/tooltip.js +0 -6
  345. package/dist/components/tooltip/tooltip.styles.d.ts +0 -2
  346. package/dist/components/tooltip/tooltip.styles.js +0 -79
  347. package/dist/core/signals.d.ts +0 -2
  348. package/dist/core/signals.js +0 -3
  349. package/dist/core/storybook/argTypes.d.ts +0 -1
  350. package/dist/core/storybook/argTypes.js +0 -46
  351. package/dist/core/storybook/cssprops.d.ts +0 -30
  352. package/dist/core/storybook/cssprops.js +0 -46
  353. package/dist/core/storybook/demo.d.ts +0 -4
  354. package/dist/core/storybook/demo.js +0 -17
  355. package/dist/core/types/api-errors.d.ts +0 -8
  356. package/dist/core/types/api-errors.js +0 -1
  357. package/dist/styles/contrast-fixtures.d.ts +0 -5
  358. package/dist/styles/contrast-fixtures.js +0 -131
  359. package/dist/views/payment-page/domain/payment-mappers.d.ts +0 -7
  360. package/dist/views/payment-page/domain/payment-mappers.js +0 -7
  361. package/dist/views/payment-page/domain/payment-validators.d.ts +0 -6
  362. package/dist/views/payment-page/domain/payment-validators.js +0 -6
  363. package/dist/views/payment-page/domain/recovery-payload.d.ts +0 -8
  364. package/dist/views/payment-page/domain/recovery-payload.js +0 -7
  365. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +0 -22
  366. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.js +0 -65
  367. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.d.ts +0 -8
  368. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.js +0 -6
  369. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.d.ts +0 -2
  370. package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +0 -12
  371. package/dist/views/payment-page/payment-page.validation-schema.d.ts +0 -28
  372. package/dist/views/payment-page/payment-page.validation-schema.js +0 -42
  373. /package/dist/{components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.d.ts → views/chrome-only-page/chrome-only-page.styles.d.ts} +0 -0
  374. /package/dist/{components/attraction-discovery/attraction-discovery.styles.d.ts → views/details-page/partials/location-categories/location-categories.styles.d.ts} +0 -0
  375. /package/dist/{components/basket-rewards/basket-rewards.styles.d.ts → views/details-page/partials/location-highlights/location-highlights.styles.d.ts} +0 -0
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { autoUpdate, computePosition, flip, offset, shift, arrow, size, } from "@floating-ui/dom";
8
8
  import { LitElement, html, } from "lit";
9
- import { property, query, state } from "lit/decorators.js";
9
+ import { property, query } from "lit/decorators.js";
10
10
  import styles from "./dropdown.styles.js";
11
11
  import { fireInternalEvent } from "../../core/events.js";
12
12
  export class CorasDropdown extends LitElement {
@@ -94,7 +94,7 @@ export class CorasDropdown extends LitElement {
94
94
  if (this.arrow) {
95
95
  middleware.push(arrow({ element: this.arrowElement }));
96
96
  }
97
- computePosition(this.trigger, this.content, {
97
+ void computePosition(this.trigger, this.content, {
98
98
  placement: "bottom",
99
99
  middleware,
100
100
  }).then(({ x, y, middlewareData }) => {
@@ -113,8 +113,8 @@ export class CorasDropdown extends LitElement {
113
113
  });
114
114
  }
115
115
  firstUpdated() {
116
- this.applyAutoUpdate();
117
116
  if (this.open) {
117
+ this.applyAutoUpdate();
118
118
  this.show();
119
119
  }
120
120
  }
@@ -123,7 +123,7 @@ export class CorasDropdown extends LitElement {
123
123
  this.content.setAttribute("data-show", "");
124
124
  // Focus the content element when the dropdown opens (only if autoFocus is enabled)
125
125
  if (this.autoFocus) {
126
- this.updateComplete.then(() => {
126
+ void this.updateComplete.then(() => {
127
127
  const slot = this.content.querySelector("slot:not([name])"); // Target the default slot
128
128
  if (!slot) {
129
129
  this.content.setAttribute("tabindex", "-1");
@@ -153,10 +153,11 @@ export class CorasDropdown extends LitElement {
153
153
  this.content?.removeAttribute("data-show");
154
154
  if (this.cleanup) {
155
155
  this.cleanup();
156
+ this.cleanup = undefined;
156
157
  }
157
158
  // Focus the trigger element when the dropdown closes (only if autoFocus is enabled)
158
159
  if (this.autoFocus) {
159
- this.updateComplete.then(() => {
160
+ void this.updateComplete.then(() => {
160
161
  const triggerElement = this.trigger.assignedElements()[0];
161
162
  if (triggerElement && triggerElement.focus) {
162
163
  triggerElement.focus();
@@ -172,7 +173,6 @@ export class CorasDropdown extends LitElement {
172
173
  part="content"
173
174
  ?data-unstyled=${this.unstyledContent}
174
175
  aria-hidden=${this.open ? "false" : "true"}
175
- aria-labelledby="dropdown"
176
176
  >
177
177
  ${this.arrow ? html `<div class="arrow"></div>` : null}
178
178
  <div class="scroll">
@@ -194,9 +194,6 @@ __decorate([
194
194
  __decorate([
195
195
  query(".scroll")
196
196
  ], CorasDropdown.prototype, "scrollElement", void 0);
197
- __decorate([
198
- state()
199
- ], CorasDropdown.prototype, "containingElement", void 0);
200
197
  __decorate([
201
198
  property({ type: Boolean })
202
199
  ], CorasDropdown.prototype, "open", void 0);
@@ -1,12 +1,11 @@
1
- import { type CSSResultGroup, LitElement } from "lit";
1
+ import { type CSSResultGroup, LitElement, type PropertyValues } from "lit";
2
2
  import "../icon/icon.js";
3
3
  export declare class CorasExpirationTimer extends LitElement {
4
4
  static styles: CSSResultGroup;
5
5
  assetsURL: string;
6
6
  expirationTime: number;
7
7
  private timer;
8
- protected firstUpdated(): void;
9
- private handleExpiration;
8
+ protected willUpdate(changedProperties: PropertyValues<this>): void;
10
9
  private timeLeftLabel;
11
10
  render(): import("lit").TemplateResult<1>;
12
11
  }
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { LitElement, html } from "lit";
7
+ import { LitElement, html, } from "lit";
8
8
  import { property } from "lit/decorators.js";
9
9
  import { localized, msg } from "@lit/localize";
10
10
  import { TimeExpirationController } from "../../controllers/time-expiration.js";
@@ -16,19 +16,21 @@ let CorasExpirationTimer = class CorasExpirationTimer extends LitElement {
16
16
  super(...arguments);
17
17
  this.assetsURL = "";
18
18
  this.expirationTime = 0;
19
- this.timer = null;
19
+ this.timer = new TimeExpirationController(this);
20
20
  }
21
21
  static { this.styles = styles; }
22
- firstUpdated() {
23
- this.timer = new TimeExpirationController(this, this.expirationTime, () => this.handleExpiration());
22
+ willUpdate(changedProperties) {
23
+ // The element is reused when its host re-renders with a different
24
+ // reservation, so the countdown must follow the property, not the first
25
+ // value it was created with.
26
+ if (changedProperties.has("expirationTime")) {
27
+ this.timer.reset(this.expirationTime);
28
+ }
24
29
  }
25
- handleExpiration() { }
26
30
  timeLeftLabel() {
27
31
  const duration = intervalToDuration({
28
32
  start: 0,
29
- end: (this.timer?.value === undefined
30
- ? this.expirationTime
31
- : this.timer.value) * 1000,
33
+ end: this.timer.value * 1000,
32
34
  });
33
35
  return `${String(duration.minutes || 0).padStart(2, "0")}:${String(duration.seconds || 0).padStart(2, "0")}`;
34
36
  }
@@ -18,7 +18,9 @@ export class CorasExploreCard extends LitElement {
18
18
  }
19
19
  static { this.styles = styles; }
20
20
  renderImage() {
21
- const height = this.variant === ExploreCardVariants.HALF_SIZE_BG ? 220 : 360;
21
+ // The half-size card's photo is square; the full-size card's fills a
22
+ // portrait card behind its label and button.
23
+ const height = this.variant === ExploreCardVariants.HALF_SIZE_BG ? 250 : 360;
22
24
  return html `<div class="image">
23
25
  <coras-image
24
26
  src=${this.image}
@@ -9,13 +9,44 @@ export default css `
9
9
  --explore-card-label-color: var(--coras-palette-white);
10
10
  --explore-card-label-font-size: var(--coras-font-size-3xl);
11
11
  --explore-card-label-font-weight: var(--coras-font-weight-semibold);
12
+ --explore-card-background: var(--coras-color-card);
12
13
  }
13
14
 
15
+ /* The half-size card stacks: a square photo carrying the label, then a solid
16
+ body holding the button. The full-size card instead floats both over one
17
+ edge-to-edge photo. */
14
18
  :host([variant="halfSizeBg"]) {
19
+ /* The label has to fit inside the photo rather than over a whole card, so
20
+ it steps down a size and wraps tighter. */
21
+ --explore-card-label-font-size: var(--coras-font-size-2xl);
22
+
15
23
  .wrapper {
24
+ display: flex;
25
+ flex-direction: column;
26
+ background-color: var(--explore-card-background);
27
+ overflow: hidden;
28
+
16
29
  .image {
30
+ height: auto;
31
+ flex: none;
32
+
17
33
  border-bottom-right-radius: 0;
18
34
  border-bottom-left-radius: 0;
35
+
36
+ coras-image {
37
+ height: auto;
38
+ }
39
+ }
40
+
41
+ .label {
42
+ top: 1.5rem;
43
+ width: calc(100% - 2.5rem);
44
+ line-height: 1.2;
45
+ }
46
+
47
+ .button {
48
+ position: static;
49
+ padding-block: 1rem;
19
50
  }
20
51
  }
21
52
  }
@@ -26,7 +26,7 @@ let CorasFiltersDrawer = class CorasFiltersDrawer extends LitElement {
26
26
  return html `
27
27
  <coras-drawer
28
28
  assets-url="${this.assetsURL}"
29
- label="Filters"
29
+ label=${msg("Filters")}
30
30
  ?open=${this.open}
31
31
  @modal-closed=${this.handleClose}
32
32
  >
@@ -1,9 +1,11 @@
1
- import { type CSSResultGroup, LitElement } from "lit";
1
+ import { type CSSResultGroup, LitElement, type PropertyValues, nothing } from "lit";
2
2
  import type { Locale } from "../../core/types/index.js";
3
3
  export declare class CorasFlagIcon extends LitElement {
4
4
  static styles: CSSResultGroup;
5
5
  iconBaseURL: string;
6
6
  icon: Locale;
7
7
  label: string;
8
- render(): import("lit").TemplateResult<1>;
8
+ connectedCallback(): void;
9
+ protected willUpdate(changed: PropertyValues): void;
10
+ render(): typeof nothing | import("lit").TemplateResult<1>;
9
11
  }
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { localized, msg } from "@lit/localize";
8
- import { LitElement, html } from "lit";
8
+ import { LitElement, html, nothing, } from "lit";
9
9
  import { property } from "lit/decorators.js";
10
10
  import styles from "./flag-icon.styles.js";
11
11
  let CorasFlagIcon = class CorasFlagIcon extends LitElement {
@@ -17,10 +17,22 @@ let CorasFlagIcon = class CorasFlagIcon extends LitElement {
17
17
  }
18
18
  // TODO: Do we need this? It's just a component to display an image.
19
19
  static { this.styles = styles; }
20
- render() {
20
+ connectedCallback() {
21
+ super.connectedCallback();
21
22
  this.setAttribute("role", "img");
22
- this.setAttribute("aria-label", this.label);
23
- const countryCode = this.icon.split("-")[1].toLowerCase();
23
+ }
24
+ willUpdate(changed) {
25
+ if (changed.has("label")) {
26
+ this.setAttribute("aria-label", this.label);
27
+ }
28
+ }
29
+ render() {
30
+ // A bare language tag such as "en" names no country, so there is no flag.
31
+ const region = this.icon.split("-")[1];
32
+ if (!region) {
33
+ return nothing;
34
+ }
35
+ const countryCode = region.toLowerCase();
24
36
  return html `
25
37
  <img
26
38
  alt="${this.icon}"
@@ -31,7 +31,14 @@ function loadSprite(url) {
31
31
  const doc = new DOMParser().parseFromString(await res.text(), "image/svg+xml");
32
32
  return doc.querySelector("parsererror") ? null : doc;
33
33
  })
34
- .catch(() => null);
34
+ .catch(() => null)
35
+ .then((doc) => {
36
+ // A failed load must not poison the session: forget it so the next
37
+ // icon retries instead of rendering nothing until reload.
38
+ if (!doc)
39
+ spriteCache.delete(url);
40
+ return doc;
41
+ });
35
42
  spriteCache.set(url, sprite);
36
43
  }
37
44
  return sprite;
@@ -54,11 +61,17 @@ let CorasIcon = class CorasIcon extends LitElement {
54
61
  }
55
62
  async resolveSymbol() {
56
63
  const { icon, assetsURL } = this;
64
+ // Without an assets origin the sprite would be requested from the host
65
+ // page's origin, which never serves it.
66
+ if (!assetsURL) {
67
+ this.symbol = null;
68
+ return;
69
+ }
57
70
  const doc = await loadSprite(`${assetsURL}/icons.svg`);
58
71
  // A newer icon/url change may have superseded this load.
59
72
  if (this.icon !== icon || this.assetsURL !== assetsURL)
60
73
  return;
61
- const symbol = doc?.querySelector(`[id="${icon}"]`);
74
+ const symbol = doc?.getElementById(icon);
62
75
  this.symbol = symbol
63
76
  ? {
64
77
  viewBox: symbol.getAttribute("viewBox") ?? "0 0 24 24",
@@ -7,6 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  import { LitElement, html, nothing } from "lit";
8
8
  import { property, state } from "lit/decorators.js";
9
9
  import { classMap } from "lit/directives/class-map.js";
10
+ import { styleMap } from "lit/directives/style-map.js";
10
11
  import { fireInternalEvent } from "../../core/events.js";
11
12
  import { buildSizes, buildSrcset, RESPONSIVE_WIDTHS, } from "../../core/images/srcset.js";
12
13
  import { buildImgixUrl } from "../../core/images/url.js";
@@ -149,15 +150,15 @@ export class CorasImage extends LitElement {
149
150
  if (this.placeholder === "none" || this._loaded || this._errored)
150
151
  return nothing;
151
152
  const style = this.placeholder === "color" && this.color
152
- ? `background-color: ${this.color};`
153
- : "";
153
+ ? { backgroundColor: this.color }
154
+ : {};
154
155
  return html `<div
155
156
  part="placeholder"
156
157
  class=${classMap({
157
158
  placeholder: true,
158
159
  [`placeholder-${this.placeholder}`]: true,
159
160
  })}
160
- style=${style}
161
+ style=${styleMap(style)}
161
162
  aria-hidden="true"
162
163
  ></div>`;
163
164
  }
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  var CorasImageViewer_1;
8
- import { localized, msg } from "@lit/localize";
8
+ import { localized, msg, str } from "@lit/localize";
9
9
  import { LitElement, html } from "lit";
10
10
  import { property, state } from "lit/decorators.js";
11
11
  import { classMap } from "lit/directives/class-map.js";
@@ -136,13 +136,14 @@ let CorasImageViewer = class CorasImageViewer extends LitElement {
136
136
  <coras-button
137
137
  part="btn-prev"
138
138
  class=${classMap(prevBtnClasses)}
139
- circle
139
+ radius="circle"
140
140
  variant="outlined"
141
141
  @click=${() => this.handleNavigation("prev")}
142
142
  >
143
143
  <coras-icon
144
144
  assets-url="${this.assetsURL}"
145
145
  icon="chevron-left"
146
+ label=${msg("Previous")}
146
147
  ></coras-icon>
147
148
  </coras-button>
148
149
 
@@ -150,7 +151,7 @@ let CorasImageViewer = class CorasImageViewer extends LitElement {
150
151
  <coras-image
151
152
  exportparts="image"
152
153
  src=${this.images[this.currentIndex]}
153
- alt="Image ${this.currentIndex + 1}"
154
+ alt=${msg(str `Image ${this.currentIndex + 1}`)}
154
155
  loading="eager"
155
156
  fit="contain"
156
157
  placeholder="none"
@@ -161,13 +162,14 @@ let CorasImageViewer = class CorasImageViewer extends LitElement {
161
162
  <coras-button
162
163
  part="btn-next"
163
164
  class=${classMap(nextBtnClasses)}
164
- circle
165
+ radius="circle"
165
166
  variant="outlined"
166
167
  @click=${() => this.handleNavigation("next")}
167
168
  >
168
169
  <coras-icon
169
170
  assets-url="${this.assetsURL}"
170
171
  icon="chevron-right"
172
+ label=${msg("Next")}
171
173
  ></coras-icon>
172
174
  </coras-button>
173
175
  </div>
@@ -4,13 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ import { localized, msg } from "@lit/localize";
7
8
  import { LitElement, html, } from "lit";
8
9
  import { fireInternalEvent } from "../../core/events.js";
9
10
  import { property, query, state } from "lit/decorators.js";
10
11
  import { classMap } from "lit/directives/class-map.js";
11
12
  import styles from "./input-field.styles.js";
12
13
  import "../icon/icon.js";
13
- export class CorasInputField extends LitElement {
14
+ let CorasInputField = class CorasInputField extends LitElement {
14
15
  static { this.formAssociated = true; }
15
16
  static { this.styles = styles; }
16
17
  constructor() {
@@ -90,6 +91,7 @@ export class CorasInputField extends LitElement {
90
91
  placeholder=${this.placeholder}
91
92
  autocomplete="${this.autocomplete}"
92
93
  name=${this.name}
94
+ .value=${this.value}
93
95
  @input=${this._onInput}
94
96
  @focus=${this.focus}
95
97
  @blur=${this.blur}
@@ -98,9 +100,7 @@ export class CorasInputField extends LitElement {
98
100
  class="${classMap({
99
101
  error: this.validated && this.error,
100
102
  })}"
101
- >
102
- ${this.value}</textarea
103
- >
103
+ ></textarea>
104
104
  `
105
105
  : html `<input
106
106
  type=${this.type}
@@ -125,7 +125,7 @@ ${this.value}</textarea
125
125
  <coras-icon
126
126
  assets-url="${this.assetsURL}"
127
127
  icon="close-circle"
128
- label="clear"
128
+ label=${msg("Clear")}
129
129
  @click=${this._onClear}
130
130
  ></coras-icon>
131
131
  </div> `
@@ -250,7 +250,7 @@ ${this.value}</textarea
250
250
  </div>
251
251
  `;
252
252
  }
253
- }
253
+ };
254
254
  __decorate([
255
255
  property({ type: String, attribute: "assets-url" })
256
256
  ], CorasInputField.prototype, "assetsURL", void 0);
@@ -329,3 +329,7 @@ __decorate([
329
329
  __decorate([
330
330
  state()
331
331
  ], CorasInputField.prototype, "hasSuffixContent", void 0);
332
+ CorasInputField = __decorate([
333
+ localized()
334
+ ], CorasInputField);
335
+ export { CorasInputField };
@@ -16,7 +16,7 @@ export default css `
16
16
  grid-template-rows: auto 1fr auto;
17
17
  height: 100%;
18
18
  width: 100%;
19
- grid-row-gap: 2rem;
19
+ grid-row-gap: var(--coras-layout-row-gap, 2rem);
20
20
 
21
21
  main {
22
22
  /* Page-level query container; components target \`@container coras-page\`. */
@@ -40,7 +40,6 @@ export function renderLocalesOption({ iconBaseURL, locale, selected, onSelect, }
40
40
  const nativeName = LOCALES[locale];
41
41
  return html `
42
42
  <coras-select-option
43
- key=${locale}
44
43
  ?selected=${selected}
45
44
  @click=${() => onSelect && onSelect(locale)}
46
45
  >
@@ -9,10 +9,10 @@ export declare class CorasLocationImage extends LitElement {
9
9
  imageExtension: string;
10
10
  alt: string;
11
11
  /**
12
- * Intrinsic size of the banner. Kept in sync with the rendered box
13
- * (`--location-image-max-width` / `--location-image-height`) so imgix crops
14
- * to the ratio that is actually displayed and `object-fit` has nothing left
15
- * to trim.
12
+ * Intrinsic size of the banner, matching the box it actually renders in:
13
+ * `--coras-page-max-width` less `--coras-content-padding` by
14
+ * `--location-image-height`. imgix then crops to the ratio that is
15
+ * displayed and `object-fit` has nothing left to trim.
16
16
  */
17
17
  width: number;
18
18
  height: number;
@@ -15,7 +15,7 @@ import styles from "./location-image.styles.js";
15
15
  * assets (1160px) - wider candidates only make imgix upscale the same pixels
16
16
  * and ship more bytes for no extra detail.
17
17
  */
18
- const BANNER_WIDTHS = "480,640,768,952,1160";
18
+ const BANNER_WIDTHS = "480,640,768,918,1160";
19
19
  let CorasLocationImage = class CorasLocationImage extends LitElement {
20
20
  constructor() {
21
21
  super(...arguments);
@@ -25,12 +25,12 @@ let CorasLocationImage = class CorasLocationImage extends LitElement {
25
25
  this.imageExtension = "png";
26
26
  this.alt = msg("Location image");
27
27
  /**
28
- * Intrinsic size of the banner. Kept in sync with the rendered box
29
- * (`--location-image-max-width` / `--location-image-height`) so imgix crops
30
- * to the ratio that is actually displayed and `object-fit` has nothing left
31
- * to trim.
28
+ * Intrinsic size of the banner, matching the box it actually renders in:
29
+ * `--coras-page-max-width` less `--coras-content-padding` by
30
+ * `--location-image-height`. imgix then crops to the ratio that is
31
+ * displayed and `object-fit` has nothing left to trim.
32
32
  */
33
- this.width = 952;
33
+ this.width = 918;
34
34
  this.height = 148;
35
35
  this.loading = false;
36
36
  this.currentSrc = "";
@@ -42,7 +42,6 @@ let CorasLocationImage = class CorasLocationImage extends LitElement {
42
42
  this.handleImageError = () => {
43
43
  this.loading = false;
44
44
  if (this.fallbackTried || this.currentSrc === this.fallbackSrc) {
45
- console.warn("Location image: Both primary and fallback images failed to load");
46
45
  this.loadFailed = true;
47
46
  return;
48
47
  }
@@ -3,11 +3,21 @@ import "../icon/icon.js";
3
3
  import "../select-list/select-list.js";
4
4
  import "../select-list/select-option/select-option.js";
5
5
  import type { components } from "../../core/types/api-schema.js";
6
+ /** Browsers without the Geolocation API get a code outside the spec's 1-3. */
7
+ export declare const GEOLOCATION_UNSUPPORTED_CODE = 0;
8
+ export interface GeolocationFailedEventDetail {
9
+ code: number;
10
+ }
11
+ /**
12
+ * @fires geolocation-selected - The device position when "Near me" succeeds
13
+ * @fires geolocation-failed - Detail `{ code }` when the position is denied or unavailable
14
+ */
6
15
  export declare class CorasLocationsResults extends LitElement {
7
16
  static styles: CSSResultGroup;
8
17
  assetsURL: string;
9
18
  items: components["schemas"]["LocationSchema"][];
10
19
  private near;
20
+ private reportGeolocationFailure;
11
21
  private renderPopular;
12
22
  render(): TemplateResult<1>;
13
23
  }
@@ -12,6 +12,12 @@ import styles from "./locations-results.styles.js";
12
12
  import "../icon/icon.js";
13
13
  import "../select-list/select-list.js";
14
14
  import "../select-list/select-option/select-option.js";
15
+ /** Browsers without the Geolocation API get a code outside the spec's 1-3. */
16
+ export const GEOLOCATION_UNSUPPORTED_CODE = 0;
17
+ /**
18
+ * @fires geolocation-selected - The device position when "Near me" succeeds
19
+ * @fires geolocation-failed - Detail `{ code }` when the position is denied or unavailable
20
+ */
15
21
  let CorasLocationsResults = class CorasLocationsResults extends LitElement {
16
22
  constructor() {
17
23
  super(...arguments);
@@ -20,27 +26,29 @@ let CorasLocationsResults = class CorasLocationsResults extends LitElement {
20
26
  }
21
27
  static { this.styles = styles; }
22
28
  near() {
23
- if ("geolocation" in navigator) {
24
- navigator.geolocation.getCurrentPosition((position) => {
25
- fireInternalEvent(this, "geolocation-selected", {
26
- latitude: position.coords.latitude,
27
- longitude: position.coords.longitude,
28
- });
29
- }, (error) => {
30
- console.error(`An error occurred while getting the current position of the device. Error code: ${error.code}`);
31
- });
32
- }
33
- else {
34
- // TODO: add error/warning modal?
35
- console.error("Geolocation is not supported by this browser.");
29
+ if (!("geolocation" in navigator)) {
30
+ this.reportGeolocationFailure(GEOLOCATION_UNSUPPORTED_CODE);
31
+ return;
36
32
  }
33
+ navigator.geolocation.getCurrentPosition((position) => {
34
+ fireInternalEvent(this, "geolocation-selected", {
35
+ latitude: position.coords.latitude,
36
+ longitude: position.coords.longitude,
37
+ });
38
+ }, (error) => this.reportGeolocationFailure(error.code));
39
+ }
40
+ // The detail mirrors GeolocationPositionError.code.
41
+ reportGeolocationFailure(code) {
42
+ fireInternalEvent(this, "geolocation-failed", { code });
37
43
  }
38
44
  renderPopular() {
39
45
  return html `
40
46
  <div class="popular">
41
47
  <p>${msg("Popular")}</p>
42
48
  <div>
43
- <span @click=${() => this.near()}>Near me</span>
49
+ <button type="button" class="near-me" @click=${this.near}>
50
+ ${msg("Near me")}
51
+ </button>
44
52
  </div>
45
53
  </div>
46
54
  `;
@@ -68,7 +76,6 @@ export { CorasLocationsResults };
68
76
  export function renderLocationResultOption({ item, selected, onSelect, localizedName, assetsURL, }) {
69
77
  return html `
70
78
  <coras-select-option
71
- key=${localizedName}
72
79
  ?selected=${selected}
73
80
  @click=${() => onSelect && onSelect(item)}
74
81
  >
@@ -38,11 +38,14 @@ export default css `
38
38
  display: flex;
39
39
  gap: 0.5rem;
40
40
 
41
- span {
41
+ .near-me {
42
42
  display: flex;
43
43
  align-items: center;
44
+ border: 0;
44
45
  border-radius: var(--locations-results-popular-border-radius);
46
+ font: inherit;
45
47
  font-size: var(--locations-results-popular-font-size);
48
+ color: inherit;
46
49
  justify-content: center;
47
50
  line-height: 0.875rem;
48
51
  letter-spacing: 0.2px;
@@ -4,7 +4,7 @@ import type { MessageCardVariant } from "./message-card.types.js";
4
4
  export declare class CorasMessageCard extends LitElement {
5
5
  static styles: CSSResultGroup;
6
6
  assetsURL: string;
7
- title: string;
7
+ heading: string;
8
8
  variant: MessageCardVariant;
9
9
  private _hasSlottedContent;
10
10
  private _handleSlotChange;
@@ -12,7 +12,8 @@ export class CorasMessageCard extends LitElement {
12
12
  constructor() {
13
13
  super(...arguments);
14
14
  this.assetsURL = "";
15
- this.title = "";
15
+ // Not `title`: that is the native tooltip attribute on every element.
16
+ this.heading = "";
16
17
  this.variant = "info";
17
18
  this._hasSlottedContent = false;
18
19
  }
@@ -31,7 +32,7 @@ export class CorasMessageCard extends LitElement {
31
32
  ></coras-icon>
32
33
  </div>
33
34
  <div class="content">
34
- <p class="title" data-testid="title">${this.title}</p>
35
+ <p class="title" data-testid="title">${this.heading}</p>
35
36
  ${this._hasSlottedContent
36
37
  ? html `<div class="message" data-testid="message">
37
38
  <slot @slotchange=${this._handleSlotChange}></slot>
@@ -47,7 +48,7 @@ __decorate([
47
48
  ], CorasMessageCard.prototype, "assetsURL", void 0);
48
49
  __decorate([
49
50
  property({ type: String })
50
- ], CorasMessageCard.prototype, "title", void 0);
51
+ ], CorasMessageCard.prototype, "heading", void 0);
51
52
  __decorate([
52
53
  property({ type: String, reflect: true })
53
54
  ], CorasMessageCard.prototype, "variant", void 0);
@@ -1,5 +1,4 @@
1
1
  import { type CSSResultGroup, LitElement } from "lit";
2
- import "../button/button.js";
3
2
  import "../icon/icon.js";
4
3
  export declare class CorasMobileMenuItem extends LitElement {
5
4
  static styles: CSSResultGroup;