From 855f795d5012da4a63c23b3ce5a72f8f9c605576 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20J=C3=A4derberg?= Date: Tue, 12 Aug 2025 09:07:33 +0000 Subject: [PATCH] Merged in feature/transpile-design-system (pull request #2621) Feature/transpile design system * remove example, we should use storybook instead * remove example, we should use storybook instead * css-modules cannot have :root, moved affected css-variables to globals.css * . * scandic-web no longer depends on design-system#build * * Update readme * Remove test code Approved-by: Anton Gunnarsson --- apps/partner-sas/globals.css | 5 +- apps/partner-sas/next.config.ts | 1 + apps/partner-sas/turbo.json | 16 +- apps/redis-api/docker-compose.yaml | 2 +- apps/scandic-web/app/globals.css | 5 +- apps/scandic-web/docker-compose.yaml | 2 +- apps/scandic-web/turbo.json | 16 +- packages/design-system/README.md | 85 +----- .../components/ContentPage/Header/Header.tsx | 70 ----- .../ContentPage/Header/header.module.css | 31 -- .../components/ContentPage/Header/index.tsx | 1 - .../components/ContentPage/Hero/Hero.tsx | 9 - .../ContentPage/Hero/hero.module.css | 11 - .../components/ContentPage/Hero/index.tsx | 1 - .../components/ContentPage/Main/Main.tsx | 17 -- .../components/ContentPage/Main/index.tsx | 1 - .../ContentPage/Main/main.module.css | 18 -- .../RichTextEditorContent.tsx | 71 ----- .../RichTextEditorContent/index.tsx | 1 - .../ricth-text-editor-content.module.css | 21 -- .../ContentPage/Sidebar/Sidebar.tsx | 3 - .../components/ContentPage/Sidebar/index.tsx | 1 - .../example/components/ContentPage/index.tsx | 11 - .../components/HotelPage/Hero/Hero.tsx | 18 -- .../components/HotelPage/Hero/hero.module.css | 17 -- .../components/HotelPage/Hero/index.tsx | 1 - .../components/HotelPage/HotelPage.tsx | 39 --- .../HotelPage/hotel-page.module.css | 18 -- .../example/components/HotelPage/index.tsx | 1 - .../design-system/example/components/Main.tsx | 54 ---- .../example/components/ThemeSwitcher.tsx | 40 --- .../example/components/main.module.css | 17 -- packages/design-system/example/index.html | 17 -- packages/design-system/example/index.tsx | 13 - packages/design-system/example/vite.config.ts | 15 - .../Divider/{index.ts => index.tsx} | 0 .../components/Icons/{index.ts => index.tsx} | 0 .../components/Input/{index.ts => index.tsx} | 0 .../components/Label/{index.ts => index.tsx} | 0 .../Loading/{index.ts => index.tsx} | 0 .../RateCard/Modal/modal.module.css | 18 -- .../components/Select/{index.ts => index.tsx} | 0 packages/design-system/lib/styles/globals.css | 4 - packages/design-system/package.json | 272 +++++++++--------- 44 files changed, 164 insertions(+), 779 deletions(-) delete mode 100644 packages/design-system/example/components/ContentPage/Header/Header.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Header/header.module.css delete mode 100644 packages/design-system/example/components/ContentPage/Header/index.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Hero/Hero.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Hero/hero.module.css delete mode 100644 packages/design-system/example/components/ContentPage/Hero/index.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Main/Main.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Main/index.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Main/main.module.css delete mode 100644 packages/design-system/example/components/ContentPage/RichTextEditorContent/RichTextEditorContent.tsx delete mode 100644 packages/design-system/example/components/ContentPage/RichTextEditorContent/index.tsx delete mode 100644 packages/design-system/example/components/ContentPage/RichTextEditorContent/ricth-text-editor-content.module.css delete mode 100644 packages/design-system/example/components/ContentPage/Sidebar/Sidebar.tsx delete mode 100644 packages/design-system/example/components/ContentPage/Sidebar/index.tsx delete mode 100644 packages/design-system/example/components/ContentPage/index.tsx delete mode 100644 packages/design-system/example/components/HotelPage/Hero/Hero.tsx delete mode 100644 packages/design-system/example/components/HotelPage/Hero/hero.module.css delete mode 100644 packages/design-system/example/components/HotelPage/Hero/index.tsx delete mode 100644 packages/design-system/example/components/HotelPage/HotelPage.tsx delete mode 100644 packages/design-system/example/components/HotelPage/hotel-page.module.css delete mode 100644 packages/design-system/example/components/HotelPage/index.tsx delete mode 100644 packages/design-system/example/components/Main.tsx delete mode 100644 packages/design-system/example/components/ThemeSwitcher.tsx delete mode 100644 packages/design-system/example/components/main.module.css delete mode 100644 packages/design-system/example/index.html delete mode 100644 packages/design-system/example/index.tsx delete mode 100644 packages/design-system/example/vite.config.ts rename packages/design-system/lib/components/Divider/{index.ts => index.tsx} (100%) rename packages/design-system/lib/components/Icons/{index.ts => index.tsx} (100%) rename packages/design-system/lib/components/Input/{index.ts => index.tsx} (100%) rename packages/design-system/lib/components/Label/{index.ts => index.tsx} (100%) rename packages/design-system/lib/components/Loading/{index.ts => index.tsx} (100%) rename packages/design-system/lib/components/Select/{index.ts => index.tsx} (100%) diff --git a/apps/partner-sas/globals.css b/apps/partner-sas/globals.css index 4bd623dc1..72e6af58e 100644 --- a/apps/partner-sas/globals.css +++ b/apps/partner-sas/globals.css @@ -8,7 +8,7 @@ --max-width-navigation: 89.5rem; --max-width-single-spacing: var(--Layout-Mobile-Margin-Margin-min); - --max-width-spacing: calc(var(--max-width-single-spacing) * 2); + --max-width-spacing: calc(var(--Space-x2) * 2); --max-width-page: min( calc(100dvw - var(--max-width-spacing)), var(--max-width-navigation) @@ -44,6 +44,7 @@ } * { + margin: 0; box-sizing: border-box; } @@ -92,6 +93,7 @@ ul { @media screen and (min-width: 768px) { :root { --max-width-single-spacing: var(--Layout-Tablet-Margin-Margin-min); + --max-width-spacing: calc(var(--Space-x3) * 2); } body.overflow-hidden { @@ -103,5 +105,6 @@ ul { @media screen and (min-width: 1367px) { :root { --max-width-single-spacing: var(--Layout-Desktop-Margin-Margin-min); + --max-width-spacing: calc(var(--Space-x5) * 2); } } diff --git a/apps/partner-sas/next.config.ts b/apps/partner-sas/next.config.ts index ff3059491..799cb7033 100644 --- a/apps/partner-sas/next.config.ts +++ b/apps/partner-sas/next.config.ts @@ -9,6 +9,7 @@ const nextConfig: NextConfig = { "@scandic-hotels/common", "@scandic-hotels/trpc", "@scandic-hotels/booking-flow", + "@scandic-hotels/design-system", ], output: "standalone", diff --git a/apps/partner-sas/turbo.json b/apps/partner-sas/turbo.json index 5b21c691f..8d584713d 100644 --- a/apps/partner-sas/turbo.json +++ b/apps/partner-sas/turbo.json @@ -1,17 +1,9 @@ { "extends": ["//"], "tasks": { - "dev": { - "dependsOn": ["@scandic-hotels/design-system#build"] - }, - "build": { - "dependsOn": ["@scandic-hotels/design-system#build"] - }, - "test": { - "dependsOn": ["@scandic-hotels/design-system#build"] - }, - "lint": { - "dependsOn": ["@scandic-hotels/design-system#build"] - } + "dev": {}, + "build": {}, + "test": {}, + "lint": {} } } diff --git a/apps/redis-api/docker-compose.yaml b/apps/redis-api/docker-compose.yaml index 5199b2b66..a650b3a62 100644 --- a/apps/redis-api/docker-compose.yaml +++ b/apps/redis-api/docker-compose.yaml @@ -4,7 +4,7 @@ services: context: . dockerfile: Dockerfile ports: - - "3001:3001" + - "3101:3001" depends_on: - redis environment: diff --git a/apps/scandic-web/app/globals.css b/apps/scandic-web/app/globals.css index 4bd623dc1..72e6af58e 100644 --- a/apps/scandic-web/app/globals.css +++ b/apps/scandic-web/app/globals.css @@ -8,7 +8,7 @@ --max-width-navigation: 89.5rem; --max-width-single-spacing: var(--Layout-Mobile-Margin-Margin-min); - --max-width-spacing: calc(var(--max-width-single-spacing) * 2); + --max-width-spacing: calc(var(--Space-x2) * 2); --max-width-page: min( calc(100dvw - var(--max-width-spacing)), var(--max-width-navigation) @@ -44,6 +44,7 @@ } * { + margin: 0; box-sizing: border-box; } @@ -92,6 +93,7 @@ ul { @media screen and (min-width: 768px) { :root { --max-width-single-spacing: var(--Layout-Tablet-Margin-Margin-min); + --max-width-spacing: calc(var(--Space-x3) * 2); } body.overflow-hidden { @@ -103,5 +105,6 @@ ul { @media screen and (min-width: 1367px) { :root { --max-width-single-spacing: var(--Layout-Desktop-Margin-Margin-min); + --max-width-spacing: calc(var(--Space-x5) * 2); } } diff --git a/apps/scandic-web/docker-compose.yaml b/apps/scandic-web/docker-compose.yaml index 9c77dd30d..314afdf28 100644 --- a/apps/scandic-web/docker-compose.yaml +++ b/apps/scandic-web/docker-compose.yaml @@ -4,7 +4,7 @@ services: context: ../redis-api dockerfile: Dockerfile ports: - - "3001:3001" + - "3101:3001" depends_on: - redis environment: diff --git a/apps/scandic-web/turbo.json b/apps/scandic-web/turbo.json index 5b21c691f..8d584713d 100644 --- a/apps/scandic-web/turbo.json +++ b/apps/scandic-web/turbo.json @@ -1,17 +1,9 @@ { "extends": ["//"], "tasks": { - "dev": { - "dependsOn": ["@scandic-hotels/design-system#build"] - }, - "build": { - "dependsOn": ["@scandic-hotels/design-system#build"] - }, - "test": { - "dependsOn": ["@scandic-hotels/design-system#build"] - }, - "lint": { - "dependsOn": ["@scandic-hotels/design-system#build"] - } + "dev": {}, + "build": {}, + "test": {}, + "lint": {} } } diff --git a/packages/design-system/README.md b/packages/design-system/README.md index 5b018c82d..b59f1012c 100644 --- a/packages/design-system/README.md +++ b/packages/design-system/README.md @@ -2,11 +2,7 @@ This repo contains the design system for Scandic Hotels. -It is built on Vite. - -The output is an NPM package. - -It is currently not published to any registry. Consumers are free to choose how to consume the distribution. +Consumption is done via `transpilePackages` in Next.js. ## The stack @@ -18,78 +14,16 @@ It is currently not published to any registry. Consumers are free to choose how ## Usage -Most of the components in this design system are self explanatory, refer to the Storybook for reference and use cases. +Refer to the Storybook for reference and use cases. -However there are some components that benefit from a bit more documentation and these have more documentation attached to their Storybook. +### Scripts -One such notable component is the `Typography` component. Read the documentation in the docs for the components story in Storybook at `lib/components/Typography/Typography.docs.mdx` or read it in the deployed Storybook in a browser. For example: https://design-system-scandic-hotels.netlify.app/?path=/docs/components-typography--docs - -## Contributing - -- Clone the repository. -- Do your changes. -- Build the project. -- Push the build output to origin. - -### Clone the repository - -To get started with the project, clone the repository and install the dependencies: - -```bash -git clone git@bitbucket.org:scandic-swap/web.git -cd web -yarn -``` - -### Do your changes - -Work your magic. - -### Build the project - -```bash -yarn workspace @scandic-hotels/design-system build -``` - -### Push the build output to origin - -```bash -git add packages/design-system/ -git commit -git push -``` - -## Main script targets - -Run the following script targets either from the project root with: - -```bash -yarn workspace @scandic-hotels/design-system - - diff --git a/packages/design-system/example/index.tsx b/packages/design-system/example/index.tsx deleted file mode 100644 index bd5f31ce3..000000000 --- a/packages/design-system/example/index.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react' -import ReactDOM from 'react-dom/client' - -import '@scandic-hotels/design-system/style.css' -import '@scandic-hotels/design-system/fonts.css' - -import { Main } from './components/Main' - -ReactDOM.createRoot(document.getElementById('root')!).render( - -
- -) diff --git a/packages/design-system/example/vite.config.ts b/packages/design-system/example/vite.config.ts deleted file mode 100644 index d198995db..000000000 --- a/packages/design-system/example/vite.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -/// - -import { resolve } from 'node:path' - -import react from '@vitejs/plugin-react' -import { defineConfig } from 'vite' - -// https://vitejs.dev/config/ -export default defineConfig({ - plugins: [react()], - publicDir: resolve(__dirname, '../public'), - server: { - open: './index.html', - }, -}) diff --git a/packages/design-system/lib/components/Divider/index.ts b/packages/design-system/lib/components/Divider/index.tsx similarity index 100% rename from packages/design-system/lib/components/Divider/index.ts rename to packages/design-system/lib/components/Divider/index.tsx diff --git a/packages/design-system/lib/components/Icons/index.ts b/packages/design-system/lib/components/Icons/index.tsx similarity index 100% rename from packages/design-system/lib/components/Icons/index.ts rename to packages/design-system/lib/components/Icons/index.tsx diff --git a/packages/design-system/lib/components/Input/index.ts b/packages/design-system/lib/components/Input/index.tsx similarity index 100% rename from packages/design-system/lib/components/Input/index.ts rename to packages/design-system/lib/components/Input/index.tsx diff --git a/packages/design-system/lib/components/Label/index.ts b/packages/design-system/lib/components/Label/index.tsx similarity index 100% rename from packages/design-system/lib/components/Label/index.ts rename to packages/design-system/lib/components/Label/index.tsx diff --git a/packages/design-system/lib/components/Loading/index.ts b/packages/design-system/lib/components/Loading/index.tsx similarity index 100% rename from packages/design-system/lib/components/Loading/index.ts rename to packages/design-system/lib/components/Loading/index.tsx diff --git a/packages/design-system/lib/components/RateCard/Modal/modal.module.css b/packages/design-system/lib/components/RateCard/Modal/modal.module.css index e9852a07d..46054d1dd 100644 --- a/packages/design-system/lib/components/RateCard/Modal/modal.module.css +++ b/packages/design-system/lib/components/RateCard/Modal/modal.module.css @@ -1,12 +1,3 @@ -:root { - --max-width-navigation: 89.5rem; - - --max-width-spacing: calc(var(--Space-x2) * 2); - --max-width-page: min( - calc(100dvw - var(--max-width-spacing)), - var(--max-width-navigation) - ); -} .overlay { background: rgba(0, 0, 0, 0.5); height: var(--visual-viewport-height); @@ -70,9 +61,6 @@ } @media screen and (min-width: 768px) { - :root { - --max-width-spacing: calc(var(--Space-x3) * 2); - } .overlay { display: flex; justify-content: center; @@ -91,9 +79,3 @@ max-height: 90dvh; } } - -@media screen and (min-width: 1367px) { - :root { - --max-width-spacing: calc(var(--Space-x5) * 2); - } -} diff --git a/packages/design-system/lib/components/Select/index.ts b/packages/design-system/lib/components/Select/index.tsx similarity index 100% rename from packages/design-system/lib/components/Select/index.ts rename to packages/design-system/lib/components/Select/index.tsx diff --git a/packages/design-system/lib/styles/globals.css b/packages/design-system/lib/styles/globals.css index 90d59ca05..94c9903ab 100644 --- a/packages/design-system/lib/styles/globals.css +++ b/packages/design-system/lib/styles/globals.css @@ -1,6 +1,2 @@ @value inputContainerHeight: 56px; @value inputExpandedHeight: 24px; - -* { - margin: 0; -} diff --git a/packages/design-system/package.json b/packages/design-system/package.json index 63d51c975..96bd315d3 100644 --- a/packages/design-system/package.json +++ b/packages/design-system/package.json @@ -4,140 +4,140 @@ "version": "1.0.0-beta.1", "type": "module", "exports": { - "./Accordion": "./dist/components/Accordion/index.js", - "./Accordion/AccordionItem": "./dist/components/Accordion/AccordionItem/index.js", - "./BackToTopButton": "./dist/components/BackToTopButton/index.js", - "./Body": "./dist/components/Body/index.js", - "./Button": "./dist/components/Button/index.js", - "./ButtonLink": "./dist/components/ButtonLink/index.js", - "./Caption": "./dist/components/Caption/index.js", - "./Card": "./dist/components/Card/index.js", - "./ChipButton": "./dist/components/ChipButton/index.js", - "./ChipLink": "./dist/components/ChipLink/index.js", - "./Chips": "./dist/components/Chips/index.js", - "./DeprecatedSelect": "./dist/components/DeprecatedSelect/index.js", - "./Divider": "./dist/components/Divider/index.js", - "./Footnote": "./dist/components/Footnote/index.js", - "./Form/Checkbox": "./dist/components/Form/Checkbox/index.js", - "./Form/Country": "./dist/components/Form/Country/index.js", - "./Form/Date": "./dist/components/Form/Date/index.js", - "./Form/ErrorMessage": "./dist/components/Form/ErrorMessage/index.js", - "./Form/Phone": "./dist/components/Form/Phone/index.js", - "./Form/RadioCard": "./dist/components/Form/RadioCard/index.js", - "./IconChip": "./dist/components/IconChip/index.js", - "./Input": "./dist/components/Input/index.js", - "./Label": "./dist/components/Label/index.js", - "./OldDSButton": "./dist/components/OldDSButton/index.js", - "./Select": "./dist/components/Select/index.js", - "./SkeletonShimmer": "./dist/components/SkeletonShimmer/index.js", - "./SidePeek": "./dist/components/SidePeek/index.js", - "./SidePeek/SidePeekProvider": "./dist/components/SidePeek/SidePeekContext/SidePeekProvider.js", - "./Subtitle": "./dist/components/Subtitle/index.js", - "./Switch": "./dist/components/Switch/index.js", - "./Title": "./dist/components/Title/index.js", - "./Tooltip": "./dist/components/Tooltip/index.js", - "./Typography": "./dist/components/Typography/index.js", - "./RegularRateCard": "./dist/components/RateCard/Regular/index.js", - "./CampaignRateCard": "./dist/components/RateCard/Campaign/index.js", - "./CodeRateCard": "./dist/components/RateCard/Code/index.js", - "./PointsRateCard": "./dist/components/RateCard/Points/index.js", - "./Preamble": "./dist/components/Preamble/index.js", - "./NoRateAvailableCard": "./dist/components/RateCard/NoRateAvailable/index.js", - "./IconButton": "./dist/components/IconButton/index.js", - "./Icons": "./dist/components/Icons/index.js", - "./Icons/IconByCSSelect": "./dist/components/Icons/IconByCSSelect.js", - "./Icons/IconByIconName": "./dist/components/Icons/IconByIconName.js", - "./Icons/IllustrationByIconName": "./dist/components/Icons/IllustrationByIconName.js", - "./Icons/iconName": "./dist/components/Icons/iconName.js", - "./Icons/BathroomCabinetIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/bathroom-cabinet-2.js", - "./Icons/BedHotelIcon": "./dist/components/Icons/Customised/Amenities_Facilities/BedHotel.js", - "./Icons/BedIcon": "./dist/components/Icons/Illustrations/Bed.js", - "./Icons/BouquetIcon": "./dist/components/Icons/Nucleo/Benefits/bouquet.js", - "./Icons/BowlingPinsIcon": "./dist/components/Icons/Nucleo/Experiences/bowling-pins.js", - "./Icons/BunkBedIcon": "./dist/components/Icons/Customised/Amenities_Facilities/MdiBunkBedOutline.js", - "./Icons/ChipsIcon": "./dist/components/Icons/Nucleo/Food/chips-3.js", - "./Icons/CoinIcon": "./dist/components/Icons/Illustrations/Coin.js", - "./Icons/ConferenceRoomIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/conference-room.js", - "./Icons/CoolingIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Cooling.js", - "./Icons/CouchTableIcon": "./dist/components/Icons/Customised/Amenities_Facilities/CouchTable.js", - "./Icons/CroissantCoffeeEggIcon": "./dist/components/Icons/Illustrations/CroissantCoffeeEgg.js", - "./Icons/CutleryOneIcon": "./dist/components/Icons/Illustrations/CutleryOne.js", - "./Icons/CutleryTwoIcon": "./dist/components/Icons/Illustrations/CutleryTwo.js", - "./Icons/DiamondAddIcon": "./dist/components/Icons/Customised/Benefits/DiamondAdd.js", - "./Icons/DiscountIcon": "./dist/components/Icons/Nucleo/Benefits/discount-2-2.js", - "./Icons/FilledDiscountIcon": "./dist/components/Icons/Nucleo/Benefits/FilledDiscount.js", - "./Icons/DoorIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/door-2.js", - "./Icons/DowntownCamperIcon": "./dist/components/Icons/Logos/DowntownCamper.js", - "./Icons/FacebookIcon": "./dist/components/Icons/Customised/Socials/Facebook.js", - "./Icons/FootStoolIcon": "./dist/components/Icons/Customised/Amenities_Facilities/FootStool.js", - "./Icons/GiftOpenIcon": "./dist/components/Icons/Illustrations/GiftOpen.js", - "./Icons/GrandHotelOsloIcon": "./dist/components/Icons/Logos/GrandHotelOslo.js", - "./Icons/HairdryerIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Hairdryer.js", - "./Icons/HairdresserIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/hairdresser-1.js", - "./Icons/HandKeyIcon": "./dist/components/Icons/Illustrations/HandKey.js", - "./Icons/HandSoapIcon": "./dist/components/Icons/Customised/Amenities_Facilities/HandSoap.js", - "./Icons/HaymarketIcon": "./dist/components/Icons/Logos/Haymarket.js", - "./Icons/HotelNightIcon": "./dist/components/Icons/Illustrations/HotelNight.js", - "./Icons/HotelNorgeIcon": "./dist/components/Icons/Logos/HotelNorge.js", - "./Icons/IceMachineIcon": "./dist/components/Icons/Customised/Amenities_Facilities/IceMachine.js", - "./Icons/InstagramIcon": "./dist/components/Icons/Customised/Socials/Instagram.js", - "./Icons/KidsIcon": "./dist/components/Icons/Illustrations/Kids.js", - "./Icons/KidsMocktailIcon": "./dist/components/Icons/Illustrations/KidsMocktail.js", - "./Icons/MagicWandIcon": "./dist/components/Icons/Illustrations/MagicWand.js", - "./Icons/MarskiLogoIcon": "./dist/components/Icons/Logos/MarskiLogo.js", - "./Icons/MassageIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Massage.js", - "./Icons/MaterialIcon": "./dist/components/Icons/MaterialIcon/index.js", - "./Icons/MaterialIcon/MaterialSymbol": "./dist/components/Icons/MaterialIcon/MaterialSymbol/index.js", - "./Icons/MinimizeIcon": "./dist/components/Icons/Customised/UI/Minimize.js", - "./Icons/MirrorIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Mirror.js", - "./Icons/MoneyHandIcon": "./dist/components/Icons/Illustrations/MoneyHand.js", - "./Icons/BedBunkExtraIcon": "./dist/components/Icons/Illustrations/BedBunkExtra.js", - "./Icons/BedGenericIcon": "./dist/components/Icons/Illustrations/BedGeneric.js", - "./Icons/BedBunkIcon": "./dist/components/Icons/Illustrations/BedBunk.js", - "./Icons/HotelLogoIcon": "./dist/components/Icons/Logos/index.js", - "./Icons/BedKingIcon": "./dist/components/Icons/Illustrations/BedKing.js", - "./Icons/BedQueenIcon": "./dist/components/Icons/Illustrations/BedQueen.js", - "./Icons/BedSofaIcon": "./dist/components/Icons/Illustrations/BedSofa.js", - "./Icons/BedSofaExtraIcon": "./dist/components/Icons/Illustrations/BedSofaExtra.js", - "./Icons/BedTwinIcon": "./dist/components/Icons/Illustrations/BedTwin.js", - "./Icons/BedWallExtraIcon": "./dist/components/Icons/Illustrations/BedWallExtra.js", - "./Icons/BreakfastBuffetIcon": "./dist/components/Icons/Illustrations/BreakfastBuffet.js", - "./Icons/NoBreakfastBuffetIcon": "./dist/components/Icons/Illustrations/NoBreakfastBuffet.js", - "./Icons/BedSingleIcon": "./dist/components/Icons/Illustrations/BedSingle.js", - "./Icons/BedPullOutIcon": "./dist/components/Icons/Illustrations/BedPullOut.js", - "./Icons/BedPullOutExtraIcon": "./dist/components/Icons/Illustrations/BedPullOutExtra.js", - "./Icons/MovingBedsIcon": "./dist/components/Icons/Customised/Amenities_Facilities/MovingBeds.js", - "./Icons/PalmTreeIcon": "./dist/components/Icons/Nucleo/Experiences/palm-tree-2.js", - "./Icons/PopcornIcon": "./dist/components/Icons/Nucleo/Food/popcorn-2.js", - "./Icons/RecordPlayerIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/record-player-3.js", - "./Icons/RoadIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Road.js", - "./Icons/RugIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Rug.js", - "./Icons/SafetyBoxIcon": "./dist/components/Icons/Customised/Amenities_Facilities/SafetyBox.js", - "./Icons/ScandicGoIcon": "./dist/components/Icons/Logos/ScandicGoLogo.js", - "./Icons/ScandicLogoIcon": "./dist/components/Icons/Logos/ScandicLogo.js", - "./Icons/SlippersIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Slippers.js", - "./Icons/SurpriseIcon": "./dist/components/Icons/Illustrations/Surprise.js", - "./Icons/ToiletIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/toilet-2.js", - "./Icons/TowelIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Towel.js", - "./Icons/TripadvisorIcon": "./dist/components/Icons/Customised/Socials/Tripadvisor.js", - "./Icons/UserPoliceIcon": "./dist/components/Icons/Nucleo/Amenities_Facilities/user-police-2.js", - "./Icons/ViewIcon": "./dist/components/Icons/Customised/Amenities_Facilities/View.js", - "./Icons/VoucherIcon": "./dist/components/Icons/Illustrations/Voucher.js", - "./Icons/WardIcon": "./dist/components/Icons/Customised/Amenities_Facilities/Ward.js", - "./Icons/WindowNotAvailableIcon": "./dist/components/Icons/Customised/Amenities_Facilities/WindowNotAvailable.js", - "./Icons/WoodFloorIcon": "./dist/components/Icons/Customised/Amenities_Facilities/WoodFloor.js", - "./style.css": "./dist/style.css", - "./base.css": "./dist/base.css", - "./globals.css": "./dist/globals.css", - "./impl.css": "./dist/impl.css", - "./fonts.css": "./dist/fonts.css", - "./downtown-camper.css": "./dist/styles/downtown-camper.css", - "./grand-hotel.css": "./dist/styles/grand-hotel.css", - "./haymarket.css": "./dist/styles/haymarket.css", - "./hotel-norge.css": "./dist/styles/hotel-norge.css", - "./marski.css": "./dist/styles/marski.css", - "./scandic-go.css": "./dist/styles/scandic-go.css", - "./scandic.css": "./dist/styles/scandic.css" + "./Accordion": "./lib/components/Accordion/index.tsx", + "./Accordion/AccordionItem": "./lib/components/Accordion/AccordionItem/index.tsx", + "./BackToTopButton": "./lib/components/BackToTopButton/index.tsx", + "./Body": "./lib/components/Body/index.tsx", + "./Button": "./lib/components/Button/index.tsx", + "./ButtonLink": "./lib/components/ButtonLink/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", + "./DeprecatedSelect": "./lib/components/DeprecatedSelect/index.tsx", + "./Divider": "./lib/components/Divider/index.tsx", + "./Footnote": "./lib/components/Footnote/index.tsx", + "./Form/Checkbox": "./lib/components/Form/Checkbox/index.tsx", + "./Form/Country": "./lib/components/Form/Country/index.tsx", + "./Form/Date": "./lib/components/Form/Date/index.tsx", + "./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", + "./Input": "./lib/components/Input/index.tsx", + "./Label": "./lib/components/Label/index.tsx", + "./OldDSButton": "./lib/components/OldDSButton/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", + "./Subtitle": "./lib/components/Subtitle/index.tsx", + "./Switch": "./lib/components/Switch/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", + "./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", + "./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/BedHotelIcon": "./lib/components/Icons/Customised/Amenities_Facilities/BedHotel.tsx", + "./Icons/BedIcon": "./lib/components/Icons/Illustrations/Bed.tsx", + "./Icons/BouquetIcon": "./lib/components/Icons/Nucleo/Benefits/bouquet.tsx", + "./Icons/BowlingPinsIcon": "./lib/components/Icons/Nucleo/Experiences/bowling-pins.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", + "./Icons/ConferenceRoomIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/conference-room.tsx", + "./Icons/CoolingIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Cooling.tsx", + "./Icons/CouchTableIcon": "./lib/components/Icons/Customised/Amenities_Facilities/CouchTable.tsx", + "./Icons/CroissantCoffeeEggIcon": "./lib/components/Icons/Illustrations/CroissantCoffeeEgg.tsx", + "./Icons/CutleryOneIcon": "./lib/components/Icons/Illustrations/CutleryOne.tsx", + "./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/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/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/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/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/InstagramIcon": "./lib/components/Icons/Customised/Socials/Instagram.tsx", + "./Icons/KidsIcon": "./lib/components/Icons/Illustrations/Kids.tsx", + "./Icons/KidsMocktailIcon": "./lib/components/Icons/Illustrations/KidsMocktail.tsx", + "./Icons/MagicWandIcon": "./lib/components/Icons/Illustrations/MagicWand.tsx", + "./Icons/MarskiLogoIcon": "./lib/components/Icons/Logos/MarskiLogo.tsx", + "./Icons/MassageIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Massage.tsx", + "./Icons/MaterialIcon": "./lib/components/Icons/MaterialIcon/index.tsx", + "./Icons/MaterialIcon/MaterialSymbol": "./lib/components/Icons/MaterialIcon/MaterialSymbol/index.tsx", + "./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/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", + "./Icons/RoadIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Road.tsx", + "./Icons/RugIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Rug.tsx", + "./Icons/SafetyBoxIcon": "./lib/components/Icons/Customised/Amenities_Facilities/SafetyBox.tsx", + "./Icons/ScandicGoIcon": "./lib/components/Icons/Logos/ScandicGoLogo.tsx", + "./Icons/ScandicLogoIcon": "./lib/components/Icons/Logos/ScandicLogo.tsx", + "./Icons/SlippersIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Slippers.tsx", + "./Icons/SurpriseIcon": "./lib/components/Icons/Illustrations/Surprise.tsx", + "./Icons/ToiletIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/toilet-2.tsx", + "./Icons/TowelIcon": "./lib/components/Icons/Customised/Amenities_Facilities/Towel.tsx", + "./Icons/TripadvisorIcon": "./lib/components/Icons/Customised/Socials/Tripadvisor.tsx", + "./Icons/UserPoliceIcon": "./lib/components/Icons/Nucleo/Amenities_Facilities/user-police-2.tsx", + "./Icons/ViewIcon": "./lib/components/Icons/Customised/Amenities_Facilities/View.tsx", + "./Icons/VoucherIcon": "./lib/components/Icons/Illustrations/Voucher.tsx", + "./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", + "./style.css": "./lib/style.css", + "./base.css": "./lib/base.css", + "./globals.css": "./lib/globals.css", + "./impl.css": "./lib/impl.css", + "./fonts.css": "./lib/fonts.css", + "./downtown-camper.css": "./lib/styles/downtown-camper.css", + "./grand-hotel.css": "./lib/styles/grand-hotel.css", + "./haymarket.css": "./lib/styles/haymarket.css", + "./hotel-norge.css": "./lib/styles/hotel-norge.css", + "./marski.css": "./lib/styles/marski.css", + "./scandic-go.css": "./lib/styles/scandic-go.css", + "./scandic.css": "./lib/styles/scandic.css" }, "files": [ "dist" @@ -146,10 +146,10 @@ "**/*.css" ], "scripts": { - "dev": "cd example && vite", + "dev": "yarn storybook", "generate": "cd generate && jiti generate.ts", "format": "prettier . --write", - "build": "yarn run generate && tsc --p ./tsconfig-build.json && vite build && yarn run format", + "build": "yarn build-storybook", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0 && tsc", "lint:fix": "eslint . --ext ts,tsx --report-unused-disable-directives --fix --max-warnings 0 && tsc", "storybook": "yarn run generate && storybook dev -p 6006",