@coras-io/embed 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +142 -0
- package/README.md +8 -7
- package/dist/components/accordion/accordion-item/accordion-item.styles.js +1 -1
- package/dist/components/alert/alert.styles.js +14 -14
- package/dist/components/attraction-card/base/attraction-card.styles.js +7 -3
- package/dist/components/attraction-discovery/attraction-discovery.styles.js +1 -1
- package/dist/components/attraction-header/attraction-header.styles.js +1 -1
- package/dist/components/attraction-option/attraction-option.styles.js +4 -4
- package/dist/components/basket/basket.styles.js +27 -26
- package/dist/components/basket-empty/basket-empty.styles.js +1 -0
- package/dist/components/basket-item/basket-item.component.js +10 -4
- package/dist/components/basket-item/basket-item.styles.js +9 -3
- package/dist/components/basket-item-ticket/basket-item-ticket.styles.js +1 -3
- package/dist/components/basket-mobile/basket-mobile.styles.js +5 -5
- package/dist/components/better-carousel/better-carousel.styles.js +2 -0
- package/dist/components/bottom-drawer/bottom-drawer.styles.js +6 -4
- package/dist/components/button/button.component.d.ts +0 -1
- package/dist/components/button/button.component.js +1 -8
- package/dist/components/button/button.constants.d.ts +1 -1
- package/dist/components/button/button.constants.js +1 -1
- package/dist/components/button/button.styles.js +66 -39
- package/dist/components/calendar/base/calendar.styles.js +3 -5
- package/dist/components/calendar/multi/multi.styles.js +7 -0
- package/dist/components/category-tag/category-tag.styles.js +10 -7
- package/dist/components/checkbox/checkbox.styles.js +2 -2
- package/dist/components/chip/chip.styles.js +2 -2
- package/dist/components/collect-fida/collect-fida.component.js +5 -3
- package/dist/components/collect-fida/collect-fida.styles.js +9 -16
- package/dist/components/crypto-auth-modal/crypto-auth-modal.component.js +6 -4
- package/dist/components/crypto-auth-modal/crypto-auth-modal.styles.js +2 -2
- package/dist/components/dialog/dialog.styles.js +10 -17
- package/dist/components/drawer/drawer.component.js +6 -0
- package/dist/components/drawer/drawer.styles.js +17 -3
- package/dist/components/dropdown/dropdown.component.js +7 -0
- package/dist/components/dropdown/dropdown.styles.js +3 -6
- package/dist/components/expiration-timer/expiration-timer.styles.js +3 -3
- package/dist/components/explore-card/explore-card.styles.js +1 -1
- package/dist/components/filter-chip/filter-chip.styles.js +11 -9
- package/dist/components/filters-drawer/filters-drawer.component.js +1 -1
- package/dist/components/filters-drawer/filters-drawer.styles.js +6 -5
- package/dist/components/image/image.styles.js +3 -3
- package/dist/components/image-chip/image-chip.styles.js +1 -1
- package/dist/components/input-field/input-field.styles.js +22 -17
- package/dist/components/itinerary/itinerary-item/itinerary-item.styles.js +1 -1
- package/dist/components/joined-fields/joined-fields.styles.js +10 -6
- package/dist/components/loading-spinner/loading-spinner.styles.js +1 -1
- package/dist/components/location-image/location-image.component.d.ts +6 -0
- package/dist/components/location-image/location-image.component.js +15 -2
- package/dist/components/location-image/location-image.styles.js +1 -1
- package/dist/components/locations-results/locations-results.styles.js +4 -6
- package/dist/components/marketing-tag/marketing-tag.styles.js +1 -1
- package/dist/components/message-card/message-card.styles.js +6 -6
- package/dist/components/option-group/option-chip/option-chip.styles.js +4 -3
- package/dist/components/order-confirmation/order-confirmation-item/order-confirmation-item.styles.js +9 -0
- package/dist/components/order-confirmation/order-confirmation.component.js +4 -3
- package/dist/components/order-confirmation/order-confirmation.styles.js +1 -1
- package/dist/components/otp/otp.styles.js +6 -6
- package/dist/components/overlay/overlay.styles.js +5 -1
- package/dist/components/pay-in/pay-in.styles.js +2 -2
- package/dist/components/payment-fiat-method/payment-fiat-method.styles.js +20 -4
- package/dist/components/payment-option/payment-option.styles.js +10 -12
- package/dist/components/performance-time/performance-time.styles.js +2 -2
- package/dist/components/phone-country-code/phone-country-code.styles.js +1 -1
- package/dist/components/points/points.styles.js +1 -1
- package/dist/components/search-button/search-button.styles.js +15 -7
- package/dist/components/seated-selector/seated-selector.component.d.ts +2 -0
- package/dist/components/seated-selector/seated-selector.component.js +53 -10
- package/dist/components/seated-selector/seated-selector.styles.js +77 -14
- package/dist/components/seats-io/seats-io.component.d.ts +2 -0
- package/dist/components/seats-io/seats-io.component.js +25 -2
- package/dist/components/seats-io/seats-io.constants.d.ts +2 -1
- package/dist/components/seats-io/seats-io.constants.js +6 -1
- package/dist/components/seats-io/seats-io.transform.d.ts +8 -2
- package/dist/components/seats-io/seats-io.transform.js +12 -4
- package/dist/components/select-list/select-list.styles.js +1 -0
- package/dist/components/select-list/select-option/select-option.styles.js +3 -3
- package/dist/components/sort-dropdown/sort-dropdown.styles.js +1 -1
- package/dist/components/sort-list/sort-list.styles.js +1 -1
- package/dist/components/sport-options/sport-option/sport-option.styles.js +2 -2
- package/dist/components/star-rating/star-rating.component.d.ts +1 -0
- package/dist/components/star-rating/star-rating.component.js +19 -23
- package/dist/components/star-rating/star-rating.styles.js +32 -6
- package/dist/components/tab/tab.styles.js +1 -1
- package/dist/components/tabs/tabs.styles.js +1 -1
- package/dist/components/tag/tag.styles.js +7 -7
- package/dist/components/text-section/text-section.styles.js +2 -1
- package/dist/components/time-tag/time-tag.styles.js +1 -2
- package/dist/components/tooltip/tooltip.styles.js +3 -3
- package/dist/components/tour-ticket-type-selector/tour-ticket-type/tour-ticket-type.styles.js +2 -2
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.component.js +1 -1
- package/dist/components/tour-ticket-type-selector/tour-ticket-type-selector.styles.js +1 -10
- package/dist/components/transfer-modal/transfer-modal.component.js +3 -3
- package/dist/components/transfer-modal/transfer-modal.styles.js +6 -8
- package/dist/containers/basket/basket.component.d.ts +1 -1
- package/dist/containers/basket/basket.component.js +56 -25
- package/dist/containers/footer/footer.component.d.ts +2 -0
- package/dist/containers/footer/footer.component.js +8 -0
- package/dist/containers/footer/footer.styles.js +12 -0
- package/dist/containers/navbar/navbar.component.d.ts +6 -1
- package/dist/containers/navbar/navbar.component.js +41 -9
- package/dist/containers/navbar/navbar.styles.js +47 -13
- package/dist/contexts/basket/basket.provider.d.ts +1 -0
- package/dist/contexts/basket/basket.provider.js +31 -4
- package/dist/contexts/properties.context.d.ts +4 -4
- package/dist/core/api/middlewares/booking-session/booking-session.constants.d.ts +1 -0
- package/dist/core/api/middlewares/booking-session/booking-session.constants.js +1 -0
- package/dist/core/api/middlewares/booking-session/booking-session.js +18 -27
- package/dist/core/api/middlewares/booking-session/booking-session.utils.d.ts +4 -4
- package/dist/core/api/middlewares/booking-session/booking-session.utils.js +13 -10
- package/dist/core/api/queries.js +3 -2
- package/dist/core/color-scheme.d.ts +14 -0
- package/dist/core/color-scheme.js +48 -0
- package/dist/core/currency/constants.d.ts +1 -1
- package/dist/core/currency/constants.js +4 -3
- package/dist/core/i18n/date.js +20 -9
- package/dist/core/i18n/locale-codes.d.ts +2 -2
- package/dist/core/i18n/locale-codes.js +4 -0
- package/dist/core/images/constants.d.ts +0 -5
- package/dist/core/images/constants.js +0 -5
- package/dist/core/images/helpers.d.ts +8 -0
- package/dist/core/images/helpers.js +14 -6
- package/dist/core/images/srcset.js +2 -2
- package/dist/core/storybook/demo.d.ts +4 -0
- package/dist/core/storybook/demo.js +17 -0
- package/dist/core/types/locales.d.ts +7 -0
- package/dist/core/utils/datetime.js +10 -4
- package/dist/core/utils/locale.d.ts +8 -1
- package/dist/core/utils/locale.js +10 -0
- package/dist/helpers/helpers.d.ts +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -2
- package/dist/locales/ar-SA.d.ts +279 -0
- package/dist/locales/ar-SA.js +288 -0
- package/dist/locales/da-DK.d.ts +100 -82
- package/dist/locales/da-DK.js +104 -89
- package/dist/locales/de-DE.d.ts +100 -82
- package/dist/locales/de-DE.js +104 -89
- package/dist/locales/en-IE.d.ts +250 -232
- package/dist/locales/en-IE.js +254 -239
- package/dist/locales/en-US.d.ts +100 -82
- package/dist/locales/en-US.js +107 -92
- package/dist/locales/es-ES.d.ts +100 -82
- package/dist/locales/es-ES.js +104 -89
- package/dist/locales/fr-FR.d.ts +100 -82
- package/dist/locales/fr-FR.js +104 -89
- package/dist/locales/fr-MA.d.ts +100 -82
- package/dist/locales/fr-MA.js +104 -89
- package/dist/locales/is-IS.d.ts +100 -82
- package/dist/locales/is-IS.js +104 -89
- package/dist/locales/it-IT.d.ts +100 -82
- package/dist/locales/it-IT.js +104 -89
- package/dist/locales/ms-MY.d.ts +100 -82
- package/dist/locales/ms-MY.js +106 -91
- package/dist/locales/nb-NO.d.ts +100 -82
- package/dist/locales/nb-NO.js +104 -89
- package/dist/locales/pl-PL.d.ts +100 -82
- package/dist/locales/pl-PL.js +104 -89
- package/dist/locales/pt-PT.d.ts +100 -82
- package/dist/locales/pt-PT.js +104 -89
- package/dist/locales/sv-SE.d.ts +100 -82
- package/dist/locales/sv-SE.js +104 -89
- package/dist/locales/th-TH.d.ts +100 -82
- package/dist/locales/th-TH.js +104 -89
- package/dist/locales/tr-TR.d.ts +100 -82
- package/dist/locales/tr-TR.js +104 -89
- package/dist/locales/zh-CN.d.ts +100 -82
- package/dist/locales/zh-CN.js +105 -90
- package/dist/locales/zh-HK.d.ts +279 -0
- package/dist/locales/zh-HK.js +288 -0
- package/dist/mixins/coinbase.mixin.js +1 -1
- package/dist/mixins/error-modal.styles.js +2 -2
- package/dist/mixins/location-search/location-search.js +3 -3
- package/dist/mixins/location-search/location-search.styles.js +6 -5
- package/dist/sdk/chrome.d.ts +9 -3
- package/dist/sdk/chrome.js +21 -9
- package/dist/sdk/element-adapter.js +11 -8
- package/dist/sdk/mount.d.ts +3 -3
- package/dist/sdk/mount.js +153 -48
- package/dist/sdk/navigation-intent.js +3 -0
- package/dist/sdk/page-registry.d.ts +14 -2
- package/dist/sdk/page-registry.js +33 -13
- package/dist/sdk/theme.d.ts +2 -16
- package/dist/sdk/theme.js +12 -44
- package/dist/sdk/types.d.ts +59 -30
- package/dist/sdk/url.d.ts +24 -3
- package/dist/sdk/url.js +66 -27
- package/dist/sdk/validation.d.ts +0 -7
- package/dist/sdk/validation.js +104 -48
- package/dist/styles/contrast-fixtures.d.ts +0 -5
- package/dist/styles/contrast-fixtures.js +79 -9
- package/dist/styles/contrast.js +4 -3
- package/dist/styles/defaults/component.js +17 -1
- package/dist/styles/primitives.d.ts +0 -10
- package/dist/styles/primitives.js +2 -12
- 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/styles/tokens.metadata.d.ts +1 -1
- package/dist/styles/tokens.metadata.js +378 -90
- package/dist/views/details-page/details-page.component.d.ts +5 -5
- package/dist/views/details-page/details-page.component.js +77 -80
- package/dist/views/details-page/details-page.styles.js +64 -9
- package/dist/views/help-page/help-page.component.d.ts +1 -0
- package/dist/views/help-page/help-page.component.js +11 -4
- package/dist/views/help-page/help-page.styles.js +21 -8
- package/dist/views/landing-page/landing-page.component.d.ts +4 -4
- package/dist/views/landing-page/landing-page.component.js +65 -65
- package/dist/views/landing-page/landing-page.styles.js +70 -3
- package/dist/views/payment-page/partials/activity-details/activity-details.styles.js +10 -33
- package/dist/views/payment-page/partials/billing-address/billing-address.styles.js +4 -9
- package/dist/views/payment-page/partials/confirmation/confirmation.styles.js +6 -6
- package/dist/views/payment-page/partials/hotel-pickup-list/hotel-pickup-list.styles.js +4 -4
- package/dist/views/payment-page/partials/payment-type-selector/payment-type-selector.styles.js +1 -0
- package/dist/views/payment-page/partials/stripe/stripe.component.d.ts +1 -1
- package/dist/views/payment-page/partials/stripe/stripe.component.js +11 -12
- package/dist/views/payment-page/partials/stripe/stripe.constants.d.ts +2 -15
- package/dist/views/payment-page/partials/stripe/stripe.constants.js +4 -17
- package/dist/views/payment-page/partials/stripe/stripe.styles.js +16 -23
- package/dist/views/payment-page/partials/stripe/stripe.utils.d.ts +25 -14
- package/dist/views/payment-page/partials/stripe/stripe.utils.js +111 -62
- package/dist/views/payment-page/partials/terms-checkbox/terms-checkbox.styles.js +1 -1
- package/dist/views/payment-page/payment-page.component.d.ts +1 -0
- package/dist/views/payment-page/payment-page.component.js +19 -9
- package/dist/views/payment-page/payment-page.styles.js +37 -32
- package/dist/views/payment-page/payment-page.utils.d.ts +7 -0
- package/dist/views/payment-page/payment-page.utils.js +29 -14
- package/dist/views/payment-page/payment-page.validators.js +9 -3
- package/dist/views/payment-page/services/payment-api.service.d.ts +1 -1
- package/dist/views/search-page/search-page.component.d.ts +1 -0
- package/dist/views/search-page/search-page.component.js +12 -6
- package/dist/views/search-page/search-page.styles.js +24 -2
- package/dist/views/suggestion-widget/suggestion-widget.styles.js +1 -1
- package/package.json +63 -76
- package/dist/custom-elements.json +0 -37397
- package/dist/sdk/meta.d.ts +0 -7
- package/dist/sdk/meta.js +0 -9
- package/dist/styles/tokens.css +0 -359
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,147 @@
|
|
|
1
1
|
# @coras-io/embed
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 233f091: Add `navbarBackgroundImage` and `footerBackgroundImage` so a brand can paint a linear or radial gradient over the navbar and footer, with an optional dark counterpart under `dark`; the solid background colours stay the fallback for the mobile menu, borders, contrast checks and email
|
|
8
|
+
- 233f091: Ship the `brand.json` contract: the file is grouped by surface (`navbar.background`), cites a published JSON Schema, and is read by every consumer in that shape or as flat keys. Rename `mainButton*` to `primaryButton*`, `bodyIcon` to `icon` and `buttonHoverLight` / `buttonHoverDark` to `buttonHoverOnLightFill` / `buttonHoverOnDarkFill`, with their CSS variables (`--coras-brand-primary-button*`, `--coras-brand-icon`, `--coras-color-primary-button*`). Logos are fields, shadows are validated by grammar, `publishBrand` fills in derived values, and `toDesignTokens` exports a brand as W3C Design Tokens
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- e8377e1: Show ampersands and angle brackets in translated text instead of raw HTML entities
|
|
13
|
+
- 030f19d: Show the details page error modal when an attraction request fails, instead of crashing while rendering an empty attraction
|
|
14
|
+
- Updated dependencies [233f091]
|
|
15
|
+
- Updated dependencies [233f091]
|
|
16
|
+
- @coras-io/brand-tokens@0.4.0
|
|
17
|
+
|
|
18
|
+
## 0.3.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- a70f740: Add the `link`, `focusRing` and `logoDark` brand fields
|
|
23
|
+
- fa5220c: Add the `ar-SA` locale. Arabic copy, Arabic-Indic numerals and locale-correct dates render, but the layout is not mirrored for right-to-left
|
|
24
|
+
- 378c4a5: Remove `coras-button`'s `background` property. It painted the primary tint over the variant's own fill, which no page asks for now that the details date picker and the help subject dropdown take the card surface like the selectors beside them
|
|
25
|
+
- ee26876: Give `menuBackground` and `fieldBackground` a dark side, so a brand that sets either no longer paints white dropdowns and inputs on a dark page. In dark mode a menu (the calendar, sort, language and currency panels) now matches the card surface around it
|
|
26
|
+
- 144db8e: Derive dark-scheme colours from each brand's own hues, so text buttons, links and alert text stay legible on dark surfaces
|
|
27
|
+
- 37348a7: Give `primaryTint` and `secondaryTint` a dark side, so the fills they paint (selected chips, tags, the basket earn pill, focus states and the payment option chip) stop reading near-white on a dark page. The details date picker and the help subject dropdown now take the card surface like the selectors beside them, and the managed navbar accepts a `logoDark` from a brand that sets no light logo
|
|
28
|
+
- 29ba254: Drop `colorScheme: "system"`. Use `"inherit"` to follow the host page, which is also how the visitor's OS preference reaches the embed: a page declaring `color-scheme: light dark` hands it on. `"system"` ignored the host page and could put a dark embed on a light one.
|
|
29
|
+
- c3fc0a7: Extend Field / Input Fill Colour to the surfaces that still borrowed the card fill: the card fields on the payment page, the ticket and date selectors, the landing selectors, and the time and language selection chips. Setting a card colour no longer repaints the controls a customer types and chooses in
|
|
30
|
+
- 244c509: Flatten and rename the brand schema (`schemaVersion` 1, the only version accepted): every colour is an explicit `brand.json` field named in the design vocabulary (`mainButton`, `pageBackground`, `cardBackground`, `textButton`, one `*Background` per status family), the colour engine moves to the author-only `@coras-io/brand-tokens/authoring` export, and new fields make dividers, input borders, greys, shadows, scrim, disabled states, logo height, and input corners brandable across web and email. Also drops the unused `sanitizeBrandValue` export
|
|
31
|
+
- 331ab7b: Make `footerPaddingBottom` the footer's bottom padding itself rather than extra padding stacked on it, defaulting to the `2rem` the footer already rendered
|
|
32
|
+
- aea19cf: Add `headingFont` and `headingScale`: a second typeface for page, section and card headings (following `font` until set), and one multiplier that resizes every heading together. A `fontFace` can now name its own `family`, so a brand's two typefaces both load
|
|
33
|
+
- b6776b5: Add the `zh-HK` locale. Traditional Chinese copy and Hong Kong date formats render; the locale has no currency mapping yet, so currency detection leaves it on the site default
|
|
34
|
+
- 35ed62d: Fold the `textSecondary` brand field into `textMuted` so labels, placeholders and captions share one colour, merge the `Brand colours` and `Page` field groups into `Key colours`, and drop `focusRing` and `scrim` from the editable control surface (both stay settable in `brand.json`)
|
|
35
|
+
- e85b1b2: Guarantee legible text on branded buttons and links. Add a `secondaryText` brand field and auto-contrast the secondary button label against the secondary colour (fixing a pale secondary stranding a hardcoded white label), flip the CTA and secondary labels to black or white by true WCAG ratio, and nudge ghost/text button and link colours to a legible lightness on their surface while keeping the brand hue. Each auto-correction is opt-out: set the field explicitly to override it.
|
|
36
|
+
- cd010ec: Support a dark-scheme navbar logo: a brand's `logoDark` is now shown by the managed navbar when the embed is in dark mode. Slotted `brand` content keeps its own semantics (it is no longer wrapped in the home-link button, which produced invalid nested interactive content), and no focusable button renders when there is no logo.
|
|
37
|
+
- 1168614: Require Node 22 or later. Node 20 has reached end of life.
|
|
38
|
+
- 06ff09f: Update bundled runtime dependencies to their latest releases, including `@stripe/stripe-js` 9, `@coinbase/cdp-core` 0.0.122, `viem` 2.55, `lit` 3.3 and `dompurify` 3.4.14. A host page that loads its own `@coinbase/cdp-core` must move to 0.0.122 to keep one instance per page
|
|
39
|
+
- 15d4d06: Remove the Croatian kuna (HRK) from the supported currencies, since Croatia adopted the euro; passing `currency: "HRK"` now throws an `invalid_currency` validation error
|
|
40
|
+
- b06bb1c: Add the `SAR` currency, and resolve Arabic visitors to it when currency detection is on
|
|
41
|
+
- 74ecb66: Treat `apiUrl` and `distributorId` as fixed mount identity: `update()` now rejects changing them instead of silently ignoring the change, and clearing an optional config value takes effect
|
|
42
|
+
- 932ddd6: Type-check every page param and config field, so invalid host input raises a typed `CorasValidationError` naming the field instead of a raw `TypeError` from inside the SDK. Dates must be `yyyy-MM-dd`, and `loyaltyPointsEnabled`, `allowedLocales`, `allowedCurrencies` and the param bag are checked for shape
|
|
43
|
+
- 74ecb66: Trim the package to its supported public surface: the internal `createMountWith` and `getPageMeta` helpers, the `./types` and `./contrast` entry points, the `./tokens.css` stylesheet, and the custom-elements manifest are no longer exported. Import the public types from the package root, and the WCAG contrast helpers from `@coras-io/brand-tokens`
|
|
44
|
+
- 74ecb66: Correlate page and params in `mount()` and `update()` so the wrong params for a page are a type error, narrow `CorasPaymentStatus` to the emitted `succeeded`/`failed` outcomes, and pair `page` with its own `params` in `CorasState` and the navigate/state-change details so narrowing on `page` narrows `params` with it
|
|
45
|
+
- 932ddd6: Make the URL helpers total: `buildCorasUrl` now rejects a details state with no id, a details id that collides with a reserved route segment, a duplicate or malformed `reservedSegments` entry, and the non-routable `suggestion-widget`, rather than emitting a URL that parses back as a different page. `suggestion-widget` no longer has a default `/widget` route
|
|
46
|
+
- 052564e: Show seat numbers and a per-ticket price breakdown in the basket, and split the base seat price from the booking fee in the seat-selection summary so it matches the price shown on the map. On small screens the summary is now a collapsible bottom sheet, and the seat map is capped to the summary width so the two line up.
|
|
47
|
+
- 555ec1a: Add brand fields for the surfaces that previously borrowed another colour: `fieldBackground` and `menuBackground` (form fields and dropdown menus no longer follow the card colour), `menuBorder`, `secondaryButton` (the secondary button's own fill, previously painted straight from `secondary`), `mainButtonBorder` and `secondaryButtonBorder`, `searchRadius` so the nav and location search fields can be shaped independently of the general corner radius, and `footerBorder` with `footerPaddingBottom`
|
|
48
|
+
- c04ebaf: Add `navbarLogo` and `footerLogo`, so a brand whose navbar or email footer is dark on an otherwise light page can supply the logo drawn for that surface. Both are optional and fall back to the existing logo, and the email renderer now resolves every logo to an absolute URL rather than only the main one
|
|
49
|
+
- a70f740: Collapse the brand colour ramp to the design's two tones per family - the base and one light surface tint - removing the intermediate 100/200/300/400/700/900 steps. Components now use those two tones plus state-layer tokens (hover/pressed) and the fixed neutral scale, matching the Figma system exactly. The neutral grey scale keeps its full range.
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- de40afc: Sync generated API types with the latest schema: `currency` query parameters are no longer a fixed enum and accept any string, and `fil` joins the translated language codes
|
|
54
|
+
- 1073d07: Sync generated API types with the latest schema: attractions, events, and tours expose `ticket_delivery_method`, transaction `status` is now a typed enum, and ticket delivery types add `pickup` and `email`
|
|
55
|
+
- 9f5a0b0: Fix reservation confirmation failing with "Field may not be null." by omitting attendee fields the customer left blank instead of sending them as null
|
|
56
|
+
- 2c71b27: Make the basket footer corners follow the basket shell instead of a fixed 16px, so the whole basket reshapes together with the brand
|
|
57
|
+
- 16a6abf: Keep the basket item remove button pinned to the trailing edge for every item, including general-admission tickets with no seat information, so it no longer jumps to the left
|
|
58
|
+
- ad435cc: Stop the basket drawer forcing a horizontal scrollbar. It sized itself to the full window width, which counts the page's own vertical scrollbar and ignores any transformed ancestor that a fixed element is really contained by, so it hung past the right edge of the page it sits on
|
|
59
|
+
- ebf7bca: Apply the brand font to buttons, text inputs, search fields and other native controls, which previously kept the browser's own interface font and left a page with mixed typefaces
|
|
60
|
+
- a70f740: Make the checkout follow the brand: Stripe focus rings, field errors, and section headers no longer render fixed blue, red, and navy
|
|
61
|
+
- 746c5a9: Apply the configured border colour to primary and secondary buttons instead of it being overridden to transparent
|
|
62
|
+
- a70f740: Show a branded keyboard-focus ring on buttons (the focus-ring colour was defined but never painted)
|
|
63
|
+
- e76ee2c: Fix timezone off-by-one errors when displaying calendar days. Selected-date labels, attraction card and range dates, the calendar month bounds, and the passport-expiry check now treat date-only values as timezone-agnostic calendar days, so they show the correct day for viewers in any timezone instead of the previous day west of UTC. Event and reservation times still render in the venue timezone.
|
|
64
|
+
- 344c151: Stop the card fill painting outlined buttons and the unselected payment method chips, so the card colour reaches cards only
|
|
65
|
+
- 993c7dd: Keep the details-page image carousel's previous arrow clickable: it no longer renders behind the photo, so you can navigate back from the last image
|
|
66
|
+
- a70f740: Bring the embed to brand parity: dialogs, drawers and the mobile basket follow the brand surface colour, the neutral scale inverts in dark mode, loyalty accents follow the brand secondary instead of a fixed pink, and tokens adopt into a host shadow root
|
|
67
|
+
- a70f740: Make the stock brand use the designer's curated palette tints exactly (alert and tag backgrounds are pixel-identical to the Figma design); a colour is only computed when a distributor overrides it
|
|
68
|
+
- 21c53d8: Keep dropdown and calendar panels on the page background in dark mode, as they already were in light mode, so an inline calendar no longer reads as a lighter block
|
|
69
|
+
- 555ec1a: Fix three defects found in the cross-distributor branding review: the location search drew a bright outline in dark mode (it used a raw grey that inverts), the four category tag backgrounds were near-identical greys in dark mode so tags could not be told apart, and the landing Date / Sort by / Filters selectors plus the Details date and ticket pickers now take the field corner radius, matching the form fields they behave like
|
|
70
|
+
- e76ee2c: The details page now defaults to the venue's first available instance when no date is given in the URL, or when the given date is out of range or unavailable, instead of defaulting to the viewer's local today. The resolved day is computed in the venue timezone.
|
|
71
|
+
- 742c807: Correct the button control label from "Disable Buttons" to "Disabled Buttons"
|
|
72
|
+
- a70f740: Resolve unset brand fields through their default chains in email, restrict dark overrides to colour fields, and fix the dead radius @property registrations
|
|
73
|
+
- 634fad3: Keep the filters drawer inside its container on a narrow screen. It sized its mobile panel to the window rather than the surrounding element, and because that width applied as a minimum it escaped the drawer's own cap, sliding the panel's contents out of view
|
|
74
|
+
- a70f740: Make the landing Date, Sort and Filters trigger buttons less rounded (input-style radius) to match the design, instead of the fully rounded chip radius
|
|
75
|
+
- cd010ec: Keep the keyboard focus ring visible on primary-filled buttons by drawing it off the control with a background-coloured band in the gap, so a primary-coloured ring on a primary button still meets the focus-appearance contrast requirement.
|
|
76
|
+
- 1d78bb0: Stop a brand's `@font-face` rules showing as visible text on the page when the brand is applied through the inline theme (for example a hosted font set via `config.theme`, as the Studio preview does).
|
|
77
|
+
- e1e67fa: Apply the brand heading font to the menu captions (language, currency, sort by), the filters drawer title, and the Billing address and Activity details titles on the payment page. The payment titles were rendering in the browser's default serif rather than any brand font
|
|
78
|
+
- 6aab28a: Apply the brand heading font to section and card titles that previously fell back to the body font (the Payment heading, basket titles, the landing "Things to do in" title, and the event Location/About section labels), and keep the all-caps "Popular on our site" eyebrow on the body font
|
|
79
|
+
- 64c0113: Fix landing-page filters: an update carrying cleared dates is no longer rejected (which silently dropped filter and location changes), and Clear all now unticks the filters drawer immediately
|
|
80
|
+
- 546920c: Derive alert and category-tag backgrounds from the brand surface (web and email alike) so their text stays legible on dark brands, where the previous fixed light tints left light text on a light chip
|
|
81
|
+
- 7e3d891: Show loading skeletons on the landing, search, details, help, and checkout pages so navigation no longer flashes an empty gap between the navbar and footer before content arrives
|
|
82
|
+
- 4bb2a92: Stop over-cropping the destination banner so it fills its frame at full detail
|
|
83
|
+
- 1d78bb0: Make the navbar logo a home link: clicking it navigates to the landing page (via the host's navigation handler), instead of doing nothing.
|
|
84
|
+
- c35fd65: Keep the mobile date picker's close button and Reset/Done actions pinned while the calendar scrolls
|
|
85
|
+
- 28ec36b: Apply the Nav Bar Icon Colour to the currency symbol and the search icons, so they match the basket icon instead of following the nav text colour
|
|
86
|
+
- a70f740: Make hover and pressed states a neutral state layer over the element's own colour instead of a brand tint, so a strong brand hue no longer reads as a selection or error, and flip the overlay in dark mode
|
|
87
|
+
- de40afc: Send Norwegian to the booking API as `no` rather than `nb`, which fixes the payment-page country list rendering every country with an empty name for `nb-NO` visitors
|
|
88
|
+
- a70f740: Derive the tonal ramp in oklab toward the page background so tints keep the brand hue and match between web and email
|
|
89
|
+
- 3966d2a: Use the official Apple Pay and Google Pay acceptance marks for the payment method chips, and give the card option a matching mark, so all three stay legible on dark backgrounds
|
|
90
|
+
- b0e90e5: Keep emphasis markup and quoted expressions out of translatable messages, so a translation cannot drop or unbalance the placeholders around an order reference, email, phone number, token balance, or seat list. Seven messages get new ids and fall back to English until they are translated again
|
|
91
|
+
- 85c4d17: Ship the refreshed translations for every locale. The seat map, empty basket, and verification screens are translated again, leaving four strings on the English fallback until the next round
|
|
92
|
+
- 74ecb66: Reject a bare hostname for `config.assetsUrl` (require an absolute https URL or root-relative path, since it is concatenated into asset hrefs), accept the `logoDark` theme key, and bound the suggestion-widget `limit` to a whole number
|
|
93
|
+
- 932ddd6: Roll back the whole patch when a page render fails, so a chunk or chrome that never loads can no longer leave `app.state` reporting a page that was never rendered
|
|
94
|
+
- 932ddd6: Deliver a failing host callback as a `coras:error` DOM event as well as to `onError`, so hosts listening on the container see it like every other event
|
|
95
|
+
- 74ecb66: Percent-encode the details id in the URL helpers so an id containing `/`, `?`, or `#` round-trips correctly
|
|
96
|
+
- 74ecb66: Fix host callback contracts: `onError` fires once per error, `coras:ready` fires once on first render, a failed render no longer resolves ready as success, and a rejected `update()` can no longer leave page and state inconsistent
|
|
97
|
+
- 74ecb66: Isolate multiple embeds on one page: booking sessions are scoped per distributor and a reservation in one mount no longer refreshes baskets in the others
|
|
98
|
+
- 2c71b27: Make the Search Field Corners brand setting apply to the nav search and location search fields, which hardcoded a pill radius and ignored it. The default is now a pill, so those fields keep their current shape until the setting is changed
|
|
99
|
+
- cd010ec: Detect the embed's dark colour scheme reliably for the seat map (reading the used `color-scheme` instead of parsing a token that never resolved to an RGB triplet) and rebuild the chart when the scheme, currency, locale, or seat limit changes.
|
|
100
|
+
- 052564e: Match the seat map's colour scheme to a dark theme instead of rendering white, and keep the basket footer legible in dark theme. Reopening the seat map after reserving no longer restores seats that are no longer available. The ticket-quantity selector now shares the date selector's corner radius. The basket popover no longer closes when a control inside it removes itself on click.
|
|
101
|
+
- 2317a69: Ship the translations that were stranded by a broken localization build. Around 77 strings per locale had been translated but were still rendering in English, and every Irish English string was rendering as an empty string
|
|
102
|
+
- 8792015: Fade the star rating colour for the unearned part of a star instead of using a flat grey, so half stars read as the same mark on both light and dark surfaces
|
|
103
|
+
- 03422c4: Take the field radius for the Stripe card element, so the expiry and CVC fields follow the same radius control as the other payment fields instead of the general radius
|
|
104
|
+
- 67e506f: Keep the card fields aligned while a scroll is still in progress. The Stripe fields are positioned over the payment form from outside the shadow root, and the scheduler that tracked them restarted its timer on every scroll event, so inside a scrolling container they held a stale position for the whole gesture and only caught up once it stopped
|
|
105
|
+
- ce66839: Apply the brand text colour, corner radius, and light/dark theme to the Stripe card fields (their token values are now resolved to values Stripe accepts, instead of being silently dropped)
|
|
106
|
+
- 43ffce1: Make the structural brand colours reach the surfaces they name. Form inputs and the Stripe card fields now take `fieldBackground` instead of the card fill, the basket and its dropdown pointer take `menuBackground` and `menuBorder`, the filters drawer takes the page background, card borders follow `cardBorder`, and a half rating star paints its colour instead of rendering transparent
|
|
107
|
+
- a70f740: Apply a custom colour's derived surface tint when a brand is set through the SDK `theme` option (and the Studio preview), not only through generated CSS - previously the base colour updated but its tint stayed the Coras palette
|
|
108
|
+
- a70f740: Show the image loading skeleton, which previously rendered fully transparent
|
|
109
|
+
- Updated dependencies [a70f740]
|
|
110
|
+
- Updated dependencies [82367ad]
|
|
111
|
+
- Updated dependencies [932ddd6]
|
|
112
|
+
- Updated dependencies [555ec1a]
|
|
113
|
+
- Updated dependencies [a70f740]
|
|
114
|
+
- Updated dependencies [a70f740]
|
|
115
|
+
- Updated dependencies [4518ed5]
|
|
116
|
+
- Updated dependencies [ee26876]
|
|
117
|
+
- Updated dependencies [21c53d8]
|
|
118
|
+
- Updated dependencies [144db8e]
|
|
119
|
+
- Updated dependencies [37348a7]
|
|
120
|
+
- Updated dependencies [742c807]
|
|
121
|
+
- Updated dependencies [0cbce67]
|
|
122
|
+
- Updated dependencies [a70f740]
|
|
123
|
+
- Updated dependencies [c3fc0a7]
|
|
124
|
+
- Updated dependencies [244c509]
|
|
125
|
+
- Updated dependencies [1d78bb0]
|
|
126
|
+
- Updated dependencies [331ab7b]
|
|
127
|
+
- Updated dependencies [aea19cf]
|
|
128
|
+
- Updated dependencies [35ed62d]
|
|
129
|
+
- Updated dependencies [e85b1b2]
|
|
130
|
+
- Updated dependencies [546920c]
|
|
131
|
+
- Updated dependencies [71e053e]
|
|
132
|
+
- Updated dependencies [a70f740]
|
|
133
|
+
- Updated dependencies [a70f740]
|
|
134
|
+
- Updated dependencies [a70f740]
|
|
135
|
+
- Updated dependencies [1168614]
|
|
136
|
+
- Updated dependencies [2c71b27]
|
|
137
|
+
- Updated dependencies [555ec1a]
|
|
138
|
+
- Updated dependencies [c04ebaf]
|
|
139
|
+
- Updated dependencies [a70f740]
|
|
140
|
+
- Updated dependencies [a70f740]
|
|
141
|
+
- Updated dependencies [a70f740]
|
|
142
|
+
- Updated dependencies [cd010ec]
|
|
143
|
+
- @coras-io/brand-tokens@0.3.0
|
|
144
|
+
|
|
3
145
|
## 0.2.0
|
|
4
146
|
|
|
5
147
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ import { mount } from "@coras-io/embed";
|
|
|
29
29
|
const app = mount({
|
|
30
30
|
container,
|
|
31
31
|
page: "landing",
|
|
32
|
-
config: { apiUrl, distributorId, locale, currency },
|
|
32
|
+
config: { apiUrl, distributorId, assetsUrl, locale, currency },
|
|
33
33
|
onNavigate: (intent) => router.go(intent),
|
|
34
34
|
onStateChange: (state) => router.replace(state),
|
|
35
35
|
});
|
|
@@ -43,9 +43,10 @@ For the full guide and event reference, see the Coras docs at https://docs.coras
|
|
|
43
43
|
|
|
44
44
|
## Other entry points
|
|
45
45
|
|
|
46
|
-
| Entry point
|
|
47
|
-
|
|
|
48
|
-
| `@coras-io/embed/url`
|
|
49
|
-
| `@coras-io/embed/
|
|
50
|
-
| `@coras-io/embed/
|
|
51
|
-
|
|
46
|
+
| Entry point | Purpose |
|
|
47
|
+
| ------------------------- | ------------------------------------------------------------------------------- |
|
|
48
|
+
| `@coras-io/embed/url` | URL and state helpers: `parseCorasUrl`, `buildCorasUrl`, `createCorasUrlState`. |
|
|
49
|
+
| `@coras-io/embed/errors` | Typed error classes for host integration code. |
|
|
50
|
+
| `@coras-io/embed/helpers` | Locale and currency helpers: `getLocale`, `getCurrency`. |
|
|
51
|
+
|
|
52
|
+
Public TypeScript types come from the package root alongside `mount()`.
|
|
@@ -12,7 +12,7 @@ export default css `
|
|
|
12
12
|
|
|
13
13
|
--accordion-label-color: var(--coras-color-text);
|
|
14
14
|
|
|
15
|
-
--accordion-arrow-color: var(--coras-color-primary
|
|
15
|
+
--accordion-arrow-color: var(--coras-color-primary);
|
|
16
16
|
|
|
17
17
|
--accordion-divider-color: var(--coras-color-neutral-300);
|
|
18
18
|
|
|
@@ -13,8 +13,8 @@ export default css `
|
|
|
13
13
|
border-radius: 0;
|
|
14
14
|
padding: 20px 30px;
|
|
15
15
|
box-shadow: var(--coras-shadow-strong);
|
|
16
|
-
border-left: 2px solid var(--coras-color-error
|
|
17
|
-
background-color: var(--coras-color-error-
|
|
16
|
+
border-left: 2px solid var(--coras-color-error);
|
|
17
|
+
background-color: var(--coras-color-error-background);
|
|
18
18
|
display: flex;
|
|
19
19
|
align-items: flex-start;
|
|
20
20
|
gap: 20px;
|
|
@@ -28,7 +28,7 @@ export default css `
|
|
|
28
28
|
coras-icon {
|
|
29
29
|
width: 26px;
|
|
30
30
|
height: 26px;
|
|
31
|
-
fill: var(--coras-color-error
|
|
31
|
+
fill: var(--coras-color-error);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
|
|
@@ -43,7 +43,7 @@ export default css `
|
|
|
43
43
|
margin-bottom: 10px;
|
|
44
44
|
|
|
45
45
|
.title {
|
|
46
|
-
font-family:
|
|
46
|
+
font-family: var(--coras-font-family-sans);
|
|
47
47
|
font-weight: 600;
|
|
48
48
|
font-size: 20px;
|
|
49
49
|
line-height: 28px;
|
|
@@ -67,7 +67,7 @@ export default css `
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
.message {
|
|
70
|
-
font-family:
|
|
70
|
+
font-family: var(--coras-font-family-sans);
|
|
71
71
|
font-weight: 400;
|
|
72
72
|
font-size: 16px;
|
|
73
73
|
line-height: 26px;
|
|
@@ -94,12 +94,12 @@ export default css `
|
|
|
94
94
|
|
|
95
95
|
:host([variant="success"]) {
|
|
96
96
|
.container {
|
|
97
|
-
border-left-color: var(--coras-color-success
|
|
98
|
-
background-color: var(--coras-color-success-
|
|
97
|
+
border-left-color: var(--coras-color-success);
|
|
98
|
+
background-color: var(--coras-color-success-background);
|
|
99
99
|
|
|
100
100
|
.icon {
|
|
101
101
|
coras-icon {
|
|
102
|
-
fill: var(--coras-color-success
|
|
102
|
+
fill: var(--coras-color-success);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
}
|
|
@@ -107,12 +107,12 @@ export default css `
|
|
|
107
107
|
|
|
108
108
|
:host([variant="warning"]) {
|
|
109
109
|
.container {
|
|
110
|
-
border-left-color: var(--coras-color-warning
|
|
111
|
-
background-color: var(--coras-color-warning-
|
|
110
|
+
border-left-color: var(--coras-color-warning);
|
|
111
|
+
background-color: var(--coras-color-warning-background);
|
|
112
112
|
|
|
113
113
|
.icon {
|
|
114
114
|
coras-icon {
|
|
115
|
-
fill: var(--coras-color-warning
|
|
115
|
+
fill: var(--coras-color-warning);
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -120,12 +120,12 @@ export default css `
|
|
|
120
120
|
|
|
121
121
|
:host([variant="error"]) {
|
|
122
122
|
.container {
|
|
123
|
-
border-left-color: var(--coras-color-error
|
|
124
|
-
background-color: var(--coras-color-error-
|
|
123
|
+
border-left-color: var(--coras-color-error);
|
|
124
|
+
background-color: var(--coras-color-error-background);
|
|
125
125
|
|
|
126
126
|
.icon {
|
|
127
127
|
coras-icon {
|
|
128
|
-
fill: var(--coras-color-error
|
|
128
|
+
fill: var(--coras-color-error);
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -4,9 +4,13 @@ export default css `
|
|
|
4
4
|
${component}
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
-
--attraction-card-background: var(--coras-color-
|
|
8
|
-
--attraction-card-border-color: var(--coras-color-
|
|
9
|
-
--attraction-card-border-hover-color:
|
|
7
|
+
--attraction-card-background: var(--coras-color-card);
|
|
8
|
+
--attraction-card-border-color: var(--coras-color-card-border);
|
|
9
|
+
--attraction-card-border-hover-color: color-mix(
|
|
10
|
+
in srgb,
|
|
11
|
+
var(--coras-color-card-border),
|
|
12
|
+
var(--coras-state-overlay) var(--coras-state-active)
|
|
13
|
+
);
|
|
10
14
|
--attraction-card-border-radius: var(--coras-radius-sm);
|
|
11
15
|
--attraction-card-shadow-box: var(--coras-shadow-lg);
|
|
12
16
|
--attraction-card-hover-shadow-box: var(--coras-shadow-strong);
|
|
@@ -6,7 +6,7 @@ export default css `
|
|
|
6
6
|
:host {
|
|
7
7
|
--attraction-discovery-text-column-width: 22.75rem;
|
|
8
8
|
|
|
9
|
-
--attraction-discovery-background: var(--coras-color-secondary
|
|
9
|
+
--attraction-discovery-background: var(--coras-color-secondary);
|
|
10
10
|
--attraction-discovery-color: var(--coras-palette-white);
|
|
11
11
|
--attraction-discovery-image-border-radius: var(--coras-radius-sm);
|
|
12
12
|
--attraction-discovery-image-box-shadow: var(--coras-shadow-strong);
|
|
@@ -4,7 +4,7 @@ export default css `
|
|
|
4
4
|
${component}
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
-
--attraction-header-attraction-name-font-size: var(--coras-font-size-
|
|
7
|
+
--attraction-header-attraction-name-font-size: var(--coras-font-size-title);
|
|
8
8
|
--attraction-header-attraction-name-font-weight: var(
|
|
9
9
|
--coras-font-weight-semibold
|
|
10
10
|
);
|
|
@@ -6,7 +6,7 @@ export default css `
|
|
|
6
6
|
:host {
|
|
7
7
|
--padding-inline: 1.5rem;
|
|
8
8
|
|
|
9
|
-
--attraction-option-border-color: var(--coras-color-
|
|
9
|
+
--attraction-option-border-color: var(--coras-color-card-border);
|
|
10
10
|
--attraction-option-border-radius: var(--coras-radius-md);
|
|
11
11
|
--attraction-option-color-box-shadow: var(--coras-shadow-sm);
|
|
12
12
|
|
|
@@ -20,7 +20,7 @@ export default css `
|
|
|
20
20
|
--attraction-option-header-line-height: 1.625rem;
|
|
21
21
|
--attraction-option-header-color: var(--coras-color-text);
|
|
22
22
|
|
|
23
|
-
--attraction-option-divider-border-color: var(--coras-color-
|
|
23
|
+
--attraction-option-divider-border-color: var(--coras-color-divider);
|
|
24
24
|
|
|
25
25
|
--attraction-option-details-font-size: var(--coras-font-size-sm);
|
|
26
26
|
--attraction-option-details-font-weight: var(--coras-font-weight-normal);
|
|
@@ -40,7 +40,7 @@ export default css `
|
|
|
40
40
|
--attraction-option-one-last-option-line-height: var(--coras-font-size-sm);
|
|
41
41
|
--attraction-option-one-last-option-color: var(--coras-color-text);
|
|
42
42
|
--attraction-option-one-last-option-background-color: var(
|
|
43
|
-
--coras-color-error-
|
|
43
|
+
--coras-color-error-background
|
|
44
44
|
);
|
|
45
45
|
|
|
46
46
|
--attraction-option-options-border-color: var(--coras-color-neutral-200);
|
|
@@ -100,7 +100,7 @@ export default css `
|
|
|
100
100
|
padding-inline: var(--padding-inline);
|
|
101
101
|
padding-top: 1rem;
|
|
102
102
|
padding-bottom: 1rem;
|
|
103
|
-
background-color: var(--coras-color-
|
|
103
|
+
background-color: var(--coras-color-card-muted);
|
|
104
104
|
|
|
105
105
|
.details {
|
|
106
106
|
font-size: var(--attraction-option-details-font-size);
|
|
@@ -4,34 +4,36 @@ export default css `
|
|
|
4
4
|
${component}
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
-
--basket-items-divider-color: var(--coras-color-
|
|
8
|
-
--basket-items-actions-background-color:
|
|
9
|
-
|
|
7
|
+
--basket-items-divider-color: var(--coras-color-divider);
|
|
8
|
+
--basket-items-actions-background-color: color-mix(
|
|
9
|
+
in oklab,
|
|
10
|
+
var(--coras-color-menu) 92%,
|
|
11
|
+
var(--coras-color-text) 8%
|
|
12
|
+
);
|
|
13
|
+
--basket-items-background-color: var(--coras-color-menu);
|
|
14
|
+
--basket-items-border-color: var(--coras-color-menu-border);
|
|
10
15
|
--basket-items-shadow: var(--coras-shadow-md);
|
|
11
16
|
--basket-items-border-radius: var(--coras-radius-sm);
|
|
12
17
|
|
|
13
|
-
/* Accent color required by design (var(--coras-color-text)), expose as overrideable var */
|
|
14
18
|
--basket-accent-color: var(
|
|
15
19
|
--coras-basket-accent-color,
|
|
16
20
|
var(--coras-color-text)
|
|
17
21
|
);
|
|
18
22
|
|
|
19
|
-
|
|
20
|
-
--basket-total-
|
|
21
|
-
--basket-total-
|
|
22
|
-
--basket-total-
|
|
23
|
-
--basket-total-
|
|
24
|
-
--basket-total-font-weight: var(--coras-font-weight-semibold); /* 600 */
|
|
23
|
+
--basket-total-label-color: var(--coras-color-text);
|
|
24
|
+
--basket-total-value-color: var(--coras-color-text);
|
|
25
|
+
--basket-total-label-font-size: var(--coras-font-size-lg);
|
|
26
|
+
--basket-total-value-font-size: var(--coras-font-size-xl);
|
|
27
|
+
--basket-total-font-weight: var(--coras-font-weight-semibold);
|
|
25
28
|
--basket-total-value-column-min-width: 7.5rem;
|
|
26
29
|
--basket-total-value-column-gap: 1rem;
|
|
27
30
|
--basket-earn-pill-offset: 0.75rem;
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
--basket-earn-pill-bg: var(--coras-color-primary-200);
|
|
32
|
+
--basket-earn-pill-bg: var(--coras-color-primary-tint);
|
|
31
33
|
--basket-earn-pill-text: var(--basket-accent-color);
|
|
32
|
-
--basket-earn-pill-radius: var(--coras-radius-lg);
|
|
33
|
-
--basket-earn-pill-font-size: var(--coras-font-size-xs);
|
|
34
|
-
--basket-earn-pill-font-weight: var(--coras-font-weight-bold);
|
|
34
|
+
--basket-earn-pill-radius: var(--coras-radius-lg);
|
|
35
|
+
--basket-earn-pill-font-size: var(--coras-font-size-xs);
|
|
36
|
+
--basket-earn-pill-font-weight: var(--coras-font-weight-bold);
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
:host([expanded]) .basket {
|
|
@@ -55,11 +57,11 @@ export default css `
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
.basket {
|
|
58
|
-
width: 25.875rem;
|
|
60
|
+
width: 25.875rem;
|
|
59
61
|
background-color: var(--basket-items-background-color);
|
|
60
|
-
border-radius:
|
|
62
|
+
border-radius: var(--basket-items-border-radius);
|
|
61
63
|
box-shadow: 0px 4px 4px 0px color-mix(in srgb, black, transparent 90%);
|
|
62
|
-
border: 1px solid var(--basket-items-
|
|
64
|
+
border: 1px solid var(--basket-items-border-color);
|
|
63
65
|
box-sizing: border-box;
|
|
64
66
|
display: flex;
|
|
65
67
|
flex-direction: column;
|
|
@@ -71,6 +73,7 @@ export default css `
|
|
|
71
73
|
border-bottom: 0.0625rem solid var(--basket-items-divider-color);
|
|
72
74
|
|
|
73
75
|
.basket-title {
|
|
76
|
+
font-family: var(--coras-font-family-heading);
|
|
74
77
|
font-size: var(--coras-font-size-xl);
|
|
75
78
|
font-weight: 600;
|
|
76
79
|
line-height: 1.75rem;
|
|
@@ -87,15 +90,13 @@ export default css `
|
|
|
87
90
|
.basket-content {
|
|
88
91
|
max-height: 29.25rem;
|
|
89
92
|
overflow-y: auto;
|
|
90
|
-
/* The header's border-bottom is the single divider above the content; a
|
|
91
|
-
border-top here would double it. The footer carries the lower divider. */
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
.footer {
|
|
95
96
|
border-top: 0.0625rem solid var(--basket-items-divider-color);
|
|
96
97
|
background-color: var(--basket-items-actions-background-color);
|
|
97
|
-
border-bottom-right-radius:
|
|
98
|
-
border-bottom-left-radius:
|
|
98
|
+
border-bottom-right-radius: var(--basket-items-border-radius);
|
|
99
|
+
border-bottom-left-radius: var(--basket-items-border-radius);
|
|
99
100
|
|
|
100
101
|
.price {
|
|
101
102
|
display: flex;
|
|
@@ -104,8 +105,8 @@ export default css `
|
|
|
104
105
|
padding: 1.25rem;
|
|
105
106
|
font-size: 1.2rem;
|
|
106
107
|
font-weight: 600;
|
|
107
|
-
border-bottom-right-radius:
|
|
108
|
-
border-bottom-left-radius:
|
|
108
|
+
border-bottom-right-radius: var(--basket-items-border-radius);
|
|
109
|
+
border-bottom-left-radius: var(--basket-items-border-radius);
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
.totals .total-row {
|
|
@@ -183,8 +184,8 @@ export default css `
|
|
|
183
184
|
.actions {
|
|
184
185
|
padding: 0 1.25rem 1.25rem;
|
|
185
186
|
background-color: var(--basket-items-actions-background-color);
|
|
186
|
-
border-bottom-right-radius:
|
|
187
|
-
border-bottom-left-radius:
|
|
187
|
+
border-bottom-right-radius: var(--basket-items-border-radius);
|
|
188
|
+
border-bottom-left-radius: var(--basket-items-border-radius);
|
|
188
189
|
|
|
189
190
|
::slotted(coras-button) {
|
|
190
191
|
width: 100%;
|
|
@@ -21,6 +21,7 @@ export default css `
|
|
|
21
21
|
padding: 0;
|
|
22
22
|
|
|
23
23
|
&:first-of-type {
|
|
24
|
+
font-family: var(--coras-font-family-heading);
|
|
24
25
|
font-weight: var(--basket-empty-caption-font-weight);
|
|
25
26
|
font-size: var(--basket-empty-caption-font-size);
|
|
26
27
|
line-height: var(--basket-empty-caption-line-height);
|
|
@@ -4,9 +4,9 @@ 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, nothing } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
|
-
import { localized } from "@lit/localize";
|
|
9
|
+
import { localized, msg } from "@lit/localize";
|
|
10
10
|
import styles from "./basket-item.styles.js";
|
|
11
11
|
import "../icon/icon.js";
|
|
12
12
|
import "../image/image.js";
|
|
@@ -40,10 +40,13 @@ let CorasBasketItem = class CorasBasketItem extends LitElement {
|
|
|
40
40
|
`;
|
|
41
41
|
}
|
|
42
42
|
renderSeatsInfo() {
|
|
43
|
+
if (!this.section && !this.seats) {
|
|
44
|
+
return nothing;
|
|
45
|
+
}
|
|
43
46
|
return html `
|
|
44
47
|
<div class="seats-info">
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
${this.section ? html `<span>${this.section}</span>` : nothing}
|
|
49
|
+
${this.seats ? html `<span>${this.seats}</span>` : nothing}
|
|
47
50
|
</div>
|
|
48
51
|
`;
|
|
49
52
|
}
|
|
@@ -64,6 +67,9 @@ let CorasBasketItem = class CorasBasketItem extends LitElement {
|
|
|
64
67
|
return html `
|
|
65
68
|
<div class="price-info">
|
|
66
69
|
<span class="total-price">${this.totalPrice}</span>
|
|
70
|
+
${this.price
|
|
71
|
+
? html `<span class="unit-price">${this.price} ${msg("ea")}</span>`
|
|
72
|
+
: nothing}
|
|
67
73
|
</div>
|
|
68
74
|
`;
|
|
69
75
|
}
|
|
@@ -10,8 +10,8 @@ export default css `
|
|
|
10
10
|
--basket-item-title-font-weight: var(--coras-font-weight-medium);
|
|
11
11
|
--basket-item-info-font-size: var(--coras-font-size-sm);
|
|
12
12
|
--basket-item-info-font-weight: var(--coras-font-weight-normal);
|
|
13
|
-
--basket-item-info-color: var(--coras-color-text-
|
|
14
|
-
--basket-item-border-color: var(--coras-color-
|
|
13
|
+
--basket-item-info-color: var(--coras-color-text-muted);
|
|
14
|
+
--basket-item-border-color: var(--coras-color-divider);
|
|
15
15
|
--basket-item-price-font-size: var(--coras-font-size-base);
|
|
16
16
|
--basket-item-price-font-weight: var(--coras-font-weight-semibold);
|
|
17
17
|
--basket-item-price-color: var(--coras-color-text);
|
|
@@ -98,6 +98,12 @@ export default css `
|
|
|
98
98
|
font-weight: var(--basket-item-price-font-weight);
|
|
99
99
|
color: var(--basket-item-price-color);
|
|
100
100
|
}
|
|
101
|
+
|
|
102
|
+
.unit-price {
|
|
103
|
+
font-size: var(--basket-item-info-font-size);
|
|
104
|
+
font-weight: var(--basket-item-info-font-weight);
|
|
105
|
+
color: var(--basket-item-info-color);
|
|
106
|
+
}
|
|
101
107
|
}
|
|
102
108
|
|
|
103
109
|
.ticket-types {
|
|
@@ -144,7 +150,6 @@ export default css `
|
|
|
144
150
|
|
|
145
151
|
.bottom {
|
|
146
152
|
display: flex;
|
|
147
|
-
justify-content: space-between;
|
|
148
153
|
align-items: flex-end;
|
|
149
154
|
width: 100%;
|
|
150
155
|
font-size: var(--basket-item-info-font-size);
|
|
@@ -163,6 +168,7 @@ export default css `
|
|
|
163
168
|
display: flex;
|
|
164
169
|
justify-content: flex-end;
|
|
165
170
|
align-self: flex-end;
|
|
171
|
+
margin-inline-start: auto;
|
|
166
172
|
}
|
|
167
173
|
}
|
|
168
174
|
}
|
|
@@ -11,9 +11,7 @@ export default css `
|
|
|
11
11
|
--basket-item-ticket-total-price-font-weight: var(
|
|
12
12
|
--coras-font-weight-semibold
|
|
13
13
|
);
|
|
14
|
-
--basket-item-ticket-price-per-ticket-color: var(
|
|
15
|
-
--coras-color-text-secondary
|
|
16
|
-
);
|
|
14
|
+
--basket-item-ticket-price-per-ticket-color: var(--coras-color-text-muted);
|
|
17
15
|
--basket-item-ticket-price-per-ticket-font-size: var(--coras-font-size-xs);
|
|
18
16
|
--basket-item-ticket-price-per-ticket-font-weight: var(
|
|
19
17
|
--coras-font-weight-normal
|
|
@@ -4,13 +4,13 @@ export default css `
|
|
|
4
4
|
${component}
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
|
-
--basket-mobile-navbar-height: 80px;
|
|
7
|
+
--basket-mobile-navbar-height: 80px;
|
|
8
8
|
--basket-mobile-overlay-bg-color: color-mix(
|
|
9
9
|
in srgb,
|
|
10
|
-
|
|
11
|
-
transparent
|
|
10
|
+
var(--coras-color-scrim) 50%,
|
|
11
|
+
transparent
|
|
12
12
|
);
|
|
13
|
-
--basket-mobile-bg-color: var(--coras-
|
|
13
|
+
--basket-mobile-bg-color: var(--coras-color-menu);
|
|
14
14
|
--basket-mobile-border-radius: var(--coras-radius-lg) var(--coras-radius-lg)
|
|
15
15
|
0 0;
|
|
16
16
|
--basket-mobile-box-shadow: var(--coras-shadow-lg);
|
|
@@ -60,7 +60,7 @@ export default css `
|
|
|
60
60
|
|
|
61
61
|
@media (max-width: 768px) {
|
|
62
62
|
:host {
|
|
63
|
-
--basket-mobile-navbar-height: 60px;
|
|
63
|
+
--basket-mobile-navbar-height: 60px;
|
|
64
64
|
--basket-mobile-border-radius: 0;
|
|
65
65
|
}
|
|
66
66
|
|