@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.
- package/CHANGELOG.md +34 -0
- package/README.md +15 -2
- package/dist/components/accordion/accordion-item/accordion-item.component.js +9 -3
- package/dist/components/accordion/accordion-item/accordion-item.styles.js +4 -0
- package/dist/components/accordion/accordion.component.js +8 -0
- package/dist/components/alert/alert.component.d.ts +1 -1
- package/dist/components/alert/alert.component.js +4 -3
- package/dist/components/attraction-card/base/attraction-card.mixin.d.ts +0 -2
- package/dist/components/attraction-card/base/attraction-card.mixin.js +0 -6
- package/dist/components/attraction-card/base/attraction-card.types.d.ts +0 -1
- package/dist/components/basket-mobile/basket-mobile.component.d.ts +14 -3
- package/dist/components/basket-mobile/basket-mobile.component.js +71 -15
- package/dist/components/better-carousel/better-carousel.component.d.ts +3 -5
- package/dist/components/better-carousel/better-carousel.component.js +13 -34
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.component.js +5 -12
- package/dist/components/breadcrumbs/breadcrumb-item/breadcrumb-item.styles.js +13 -5
- package/dist/components/breadcrumbs/breadcrumbs.component.d.ts +0 -1
- package/dist/components/breadcrumbs/breadcrumbs.component.js +5 -8
- package/dist/components/breadcrumbs/breadcrumbs.styles.js +8 -2
- package/dist/components/button/button.constants.d.ts +1 -2
- package/dist/components/button/button.constants.js +0 -1
- package/dist/components/calendar/base/calendar.mixin.js +5 -1
- package/dist/components/calendar/multi/multi.component.d.ts +2 -2
- package/dist/components/calendar/multi/multi.component.js +12 -19
- package/dist/components/carousel/carousel.component.js +9 -2
- package/dist/components/categories-tree/categories-tree.component.d.ts +5 -3
- package/dist/components/categories-tree/categories-tree.component.js +22 -21
- package/dist/components/checkbox/checkbox.component.js +5 -1
- package/dist/components/checkbox-group/checkbox-group.component.js +1 -1
- package/dist/components/checkbox-group/checkbox-group.styles.js +1 -1
- package/dist/components/chip/chip.component.js +8 -3
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.d.ts +6 -0
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +15 -1
- package/dist/components/currencies-list/currencies-list.component.js +0 -1
- package/dist/components/dialog/dialog.component.js +52 -21
- package/dist/components/drawer/drawer.component.d.ts +3 -2
- package/dist/components/drawer/drawer.component.js +13 -18
- package/dist/components/drawer/drawer.styles.js +5 -2
- package/dist/components/dropdown/dropdown.component.js +6 -9
- package/dist/components/expiration-timer/expiration-timer.component.d.ts +2 -3
- package/dist/components/expiration-timer/expiration-timer.component.js +10 -8
- package/dist/components/explore-card/explore-card.component.js +3 -1
- package/dist/components/explore-card/explore-card.styles.js +31 -0
- package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
- package/dist/components/flag-icon/flag-icon.component.d.ts +4 -2
- package/dist/components/flag-icon/flag-icon.component.js +16 -4
- package/dist/components/icon/icon.component.js +15 -2
- package/dist/components/image/image.component.js +4 -3
- package/dist/components/image-viewer/image-viewer.component.js +6 -4
- package/dist/components/input-field/input-field.component.js +10 -6
- package/dist/components/layout/layout.styles.js +1 -1
- package/dist/components/locales-list/locales-list.component.js +0 -1
- package/dist/components/location-image/location-image.component.d.ts +4 -4
- package/dist/components/location-image/location-image.component.js +6 -7
- package/dist/components/locations-results/locations-results.component.d.ts +10 -0
- package/dist/components/locations-results/locations-results.component.js +22 -15
- package/dist/components/locations-results/locations-results.styles.js +4 -1
- package/dist/components/message-card/message-card.component.d.ts +1 -1
- package/dist/components/message-card/message-card.component.js +4 -3
- package/dist/components/mobile-menu-item/mobile-menu-item.component.d.ts +0 -1
- package/dist/components/mobile-menu-item/mobile-menu-item.component.js +14 -16
- package/dist/components/mobile-menu-item/mobile-menu-item.styles.js +9 -5
- package/dist/components/option-group/option-chip/option-chip.component.d.ts +4 -1
- package/dist/components/option-group/option-chip/option-chip.component.js +23 -10
- package/dist/components/option-group/option-group.component.d.ts +3 -1
- package/dist/components/option-group/option-group.component.js +10 -3
- package/dist/components/overlay/overlay.component.d.ts +0 -5
- package/dist/components/overlay/overlay.component.js +3 -15
- package/dist/components/phone-country-code/phone-country-code.component.d.ts +4 -0
- package/dist/components/phone-country-code/phone-country-code.component.js +37 -0
- package/dist/components/phone-country-codes/phone-country-codes.component.js +1 -1
- package/dist/components/phone-field/phone-field.component.js +2 -2
- package/dist/components/search-button/search-button.component.d.ts +1 -1
- package/dist/components/search-button/search-button.component.js +13 -7
- package/dist/components/seated-selector/seated-selector.component.js +3 -3
- package/dist/components/seats-io/seats-io.component.d.ts +3 -2
- package/dist/components/seats-io/seats-io.component.js +31 -13
- package/dist/components/seats-io/seats-io.constants.d.ts +0 -2
- package/dist/components/seats-io/seats-io.constants.js +0 -3
- package/dist/components/seats-io/seats-io.transform.d.ts +1 -6
- package/dist/components/seats-io/seats-io.transform.js +1 -20
- package/dist/components/select-list/select-list.component.js +7 -2
- package/dist/components/select-list/select-option/select-option.component.d.ts +3 -1
- package/dist/components/select-list/select-option/select-option.component.js +10 -3
- package/dist/components/tabs/tabs.component.d.ts +2 -0
- package/dist/components/tabs/tabs.component.js +59 -5
- package/dist/components/time-tag/time-tag.component.js +1 -1
- package/dist/containers/basket/basket.component.d.ts +1 -1
- package/dist/containers/basket/basket.component.js +21 -20
- package/dist/containers/navbar/navbar.component.d.ts +12 -8
- package/dist/containers/navbar/navbar.component.js +108 -62
- package/dist/containers/navbar/navbar.styles.js +23 -5
- package/dist/containers/navbar/navbar.utils.js +4 -4
- package/dist/contexts/basket/basket.provider.d.ts +3 -4
- package/dist/contexts/basket/basket.provider.js +46 -61
- package/dist/contexts/basket/basket.types.d.ts +0 -2
- package/dist/controllers/time-expiration.d.ts +15 -2
- package/dist/controllers/time-expiration.js +47 -17
- package/dist/core/api/client.d.ts +9 -0
- package/dist/core/api/client.js +26 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +0 -2
- package/dist/core/api/middlewares/booking-session/booking-session.constants.js +0 -2
- package/dist/core/api/middlewares/booking-session/booking-session.js +3 -12
- package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +0 -1
- package/dist/core/api/middlewares/booking-session/booking-session.utils.js +6 -28
- package/dist/core/api/middlewares/error-handler/error-handler.js +5 -1
- package/dist/core/api/middlewares/retry/retry.constants.d.ts +3 -0
- package/dist/core/api/middlewares/retry/retry.constants.js +7 -0
- package/dist/core/api/middlewares/retry/retry.d.ts +2 -0
- package/dist/core/api/middlewares/retry/retry.js +48 -0
- package/dist/core/api/queries.d.ts +13 -38
- package/dist/core/api/queries.js +16 -99
- package/dist/core/events.d.ts +2 -4
- package/dist/core/i18n/date.d.ts +14 -5
- package/dist/core/i18n/date.js +47 -20
- package/dist/core/i18n/localization.js +10 -3
- package/dist/core/images/helpers.js +6 -5
- package/dist/core/images/srcset.js +2 -2
- package/dist/core/logger.d.ts +17 -0
- package/dist/core/logger.js +13 -0
- package/dist/core/types/api-schema.d.ts +7872 -0
- package/dist/core/types/seats-config.d.ts +5 -4
- package/dist/core/types/seats-config.js +10 -3
- package/dist/core/utils/crypto-address.d.ts +12 -0
- package/dist/core/utils/crypto-address.js +17 -0
- package/dist/core/utils/datetime.d.ts +13 -11
- package/dist/core/utils/datetime.js +41 -51
- package/dist/core/utils/loyalty.d.ts +8 -0
- package/dist/core/utils/loyalty.js +10 -0
- package/dist/core/utils/redaction.d.ts +9 -0
- package/dist/core/utils/redaction.js +58 -0
- package/dist/core/utils/time.js +2 -3
- package/dist/helpers/helpers.d.ts +6 -0
- package/dist/helpers/helpers.js +33 -16
- package/dist/locales/ar-SA.d.ts +38 -21
- package/dist/locales/ar-SA.js +38 -21
- package/dist/locales/da-DK.d.ts +38 -21
- package/dist/locales/da-DK.js +38 -21
- package/dist/locales/de-DE.d.ts +38 -21
- package/dist/locales/de-DE.js +38 -21
- package/dist/locales/en-IE.d.ts +38 -21
- package/dist/locales/en-IE.js +38 -21
- package/dist/locales/en-US.d.ts +38 -21
- package/dist/locales/en-US.js +38 -21
- package/dist/locales/es-ES.d.ts +38 -21
- package/dist/locales/es-ES.js +38 -21
- package/dist/locales/fr-FR.d.ts +38 -21
- package/dist/locales/fr-FR.js +38 -21
- package/dist/locales/fr-MA.d.ts +38 -21
- package/dist/locales/fr-MA.js +38 -21
- package/dist/locales/is-IS.d.ts +38 -21
- package/dist/locales/is-IS.js +38 -21
- package/dist/locales/it-IT.d.ts +38 -21
- package/dist/locales/it-IT.js +38 -21
- package/dist/locales/ms-MY.d.ts +38 -21
- package/dist/locales/ms-MY.js +38 -21
- package/dist/locales/nb-NO.d.ts +38 -21
- package/dist/locales/nb-NO.js +38 -21
- package/dist/locales/pl-PL.d.ts +38 -21
- package/dist/locales/pl-PL.js +38 -21
- package/dist/locales/pt-PT.d.ts +38 -21
- package/dist/locales/pt-PT.js +38 -21
- package/dist/locales/sv-SE.d.ts +38 -21
- package/dist/locales/sv-SE.js +38 -21
- package/dist/locales/th-TH.d.ts +38 -21
- package/dist/locales/th-TH.js +38 -21
- package/dist/locales/tr-TR.d.ts +38 -21
- package/dist/locales/tr-TR.js +38 -21
- package/dist/locales/zh-CN.d.ts +38 -21
- package/dist/locales/zh-CN.js +38 -21
- package/dist/locales/zh-HK.d.ts +38 -21
- package/dist/locales/zh-HK.js +38 -21
- package/dist/mixins/base.mixin.d.ts +3 -1
- package/dist/mixins/base.mixin.js +10 -7
- package/dist/mixins/coinbase.mixin.d.ts +13 -17
- package/dist/mixins/coinbase.mixin.js +251 -288
- package/dist/mixins/error-modal.mixin.js +8 -4
- package/dist/mixins/location-search/location-search.d.ts +13 -1
- package/dist/mixins/location-search/location-search.js +35 -27
- package/dist/mixins/overlay/overlay-mixin.js +39 -3
- package/dist/mixins/overlay/types.d.ts +1 -0
- package/dist/mixins/search-mixin/search-mixin.js +8 -5
- package/dist/sdk/diagnostics.js +2 -0
- package/dist/sdk/mount.d.ts +10 -0
- package/dist/sdk/mount.js +20 -1
- package/dist/sdk/page-registry.js +5 -0
- package/dist/sdk/params.d.ts +53 -0
- package/dist/sdk/params.js +180 -0
- package/dist/sdk/redaction.d.ts +1 -4
- package/dist/sdk/redaction.js +2 -41
- package/dist/sdk/types.d.ts +21 -7
- package/dist/sdk/url.d.ts +1 -1
- package/dist/sdk/url.js +12 -5
- package/dist/sdk/validation.d.ts +1 -26
- package/dist/sdk/validation.js +8 -145
- package/dist/styles/tokens.d.ts +1 -1
- package/dist/styles/tokens.generated.d.ts +1 -1
- package/dist/styles/tokens.generated.js +1 -1
- package/dist/views/chrome-only-page/chrome-only-page.component.d.ts +30 -0
- package/dist/views/chrome-only-page/chrome-only-page.component.js +24 -0
- package/dist/views/chrome-only-page/chrome-only-page.d.ts +8 -0
- package/dist/views/chrome-only-page/chrome-only-page.js +6 -0
- package/dist/views/chrome-only-page/chrome-only-page.styles.js +13 -0
- package/dist/views/details-page/details-page.component.d.ts +11 -4
- package/dist/views/details-page/details-page.component.js +263 -237
- package/dist/views/details-page/details-page.utilts.d.ts +63 -3
- package/dist/views/details-page/details-page.utilts.js +53 -5
- package/dist/views/details-page/partials/location-categories/location-categories.component.d.ts +29 -0
- package/dist/views/details-page/partials/location-categories/location-categories.component.js +149 -0
- package/dist/views/details-page/partials/location-categories/location-categories.d.ts +8 -0
- package/dist/views/details-page/partials/location-categories/location-categories.js +6 -0
- package/dist/views/details-page/partials/location-categories/location-categories.styles.js +35 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.component.d.ts +26 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.component.js +158 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.d.ts +8 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.js +6 -0
- package/dist/views/details-page/partials/location-highlights/location-highlights.styles.js +42 -0
- package/dist/views/details-page/partials/tour-description/tour-description.component.js +1 -4
- package/dist/views/help-page/help-page.component.d.ts +2 -0
- package/dist/views/help-page/help-page.component.js +37 -18
- package/dist/views/help-page/help-page.utils.js +6 -5
- package/dist/views/landing-page/landing-page.component.d.ts +5 -8
- package/dist/views/landing-page/landing-page.component.js +82 -97
- package/dist/views/payment-page/controllers/crypto-auth.controller.d.ts +10 -4
- package/dist/views/payment-page/controllers/crypto-auth.controller.js +53 -31
- package/dist/views/payment-page/controllers/crypto-transfer.controller.d.ts +9 -5
- package/dist/views/payment-page/controllers/crypto-transfer.controller.js +26 -39
- package/dist/views/payment-page/controllers/payment-flow.controller.d.ts +6 -1
- package/dist/views/payment-page/controllers/payment-flow.controller.js +1 -0
- package/dist/views/payment-page/controllers/stripe-payment.controller.d.ts +20 -2
- package/dist/views/payment-page/controllers/stripe-payment.controller.js +42 -19
- package/dist/views/payment-page/partials/activity-details/activity-details.component.d.ts +2 -0
- package/dist/views/payment-page/partials/activity-details/activity-details.component.js +6 -3
- package/dist/views/payment-page/partials/billing-address/billing-address.component.d.ts +2 -0
- package/dist/views/payment-page/partials/billing-address/billing-address.component.js +5 -1
- package/dist/views/payment-page/partials/confirmation/confirmation.component.js +2 -3
- package/dist/views/payment-page/partials/country-field/country-field.component.js +1 -1
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.component.js +3 -3
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +2 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.js +36 -7
- package/dist/views/payment-page/partials/stripe/stripe.utils.js +0 -3
- package/dist/views/payment-page/payment-page.component.d.ts +39 -6
- package/dist/views/payment-page/payment-page.component.js +302 -178
- package/dist/views/payment-page/payment-page.constants.d.ts +1 -27
- package/dist/views/payment-page/payment-page.constants.js +3 -30
- package/dist/views/payment-page/payment-page.types.d.ts +1 -19
- package/dist/views/payment-page/payment-page.utils.d.ts +22 -13
- package/dist/views/payment-page/payment-page.utils.js +57 -75
- package/dist/views/payment-page/services/payment-api.service.d.ts +16 -34
- package/dist/views/payment-page/services/payment-api.service.js +19 -27
- package/dist/views/search-page/search-page.component.d.ts +2 -0
- package/dist/views/search-page/search-page.component.js +39 -20
- package/dist/views/suggestion-widget/suggestion-widget.component.d.ts +1 -0
- package/dist/views/suggestion-widget/suggestion-widget.component.js +6 -5
- package/package.json +24 -20
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.d.ts +0 -10
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.component.js +0 -43
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.d.ts +0 -8
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.js +0 -6
- package/dist/components/attraction-discovery/attraction-discovery-image/attraction-discovery-image.styles.js +0 -23
- package/dist/components/attraction-discovery/attraction-discovery.component.d.ts +0 -10
- package/dist/components/attraction-discovery/attraction-discovery.component.js +0 -52
- package/dist/components/attraction-discovery/attraction-discovery.constants.d.ts +0 -4
- package/dist/components/attraction-discovery/attraction-discovery.constants.js +0 -5
- package/dist/components/attraction-discovery/attraction-discovery.d.ts +0 -8
- package/dist/components/attraction-discovery/attraction-discovery.js +0 -6
- package/dist/components/attraction-discovery/attraction-discovery.styles.js +0 -193
- package/dist/components/basket-rewards/basket-rewards.component.d.ts +0 -10
- package/dist/components/basket-rewards/basket-rewards.component.js +0 -52
- package/dist/components/basket-rewards/basket-rewards.d.ts +0 -8
- package/dist/components/basket-rewards/basket-rewards.js +0 -6
- package/dist/components/basket-rewards/basket-rewards.styles.js +0 -18
- package/dist/components/filter-chip/filter-chip.component.d.ts +0 -12
- package/dist/components/filter-chip/filter-chip.component.js +0 -68
- package/dist/components/filter-chip/filter-chip.constants.d.ts +0 -2
- package/dist/components/filter-chip/filter-chip.constants.js +0 -2
- package/dist/components/filter-chip/filter-chip.d.ts +0 -8
- package/dist/components/filter-chip/filter-chip.js +0 -6
- package/dist/components/filter-chip/filter-chip.styles.d.ts +0 -2
- package/dist/components/filter-chip/filter-chip.styles.js +0 -162
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.d.ts +0 -10
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.component.js +0 -43
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.d.ts +0 -8
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.js +0 -6
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.d.ts +0 -2
- package/dist/components/image-carousel/image-carousel-item/image-carousel-item.styles.js +0 -28
- package/dist/components/image-carousel/image-carousel.component.d.ts +0 -8
- package/dist/components/image-carousel/image-carousel.component.js +0 -36
- package/dist/components/image-carousel/image-carousel.d.ts +0 -8
- package/dist/components/image-carousel/image-carousel.js +0 -6
- package/dist/components/image-carousel/image-carousel.styles.d.ts +0 -2
- package/dist/components/image-carousel/image-carousel.styles.js +0 -72
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.d.ts +0 -9
- package/dist/components/itinerary/itinerary-item/itinerary-item.component.js +0 -45
- package/dist/components/itinerary/itinerary-item/itinerary-item.d.ts +0 -8
- package/dist/components/itinerary/itinerary-item/itinerary-item.js +0 -6
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.d.ts +0 -2
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +0 -70
- package/dist/components/itinerary/itinerary.component.d.ts +0 -7
- package/dist/components/itinerary/itinerary.component.js +0 -23
- package/dist/components/itinerary/itinerary.d.ts +0 -8
- package/dist/components/itinerary/itinerary.js +0 -6
- package/dist/components/itinerary/itinerary.styles.d.ts +0 -2
- package/dist/components/itinerary/itinerary.styles.js +0 -15
- package/dist/components/marketing-tag/marketing-tag.component.d.ts +0 -5
- package/dist/components/marketing-tag/marketing-tag.component.js +0 -8
- package/dist/components/marketing-tag/marketing-tag.d.ts +0 -8
- package/dist/components/marketing-tag/marketing-tag.js +0 -6
- package/dist/components/marketing-tag/marketing-tag.styles.d.ts +0 -2
- package/dist/components/marketing-tag/marketing-tag.styles.js +0 -36
- package/dist/components/price/price.component.d.ts +0 -12
- package/dist/components/price/price.component.js +0 -38
- package/dist/components/price/price.d.ts +0 -8
- package/dist/components/price/price.js +0 -6
- package/dist/components/reviews/review/review.component.d.ts +0 -9
- package/dist/components/reviews/review/review.component.js +0 -41
- package/dist/components/reviews/review/review.d.ts +0 -8
- package/dist/components/reviews/review/review.js +0 -6
- package/dist/components/reviews/review/review.styles.d.ts +0 -2
- package/dist/components/reviews/review/review.styles.js +0 -45
- package/dist/components/reviews/reviews.component.d.ts +0 -9
- package/dist/components/reviews/reviews.component.js +0 -56
- package/dist/components/reviews/reviews.d.ts +0 -8
- package/dist/components/reviews/reviews.js +0 -6
- package/dist/components/reviews/reviews.styles.d.ts +0 -2
- package/dist/components/reviews/reviews.styles.js +0 -73
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.d.ts +0 -10
- package/dist/components/selected-tickets-preview/selected-tickets-preview.component.js +0 -51
- package/dist/components/selected-tickets-preview/selected-tickets-preview.d.ts +0 -8
- package/dist/components/selected-tickets-preview/selected-tickets-preview.js +0 -6
- package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.d.ts +0 -2
- package/dist/components/selected-tickets-preview/selected-tickets-preview.styles.js +0 -89
- package/dist/components/tag/tag.component.d.ts +0 -8
- package/dist/components/tag/tag.component.js +0 -33
- package/dist/components/tag/tag.constants.d.ts +0 -1
- package/dist/components/tag/tag.constants.js +0 -1
- package/dist/components/tag/tag.d.ts +0 -8
- package/dist/components/tag/tag.js +0 -6
- package/dist/components/tag/tag.styles.d.ts +0 -2
- package/dist/components/tag/tag.styles.js +0 -56
- package/dist/components/tooltip/tooltip.component.d.ts +0 -19
- package/dist/components/tooltip/tooltip.component.js +0 -124
- package/dist/components/tooltip/tooltip.d.ts +0 -8
- package/dist/components/tooltip/tooltip.js +0 -6
- package/dist/components/tooltip/tooltip.styles.d.ts +0 -2
- package/dist/components/tooltip/tooltip.styles.js +0 -79
- package/dist/core/signals.d.ts +0 -2
- package/dist/core/signals.js +0 -3
- package/dist/core/storybook/argTypes.d.ts +0 -1
- package/dist/core/storybook/argTypes.js +0 -46
- package/dist/core/storybook/cssprops.d.ts +0 -30
- package/dist/core/storybook/cssprops.js +0 -46
- package/dist/core/storybook/demo.d.ts +0 -4
- package/dist/core/storybook/demo.js +0 -17
- package/dist/core/types/api-errors.d.ts +0 -8
- package/dist/core/types/api-errors.js +0 -1
- package/dist/styles/contrast-fixtures.d.ts +0 -5
- package/dist/styles/contrast-fixtures.js +0 -131
- package/dist/views/payment-page/domain/payment-mappers.d.ts +0 -7
- package/dist/views/payment-page/domain/payment-mappers.js +0 -7
- package/dist/views/payment-page/domain/payment-validators.d.ts +0 -6
- package/dist/views/payment-page/domain/payment-validators.js +0 -6
- package/dist/views/payment-page/domain/recovery-payload.d.ts +0 -8
- package/dist/views/payment-page/domain/recovery-payload.js +0 -7
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.d.ts +0 -22
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.component.js +0 -65
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.d.ts +0 -8
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.js +0 -6
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.d.ts +0 -2
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +0 -12
- package/dist/views/payment-page/payment-page.validation-schema.d.ts +0 -28
- package/dist/views/payment-page/payment-page.validation-schema.js +0 -42
- /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
- /package/dist/{components/attraction-discovery/attraction-discovery.styles.d.ts → views/details-page/partials/location-categories/location-categories.styles.d.ts} +0 -0
- /package/dist/{components/basket-rewards/basket-rewards.styles.d.ts → views/details-page/partials/location-highlights/location-highlights.styles.d.ts} +0 -0
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html, LitElement } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { localized, msg } from "@lit/localize";
|
|
10
|
-
import styles from "./reviews.styles.js";
|
|
11
|
-
let CorasReviews = class CorasReviews extends LitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.overallRating = 0;
|
|
15
|
-
this.reviewNumber = 0;
|
|
16
|
-
}
|
|
17
|
-
static { this.styles = styles; }
|
|
18
|
-
get overallRatingLabel() {
|
|
19
|
-
return `${msg("Overall Rating")} ${this.overallRating}`;
|
|
20
|
-
}
|
|
21
|
-
get reviewNumberLabel() {
|
|
22
|
-
return msg(html `Based on ${this.reviewNumber} Reviews`);
|
|
23
|
-
}
|
|
24
|
-
render() {
|
|
25
|
-
return html `
|
|
26
|
-
<div class="heading">
|
|
27
|
-
<span data-testid="caption" class="caption">${msg("Reviews")}</span>
|
|
28
|
-
|
|
29
|
-
<div class="rating">
|
|
30
|
-
<span data-testid="rating-label" class="rating-label"
|
|
31
|
-
>${this.overallRatingLabel}</span
|
|
32
|
-
>
|
|
33
|
-
<coras-star-rating rating=${this.overallRating}></coras-star-rating>
|
|
34
|
-
</div>
|
|
35
|
-
|
|
36
|
-
<span data-testid="review-number" class="review-number"
|
|
37
|
-
>${this.reviewNumberLabel}</span
|
|
38
|
-
>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="reviews">
|
|
42
|
-
<slot></slot>
|
|
43
|
-
</div>
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
__decorate([
|
|
48
|
-
property({ type: Number, attribute: "overall-rating" })
|
|
49
|
-
], CorasReviews.prototype, "overallRating", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
property({ type: Number, attribute: "review-number" })
|
|
52
|
-
], CorasReviews.prototype, "reviewNumber", void 0);
|
|
53
|
-
CorasReviews = __decorate([
|
|
54
|
-
localized()
|
|
55
|
-
], CorasReviews);
|
|
56
|
-
export { CorasReviews };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import component from "../../styles/defaults/component.js";
|
|
3
|
-
export default css `
|
|
4
|
-
${component}
|
|
5
|
-
|
|
6
|
-
:host {
|
|
7
|
-
--reviews-border-color: var(--coras-color-neutral-300);
|
|
8
|
-
--reviews-caption-font-size: var(--coras-font-size-2xl);
|
|
9
|
-
--reviews-caption-font-weight: var(--coras-font-weight-semibold);
|
|
10
|
-
--reviews-caption-line-height: var(--coras-font-size-3xl);
|
|
11
|
-
--reviews-caption-color: var(--coras-color-text);
|
|
12
|
-
--reviews-rating-label-font-size: var(--coras-font-size-2xl);
|
|
13
|
-
--reviews-rating-label-font-weight: var(--coras-font-weight-semibold);
|
|
14
|
-
--reviews-rating-label-line-height: var(--coras-font-size-3xl);
|
|
15
|
-
--reviews-rating-label-color: var(--coras-color-text);
|
|
16
|
-
--reviews-review-number-font-size: var(--coras-font-size-base);
|
|
17
|
-
--reviews-review-number-font-weight: var(--coras-font-weight-normal);
|
|
18
|
-
--reviews-review-number-line-height: var(--coras-font-size-2xl);
|
|
19
|
-
--reviews-review-number-color: var(--coras-color-text);
|
|
20
|
-
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
flex-wrap: nowrap;
|
|
24
|
-
gap: 26px;
|
|
25
|
-
|
|
26
|
-
.heading {
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
gap: 16px;
|
|
30
|
-
border-bottom: 1px solid var(--reviews-border-color);
|
|
31
|
-
padding-bottom: 8px;
|
|
32
|
-
|
|
33
|
-
.caption {
|
|
34
|
-
font-size: var(--reviews-caption-font-size);
|
|
35
|
-
font-weight: var(--reviews-caption-font-weight);
|
|
36
|
-
line-height: var(--reviews-caption-line-height);
|
|
37
|
-
color: var(--reviews-caption-color);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.rating {
|
|
41
|
-
display: inline-flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
gap: 16px;
|
|
44
|
-
|
|
45
|
-
.rating-label {
|
|
46
|
-
font-size: var(--reviews-rating-label-font-size);
|
|
47
|
-
font-weight: var(--reviews-rating-label-font-weight);
|
|
48
|
-
line-height: var(--reviews-rating-label-line-height);
|
|
49
|
-
color: var(--reviews-rating-label-color);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.review-number {
|
|
54
|
-
font-size: var(--reviews-review-number-font-size);
|
|
55
|
-
font-weight: var(--reviews-review-number-font-weight);
|
|
56
|
-
line-height: var(--reviews-review-number-line-height);
|
|
57
|
-
color: var(--reviews-review-number-color);
|
|
58
|
-
margin-top: 16px;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.reviews {
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
gap: 48px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
::slotted(*) {
|
|
69
|
-
border-bottom: 1px solid var(--reviews-border-color);
|
|
70
|
-
padding-bottom: 8px;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
`;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
2
|
-
export declare class CorasSelectedTicketsPreview extends LitElement {
|
|
3
|
-
static styles: CSSResultGroup;
|
|
4
|
-
open: boolean;
|
|
5
|
-
total: string;
|
|
6
|
-
private setVisibility;
|
|
7
|
-
firstUpdated(): void;
|
|
8
|
-
disconnectedCallback(): void;
|
|
9
|
-
render(): import("lit").TemplateResult<1>;
|
|
10
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { html, LitElement } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { localized, msg } from "@lit/localize";
|
|
10
|
-
import styles from "./selected-tickets-preview.styles.js";
|
|
11
|
-
let CorasSelectedTicketsPreview = class CorasSelectedTicketsPreview extends LitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.open = false;
|
|
15
|
-
this.total = "";
|
|
16
|
-
}
|
|
17
|
-
static { this.styles = styles; }
|
|
18
|
-
setVisibility() {
|
|
19
|
-
this.style.visibility = this.open ? "visible" : "hidden";
|
|
20
|
-
}
|
|
21
|
-
firstUpdated() {
|
|
22
|
-
this.setVisibility();
|
|
23
|
-
this.addEventListener("animationend", this.setVisibility);
|
|
24
|
-
}
|
|
25
|
-
disconnectedCallback() {
|
|
26
|
-
super.disconnectedCallback();
|
|
27
|
-
this.removeEventListener("animationend", this.setVisibility);
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return html `
|
|
31
|
-
<div class="content">
|
|
32
|
-
<slot name="details"></slot>
|
|
33
|
-
|
|
34
|
-
<div class="bottom">
|
|
35
|
-
<span class="total">${msg("Total")} ${this.total}</span>
|
|
36
|
-
<slot name="button"></slot>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
`;
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
__decorate([
|
|
43
|
-
property({ type: Boolean })
|
|
44
|
-
], CorasSelectedTicketsPreview.prototype, "open", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
property({ type: String })
|
|
47
|
-
], CorasSelectedTicketsPreview.prototype, "total", void 0);
|
|
48
|
-
CorasSelectedTicketsPreview = __decorate([
|
|
49
|
-
localized()
|
|
50
|
-
], CorasSelectedTicketsPreview);
|
|
51
|
-
export { CorasSelectedTicketsPreview };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { CorasSelectedTicketsPreview } from "./selected-tickets-preview.component.js";
|
|
2
|
-
export * from "./selected-tickets-preview.component.js";
|
|
3
|
-
export default CorasSelectedTicketsPreview;
|
|
4
|
-
declare global {
|
|
5
|
-
interface HTMLElementTagNameMap {
|
|
6
|
-
"coras-selected-tickets-preview": CorasSelectedTicketsPreview;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CorasSelectedTicketsPreview } from "./selected-tickets-preview.component.js";
|
|
2
|
-
export * from "./selected-tickets-preview.component.js";
|
|
3
|
-
export default CorasSelectedTicketsPreview;
|
|
4
|
-
if (!customElements.get("coras-selected-tickets-preview")) {
|
|
5
|
-
customElements.define("coras-selected-tickets-preview", CorasSelectedTicketsPreview);
|
|
6
|
-
}
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import component from "../../styles/defaults/component.js";
|
|
3
|
-
export default css `
|
|
4
|
-
${component}
|
|
5
|
-
|
|
6
|
-
:host {
|
|
7
|
-
--selected-tickets-preview-border-color: var(--coras-color-neutral-300);
|
|
8
|
-
--selected-tickets-preview-details-font-size: var(--coras-font-size-sm);
|
|
9
|
-
--selected-tickets-preview-details-line-height: var(--coras-font-size-xl);
|
|
10
|
-
--selected-tickets-preview-details-font-weight: var(
|
|
11
|
-
--coras-font-weight-normal
|
|
12
|
-
);
|
|
13
|
-
--selected-tickets-preview-details-color: var(--coras-color-text);
|
|
14
|
-
--selected-tickets-preview-total-font-size: var(--coras-font-size-base);
|
|
15
|
-
--selected-tickets-preview-total-line-height: var(--coras-font-size-2xl);
|
|
16
|
-
--selected-tickets-preview-total-font-weight: var(
|
|
17
|
-
--coras-font-weight-semibold
|
|
18
|
-
);
|
|
19
|
-
--selected-tickets-preview-total-color: var(--coras-color-text);
|
|
20
|
-
|
|
21
|
-
position: fixed;
|
|
22
|
-
bottom: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: center;
|
|
26
|
-
align-items: center;
|
|
27
|
-
width: 100vw;
|
|
28
|
-
padding-top: 2rem;
|
|
29
|
-
padding-bottom: 3.5rem;
|
|
30
|
-
border-top: 1px solid var(--selected-tickets-preview-border-color);
|
|
31
|
-
box-shadow: var(--coras-shadow-top);
|
|
32
|
-
animation: slideOut 0.4s both;
|
|
33
|
-
|
|
34
|
-
.content {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
gap: 0.625rem;
|
|
38
|
-
width: 100%;
|
|
39
|
-
max-width: 551px;
|
|
40
|
-
|
|
41
|
-
.details {
|
|
42
|
-
font-size: var(--selected-tickets-preview-details-font-size);
|
|
43
|
-
line-height: var(--selected-tickets-preview-details-line-height);
|
|
44
|
-
font-weight: var(--selected-tickets-preview-details-font-weight);
|
|
45
|
-
color: var(--selected-tickets-preview-details-color);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.bottom {
|
|
49
|
-
display: flex;
|
|
50
|
-
flex-direction: row;
|
|
51
|
-
justify-content: space-between;
|
|
52
|
-
align-items: flex-end;
|
|
53
|
-
width: 100%;
|
|
54
|
-
|
|
55
|
-
.total {
|
|
56
|
-
font-size: var(--selected-tickets-preview-total-font-size);
|
|
57
|
-
line-height: var(--selected-tickets-preview-total-line-height);
|
|
58
|
-
font-weight: var(--selected-tickets-preview-total-font-weight);
|
|
59
|
-
color: var(--selected-tickets-preview-total-color);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
:host([open]) {
|
|
66
|
-
animation: slideIn 0.4s both;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@keyframes slideIn {
|
|
70
|
-
from {
|
|
71
|
-
transform: translate3d(0, 100%, 0);
|
|
72
|
-
visibility: visible;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
to {
|
|
76
|
-
transform: translate3d(0, 0, 0);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
@keyframes slideOut {
|
|
81
|
-
from {
|
|
82
|
-
transform: translate3d(0, 0, 0);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
to {
|
|
86
|
-
transform: translate3d(0, 100%, 0);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
2
|
-
import type { variants } from "./tag.constants.js";
|
|
3
|
-
export declare class CorasTag extends LitElement {
|
|
4
|
-
static styles: CSSResultGroup;
|
|
5
|
-
variant: (typeof variants)[number];
|
|
6
|
-
private computeClasses;
|
|
7
|
-
render(): import("lit").TemplateResult<1>;
|
|
8
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { LitElement, html } from "lit";
|
|
8
|
-
import { property } from "lit/decorators.js";
|
|
9
|
-
import { classMap } from "lit/directives/class-map.js";
|
|
10
|
-
import styles from "./tag.styles.js";
|
|
11
|
-
export class CorasTag extends LitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.variant = "blue";
|
|
15
|
-
}
|
|
16
|
-
static { this.styles = styles; }
|
|
17
|
-
computeClasses() {
|
|
18
|
-
return {
|
|
19
|
-
blue: this.variant === "blue",
|
|
20
|
-
green: this.variant === "green",
|
|
21
|
-
red: this.variant === "red",
|
|
22
|
-
purple: this.variant === "purple",
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
return html `<span class=${classMap(this.computeClasses())}>
|
|
27
|
-
<slot></slot>
|
|
28
|
-
</span>`;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
__decorate([
|
|
32
|
-
property()
|
|
33
|
-
], CorasTag.prototype, "variant", void 0);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const variants: string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const variants = ["blue", "green", "red", "purple"];
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { css } from "lit";
|
|
2
|
-
import component from "../../styles/defaults/component.js";
|
|
3
|
-
export default css `
|
|
4
|
-
${component}
|
|
5
|
-
|
|
6
|
-
:host {
|
|
7
|
-
display: inline-block;
|
|
8
|
-
|
|
9
|
-
--tag-line-height: 1rem;
|
|
10
|
-
--tag-letter-spacing: 0.01em;
|
|
11
|
-
|
|
12
|
-
--tag-border-radius: var(--coras-radius-md);
|
|
13
|
-
--tag-font-size: var(--coras-font-size-xs);
|
|
14
|
-
--tag-font-weight: var(--coras-font-weight-semibold);
|
|
15
|
-
|
|
16
|
-
--tag-color-blue: var(--coras-color-text);
|
|
17
|
-
--tag-background-color-blue: var(--coras-color-primary-tint);
|
|
18
|
-
--tag-color-green: var(--coras-color-success);
|
|
19
|
-
--tag-background-color-green: var(--coras-color-success-background);
|
|
20
|
-
--tag-color-red: var(--coras-color-error);
|
|
21
|
-
--tag-background-color-red: var(--coras-color-error-background);
|
|
22
|
-
--tag-color-purple: var(--coras-color-info);
|
|
23
|
-
--tag-background-color-purple: var(--coras-color-info-background);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
span {
|
|
27
|
-
border-radius: var(--tag-border-radius);
|
|
28
|
-
font-size: var(--tag-font-size);
|
|
29
|
-
font-weight: var(--tag-font-weight);
|
|
30
|
-
justify-content: center;
|
|
31
|
-
line-height: var(--tag-line-height);
|
|
32
|
-
letter-spacing: var(--tag-letter-spacing);
|
|
33
|
-
padding: 0.25rem 0.5rem;
|
|
34
|
-
white-space: nowrap;
|
|
35
|
-
|
|
36
|
-
&.blue {
|
|
37
|
-
color: var(--tag-color-blue);
|
|
38
|
-
background-color: var(--tag-background-color-blue);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&.green {
|
|
42
|
-
color: var(--tag-color-green);
|
|
43
|
-
background-color: var(--tag-background-color-green);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&.red {
|
|
47
|
-
color: var(--tag-color-red);
|
|
48
|
-
background-color: var(--tag-background-color-red);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&.purple {
|
|
52
|
-
color: var(--tag-color-purple);
|
|
53
|
-
background-color: var(--tag-background-color-purple);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type CSSResultGroup, LitElement } from "lit";
|
|
2
|
-
export declare class CorasTooltip extends LitElement {
|
|
3
|
-
static styles: CSSResultGroup;
|
|
4
|
-
private trigger;
|
|
5
|
-
private content;
|
|
6
|
-
private arrowElement;
|
|
7
|
-
private open;
|
|
8
|
-
private cleanup;
|
|
9
|
-
private applyAutoUpdate;
|
|
10
|
-
private timeout;
|
|
11
|
-
private handleMouseLeave;
|
|
12
|
-
private handleMouseEnter;
|
|
13
|
-
private hide;
|
|
14
|
-
private handleAnimationEnd;
|
|
15
|
-
private handleDocumentMouseDown;
|
|
16
|
-
firstUpdated(): void;
|
|
17
|
-
disconnectedCallback(): void;
|
|
18
|
-
render(): import("lit").TemplateResult<1>;
|
|
19
|
-
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
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
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { autoUpdate, computePosition, flip, offset, shift, arrow, } from "@floating-ui/dom";
|
|
8
|
-
import { LitElement, html } from "lit";
|
|
9
|
-
import { query, state } from "lit/decorators.js";
|
|
10
|
-
import styles from "./tooltip.styles.js";
|
|
11
|
-
export class CorasTooltip extends LitElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments);
|
|
14
|
-
this.open = false;
|
|
15
|
-
this.handleMouseLeave = () => {
|
|
16
|
-
this.timeout = setTimeout(() => {
|
|
17
|
-
this.open = false;
|
|
18
|
-
this.removeAttribute("open");
|
|
19
|
-
}, 200);
|
|
20
|
-
};
|
|
21
|
-
this.handleMouseEnter = () => {
|
|
22
|
-
if (this.open) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
clearTimeout(this.timeout);
|
|
26
|
-
this.open = true;
|
|
27
|
-
this.setAttribute("open", "");
|
|
28
|
-
this.content.style.display = "block";
|
|
29
|
-
};
|
|
30
|
-
this.handleAnimationEnd = () => {
|
|
31
|
-
if (!this.open) {
|
|
32
|
-
this.hide();
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
this.handleDocumentMouseDown = (event) => {
|
|
36
|
-
const path = event.composedPath();
|
|
37
|
-
if (!path.includes(this.content) && !path.includes(this.trigger)) {
|
|
38
|
-
this.hide();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
static { this.styles = styles; }
|
|
43
|
-
applyAutoUpdate() {
|
|
44
|
-
this.cleanup = autoUpdate(this.trigger, this.content, () => {
|
|
45
|
-
const middleware = [
|
|
46
|
-
shift({ padding: 6 }),
|
|
47
|
-
offset({ mainAxis: 10 }),
|
|
48
|
-
flip(),
|
|
49
|
-
arrow({ element: this.arrowElement }),
|
|
50
|
-
];
|
|
51
|
-
computePosition(this.trigger, this.content, {
|
|
52
|
-
placement: "top",
|
|
53
|
-
middleware,
|
|
54
|
-
}).then(({ x, y, middlewareData, placement }) => {
|
|
55
|
-
this.setAttribute("placement", placement);
|
|
56
|
-
Object.assign(this.content.style, {
|
|
57
|
-
left: x != null ? `${x}px` : "",
|
|
58
|
-
top: y != null ? `${y}px` : "",
|
|
59
|
-
});
|
|
60
|
-
if (middlewareData.arrow) {
|
|
61
|
-
const { x } = middlewareData.arrow;
|
|
62
|
-
Object.assign(this.arrowElement.style, {
|
|
63
|
-
left: x != null ? `${x}px` : "",
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
hide() {
|
|
70
|
-
this.content.style.display = "none";
|
|
71
|
-
this.open = false;
|
|
72
|
-
}
|
|
73
|
-
firstUpdated() {
|
|
74
|
-
this.applyAutoUpdate();
|
|
75
|
-
this.trigger.addEventListener("mouseenter", this.handleMouseEnter);
|
|
76
|
-
this.trigger.addEventListener("click", this.handleMouseEnter);
|
|
77
|
-
this.trigger.addEventListener("mouseleave", this.handleMouseLeave);
|
|
78
|
-
this.content.addEventListener("mouseenter", this.handleMouseEnter);
|
|
79
|
-
this.content.addEventListener("mouseleave", this.handleMouseLeave);
|
|
80
|
-
this.content.addEventListener("animationend", this.handleAnimationEnd);
|
|
81
|
-
document.addEventListener("mousedown", this.handleDocumentMouseDown);
|
|
82
|
-
}
|
|
83
|
-
disconnectedCallback() {
|
|
84
|
-
if (this.cleanup) {
|
|
85
|
-
this.cleanup();
|
|
86
|
-
}
|
|
87
|
-
this.trigger.removeEventListener("mouseenter", this.handleMouseEnter);
|
|
88
|
-
this.trigger.removeEventListener("click", this.handleMouseEnter);
|
|
89
|
-
this.trigger.removeEventListener("mouseleave", this.handleMouseLeave);
|
|
90
|
-
this.content.removeEventListener("mouseenter", this.handleMouseEnter);
|
|
91
|
-
this.content.removeEventListener("mouseleave", this.handleMouseLeave);
|
|
92
|
-
this.content.removeEventListener("animationend", this.handleAnimationEnd);
|
|
93
|
-
document.removeEventListener("mousedown", this.handleDocumentMouseDown);
|
|
94
|
-
super.disconnectedCallback();
|
|
95
|
-
}
|
|
96
|
-
render() {
|
|
97
|
-
return html `
|
|
98
|
-
<slot name="trigger"></slot>
|
|
99
|
-
<div class="overlay">
|
|
100
|
-
<div
|
|
101
|
-
class="content"
|
|
102
|
-
part="content"
|
|
103
|
-
aria-hidden=${this.open ? "false" : "true"}
|
|
104
|
-
aria-labelledby="dropdown"
|
|
105
|
-
>
|
|
106
|
-
<div class="arrow"></div>
|
|
107
|
-
<slot></slot>
|
|
108
|
-
</div>
|
|
109
|
-
</div>
|
|
110
|
-
`;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
__decorate([
|
|
114
|
-
query("slot[name=trigger]")
|
|
115
|
-
], CorasTooltip.prototype, "trigger", void 0);
|
|
116
|
-
__decorate([
|
|
117
|
-
query(".content")
|
|
118
|
-
], CorasTooltip.prototype, "content", void 0);
|
|
119
|
-
__decorate([
|
|
120
|
-
query(".arrow")
|
|
121
|
-
], CorasTooltip.prototype, "arrowElement", void 0);
|
|
122
|
-
__decorate([
|
|
123
|
-
state()
|
|
124
|
-
], CorasTooltip.prototype, "open", void 0);
|