@@ -790,7 +782,7 @@ export const renderOptions: RenderOptions = {
)
}
- if (className === AvailableParagraphFormatEnum["script-2"]) {
+ if (className === AvailableParagraphFormatEnum['script-2']) {
return (
@@ -800,7 +792,7 @@ export const renderOptions: RenderOptions = {
)
}
- if (className === AvailableParagraphFormatEnum["subtitle-1"]) {
+ if (className === AvailableParagraphFormatEnum['subtitle-1']) {
return (
@@ -809,7 +801,7 @@ export const renderOptions: RenderOptions = {
)
}
- if (className === AvailableParagraphFormatEnum["subtitle-2"]) {
+ if (className === AvailableParagraphFormatEnum['subtitle-2']) {
return (
diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts
new file mode 100644
index 000000000..306b5661e
--- /dev/null
+++ b/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts
@@ -0,0 +1,55 @@
+import type { Lang } from '@scandic-hotels/common/constants/language'
+
+import type { EmbedTypesEnum, RTEItemType, RTEItemTypeEnum } from './enums'
+
+export interface Attributes {
+ [key: string]: unknown
+ 'class-name'?: string
+ type: RTEItemType
+ style?: { [key: string]: unknown } | undefined
+}
+
+export interface RTEAssetAttrs extends Attributes {
+ alt: string
+ 'asset-alt': string
+ 'asset-link': string
+ 'asset-name': string
+ 'asset-type': 'image/png' | 'image/jpg' | 'image/jpeg'
+ 'asset-uid': string
+ 'display-type': EmbedTypesEnum.display
+ 'content-type-uid': 'sys_assets'
+ inline: false
+ type: RTEItemTypeEnum.asset
+}
+
+export interface RTEAnchorAttrs extends Attributes {
+ target: string
+ url: string
+}
+
+export interface RTELinkAttrs extends Attributes {
+ 'display-type': EmbedTypesEnum.link
+ 'class-name': string
+ 'content-type-uid': string
+ 'entry-uid': string
+ locale: Lang
+ href: string
+ target: HTMLAnchorElement['target']
+ type: RTEItemTypeEnum.entry
+}
+
+export interface RTEImageVaultAttrs extends Attributes {
+ height: string
+ // style: string[]
+ width: string
+ id: number
+ title: string
+ url: string
+ dimensions: {
+ width: number
+ height: number
+ aspectRatio: number
+ }
+ meta: { alt: string | undefined | null; caption: string | undefined | null }
+ focalPoint: { x: number; y: number }
+}
diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts
new file mode 100644
index 000000000..18df410aa
--- /dev/null
+++ b/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts
@@ -0,0 +1,84 @@
+export enum EmbedTypesEnum {
+ block = 'block',
+ display = 'display',
+ download = 'download',
+ inline = 'inline',
+ link = 'link',
+}
+
+export type EmbedTypes = keyof typeof EmbedTypesEnum
+
+/** Copied from https://github.com/contentstack/contentstack-utils-javascript/blob/master/src/nodes/node-type.ts */
+export enum RTETypeEnum {
+ a = 'a',
+ blockquote = 'blockquote',
+ code = 'code',
+ doc = 'doc',
+ embed = 'embed',
+ h1 = 'h1',
+ h2 = 'h2',
+ h3 = 'h3',
+ h4 = 'h4',
+ h5 = 'h5',
+ h6 = 'h6',
+ hr = 'hr',
+ img = 'img',
+ li = 'li',
+ ol = 'ol',
+ p = 'p',
+ reference = 'reference',
+ span = 'span',
+ /**
+ * Included for compatibility when copying RTE from other sources e.g. epi
+ */
+ div = 'div',
+ table = 'table',
+ tbody = 'tbody',
+ td = 'td',
+ text = 'text',
+ tfoot = 'tfoot',
+ th = 'th',
+ thead = 'thead',
+ tr = 'tr',
+ ul = 'ul',
+ ImageVault = 'ImageVault',
+ fragment = 'fragment',
+}
+
+export type RTEType = keyof typeof RTETypeEnum
+
+export enum RTEItemTypeEnum {
+ asset = 'asset',
+ entry = 'entry',
+}
+
+export type RTEItemType = keyof typeof RTEItemTypeEnum
+
+export enum AvailableParagraphFormatEnum {
+ 'script-1' = 'script-1',
+ 'script-2' = 'script-2',
+ 'footnote' = 'footnote',
+ 'caption' = 'caption',
+ 'subtitle-1' = 'subtitle-1',
+ 'subtitle-2' = 'subtitle-2',
+}
+
+export enum AvailableULFormatEnum {
+ 'heart' = 'heart',
+ 'check' = 'check',
+}
+
+export type ContentBlockType =
+ | 'AccountPage'
+ | 'CampaignOverviewPage'
+ | 'CampaignPage'
+ | 'CollectionPage'
+ | 'ContentPage'
+ | 'DestinationCityPage'
+ | 'DestinationCountryPage'
+ | 'DestinationOverviewPage'
+ | 'HotelPage'
+ | 'ImageContainer'
+ | 'LoyaltyPage'
+ | 'StartPage'
+ | 'SysAsset'
diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts
new file mode 100644
index 000000000..d79df13dd
--- /dev/null
+++ b/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts
@@ -0,0 +1,98 @@
+import type { JSX } from 'react'
+
+import type { EmbedByUid } from '../../JsonToHtml'
+import type {
+ Attributes,
+ RTEAnchorAttrs,
+ RTEAssetAttrs,
+ RTEImageVaultAttrs,
+ RTELinkAttrs,
+} from './attrs'
+import type { RTETypeEnum } from './enums'
+import type { RenderOptions } from './option'
+
+export interface RTEDefaultNode {
+ attrs: Attributes
+ children: RTENode[]
+ type: RTETypeEnum
+ uid: string
+}
+
+export interface RTELinkNode {
+ attrs: Attributes
+ children: RTENode[]
+ type: RTETypeEnum
+ uid: string
+}
+
+export interface RTEReferenceAssetNode extends RTEDefaultNode {
+ attrs: RTEAssetAttrs
+}
+
+export interface RTEAnchorNode extends RTEDefaultNode {
+ attrs: RTEAnchorAttrs
+ type: RTETypeEnum.a
+}
+
+export interface RTEReferenceLinkNode extends RTEDefaultNode {
+ attrs: RTELinkAttrs
+}
+
+export interface RTEImageVaultNode extends RTEDefaultNode {
+ attrs: RTEImageVaultAttrs
+ type: RTETypeEnum.ImageVault
+}
+
+export enum RTEMarkType {
+ bold = 'bold',
+ break = 'break',
+ classnameOrId = 'classnameOrId',
+ inlineCode = 'inlineCode',
+ italic = 'italic',
+ strikethrough = 'strikethrough',
+ subscript = 'subscript',
+ superscript = 'superscript',
+ underline = 'underline',
+}
+
+type RTETextNodeOptionalKeys = {
+ [key in RTEMarkType]?: boolean
+}
+
+export type RTETextNode = RTETextNodeOptionalKeys & {
+ classname?: string
+ id?: string
+ text: string
+}
+
+export type RTERegularNode = RTEDefaultNode | RTEAnchorNode | RTEImageVaultNode
+
+export type RTEImageNode = RTEDefaultNode | RTEImageVaultNode
+
+export type RTEReferenceNode = RTEAnchorNode
+
+export type RTENode = RTERegularNode | RTEReferenceNode | RTETextNode
+
+export type RTERenderMark = (
+ children: React.ReactNode,
+ classname?: string,
+ id?: string
+) => JSX.Element
+
+export interface RTEDocument extends RTEDefaultNode {
+ type: RTETypeEnum.doc
+ _version: number
+}
+
+export type RTERenderOptionComponent = (
+ node: RTERegularNode,
+ embeds: EmbedByUid,
+ next: RTENext,
+ fullRenderOptions: RenderOptions
+) => React.ReactNode
+
+export type RTENext = (
+ nodes: RTENode[],
+ embeds: EmbedByUid,
+ fullRenderOptions: RenderOptions
+) => string
diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts
new file mode 100644
index 000000000..126a5aeec
--- /dev/null
+++ b/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts
@@ -0,0 +1,5 @@
+import type { RTERenderMark, RTERenderOptionComponent } from "./node"
+
+export type RenderOptions = {
+ [type: string]: RTERenderOptionComponent | RTERenderMark
+}
diff --git a/apps/scandic-web/components/JsonToHtml/utils.tsx b/packages/design-system/lib/components/JsonToHtml/utils.tsx
similarity index 81%
rename from apps/scandic-web/components/JsonToHtml/utils.tsx
rename to packages/design-system/lib/components/JsonToHtml/utils.tsx
index a52a9ae3b..f0b56728a 100644
--- a/apps/scandic-web/components/JsonToHtml/utils.tsx
+++ b/packages/design-system/lib/components/JsonToHtml/utils.tsx
@@ -1,30 +1,29 @@
-import React, { cloneElement } from "react"
+import React, { cloneElement } from 'react'
-import { renderOptions } from "./renderOptions"
+import { renderOptions } from './renderOptions'
-import styles from "./jsontohtml.module.css"
+import styles from './jsontohtml.module.css'
-import type { Node } from "@scandic-hotels/trpc/types/edges"
-import type { Embeds } from "@scandic-hotels/trpc/types/embeds"
+import type { Node, Embeds } from './JsonToHtml'
-import type { EmbedByUid } from "@/types/transitionTypes/jsontohtml"
import {
AvailableParagraphFormatEnum,
AvailableULFormatEnum,
RTETypeEnum,
-} from "@/types/transitionTypes/rte/enums"
+} from './types/rte/enums'
import {
RTEMarkType,
type RTENode,
type RTERenderMark,
type RTERenderOptionComponent,
type RTETextNode,
-} from "@/types/transitionTypes/rte/node"
-import type { RenderOptions } from "@/types/transitionTypes/rte/option"
+} from './types/rte/node'
+import type { RenderOptions } from './types/rte/option'
+import { EmbedByUid } from './JsonToHtml'
export function groupEmbedsByUid(embedsArray: Node[]) {
const embedsByUid = embedsArray.reduce((acc, embed) => {
- if (embed.node.system?.uid) {
+ if ('system' in embed.node && embed.node.system?.uid) {
acc[embed.node.system.uid] = embed
}
return acc
@@ -37,6 +36,8 @@ export function nodeChildrenToHtml(
nodes: RTENode[],
embeds: EmbedByUid,
fullRenderOptions: RenderOptions
+ // TODO: Change this to an actual return
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
): any {
return nodes
.map((node, i) => {
@@ -120,7 +121,7 @@ export function nodeToHtml(
embeds: EmbedByUid,
fullRenderOptions: RenderOptions
) {
- if ("type" in node === false) {
+ if ('type' in node === false) {
return textNodeToHtml(node, fullRenderOptions)
} else {
const renderer = fullRenderOptions[node.type] as RTERenderOptionComponent
@@ -137,7 +138,7 @@ export function nodeToHtml(
}
function getUniqueId(node: RTENode) {
- if ("uid" in node) {
+ if ('uid' in node) {
return node.uid
}
return node.id
@@ -149,7 +150,10 @@ export function nodesToHtml(
overrideRenderOptions: RenderOptions
) {
const embeds = groupEmbedsByUid(embedsArray)
- const fullRenderOptions = { ...renderOptions, ...overrideRenderOptions }
+ const fullRenderOptions: RenderOptions = {
+ ...renderOptions,
+ ...overrideRenderOptions,
+ }
return nodes.map((node, index) => {
const nodeHtml = nodeToHtml(node, embeds, fullRenderOptions)
@@ -164,12 +168,13 @@ export function nodesToHtml(
export function makeCssModuleCompatibleClassName(
className: string | undefined,
- formatType: "ul"
+ formatType: 'ul'
): string {
- if (!className) return ""
+ if (!className) return ''
- if (formatType === "ul" && hasAvailableULFormat(className)) {
- // @ts-ignore: We want to set css modules classNames even if it does not correspond
+ if (formatType === 'ul' && hasAvailableULFormat(className)) {
+ // TODO: REMOVE
+ // @ats-expect-error: We want to set css modules classNames even if it does not correspond
// to an existing class in the module style sheet. Due to our css modules plugin for
// typescript, we cannot do this without the ts-ignore
return styles[className] || className
diff --git a/packages/design-system/lib/components/Label/Label.stories.tsx b/packages/design-system/lib/components/Label/Label.stories.tsx
index 22607c64b..ddb800e70 100644
--- a/packages/design-system/lib/components/Label/Label.stories.tsx
+++ b/packages/design-system/lib/components/Label/Label.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { Label } from './Label'
diff --git a/packages/design-system/lib/components/Loading/Loading.stories.tsx b/packages/design-system/lib/components/Loading/Loading.stories.tsx
index 3a196b65a..d911605cf 100644
--- a/packages/design-system/lib/components/Loading/Loading.stories.tsx
+++ b/packages/design-system/lib/components/Loading/Loading.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { Loading } from './Loading'
import { config } from './variants'
diff --git a/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx b/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx
index c19124bd4..3572e69ec 100644
--- a/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx
+++ b/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import CampaignRateCard from '.'
const meta: Meta = {
diff --git a/packages/design-system/lib/components/RateCard/Code/Code.stories.tsx b/packages/design-system/lib/components/RateCard/Code/Code.stories.tsx
index 5ce0ecac7..d0b9220df 100644
--- a/packages/design-system/lib/components/RateCard/Code/Code.stories.tsx
+++ b/packages/design-system/lib/components/RateCard/Code/Code.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import CodeRateCard from '.'
const meta: Meta = {
diff --git a/packages/design-system/lib/components/RateCard/NoRateAvailable/NoRateAvailable.stories.tsx b/packages/design-system/lib/components/RateCard/NoRateAvailable/NoRateAvailable.stories.tsx
index f75d9ac1e..6b64728d0 100644
--- a/packages/design-system/lib/components/RateCard/NoRateAvailable/NoRateAvailable.stories.tsx
+++ b/packages/design-system/lib/components/RateCard/NoRateAvailable/NoRateAvailable.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import NoRateAvailableCard from '.'
const meta: Meta = {
diff --git a/packages/design-system/lib/components/RateCard/Points/Points.stories.tsx b/packages/design-system/lib/components/RateCard/Points/Points.stories.tsx
index a34818575..8315abdf8 100644
--- a/packages/design-system/lib/components/RateCard/Points/Points.stories.tsx
+++ b/packages/design-system/lib/components/RateCard/Points/Points.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import PointsRateCard from '.'
diff --git a/packages/design-system/lib/components/RateCard/Regular/Regular.stories.tsx b/packages/design-system/lib/components/RateCard/Regular/Regular.stories.tsx
index 5b5d5cae3..647a07c40 100644
--- a/packages/design-system/lib/components/RateCard/Regular/Regular.stories.tsx
+++ b/packages/design-system/lib/components/RateCard/Regular/Regular.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import RegularRateCard from '.'
const meta: Meta = {
diff --git a/packages/design-system/lib/components/Select/Select.stories.tsx b/packages/design-system/lib/components/Select/Select.stories.tsx
index 928298c44..dc05e7626 100644
--- a/packages/design-system/lib/components/Select/Select.stories.tsx
+++ b/packages/design-system/lib/components/Select/Select.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { Select } from './Select'
diff --git a/packages/design-system/lib/components/Typography/Typography.stories.tsx b/packages/design-system/lib/components/Typography/Typography.stories.tsx
index 7c3f3d68b..165e3b166 100644
--- a/packages/design-system/lib/components/Typography/Typography.stories.tsx
+++ b/packages/design-system/lib/components/Typography/Typography.stories.tsx
@@ -1,4 +1,4 @@
-import type { Meta, StoryObj } from '@storybook/react-vite'
+import type { Meta, StoryObj } from '@storybook/nextjs-vite'
import { Typography } from './Typography.tsx'
diff --git a/packages/design-system/package.json b/packages/design-system/package.json
index 516abe1fe..8b1dd028b 100644
--- a/packages/design-system/package.json
+++ b/packages/design-system/package.json
@@ -10,11 +10,13 @@
"./Body": "./lib/components/Body/index.tsx",
"./Button": "./lib/components/Button/index.tsx",
"./ButtonLink": "./lib/components/ButtonLink/index.tsx",
+ "./CampaignRateCard": "./lib/components/RateCard/Campaign/index.tsx",
"./Caption": "./lib/components/Caption/index.tsx",
"./Card": "./lib/components/Card/index.tsx",
"./ChipButton": "./lib/components/ChipButton/index.tsx",
"./ChipLink": "./lib/components/ChipLink/index.tsx",
"./Chips": "./lib/components/Chips/index.tsx",
+ "./CodeRateCard": "./lib/components/RateCard/Code/index.tsx",
"./DeprecatedSelect": "./lib/components/DeprecatedSelect/index.tsx",
"./Divider": "./lib/components/Divider/index.tsx",
"./Footnote": "./lib/components/Footnote/index.tsx",
@@ -24,48 +26,27 @@
"./Form/ErrorMessage": "./lib/components/Form/ErrorMessage/index.tsx",
"./Form/Phone": "./lib/components/Form/Phone/index.tsx",
"./Form/RadioCard": "./lib/components/Form/RadioCard/index.tsx",
- "./IconChip": "./lib/components/IconChip/index.tsx",
- "./Image": "./lib/components/Image.tsx",
- "./ImageContainer": "./lib/components/ImageContainer/index.tsx",
- "./ImageFallback": "./lib/components/ImageFallback/index.tsx",
- "./ImageGallery": "./lib/components/ImageGallery/index.tsx",
- "./Input": "./lib/components/Input/index.tsx",
- "./Label": "./lib/components/Label/index.tsx",
- "./Lightbox": "./lib/components/Lightbox/index.tsx",
- "./Link": "./lib/components/Link/index.tsx",
- "./Modal": "./lib/components/Modal/index.tsx",
- "./Modal/ModalContentWithActions": "./lib/components/Modal/ModalContentWithActions/index.tsx",
- "./OldDSButton": "./lib/components/OldDSButton/index.tsx",
- "./OpeningHours": "./lib/components/OpeningHours/index.tsx",
- "./Select": "./lib/components/Select/index.tsx",
- "./SkeletonShimmer": "./lib/components/SkeletonShimmer/index.tsx",
- "./SidePeek": "./lib/components/SidePeek/index.tsx",
- "./SidePeek/SidePeekProvider": "./lib/components/SidePeek/SidePeekContext/SidePeekProvider.tsx",
- "./StaticMap": "./lib/components/StaticMap/index.tsx",
- "./Subtitle": "./lib/components/Subtitle/index.tsx",
- "./Switch": "./lib/components/Switch/index.tsx",
- "./Table": "./lib/components/Table/index.tsx",
- "./Title": "./lib/components/Title/index.tsx",
- "./Tooltip": "./lib/components/Tooltip/index.tsx",
- "./Typography": "./lib/components/Typography/index.tsx",
- "./RegularRateCard": "./lib/components/RateCard/Regular/index.tsx",
- "./CampaignRateCard": "./lib/components/RateCard/Campaign/index.tsx",
- "./CodeRateCard": "./lib/components/RateCard/Code/index.tsx",
- "./ParkingInformation": "./lib/components/ParkingInformation/index.tsx",
- "./PointsRateCard": "./lib/components/RateCard/Points/index.tsx",
- "./Preamble": "./lib/components/Preamble/index.tsx",
- "./NoRateAvailableCard": "./lib/components/RateCard/NoRateAvailable/index.tsx",
"./IconButton": "./lib/components/IconButton/index.tsx",
+ "./IconChip": "./lib/components/IconChip/index.tsx",
"./Icons": "./lib/components/Icons/index.tsx",
- "./Icons/IconByCSSelect": "./lib/components/Icons/IconByCSSelect.tsx",
- "./Icons/IconByIconName": "./lib/components/Icons/IconByIconName.tsx",
- "./Icons/IllustrationByIconName": "./lib/components/Icons/IllustrationByIconName.ts",
- "./Icons/iconName": "./lib/components/Icons/iconName.ts",
"./Icons/BathroomCabinetIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/bathroom-cabinet-2.tsx",
+ "./Icons/BedBunkExtraIcon": "./lib/components/Icons/Illustrations/BedBunkExtra.tsx",
+ "./Icons/BedBunkIcon": "./lib/components/Icons/Illustrations/BedBunk.tsx",
+ "./Icons/BedGenericIcon": "./lib/components/Icons/Illustrations/BedGeneric.tsx",
"./Icons/BedHotelIcon": "./lib/components/Icons/Customised/Amenities_Facilities/BedHotel.tsx",
"./Icons/BedIcon": "./lib/components/Icons/Illustrations/Bed.tsx",
+ "./Icons/BedKingIcon": "./lib/components/Icons/Illustrations/BedKing.tsx",
+ "./Icons/BedPullOutExtraIcon": "./lib/components/Icons/Illustrations/BedPullOutExtra.tsx",
+ "./Icons/BedPullOutIcon": "./lib/components/Icons/Illustrations/BedPullOut.tsx",
+ "./Icons/BedQueenIcon": "./lib/components/Icons/Illustrations/BedQueen.tsx",
+ "./Icons/BedSingleIcon": "./lib/components/Icons/Illustrations/BedSingle.tsx",
+ "./Icons/BedSofaExtraIcon": "./lib/components/Icons/Illustrations/BedSofaExtra.tsx",
+ "./Icons/BedSofaIcon": "./lib/components/Icons/Illustrations/BedSofa.tsx",
+ "./Icons/BedTwinIcon": "./lib/components/Icons/Illustrations/BedTwin.tsx",
+ "./Icons/BedWallExtraIcon": "./lib/components/Icons/Illustrations/BedWallExtra.tsx",
"./Icons/BouquetIcon": "./lib/components/Icons/Nucleo/Benefits/bouquet.tsx",
"./Icons/BowlingPinsIcon": "./lib/components/Icons/Nucleo/Experiences/bowling-pins.tsx",
+ "./Icons/BreakfastBuffetIcon": "./lib/components/Icons/Illustrations/BreakfastBuffet.tsx",
"./Icons/BunkBedIcon": "./lib/components/Icons/Customised/Amenities_Facilities/MdiBunkBedOutline.tsx",
"./Icons/ChipsIcon": "./lib/components/Icons/Nucleo/Food/chips-3.tsx",
"./Icons/CoinIcon": "./lib/components/Icons/Illustrations/Coin.tsx",
@@ -77,22 +58,27 @@
"./Icons/CutleryTwoIcon": "./lib/components/Icons/Illustrations/CutleryTwo.tsx",
"./Icons/DiamondAddIcon": "./lib/components/Icons/Customised/Benefits/DiamondAdd.tsx",
"./Icons/DiscountIcon": "./lib/components/Icons/Nucleo/Benefits/discount-2-2.tsx",
- "./Icons/FilledDiscountIcon": "./lib/components/Icons/Nucleo/Benefits/FilledDiscount.tsx",
- "./Icons/FacilityIcon": "./lib/components/Icons/FacilityIcon.tsx",
"./Icons/DoorIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/door-2.tsx",
"./Icons/DowntownCamperIcon": "./lib/components/Icons/Logos/DowntownCamper.tsx",
"./Icons/FacebookIcon": "./lib/components/Icons/Customised/Socials/Facebook.tsx",
+ "./Icons/FacilityIcon": "./lib/components/Icons/FacilityIcon.tsx",
+ "./Icons/FilledDiscountIcon": "./lib/components/Icons/Nucleo/Benefits/FilledDiscount.tsx",
"./Icons/FootStoolIcon": "./lib/components/Icons/Customised/Amenities_Facilities/FootStool.tsx",
"./Icons/GiftOpenIcon": "./lib/components/Icons/Illustrations/GiftOpen.tsx",
"./Icons/GrandHotelOsloIcon": "./lib/components/Icons/Logos/GrandHotelOslo.tsx",
- "./Icons/HairdryerIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Hairdryer.tsx",
"./Icons/HairdresserIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/hairdresser-1.tsx",
+ "./Icons/HairdryerIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Hairdryer.tsx",
"./Icons/HandKeyIcon": "./lib/components/Icons/Illustrations/HandKey.tsx",
"./Icons/HandSoapIcon": "./lib/components/Icons/Customised/Amenities_Facilities/HandSoap.tsx",
"./Icons/HaymarketIcon": "./lib/components/Icons/Logos/Haymarket.tsx",
+ "./Icons/HotelLogoIcon": "./lib/components/Icons/Logos/index.tsx",
"./Icons/HotelNightIcon": "./lib/components/Icons/Illustrations/HotelNight.tsx",
"./Icons/HotelNorgeIcon": "./lib/components/Icons/Logos/HotelNorge.tsx",
"./Icons/IceMachineIcon": "./lib/components/Icons/Customised/Amenities_Facilities/IceMachine.tsx",
+ "./Icons/IconByCSSelect": "./lib/components/Icons/IconByCSSelect.tsx",
+ "./Icons/IconByIconName": "./lib/components/Icons/IconByIconName.tsx",
+ "./Icons/iconName": "./lib/components/Icons/iconName.ts",
+ "./Icons/IllustrationByIconName": "./lib/components/Icons/IllustrationByIconName.ts",
"./Icons/InstagramIcon": "./lib/components/Icons/Customised/Socials/Instagram.tsx",
"./Icons/KidsIcon": "./lib/components/Icons/Illustrations/Kids.tsx",
"./Icons/KidsMocktailIcon": "./lib/components/Icons/Illustrations/KidsMocktail.tsx",
@@ -104,22 +90,8 @@
"./Icons/MinimizeIcon": "./lib/components/Icons/Customised/UI/Minimize.tsx",
"./Icons/MirrorIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Mirror.tsx",
"./Icons/MoneyHandIcon": "./lib/components/Icons/Illustrations/MoneyHand.tsx",
- "./Icons/BedBunkExtraIcon": "./lib/components/Icons/Illustrations/BedBunkExtra.tsx",
- "./Icons/BedGenericIcon": "./lib/components/Icons/Illustrations/BedGeneric.tsx",
- "./Icons/BedBunkIcon": "./lib/components/Icons/Illustrations/BedBunk.tsx",
- "./Icons/HotelLogoIcon": "./lib/components/Icons/Logos/index.tsx",
- "./Icons/BedKingIcon": "./lib/components/Icons/Illustrations/BedKing.tsx",
- "./Icons/BedQueenIcon": "./lib/components/Icons/Illustrations/BedQueen.tsx",
- "./Icons/BedSofaIcon": "./lib/components/Icons/Illustrations/BedSofa.tsx",
- "./Icons/BedSofaExtraIcon": "./lib/components/Icons/Illustrations/BedSofaExtra.tsx",
- "./Icons/BedTwinIcon": "./lib/components/Icons/Illustrations/BedTwin.tsx",
- "./Icons/BedWallExtraIcon": "./lib/components/Icons/Illustrations/BedWallExtra.tsx",
- "./Icons/BreakfastBuffetIcon": "./lib/components/Icons/Illustrations/BreakfastBuffet.tsx",
- "./Icons/NoBreakfastBuffetIcon": "./lib/components/Icons/Illustrations/NoBreakfastBuffet.tsx",
- "./Icons/BedSingleIcon": "./lib/components/Icons/Illustrations/BedSingle.tsx",
- "./Icons/BedPullOutIcon": "./lib/components/Icons/Illustrations/BedPullOut.tsx",
- "./Icons/BedPullOutExtraIcon": "./lib/components/Icons/Illustrations/BedPullOutExtra.tsx",
"./Icons/MovingBedsIcon": "./lib/components/Icons/Customised/Amenities_Facilities/MovingBeds.tsx",
+ "./Icons/NoBreakfastBuffetIcon": "./lib/components/Icons/Illustrations/NoBreakfastBuffet.tsx",
"./Icons/PalmTreeIcon": "./lib/components/Icons/Nucleo/Experiences/palm-tree-2.tsx",
"./Icons/PopcornIcon": "./lib/components/Icons/Nucleo/Food/popcorn-2.tsx",
"./Icons/RecordPlayerIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/record-player-3.tsx",
@@ -139,6 +111,35 @@
"./Icons/WardIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Ward.tsx",
"./Icons/WindowNotAvailableIcon": "./lib/components/Icons/Customised/Amenities_Facilities/WindowNotAvailable.tsx",
"./Icons/WoodFloorIcon": "./lib/components/Icons/Customised/Amenities_Facilities/WoodFloor.tsx",
+ "./Image": "./lib/components/Image.tsx",
+ "./ImageContainer": "./lib/components/ImageContainer/index.tsx",
+ "./ImageFallback": "./lib/components/ImageFallback/index.tsx",
+ "./ImageGallery": "./lib/components/ImageGallery/index.tsx",
+ "./Input": "./lib/components/Input/index.tsx",
+ "./JsonToHtml": "./lib/components/JsonToHtml/JsonToHtml.tsx",
+ "./Label": "./lib/components/Label/index.tsx",
+ "./Lightbox": "./lib/components/Lightbox/index.tsx",
+ "./Link": "./lib/components/Link/index.tsx",
+ "./Modal": "./lib/components/Modal/index.tsx",
+ "./Modal/ModalContentWithActions": "./lib/components/Modal/ModalContentWithActions/index.tsx",
+ "./NoRateAvailableCard": "./lib/components/RateCard/NoRateAvailable/index.tsx",
+ "./OldDSButton": "./lib/components/OldDSButton/index.tsx",
+ "./OpeningHours": "./lib/components/OpeningHours/index.tsx",
+ "./ParkingInformation": "./lib/components/ParkingInformation/index.tsx",
+ "./PointsRateCard": "./lib/components/RateCard/Points/index.tsx",
+ "./Preamble": "./lib/components/Preamble/index.tsx",
+ "./RegularRateCard": "./lib/components/RateCard/Regular/index.tsx",
+ "./Select": "./lib/components/Select/index.tsx",
+ "./SidePeek": "./lib/components/SidePeek/index.tsx",
+ "./SidePeek/SidePeekProvider": "./lib/components/SidePeek/SidePeekContext/SidePeekProvider.tsx",
+ "./SkeletonShimmer": "./lib/components/SkeletonShimmer/index.tsx",
+ "./StaticMap": "./lib/components/StaticMap/index.tsx",
+ "./Subtitle": "./lib/components/Subtitle/index.tsx",
+ "./Switch": "./lib/components/Switch/index.tsx",
+ "./Table": "./lib/components/Table/index.tsx",
+ "./Title": "./lib/components/Title/index.tsx",
+ "./Tooltip": "./lib/components/Tooltip/index.tsx",
+ "./Typography": "./lib/components/Typography/index.tsx",
"./style.css": "./lib/style.css",
"./base.css": "./lib/base.css",
"./globals.css": "./lib/globals.css",
@@ -198,7 +199,7 @@
"@storybook/addon-links": "^9.1.2",
"@storybook/addon-themes": "^9.1.2",
"@storybook/addon-vitest": "^9.1.2",
- "@storybook/react-vite": "^9.1.2",
+ "@storybook/nextjs-vite": "^9.1.2",
"@types/css-modules": "^1.0.5",
"@types/node": "^20.17.17",
"@types/react": "^19",
diff --git a/yarn.lock b/yarn.lock
index 3425080c3..eb4d25570 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2795,6 +2795,13 @@ __metadata:
languageName: node
linkType: hard
+"@next/env@npm:^15.0.3":
+ version: 15.4.6
+ resolution: "@next/env@npm:15.4.6"
+ checksum: 10c0/039a757f5e083f44bd71268d804e86064233b023c72930ab45a3a46ba651c5bd474096550ca140b9ec00338c4013afbba7972c09eba23082005d7e9086a4eb67
+ languageName: node
+ linkType: hard
+
"@next/eslint-plugin-next@npm:15.3.2":
version: 15.3.2
resolution: "@next/eslint-plugin-next@npm:15.3.2"
@@ -6170,7 +6177,7 @@ __metadata:
"@storybook/addon-links": "npm:^9.1.2"
"@storybook/addon-themes": "npm:^9.1.2"
"@storybook/addon-vitest": "npm:^9.1.2"
- "@storybook/react-vite": "npm:^9.1.2"
+ "@storybook/nextjs-vite": "npm:^9.1.2"
"@types/css-modules": "npm:^1.0.5"
"@types/node": "npm:^20.17.17"
"@types/react": "npm:^19"
@@ -7049,6 +7056,28 @@ __metadata:
languageName: node
linkType: hard
+"@storybook/nextjs-vite@npm:^9.1.2":
+ version: 9.1.2
+ resolution: "@storybook/nextjs-vite@npm:9.1.2"
+ dependencies:
+ "@storybook/builder-vite": "npm:9.1.2"
+ "@storybook/react": "npm:9.1.2"
+ "@storybook/react-vite": "npm:9.1.2"
+ styled-jsx: "npm:5.1.6"
+ vite-plugin-storybook-nextjs: "npm:^2.0.5"
+ peerDependencies:
+ next: ^14.1.0 || ^15.0.0
+ react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
+ react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta
+ storybook: ^9.1.2
+ vite: ^5.0.0 || ^6.0.0 || ^7.0.0
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ checksum: 10c0/e711b8370ccfd14f9a6dbdfa1c5adfbd33fec63357301cc44f1dcd546451bfd94f266875af9a2a7e3268d4342d623f28de4daf1214973bdfac63a7491a639622
+ languageName: node
+ linkType: hard
+
"@storybook/react-dom-shim@npm:9.1.2":
version: 9.1.2
resolution: "@storybook/react-dom-shim@npm:9.1.2"
@@ -7060,7 +7089,7 @@ __metadata:
languageName: node
linkType: hard
-"@storybook/react-vite@npm:^9.1.2":
+"@storybook/react-vite@npm:9.1.2":
version: 9.1.2
resolution: "@storybook/react-vite@npm:9.1.2"
dependencies:
@@ -13260,6 +13289,15 @@ __metadata:
languageName: node
linkType: hard
+"image-size@npm:^2.0.0":
+ version: 2.0.2
+ resolution: "image-size@npm:2.0.2"
+ bin:
+ image-size: bin/image-size.js
+ checksum: 10c0/f09dd0f7cf8511cd20e4f756bdb5a7cb6d2240de3323f41bde266bed8373392a293892bf12e907e2995f52833fd88dd27cf6b1a52ab93968afc716cb78cd7b79
+ languageName: node
+ linkType: hard
+
"immer@npm:10.1.1":
version: 10.1.1
resolution: "immer@npm:10.1.1"
@@ -15066,7 +15104,7 @@ __metadata:
languageName: node
linkType: hard
-"magic-string@npm:^0.30.0, magic-string@npm:^0.30.17, magic-string@npm:^0.30.3, magic-string@npm:^0.30.5":
+"magic-string@npm:^0.30.0, magic-string@npm:^0.30.11, magic-string@npm:^0.30.17, magic-string@npm:^0.30.3, magic-string@npm:^0.30.5":
version: 0.30.17
resolution: "magic-string@npm:0.30.17"
dependencies:
@@ -15444,6 +15482,13 @@ __metadata:
languageName: node
linkType: hard
+"module-alias@npm:^2.2.3":
+ version: 2.2.3
+ resolution: "module-alias@npm:2.2.3"
+ checksum: 10c0/47dc5b6d04f6e7df0ff330ca9b2a37c688a682ed661e9432b0b327e1e6c43eedad052151b8d50d6beea8b924828d2a92fa4625c18d651bf2d93d8f03aa0172fa
+ languageName: node
+ linkType: hard
+
"module-details-from-path@npm:^1.0.3":
version: 1.0.3
resolution: "module-details-from-path@npm:1.0.3"
@@ -20240,6 +20285,24 @@ __metadata:
languageName: node
linkType: hard
+"vite-plugin-storybook-nextjs@npm:^2.0.5":
+ version: 2.0.5
+ resolution: "vite-plugin-storybook-nextjs@npm:2.0.5"
+ dependencies:
+ "@next/env": "npm:^15.0.3"
+ image-size: "npm:^2.0.0"
+ magic-string: "npm:^0.30.11"
+ module-alias: "npm:^2.2.3"
+ ts-dedent: "npm:^2.2.0"
+ vite-tsconfig-paths: "npm:^5.1.4"
+ peerDependencies:
+ next: ^14.1.0 || ^15.0.0
+ storybook: ^0.0.0-0 || ^9.0.0 || ^9.1.0-0
+ vite: ^5.0.0 || ^6.0.0 || ^7.0.0
+ checksum: 10c0/ee308c836c4380f9c9e3f51a7eab532eb648248cb8b78866032ed0e33af2cde3457e536e20c74546c46141d0b5ea9809ec13b76db299b8bd59468285228c3b1b
+ languageName: node
+ linkType: hard
+
"vite-tsconfig-paths@npm:^5.1.4":
version: 5.1.4
resolution: "vite-tsconfig-paths@npm:5.1.4"