From d0546926a9b2cbc912a782ada59476fcab5fce63 Mon Sep 17 00:00:00 2001 From: Rasmus Langvad Date: Wed, 7 Jan 2026 12:45:50 +0000 Subject: [PATCH] Merged in fix/3697-prettier-configs (pull request #3396) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jรคderberg Approved-by: Linus Flood --- .../design-system/.prettierrc => .prettierrc | 2 +- apps/partner-sas/prettier.config.js | 14 - apps/scandic-redirect/package.json | 8 - apps/scandic-web/prettier.config.js | 14 - packages/booking-flow/prettier.config.js | 14 - .../.storybook/content/Colors.tsx | 26 +- .../.storybook/content/CornerRadius.mdx | 6 +- .../.storybook/content/CornerRadius.tsx | 14 +- .../.storybook/content/Shadow.mdx | 6 +- .../.storybook/content/Shadow.tsx | 20 +- .../.storybook/content/Spacing.mdx | 6 +- .../.storybook/content/Spacing.tsx | 26 +- .../design-system/.storybook/content/base.mdx | 6 +- .../.storybook/content/colors.module.css | 4 +- .../content/colors/downtownCamper.mdx | 6 +- .../.storybook/content/colors/grandHotel.mdx | 6 +- .../.storybook/content/colors/haymarket.mdx | 6 +- .../.storybook/content/colors/hotelNorge.mdx | 6 +- .../.storybook/content/colors/index.mdx | 26 +- .../.storybook/content/colors/marski.mdx | 6 +- .../.storybook/content/colors/scandic.mdx | 6 +- .../.storybook/content/colors/scandicGo.mdx | 6 +- .../.storybook/content/colors/theDock.mdx | 6 +- .../.storybook/content/index.mdx | 2 +- .../.storybook/content/tokens.module.css | 6 +- .../.storybook/decorators/FormDecorator.tsx | 2 +- packages/design-system/.storybook/main.ts | 34 +- packages/design-system/.storybook/manager.ts | 4 +- packages/design-system/.storybook/preview.tsx | 76 +- .../design-system/.storybook/reactIntl.ts | 16 +- .../design-system/.storybook/scandic-theme.ts | 10 +- .../design-system/.storybook/vitest.setup.ts | 6 +- packages/design-system/eslint.config.mjs | 86 +- packages/design-system/generate/generate.ts | 88 +- packages/design-system/generate/utils.ts | 10 +- .../Accordion/Accordion.stories.tsx | 26 +- .../Accordion/AccordionItem/index.tsx | 35 +- .../Accordion/AccordionItem/variants.ts | 6 +- .../lib/components/Accordion/index.tsx | 11 +- .../lib/components/Accordion/variants.ts | 6 +- .../lib/components/Alert/Alert.stories.tsx | 50 +- .../lib/components/Alert/Sidepeek/index.tsx | 22 +- .../lib/components/Alert/Sidepeek/sidepeek.ts | 2 +- .../lib/components/Alert/alert.ts | 10 +- .../lib/components/Alert/index.tsx | 22 +- .../lib/components/Alert/utils.tsx | 20 +- .../lib/components/Alert/variants.ts | 8 +- .../lib/components/Avatar/Avatar.stories.tsx | 62 +- .../lib/components/Avatar/index.tsx | 20 +- .../lib/components/Avatar/types.ts | 2 +- .../lib/components/Avatar/variants.ts | 12 +- .../BackToTopButton.stories.tsx | 40 +- .../backToTopButton.module.css | 2 +- .../lib/components/BackToTopButton/index.tsx | 19 +- .../components/BackToTopButton/variants.ts | 6 +- .../lib/components/Badge/Badge.stories.tsx | 16 +- .../lib/components/Badge/Badge.tsx | 26 +- .../lib/components/Badge/index.tsx | 2 +- .../lib/components/Badge/variants.ts | 18 +- .../BookingCodeChip.stories.tsx | 10 +- .../lib/components/BookingCodeChip/index.tsx | 34 +- .../lib/components/Button/Button.stories.tsx | 228 +- .../lib/components/Button/Button.tsx | 24 +- .../lib/components/Button/button.module.css | 2 +- .../lib/components/Button/index.tsx | 6 +- .../lib/components/Button/types.ts | 42 +- .../lib/components/Button/variants.ts | 34 +- .../ButtonLink/ButtonLink.stories.tsx | 208 +- .../lib/components/ButtonLink/index.tsx | 36 +- .../lib/components/ButtonLink/variants.ts | 6 +- .../lib/components/Caption/index.tsx | 13 +- .../lib/components/Caption/variants.ts | 10 +- .../lib/components/Card/Card.stories.tsx | 10 +- .../lib/components/Card/Card.tsx | 4 +- .../Card/Compositions/ContentCard.stories.tsx | 38 +- .../lib/components/Card/index.tsx | 2 +- .../lib/components/Card/types.ts | 9 +- .../lib/components/Card/variants.ts | 6 +- .../lib/components/Chip/index.tsx | 9 +- .../lib/components/Chip/variants.ts | 8 +- .../ChipButton/ChipButton.stories.tsx | 34 +- .../lib/components/ChipButton/ChipButton.tsx | 10 +- .../lib/components/ChipButton/index.tsx | 2 +- .../lib/components/ChipButton/types.ts | 11 +- .../lib/components/ChipButton/variants.ts | 42 +- .../components/ChipLink/ChipLink.stories.tsx | 10 +- .../lib/components/ChipLink/ChipLink.tsx | 10 +- .../lib/components/ChipLink/index.tsx | 2 +- .../lib/components/Chips/Chips.stories.tsx | 16 +- .../lib/components/Chips/Chips.tsx | 4 +- .../lib/components/Chips/index.tsx | 2 +- .../SelectChevron/chevron.module.css | 2 +- .../DeprecatedSelect/SelectChevron/index.tsx | 8 +- .../lib/components/DeprecatedSelect/index.tsx | 36 +- .../DeprecatedSelect/select.module.css | 14 +- .../components/Divider/Divider.stories.tsx | 6 +- .../lib/components/Divider/Divider.tsx | 4 +- .../lib/components/Divider/index.tsx | 4 +- .../lib/components/Divider/types.ts | 7 +- .../lib/components/Divider/variants.ts | 26 +- .../FacilityToIcon/FacilityToIcon.stories.tsx | 38 +- .../lib/components/FacilityToIcon/index.tsx | 12 +- .../lib/components/FakeButton/index.tsx | 18 +- .../lib/components/FakeButton/variants.ts | 6 +- .../lib/components/Footnote/index.tsx | 13 +- .../lib/components/Footnote/variants.ts | 8 +- .../lib/components/Form/Checkbox/index.tsx | 18 +- .../Form/Country/CountryCombobox.tsx | 40 +- .../components/Form/Country/CountrySelect.tsx | 22 +- .../Form/Country/country.module.css | 8 +- .../lib/components/Form/Country/country.ts | 2 +- .../lib/components/Form/Country/index.tsx | 12 +- .../lib/components/Form/Date/date.ts | 15 +- .../lib/components/Form/Date/index.tsx | 34 +- .../components/Form/ErrorMessage/Error.tsx | 6 +- .../Form/ErrorMessage/errorMessage.ts | 4 +- .../components/Form/ErrorMessage/index.tsx | 6 +- .../lib/components/Form/FormInput/index.tsx | 42 +- .../Form/FormInput/input.module.css | 2 +- .../lib/components/Form/FormInput/input.ts | 12 +- .../lib/components/Form/FormSelect/index.tsx | 10 +- .../Form/PaymentOption/PaymentOption.tsx | 12 +- .../PaymentOptionsGroup.stories.tsx | 22 +- .../PaymentOption/PaymentOptionsGroup.tsx | 10 +- .../lib/components/Form/Phone/index.tsx | 38 +- .../components/Form/Phone/phone.module.css | 2 +- .../lib/components/Form/Phone/phone.ts | 2 +- .../Form/RadioButtonsGroup/index.tsx | 12 +- .../lib/components/Form/RadioCard/index.tsx | 18 +- .../Form/RadioCard/radioCard.module.css | 4 +- .../lib/components/Form/RadioCard/types.ts | 10 +- .../SelectPaymentMethod.stories.tsx | 32 +- .../Form/SelectPaymentMethod/index.tsx | 30 +- .../lib/components/Form/utils/index.ts | 2 +- .../lib/components/Form/utils/mergeRefs.ts | 4 +- .../HotelCard/HotelCard.stories.tsx | 50 +- .../HotelCard/HotelCardDialogImage/index.tsx | 16 +- .../HotelCardDialogImage/variants.ts | 6 +- .../HotelCard/HotelCardSkeleton.tsx | 4 +- .../HotelCard/HotelChequeCard/index.tsx | 22 +- .../StandaloneHotelCardDialog.stories.tsx | 12 +- .../StandaloneHotelCardDialog/index.tsx | 56 +- .../HotelCard/HotelPointsRow/index.tsx | 14 +- .../HotelCard/HotelPriceCard/index.tsx | 42 +- .../HotelCard/HotelVoucherCard/index.tsx | 16 +- .../HotelCard/NoPriceAvailableCard/index.tsx | 12 +- .../components/HotelCard/RoomPrice/index.tsx | 8 +- .../lib/components/HotelCard/index.tsx | 100 +- .../lib/components/HotelCard/variants.ts | 8 +- .../HotelInfoCard/HotelDescription/index.tsx | 24 +- .../HotelInfoCard/HotelInfoCard.stories.tsx | 78 +- .../lib/components/HotelInfoCard/index.tsx | 34 +- .../IconButton/IconButton.stories.tsx | 226 +- .../lib/components/IconButton/IconButton.tsx | 18 +- .../IconButton/iconButton.module.css | 2 +- .../lib/components/IconButton/index.tsx | 2 +- .../lib/components/IconButton/types.ts | 46 +- .../lib/components/IconButton/variants.ts | 28 +- .../lib/components/IconChip/index.tsx | 4 +- .../lib/components/IconChip/variants.ts | 4 +- .../Amenities_Facilities/BedHotel.tsx | 6 +- .../Amenities_Facilities/Cooling.tsx | 6 +- .../Amenities_Facilities/CouchTable.tsx | 6 +- .../Amenities_Facilities/FootStool.tsx | 6 +- .../Amenities_Facilities/Hairdryer.tsx | 6 +- .../Amenities_Facilities/HandSoap.tsx | 6 +- .../Amenities_Facilities/IceMachine.tsx | 6 +- .../Amenities_Facilities/Massage.tsx | 6 +- .../MdiBunkBedOutline.tsx | 6 +- .../Amenities_Facilities/Mirror.tsx | 6 +- .../Amenities_Facilities/MovingBeds.tsx | 6 +- .../Customised/Amenities_Facilities/Road.tsx | 6 +- .../Customised/Amenities_Facilities/Rug.tsx | 6 +- .../Amenities_Facilities/SafetyBox.tsx | 6 +- .../Amenities_Facilities/Slippers.tsx | 6 +- .../Customised/Amenities_Facilities/Towel.tsx | 6 +- .../Customised/Amenities_Facilities/View.tsx | 6 +- .../Customised/Amenities_Facilities/Ward.tsx | 6 +- .../WindowNotAvailable.tsx | 6 +- .../Amenities_Facilities/WoodFloor.tsx | 6 +- .../Icons/Customised/Benefits/DiamondAdd.tsx | 6 +- .../Icons/Customised/Socials/Facebook.tsx | 6 +- .../Icons/Customised/Socials/Instagram.tsx | 6 +- .../Icons/Customised/Socials/Tripadvisor.tsx | 6 +- .../Icons/Customised/UI/Minimize.tsx | 6 +- .../lib/components/Icons/FacilityIcon.tsx | 382 +- .../lib/components/Icons/IconByCSSelect.tsx | 118 +- .../lib/components/Icons/IconByIconName.tsx | 50 +- .../Icons/IllustrationByIconName.ts | 36 +- .../components/Icons/Illustrations/Bed.tsx | 4 +- .../Icons/Illustrations/BedBunk.tsx | 4 +- .../Icons/Illustrations/BedBunkExtra.tsx | 4 +- .../Icons/Illustrations/BedGeneric.tsx | 4 +- .../Icons/Illustrations/BedKing.tsx | 4 +- .../Icons/Illustrations/BedPullOut.tsx | 4 +- .../Icons/Illustrations/BedPullOutExtra.tsx | 4 +- .../Icons/Illustrations/BedQueen.tsx | 4 +- .../Icons/Illustrations/BedSingle.tsx | 4 +- .../Icons/Illustrations/BedSofa.tsx | 4 +- .../Icons/Illustrations/BedSofaExtra.tsx | 4 +- .../Icons/Illustrations/BedTwin.tsx | 4 +- .../Icons/Illustrations/BedWallExtra.tsx | 4 +- .../Icons/Illustrations/BreakfastBuffet.tsx | 4 +- .../components/Icons/Illustrations/Coin.tsx | 4 +- .../Illustrations/CroissantCoffeeEgg.tsx | 4 +- .../Icons/Illustrations/CutleryOne.tsx | 4 +- .../Icons/Illustrations/CutleryTwo.tsx | 4 +- .../Icons/Illustrations/GiftOpen.tsx | 4 +- .../Icons/Illustrations/Granola.tsx | 2 +- .../Icons/Illustrations/HandGift.tsx | 2 +- .../Icons/Illustrations/HandKey.tsx | 4 +- .../Icons/Illustrations/HotelNight.tsx | 4 +- .../components/Icons/Illustrations/Kids.tsx | 4 +- .../Icons/Illustrations/KidsMocktail.tsx | 4 +- .../Icons/Illustrations/MagicWand.tsx | 4 +- .../Icons/Illustrations/MoneyHand.tsx | 4 +- .../Icons/Illustrations/MoneyHandEllipsis.tsx | 4 +- .../Icons/Illustrations/NoBreakfastBuffet.tsx | 4 +- .../components/Icons/Illustrations/Spa.tsx | 2 +- .../Icons/Illustrations/Surprise.tsx | 4 +- .../components/Icons/Illustrations/Trophy.tsx | 4 +- .../Icons/Illustrations/Voucher.tsx | 4 +- .../components/Icons/Logos/DowntownCamper.tsx | 8 +- .../components/Icons/Logos/GrandHotelOslo.tsx | 8 +- .../lib/components/Icons/Logos/Haymarket.tsx | 8 +- .../lib/components/Icons/Logos/HotelNorge.tsx | 8 +- .../lib/components/Icons/Logos/Marski.tsx | 8 +- .../components/Icons/Logos/ScandicGoLogo.tsx | 8 +- .../components/Icons/Logos/ScandicLogo.tsx | 12 +- .../lib/components/Icons/Logos/TheDock.tsx | 8 +- .../lib/components/Icons/Logos/index.tsx | 34 +- .../Icons/MaterialIcon/MaterialIcon.tsx | 16 +- .../MaterialSymbol/MaterialSymbol.tsx | 22 +- .../MaterialIcon/MaterialSymbol/consts.ts | 6920 ++++---- .../MaterialIcon/MaterialSymbol/index.tsx | 2 +- .../MaterialIcon/MaterialSymbol/types.ts | 4 +- .../components/Icons/MaterialIcon/index.tsx | 2 +- .../bathroom-cabinet-2.tsx | 4 +- .../Amenities_Facilities/conference-room.tsx | 4 +- .../Nucleo/Amenities_Facilities/door-2.tsx | 4 +- .../Amenities_Facilities/hairdresser-1.tsx | 4 +- .../Amenities_Facilities/record-player-3.tsx | 4 +- .../Nucleo/Amenities_Facilities/toilet-2.tsx | 4 +- .../Amenities_Facilities/user-police-2.tsx | 4 +- .../Icons/Nucleo/Benefits/FilledDiscount.tsx | 4 +- .../Icons/Nucleo/Benefits/bouquet.tsx | 4 +- .../Icons/Nucleo/Benefits/discount-2-2.tsx | 4 +- .../Icons/Nucleo/Experiences/bowling-pins.tsx | 4 +- .../Icons/Nucleo/Experiences/palm-tree-2.tsx | 4 +- .../components/Icons/Nucleo/Food/chips-3.tsx | 4 +- .../Icons/Nucleo/Food/popcorn-2.tsx | 4 +- .../components/Icons/Nucleo/colorVariants.ts | 30 +- .../lib/components/Icons/Nucleo/utils.ts | 12 +- .../lib/components/Icons/icon.ts | 12 +- .../lib/components/Icons/iconName.ts | 366 +- .../lib/components/Icons/index.tsx | 2 +- .../lib/components/Icons/utils.ts | 8 +- .../lib/components/Icons/variants.ts | 34 +- .../lib/components/Image/imageLoader.test.ts | 42 +- .../lib/components/Image/imageLoader.ts | 16 +- .../lib/components/Image/index.tsx | 16 +- .../lib/components/ImageContainer/index.tsx | 6 +- .../lib/components/ImageFallback/index.tsx | 10 +- .../lib/components/ImageGallery/index.tsx | 32 +- .../components/InfoBox/InfoBox.stories.tsx | 34 +- .../lib/components/InfoBox/InfoBox.tsx | 22 +- .../components/InfoCard/InfoCard.stories.tsx | 102 +- .../lib/components/InfoCard/InfoCard.tsx | 20 +- .../lib/components/InfoCard/index.tsx | 4 +- .../components/InfoCard/infoCard.module.css | 2 +- .../lib/components/InfoCard/types.ts | 9 +- .../lib/components/InfoCard/utils.ts | 84 +- .../lib/components/InfoCard/variants.ts | 42 +- .../lib/components/Input/Input.stories.tsx | 158 +- .../lib/components/Input/Input.test.tsx | 150 +- .../lib/components/Input/Input.tsx | 28 +- .../lib/components/Input/index.tsx | 2 +- .../lib/components/Input/input.module.css | 20 +- .../lib/components/Input/types.ts | 6 +- .../lib/components/Input/utils.test.ts | 56 +- .../lib/components/Input/utils.ts | 32 +- .../InputLabel/InputLabel.stories.tsx | 16 +- .../lib/components/InputLabel/InputLabel.tsx | 6 +- .../lib/components/InputLabel/index.tsx | 2 +- .../InputLabel/inputLabel.module.css | 6 +- .../lib/components/InputLabel/types.ts | 4 +- .../lib/components/InputLabel/variants.ts | 6 +- .../JsonToHtml/JsonToHtml.stories.tsx | 180 +- .../lib/components/JsonToHtml/JsonToHtml.tsx | 18 +- .../JsonToHtml/jsontohtml.module.css | 6 +- .../components/JsonToHtml/renderOptions.tsx | 106 +- .../components/JsonToHtml/types/rte/attrs.ts | 30 +- .../JsonToHtml/types/rte/constants.ts | 8 +- .../components/JsonToHtml/types/rte/enums.ts | 114 +- .../components/JsonToHtml/types/rte/node.ts | 30 +- .../components/JsonToHtml/types/rte/option.ts | 2 +- .../lib/components/JsonToHtml/utils.tsx | 26 +- .../components/Lightbox/FullView/index.tsx | 30 +- .../lib/components/Lightbox/Gallery/index.tsx | 62 +- .../lib/components/Lightbox/index.tsx | 20 +- .../components/LinkList/LinkList.stories.tsx | 26 +- .../LinkListItem/IllustrationIcon/index.tsx | 12 +- .../LinkListItem/LinkListItem.stories.tsx | 20 +- .../LinkList/LinkListItem/index.tsx | 14 +- .../lib/components/LinkList/index.tsx | 4 +- .../components/Loading/Loading.stories.tsx | 18 +- .../lib/components/Loading/Loading.tsx | 8 +- .../lib/components/Loading/index.tsx | 2 +- .../lib/components/Loading/variants.ts | 6 +- .../LoadingSpinner/LoadingSpinner.stories.tsx | 8 +- .../lib/components/LoadingSpinner/index.tsx | 4 +- .../LoadingSpinner/loading.module.css | 2 +- .../lib/components/LocalCallCharges/index.tsx | 12 +- .../lib/components/LoginButton/index.tsx | 17 +- .../lib/components/Map/InfoWindow/index.tsx | 13 +- .../Map/InfoWindow/infoWindow.module.css | 2 +- .../HotelListingMapContent/HotelPin/index.tsx | 20 +- .../HotelListingMapContent/index.tsx | 24 +- .../InteractiveMap/InteractiveMap.stories.tsx | 20 +- .../InteractiveMap/PoiMapMarkers/index.tsx | 24 +- .../components/Map/InteractiveMap/index.tsx | 36 +- .../InteractiveMap/interactiveMap.module.css | 2 +- .../Map/InteractiveMap/storybookData.ts | 264 +- .../Map/Markers/HotelMarker/index.tsx | 4 +- .../Map/Markers/HotelMarker/variants.ts | 6 +- .../Map/Markers/HotelMarkerByType.stories.tsx | 86 +- .../Map/Markers/HotelMarkerByType.tsx | 53 +- .../Map/Markers/PoiMarker/index.tsx | 16 +- .../Map/Markers/PoiMarker/variants.ts | 22 +- .../lib/components/Map/Markers/utils.ts | 32 +- .../design-system/lib/components/Map/types.ts | 18 +- .../MessageBanner/MessageBanner.stories.tsx | 50 +- .../lib/components/MessageBanner/index.tsx | 32 +- .../Modal/ModalContentWithActions/index.tsx | 18 +- .../lib/components/Modal/index.tsx | 38 +- .../lib/components/Modal/modal.ts | 10 +- .../lib/components/Modal/motionVariants.ts | 8 +- .../lib/components/Modal/variants.ts | 4 +- .../lib/components/OldDSButton/index.tsx | 22 +- .../lib/components/OldDSButton/variants.ts | 108 +- .../lib/components/OldDSLink/index.tsx | 28 +- .../lib/components/OldDSLink/link.ts | 7 +- .../lib/components/OldDSLink/variants.ts | 16 +- .../AlternateOpeningHours/index.tsx | 18 +- .../lib/components/OpeningHours/index.tsx | 16 +- .../OpeningHours/openingHours.test.ts | 248 +- .../lib/components/OpeningHours/utils.ts | 142 +- .../ParkingInformation/ParkingList/index.tsx | 44 +- .../ParkingList/parkingList.module.css | 4 +- .../ParkingPrices/index.tsx | 37 +- .../ParkingInformation/ParkingPrices/utils.ts | 20 +- .../components/ParkingInformation/index.tsx | 38 +- .../parkingInformationTypes.ts | 8 +- .../PasswordInput/NewPasswordValidation.tsx | 56 +- .../PasswordInput/PasswordInput.stories.tsx | 108 +- .../PasswordInput/PasswordInput.test.tsx | 70 +- .../PasswordInput/PasswordInput.tsx | 58 +- .../lib/components/PasswordInput/index.tsx | 2 +- .../Payment/Icons/AmericanExpressIcon.tsx | 4 +- .../components/Payment/Icons/ApplePayIcon.tsx | 4 +- .../Payment/Icons/ChinaUnionPayIcon.tsx | 2 +- .../components/Payment/Icons/DanKortIcon.tsx | 2 +- .../Payment/Icons/DinersClubIcon.tsx | 2 +- .../components/Payment/Icons/DiscoverIcon.tsx | 2 +- .../Payment/Icons/GenericCardIcon.tsx | 2 +- .../Payment/Icons/GooglePayIcon.tsx | 2 +- .../lib/components/Payment/Icons/IconProps.ts | 2 +- .../lib/components/Payment/Icons/JcbIcon.tsx | 2 +- .../components/Payment/Icons/KlarnaIcon.tsx | 2 +- .../components/Payment/Icons/MaestroIcon.tsx | 2 +- .../Payment/Icons/MasterCardIcon.tsx | 2 +- .../Payment/Icons/MobilePayIcon.tsx | 8 +- .../components/Payment/Icons/PayPalIcon.tsx | 2 +- .../components/Payment/Icons/SwishIcon.tsx | 2 +- .../components/Payment/Icons/VippsIcon.tsx | 2 +- .../lib/components/Payment/Icons/VisaIcon.tsx | 2 +- .../Payment/PaymentMethodIcon.stories.tsx | 42 +- .../components/Payment/PaymentMethodIcon.tsx | 38 +- .../components/Progress/Progress.stories.tsx | 18 +- .../lib/components/Progress/index.tsx | 10 +- .../lib/components/Progress/types.ts | 2 +- .../lib/components/Progress/variants.ts | 4 +- .../lib/components/Radio/Radio.tsx | 12 +- .../lib/components/Radio/index.tsx | 2 +- .../lib/components/Radio/variants.ts | 8 +- .../RateCard/Campaign/Campaign.stories.tsx | 134 +- .../components/RateCard/Campaign/index.tsx | 30 +- .../components/RateCard/Code/Code.stories.tsx | 168 +- .../lib/components/RateCard/Code/index.tsx | 32 +- .../lib/components/RateCard/Modal/index.tsx | 26 +- .../lib/components/RateCard/Modal/modal.ts | 10 +- .../RateCard/Modal/motionVariants.ts | 12 +- .../NoRateAvailable.stories.tsx | 52 +- .../RateCard/NoRateAvailable/index.tsx | 10 +- .../RateCard/Points/Points.stories.tsx | 138 +- .../lib/components/RateCard/Points/index.tsx | 28 +- .../RateCard/Regular/Regular.stories.tsx | 106 +- .../lib/components/RateCard/Regular/index.tsx | 26 +- .../lib/components/RateCard/variants.ts | 14 +- .../lib/components/Select/Select.stories.tsx | 40 +- .../lib/components/Select/Select.tsx | 22 +- .../lib/components/Select/SelectFilter.tsx | 24 +- .../lib/components/Select/SelectItem.tsx | 14 +- .../lib/components/Select/index.tsx | 6 +- .../lib/components/Select/select.module.css | 4 +- .../lib/components/Select/types.ts | 22 +- .../components/SidePeek/KeepBodyVisible.tsx | 4 +- .../components/SidePeek/SelfControlled.tsx | 26 +- .../SidePeekContext/SidePeekProvider.tsx | 8 +- .../SidePeek/SidePeekContext/index.tsx | 4 +- .../lib/components/SidePeek/index.tsx | 24 +- .../lib/components/SkeletonShimmer/index.tsx | 20 +- .../SkeletonShimmer/skeleton.module.css | 2 +- .../lib/components/StaticMap/index.tsx | 10 +- .../lib/components/StaticMap/utils.ts | 12 +- .../lib/components/Stepper/index.tsx | 8 +- .../lib/components/Subtitle/index.tsx | 17 +- .../lib/components/Subtitle/variants.ts | 12 +- .../lib/components/Switch/index.tsx | 12 +- .../lib/components/Switch/switch.module.css | 2 +- .../components/Table/ScrollWrapper/index.tsx | 10 +- .../ScrollWrapper/scrollWrapper.module.css | 2 +- .../lib/components/Table/TBody.tsx | 2 +- .../design-system/lib/components/Table/TD.tsx | 2 +- .../design-system/lib/components/Table/TH.tsx | 6 +- .../lib/components/Table/THead.tsx | 2 +- .../design-system/lib/components/Table/TR.tsx | 2 +- .../lib/components/Table/index.tsx | 18 +- .../lib/components/Table/table.ts | 12 +- .../lib/components/Table/variants.ts | 8 +- .../components/TextLink/TextLink.stories.tsx | 62 +- .../lib/components/TextLink/TextLink.tsx | 22 +- .../lib/components/TextLink/index.tsx | 2 +- .../lib/components/TextLink/types.ts | 11 +- .../lib/components/TextLink/variants.ts | 18 +- .../TextLinkButton/TextLinkButton.tsx | 16 +- .../lib/components/TextLinkButton/index.tsx | 2 +- .../TextLinkButton/textLinkStyles.ts | 8 +- .../lib/components/Title/index.tsx | 17 +- .../lib/components/Title/variants.ts | 12 +- .../lib/components/Toasts/Toast.stories.tsx | 54 +- .../lib/components/Toasts/Toast.tsx | 44 +- .../Toasts/ToastHandler.stories.tsx | 44 +- .../lib/components/Toasts/ToastHandler.tsx | 2 +- .../lib/components/Toasts/index.tsx | 4 +- .../lib/components/Toasts/variants.ts | 4 +- .../lib/components/Tooltip/index.tsx | 16 +- .../lib/components/Tooltip/tooltip.module.css | 6 +- .../lib/components/Tooltip/variants.ts | 4 +- .../TripdAdvisorChip.stories.tsx | 34 +- .../lib/components/TripAdvisorChip/index.tsx | 14 +- .../components/Typography/Typography.docs.mdx | 4 +- .../Typography/Typography.stories.tsx | 104 +- .../lib/components/Typography/Typography.tsx | 8 +- .../lib/components/Typography/index.tsx | 4 +- .../lib/components/Typography/types.ts | 7 +- .../lib/components/Typography/variants.ts | 58 +- .../Button/VideoPlayerButton.stories.tsx | 52 +- .../components/VideoPlayer/Button/index.tsx | 20 +- .../components/VideoPlayer/Button/types.ts | 20 +- .../components/VideoPlayer/Button/variants.ts | 12 +- .../Button/videoPlayerButton.module.css | 2 +- .../VideoPlayer/VideoPlayer.stories.tsx | 80 +- .../VideoWithCard/VideoWithCard.stories.tsx | 100 +- .../VideoPlayer/VideoWithCard/index.tsx | 20 +- .../VideoPlayer/VideoWithCard/variants.ts | 16 +- .../VideoWithCard/videoWithCard.module.css | 4 +- .../lib/components/VideoPlayer/index.tsx | 64 +- .../lib/components/VideoPlayer/types.ts | 8 +- .../VideoPlayer/useVideoDimensions.ts | 2 +- .../lib/components/VideoPlayer/utils.ts | 14 +- .../lib/components/VideoPlayer/variants.ts | 6 +- .../VideoPlayer/videoPlayer.module.css | 2 +- .../lib/design-system-new-deprecated.css | 106 +- packages/design-system/lib/fonts.css | 142 +- packages/design-system/lib/styles/base.js | 256 +- .../lib/styles/downtown-camper.css | 6 +- .../lib/styles/downtown-camper.js | 614 +- .../design-system/lib/styles/grand-hotel.css | 6 +- .../design-system/lib/styles/grand-hotel.js | 576 +- .../design-system/lib/styles/haymarket.css | 6 +- .../design-system/lib/styles/haymarket.js | 614 +- .../design-system/lib/styles/hotel-norge.css | 6 +- .../design-system/lib/styles/hotel-norge.js | 588 +- packages/design-system/lib/styles/marski.css | 6 +- packages/design-system/lib/styles/marski.js | 636 +- .../design-system/lib/styles/partner-sas.js | 348 +- .../design-system/lib/styles/scandic-go.css | 6 +- .../design-system/lib/styles/scandic-go.js | 648 +- packages/design-system/lib/styles/scandic.css | 6 +- packages/design-system/lib/styles/scandic.js | 702 +- .../design-system/lib/styles/the-dock.css | 6 +- packages/design-system/lib/styles/the-dock.js | 570 +- packages/design-system/lib/tokens.ts | 2 +- packages/design-system/lib/tokens/index.ts | 13062 ++++++++-------- packages/design-system/package.json | 2 +- packages/design-system/scripts/copyFiles.ts | 24 +- packages/design-system/vite.config.ts | 80 +- packages/design-system/vitest.config.ts | 36 +- packages/trpc/prettier.config.js | 14 - 500 files changed, 18367 insertions(+), 18419 deletions(-) rename packages/design-system/.prettierrc => .prettierrc (81%) delete mode 100644 apps/partner-sas/prettier.config.js delete mode 100644 apps/scandic-web/prettier.config.js delete mode 100644 packages/booking-flow/prettier.config.js delete mode 100644 packages/trpc/prettier.config.js diff --git a/packages/design-system/.prettierrc b/.prettierrc similarity index 81% rename from packages/design-system/.prettierrc rename to .prettierrc index b2725437b..eeb95838c 100644 --- a/packages/design-system/.prettierrc +++ b/.prettierrc @@ -1,7 +1,7 @@ { "semi": false, - "singleQuote": true, "trailingComma": "es5", + "singleQuote": false, "printWidth": 80, "tabWidth": 2, "endOfLine": "lf" diff --git a/apps/partner-sas/prettier.config.js b/apps/partner-sas/prettier.config.js deleted file mode 100644 index 8d41cc176..000000000 --- a/apps/partner-sas/prettier.config.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @see https://prettier.io/docs/configuration - * @type {import("prettier").Config} - */ -const config = { - semi: false, - trailingComma: "es5", - singleQuote: false, - printWidth: 80, - tabWidth: 2, - endOfLine: "lf", -} - -export default config diff --git a/apps/scandic-redirect/package.json b/apps/scandic-redirect/package.json index f17bef718..df5f65064 100644 --- a/apps/scandic-redirect/package.json +++ b/apps/scandic-redirect/package.json @@ -16,13 +16,5 @@ "convert-csv-to-json": "^3.4.0", "jiti": "^2.6.1", "vitest": "^4.0.0" - }, - "prettier": { - "semi": false, - "trailingComma": "es5", - "singleQuote": false, - "printWidth": 80, - "tabWidth": 2, - "endOfLine": "lf" } } diff --git a/apps/scandic-web/prettier.config.js b/apps/scandic-web/prettier.config.js deleted file mode 100644 index 8d41cc176..000000000 --- a/apps/scandic-web/prettier.config.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @see https://prettier.io/docs/configuration - * @type {import("prettier").Config} - */ -const config = { - semi: false, - trailingComma: "es5", - singleQuote: false, - printWidth: 80, - tabWidth: 2, - endOfLine: "lf", -} - -export default config diff --git a/packages/booking-flow/prettier.config.js b/packages/booking-flow/prettier.config.js deleted file mode 100644 index 8d41cc176..000000000 --- a/packages/booking-flow/prettier.config.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @see https://prettier.io/docs/configuration - * @type {import("prettier").Config} - */ -const config = { - semi: false, - trailingComma: "es5", - singleQuote: false, - printWidth: 80, - tabWidth: 2, - endOfLine: "lf", -} - -export default config diff --git a/packages/design-system/.storybook/content/Colors.tsx b/packages/design-system/.storybook/content/Colors.tsx index 4e47f6b33..8360a41a5 100644 --- a/packages/design-system/.storybook/content/Colors.tsx +++ b/packages/design-system/.storybook/content/Colors.tsx @@ -1,10 +1,10 @@ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import { useState } from 'react' -import copy from 'copy-to-clipboard' +import { useState } from "react" +import copy from "copy-to-clipboard" -import { kebabify } from '../../generate/utils' +import { kebabify } from "../../generate/utils" -export type ThemeValue = Record<'resolved' | 'alias', string | number> +export type ThemeValue = Record<"resolved" | "alias", string | number> export type Theme = Record @@ -20,7 +20,7 @@ export type ColorsProps = { defaultThemeName?: string } -import styles from './colors.module.css' +import styles from "./colors.module.css" function getContrastColor(bgColor: string) { const r = parseInt(bgColor.substring(1, 3), 16) @@ -34,12 +34,12 @@ function getContrastColor(bgColor: string) { const luminance = (0.299 * r + 0.587 * g + 0.114 * b) / 255 if (luminance > 0.5) { - return '#000' + return "#000" } else { if (a < 255 / 2) { - return '#000' + return "#000" } - return '#fff' + return "#fff" } } @@ -62,7 +62,7 @@ export function Colors({ defaultThemeName, }: ColorsProps) { const [selectedThemeName, setSelectedThemeName] = useState( - defaultThemeName || themes?.[0]?.name || '' + defaultThemeName || themes?.[0]?.name || "" ) const [, setCopiedKey] = useState(null) @@ -78,8 +78,8 @@ export function Colors({ const grouping: Record = {} for (const [k, v] of Object.entries(currentTheme)) { - if (typeof v.resolved === 'string' && v.resolved.startsWith('#')) { - const key = k.replace(/\/[^/]+$/, '') + if (typeof v.resolved === "string" && v.resolved.startsWith("#")) { + const key = k.replace(/\/[^/]+$/, "") if (!grouping[key]) { grouping[key] = {} } @@ -120,8 +120,8 @@ export function Colors({ onChange={(e) => { const el = document.getElementById(e.target.value) el?.scrollIntoView({ - behavior: 'smooth', - block: 'start', + behavior: "smooth", + block: "start", }) }} > diff --git a/packages/design-system/.storybook/content/CornerRadius.mdx b/packages/design-system/.storybook/content/CornerRadius.mdx index ac8022a89..5686f15ae 100644 --- a/packages/design-system/.storybook/content/CornerRadius.mdx +++ b/packages/design-system/.storybook/content/CornerRadius.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { CornerRadius } from './CornerRadius' +import { CornerRadius } from "./CornerRadius" -import { base } from '../../lib/tokens' +import { base } from "../../lib/tokens" diff --git a/packages/design-system/.storybook/content/CornerRadius.tsx b/packages/design-system/.storybook/content/CornerRadius.tsx index 2bffaa1b9..3afbbfc10 100644 --- a/packages/design-system/.storybook/content/CornerRadius.tsx +++ b/packages/design-system/.storybook/content/CornerRadius.tsx @@ -1,9 +1,9 @@ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import copy from 'copy-to-clipboard' +import copy from "copy-to-clipboard" -import { kebabify } from '../../generate/utils' +import { kebabify } from "../../generate/utils" -import tableStyles from './tokens.module.css' +import tableStyles from "./tokens.module.css" type ThemeValue = { resolved: string | number @@ -24,15 +24,15 @@ export function CornerRadius({ theme }: CornerRadiusProps) { // Filter corner radius tokens const cornerRadiusTokens: Theme = {} for (const [k, v] of Object.entries(theme)) { - if (k.startsWith('Corner radius/')) { + if (k.startsWith("Corner radius/")) { cornerRadiusTokens[k] = v as ThemeValue } } // Sort by value const sortedTokens = Object.entries(cornerRadiusTokens).sort((a, b) => { - const aValue = typeof a[1].resolved === 'number' ? a[1].resolved : 0 - const bValue = typeof b[1].resolved === 'number' ? b[1].resolved : 0 + const aValue = typeof a[1].resolved === "number" ? a[1].resolved : 0 + const bValue = typeof b[1].resolved === "number" ? b[1].resolved : 0 return aValue - bValue }) @@ -51,7 +51,7 @@ export function CornerRadius({ theme }: CornerRadiusProps) { {sortedTokens.map(([k, v]) => { - const value = typeof v.resolved === 'number' ? v.resolved : 0 + const value = typeof v.resolved === "number" ? v.resolved : 0 const valuePx = `${value}px` return ( diff --git a/packages/design-system/.storybook/content/Shadow.mdx b/packages/design-system/.storybook/content/Shadow.mdx index 5b5379d33..3c701cda4 100644 --- a/packages/design-system/.storybook/content/Shadow.mdx +++ b/packages/design-system/.storybook/content/Shadow.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Shadow } from './Shadow' +import { Shadow } from "./Shadow" -import { base } from '../../lib/tokens' +import { base } from "../../lib/tokens" diff --git a/packages/design-system/.storybook/content/Shadow.tsx b/packages/design-system/.storybook/content/Shadow.tsx index 032e19cc4..59b325068 100644 --- a/packages/design-system/.storybook/content/Shadow.tsx +++ b/packages/design-system/.storybook/content/Shadow.tsx @@ -1,9 +1,9 @@ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import copy from 'copy-to-clipboard' +import copy from "copy-to-clipboard" -import { kebabify } from '../../generate/utils' +import { kebabify } from "../../generate/utils" -import tableStyles from './tokens.module.css' +import tableStyles from "./tokens.module.css" type ThemeValue = { resolved: string | number @@ -24,15 +24,15 @@ export function Shadow({ theme }: ShadowProps) { // Filter shadow tokens const shadowTokens: Theme = {} for (const [k, v] of Object.entries(theme)) { - if (k.startsWith('BoxShadow-')) { + if (k.startsWith("BoxShadow-")) { shadowTokens[k] = v as ThemeValue } } // Sort by level const sortedTokens = Object.entries(shadowTokens).sort((a, b) => { - const aLevel = parseInt(a[0].match(/\d+/)?.[0] || '0') - const bLevel = parseInt(b[0].match(/\d+/)?.[0] || '0') + const aLevel = parseInt(a[0].match(/\d+/)?.[0] || "0") + const bLevel = parseInt(b[0].match(/\d+/)?.[0] || "0") return aLevel - bLevel }) @@ -53,8 +53,8 @@ export function Shadow({ theme }: ShadowProps) { {sortedTokens.map(([k, v]) => { const shadowValue = - typeof v.resolved === 'string' ? v.resolved : '' - const level = k.match(/\d+/)?.[0] || '0' + typeof v.resolved === "string" ? v.resolved : "" + const level = k.match(/\d+/)?.[0] || "0" return ( @@ -80,8 +80,8 @@ export function Shadow({ theme }: ShadowProps) { }} title="Click to copy" style={{ - fontSize: '0.75rem', - wordBreak: 'break-all', + fontSize: "0.75rem", + wordBreak: "break-all", }} > {shadowValue} diff --git a/packages/design-system/.storybook/content/Spacing.mdx b/packages/design-system/.storybook/content/Spacing.mdx index e050de228..d07b83378 100644 --- a/packages/design-system/.storybook/content/Spacing.mdx +++ b/packages/design-system/.storybook/content/Spacing.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Spacing } from './Spacing' +import { Spacing } from "./Spacing" -import { base } from '../../lib/tokens' +import { base } from "../../lib/tokens" diff --git a/packages/design-system/.storybook/content/Spacing.tsx b/packages/design-system/.storybook/content/Spacing.tsx index 4da28dcd3..1b590f070 100644 --- a/packages/design-system/.storybook/content/Spacing.tsx +++ b/packages/design-system/.storybook/content/Spacing.tsx @@ -1,9 +1,9 @@ /* eslint-disable formatjs/no-literal-string-in-jsx */ -import copy from 'copy-to-clipboard' +import copy from "copy-to-clipboard" -import { kebabify } from '../../generate/utils' +import { kebabify } from "../../generate/utils" -import tableStyles from './tokens.module.css' +import tableStyles from "./tokens.module.css" type ThemeValue = { resolved: string | number @@ -24,15 +24,15 @@ function copyToClipboard(text: string) { function getBaseUnitMultiplier(tokenName: string): string { // Token names are like "Space/x0", "Space/x025", "Space/x05", "Space/x1", "Space/x15", etc. const match = tokenName.match(/Space\/x(\d+)/) - if (!match) return '0x' + if (!match) return "0x" const num = match[1] // Handle special cases - if (num === '0') return '0x' - if (num === '025') return '0.25x' - if (num === '05') return '0.5x' - if (num === '15') return '1.5x' + if (num === "0") return "0x" + if (num === "025") return "0.25x" + if (num === "05") return "0.5x" + if (num === "15") return "1.5x" // For other numbers, they're already the multiplier (x1 = 1x, x2 = 2x, etc.) return `${num}x` @@ -42,15 +42,15 @@ export function Spacing({ theme }: SpacingProps) { // Filter spacing tokens const spacingTokens: Theme = {} for (const [k, v] of Object.entries(theme)) { - if (k.startsWith('Space/')) { + if (k.startsWith("Space/")) { spacingTokens[k] = v as ThemeValue } } // Sort by value const sortedTokens = Object.entries(spacingTokens).sort((a, b) => { - const aValue = typeof a[1].resolved === 'number' ? a[1].resolved : 0 - const bValue = typeof b[1].resolved === 'number' ? b[1].resolved : 0 + const aValue = typeof a[1].resolved === "number" ? a[1].resolved : 0 + const bValue = typeof b[1].resolved === "number" ? b[1].resolved : 0 return aValue - bValue }) @@ -72,7 +72,7 @@ export function Spacing({ theme }: SpacingProps) { {sortedTokens.map(([k, v]) => { - const value = typeof v.resolved === 'number' ? v.resolved : 0 + const value = typeof v.resolved === "number" ? v.resolved : 0 const valuePx = `${value}px` const multiplier = getBaseUnitMultiplier(k) @@ -112,7 +112,7 @@ export function Spacing({ theme }: SpacingProps) { className={tableStyles.visualBar} style={{ width: `${value}px`, - minWidth: value > 0 ? '2px' : '0', + minWidth: value > 0 ? "2px" : "0", }} /> diff --git a/packages/design-system/.storybook/content/base.mdx b/packages/design-system/.storybook/content/base.mdx index 072a97698..f36804ed0 100644 --- a/packages/design-system/.storybook/content/base.mdx +++ b/packages/design-system/.storybook/content/base.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from './Colors' +import { Colors } from "./Colors" -import { base } from '../../lib/tokens' +import { base } from "../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors.module.css b/packages/design-system/.storybook/content/colors.module.css index e64efd621..7167d5b7f 100644 --- a/packages/design-system/.storybook/content/colors.module.css +++ b/packages/design-system/.storybook/content/colors.module.css @@ -170,7 +170,7 @@ } .colorValue { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; font-size: 0.875rem; font-weight: 600; padding: 0.5rem 1rem; @@ -203,7 +203,7 @@ } .tokenCode { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; font-size: 12px; background: #f9fafb; padding: 0.375rem 0.625rem; diff --git a/packages/design-system/.storybook/content/colors/downtownCamper.mdx b/packages/design-system/.storybook/content/colors/downtownCamper.mdx index 2bbdbdbcc..4cf329280 100644 --- a/packages/design-system/.storybook/content/colors/downtownCamper.mdx +++ b/packages/design-system/.storybook/content/colors/downtownCamper.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { downtownCamper } from '../../../lib/tokens' +import { downtownCamper } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/grandHotel.mdx b/packages/design-system/.storybook/content/colors/grandHotel.mdx index 63f47d6c3..591a32ffb 100644 --- a/packages/design-system/.storybook/content/colors/grandHotel.mdx +++ b/packages/design-system/.storybook/content/colors/grandHotel.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { grandHotel } from '../../../lib/tokens' +import { grandHotel } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/haymarket.mdx b/packages/design-system/.storybook/content/colors/haymarket.mdx index dd5d7456e..098e38e28 100644 --- a/packages/design-system/.storybook/content/colors/haymarket.mdx +++ b/packages/design-system/.storybook/content/colors/haymarket.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { haymarket } from '../../../lib/tokens' +import { haymarket } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/hotelNorge.mdx b/packages/design-system/.storybook/content/colors/hotelNorge.mdx index ef2d24aa5..b5236063c 100644 --- a/packages/design-system/.storybook/content/colors/hotelNorge.mdx +++ b/packages/design-system/.storybook/content/colors/hotelNorge.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { hotelNorge } from '../../../lib/tokens' +import { hotelNorge } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/index.mdx b/packages/design-system/.storybook/content/colors/index.mdx index 1213b5989..f70137d33 100644 --- a/packages/design-system/.storybook/content/colors/index.mdx +++ b/packages/design-system/.storybook/content/colors/index.mdx @@ -1,6 +1,6 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" import { base, @@ -12,7 +12,7 @@ import { hotelNorge, grandHotel, theDock, -} from '../../../lib/tokens' +} from "../../../lib/tokens" @@ -22,19 +22,19 @@ Select a theme to view all available color tokens. Click on any value to copy it diff --git a/packages/design-system/.storybook/content/colors/marski.mdx b/packages/design-system/.storybook/content/colors/marski.mdx index f4f06623d..d0d673f6a 100644 --- a/packages/design-system/.storybook/content/colors/marski.mdx +++ b/packages/design-system/.storybook/content/colors/marski.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { marski } from '../../../lib/tokens' +import { marski } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/scandic.mdx b/packages/design-system/.storybook/content/colors/scandic.mdx index 8a769c7c2..3b246e168 100644 --- a/packages/design-system/.storybook/content/colors/scandic.mdx +++ b/packages/design-system/.storybook/content/colors/scandic.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { scandic } from '../../../lib/tokens' +import { scandic } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/scandicGo.mdx b/packages/design-system/.storybook/content/colors/scandicGo.mdx index 9c6a5980a..845b0ec64 100644 --- a/packages/design-system/.storybook/content/colors/scandicGo.mdx +++ b/packages/design-system/.storybook/content/colors/scandicGo.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { scandicGo } from '../../../lib/tokens' +import { scandicGo } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/colors/theDock.mdx b/packages/design-system/.storybook/content/colors/theDock.mdx index 95d63c346..af6ef65d2 100644 --- a/packages/design-system/.storybook/content/colors/theDock.mdx +++ b/packages/design-system/.storybook/content/colors/theDock.mdx @@ -1,8 +1,8 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" -import { Colors } from '../Colors' +import { Colors } from "../Colors" -import { theDock } from '../../../lib/tokens' +import { theDock } from "../../../lib/tokens" diff --git a/packages/design-system/.storybook/content/index.mdx b/packages/design-system/.storybook/content/index.mdx index 35c9ab31e..8ce94009d 100644 --- a/packages/design-system/.storybook/content/index.mdx +++ b/packages/design-system/.storybook/content/index.mdx @@ -1,4 +1,4 @@ -import { Meta } from '@storybook/addon-docs/blocks' +import { Meta } from "@storybook/addon-docs/blocks" diff --git a/packages/design-system/.storybook/content/tokens.module.css b/packages/design-system/.storybook/content/tokens.module.css index 2fa648e96..0dc717dc6 100644 --- a/packages/design-system/.storybook/content/tokens.module.css +++ b/packages/design-system/.storybook/content/tokens.module.css @@ -57,7 +57,7 @@ } .tokenName { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; background: #f3f4f6; padding: 0.25rem 0.5rem; border-radius: 4px; @@ -73,7 +73,7 @@ } .value { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; color: #6b7280; cursor: pointer; transition: color 0.15s ease; @@ -98,7 +98,7 @@ } .visualBarLabel { - font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace; + font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace; font-size: 0.75rem; color: #6b7280; min-width: 40px; diff --git a/packages/design-system/.storybook/decorators/FormDecorator.tsx b/packages/design-system/.storybook/decorators/FormDecorator.tsx index f39041026..cb6aa8007 100644 --- a/packages/design-system/.storybook/decorators/FormDecorator.tsx +++ b/packages/design-system/.storybook/decorators/FormDecorator.tsx @@ -1,4 +1,4 @@ -import { FormProvider, useForm } from 'react-hook-form' +import { FormProvider, useForm } from "react-hook-form" export const FormDecorator = (Story: React.FC) => { const formMethods = useForm() diff --git a/packages/design-system/.storybook/main.ts b/packages/design-system/.storybook/main.ts index 7333ae09b..c1a6c6a05 100644 --- a/packages/design-system/.storybook/main.ts +++ b/packages/design-system/.storybook/main.ts @@ -1,20 +1,20 @@ -import type { StorybookConfig } from '@storybook/nextjs-vite' -import { mergeConfig } from 'vite' +import type { StorybookConfig } from "@storybook/nextjs-vite" +import { mergeConfig } from "vite" const config: StorybookConfig = { - framework: '@storybook/nextjs-vite', + framework: "@storybook/nextjs-vite", stories: [ - '../lib/**/*.mdx', - '../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)', - './content/**/*.mdx', + "../lib/**/*.mdx", + "../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)", + "./content/**/*.mdx", ], addons: [ - '@storybook/addon-links', - '@storybook/addon-themes', - '@storybook/addon-vitest', - '@storybook/addon-docs', - '@storybook/addon-a11y', - 'storybook-react-intl', + "@storybook/addon-links", + "@storybook/addon-themes", + "@storybook/addon-vitest", + "@storybook/addon-docs", + "@storybook/addon-a11y", + "storybook-react-intl", ], core: { disableTelemetry: true, @@ -24,18 +24,18 @@ const config: StorybookConfig = { plugins: [ // Add babel plugin for react-intl transformation { - name: 'formatjs-transform', + name: "formatjs-transform", async transform(code, id) { - if (id.includes('node_modules')) return + if (id.includes("node_modules")) return if (!/\.(jsx?|tsx?)$/.test(id)) return - const babel = await import('@babel/core') + const babel = await import("@babel/core") const result = babel.transformSync(code, { plugins: [ [ - 'formatjs', + "formatjs", { - idInterpolationPattern: '[sha512:contenthash:base64:6]', + idInterpolationPattern: "[sha512:contenthash:base64:6]", ast: true, }, ], diff --git a/packages/design-system/.storybook/manager.ts b/packages/design-system/.storybook/manager.ts index dd32a8918..126375901 100644 --- a/packages/design-system/.storybook/manager.ts +++ b/packages/design-system/.storybook/manager.ts @@ -1,5 +1,5 @@ -import { addons } from 'storybook/manager-api' -import scandicTheme from './scandic-theme' +import { addons } from "storybook/manager-api" +import scandicTheme from "./scandic-theme" addons.setConfig({ theme: scandicTheme, diff --git a/packages/design-system/.storybook/preview.tsx b/packages/design-system/.storybook/preview.tsx index d1f636fda..bd975ecc3 100644 --- a/packages/design-system/.storybook/preview.tsx +++ b/packages/design-system/.storybook/preview.tsx @@ -1,25 +1,25 @@ -import { withThemeByClassName } from '@storybook/addon-themes' -import type { Preview, ReactRenderer } from '@storybook/nextjs-vite' -import { IntlProvider } from 'react-intl' -import { reactIntl } from './reactIntl' +import { withThemeByClassName } from "@storybook/addon-themes" +import type { Preview, ReactRenderer } from "@storybook/nextjs-vite" +import { IntlProvider } from "react-intl" +import { reactIntl } from "./reactIntl" -import '../lib/design-system-new-deprecated.css' -import '../lib/fonts.css' -import '../lib/normalize.css' -import '../lib/style.css' +import "../lib/design-system-new-deprecated.css" +import "../lib/fonts.css" +import "../lib/normalize.css" +import "../lib/style.css" export const themes = { themes: { - Scandic: 'scandic', - 'Scandic Go': 'scandic-go', - 'Downtown Camper': 'downtown-camper', - 'Grand Hotel': 'grand-hotel', - Haymarket: 'haymarket', - 'Hotel Norge': 'hotel-norge', - Marski: 'marski', - 'The Dock': 'the-dock', + Scandic: "scandic", + "Scandic Go": "scandic-go", + "Downtown Camper": "downtown-camper", + "Grand Hotel": "grand-hotel", + Haymarket: "haymarket", + "Hotel Norge": "hotel-norge", + Marski: "marski", + "The Dock": "the-dock", }, - defaultTheme: 'Scandic', + defaultTheme: "Scandic", } const preview: Preview = { @@ -36,14 +36,14 @@ const preview: Preview = { initialGlobals: { locale: reactIntl.defaultLocale, locales: { - en: { icon: '๐Ÿ‡ฌ๐Ÿ‡ง', title: 'English', right: 'EN' }, - sv: { icon: '๐Ÿ‡ธ๐Ÿ‡ช', title: 'Svenska', right: 'SV' }, - da: { icon: '๐Ÿ‡ฉ๐Ÿ‡ฐ', title: 'Dansk', right: 'DA' }, - no: { icon: '๐Ÿ‡ณ๐Ÿ‡ด', title: 'Norsk', right: 'NO' }, - fi: { icon: '๐Ÿ‡ซ๐Ÿ‡ฎ', title: 'Suomi', right: 'FI' }, - de: { icon: '๐Ÿ‡ฉ๐Ÿ‡ช', title: 'Deutsch', right: 'DE' }, + en: { icon: "๐Ÿ‡ฌ๐Ÿ‡ง", title: "English", right: "EN" }, + sv: { icon: "๐Ÿ‡ธ๐Ÿ‡ช", title: "Svenska", right: "SV" }, + da: { icon: "๐Ÿ‡ฉ๐Ÿ‡ฐ", title: "Dansk", right: "DA" }, + no: { icon: "๐Ÿ‡ณ๐Ÿ‡ด", title: "Norsk", right: "NO" }, + fi: { icon: "๐Ÿ‡ซ๐Ÿ‡ฎ", title: "Suomi", right: "FI" }, + de: { icon: "๐Ÿ‡ฉ๐Ÿ‡ช", title: "Deutsch", right: "DE" }, }, - backgrounds: { value: 'scandicSubtle' }, + backgrounds: { value: "scandicSubtle" }, }, parameters: { reactIntl, @@ -61,13 +61,13 @@ const preview: Preview = { options: { storySort: { order: [ - 'Introduction', - 'Tokens', - 'Core Components', - 'Product Components', - 'Patterns', - 'Compositions', - '*', + "Introduction", + "Tokens", + "Core Components", + "Product Components", + "Patterns", + "Compositions", + "*", ], }, }, @@ -75,12 +75,12 @@ const preview: Preview = { backgrounds: { options: { // ๐Ÿ‘‡ Scandic - scandicPrimary: { name: 'Scandic Primary', value: '#FAF6F2' }, - scandicSubtle: { name: 'Scandic Subtle', value: '#F2ECE6' }, - scandicPrimaryDark: { name: 'Scandic Primary Dark', value: '#4D001B' }, + scandicPrimary: { name: "Scandic Primary", value: "#FAF6F2" }, + scandicSubtle: { name: "Scandic Subtle", value: "#F2ECE6" }, + scandicPrimaryDark: { name: "Scandic Primary Dark", value: "#4D001B" }, // ๐Ÿ‘‡ Default values - storybookDark: { name: 'Storybook Dark', value: '#333' }, - storybookLight: { name: 'Storybook Light', value: '#F7F9F2' }, + storybookDark: { name: "Storybook Dark", value: "#333" }, + storybookLight: { name: "Storybook Light", value: "#F7F9F2" }, }, }, @@ -88,11 +88,11 @@ const preview: Preview = { // 'todo' - show a11y violations in the test UI only // 'error' - fail CI on a11y violations // 'off' - skip a11y checks entirely - test: 'todo', + test: "todo", }, }, - tags: ['autodocs'], + tags: ["autodocs"], } export default preview diff --git a/packages/design-system/.storybook/reactIntl.ts b/packages/design-system/.storybook/reactIntl.ts index c978007fd..5a756c567 100644 --- a/packages/design-system/.storybook/reactIntl.ts +++ b/packages/design-system/.storybook/reactIntl.ts @@ -1,12 +1,12 @@ /* eslint-disable import/no-relative-packages */ -import en from '../../../apps/scandic-web/i18n/dictionaries/en.json' -import sv from '../../../apps/scandic-web/i18n/dictionaries/sv.json' -import da from '../../../apps/scandic-web/i18n/dictionaries/da.json' -import fi from '../../../apps/scandic-web/i18n/dictionaries/fi.json' -import de from '../../../apps/scandic-web/i18n/dictionaries/de.json' -import no from '../../../apps/scandic-web/i18n/dictionaries/no.json' +import en from "../../../apps/scandic-web/i18n/dictionaries/en.json" +import sv from "../../../apps/scandic-web/i18n/dictionaries/sv.json" +import da from "../../../apps/scandic-web/i18n/dictionaries/da.json" +import fi from "../../../apps/scandic-web/i18n/dictionaries/fi.json" +import de from "../../../apps/scandic-web/i18n/dictionaries/de.json" +import no from "../../../apps/scandic-web/i18n/dictionaries/no.json" -const locales = ['en', 'sv', 'da', 'fi', 'no', 'de'] +const locales = ["en", "sv", "da", "fi", "no", "de"] const messages: Record<(typeof locales)[number], unknown> = { en, @@ -20,7 +20,7 @@ const messages: Record<(typeof locales)[number], unknown> = { const formats = {} // optional, if you have any formats export const reactIntl = { - defaultLocale: 'en', + defaultLocale: "en", locales, messages, formats, diff --git a/packages/design-system/.storybook/scandic-theme.ts b/packages/design-system/.storybook/scandic-theme.ts index 5985ecdb6..fdfe314f1 100644 --- a/packages/design-system/.storybook/scandic-theme.ts +++ b/packages/design-system/.storybook/scandic-theme.ts @@ -1,8 +1,8 @@ -import { create } from 'storybook/theming' +import { create } from "storybook/theming" export default create({ - base: 'dark', - brandTitle: 'Scandic Design System', - brandUrl: 'https://www.scandichotels.com/', - brandImage: '/img/scandic-logotype.png', + base: "dark", + brandTitle: "Scandic Design System", + brandUrl: "https://www.scandichotels.com/", + brandImage: "/img/scandic-logotype.png", }) diff --git a/packages/design-system/.storybook/vitest.setup.ts b/packages/design-system/.storybook/vitest.setup.ts index 8cf1f123a..7aadcb7b2 100644 --- a/packages/design-system/.storybook/vitest.setup.ts +++ b/packages/design-system/.storybook/vitest.setup.ts @@ -1,5 +1,5 @@ -import * as a11yAddonAnnotations from '@storybook/addon-a11y/preview' -import { setProjectAnnotations } from '@storybook/nextjs-vite' -import * as previewAnnotations from './preview' +import * as a11yAddonAnnotations from "@storybook/addon-a11y/preview" +import { setProjectAnnotations } from "@storybook/nextjs-vite" +import * as previewAnnotations from "./preview" setProjectAnnotations([a11yAddonAnnotations, previewAnnotations]) diff --git a/packages/design-system/eslint.config.mjs b/packages/design-system/eslint.config.mjs index 6bce928f3..d192a2038 100644 --- a/packages/design-system/eslint.config.mjs +++ b/packages/design-system/eslint.config.mjs @@ -1,15 +1,15 @@ -import { defineConfig, globalIgnores } from 'eslint/config' -import globals from 'globals' -import tsParser from '@typescript-eslint/parser' -import reactRefresh from 'eslint-plugin-react-refresh' -import react from 'eslint-plugin-react' -import { FlatCompat } from '@eslint/eslintrc' -import js from '@eslint/js' -import importPlugin from 'eslint-plugin-import' -import formatjs from 'eslint-plugin-formatjs' +import { defineConfig, globalIgnores } from "eslint/config" +import globals from "globals" +import tsParser from "@typescript-eslint/parser" +import reactRefresh from "eslint-plugin-react-refresh" +import react from "eslint-plugin-react" +import { FlatCompat } from "@eslint/eslintrc" +import js from "@eslint/js" +import importPlugin from "eslint-plugin-import" +import formatjs from "eslint-plugin-formatjs" -import { fileURLToPath } from 'node:url' -import path from 'node:path' +import { fileURLToPath } from "node:url" +import path from "node:path" const compat = new FlatCompat({ recommendedConfig: js.configs.recommended, @@ -27,72 +27,72 @@ export default defineConfig([ parser: tsParser, }, extends: compat.extends( - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:react-hooks/recommended', - 'plugin:storybook/recommended' + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:react-hooks/recommended", + "plugin:storybook/recommended" ), plugins: { - 'react-refresh': reactRefresh, + "react-refresh": reactRefresh, import: importPlugin, formatjs, react, }, settings: { // Ensure the plugin can resolve workspace packages and TS path aliases - 'import/resolver': { + "import/resolver": { typescript: { - project: [path.join(packageDir, 'tsconfig.json')], + project: [path.join(packageDir, "tsconfig.json")], alwaysTryTypes: true, }, node: { - extensions: ['.js', '.jsx', '.ts', '.tsx'], + extensions: [".js", ".jsx", ".ts", ".tsx"], }, }, }, rules: { - 'import/no-relative-packages': 'error', - 'import/no-extraneous-dependencies': [ - 'error', + "import/no-relative-packages": "error", + "import/no-extraneous-dependencies": [ + "error", { includeInternal: true, includeTypes: true, packageDir: [packageDir], }, ], - 'react-refresh/only-export-components': [ - 'warn', + "react-refresh/only-export-components": [ + "warn", { allowConstantExport: true, }, ], - 'react/jsx-curly-brace-presence': [ - 'error', + "react/jsx-curly-brace-presence": [ + "error", { - props: 'never', - children: 'never', - propElementValues: 'always', + props: "never", + children: "never", + propElementValues: "always", }, ], - 'formatjs/enforce-default-message': ['error', 'literal'], - 'formatjs/enforce-placeholders': ['error'], - 'formatjs/enforce-plural-rules': ['error'], - 'formatjs/no-literal-string-in-jsx': ['error'], - 'formatjs/no-multiple-whitespaces': ['error'], - 'formatjs/no-multiple-plurals': ['error'], - 'formatjs/no-invalid-icu': ['error'], - 'formatjs/enforce-id': ['error'], - 'formatjs/no-complex-selectors': ['error'], - 'formatjs/no-useless-message': ['error'], - 'formatjs/prefer-pound-in-plural': ['error'], + "formatjs/enforce-default-message": ["error", "literal"], + "formatjs/enforce-placeholders": ["error"], + "formatjs/enforce-plural-rules": ["error"], + "formatjs/no-literal-string-in-jsx": ["error"], + "formatjs/no-multiple-whitespaces": ["error"], + "formatjs/no-multiple-plurals": ["error"], + "formatjs/no-invalid-icu": ["error"], + "formatjs/enforce-id": ["error"], + "formatjs/no-complex-selectors": ["error"], + "formatjs/no-useless-message": ["error"], + "formatjs/prefer-pound-in-plural": ["error"], }, }, { - files: ['**/*.stories.tsx'], + files: ["**/*.stories.tsx"], rules: { - 'formatjs/no-literal-string-in-jsx': 'off', + "formatjs/no-literal-string-in-jsx": "off", }, }, - globalIgnores(['**/dist', '**/.eslintrc.cjs', '**/storybook-static']), + globalIgnores(["**/dist", "**/.eslintrc.cjs", "**/storybook-static"]), ]) diff --git a/packages/design-system/generate/generate.ts b/packages/design-system/generate/generate.ts index 947f1a46f..c35d61867 100644 --- a/packages/design-system/generate/generate.ts +++ b/packages/design-system/generate/generate.ts @@ -1,14 +1,14 @@ -import { extend } from 'colord' -import mixPlugin from 'colord/plugins/mix' -import fs from 'node:fs' +import { extend } from "colord" +import mixPlugin from "colord/plugins/mix" +import fs from "node:fs" import { FALLBACK_THEME, getThemeForToken, ignoreStyles, kebabify, -} from './utils' -import json from './variables.json' assert { type: 'json' } +} from "./utils" +import json from "./variables.json" assert { type: "json" } extend([mixPlugin]) @@ -26,7 +26,7 @@ themes.set(FALLBACK_THEME, new Map()) // Collect all real themes json.collections .find((collection) => { - return collection.name === 'Color Theming' + return collection.name === "Color Theming" }) ?.modes.forEach((mode) => { themes.set(mode.name, new Map()) @@ -42,7 +42,7 @@ const responsiveTokens = new Set() // Collect responsive tokens json.collections - .find((collection) => collection.name === 'Responsive') + .find((collection) => collection.name === "Responsive") ?.modes.forEach((mode) => { mode.variables.forEach((variable) => { responsiveTokens.add(variable.name) @@ -60,23 +60,23 @@ json.collections.forEach((collection) => { const tokenTheme = getThemeForToken(token, mode, themes) switch (variable.type) { - case 'boolean': - if (typeof variable.value === 'boolean') { + case "boolean": + if (typeof variable.value === "boolean") { // Handle text transform if (/text transform/i.test(variable.name)) { token = variable.name.replace( /text transform/i, - 'Text-Transform' + "Text-Transform" ) - value = variable.value ? 'uppercase' : 'none' + value = variable.value ? "uppercase" : "none" } // Handle text decoration else if (/text decoration/i.test(variable.name)) { token = variable.name.replace( /text decoration/i, - 'Text-Decoration' + "Text-Decoration" ) - value = variable.value ? 'underline' : 'none' + value = variable.value ? "underline" : "none" } } else { throw new Error( @@ -84,8 +84,8 @@ json.collections.forEach((collection) => { ) } break - case 'number': - if (typeof variable.value === 'number') { + case "number": + if (typeof variable.value === "number") { // Only use two decimals for all numbers value = Number(variable.value.toFixed(2)) } else { @@ -96,7 +96,7 @@ json.collections.forEach((collection) => { break } - if (typeof value === 'string' || typeof value === 'number') { + if (typeof value === "string" || typeof value === "number") { const theme = themes.get(tokenTheme) if (theme) { theme.set(token, { @@ -125,11 +125,11 @@ json.collections.forEach((collection) => { const tokenTheme = getThemeForToken(token, mode, themes) switch (variable.type) { - case 'color': - case 'string': - case 'number': + case "color": + case "string": + case "number": // Some values are defined as objects, so we need to dig out the real value - if (typeof value === 'object' && 'name' in value) { + if (typeof value === "object" && "name" in value) { value = value.name } @@ -139,13 +139,13 @@ json.collections.forEach((collection) => { value = `Impl-${value}` } - if (typeof value === 'string') { + if (typeof value === "string") { const theme = themes.get(tokenTheme) if (theme) { theme.set(token, { // We can only resolve aliases after we have collected all // primitives and aliases. - resolved: '', + resolved: "", alias: value, }) } @@ -165,8 +165,8 @@ json.collections.forEach((collection) => { json.collections.forEach((collection) => { collection.modes.forEach((mode) => { mode.variables.forEach((variable) => { - if (variable.type === 'effect') { - if (typeof variable.value === 'object' && 'effects' in variable.value) { + if (variable.type === "effect") { + if (typeof variable.value === "object" && "effects" in variable.value) { if (variable.value.effects.length > 1) { console.warn( `Unsupported effect declaration with multiple effects.`, @@ -176,7 +176,7 @@ json.collections.forEach((collection) => { // We only support one effect declaration per variable const effect = variable.value.effects[0] switch (effect.type) { - case 'DROP_SHADOW': { + case "DROP_SHADOW": { const { r, g, b, a } = effect.color const { x, y } = effect.offset const value = `${x}px ${y}px ${effect.radius}px ${effect.spread}px rgba(${r}, ${g}, ${b}, ${a})` @@ -240,7 +240,7 @@ themes.forEach((themeTokenValues) => { // Prepare for output const variablesJsOutput = [ - '/* This file is generated, do not edit manually! */', + "/* This file is generated, do not edit manually! */", ] themes.forEach((themeTokenValues, themeKey) => { const cssContentPrimitives: string[] = [] @@ -255,12 +255,12 @@ themes.forEach((themeTokenValues, themeKey) => { ` --${outputToken}: var(--${kebabify(outputValue.toString())});` ) } else { - if (typeof outputValue === 'string') { + if (typeof outputValue === "string") { // Check for properties that need quotes if (/font(-| )family/gi.test(token)) { outputValue = `"${outputValue}"` } - } else if (typeof outputValue === 'number') { + } else if (typeof outputValue === "number") { // font-weight is unitless if (!/font(-| )weight/gi.test(token)) { outputValue = `${outputValue}px` @@ -278,25 +278,25 @@ themes.forEach((themeTokenValues, themeKey) => { const filename = kebabify(themeKey).toLowerCase() const cssOutput = [ - '/* This file is generated, do not edit manually! */', + "/* This file is generated, do not edit manually! */", // The base styles target the :root. // All themes require the use of their scoping classname to be used. - themeKey === FALLBACK_THEME ? ':root {' : `.${filename} {`, - ' /* Values */', + themeKey === FALLBACK_THEME ? ":root {" : `.${filename} {`, + " /* Values */", ...cssContentPrimitives.sort(), - '', - ' /* Aliases */', + "", + " /* Aliases */", ...cssContentAliases.sort(), - '}', - '', // New line at end of file + "}", + "", // New line at end of file ] - fs.writeFileSync(`../lib/styles/${filename}.css`, cssOutput.join('\n'), { - encoding: 'utf-8', + fs.writeFileSync(`../lib/styles/${filename}.css`, cssOutput.join("\n"), { + encoding: "utf-8", }) const resolvedJsOutput = [ - '/* This file is generated, do not edit manually! */', + "/* This file is generated, do not edit manually! */", `export const theme = ${JSON.stringify( Array.from(themeTokenValues).reduce( (acc, [token, value]) => { @@ -313,9 +313,9 @@ themes.forEach((themeTokenValues, themeKey) => { ] fs.writeFileSync( `../lib/styles/${filename}.js`, - resolvedJsOutput.join('\n'), + resolvedJsOutput.join("\n"), { - encoding: 'utf-8', + encoding: "utf-8", } ) @@ -323,14 +323,14 @@ themes.forEach((themeTokenValues, themeKey) => { // It is mainly used for the Storybook to show all the variables. variablesJsOutput.push( `export const ${themeKey - .split(' ') + .split(" ") .map((v, i) => (i === 0 ? v.toLowerCase() : v)) .join( - '' + "" )} = ${JSON.stringify(Object.fromEntries(themeTokenValues.entries()))} as const` ) }) -fs.writeFileSync(`../lib/tokens/index.ts`, variablesJsOutput.join('\n'), { - encoding: 'utf-8', +fs.writeFileSync(`../lib/tokens/index.ts`, variablesJsOutput.join("\n"), { + encoding: "utf-8", }) diff --git a/packages/design-system/generate/utils.ts b/packages/design-system/generate/utils.ts index a9c1472b3..f5bfbaffd 100644 --- a/packages/design-system/generate/utils.ts +++ b/packages/design-system/generate/utils.ts @@ -1,9 +1,9 @@ export function kebabify(str: string) { - return str.replace(/\/|\s/g, '-').replace(/\(|\)|\[|\]/g, '') + return str.replace(/\/|\s/g, "-").replace(/\(|\)|\[|\]/g, "") } export function ignoreStyles(mode: { name: string }) { - if (mode.name === 'Style') { + if (mode.name === "Style") { // Ignore Figma Styles, we only want to process variables. // But the exported variables.json includes Figma Styles too. return false @@ -12,7 +12,7 @@ export function ignoreStyles(mode: { name: string }) { } // Some tokens are the same for all themes. Group them into this theme. -export const FALLBACK_THEME = 'base' +export const FALLBACK_THEME = "base" // The variables exported from Figma are not grouped by theme. // We used this function to help us group by theme. @@ -24,10 +24,10 @@ export function getThemeForToken( themes: Map ) { // If the given value is an object and has a name property, use that as comparison value. - const compare = typeof token === 'string' ? token : token.name + const compare = typeof token === "string" ? token : token.name const theme = Array.from(themes.keys()).find((theme) => { // Match against "theme/", use that if it matches - if (compare.indexOf(theme + '/') >= 0) { + if (compare.indexOf(theme + "/") >= 0) { return theme } diff --git a/packages/design-system/lib/components/Accordion/Accordion.stories.tsx b/packages/design-system/lib/components/Accordion/Accordion.stories.tsx index 6416c12f7..bc24202db 100644 --- a/packages/design-system/lib/components/Accordion/Accordion.stories.tsx +++ b/packages/design-system/lib/components/Accordion/Accordion.stories.tsx @@ -1,18 +1,18 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import Accordion from './index' -import AccordionItem from './AccordionItem/index' -import { MaterialIcon } from '../Icons/MaterialIcon' -import { IconName } from '../Icons/iconName' -import { Typography } from '../Typography' +import Accordion from "./index" +import AccordionItem from "./AccordionItem/index" +import { MaterialIcon } from "../Icons/MaterialIcon" +import { IconName } from "../Icons/iconName" +import { Typography } from "../Typography" const meta: Meta = { - title: 'Core Components/Accordion', + title: "Core Components/Accordion", component: Accordion, argTypes: { type: { - control: 'select', - options: ['card', 'sidepeek', 'inline'], + control: "select", + options: ["card", "sidepeek", "inline"], }, }, } @@ -23,7 +23,7 @@ type Story = StoryObj export const Default: Story = { args: { - type: 'card', + type: "card", }, render: (args) => ( @@ -60,7 +60,7 @@ export const Default: Story = { export const WithIcons: Story = { args: { - type: 'card', + type: "card", }, render: (args) => ( @@ -106,7 +106,7 @@ export const WithIcons: Story = { export const WithSubtitle: Story = { args: { - type: 'card', + type: "card", }, render: (args) => ( @@ -140,7 +140,7 @@ export const WithSubtitle: Story = { export const Inline: Story = { args: { - type: 'inline', + type: "inline", }, render: () => ( diff --git a/packages/design-system/lib/components/Accordion/AccordionItem/index.tsx b/packages/design-system/lib/components/Accordion/AccordionItem/index.tsx index 1b2b7ab74..6861148e5 100644 --- a/packages/design-system/lib/components/Accordion/AccordionItem/index.tsx +++ b/packages/design-system/lib/components/Accordion/AccordionItem/index.tsx @@ -1,23 +1,24 @@ -'use client' +"use client" -import { type ReactNode, useEffect, useRef } from 'react' +import { type ReactNode, useEffect, useRef } from "react" -import { IconByIconName } from '../../Icons/IconByIconName' -import { MaterialIcon } from '../../Icons/MaterialIcon' +import { IconByIconName } from "../../Icons/IconByIconName" +import { MaterialIcon } from "../../Icons/MaterialIcon" -import { accordionItemVariants } from './variants' +import { accordionItemVariants } from "./variants" -import styles from './accordionItem.module.css' +import styles from "./accordionItem.module.css" -import type { VariantProps } from 'class-variance-authority' -import type { IconName } from '../../Icons/iconName' -import { Typography } from '../../Typography' +import type { VariantProps } from "class-variance-authority" +import type { IconName } from "../../Icons/iconName" +import { Typography } from "../../Typography" export interface AccordionItemProps - extends React.HtmlHTMLAttributes, + extends + React.HtmlHTMLAttributes, VariantProps { title: string - titleLevel?: 'span' | 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' + titleLevel?: "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" iconName?: IconName icon?: ReactNode subtitle?: string @@ -31,7 +32,7 @@ export default function AccordionItem({ icon, iconName, title, - titleLevel = 'p', + titleLevel = "p", type, className, subtitle, @@ -59,17 +60,17 @@ export default function AccordionItem({ if (details.open) { content.style.maxHeight = `${content.scrollHeight}px` content.addEventListener( - 'transitionend', + "transitionend", () => { // Remove maxHeight after transition to allow content to transition multiple times - content.style.maxHeight = 'none' + content.style.maxHeight = "none" }, { once: true } ) onOpen?.() } else { - content.style.maxHeight = '0' + content.style.maxHeight = "0" } } } @@ -89,11 +90,11 @@ export default function AccordionItem({
{IconComp} - {type === 'sidepeek' ? ( + {type === "sidepeek" ? (

{title}

- ) : type === 'inline' ? ( + ) : type === "inline" ? (

{title}

diff --git a/packages/design-system/lib/components/Accordion/AccordionItem/variants.ts b/packages/design-system/lib/components/Accordion/AccordionItem/variants.ts index 99b4d61c0..ec359988e 100644 --- a/packages/design-system/lib/components/Accordion/AccordionItem/variants.ts +++ b/packages/design-system/lib/components/Accordion/AccordionItem/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './accordionItem.module.css' +import styles from "./accordionItem.module.css" export const accordionItemVariants = cva(styles.accordionItem, { variants: { @@ -11,6 +11,6 @@ export const accordionItemVariants = cva(styles.accordionItem, { }, }, defaultVariants: { - type: 'card', + type: "card", }, }) diff --git a/packages/design-system/lib/components/Accordion/index.tsx b/packages/design-system/lib/components/Accordion/index.tsx index c8c63b4c3..8385ca0e7 100644 --- a/packages/design-system/lib/components/Accordion/index.tsx +++ b/packages/design-system/lib/components/Accordion/index.tsx @@ -1,12 +1,13 @@ -import { Children, cloneElement, isValidElement } from 'react' +import { Children, cloneElement, isValidElement } from "react" -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" -import type { AccordionItemProps } from './AccordionItem' -import { accordionVariants } from './variants' +import type { AccordionItemProps } from "./AccordionItem" +import { accordionVariants } from "./variants" interface AccordionProps - extends React.HtmlHTMLAttributes, + extends + React.HtmlHTMLAttributes, VariantProps {} export default function Accordion({ diff --git a/packages/design-system/lib/components/Accordion/variants.ts b/packages/design-system/lib/components/Accordion/variants.ts index e8038284a..c47d0783d 100644 --- a/packages/design-system/lib/components/Accordion/variants.ts +++ b/packages/design-system/lib/components/Accordion/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './accordion.module.css' +import styles from "./accordion.module.css" export const accordionVariants = cva(styles.accordion, { variants: { @@ -11,6 +11,6 @@ export const accordionVariants = cva(styles.accordion, { }, }, defaultVariants: { - type: 'card', + type: "card", }, }) diff --git a/packages/design-system/lib/components/Alert/Alert.stories.tsx b/packages/design-system/lib/components/Alert/Alert.stories.tsx index 1b90566b7..01d6a9240 100644 --- a/packages/design-system/lib/components/Alert/Alert.stories.tsx +++ b/packages/design-system/lib/components/Alert/Alert.stories.tsx @@ -1,22 +1,22 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { Alert } from './index' -import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert' -import { expect, fn } from 'storybook/test' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { Alert } from "./index" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { expect, fn } from "storybook/test" const meta: Meta = { - title: 'Core Components/Alert', + title: "Core Components/Alert", component: Alert, parameters: { - layout: 'centered', + layout: "centered", }, - tags: ['autodocs'], + tags: ["autodocs"], argTypes: { variant: { - control: { type: 'select' }, - options: ['banner', 'inline'], + control: { type: "select" }, + options: ["banner", "inline"], }, type: { - control: { type: 'select' }, + control: { type: "select" }, options: Object.values(AlertTypeEnum), }, close: { @@ -32,43 +32,43 @@ type Story = StoryObj export const Default: Story = { args: { - variant: 'inline', + variant: "inline", type: AlertTypeEnum.Info, - heading: 'Heading', - text: 'Caramels danish jelly-o pudding tart croissant. Pie cotton candy jujubes carrot cake gummies. Apple pie cake chocolate bar halvah tootsie roll bonbon cheesecake. Brownie dessert macaroon bear claw pastry.', + heading: "Heading", + text: "Caramels danish jelly-o pudding tart croissant. Pie cotton candy jujubes carrot cake gummies. Apple pie cake chocolate bar halvah tootsie roll bonbon cheesecake. Brownie dessert macaroon bear claw pastry.", close: undefined, - ariaRole: 'alert', + ariaRole: "alert", }, play: async ({ canvas }) => { - canvas.findByRole('alert') + canvas.findByRole("alert") }, } export const Closable: Story = { args: { - variant: 'inline', + variant: "inline", type: AlertTypeEnum.Info, - heading: 'Heading', - text: 'Caramels danish jelly-o pudding tart croissant. Pie cotton candy jujubes carrot cake gummies. Apple pie cake chocolate bar halvah tootsie roll bonbon cheesecake. Brownie dessert macaroon bear claw pastry.', + heading: "Heading", + text: "Caramels danish jelly-o pudding tart croissant. Pie cotton candy jujubes carrot cake gummies. Apple pie cake chocolate bar halvah tootsie roll bonbon cheesecake. Brownie dessert macaroon bear claw pastry.", close: fn(), }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.close).toHaveBeenCalledTimes(1) }, } export const WithPhonenumber: Story = { args: { - variant: 'inline', + variant: "inline", type: AlertTypeEnum.Info, - heading: 'Heading', - text: 'Caramels danish jelly-o pudding tart croissant. Pie cotton candy jujubes carrot cake gummies. Apple pie cake chocolate bar halvah tootsie roll bonbon cheesecake. Brownie dessert macaroon bear claw pastry.', + heading: "Heading", + text: "Caramels danish jelly-o pudding tart croissant. Pie cotton candy jujubes carrot cake gummies. Apple pie cake chocolate bar halvah tootsie roll bonbon cheesecake. Brownie dessert macaroon bear claw pastry.", close: fn(), phoneContact: { - displayText: 'Call us:', - phoneNumber: '+4685551234', - footnote: 'Available 24/7', + displayText: "Call us:", + phoneNumber: "+4685551234", + footnote: "Available 24/7", }, }, } diff --git a/packages/design-system/lib/components/Alert/Sidepeek/index.tsx b/packages/design-system/lib/components/Alert/Sidepeek/index.tsx index 10363cc72..182e67e1f 100644 --- a/packages/design-system/lib/components/Alert/Sidepeek/index.tsx +++ b/packages/design-system/lib/components/Alert/Sidepeek/index.tsx @@ -1,16 +1,16 @@ -'use client' +"use client" -import { useState } from 'react' -import { useIntl } from 'react-intl' +import { useState } from "react" +import { useIntl } from "react-intl" -import { Button } from '../../Button' -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { JsonToHtml } from '../../JsonToHtml/JsonToHtml' -import SidePeek from '../../SidePeek' +import { Button } from "../../Button" +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { JsonToHtml } from "../../JsonToHtml/JsonToHtml" +import SidePeek from "../../SidePeek" -import styles from './sidepeek.module.css' +import styles from "./sidepeek.module.css" -import type { AlertSidepeekProps } from './sidepeek' +import type { AlertSidepeekProps } from "./sidepeek" export default function AlertSidepeek({ ctaText, @@ -37,8 +37,8 @@ export default function AlertSidepeek({ isOpen={sidePeekIsOpen} handleClose={() => setSidePeekIsOpen(false)} closeLabel={intl.formatMessage({ - id: 'common.close', - defaultMessage: 'Close', + id: "common.close", + defaultMessage: "Close", })} > { className?: string @@ -26,5 +26,5 @@ export interface AlertProps extends VariantProps { } | null close?: () => void ariaRole?: AriaRole - ariaLive?: 'off' | 'assertive' | 'polite' + ariaLive?: "off" | "assertive" | "polite" } diff --git a/packages/design-system/lib/components/Alert/index.tsx b/packages/design-system/lib/components/Alert/index.tsx index a598fa5ae..81886f52e 100644 --- a/packages/design-system/lib/components/Alert/index.tsx +++ b/packages/design-system/lib/components/Alert/index.tsx @@ -1,17 +1,17 @@ -'use client' +"use client" -import { Button } from '../Button' -import { MaterialIcon } from '../Icons/MaterialIcon' -import Link from '../OldDSLink' -import { Typography } from '../Typography' +import { Button } from "../Button" +import { MaterialIcon } from "../Icons/MaterialIcon" +import Link from "../OldDSLink" +import { Typography } from "../Typography" -import AlertSidepeek from './Sidepeek' -import { IconByAlertType } from './utils' -import { alertVariants } from './variants' +import AlertSidepeek from "./Sidepeek" +import { IconByAlertType } from "./utils" +import { alertVariants } from "./variants" -import styles from './alert.module.css' +import styles from "./alert.module.css" -import type { AlertProps } from './alert' +import type { AlertProps } from "./alert" export function Alert({ className, @@ -61,7 +61,7 @@ export function Alert({ <> {phoneContact.displayText} {phoneContact.phoneNumber} diff --git a/packages/design-system/lib/components/Alert/utils.tsx b/packages/design-system/lib/components/Alert/utils.tsx index c7a2e85af..f030ea53f 100644 --- a/packages/design-system/lib/components/Alert/utils.tsx +++ b/packages/design-system/lib/components/Alert/utils.tsx @@ -1,28 +1,28 @@ import { MaterialIcon, type MaterialIconSetIconProps, -} from '../Icons/MaterialIcon' -import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert' +} from "../Icons/MaterialIcon" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" -import type { JSX } from 'react' +import type { JSX } from "react" -import type { AlertProps } from './alert' +import type { AlertProps } from "./alert" interface IconByAlertProps { alertType: AlertTypeEnum - variant?: AlertProps['variant'] + variant?: AlertProps["variant"] } export function IconByAlertType({ alertType, - variant = 'inline', + variant = "inline", ...props }: IconByAlertProps & MaterialIconSetIconProps): JSX.Element { switch (alertType) { case AlertTypeEnum.Alarm: return ( = { - title: 'Core Components/Avatar', + title: "Core Components/Avatar", component: Avatar, parameters: { - layout: 'centered', + layout: "centered", }, argTypes: { size: { - control: { type: 'select' }, + control: { type: "select" }, options: Object.keys(config.variants.size), }, }, @@ -20,31 +20,31 @@ const meta: Meta = { export default meta type Story = StoryObj -const imageFile = './img/profile-picture.png' as const +const imageFile = "./img/profile-picture.png" as const export const WithImage: Story = { args: { src: imageFile, - alt: 'Profile photo', - size: 'md', + alt: "Profile photo", + size: "md", }, } export const WithInitials: Story = { args: { - initials: 'FR', - size: 'md', + initials: "FR", + size: "md", }, } export const Fallback: Story = { args: { - size: 'md', + size: "md", }, } export const SmallSize: Story = { render: () => ( -
+
@@ -54,7 +54,7 @@ export const SmallSize: Story = { export const MediumSize: Story = { render: () => ( -
+
@@ -64,7 +64,7 @@ export const MediumSize: Story = { export const LargeSize: Story = { render: () => ( -
+
@@ -74,39 +74,39 @@ export const LargeSize: Story = { export const AllSizes: Story = { render: () => ( -
+
- Small (20px) + Small (20px)
- Medium (32px) + Medium (32px)
- Large (55px) + Large (55px)
), diff --git a/packages/design-system/lib/components/Avatar/index.tsx b/packages/design-system/lib/components/Avatar/index.tsx index d2c750348..969c6c867 100644 --- a/packages/design-system/lib/components/Avatar/index.tsx +++ b/packages/design-system/lib/components/Avatar/index.tsx @@ -1,28 +1,28 @@ -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' -import Image from '../Image' +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" +import Image from "../Image" -import { variants } from './variants' -import type { AvatarProps } from './types' +import { variants } from "./variants" +import type { AvatarProps } from "./types" export function Avatar({ src, alt, initials, - size = 'md', + size = "md", className, }: AvatarProps) { const classNames = variants({ size, className }) - const pixelSize = size === 'sm' ? 24 : size === 'md' ? 32 : 55 - const iconSize = size === 'sm' ? 16 : 24 + const pixelSize = size === "sm" ? 24 : size === "md" ? 32 : 55 + const iconSize = size === "sm" ? 16 : 24 return (
{src ? ( - {alt + {alt ) : initials ? ( {initials} diff --git a/packages/design-system/lib/components/Avatar/types.ts b/packages/design-system/lib/components/Avatar/types.ts index 4a821a306..8e7f65af6 100644 --- a/packages/design-system/lib/components/Avatar/types.ts +++ b/packages/design-system/lib/components/Avatar/types.ts @@ -15,7 +15,7 @@ export interface AvatarProps { * Size of the avatar * @default 'md' */ - size?: 'sm' | 'md' | 'lg' + size?: "sm" | "md" | "lg" /** * Additional CSS class names */ diff --git a/packages/design-system/lib/components/Avatar/variants.ts b/packages/design-system/lib/components/Avatar/variants.ts index 58888eb17..e0eefb209 100644 --- a/packages/design-system/lib/components/Avatar/variants.ts +++ b/packages/design-system/lib/components/Avatar/variants.ts @@ -1,17 +1,17 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './avatar.module.css' +import styles from "./avatar.module.css" export const config = { variants: { size: { - sm: styles['size-sm'], - md: styles['size-md'], - lg: styles['size-lg'], + sm: styles["size-sm"], + md: styles["size-md"], + lg: styles["size-lg"], }, }, defaultVariants: { - size: 'md', + size: "md", }, } as const diff --git a/packages/design-system/lib/components/BackToTopButton/BackToTopButton.stories.tsx b/packages/design-system/lib/components/BackToTopButton/BackToTopButton.stories.tsx index eb2711b4e..e7262fb77 100644 --- a/packages/design-system/lib/components/BackToTopButton/BackToTopButton.stories.tsx +++ b/packages/design-system/lib/components/BackToTopButton/BackToTopButton.stories.tsx @@ -1,12 +1,12 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { expect, fn } from 'storybook/test' +import { expect, fn } from "storybook/test" -import { BackToTopButton } from '.' -import { config as backToTopButtonConfig } from './variants' +import { BackToTopButton } from "." +import { config as backToTopButtonConfig } from "./variants" const meta: Meta = { - title: 'Patterns/BackToTopButton', + title: "Patterns/BackToTopButton", component: BackToTopButton, argTypes: { onPress: { @@ -15,13 +15,13 @@ const meta: Meta = { }, }, position: { - control: 'select', + control: "select", options: Object.keys(backToTopButtonConfig.variants.position), table: { type: { - summary: 'string', + summary: "string", detail: Object.keys(backToTopButtonConfig.variants.position).join( - ' | ' + " | " ), }, defaultValue: { @@ -30,7 +30,7 @@ const meta: Meta = { }, }, label: { - control: 'text', + control: "text", }, }, } @@ -40,16 +40,16 @@ export default meta type Story = StoryObj const globalStoryPropsInverted = { - backgrounds: { value: 'scandicPrimaryDark' }, + backgrounds: { value: "scandicPrimaryDark" }, } export const Default: Story = { args: { onPress: fn(), - label: 'Back to top', + label: "Back to top", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -57,10 +57,10 @@ export const Default: Story = { export const PositionLeft: Story = { args: { ...Default.args, - position: 'left', + position: "left", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -68,10 +68,10 @@ export const PositionLeft: Story = { export const PositionCenter: Story = { args: { ...Default.args, - position: 'center', + position: "center", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -79,10 +79,10 @@ export const PositionCenter: Story = { export const PositionRight: Story = { args: { ...Default.args, - position: 'right', + position: "right", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -91,10 +91,10 @@ export const OnDarkBackground: Story = { globals: globalStoryPropsInverted, args: { onPress: fn(), - label: 'Back to top', + label: "Back to top", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } diff --git a/packages/design-system/lib/components/BackToTopButton/backToTopButton.module.css b/packages/design-system/lib/components/BackToTopButton/backToTopButton.module.css index 0e45d2cce..64b43982c 100644 --- a/packages/design-system/lib/components/BackToTopButton/backToTopButton.module.css +++ b/packages/design-system/lib/components/BackToTopButton/backToTopButton.module.css @@ -31,7 +31,7 @@ /* This button is able to be on top of dark background colors, so we need to create an illusion that it also has an inverted border on focus */ &::before { - content: ''; + content: ""; position: absolute; inset: -4px; border: 2px solid var(--Border-Inverted); diff --git a/packages/design-system/lib/components/BackToTopButton/index.tsx b/packages/design-system/lib/components/BackToTopButton/index.tsx index f83f47153..b9037df33 100644 --- a/packages/design-system/lib/components/BackToTopButton/index.tsx +++ b/packages/design-system/lib/components/BackToTopButton/index.tsx @@ -1,20 +1,19 @@ -'use client' +"use client" -import { Button as ButtonRAC } from 'react-aria-components' +import { Button as ButtonRAC } from "react-aria-components" -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" -import { variants } from './variants' +import { variants } from "./variants" -import styles from './backToTopButton.module.css' +import styles from "./backToTopButton.module.css" -import type { VariantProps } from 'class-variance-authority' -import type { ComponentProps } from 'react' +import type { VariantProps } from "class-variance-authority" +import type { ComponentProps } from "react" interface BackToTopButtonProps - extends ComponentProps, - VariantProps { + extends ComponentProps, VariantProps { label: string } diff --git a/packages/design-system/lib/components/BackToTopButton/variants.ts b/packages/design-system/lib/components/BackToTopButton/variants.ts index fd09e7957..2926fb971 100644 --- a/packages/design-system/lib/components/BackToTopButton/variants.ts +++ b/packages/design-system/lib/components/BackToTopButton/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './backToTopButton.module.css' +import styles from "./backToTopButton.module.css" export const config = { variants: { @@ -11,7 +11,7 @@ export const config = { }, }, defaultVariants: { - position: 'right', + position: "right", }, } as const diff --git a/packages/design-system/lib/components/Badge/Badge.stories.tsx b/packages/design-system/lib/components/Badge/Badge.stories.tsx index 6718988ac..bd915c561 100644 --- a/packages/design-system/lib/components/Badge/Badge.stories.tsx +++ b/packages/design-system/lib/components/Badge/Badge.stories.tsx @@ -1,9 +1,9 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { Badge } from './Badge.tsx' +import { Badge } from "./Badge.tsx" const meta: Meta = { - title: 'Core Components/Badge', + title: "Core Components/Badge", component: Badge, } @@ -15,7 +15,7 @@ export const Default: Story = {} export const XS: Story = { render: () => ( -
+
@@ -24,7 +24,7 @@ export const XS: Story = { export const Small: Story = { render: () => ( -
+
@@ -32,7 +32,7 @@ export const Small: Story = { } export const Medium: Story = { render: () => ( -
+
@@ -40,7 +40,7 @@ export const Medium: Story = { } export const Large: Story = { render: () => ( -
+
@@ -49,7 +49,7 @@ export const Large: Story = { export const XL: Story = { render: () => ( -
+
diff --git a/packages/design-system/lib/components/Badge/Badge.tsx b/packages/design-system/lib/components/Badge/Badge.tsx index 23e73c11b..7a46537da 100644 --- a/packages/design-system/lib/components/Badge/Badge.tsx +++ b/packages/design-system/lib/components/Badge/Badge.tsx @@ -1,8 +1,8 @@ -import { config } from './variants' +import { config } from "./variants" -import { VariantProps } from 'class-variance-authority' -import { Typography } from '../Typography' -import { TypographyProps } from '../Typography/types' +import { VariantProps } from "class-variance-authority" +import { Typography } from "../Typography" +import { TypographyProps } from "../Typography/types" interface BadgeProps extends VariantProps { number: string | number @@ -21,15 +21,15 @@ export function Badge({ number, color, size }: BadgeProps) { ) } -function getTypography(size: BadgeProps['size']): TypographyProps['variant'] { +function getTypography(size: BadgeProps["size"]): TypographyProps["variant"] { switch (size) { - case '36': - case '32': - return 'Body/Paragraph/mdBold' - case '28': - case '24': - return 'Body/Supporting text (caption)/smBold' - case '20': - return 'Label/xsRegular' + case "36": + case "32": + return "Body/Paragraph/mdBold" + case "28": + case "24": + return "Body/Supporting text (caption)/smBold" + case "20": + return "Label/xsRegular" } } diff --git a/packages/design-system/lib/components/Badge/index.tsx b/packages/design-system/lib/components/Badge/index.tsx index 9053ae93c..d02aa6b59 100644 --- a/packages/design-system/lib/components/Badge/index.tsx +++ b/packages/design-system/lib/components/Badge/index.tsx @@ -1 +1 @@ -export { Badge } from './Badge' +export { Badge } from "./Badge" diff --git a/packages/design-system/lib/components/Badge/variants.ts b/packages/design-system/lib/components/Badge/variants.ts index 84b23a325..43f2d6376 100644 --- a/packages/design-system/lib/components/Badge/variants.ts +++ b/packages/design-system/lib/components/Badge/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './badge.module.css' +import styles from "./badge.module.css" export const config = cva(styles.badge, { variants: { @@ -9,15 +9,15 @@ export const config = cva(styles.badge, { green: styles.green, }, size: { - '36': styles._36, - '32': styles._32, - '28': styles._28, - '24': styles._24, - '20': styles._20, + "36": styles._36, + "32": styles._32, + "28": styles._28, + "24": styles._24, + "20": styles._20, }, }, defaultVariants: { - color: 'primary', - size: '28', + color: "primary", + size: "28", }, }) diff --git a/packages/design-system/lib/components/BookingCodeChip/BookingCodeChip.stories.tsx b/packages/design-system/lib/components/BookingCodeChip/BookingCodeChip.stories.tsx index ed970a8e4..afb12aaf5 100644 --- a/packages/design-system/lib/components/BookingCodeChip/BookingCodeChip.stories.tsx +++ b/packages/design-system/lib/components/BookingCodeChip/BookingCodeChip.stories.tsx @@ -1,12 +1,12 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { fn } from 'storybook/test' -import { BookingCodeChip } from './index' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { fn } from "storybook/test" +import { BookingCodeChip } from "./index" const meta = { - title: 'Product Components/BookingCodeChip', + title: "Product Components/BookingCodeChip", component: BookingCodeChip, parameters: { - layout: 'centered', + layout: "centered", }, } satisfies Meta diff --git a/packages/design-system/lib/components/BookingCodeChip/index.tsx b/packages/design-system/lib/components/BookingCodeChip/index.tsx index 45059e6b2..10252079e 100644 --- a/packages/design-system/lib/components/BookingCodeChip/index.tsx +++ b/packages/design-system/lib/components/BookingCodeChip/index.tsx @@ -1,13 +1,13 @@ -import { useIntl } from 'react-intl' +import { useIntl } from "react-intl" -import IconChip from '../IconChip' -import { MaterialIcon } from '../Icons/MaterialIcon' -import FilledDiscountIcon from '../Icons/Nucleo/Benefits/FilledDiscount' -import { Typography } from '../Typography' +import IconChip from "../IconChip" +import { MaterialIcon } from "../Icons/MaterialIcon" +import FilledDiscountIcon from "../Icons/Nucleo/Benefits/FilledDiscount" +import { Typography } from "../Typography" -import { cx } from 'class-variance-authority' -import { IconButton } from '../IconButton' -import styles from './bookingCodeChip.module.css' +import { cx } from "class-variance-authority" +import { IconButton } from "../IconButton" +import styles from "./bookingCodeChip.module.css" type BaseBookingCodeChipProps = { alignCenter?: boolean @@ -47,11 +47,11 @@ export function BookingCodeChip({ return null } - const color = isCampaignRate ? 'green' : 'blue' + const color = isCampaignRate ? "green" : "blue" const iconColor = isCampaignRate - ? 'Icon/Feedback/Success' - : 'Icon/Feedback/Information' + ? "Icon/Feedback/Success" + : "Icon/Feedback/Information" const isUnavailableRate = isCampaignRate ? isCampaignUnavailable @@ -59,12 +59,12 @@ export function BookingCodeChip({ const label = isCampaignRate ? intl.formatMessage({ - id: 'booking.campaign', - defaultMessage: 'Campaign', + id: "booking.campaign", + defaultMessage: "Campaign", }) : intl.formatMessage({ - id: 'booking.bookingCode', - defaultMessage: 'Booking code', + id: "booking.bookingCode", + defaultMessage: "Booking code", }) const icon = isCampaignRate ? ( @@ -107,8 +107,8 @@ export function BookingCodeChip({ className={styles.removeButton} onPress={onClose} aria-label={intl.formatMessage({ - id: 'booking.removeBookingCode', - defaultMessage: 'Remove booking code', + id: "booking.removeBookingCode", + defaultMessage: "Remove booking code", })} iconName="close" /> diff --git a/packages/design-system/lib/components/Button/Button.stories.tsx b/packages/design-system/lib/components/Button/Button.stories.tsx index c0946ee8f..6a95a91b0 100644 --- a/packages/design-system/lib/components/Button/Button.stories.tsx +++ b/packages/design-system/lib/components/Button/Button.stories.tsx @@ -1,41 +1,41 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { expect, fn } from 'storybook/test' +import { expect, fn } from "storybook/test" -import { Button } from './Button' -import { buttonIconNames } from './types' -import { config as buttonConfig } from './variants' +import { Button } from "./Button" +import { buttonIconNames } from "./types" +import { config as buttonConfig } from "./variants" const meta: Meta = { - title: 'Core Components/Button', + title: "Core Components/Button", component: Button, argTypes: { onPress: { table: { - type: { summary: 'function' }, - defaultValue: { summary: 'undefined' }, + type: { summary: "function" }, + defaultValue: { summary: "undefined" }, }, - description: 'Callback function to handle button press events.', + description: "Callback function to handle button press events.", }, variant: { - control: 'select', + control: "select", options: Object.keys(buttonConfig.variants.variant), - default: 'Primary', + default: "Primary", table: { defaultValue: { summary: buttonConfig.defaultVariants.variant, }, type: { - summary: Object.keys(buttonConfig.variants.variant).join(' | '), + summary: Object.keys(buttonConfig.variants.variant).join(" | "), }, }, }, color: { - control: 'select', + control: "select", options: Object.keys(buttonConfig.variants.color), table: { type: { - summary: Object.keys(buttonConfig.variants.color).join(' | '), + summary: Object.keys(buttonConfig.variants.color).join(" | "), }, defaultValue: { summary: buttonConfig.defaultVariants.color, @@ -43,11 +43,11 @@ const meta: Meta = { }, }, size: { - control: 'select', + control: "select", options: Object.keys(buttonConfig.variants.size), table: { type: { - summary: Object.keys(buttonConfig.variants.size).join(' | '), + summary: Object.keys(buttonConfig.variants.size).join(" | "), }, defaultValue: { summary: buttonConfig.defaultVariants.size, @@ -55,63 +55,63 @@ const meta: Meta = { }, }, wrapping: { - control: 'boolean', + control: "boolean", options: Object.keys(buttonConfig.variants.wrapping), - type: 'boolean', + type: "boolean", table: { defaultValue: { summary: buttonConfig.defaultVariants.wrapping.toString(), }, }, description: - 'Only applies to variant `Text`. If `false`, the button will use smaller padding.', + "Only applies to variant `Text`. If `false`, the button will use smaller padding.", }, leadingIconName: { - control: 'select', + control: "select", options: buttonIconNames, table: { - type: { summary: buttonIconNames.join(' | ') }, - defaultValue: { summary: 'undefined' }, + type: { summary: buttonIconNames.join(" | ") }, + defaultValue: { summary: "undefined" }, }, - description: 'Name of the Material Icon to use as leading icon.', + description: "Name of the Material Icon to use as leading icon.", }, trailingIconName: { - control: 'select', + control: "select", options: buttonIconNames, table: { - type: { summary: buttonIconNames.join(' | ') }, - defaultValue: { summary: 'undefined' }, + type: { summary: buttonIconNames.join(" | ") }, + defaultValue: { summary: "undefined" }, }, - description: 'Name of the Material Icon to use as trailing icon.', + description: "Name of the Material Icon to use as trailing icon.", }, isDisabled: { - control: 'boolean', + control: "boolean", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, isPending: { - control: 'boolean', + control: "boolean", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, fullWidth: { - control: 'boolean', + control: "boolean", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, description: - 'By default, the button width adjusts to its content. Set to true to make the button take the full width of its container.', + "By default, the button width adjusts to its content. Set to true to make the button take the full width of its container.", }, }, } const globalStoryPropsInverted = { - backgrounds: { value: 'scandicPrimaryDark' }, + backgrounds: { value: "scandicPrimaryDark" }, } export default meta @@ -120,10 +120,10 @@ type Story = StoryObj export const Default: Story = { args: { onPress: fn(), - children: 'Button', + children: "Button", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -131,11 +131,11 @@ export const Default: Story = { export const PrimaryLarge: Story = { args: { ...Default.args, - variant: 'Primary', - size: 'lg', + variant: "Primary", + size: "lg", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -143,10 +143,10 @@ export const PrimaryLarge: Story = { export const PrimaryMedium: Story = { args: { ...PrimaryLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -154,10 +154,10 @@ export const PrimaryMedium: Story = { export const PrimarySmall: Story = { args: { ...PrimaryLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -169,7 +169,7 @@ export const PrimaryDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -181,7 +181,7 @@ export const PrimaryLoading: Story = { onPress: fn(), // Fresh spy instance for loading test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -192,7 +192,7 @@ export const PrimaryOnDarkBackground: Story = { ...PrimaryLarge.args, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -201,11 +201,11 @@ export const PrimaryInvertedLarge: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - size: 'lg', - color: 'Inverted', + size: "lg", + color: "Inverted", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -214,10 +214,10 @@ export const PrimaryInvertedMedium: Story = { globals: globalStoryPropsInverted, args: { ...PrimaryInvertedLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -226,10 +226,10 @@ export const PrimaryInvertedSmall: Story = { globals: globalStoryPropsInverted, args: { ...PrimaryInvertedLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -242,7 +242,7 @@ export const PrimaryInvertedDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -255,7 +255,7 @@ export const PrimaryInvertedLoading: Story = { onPress: fn(), // Fresh spy instance for loading test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -263,11 +263,11 @@ export const PrimaryInvertedLoading: Story = { export const SecondaryLarge: Story = { args: { ...Default.args, - variant: 'Secondary', - size: 'lg', + variant: "Secondary", + size: "lg", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -275,10 +275,10 @@ export const SecondaryLarge: Story = { export const SecondaryMedium: Story = { args: { ...SecondaryLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -286,10 +286,10 @@ export const SecondaryMedium: Story = { export const SecondarySmall: Story = { args: { ...SecondaryLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -301,7 +301,7 @@ export const SecondaryDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -313,7 +313,7 @@ export const SecondaryLoading: Story = { onPress: fn(), // Fresh spy instance for loading test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -322,12 +322,12 @@ export const SecondaryInvertedLarge: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - variant: 'Secondary', - color: 'Inverted', - size: 'lg', + variant: "Secondary", + color: "Inverted", + size: "lg", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -336,10 +336,10 @@ export const SecondaryInvertedMedium: Story = { globals: globalStoryPropsInverted, args: { ...SecondaryInvertedLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -348,10 +348,10 @@ export const SecondaryInvertedSmall: Story = { globals: globalStoryPropsInverted, args: { ...SecondaryInvertedLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -364,7 +364,7 @@ export const SecondaryInvertedDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -377,7 +377,7 @@ export const SecondaryInvertedLoading: Story = { onPress: fn(), // Fresh spy instance for loading test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -385,11 +385,11 @@ export const SecondaryInvertedLoading: Story = { export const TertiaryLarge: Story = { args: { ...Default.args, - variant: 'Tertiary', - size: 'lg', + variant: "Tertiary", + size: "lg", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -397,10 +397,10 @@ export const TertiaryLarge: Story = { export const TertiaryMedium: Story = { args: { ...TertiaryLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -408,10 +408,10 @@ export const TertiaryMedium: Story = { export const TertiarySmall: Story = { args: { ...TertiaryLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -423,7 +423,7 @@ export const TertiaryDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -435,7 +435,7 @@ export const TertiaryLoading: Story = { onPress: fn(), // Fresh spy instance for loading test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -443,11 +443,11 @@ export const TertiaryLoading: Story = { export const TextLarge: Story = { args: { ...Default.args, - variant: 'Text', - size: 'lg', + variant: "Text", + size: "lg", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -455,11 +455,11 @@ export const TextLarge: Story = { export const TextMedium: Story = { args: { ...TextLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -467,11 +467,11 @@ export const TextMedium: Story = { export const TextSmall: Story = { args: { ...TextLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -483,7 +483,7 @@ export const TextDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -494,7 +494,7 @@ export const TextNoWrapping: Story = { wrapping: false, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -503,12 +503,12 @@ export const TextInvertedLarge: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - variant: 'Text', - color: 'Inverted', - size: 'lg', + variant: "Text", + color: "Inverted", + size: "lg", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -517,10 +517,10 @@ export const TextInvertedMedium: Story = { globals: globalStoryPropsInverted, args: { ...TextInvertedLarge.args, - size: 'md', + size: "md", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -529,10 +529,10 @@ export const TextInvertedSmall: Story = { globals: globalStoryPropsInverted, args: { ...TextInvertedLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -545,7 +545,7 @@ export const TextInvertedDisabled: Story = { onPress: fn(), // Fresh spy instance for disabled test }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -553,15 +553,15 @@ export const TextInvertedDisabled: Story = { export const TextWithIcon: Story = { args: { ...TextLarge.args, - children: 'Text with icon', - trailingIconName: 'chevron_right', + children: "Text with icon", + trailingIconName: "chevron_right", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) - expect(canvas.getByText('Text with icon')).toBeDefined() - expect(canvas.getByTestId('MaterialIcon')).toBeDefined() + expect(canvas.getByText("Text with icon")).toBeDefined() + expect(canvas.getByTestId("MaterialIcon")).toBeDefined() }, } @@ -569,13 +569,13 @@ export const TextWithIconInverted: Story = { globals: globalStoryPropsInverted, args: { ...TextWithIcon.args, - color: 'Inverted', + color: "Inverted", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(await canvas.findByRole('button')) + await userEvent.click(await canvas.findByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) - expect(canvas.getByText('Text with icon')).toBeDefined() - expect(canvas.getByTestId('MaterialIcon')).toBeDefined() + expect(canvas.getByText("Text with icon")).toBeDefined() + expect(canvas.getByTestId("MaterialIcon")).toBeDefined() }, } diff --git a/packages/design-system/lib/components/Button/Button.tsx b/packages/design-system/lib/components/Button/Button.tsx index 2abe5fd5b..012281ab2 100644 --- a/packages/design-system/lib/components/Button/Button.tsx +++ b/packages/design-system/lib/components/Button/Button.tsx @@ -1,10 +1,10 @@ -import { Button as ButtonRAC } from 'react-aria-components' -import { Loading } from '../Loading/Loading' +import { Button as ButtonRAC } from "react-aria-components" +import { Loading } from "../Loading/Loading" -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' -import type { ButtonProps } from './types' -import { variants } from './variants' +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" +import type { ButtonProps } from "./types" +import { variants } from "./variants" export function Button({ variant, @@ -30,9 +30,9 @@ export function Button({ return ( @@ -43,7 +43,7 @@ export function Button({ ) : null} {children} @@ -51,11 +51,11 @@ export function Button({ ) : null} {isPending ? ( - + ) : null} ) diff --git a/packages/design-system/lib/components/Button/button.module.css b/packages/design-system/lib/components/Button/button.module.css index 10d4af83b..34f4f9390 100644 --- a/packages/design-system/lib/components/Button/button.module.css +++ b/packages/design-system/lib/components/Button/button.module.css @@ -27,7 +27,7 @@ outline-offset: 2px; &::before { - content: ''; + content: ""; position: absolute; inset: -4px; border: 2px solid var(--Border-Inverted); diff --git a/packages/design-system/lib/components/Button/index.tsx b/packages/design-system/lib/components/Button/index.tsx index 5283faf8f..93adce3ee 100644 --- a/packages/design-system/lib/components/Button/index.tsx +++ b/packages/design-system/lib/components/Button/index.tsx @@ -1,4 +1,4 @@ -export { Button } from './Button' -export { type ButtonProps } from './types' +export { Button } from "./Button" +export { type ButtonProps } from "./types" // eslint-disable-next-line react-refresh/only-export-components -export { variants as buttonVariants, withButton } from './variants' +export { variants as buttonVariants, withButton } from "./variants" diff --git a/packages/design-system/lib/components/Button/types.ts b/packages/design-system/lib/components/Button/types.ts index c72da10a2..ca10ebe63 100644 --- a/packages/design-system/lib/components/Button/types.ts +++ b/packages/design-system/lib/components/Button/types.ts @@ -1,28 +1,28 @@ -import { Button } from 'react-aria-components' +import { Button } from "react-aria-components" -import type { VariantProps } from 'class-variance-authority' -import type { ComponentProps } from 'react' +import type { VariantProps } from "class-variance-authority" +import type { ComponentProps } from "react" -import type { SymbolCodepoints } from '../Icons/MaterialIcon/MaterialSymbol/types' -import type { variants } from './variants' +import type { SymbolCodepoints } from "../Icons/MaterialIcon/MaterialSymbol/types" +import type { variants } from "./variants" export const buttonIconNames = [ - 'add_circle', - 'open_in_new', - 'keyboard_arrow_down', - 'keyboard_arrow_up', - 'edit_square', - 'location_on', - 'link', - 'mail', - 'cancel', - 'calendar_month', - 'calendar_clock', - 'edit_calendar', - 'calendar_add_on', - 'delete', - 'chevron_right', - 'chevron_left', + "add_circle", + "open_in_new", + "keyboard_arrow_down", + "keyboard_arrow_up", + "edit_square", + "location_on", + "link", + "mail", + "cancel", + "calendar_month", + "calendar_clock", + "edit_calendar", + "calendar_add_on", + "delete", + "chevron_right", + "chevron_left", ] as const export type ButtonIconName = Extract< diff --git a/packages/design-system/lib/components/Button/variants.ts b/packages/design-system/lib/components/Button/variants.ts index fa3814ddd..051022e2d 100644 --- a/packages/design-system/lib/components/Button/variants.ts +++ b/packages/design-system/lib/components/Button/variants.ts @@ -1,38 +1,38 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import { deepmerge } from 'deepmerge-ts' -import styles from './button.module.css' +import { deepmerge } from "deepmerge-ts" +import styles from "./button.module.css" export const config = { variants: { variant: { - Primary: styles['variant-primary'], - Secondary: styles['variant-secondary'], - Tertiary: styles['variant-tertiary'], - Text: styles['variant-text'], + Primary: styles["variant-primary"], + Secondary: styles["variant-secondary"], + Tertiary: styles["variant-tertiary"], + Text: styles["variant-text"], }, color: { - Primary: styles['color-primary'], - Inverted: styles['color-inverted'], + Primary: styles["color-primary"], + Inverted: styles["color-inverted"], }, size: { - sm: styles['size-sm'], - md: styles['size-md'], - lg: styles['size-lg'], + sm: styles["size-sm"], + md: styles["size-md"], + lg: styles["size-lg"], }, wrapping: { true: undefined, - false: styles['no-wrapping'], + false: styles["no-wrapping"], }, fullWidth: { - true: styles['full-width'], + true: styles["full-width"], false: undefined, }, }, defaultVariants: { - variant: 'Primary', - color: 'Primary', - size: 'lg', + variant: "Primary", + color: "Primary", + size: "lg", wrapping: true, }, } as const diff --git a/packages/design-system/lib/components/ButtonLink/ButtonLink.stories.tsx b/packages/design-system/lib/components/ButtonLink/ButtonLink.stories.tsx index 60a5189ff..9338ce0fc 100644 --- a/packages/design-system/lib/components/ButtonLink/ButtonLink.stories.tsx +++ b/packages/design-system/lib/components/ButtonLink/ButtonLink.stories.tsx @@ -1,20 +1,20 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { expect, fn } from 'storybook/test' +import { expect, fn } from "storybook/test" -import ButtonLink from '.' -import buttonMeta from '../Button/Button.stories' +import ButtonLink from "." +import buttonMeta from "../Button/Button.stories" const meta: Meta = { - title: 'Core Components/ButtonLink', + title: "Core Components/ButtonLink", component: ButtonLink, argTypes: { onClick: { table: { - type: { summary: 'function' }, - defaultValue: { summary: 'undefined' }, + type: { summary: "function" }, + defaultValue: { summary: "undefined" }, }, - description: 'Callback function to handle link click events.', + description: "Callback function to handle link click events.", }, variant: buttonMeta.argTypes?.variant, color: buttonMeta.argTypes?.color, @@ -25,16 +25,16 @@ const meta: Meta = { fullWidth: buttonMeta.argTypes?.fullWidth, href: { table: { - type: { summary: 'string' }, - defaultValue: { summary: 'undefined' }, + type: { summary: "string" }, + defaultValue: { summary: "undefined" }, }, - description: 'The URL that the link points to.', + description: "The URL that the link points to.", }, }, } const globalStoryPropsInverted = { - backgrounds: { value: 'scandicPrimaryDark' }, + backgrounds: { value: "scandicPrimaryDark" }, } export default meta @@ -43,12 +43,12 @@ type Story = StoryObj export const Default: Story = { args: { onClick: fn(), - href: '#', - children: 'Button link', + href: "#", + children: "Button link", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -56,12 +56,12 @@ export const Default: Story = { export const PrimaryLarge: Story = { args: { ...Default.args, - variant: 'Primary', - size: 'lg', + variant: "Primary", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -69,11 +69,11 @@ export const PrimaryLarge: Story = { export const PrimaryMedium: Story = { args: { ...PrimaryLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -81,11 +81,11 @@ export const PrimaryMedium: Story = { export const PrimarySmall: Story = { args: { ...PrimaryLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -94,12 +94,12 @@ export const PrimaryOnDarkBackground: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - variant: 'Primary', - size: 'lg', + variant: "Primary", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -108,14 +108,14 @@ export const PrimaryInvertedLarge: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - variant: 'Primary', - color: 'Inverted', - size: 'lg', + variant: "Primary", + color: "Inverted", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -124,11 +124,11 @@ export const PrimaryInvertedMedium: Story = { globals: globalStoryPropsInverted, args: { ...PrimaryInvertedLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -137,11 +137,11 @@ export const PrimaryInvertedSmall: Story = { globals: globalStoryPropsInverted, args: { ...PrimaryInvertedLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -149,12 +149,12 @@ export const PrimaryInvertedSmall: Story = { export const SecondaryLarge: Story = { args: { ...Default.args, - variant: 'Secondary', - size: 'lg', + variant: "Secondary", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -162,11 +162,11 @@ export const SecondaryLarge: Story = { export const SecondaryMedium: Story = { args: { ...SecondaryLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -174,11 +174,11 @@ export const SecondaryMedium: Story = { export const SecondarySmall: Story = { args: { ...SecondaryLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -187,13 +187,13 @@ export const SecondaryInvertedLarge: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - variant: 'Secondary', - color: 'Inverted', - size: 'lg', + variant: "Secondary", + color: "Inverted", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -202,11 +202,11 @@ export const SecondaryInvertedMedium: Story = { globals: globalStoryPropsInverted, args: { ...SecondaryInvertedLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -215,11 +215,11 @@ export const SecondaryInvertedSmall: Story = { globals: globalStoryPropsInverted, args: { ...SecondaryInvertedLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -227,12 +227,12 @@ export const SecondaryInvertedSmall: Story = { export const TertiaryLarge: Story = { args: { ...Default.args, - variant: 'Tertiary', - size: 'lg', + variant: "Tertiary", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -240,11 +240,11 @@ export const TertiaryLarge: Story = { export const TertiaryMedium: Story = { args: { ...TertiaryLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -252,11 +252,11 @@ export const TertiaryMedium: Story = { export const TertiarySmall: Story = { args: { ...TertiaryLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -264,12 +264,12 @@ export const TertiarySmall: Story = { export const TextLarge: Story = { args: { ...Default.args, - variant: 'Text', - size: 'lg', + variant: "Text", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -277,11 +277,11 @@ export const TextLarge: Story = { export const TextMedium: Story = { args: { ...TextLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -289,11 +289,11 @@ export const TextMedium: Story = { export const TextSmall: Story = { args: { ...TextLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -301,12 +301,12 @@ export const TextSmall: Story = { export const TextNoWrapping: Story = { args: { ...TextLarge.args, - children: 'Text button with wrapping false', + children: "Text button with wrapping false", wrapping: false, }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -315,13 +315,13 @@ export const TextInvertedLarge: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - variant: 'Text', - color: 'Inverted', - size: 'lg', + variant: "Text", + color: "Inverted", + size: "lg", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -330,11 +330,11 @@ export const TextInvertedMedium: Story = { globals: globalStoryPropsInverted, args: { ...TextInvertedLarge.args, - size: 'md', + size: "md", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -343,11 +343,11 @@ export const TextInvertedSmall: Story = { globals: globalStoryPropsInverted, args: { ...TextInvertedLarge.args, - size: 'sm', + size: "sm", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -355,13 +355,13 @@ export const TextInvertedSmall: Story = { export const TextWithIcon: Story = { args: { ...Default.args, - variant: 'Text', - children: 'Text with icon', - trailingIconName: 'chevron_right', + variant: "Text", + children: "Text with icon", + trailingIconName: "chevron_right", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -370,11 +370,11 @@ export const TextWithIconInverted: Story = { globals: globalStoryPropsInverted, args: { ...TextWithIcon.args, - color: 'Inverted', + color: "Inverted", }, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } diff --git a/packages/design-system/lib/components/ButtonLink/index.tsx b/packages/design-system/lib/components/ButtonLink/index.tsx index fccc8b1df..d7a85be49 100644 --- a/packages/design-system/lib/components/ButtonLink/index.tsx +++ b/packages/design-system/lib/components/ButtonLink/index.tsx @@ -1,19 +1,19 @@ -'use client' +"use client" -import { type ComponentProps } from 'react' +import { type ComponentProps } from "react" -import { variants } from './variants' +import { variants } from "./variants" -import type { VariantProps } from 'class-variance-authority' -import Link from 'next/link' -import { useIntl } from 'react-intl' -import { ButtonIconName } from '../Button/types' -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' +import type { VariantProps } from "class-variance-authority" +import Link from "next/link" +import { useIntl } from "react-intl" +import { ButtonIconName } from "../Button/types" +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" export interface ButtonLinkProps extends - Omit, 'color'>, + Omit, "color">, VariantProps { leadingIconName?: ButtonIconName | null trailingIconName?: ButtonIconName | null @@ -44,30 +44,30 @@ export default function ButtonLink({ const intl = useIntl() const newTabText = intl.formatMessage({ - id: 'common.linkOpenInNewTab', - defaultMessage: 'Opens in a new tab/window', + id: "common.linkOpenInNewTab", + defaultMessage: "Opens in a new tab/window", }) return ( {leadingIconName ? ( ) : null} {children} @@ -75,7 +75,7 @@ export default function ButtonLink({ ) : null} diff --git a/packages/design-system/lib/components/ButtonLink/variants.ts b/packages/design-system/lib/components/ButtonLink/variants.ts index 2318e1490..91b8a5db1 100644 --- a/packages/design-system/lib/components/ButtonLink/variants.ts +++ b/packages/design-system/lib/components/ButtonLink/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import { withButton } from '../Button' -import buttonStyles from '../Button/button.module.css' +import { withButton } from "../Button" +import buttonStyles from "../Button/button.module.css" export const variants = cva([buttonStyles.button], withButton({})) diff --git a/packages/design-system/lib/components/Caption/index.tsx b/packages/design-system/lib/components/Caption/index.tsx index b459463c3..c8abb5914 100644 --- a/packages/design-system/lib/components/Caption/index.tsx +++ b/packages/design-system/lib/components/Caption/index.tsx @@ -1,10 +1,11 @@ -import { Slot } from '@radix-ui/react-slot' +import { Slot } from "@radix-ui/react-slot" -import { captionVariants, fontOnlycaptionVariants } from './variants' -import { VariantProps } from 'class-variance-authority' +import { captionVariants, fontOnlycaptionVariants } from "./variants" +import { VariantProps } from "class-variance-authority" interface CaptionProps - extends Omit, 'color'>, + extends + Omit, "color">, VariantProps { asChild?: boolean fontOnly?: boolean @@ -15,7 +16,7 @@ interface CaptionProps */ export default function Caption({ asChild = false, - className = '', + className = "", color, fontOnly = false, textAlign, @@ -25,7 +26,7 @@ export default function Caption({ type, ...props }: CaptionProps) { - const Comp = asChild ? Slot : 'p' + const Comp = asChild ? Slot : "p" const classNames = fontOnly ? fontOnlycaptionVariants({ className, diff --git a/packages/design-system/lib/components/Caption/variants.ts b/packages/design-system/lib/components/Caption/variants.ts index c8b570b8e..2fb5caaae 100644 --- a/packages/design-system/lib/components/Caption/variants.ts +++ b/packages/design-system/lib/components/Caption/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './caption.module.css' +import styles from "./caption.module.css" const config = { variants: { @@ -44,8 +44,8 @@ const config = { }, }, defaultVariants: { - color: 'black', - type: 'regular', + color: "black", + type: "regular", }, } as const @@ -70,7 +70,7 @@ const fontOnlyConfig = { }, }, defaultVariants: { - type: 'regular', + type: "regular", }, } as const diff --git a/packages/design-system/lib/components/Card/Card.stories.tsx b/packages/design-system/lib/components/Card/Card.stories.tsx index 1e8b9003b..acdda5368 100644 --- a/packages/design-system/lib/components/Card/Card.stories.tsx +++ b/packages/design-system/lib/components/Card/Card.stories.tsx @@ -1,9 +1,9 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { Card } from './Card.tsx' +import { Card } from "./Card.tsx" const meta: Meta = { - title: 'Core Components/Card', + title: "Core Components/Card", component: Card, } @@ -13,13 +13,13 @@ type Story = StoryObj export const Default: Story = { args: { - as: 'Default', + as: "Default", }, } export const Featured: Story = { args: { ...Default.args, - as: 'Featured', + as: "Featured", }, } diff --git a/packages/design-system/lib/components/Card/Card.tsx b/packages/design-system/lib/components/Card/Card.tsx index d9edd3da9..42edac433 100644 --- a/packages/design-system/lib/components/Card/Card.tsx +++ b/packages/design-system/lib/components/Card/Card.tsx @@ -1,6 +1,6 @@ -import { variants } from './variants' +import { variants } from "./variants" -import type { CardProps } from './types' +import type { CardProps } from "./types" export function Card({ as, className, children }: CardProps) { const classNames = variants({ diff --git a/packages/design-system/lib/components/Card/Compositions/ContentCard.stories.tsx b/packages/design-system/lib/components/Card/Compositions/ContentCard.stories.tsx index 342b33fb0..b63fb6d10 100644 --- a/packages/design-system/lib/components/Card/Compositions/ContentCard.stories.tsx +++ b/packages/design-system/lib/components/Card/Compositions/ContentCard.stories.tsx @@ -1,11 +1,11 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { fn } from 'storybook/test' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { fn } from "storybook/test" -import { themes } from '../../../../.storybook/preview' +import { themes } from "../../../../.storybook/preview" -import { Card } from '../' -import { Button } from '../../Button' -import { Typography } from '../../Typography' +import { Card } from "../" +import { Button } from "../../Button" +import { Typography } from "../../Typography" type CompositionProps = React.ComponentPropsWithoutRef & { _onPrimaryPress?: () => void @@ -18,18 +18,18 @@ type CompositionProps = React.ComponentPropsWithoutRef & { } const meta: Meta = { - title: 'Compositions/Card', + title: "Compositions/Card", component: Card, decorators: [ (Story, context) => { - if (context.name.toLowerCase().indexOf('all themes') >= 0) { + if (context.name.toLowerCase().indexOf("all themes") >= 0) { return ( <>

{context.name}

{Object.entries(themes.themes).map(([key, value], ix) => { return ( -
-

{key}

+
+

{key}

) @@ -39,7 +39,7 @@ const meta: Meta = { } return ( -
+
) @@ -47,19 +47,19 @@ const meta: Meta = { ], argTypes: { inMainArea: { - name: 'Is in main area', + name: "Is in main area", }, showTitle: { - name: 'Composition: Show title', + name: "Composition: Show title", }, showPreamble: { - name: 'Composition: Show preamble', + name: "Composition: Show preamble", }, showPrimaryButton: { - name: 'Composition: Show primary button', + name: "Composition: Show primary button", }, showSecondaryButton: { - name: 'Composition: Show secondary button', + name: "Composition: Show secondary button", }, _onPrimaryPress: { table: { @@ -110,7 +110,7 @@ const meta: Meta = { {showSecondaryButton && (
diff --git a/packages/design-system/lib/components/HotelCard/HotelCardDialogImage/variants.ts b/packages/design-system/lib/components/HotelCard/HotelCardDialogImage/variants.ts index 26aa1867e..8ca5bb582 100644 --- a/packages/design-system/lib/components/HotelCard/HotelCardDialogImage/variants.ts +++ b/packages/design-system/lib/components/HotelCard/HotelCardDialogImage/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './hotelCardDialogImage.module.css' +import styles from "./hotelCardDialogImage.module.css" export const hotelCardDialogImageVariants = cva(styles.imageContainer, { variants: { @@ -10,6 +10,6 @@ export const hotelCardDialogImageVariants = cva(styles.imageContainer, { }, }, defaultVariants: { - position: 'top', + position: "top", }, }) diff --git a/packages/design-system/lib/components/HotelCard/HotelCardSkeleton.tsx b/packages/design-system/lib/components/HotelCard/HotelCardSkeleton.tsx index 486182715..87ce8d683 100644 --- a/packages/design-system/lib/components/HotelCard/HotelCardSkeleton.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelCardSkeleton.tsx @@ -1,6 +1,6 @@ -import SkeletonShimmer from '../SkeletonShimmer' +import SkeletonShimmer from "../SkeletonShimmer" -import styles from './HotelCardSkeleton.module.css' +import styles from "./HotelCardSkeleton.module.css" export function HotelCardSkeleton() { return ( diff --git a/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx b/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx index dcd96d840..cdfeb490d 100644 --- a/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelChequeCard/index.tsx @@ -1,10 +1,10 @@ -import { useIntl } from 'react-intl' +import { useIntl } from "react-intl" -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import Caption from '../../Caption' -import Subtitle from '../../Subtitle' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import Caption from "../../Caption" +import Subtitle from "../../Subtitle" -import styles from './hotelChequeCard.module.css' +import styles from "./hotelChequeCard.module.css" type ProductTypeCheque = { localPrice: { @@ -30,8 +30,8 @@ export default function HotelChequeCard({
{intl.formatMessage({ - id: 'common.from', - defaultMessage: 'From', + id: "common.from", + defaultMessage: "From", })}
@@ -58,16 +58,16 @@ export default function HotelChequeCard({
{intl.formatMessage({ - id: 'booking.approx', - defaultMessage: 'Approx.', + id: "booking.approx", + defaultMessage: "Approx.", })} {productTypeCheque.requestedPrice.numberOfCheques} {CurrencyEnum.CC} {productTypeCheque.requestedPrice.additionalPricePerStay ? // eslint-disable-next-line formatjs/no-literal-string-in-jsx - ' + ' - : ''} + " + " + : ""} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} {`${productTypeCheque.requestedPrice.additionalPricePerStay} ${productTypeCheque.requestedPrice.currency}`} diff --git a/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/StandaloneHotelCardDialog.stories.tsx b/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/StandaloneHotelCardDialog.stories.tsx index b46b2cfcf..e67789eb7 100644 --- a/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/StandaloneHotelCardDialog.stories.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/StandaloneHotelCardDialog.stories.tsx @@ -1,12 +1,12 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { StandaloneHotelCardDialog } from './index' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { StandaloneHotelCardDialog } from "./index" -import { Lang } from '@scandic-hotels/common/constants/language' -import { fn } from 'storybook/test' -import { hotelPins } from '../../../Map/InteractiveMap/storybookData' +import { Lang } from "@scandic-hotels/common/constants/language" +import { fn } from "storybook/test" +import { hotelPins } from "../../../Map/InteractiveMap/storybookData" const meta: Meta = { - title: 'Product Components/HotelCard/StandaloneHotelCardDialog', + title: "Product Components/HotelCard/StandaloneHotelCardDialog", component: StandaloneHotelCardDialog, argTypes: {}, } diff --git a/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx b/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx index bb14febc2..85c14f5ba 100644 --- a/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelDialogCard/StandaloneHotelCardDialog/index.tsx @@ -1,24 +1,24 @@ -'use client' +"use client" -import { useState } from 'react' -import { useIntl } from 'react-intl' +import { useState } from "react" +import { useIntl } from "react-intl" -import { IconButton } from '../../../IconButton' -import { Typography } from '../../../Typography' +import { IconButton } from "../../../IconButton" +import { Typography } from "../../../Typography" -import { HotelCardDialogImage } from '../../HotelCardDialogImage' -import { NoPriceAvailableCard } from '../../NoPriceAvailableCard' +import { HotelCardDialogImage } from "../../HotelCardDialogImage" +import { NoPriceAvailableCard } from "../../NoPriceAvailableCard" -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import { Lang } from '@scandic-hotels/common/constants/language' -import { selectRate } from '@scandic-hotels/common/constants/routes/hotelReservation' -import { useUrlWithSearchParam } from '@scandic-hotels/common/hooks/useUrlWithSearchParam' -import ButtonLink from '../../../ButtonLink' -import { FacilityToIcon } from '../../../FacilityToIcon' -import { HotelPin } from '../../../Map/types' -import { HotelPointsRow } from '../../HotelPointsRow' -import { RoomPrice } from '../../RoomPrice' -import styles from './standaloneHotelCardDialog.module.css' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { Lang } from "@scandic-hotels/common/constants/language" +import { selectRate } from "@scandic-hotels/common/constants/routes/hotelReservation" +import { useUrlWithSearchParam } from "@scandic-hotels/common/hooks/useUrlWithSearchParam" +import ButtonLink from "../../../ButtonLink" +import { FacilityToIcon } from "../../../FacilityToIcon" +import { HotelPin } from "../../../Map/types" +import { HotelPointsRow } from "../../HotelPointsRow" +import { RoomPrice } from "../../RoomPrice" +import styles from "./standaloneHotelCardDialog.module.css" interface StandaloneHotelCardProps { lang: Lang @@ -55,13 +55,13 @@ export function StandaloneHotelCardDialog({ } = data const notEnoughPointsLabel = intl.formatMessage({ - id: 'booking.notEnoughPoints', - defaultMessage: 'Not enough points', + id: "booking.notEnoughPoints", + defaultMessage: "Not enough points", }) const shouldShowNotEnoughPoints = redemptionPrice && !hasEnoughPoints const selectRateUrl = useUrlWithSearchParam( - { key: 'hotel', value: operaId }, + { key: "hotel", value: operaId }, selectRate(lang) ) const showPriceCard = !!( @@ -80,8 +80,8 @@ export function StandaloneHotelCardDialog({ className={styles.closeButton} onPress={handleClose} aria-label={intl.formatMessage({ - id: 'common.close', - defaultMessage: 'Close', + id: "common.close", + defaultMessage: "Close", })} iconName="close" /> @@ -119,12 +119,12 @@ export function StandaloneHotelCardDialog({

{redemptionPrice ? intl.formatMessage({ - id: 'hotelCard.availableRates', - defaultMessage: 'Available rates', + id: "hotelCard.availableRates", + defaultMessage: "Available rates", }) : intl.formatMessage({ - id: 'common.from', - defaultMessage: 'From', + id: "common.from", + defaultMessage: "From", })}

@@ -189,8 +189,8 @@ export function StandaloneHotelCardDialog({ onClick={onClick} > {intl.formatMessage({ - id: 'common.seeRooms', - defaultMessage: 'See rooms', + id: "common.seeRooms", + defaultMessage: "See rooms", })} )} diff --git a/packages/design-system/lib/components/HotelCard/HotelPointsRow/index.tsx b/packages/design-system/lib/components/HotelCard/HotelPointsRow/index.tsx index fcf50e158..cd3e234fc 100644 --- a/packages/design-system/lib/components/HotelCard/HotelPointsRow/index.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelPointsRow/index.tsx @@ -1,10 +1,10 @@ -import { useIntl } from 'react-intl' +import { useIntl } from "react-intl" -import { RoomPrice } from '../../HotelCard/RoomPrice' -import { Typography } from '../../Typography' +import { RoomPrice } from "../../HotelCard/RoomPrice" +import { Typography } from "../../Typography" -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import styles from './hotelPointsRow.module.css' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import styles from "./hotelPointsRow.module.css" export type PointsRowProps = { pointsPerStay: number @@ -27,8 +27,8 @@ export function HotelPointsRow({ currency={ pointsCurrency ?? intl.formatMessage({ - id: 'common.points', - defaultMessage: 'Points', + id: "common.points", + defaultMessage: "Points", }) } includePerNight={false} diff --git a/packages/design-system/lib/components/HotelCard/HotelPriceCard/index.tsx b/packages/design-system/lib/components/HotelCard/HotelPriceCard/index.tsx index 238b58d53..fafd0ef96 100644 --- a/packages/design-system/lib/components/HotelCard/HotelPriceCard/index.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelPriceCard/index.tsx @@ -1,10 +1,10 @@ -import { cx } from 'class-variance-authority' -import { useIntl } from 'react-intl' +import { cx } from "class-variance-authority" +import { useIntl } from "react-intl" -import { Divider } from '../../Divider' -import { RateTypeEnum } from '@scandic-hotels/common/constants/rateType' -import { Typography } from '../../Typography' -import styles from './hotelPriceCard.module.css' +import { Divider } from "../../Divider" +import { RateTypeEnum } from "@scandic-hotels/common/constants/rateType" +import { Typography } from "../../Typography" +import styles from "./hotelPriceCard.module.css" type Price = { pricePerStay: number @@ -49,16 +49,16 @@ export function HotelPriceCard({

{isPartnerBrand ? intl.formatMessage({ - id: 'booking.scandicFriendsMemberPrice', - defaultMessage: 'Scandic Friends member price', + id: "booking.scandicFriendsMemberPrice", + defaultMessage: "Scandic Friends member price", description: { context: - 'Member price label in white label partner sites', + "Member price label in white label partner sites", }, }) : intl.formatMessage({ - id: 'booking.memberPrice', - defaultMessage: 'Member price', + id: "booking.memberPrice", + defaultMessage: "Member price", })}

@@ -73,8 +73,8 @@ export function HotelPriceCard({ >

{intl.formatMessage({ - id: 'booking.standardPrice', - defaultMessage: 'Standard price', + id: "booking.standardPrice", + defaultMessage: "Standard price", })}

@@ -89,8 +89,8 @@ export function HotelPriceCard({ >

{intl.formatMessage({ - id: 'common.from', - defaultMessage: 'From', + id: "common.from", + defaultMessage: "From", })}

@@ -121,8 +121,8 @@ export function HotelPriceCard({ / {intl.formatMessage({ - id: 'common.night', - defaultMessage: 'night', + id: "common.night", + defaultMessage: "night", })}

@@ -139,8 +139,8 @@ export function HotelPriceCard({ >

{intl.formatMessage({ - id: 'booking.approx', - defaultMessage: 'Approx.', + id: "booking.approx", + defaultMessage: "Approx.", })}

@@ -173,8 +173,8 @@ export function HotelPriceCard({ >

{intl.formatMessage({ - id: 'common.total', - defaultMessage: 'Total', + id: "common.total", + defaultMessage: "Total", })}

diff --git a/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx b/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx index 5453fcbe3..7036d3a25 100644 --- a/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx +++ b/packages/design-system/lib/components/HotelCard/HotelVoucherCard/index.tsx @@ -1,9 +1,9 @@ -import { useIntl } from 'react-intl' +import { useIntl } from "react-intl" -import Caption from '../../Caption' -import Subtitle from '../../Subtitle' +import Caption from "../../Caption" +import Subtitle from "../../Subtitle" -import styles from './hotelVoucherCard.module.css' +import styles from "./hotelVoucherCard.module.css" type ProductTypeVoucher = { numberOfVouchers: number @@ -20,8 +20,8 @@ export default function HotelVoucherCard({
{intl.formatMessage({ - id: 'common.from', - defaultMessage: 'From', + id: "common.from", + defaultMessage: "From", })}
@@ -31,9 +31,9 @@ export default function HotelVoucherCard({ {intl.formatMessage( { - id: 'price.numberOfVouchers', + id: "price.numberOfVouchers", defaultMessage: - '{numberOfVouchers, plural, one {Voucher} other {Vouchers}}', + "{numberOfVouchers, plural, one {Voucher} other {Vouchers}}", }, { numberOfVouchers: productTypeVoucher.numberOfVouchers, diff --git a/packages/design-system/lib/components/HotelCard/NoPriceAvailableCard/index.tsx b/packages/design-system/lib/components/HotelCard/NoPriceAvailableCard/index.tsx index b7d2d6bcd..2ffaa214e 100644 --- a/packages/design-system/lib/components/HotelCard/NoPriceAvailableCard/index.tsx +++ b/packages/design-system/lib/components/HotelCard/NoPriceAvailableCard/index.tsx @@ -1,9 +1,9 @@ -import { useIntl } from 'react-intl' +import { useIntl } from "react-intl" -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { Typography } from '../../Typography' +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { Typography } from "../../Typography" -import styles from './noPriceAvailable.module.css' +import styles from "./noPriceAvailable.module.css" export function NoPriceAvailableCard() { const intl = useIntl() @@ -14,9 +14,9 @@ export function NoPriceAvailableCard() { {intl.formatMessage({ - id: 'booking.noRoomsAvailable', + id: "booking.noRoomsAvailable", defaultMessage: - 'There are no rooms available that match your request.', + "There are no rooms available that match your request.", })} diff --git a/packages/design-system/lib/components/HotelCard/RoomPrice/index.tsx b/packages/design-system/lib/components/HotelCard/RoomPrice/index.tsx index a638f8b14..21f260483 100644 --- a/packages/design-system/lib/components/HotelCard/RoomPrice/index.tsx +++ b/packages/design-system/lib/components/HotelCard/RoomPrice/index.tsx @@ -1,5 +1,5 @@ -import { useIntl } from 'react-intl' -import { Typography } from '../../Typography' +import { useIntl } from "react-intl" +import { Typography } from "../../Typography" interface RoomPriceProps extends React.HTMLAttributes { price: number @@ -31,8 +31,8 @@ export function RoomPrice({ / {intl.formatMessage({ - id: 'common.night', - defaultMessage: 'night', + id: "common.night", + defaultMessage: "night", })} diff --git a/packages/design-system/lib/components/HotelCard/index.tsx b/packages/design-system/lib/components/HotelCard/index.tsx index cff7e5ebe..cd00cd2da 100644 --- a/packages/design-system/lib/components/HotelCard/index.tsx +++ b/packages/design-system/lib/components/HotelCard/index.tsx @@ -1,42 +1,42 @@ -'use client' +"use client" -import NextLink from 'next/link' -import { type ReadonlyURLSearchParams, useSearchParams } from 'next/navigation' -import { memo, useState } from 'react' -import { useFocusWithin } from 'react-aria' -import { useIntl } from 'react-intl' +import NextLink from "next/link" +import { type ReadonlyURLSearchParams, useSearchParams } from "next/navigation" +import { memo, useState } from "react" +import { useFocusWithin } from "react-aria" +import { useIntl } from "react-intl" import { alternativeHotelsMap, selectHotelMap, selectRate, -} from '@scandic-hotels/common/constants/routes/hotelReservation' -import { getSingleDecimal } from '@scandic-hotels/common/utils/numberFormatting' -import Caption from '../Caption' -import { Divider } from '../Divider' -import { FacilityToIcon } from '../FacilityToIcon' -import HotelLogoIcon from '../Icons/Logos' -import ImageGallery, { GalleryImage } from '../ImageGallery' -import Link from '../OldDSLink' -import { Typography } from '../Typography' -import { HotelPointsRow } from './HotelPointsRow' -import { NoPriceAvailableCard } from './NoPriceAvailableCard' +} from "@scandic-hotels/common/constants/routes/hotelReservation" +import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting" +import Caption from "../Caption" +import { Divider } from "../Divider" +import { FacilityToIcon } from "../FacilityToIcon" +import HotelLogoIcon from "../Icons/Logos" +import ImageGallery, { GalleryImage } from "../ImageGallery" +import Link from "../OldDSLink" +import { Typography } from "../Typography" +import { HotelPointsRow } from "./HotelPointsRow" +import { NoPriceAvailableCard } from "./NoPriceAvailableCard" -import HotelChequeCard from './HotelChequeCard' -import { HotelPriceCard } from './HotelPriceCard' -import HotelVoucherCard from './HotelVoucherCard' -import { hotelCardVariants } from './variants' +import HotelChequeCard from "./HotelChequeCard" +import { HotelPriceCard } from "./HotelPriceCard" +import HotelVoucherCard from "./HotelVoucherCard" +import { hotelCardVariants } from "./variants" -import styles from './hotelCard.module.css' +import styles from "./hotelCard.module.css" -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import { FacilityEnum } from '@scandic-hotels/common/constants/facilities' -import { HotelType } from '@scandic-hotels/common/constants/hotelType' -import type { Lang } from '@scandic-hotels/common/constants/language' -import { RateTypeEnum } from '@scandic-hotels/common/constants/rateType' -import { BookingCodeChip } from '../BookingCodeChip' -import { FakeButton } from '../FakeButton' -import { TripAdvisorChip } from '../TripAdvisorChip' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { FacilityEnum } from "@scandic-hotels/common/constants/facilities" +import { HotelType } from "@scandic-hotels/common/constants/hotelType" +import type { Lang } from "@scandic-hotels/common/constants/language" +import { RateTypeEnum } from "@scandic-hotels/common/constants/rateType" +import { BookingCodeChip } from "../BookingCodeChip" +import { FakeButton } from "../FakeButton" +import { TripAdvisorChip } from "../TripAdvisorChip" type Price = { pricePerStay: number @@ -104,8 +104,8 @@ export type HotelCardProps = { images: GalleryImage[] distanceToCityCenter: number isUserLoggedIn: boolean - type?: 'mapListing' | 'pageListing' - state?: 'default' | 'active' + type?: "mapListing" | "pageListing" + state?: "default" | "active" bookingCode?: string | null isAlternative?: boolean isPartnerBrand: boolean @@ -129,9 +129,9 @@ export const HotelCardComponent = memo( hotel, distanceToCityCenter, isUserLoggedIn, - state = 'default', - type = 'pageListing', - bookingCode = '', + state = "default", + type = "pageListing", + bookingCode = "", isAlternative, isPartnerBrand, pointsCurrency, @@ -179,8 +179,8 @@ export const HotelCardComponent = memo( (r) => r.hasEnoughPoints ) const notEnoughPointsLabel = intl.formatMessage({ - id: 'booking.notEnoughPoints', - defaultMessage: 'Not enough points', + id: "booking.notEnoughPoints", + defaultMessage: "Not enough points", }) const isDisabled = prices?.redemptions?.length && hasInsufficientPoints @@ -230,12 +230,12 @@ export const HotelCardComponent = memo(
- {type == 'mapListing' && ( + {type == "mapListing" && (

{addressStr}

)} - {type === 'pageListing' && ( + {type === "pageListing" && ( @@ -261,8 +261,8 @@ export const HotelCardComponent = memo( {intl.formatMessage( { - id: 'common.kmToCityCenter', - defaultMessage: '{number} km to city center', + id: "common.kmToCityCenter", + defaultMessage: "{number} km to city center", }, { number: getSingleDecimal(distanceToCityCenter / 1000), @@ -343,8 +343,8 @@ export const HotelCardComponent = memo(
{intl.formatMessage({ - id: 'hotelCard.availableRates', - defaultMessage: 'Available rates', + id: "hotelCard.availableRates", + defaultMessage: "Available rates", })} {prices.redemptions.map((redemption) => ( @@ -371,8 +371,8 @@ export const HotelCardComponent = memo( {isDisabled ? notEnoughPointsLabel : intl.formatMessage({ - id: 'common.seeRooms', - defaultMessage: 'See rooms', + id: "common.seeRooms", + defaultMessage: "See rooms", })} @@ -415,11 +415,11 @@ function PricesWrapper({ } const params = new URLSearchParams(searchParams) - params.delete('city') - params.set('hotel', hotelId) + params.delete("city") + params.set("hotel", hotelId) if (removeBookingCodeFromSearchParams) { - params.delete('bookingCode') + params.delete("bookingCode") } const href = `${pathname}?${params.toString()}` diff --git a/packages/design-system/lib/components/HotelCard/variants.ts b/packages/design-system/lib/components/HotelCard/variants.ts index 11c203057..7a136e74b 100644 --- a/packages/design-system/lib/components/HotelCard/variants.ts +++ b/packages/design-system/lib/components/HotelCard/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './hotelCard.module.css' +import styles from "./hotelCard.module.css" export const hotelCardVariants = cva(styles.card, { variants: { @@ -14,7 +14,7 @@ export const hotelCardVariants = cva(styles.card, { }, }, defaultVariants: { - type: 'pageListing', - state: 'default', + type: "pageListing", + state: "default", }, }) diff --git a/packages/design-system/lib/components/HotelInfoCard/HotelDescription/index.tsx b/packages/design-system/lib/components/HotelInfoCard/HotelDescription/index.tsx index d66020123..9672d8dff 100644 --- a/packages/design-system/lib/components/HotelInfoCard/HotelDescription/index.tsx +++ b/packages/design-system/lib/components/HotelInfoCard/HotelDescription/index.tsx @@ -1,14 +1,14 @@ -'use client' +"use client" -import { useState } from 'react' -import { Button as ButtonRAC } from 'react-aria-components' -import { useIntl } from 'react-intl' +import { useState } from "react" +import { Button as ButtonRAC } from "react-aria-components" +import { useIntl } from "react-intl" -import { FacilityToIcon } from '../..//FacilityToIcon' -import { Typography } from '../../Typography' +import { FacilityToIcon } from "../..//FacilityToIcon" +import { Typography } from "../../Typography" -import styles from './hotelDescription.module.css' -import { FacilityEnum } from '@scandic-hotels/common/constants/facilities' +import styles from "./hotelDescription.module.css" +import { FacilityEnum } from "@scandic-hotels/common/constants/facilities" export default function HotelDescription({ description, @@ -29,13 +29,13 @@ export default function HotelDescription({ } const textShowMore = intl.formatMessage({ - id: 'common.showMore', - defaultMessage: 'Show more', + id: "common.showMore", + defaultMessage: "Show more", }) const textShowLess = intl.formatMessage({ - id: 'common.showLess', - defaultMessage: 'Show less', + id: "common.showLess", + defaultMessage: "Show less", }) return ( diff --git a/packages/design-system/lib/components/HotelInfoCard/HotelInfoCard.stories.tsx b/packages/design-system/lib/components/HotelInfoCard/HotelInfoCard.stories.tsx index 50de51e9e..bd22abd0a 100644 --- a/packages/design-system/lib/components/HotelInfoCard/HotelInfoCard.stories.tsx +++ b/packages/design-system/lib/components/HotelInfoCard/HotelInfoCard.stories.tsx @@ -1,14 +1,14 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert' -import { FacilityEnum } from '@scandic-hotels/common/constants/facilities' -import { fn } from 'storybook/test' -import { Button } from '../Button' -import { MaterialIcon } from '../Icons/MaterialIcon' -import { HotelInfoCard } from './index' +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { FacilityEnum } from "@scandic-hotels/common/constants/facilities" +import { fn } from "storybook/test" +import { Button } from "../Button" +import { MaterialIcon } from "../Icons/MaterialIcon" +import { HotelInfoCard } from "./index" const meta: Meta = { - title: 'Product Components/HotelInfoCard', + title: "Product Components/HotelInfoCard", component: HotelInfoCard, argTypes: {}, } @@ -20,38 +20,38 @@ type Story = StoryObj export const Default: Story = { argTypes: { alerts: { - control: 'select', - options: ['none', 'info', 'warning', 'alarm', 'success'], + control: "select", + options: ["none", "info", "warning", "alarm", "success"], mapping: { none: [], info: [ { - id: '1', - heading: 'Hot dog alert', + id: "1", + heading: "Hot dog alert", text: `They are handing out free hot dogs available in the square outside the hotel.`, type: AlertTypeEnum.Info, }, ], warning: [ { - id: '1', - heading: 'Construction work', + id: "1", + heading: "Construction work", text: `There is construction work going on outside the hotel. Expect some noise during daytime.`, type: AlertTypeEnum.Warning, }, ], success: [ { - id: '1', - heading: 'Free breakfast', + id: "1", + heading: "Free breakfast", text: `We are now serving free breakfast in the lobby between 7-10am.`, type: AlertTypeEnum.Success, }, ], alarm: [ { - id: '1', - heading: 'Fire alarm', + id: "1", + heading: "Fire alarm", text: `The fire alarm is activated. Please evacuate the building immediately using the nearest exit.`, type: AlertTypeEnum.Alarm, }, @@ -60,11 +60,11 @@ export const Default: Story = { }, slot: { - control: 'select', - description: 'A slot where you can inject components', - options: ['none', 'button'], + control: "select", + description: "A slot where you can inject components", + options: ["none", "button"], table: { - defaultValue: { summary: 'button' }, + defaultValue: { summary: "button" }, }, mapping: { none: null, @@ -78,40 +78,40 @@ export const Default: Story = { }, args: { hotel: { - id: '1', - name: 'Grand Hotel Budapest', - url: 'https://www.scandichotels.com/en/hello', + id: "1", + name: "Grand Hotel Budapest", + url: "https://www.scandichotels.com/en/hello", ratings: { tripAdvisor: { rating: 4.5 }, }, }, address: { - city: 'Budapest', + city: "Budapest", kilometersToCentre: 0.5, - streetAddress: '1 Main St', + streetAddress: "1 Main St", }, description: "Escape to the crown jewel of the Republic of Zubrowka, where timeless luxury awaits atop our breathtaking mountain sanctuary. The Grand Budapest Hotel stands as Europe's most distinguished retreat, a rose-colored palace that has welcomed discerning guests since the golden age of travel.", facilities: [ - { id: FacilityEnum.AirConAirCooling, name: 'Air Conditioning' }, - { id: FacilityEnum.FoodDrinks247, name: 'Food & Drinks 24/7' }, - { id: FacilityEnum.KayaksForLoan, name: 'Kayaks for Loan' }, + { id: FacilityEnum.AirConAirCooling, name: "Air Conditioning" }, + { id: FacilityEnum.FoodDrinks247, name: "Food & Drinks 24/7" }, + { id: FacilityEnum.KayaksForLoan, name: "Kayaks for Loan" }, ], galleryImages: [ { - src: './img/GrandHotelBudapest.png', - alt: 'Grand Hotel Budapest', - caption: 'Grand Hotel Budapest', + src: "./img/GrandHotelBudapest.png", + alt: "Grand Hotel Budapest", + caption: "Grand Hotel Budapest", }, { - src: './img/img1.png', - alt: 'Image 1', - caption: 'Image 1', + src: "./img/img1.png", + alt: "Image 1", + caption: "Image 1", }, { - src: './img/img2.png', - alt: 'Image 2', - caption: 'Image 2', + src: "./img/img2.png", + alt: "Image 2", + caption: "Image 2", }, ], alerts: [], diff --git a/packages/design-system/lib/components/HotelInfoCard/index.tsx b/packages/design-system/lib/components/HotelInfoCard/index.tsx index 3de1d8b37..92aaef5a7 100644 --- a/packages/design-system/lib/components/HotelInfoCard/index.tsx +++ b/packages/design-system/lib/components/HotelInfoCard/index.tsx @@ -1,20 +1,20 @@ -'use client' +"use client" -import { getSingleDecimal } from '@scandic-hotels/common/utils/numberFormatting' -import { Alert } from '../Alert' -import { Divider } from '../Divider' -import { FacilityToIcon } from '../FacilityToIcon' -import ImageGallery, { GalleryImage } from '../ImageGallery' -import SkeletonShimmer from '../SkeletonShimmer' -import { TripAdvisorChip } from '../TripAdvisorChip' -import { Typography } from '../Typography' +import { getSingleDecimal } from "@scandic-hotels/common/utils/numberFormatting" +import { Alert } from "../Alert" +import { Divider } from "../Divider" +import { FacilityToIcon } from "../FacilityToIcon" +import ImageGallery, { GalleryImage } from "../ImageGallery" +import SkeletonShimmer from "../SkeletonShimmer" +import { TripAdvisorChip } from "../TripAdvisorChip" +import { Typography } from "../Typography" -import HotelDescription from './HotelDescription' +import HotelDescription from "./HotelDescription" -import styles from './hotelInfoCard.module.css' -import { useIntl } from 'react-intl' -import { AlertTypeEnum } from '@scandic-hotels/common/constants/alert' -import { FacilityEnum } from '@scandic-hotels/common/constants/facilities' +import styles from "./hotelInfoCard.module.css" +import { useIntl } from "react-intl" +import { AlertTypeEnum } from "@scandic-hotels/common/constants/alert" +import { FacilityEnum } from "@scandic-hotels/common/constants/facilities" export type HotelInfoCardProps = { hotel: { @@ -32,7 +32,7 @@ export type HotelInfoCardProps = { kilometersToCentre: number } galleryImages: GalleryImage[] - alerts: SpecialAlertProps['alert'][] + alerts: SpecialAlertProps["alert"][] facilities: { id: FacilityEnum name: string @@ -72,9 +72,9 @@ export function HotelInfoCard({

{intl.formatMessage( { - id: 'hotelInfoCard.kmToCityCenter', + id: "hotelInfoCard.kmToCityCenter", defaultMessage: - '{address}, {city} โˆ™ {distanceToCityCenterInKm} km to city center', + "{address}, {city} โˆ™ {distanceToCityCenterInKm} km to city center", }, { address: address.streetAddress, diff --git a/packages/design-system/lib/components/IconButton/IconButton.stories.tsx b/packages/design-system/lib/components/IconButton/IconButton.stories.tsx index cf40317d9..6ac22f81f 100644 --- a/packages/design-system/lib/components/IconButton/IconButton.stories.tsx +++ b/packages/design-system/lib/components/IconButton/IconButton.stories.tsx @@ -1,99 +1,99 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { expect, fn } from 'storybook/test' +import { expect, fn } from "storybook/test" -import { IconButton } from './IconButton' -import { iconButtonIconNames, IconButtonProps } from './types' -import { config } from './variants' +import { IconButton } from "./IconButton" +import { iconButtonIconNames, IconButtonProps } from "./types" +import { config } from "./variants" const meta: Meta = { - title: 'Core Components/IconButton', + title: "Core Components/IconButton", component: IconButton, argTypes: { onPress: { table: { - type: { summary: 'function' }, - defaultValue: { summary: 'undefined' }, + type: { summary: "function" }, + defaultValue: { summary: "undefined" }, }, - description: 'Callback function to handle button press events.', + description: "Callback function to handle button press events.", }, variant: { - control: 'select', + control: "select", options: Object.keys(config.variants.variant), table: { defaultValue: { summary: config.defaultVariants.variant, }, type: { - summary: Object.keys(config.variants.variant).join(' | '), + summary: Object.keys(config.variants.variant).join(" | "), }, }, }, size: { - control: 'select', + control: "select", options: Object.keys(config.variants.size), table: { defaultValue: { summary: config.defaultVariants.size, }, type: { - summary: Object.keys(config.variants.size).join(' | '), + summary: Object.keys(config.variants.size).join(" | "), }, }, description: - 'The size of the `IconButton`. Please note that you control the size of the icon inside the button separately. Please check the examples below for recommended icon sizes for each button size.', + "The size of the `IconButton`. Please note that you control the size of the icon inside the button separately. Please check the examples below for recommended icon sizes for each button size.", }, emphasis: { - control: 'boolean', + control: "boolean", options: Object.keys(config.variants.emphasis), table: { defaultValue: { summary: config.defaultVariants.emphasis.toString(), }, type: { - summary: 'boolean', + summary: "boolean", }, }, }, iconName: { - control: 'select', + control: "select", options: iconButtonIconNames, table: { - type: { summary: iconButtonIconNames.join(' | ') }, - defaultValue: { summary: 'undefined' }, + type: { summary: iconButtonIconNames.join(" | ") }, + defaultValue: { summary: "undefined" }, }, - description: 'Name of the Material Icon to use as icon.', + description: "Name of the Material Icon to use as icon.", }, isDisabled: { - control: 'boolean', + control: "boolean", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, }, } const globalStoryPropsInverted = { - backgrounds: { value: 'scandicPrimaryDark' }, + backgrounds: { value: "scandicPrimaryDark" }, } export default meta type Story = StoryObj function renderAllSizesFn( - args: Story['args'], - iconName: IconButtonProps['iconName'] = 'search' + args: Story["args"], + iconName: IconButtonProps["iconName"] = "search" ) { return ( -

+
{Object.keys(config.variants.size).map((size) => (
@@ -113,10 +113,10 @@ function renderAllSizesFn( export const Default: Story = { args: { onPress: fn(), - iconName: 'search', + iconName: "search", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -124,136 +124,136 @@ export const Default: Story = { export const Examples: Story = { render: () => { return ( -
+
-

Filled

-
- {renderAllSizesFn({ ...Default.args, variant: 'Filled' })} +

Filled

+
+ {renderAllSizesFn({ ...Default.args, variant: "Filled" })}
-

Filled with emphasis

-
+

Filled with emphasis

+
{renderAllSizesFn( { ...Default.args, - variant: 'Filled', + variant: "Filled", emphasis: true, }, - 'arrow_forward' + "arrow_forward" )}
-

Outlined

-
+

Outlined

+
{renderAllSizesFn( { ...Default.args, - variant: 'Outlined', + variant: "Outlined", }, - 'arrow_forward' + "arrow_forward" )}
-

Elevated

-
+

Elevated

+
{renderAllSizesFn( { ...Default.args, - variant: 'Elevated', + variant: "Elevated", }, - 'arrow_forward' + "arrow_forward" )}
-

Faded

-
+

Faded

+
{renderAllSizesFn( { ...Default.args, - variant: 'Faded', + variant: "Faded", }, - 'arrow_forward' + "arrow_forward" )}
-

Muted

+

Muted

{renderAllSizesFn( { ...Default.args, - variant: 'Muted', + variant: "Muted", }, - 'arrow_forward' + "arrow_forward" )}
-

Muted with emphasis

-
+

Muted with emphasis

+
{renderAllSizesFn( { ...Default.args, - variant: 'Muted', + variant: "Muted", emphasis: true, }, - 'arrow_forward' + "arrow_forward" )}
@@ -265,10 +265,10 @@ export const Examples: Story = { export const Filled: Story = { args: { ...Default.args, - variant: 'Filled', + variant: "Filled", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -279,7 +279,7 @@ export const FilledDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -290,7 +290,7 @@ export const FilledOnDarkBackground: Story = { ...Filled.args, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -298,11 +298,11 @@ export const FilledOnDarkBackground: Story = { export const FilledWithEmphasis: Story = { args: { ...Filled.args, - iconName: 'arrow_forward', + iconName: "arrow_forward", emphasis: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -313,7 +313,7 @@ export const FilledWithEmphasisDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -321,11 +321,11 @@ export const FilledWithEmphasisDisabled: Story = { export const Outlined: Story = { args: { ...Default.args, - iconName: 'arrow_forward', - variant: 'Outlined', + iconName: "arrow_forward", + variant: "Outlined", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -336,7 +336,7 @@ export const OutlinedDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -344,11 +344,11 @@ export const OutlinedDisabled: Story = { export const Elevated: Story = { args: { ...Default.args, - iconName: 'arrow_forward', - variant: 'Elevated', + iconName: "arrow_forward", + variant: "Elevated", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -359,7 +359,7 @@ export const ElevatedDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -368,11 +368,11 @@ export const Faded: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - iconName: 'arrow_forward', - variant: 'Faded', + iconName: "arrow_forward", + variant: "Faded", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -384,7 +384,7 @@ export const FadedDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -393,11 +393,11 @@ export const Muted: Story = { globals: globalStoryPropsInverted, args: { ...Default.args, - iconName: 'arrow_forward', - variant: 'Muted', + iconName: "arrow_forward", + variant: "Muted", }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -409,7 +409,7 @@ export const MutedDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } @@ -420,7 +420,7 @@ export const MutedWithEmphasis: Story = { emphasis: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(1) }, } @@ -431,7 +431,7 @@ export const MutedWithEmphasisDisabled: Story = { isDisabled: true, }, play: async ({ canvas, userEvent, args }) => { - await userEvent.click(canvas.getByRole('button')) + await userEvent.click(canvas.getByRole("button")) expect(args.onPress).toHaveBeenCalledTimes(0) }, } diff --git a/packages/design-system/lib/components/IconButton/IconButton.tsx b/packages/design-system/lib/components/IconButton/IconButton.tsx index e1edb2b2f..5e0d006ba 100644 --- a/packages/design-system/lib/components/IconButton/IconButton.tsx +++ b/packages/design-system/lib/components/IconButton/IconButton.tsx @@ -1,8 +1,8 @@ -import { Button as ButtonRAC } from 'react-aria-components' +import { Button as ButtonRAC } from "react-aria-components" -import { MaterialIcon } from '../Icons/MaterialIcon' -import { IconButtonProps } from './types' -import { variants } from './variants' +import { MaterialIcon } from "../Icons/MaterialIcon" +import { IconButtonProps } from "./types" +import { variants } from "./variants" export function IconButton({ variant, @@ -30,15 +30,15 @@ export function IconButton({ ) } -function getIconSize(size: IconButtonProps['size']) { +function getIconSize(size: IconButtonProps["size"]) { switch (size) { - case 'sm': + case "sm": return 16 - case 'md': + case "md": return 20 - case 'xl': + case "xl": return 28 - case 'lg': + case "lg": default: return 24 } diff --git a/packages/design-system/lib/components/IconButton/iconButton.module.css b/packages/design-system/lib/components/IconButton/iconButton.module.css index 0980eef05..71a864bca 100644 --- a/packages/design-system/lib/components/IconButton/iconButton.module.css +++ b/packages/design-system/lib/components/IconButton/iconButton.module.css @@ -19,7 +19,7 @@ outline-offset: 2px; &::before { - content: ''; + content: ""; position: absolute; inset: -2px; border: 2px solid var(--Border-Inverted); diff --git a/packages/design-system/lib/components/IconButton/index.tsx b/packages/design-system/lib/components/IconButton/index.tsx index a492877d0..b7681d82a 100644 --- a/packages/design-system/lib/components/IconButton/index.tsx +++ b/packages/design-system/lib/components/IconButton/index.tsx @@ -1 +1 @@ -export { IconButton } from './IconButton' +export { IconButton } from "./IconButton" diff --git a/packages/design-system/lib/components/IconButton/types.ts b/packages/design-system/lib/components/IconButton/types.ts index bdc2f60c9..6735daed1 100644 --- a/packages/design-system/lib/components/IconButton/types.ts +++ b/packages/design-system/lib/components/IconButton/types.ts @@ -1,29 +1,29 @@ -import { Button as ButtonRAC } from 'react-aria-components' +import { Button as ButtonRAC } from "react-aria-components" -import type { VariantProps } from 'class-variance-authority' -import type { ComponentProps } from 'react' +import type { VariantProps } from "class-variance-authority" +import type { ComponentProps } from "react" -import type { SymbolCodepoints } from '../Icons/MaterialIcon/MaterialSymbol/types' -import type { variants } from './variants' +import type { SymbolCodepoints } from "../Icons/MaterialIcon/MaterialSymbol/types" +import type { variants } from "./variants" export const iconButtonIconNames = [ - 'arrow_forward', - 'arrow_back', - 'remove', - 'close', - 'add', - 'search', - 'info_circle', - 'help_circle', - 'info', - 'delete', - 'visibility', - 'visibility_off', - 'keyboard_arrow_down', - 'keyboard_arrow_up', - 'cancel', - 'chevron_left', - 'chevron_right', + "arrow_forward", + "arrow_back", + "remove", + "close", + "add", + "search", + "info_circle", + "help_circle", + "info", + "delete", + "visibility", + "visibility_off", + "keyboard_arrow_down", + "keyboard_arrow_up", + "cancel", + "chevron_left", + "chevron_right", ] as const export type IconButtonIconName = Extract< @@ -33,7 +33,7 @@ export type IconButtonIconName = Extract< export interface IconButtonProps extends - Omit, 'children'>, + Omit, "children">, VariantProps { iconName: IconButtonIconName } diff --git a/packages/design-system/lib/components/IconButton/variants.ts b/packages/design-system/lib/components/IconButton/variants.ts index a6c842b52..99fd53763 100644 --- a/packages/design-system/lib/components/IconButton/variants.ts +++ b/packages/design-system/lib/components/IconButton/variants.ts @@ -1,30 +1,30 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './iconButton.module.css' +import styles from "./iconButton.module.css" export const config = { variants: { variant: { - Filled: styles['variant-filled'], - Outlined: styles['variant-outlined'], - Elevated: styles['variant-elevated'], - Faded: styles['variant-faded'], - Muted: styles['variant-muted'], + Filled: styles["variant-filled"], + Outlined: styles["variant-outlined"], + Elevated: styles["variant-elevated"], + Faded: styles["variant-faded"], + Muted: styles["variant-muted"], }, emphasis: { - true: styles['emphasis'], + true: styles["emphasis"], false: undefined, }, size: { - xl: styles['size-xl'], - lg: styles['size-lg'], - md: styles['size-md'], - sm: styles['size-sm'], + xl: styles["size-xl"], + lg: styles["size-lg"], + md: styles["size-md"], + sm: styles["size-sm"], }, }, defaultVariants: { - variant: 'Filled', - size: 'lg', + variant: "Filled", + size: "lg", emphasis: false, }, } as const diff --git a/packages/design-system/lib/components/IconChip/index.tsx b/packages/design-system/lib/components/IconChip/index.tsx index 72d787584..9d33d7db0 100644 --- a/packages/design-system/lib/components/IconChip/index.tsx +++ b/packages/design-system/lib/components/IconChip/index.tsx @@ -1,7 +1,7 @@ -import { iconChipVariants } from './variants' +import { iconChipVariants } from "./variants" interface IconChipProps { - color: 'blue' | 'green' | 'red' | null | undefined + color: "blue" | "green" | "red" | null | undefined icon: React.ReactNode children: React.ReactNode className?: string diff --git a/packages/design-system/lib/components/IconChip/variants.ts b/packages/design-system/lib/components/IconChip/variants.ts index 9d527ffaa..f4ee78c25 100644 --- a/packages/design-system/lib/components/IconChip/variants.ts +++ b/packages/design-system/lib/components/IconChip/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './iconChip.module.css' +import styles from "./iconChip.module.css" export const iconChipVariants = cva(styles.chip, { variants: { diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/BedHotel.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/BedHotel.tsx index 9e8d7bf22..f8ea3c527 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/BedHotel.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/BedHotel.tsx @@ -1,6 +1,6 @@ -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' -import { iconVariants } from '../../variants' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" +import { iconVariants } from "../../variants" export default function BedHotelIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Cooling.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Cooling.tsx index ffe140ebf..bd9f65341 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Cooling.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Cooling.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function CoolingIcon({ className, color, ...props }: IconProps) { const classNames = iconVariants({ className, color }) diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/CouchTable.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/CouchTable.tsx index 4788c906b..06e347581 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/CouchTable.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/CouchTable.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function CouchTableIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/FootStool.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/FootStool.tsx index 57d5c4368..3ac4950fe 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/FootStool.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/FootStool.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function FootStoolIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Hairdryer.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Hairdryer.tsx index f7e0cc914..befcf650f 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Hairdryer.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Hairdryer.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function HairdryerIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/HandSoap.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/HandSoap.tsx index be0068229..7eb4d9016 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/HandSoap.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/HandSoap.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function HandSoapIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/IceMachine.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/IceMachine.tsx index f5f1dddc7..2a260cfe1 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/IceMachine.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/IceMachine.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function IceMachineIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Massage.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Massage.tsx index 9f10b722e..320665849 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Massage.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Massage.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function MassageIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MdiBunkBedOutline.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MdiBunkBedOutline.tsx index 3cf84454b..197c28848 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MdiBunkBedOutline.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MdiBunkBedOutline.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function MdiBunkBedIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Mirror.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Mirror.tsx index 3e60827ea..dae953706 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Mirror.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Mirror.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function MirrorIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MovingBeds.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MovingBeds.tsx index 2bb9bcc5f..f611a3ecc 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MovingBeds.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/MovingBeds.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function MovingBedsIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Road.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Road.tsx index 950a6f672..ee95d3d87 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Road.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Road.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function RoadIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Rug.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Rug.tsx index cc12eacd9..1995cb981 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Rug.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Rug.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function RugIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/SafetyBox.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/SafetyBox.tsx index 18c545dff..313108da6 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/SafetyBox.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/SafetyBox.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function SafetyBoxIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Slippers.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Slippers.tsx index 607b8bf32..3cb25b823 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Slippers.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Slippers.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function SlippersIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Towel.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Towel.tsx index 3c52e7b24..5ddaa1ef6 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Towel.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Towel.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function TowelIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/View.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/View.tsx index d8a36ee09..f864a70ac 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/View.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/View.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function ViewIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Ward.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Ward.tsx index 7d6e0451f..3a1b487dc 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Ward.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/Ward.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function WardIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WindowNotAvailable.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WindowNotAvailable.tsx index bfa437870..d3cb9dd7b 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WindowNotAvailable.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WindowNotAvailable.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function WindowNotAvailableIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WoodFloor.tsx b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WoodFloor.tsx index 4358ea8d9..7952077cb 100644 --- a/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WoodFloor.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Amenities_Facilities/WoodFloor.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function WoodFloorIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Benefits/DiamondAdd.tsx b/packages/design-system/lib/components/Icons/Customised/Benefits/DiamondAdd.tsx index 04e0170b4..f87fdc3bf 100644 --- a/packages/design-system/lib/components/Icons/Customised/Benefits/DiamondAdd.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Benefits/DiamondAdd.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function DiamondAddIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Socials/Facebook.tsx b/packages/design-system/lib/components/Icons/Customised/Socials/Facebook.tsx index 7aff3e557..c41dd048e 100644 --- a/packages/design-system/lib/components/Icons/Customised/Socials/Facebook.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Socials/Facebook.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function FacebookIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Socials/Instagram.tsx b/packages/design-system/lib/components/Icons/Customised/Socials/Instagram.tsx index cd1855fcb..4d6331713 100644 --- a/packages/design-system/lib/components/Icons/Customised/Socials/Instagram.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Socials/Instagram.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function InstagramIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/Socials/Tripadvisor.tsx b/packages/design-system/lib/components/Icons/Customised/Socials/Tripadvisor.tsx index da0a566c9..78a564c92 100644 --- a/packages/design-system/lib/components/Icons/Customised/Socials/Tripadvisor.tsx +++ b/packages/design-system/lib/components/Icons/Customised/Socials/Tripadvisor.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function TripadvisorIcon({ className, diff --git a/packages/design-system/lib/components/Icons/Customised/UI/Minimize.tsx b/packages/design-system/lib/components/Icons/Customised/UI/Minimize.tsx index b8edca3bd..0d35bef4f 100644 --- a/packages/design-system/lib/components/Icons/Customised/UI/Minimize.tsx +++ b/packages/design-system/lib/components/Icons/Customised/UI/Minimize.tsx @@ -1,7 +1,7 @@ -import { iconVariants } from '../../variants' +import { iconVariants } from "../../variants" -import type { IconProps } from '../../icon' -import { getIconAriaProps } from '../../utils' +import type { IconProps } from "../../icon" +import { getIconAriaProps } from "../../utils" export default function MinimizeIcon({ className, diff --git a/packages/design-system/lib/components/Icons/FacilityIcon.tsx b/packages/design-system/lib/components/Icons/FacilityIcon.tsx index 965c44b62..19b0c7e01 100644 --- a/packages/design-system/lib/components/Icons/FacilityIcon.tsx +++ b/packages/design-system/lib/components/Icons/FacilityIcon.tsx @@ -1,36 +1,36 @@ -import BathroomCabinetIcon from './Nucleo/Amenities_Facilities/bathroom-cabinet-2' -import BedHotelIcon from './Customised/Amenities_Facilities/BedHotel' -import BowlingPinsIcon from './Nucleo/Experiences/bowling-pins' -import BunkBedIcon from './Customised/Amenities_Facilities/MdiBunkBedOutline' -import ConferenceRoomIcon from './Nucleo/Amenities_Facilities/conference-room' -import CoolingIcon from './Customised/Amenities_Facilities/Cooling' -import CouchTableIcon from './Customised/Amenities_Facilities/CouchTable' -import DoorIcon from './Nucleo/Amenities_Facilities/door-2' -import FootStoolIcon from './Customised/Amenities_Facilities/FootStool' -import HairdresserIcon from './Nucleo/Amenities_Facilities/hairdresser-1' -import HairdryerIcon from './Customised/Amenities_Facilities/Hairdryer' -import HandSoapIcon from './Customised/Amenities_Facilities/HandSoap' -import IceMachineIcon from './Customised/Amenities_Facilities/IceMachine' -import MassageIcon from './Customised/Amenities_Facilities/Massage' -import { MaterialIcon, type MaterialIconSetIconProps } from './MaterialIcon' -import MirrorIcon from './Customised/Amenities_Facilities/Mirror' -import MovingBedsIcon from './Customised/Amenities_Facilities/MovingBeds' -import RecordPlayerIcon from './Nucleo/Amenities_Facilities/record-player-3' -import RoadIcon from './Customised/Amenities_Facilities/Road' -import RugIcon from './Customised/Amenities_Facilities/Rug' -import SafetyBoxIcon from './Customised/Amenities_Facilities/SafetyBox' -import SlippersIcon from './Customised/Amenities_Facilities/Slippers' -import ToiletIcon from './Nucleo/Amenities_Facilities/toilet-2' -import TowelIcon from './Customised/Amenities_Facilities/Towel' -import UserPoliceIcon from './Nucleo/Amenities_Facilities/user-police-2' -import ViewIcon from './Customised/Amenities_Facilities/View' -import WardIcon from './Customised/Amenities_Facilities/Ward' -import WindowNotAvailableIcon from './Customised/Amenities_Facilities/WindowNotAvailable' -import WoodFloorIcon from './Customised/Amenities_Facilities/WoodFloor' +import BathroomCabinetIcon from "./Nucleo/Amenities_Facilities/bathroom-cabinet-2" +import BedHotelIcon from "./Customised/Amenities_Facilities/BedHotel" +import BowlingPinsIcon from "./Nucleo/Experiences/bowling-pins" +import BunkBedIcon from "./Customised/Amenities_Facilities/MdiBunkBedOutline" +import ConferenceRoomIcon from "./Nucleo/Amenities_Facilities/conference-room" +import CoolingIcon from "./Customised/Amenities_Facilities/Cooling" +import CouchTableIcon from "./Customised/Amenities_Facilities/CouchTable" +import DoorIcon from "./Nucleo/Amenities_Facilities/door-2" +import FootStoolIcon from "./Customised/Amenities_Facilities/FootStool" +import HairdresserIcon from "./Nucleo/Amenities_Facilities/hairdresser-1" +import HairdryerIcon from "./Customised/Amenities_Facilities/Hairdryer" +import HandSoapIcon from "./Customised/Amenities_Facilities/HandSoap" +import IceMachineIcon from "./Customised/Amenities_Facilities/IceMachine" +import MassageIcon from "./Customised/Amenities_Facilities/Massage" +import { MaterialIcon, type MaterialIconSetIconProps } from "./MaterialIcon" +import MirrorIcon from "./Customised/Amenities_Facilities/Mirror" +import MovingBedsIcon from "./Customised/Amenities_Facilities/MovingBeds" +import RecordPlayerIcon from "./Nucleo/Amenities_Facilities/record-player-3" +import RoadIcon from "./Customised/Amenities_Facilities/Road" +import RugIcon from "./Customised/Amenities_Facilities/Rug" +import SafetyBoxIcon from "./Customised/Amenities_Facilities/SafetyBox" +import SlippersIcon from "./Customised/Amenities_Facilities/Slippers" +import ToiletIcon from "./Nucleo/Amenities_Facilities/toilet-2" +import TowelIcon from "./Customised/Amenities_Facilities/Towel" +import UserPoliceIcon from "./Nucleo/Amenities_Facilities/user-police-2" +import ViewIcon from "./Customised/Amenities_Facilities/View" +import WardIcon from "./Customised/Amenities_Facilities/Ward" +import WindowNotAvailableIcon from "./Customised/Amenities_Facilities/WindowNotAvailable" +import WoodFloorIcon from "./Customised/Amenities_Facilities/WoodFloor" -import type { IconProps, NucleoIconProps } from '.' -import type { MaterialSymbolProps } from './MaterialIcon/MaterialSymbol' -import type { JSX } from 'react' +import type { IconProps, NucleoIconProps } from "." +import type { MaterialSymbolProps } from "./MaterialIcon/MaterialSymbol" +import type { JSX } from "react" interface FacilityIconProps { name: string | undefined @@ -67,168 +67,168 @@ export function FacilityIcon({ } const MaterialIconMappings: { - icon: MaterialSymbolProps['icon'] + icon: MaterialSymbolProps["icon"] name: string }[] = [ - { icon: 'air_purifier_gen', name: 'aircondition' }, - { icon: 'travel', name: 'airport' }, - { icon: 'balcony', name: 'balcony' }, - { icon: 'deck', name: 'balconyorterrace' }, - { icon: 'balcony', name: 'frenchbalcony' }, - { icon: 'bathtub', name: 'bathroomwithbathtub' }, - { icon: 'bathtub', name: 'bathroomwithshowerandbathtub' }, - { icon: 'bed', name: 'setoftwopillows' }, - { icon: 'chair', name: 'armchairbed' }, - { icon: 'meeting_room', name: 'separatebedroom' }, - { icon: 'pedal_bike', name: 'bikeforloan' }, - { icon: 'bakery_dining', name: 'breakfast' }, - { icon: 'bakery_dining', name: 'servesbreakfastalwaysincluded' }, - { icon: 'business_center', name: 'meetingconferencefacilities' }, - { icon: 'business_center', name: 'meetingrooms' }, - { icon: 'router', name: 'internetwithcableintheroom' }, - { icon: 'chair', name: 'armchair' }, - { icon: 'chair', name: 'chair' }, - { icon: 'meeting_room', name: 'connectingrooms' }, - { icon: 'location_city', name: 'viewcityview' }, - { icon: 'coffee_maker', name: 'nespressomachine' }, - { icon: 'dining', name: 'cafรฉ' }, - { icon: 'coffee', name: 'coffee' }, - { icon: 'coffee_maker', name: 'coffeemachine' }, - { icon: 'concierge', name: 'lifestyleconcierge' }, - { icon: 'mode_fan', name: 'aircooling' }, - { icon: 'mode_fan', name: 'cooler' }, - { icon: 'desk', name: 'deskandchair' }, - { icon: 'desk', name: 'desk' }, - { icon: 'dining', name: 'diningarea' }, - { icon: 'table_bar', name: 'tablefordining' }, - { icon: 'electric_bike', name: 'ebikeschargingstation' }, - { icon: 'family_restroom', name: 'extrafamilyfriendly' }, - { icon: 'exercise', name: 'gym' }, - { icon: 'health_and_beauty', name: 'beautysalon' }, - { icon: 'bathroom', name: 'bathroom2separatebathrooms' }, - { icon: 'credit_card_heart', name: 'cashfree800pmtill0600am' }, - { icon: 'credit_card_heart', name: 'cashfreehotel' }, - { icon: 'confirmation_number', name: 'coffeevoucher' }, - { icon: 'water_full', name: 'complimentarycoldrefreshments' }, - { icon: 'groups', name: 'conventioncentre' }, - { icon: 'accessible', name: 'disabledparking' }, - { icon: 'charging_station', name: 'dockingstationforipodipad' }, - { icon: 'cool_to_dry', name: 'dryingcabinet' }, - { icon: 'assistant_navigation', name: 'easyaccess' }, - { icon: 'laundry', name: 'garmentsteamer' }, - { icon: 'stairs', name: 'highfloor' }, - { icon: 'hot_tub', name: 'jaccuzzi' }, - { icon: 'hot_tub', name: 'jacuzzi' }, - { icon: 'countertops', name: 'kitchen' }, - { icon: 'countertops', name: 'kitchenette' }, - { icon: 'checked_bag', name: 'latecheckoutuntil1400guaranteed' }, - { icon: 'music_cast', name: 'livemusicexhibitions' }, - { icon: 'liquor', name: 'minibarincludedinroomrate' }, - { icon: 'local_parking', name: 'parkingadditionalcost' }, - { icon: 'sauna', name: 'privatesauna' }, - { icon: 'kitchen', name: 'refrigerator' }, - { icon: 'airline_seat_recline_normal', name: 'seatingarea' }, - { icon: 'scene', name: 'separatelivingroom' }, - { icon: 'chair', name: 'sofabed' }, - { icon: 'chair', name: 'sofas' }, - { icon: 'chair', name: 'sofa' }, - { icon: 'bedroom_parent', name: 'spaciousroom' }, - { icon: 'local_drink', name: 'stillandsparklingwater' }, - { icon: 'table_bar', name: 'table' }, - { icon: 'coffee_maker', name: 'tassimocoffeemaker' }, - { icon: 'deck', name: 'terrace' }, - { icon: 'iron', name: 'trouserpress' }, - { icon: 'tv_guide', name: 'tv' }, - { icon: 'tv_remote', name: 'tvwithcomplimentarymoviechannels' }, - { icon: 'tv_remote', name: 'tvwithmoviechannels' }, - { icon: 'live_tv', name: 'tvwithstreamingoption' }, - { icon: 'hvac', name: 'ventilationinroom' }, - { icon: 'landscape', name: 'viewfjordview' }, - { icon: 'houseboat', name: 'viewlakeview' }, - { icon: 'panorama', name: 'viewpanoramicview' }, - { icon: 'sailing', name: 'viewseaview' }, - { icon: 'ward', name: 'wallbed' }, - { icon: 'pedal_bike', name: 'wallmountedcyclerack' }, - { icon: 'dresser', name: 'wardrobe' }, - { icon: 'spa', name: 'wellnessandsaunaentrancefeeadmission16years' }, - { icon: 'spa', name: 'wellnesspoolsaunaentrancefeeadmission16years' }, - { icon: 'curtains', name: 'windownook' }, - { icon: 'iron', name: 'ironandironingboard' }, - { icon: 'iron', name: 'ironingroom' }, - { icon: 'kayaking', name: 'kayaksforloan' }, - { icon: 'kettle', name: 'kettle' }, - { icon: 'kettle', name: 'kettlewithcoffee' }, - { icon: 'sync_saved_locally', name: 'laptopsafe' }, - { icon: 'computer', name: 'laptoptray' }, - { icon: 'local_laundry_service', name: 'laundryservice' }, - { icon: 'local_bar', name: 'bar' }, - { icon: 'deck', name: 'rooftopbar' }, - { icon: 'local_bar', name: 'skybar' }, - { icon: 'microwave', name: 'microwave' }, - { icon: 'nature', name: 'viewparkview' }, - { icon: 'nightlife', name: 'disconightclub' }, - { icon: 'smoke_free', name: 'nonsmoking' }, - { icon: 'deck', name: 'outdoorterrace' }, - { icon: 'local_parking', name: 'parking' }, - { icon: 'local_parking', name: 'parkingfreeparking' }, - { icon: 'pets', name: 'petfriendlyrooms' }, - { icon: 'phone', name: 'directdialphoneandvoicemail' }, - { icon: 'restaurant', name: 'restaurant' }, - { icon: 'room_service', name: 'roomservice' }, - { icon: 'sauna', name: 'sauna' }, - { icon: 'shower', name: 'bathroomwithshower' }, - { icon: 'shower', name: 'rainshower' }, - { icon: 'shower', name: 'sharedbathroomwithshower' }, - { icon: 'radio', name: 'musicplayer' }, - { icon: 'shopping_bag', name: 'shop' }, - { icon: 'pool', name: 'pool' }, - { icon: 'laundry', name: 'handwash' }, - { icon: 'connected_tv', name: 'tvwithchromecast' }, - { icon: 'wifi', name: 'freewifi' }, - { icon: 'curtains_closed', name: 'blackoutcurtains' }, - { icon: 'liquor', name: 'minibar' }, - { icon: 'yard', name: 'viewatriumview' }, + { icon: "air_purifier_gen", name: "aircondition" }, + { icon: "travel", name: "airport" }, + { icon: "balcony", name: "balcony" }, + { icon: "deck", name: "balconyorterrace" }, + { icon: "balcony", name: "frenchbalcony" }, + { icon: "bathtub", name: "bathroomwithbathtub" }, + { icon: "bathtub", name: "bathroomwithshowerandbathtub" }, + { icon: "bed", name: "setoftwopillows" }, + { icon: "chair", name: "armchairbed" }, + { icon: "meeting_room", name: "separatebedroom" }, + { icon: "pedal_bike", name: "bikeforloan" }, + { icon: "bakery_dining", name: "breakfast" }, + { icon: "bakery_dining", name: "servesbreakfastalwaysincluded" }, + { icon: "business_center", name: "meetingconferencefacilities" }, + { icon: "business_center", name: "meetingrooms" }, + { icon: "router", name: "internetwithcableintheroom" }, + { icon: "chair", name: "armchair" }, + { icon: "chair", name: "chair" }, + { icon: "meeting_room", name: "connectingrooms" }, + { icon: "location_city", name: "viewcityview" }, + { icon: "coffee_maker", name: "nespressomachine" }, + { icon: "dining", name: "cafรฉ" }, + { icon: "coffee", name: "coffee" }, + { icon: "coffee_maker", name: "coffeemachine" }, + { icon: "concierge", name: "lifestyleconcierge" }, + { icon: "mode_fan", name: "aircooling" }, + { icon: "mode_fan", name: "cooler" }, + { icon: "desk", name: "deskandchair" }, + { icon: "desk", name: "desk" }, + { icon: "dining", name: "diningarea" }, + { icon: "table_bar", name: "tablefordining" }, + { icon: "electric_bike", name: "ebikeschargingstation" }, + { icon: "family_restroom", name: "extrafamilyfriendly" }, + { icon: "exercise", name: "gym" }, + { icon: "health_and_beauty", name: "beautysalon" }, + { icon: "bathroom", name: "bathroom2separatebathrooms" }, + { icon: "credit_card_heart", name: "cashfree800pmtill0600am" }, + { icon: "credit_card_heart", name: "cashfreehotel" }, + { icon: "confirmation_number", name: "coffeevoucher" }, + { icon: "water_full", name: "complimentarycoldrefreshments" }, + { icon: "groups", name: "conventioncentre" }, + { icon: "accessible", name: "disabledparking" }, + { icon: "charging_station", name: "dockingstationforipodipad" }, + { icon: "cool_to_dry", name: "dryingcabinet" }, + { icon: "assistant_navigation", name: "easyaccess" }, + { icon: "laundry", name: "garmentsteamer" }, + { icon: "stairs", name: "highfloor" }, + { icon: "hot_tub", name: "jaccuzzi" }, + { icon: "hot_tub", name: "jacuzzi" }, + { icon: "countertops", name: "kitchen" }, + { icon: "countertops", name: "kitchenette" }, + { icon: "checked_bag", name: "latecheckoutuntil1400guaranteed" }, + { icon: "music_cast", name: "livemusicexhibitions" }, + { icon: "liquor", name: "minibarincludedinroomrate" }, + { icon: "local_parking", name: "parkingadditionalcost" }, + { icon: "sauna", name: "privatesauna" }, + { icon: "kitchen", name: "refrigerator" }, + { icon: "airline_seat_recline_normal", name: "seatingarea" }, + { icon: "scene", name: "separatelivingroom" }, + { icon: "chair", name: "sofabed" }, + { icon: "chair", name: "sofas" }, + { icon: "chair", name: "sofa" }, + { icon: "bedroom_parent", name: "spaciousroom" }, + { icon: "local_drink", name: "stillandsparklingwater" }, + { icon: "table_bar", name: "table" }, + { icon: "coffee_maker", name: "tassimocoffeemaker" }, + { icon: "deck", name: "terrace" }, + { icon: "iron", name: "trouserpress" }, + { icon: "tv_guide", name: "tv" }, + { icon: "tv_remote", name: "tvwithcomplimentarymoviechannels" }, + { icon: "tv_remote", name: "tvwithmoviechannels" }, + { icon: "live_tv", name: "tvwithstreamingoption" }, + { icon: "hvac", name: "ventilationinroom" }, + { icon: "landscape", name: "viewfjordview" }, + { icon: "houseboat", name: "viewlakeview" }, + { icon: "panorama", name: "viewpanoramicview" }, + { icon: "sailing", name: "viewseaview" }, + { icon: "ward", name: "wallbed" }, + { icon: "pedal_bike", name: "wallmountedcyclerack" }, + { icon: "dresser", name: "wardrobe" }, + { icon: "spa", name: "wellnessandsaunaentrancefeeadmission16years" }, + { icon: "spa", name: "wellnesspoolsaunaentrancefeeadmission16years" }, + { icon: "curtains", name: "windownook" }, + { icon: "iron", name: "ironandironingboard" }, + { icon: "iron", name: "ironingroom" }, + { icon: "kayaking", name: "kayaksforloan" }, + { icon: "kettle", name: "kettle" }, + { icon: "kettle", name: "kettlewithcoffee" }, + { icon: "sync_saved_locally", name: "laptopsafe" }, + { icon: "computer", name: "laptoptray" }, + { icon: "local_laundry_service", name: "laundryservice" }, + { icon: "local_bar", name: "bar" }, + { icon: "deck", name: "rooftopbar" }, + { icon: "local_bar", name: "skybar" }, + { icon: "microwave", name: "microwave" }, + { icon: "nature", name: "viewparkview" }, + { icon: "nightlife", name: "disconightclub" }, + { icon: "smoke_free", name: "nonsmoking" }, + { icon: "deck", name: "outdoorterrace" }, + { icon: "local_parking", name: "parking" }, + { icon: "local_parking", name: "parkingfreeparking" }, + { icon: "pets", name: "petfriendlyrooms" }, + { icon: "phone", name: "directdialphoneandvoicemail" }, + { icon: "restaurant", name: "restaurant" }, + { icon: "room_service", name: "roomservice" }, + { icon: "sauna", name: "sauna" }, + { icon: "shower", name: "bathroomwithshower" }, + { icon: "shower", name: "rainshower" }, + { icon: "shower", name: "sharedbathroomwithshower" }, + { icon: "radio", name: "musicplayer" }, + { icon: "shopping_bag", name: "shop" }, + { icon: "pool", name: "pool" }, + { icon: "laundry", name: "handwash" }, + { icon: "connected_tv", name: "tvwithchromecast" }, + { icon: "wifi", name: "freewifi" }, + { icon: "curtains_closed", name: "blackoutcurtains" }, + { icon: "liquor", name: "minibar" }, + { icon: "yard", name: "viewatriumview" }, ] const CustomIconMappings = [ - { icon: BathroomCabinetIcon, name: 'bathroomwithshowerorbathtub' }, - { icon: MovingBedsIcon, name: 'adjustablebeds' }, - { icon: MovingBedsIcon, name: 'pulloutbed' }, - { icon: BedHotelIcon, name: 'extrabed' }, - { icon: CoolingIcon, name: 'coolingcabinet' }, - { icon: FootStoolIcon, name: 'footstool' }, - { icon: HairdryerIcon, name: 'hairdryer' }, - { icon: HairdresserIcon, name: 'hairdresser' }, - { icon: HandSoapIcon, name: 'toiletries' }, - { icon: TowelIcon, name: 'bathrobes' }, - { icon: HandSoapIcon, name: 'bodycareproducts' }, - { icon: HandSoapIcon, name: 'bodylotion' }, - { icon: BowlingPinsIcon, name: 'bowling' }, - { icon: BunkBedIcon, name: 'bunkbed' }, - { icon: BunkBedIcon, name: 'bunkbed80x188cm' }, - { icon: IceMachineIcon, name: 'icemachine' }, - { icon: IceMachineIcon, name: 'icemachinereception' }, - { icon: MassageIcon, name: 'massage' }, - { icon: ConferenceRoomIcon, name: 'meetingarea' }, - { icon: UserPoliceIcon, name: 'overnightsecurity' }, - { icon: UserPoliceIcon, name: 'security24hoours' }, - { icon: UserPoliceIcon, name: 'servicesecurity24h' }, - { icon: FootStoolIcon, name: 'footstool' }, - { icon: WindowNotAvailableIcon, name: 'nowindow' }, - { icon: DoorIcon, name: 'luggagelockers' }, - { icon: MirrorIcon, name: 'cosmeticmirror' }, - { icon: WardIcon, name: 'wallbed' }, - { icon: CouchTableIcon, name: 'sofawithtable' }, - { icon: SafetyBoxIcon, name: 'safetybox' }, - { icon: RecordPlayerIcon, name: 'modernvinylplayer' }, - { icon: RugIcon, name: 'carpetingwalltowallcarpet' }, - { icon: ToiletIcon, name: 'separatetoilet' }, - { icon: WoodFloorIcon, name: 'woodenfloor' }, - { icon: ViewIcon, name: 'view' }, - { icon: HandSoapIcon, name: 'shampoo' }, - { icon: HandSoapIcon, name: 'conditioner' }, - { icon: RoadIcon, name: 'viewstreetview' }, - { icon: SlippersIcon, name: 'slippers' }, - { icon: HandSoapIcon, name: 'showergel' }, - { icon: HandSoapIcon, name: 'showerproductsscentbygrandcentral' }, + { icon: BathroomCabinetIcon, name: "bathroomwithshowerorbathtub" }, + { icon: MovingBedsIcon, name: "adjustablebeds" }, + { icon: MovingBedsIcon, name: "pulloutbed" }, + { icon: BedHotelIcon, name: "extrabed" }, + { icon: CoolingIcon, name: "coolingcabinet" }, + { icon: FootStoolIcon, name: "footstool" }, + { icon: HairdryerIcon, name: "hairdryer" }, + { icon: HairdresserIcon, name: "hairdresser" }, + { icon: HandSoapIcon, name: "toiletries" }, + { icon: TowelIcon, name: "bathrobes" }, + { icon: HandSoapIcon, name: "bodycareproducts" }, + { icon: HandSoapIcon, name: "bodylotion" }, + { icon: BowlingPinsIcon, name: "bowling" }, + { icon: BunkBedIcon, name: "bunkbed" }, + { icon: BunkBedIcon, name: "bunkbed80x188cm" }, + { icon: IceMachineIcon, name: "icemachine" }, + { icon: IceMachineIcon, name: "icemachinereception" }, + { icon: MassageIcon, name: "massage" }, + { icon: ConferenceRoomIcon, name: "meetingarea" }, + { icon: UserPoliceIcon, name: "overnightsecurity" }, + { icon: UserPoliceIcon, name: "security24hoours" }, + { icon: UserPoliceIcon, name: "servicesecurity24h" }, + { icon: FootStoolIcon, name: "footstool" }, + { icon: WindowNotAvailableIcon, name: "nowindow" }, + { icon: DoorIcon, name: "luggagelockers" }, + { icon: MirrorIcon, name: "cosmeticmirror" }, + { icon: WardIcon, name: "wallbed" }, + { icon: CouchTableIcon, name: "sofawithtable" }, + { icon: SafetyBoxIcon, name: "safetybox" }, + { icon: RecordPlayerIcon, name: "modernvinylplayer" }, + { icon: RugIcon, name: "carpetingwalltowallcarpet" }, + { icon: ToiletIcon, name: "separatetoilet" }, + { icon: WoodFloorIcon, name: "woodenfloor" }, + { icon: ViewIcon, name: "view" }, + { icon: HandSoapIcon, name: "shampoo" }, + { icon: HandSoapIcon, name: "conditioner" }, + { icon: RoadIcon, name: "viewstreetview" }, + { icon: SlippersIcon, name: "slippers" }, + { icon: HandSoapIcon, name: "showergel" }, + { icon: HandSoapIcon, name: "showerproductsscentbygrandcentral" }, ] diff --git a/packages/design-system/lib/components/Icons/IconByCSSelect.tsx b/packages/design-system/lib/components/Icons/IconByCSSelect.tsx index b099f0ea9..eb3e7a27c 100644 --- a/packages/design-system/lib/components/Icons/IconByCSSelect.tsx +++ b/packages/design-system/lib/components/Icons/IconByCSSelect.tsx @@ -1,9 +1,9 @@ -import BouquetIcon from './Nucleo/Benefits/bouquet' -import DiscountIcon from './Nucleo/Benefits/discount-2-2' -import { MaterialIcon, type MaterialIconProps } from './MaterialIcon' -import PalmTreeIcon from './Nucleo/Experiences/palm-tree-2' +import BouquetIcon from "./Nucleo/Benefits/bouquet" +import DiscountIcon from "./Nucleo/Benefits/discount-2-2" +import { MaterialIcon, type MaterialIconProps } from "./MaterialIcon" +import PalmTreeIcon from "./Nucleo/Experiences/palm-tree-2" -import type { IconProps } from './icon' +import type { IconProps } from "./icon" interface IconByCSSelectProps extends IconProps { identifier: string @@ -11,72 +11,72 @@ interface IconByCSSelectProps extends IconProps { export default function IconByCSSelect({ identifier, - color = 'CurrentColor', + color = "CurrentColor", size = 24, ...props }: IconByCSSelectProps) { switch (identifier) { // These are custom icons - case 'discount-2-2': + case "discount-2-2": return - case 'bouquet': + case "bouquet": return - case 'palm_tree': + case "palm_tree": return // These are all Material Icons - case 'electric_car': - case 'golf_course': - case 'museum': - case 'spa': - case 'airplane_ticket': - case 'apartment': - case 'attractions': - case 'award_star': - case 'beach_access': - case 'box': - case 'deck': - case 'directions_run': - case 'directions_subway': - case 'downhill_skiing': - case 'emoji_transportation': - case 'exercise': - case 'family_restroom': - case 'festival': - case 'forest': - case 'garage': - case 'hiking': - case 'houseboat': - case 'kayaking': - case 'landscape': - case 'location_city': - case 'location_on': - case 'loyalty': - case 'music_note': - case 'night_shelter': - case 'nightlife': - case 'pedal_bike': - case 'pets': - case 'pool': - case 'recommend': - case 'redeem': - case 'restaurant': - case 'sauna': - case 'sell': - case 'shopping_bag': - case 'sports_handball': - case 'sports_tennis': - case 'theater_comedy': - case 'things_to_do': - case 'tram': - case 'transit_ticket': - case 'travel': - case 'trophy': - case 'travel_luggage_and_bags': - case 'favorite': + case "electric_car": + case "golf_course": + case "museum": + case "spa": + case "airplane_ticket": + case "apartment": + case "attractions": + case "award_star": + case "beach_access": + case "box": + case "deck": + case "directions_run": + case "directions_subway": + case "downhill_skiing": + case "emoji_transportation": + case "exercise": + case "family_restroom": + case "festival": + case "forest": + case "garage": + case "hiking": + case "houseboat": + case "kayaking": + case "landscape": + case "location_city": + case "location_on": + case "loyalty": + case "music_note": + case "night_shelter": + case "nightlife": + case "pedal_bike": + case "pets": + case "pool": + case "recommend": + case "redeem": + case "restaurant": + case "sauna": + case "sell": + case "shopping_bag": + case "sports_handball": + case "sports_tennis": + case "theater_comedy": + case "things_to_do": + case "tram": + case "transit_ticket": + case "travel": + case "trophy": + case "travel_luggage_and_bags": + case "favorite": return ( , - Omit, 'color' | 'id'>, + Pick, + Omit, "color" | "id">, VariantProps { isFilled?: boolean } -export type MaterialIconSetIconProps = Omit +export type MaterialIconSetIconProps = Omit export function MaterialIcon({ color, size = 24, diff --git a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/MaterialSymbol.tsx b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/MaterialSymbol.tsx index f94a0dc28..80f0a99ec 100644 --- a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/MaterialSymbol.tsx +++ b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/MaterialSymbol.tsx @@ -2,14 +2,14 @@ // since it doesn't support React 19 and is not maintained anymore. // We should probably move to a different solution in the future. -import type { ElementType, CSSProperties, ReactElement, Ref } from 'react' +import type { ElementType, CSSProperties, ReactElement, Ref } from "react" import type { MaterialSymbolWeight, PolymorphicComponentProps, SymbolCodepoints, -} from './types' -import { cx } from 'class-variance-authority' -export type { MaterialSymbolWeight, SymbolCodepoints } from './types' +} from "./types" +import { cx } from "class-variance-authority" +export type { MaterialSymbolWeight, SymbolCodepoints } from "./types" export type MaterialSymbolProps = { /** Required. The name of the icon to render. */ @@ -29,7 +29,7 @@ export type MaterialSymbolProps = { /** Default `'inherit'` * * Color accepts key values (`'red'`, `'blue'`, `'indigo'`, etc.), ``, ``, `` and `` values. */ - color?: CSSProperties['color'] + color?: CSSProperties["color"] className?: string style?: CSSProperties } @@ -54,34 +54,34 @@ export const MaterialSymbol = (( ref: Ref ): ReactElement => { const Component = - onClick !== undefined ? 'button' : ((as as ElementType) ?? 'span') + onClick !== undefined ? "button" : ((as as ElementType) ?? "span") const style = { color, ...propStyle } if (fill) style.fontVariationSettings = [style.fontVariationSettings, '"FILL" 1'] .filter(Boolean) - .join(', ') + .join(", ") if (weight) style.fontVariationSettings = [ style.fontVariationSettings, `"wght" ${weight}`, ] .filter(Boolean) - .join(', ') + .join(", ") if (grade) style.fontVariationSettings = [ style.fontVariationSettings, `"GRAD" ${grade}`, ] .filter(Boolean) - .join(', ') + .join(", ") if (size) { style.fontVariationSettings = [ style.fontVariationSettings, `"opsz" ${size}`, ] .filter(Boolean) - .join(', ') + .join(", ") style.fontSize = size } @@ -91,7 +91,7 @@ export const MaterialSymbol = (( ref={ref} style={style} onClick={onClick} - className={cx('material-symbols', className)} + className={cx("material-symbols", className)} > {icon} diff --git a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/consts.ts b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/consts.ts index 52c974c17..242dcf742 100644 --- a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/consts.ts +++ b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/consts.ts @@ -3,3464 +3,3464 @@ export const MaterialSymbolWeightArray = [ ] as const export const SymbolCodepointsArray = [ - '10k', - '10mp', - '11mp', - '123', - '12mp', - '13mp', - '14mp', - '15mp', - '16mp', - '17mp', - '18_up_rating', - '18mp', - '19mp', - '1k', - '1k_plus', - '1x_mobiledata', - '1x_mobiledata_badge', - '20mp', - '21mp', - '22mp', - '23mp', - '24mp', - '2d', - '2k', - '2k_plus', - '2mp', - '30fps', - '30fps_select', - '360', - '3d_rotation', - '3g_mobiledata', - '3g_mobiledata_badge', - '3k', - '3k_plus', - '3mp', - '3p', - '4g_mobiledata', - '4g_mobiledata_badge', - '4g_plus_mobiledata', - '4k', - '4k_plus', - '4mp', - '50mp', - '5g', - '5g_mobiledata_badge', - '5k', - '5k_plus', - '5mp', - '60fps', - '60fps_select', - '6_ft_apart', - '6k', - '6k_plus', - '6mp', - '7k', - '7k_plus', - '7mp', - '8k', - '8k_plus', - '8mp', - '9k', - '9k_plus', - '9mp', - 'abc', - 'ac_unit', - 'access_alarm', - 'access_alarms', - 'access_time', - 'access_time_filled', - 'accessibility', - 'accessibility_new', - 'accessible', - 'accessible_forward', - 'account_balance', - 'account_balance_wallet', - 'account_box', - 'account_child', - 'account_child_invert', - 'account_circle', - 'account_circle_filled', - 'account_circle_off', - 'account_tree', - 'action_key', - 'activity_zone', - 'acute', - 'ad', - 'ad_group', - 'ad_group_off', - 'ad_off', - 'ad_units', - 'adb', - 'add', - 'add_a_photo', - 'add_ad', - 'add_alarm', - 'add_alert', - 'add_box', - 'add_business', - 'add_call', - 'add_card', - 'add_chart', - 'add_circle', - 'add_circle_outline', - 'add_comment', - 'add_home', - 'add_home_work', - 'add_ic_call', - 'add_link', - 'add_location', - 'add_location_alt', - 'add_moderator', - 'add_notes', - 'add_photo_alternate', - 'add_reaction', - 'add_road', - 'add_shopping_cart', - 'add_task', - 'add_to_drive', - 'add_to_home_screen', - 'add_to_photos', - 'add_to_queue', - 'addchart', - 'adf_scanner', - 'adjust', - 'admin_meds', - 'admin_panel_settings', - 'ads_click', - 'agender', - 'agriculture', - 'air', - 'air_freshener', - 'air_purifier', - 'air_purifier_gen', - 'airline_seat_flat', - 'airline_seat_flat_angled', - 'airline_seat_individual_suite', - 'airline_seat_legroom_extra', - 'airline_seat_legroom_normal', - 'airline_seat_legroom_reduced', - 'airline_seat_recline_extra', - 'airline_seat_recline_normal', - 'airline_stops', - 'airlines', - 'airplane_ticket', - 'airplanemode_active', - 'airplanemode_inactive', - 'airplay', - 'airport_shuttle', - 'airware', - 'airwave', - 'alarm', - 'alarm_add', - 'alarm_off', - 'alarm_on', - 'alarm_smart_wake', - 'album', - 'align_center', - 'align_end', - 'align_flex_center', - 'align_flex_end', - 'align_flex_start', - 'align_horizontal_center', - 'align_horizontal_left', - 'align_horizontal_right', - 'align_items_stretch', - 'align_justify_center', - 'align_justify_flex_end', - 'align_justify_flex_start', - 'align_justify_space_around', - 'align_justify_space_between', - 'align_justify_space_even', - 'align_justify_stretch', - 'align_self_stretch', - 'align_space_around', - 'align_space_between', - 'align_space_even', - 'align_start', - 'align_stretch', - 'align_vertical_bottom', - 'align_vertical_center', - 'align_vertical_top', - 'all_inbox', - 'all_inclusive', - 'all_match', - 'all_out', - 'allergies', - 'allergy', - 'alt_route', - 'alternate_email', - 'altitude', - 'ambient_screen', - 'ambulance', - 'amend', - 'amp_stories', - 'analytics', - 'anchor', - 'android', - 'animation', - 'announcement', - 'aod', - 'aod_tablet', - 'aod_watch', - 'apartment', - 'api', - 'apk_document', - 'apk_install', - 'app_badging', - 'app_blocking', - 'app_promo', - 'app_registration', - 'app_settings_alt', - 'app_shortcut', - 'apparel', - 'approval', - 'approval_delegation', - 'apps', - 'apps_outage', - 'aq', - 'aq_indoor', - 'ar_on_you', - 'ar_stickers', - 'architecture', - 'archive', - 'area_chart', - 'arming_countdown', - 'arrow_and_edge', - 'arrow_back', - 'arrow_back_ios', - 'arrow_back_ios_new', - 'arrow_circle_down', - 'arrow_circle_left', - 'arrow_circle_right', - 'arrow_circle_up', - 'arrow_downward', - 'arrow_downward_alt', - 'arrow_drop_down', - 'arrow_drop_down_circle', - 'arrow_drop_up', - 'arrow_forward', - 'arrow_forward_ios', - 'arrow_insert', - 'arrow_left', - 'arrow_left_alt', - 'arrow_or_edge', - 'arrow_outward', - 'arrow_range', - 'arrow_right', - 'arrow_right_alt', - 'arrow_selector_tool', - 'arrow_split', - 'arrow_top_left', - 'arrow_top_right', - 'arrow_upward', - 'arrow_upward_alt', - 'arrows_more_down', - 'arrows_more_up', - 'arrows_outward', - 'art_track', - 'article', - 'article_shortcut', - 'artist', - 'aspect_ratio', - 'assessment', - 'assignment', - 'assignment_add', - 'assignment_ind', - 'assignment_late', - 'assignment_return', - 'assignment_returned', - 'assignment_turned_in', - 'assist_walker', - 'assistant', - 'assistant_device', - 'assistant_direction', - 'assistant_navigation', - 'assistant_on_hub', - 'assistant_photo', - 'assured_workload', - 'asterisk', - 'astrophotography_auto', - 'astrophotography_off', - 'atm', - 'atr', - 'attach_email', - 'attach_file', - 'attach_file_add', - 'attach_money', - 'attachment', - 'attractions', - 'attribution', - 'audio_description', - 'audio_file', - 'audio_video_receiver', - 'audiotrack', - 'auto_activity_zone', - 'auto_awesome', - 'auto_awesome_mosaic', - 'auto_awesome_motion', - 'auto_delete', - 'auto_detect_voice', - 'auto_draw_solid', - 'auto_fix', - 'auto_fix_high', - 'auto_fix_normal', - 'auto_fix_off', - 'auto_graph', - 'auto_label', - 'auto_meeting_room', - 'auto_mode', - 'auto_read_pause', - 'auto_read_play', - 'auto_schedule', - 'auto_stories', - 'auto_timer', - 'auto_towing', - 'auto_transmission', - 'auto_videocam', - 'autofps_select', - 'autopause', - 'autopay', - 'autoplay', - 'autorenew', - 'autostop', - 'av_timer', - 'avg_pace', - 'avg_time', - 'award_star', - 'azm', - 'baby_changing_station', - 'back_hand', - 'back_to_tab', - 'background_dot_large', - 'background_dot_small', - 'background_grid_small', - 'background_replace', - 'backlight_high', - 'backlight_low', - 'backpack', - 'backspace', - 'backup', - 'backup_table', - 'badge', - 'badge_critical_battery', - 'bakery_dining', - 'balance', - 'balcony', - 'ballot', - 'bar_chart', - 'bar_chart_4_bars', - 'barcode', - 'barcode_reader', - 'barcode_scanner', - 'barefoot', - 'batch_prediction', - 'bath_outdoor', - 'bath_private', - 'bath_public_large', - 'bathroom', - 'bathtub', - 'battery_0_bar', - 'battery_1_bar', - 'battery_20', - 'battery_2_bar', - 'battery_30', - 'battery_3_bar', - 'battery_4_bar', - 'battery_50', - 'battery_5_bar', - 'battery_60', - 'battery_6_bar', - 'battery_80', - 'battery_90', - 'battery_alert', - 'battery_change', - 'battery_charging_20', - 'battery_charging_30', - 'battery_charging_50', - 'battery_charging_60', - 'battery_charging_80', - 'battery_charging_90', - 'battery_charging_full', - 'battery_error', - 'battery_full', - 'battery_full_alt', - 'battery_horiz_000', - 'battery_horiz_050', - 'battery_horiz_075', - 'battery_low', - 'battery_plus', - 'battery_profile', - 'battery_saver', - 'battery_share', - 'battery_status_good', - 'battery_std', - 'battery_unknown', - 'battery_vert_005', - 'battery_vert_020', - 'battery_vert_050', - 'battery_very_low', - 'beach_access', - 'bed', - 'bedroom_baby', - 'bedroom_child', - 'bedroom_parent', - 'bedtime', - 'bedtime_off', - 'beenhere', - 'bento', - 'bia', - 'bid_landscape', - 'bid_landscape_disabled', - 'bigtop_updates', - 'bike_scooter', - 'biotech', - 'blanket', - 'blender', - 'blind', - 'blinds', - 'blinds_closed', - 'block', - 'blood_pressure', - 'bloodtype', - 'bluetooth', - 'bluetooth_audio', - 'bluetooth_connected', - 'bluetooth_disabled', - 'bluetooth_drive', - 'bluetooth_searching', - 'blur_circular', - 'blur_linear', - 'blur_medium', - 'blur_off', - 'blur_on', - 'blur_short', - 'body_fat', - 'body_system', - 'bolt', - 'bomb', - 'book', - 'book_2', - 'book_3', - 'book_4', - 'book_5', - 'book_online', - 'bookmark', - 'bookmark_add', - 'bookmark_added', - 'bookmark_border', - 'bookmark_manager', - 'bookmark_remove', - 'bookmarks', - 'border_all', - 'border_bottom', - 'border_clear', - 'border_color', - 'border_horizontal', - 'border_inner', - 'border_left', - 'border_outer', - 'border_right', - 'border_style', - 'border_top', - 'border_vertical', - 'bottom_app_bar', - 'bottom_drawer', - 'bottom_navigation', - 'bottom_panel_close', - 'bottom_panel_open', - 'bottom_right_click', - 'bottom_sheets', - 'box', - 'box_add', - 'box_edit', - 'boy', - 'brand_awareness', - 'branding_watermark', - 'breakfast_dining', - 'breaking_news', - 'breaking_news_alt_1', - 'breastfeeding', - 'brightness_1', - 'brightness_2', - 'brightness_3', - 'brightness_4', - 'brightness_5', - 'brightness_6', - 'brightness_7', - 'brightness_alert', - 'brightness_auto', - 'brightness_empty', - 'brightness_high', - 'brightness_low', - 'brightness_medium', - 'bring_your_own_ip', - 'broadcast_on_home', - 'broadcast_on_personal', - 'broken_image', - 'browse', - 'browse_activity', - 'browse_gallery', - 'browser_not_supported', - 'browser_updated', - 'brunch_dining', - 'brush', - 'bubble', - 'bubble_chart', - 'bubbles', - 'bug_report', - 'build', - 'build_circle', - 'bungalow', - 'burst_mode', - 'bus_alert', - 'business', - 'business_center', - 'business_chip', - 'business_messages', - 'buttons_alt', - 'cabin', - 'cable', - 'cached', - 'cake', - 'cake_add', - 'calculate', - 'calendar_add_on', - 'calendar_apps_script', - 'calendar_clock', - 'calendar_month', - 'calendar_today', - 'calendar_view_day', - 'calendar_view_month', - 'calendar_view_week', - 'call', - 'call_end', - 'call_end_alt', - 'call_log', - 'call_made', - 'call_merge', - 'call_missed', - 'call_missed_outgoing', - 'call_quality', - 'call_received', - 'call_split', - 'call_to_action', - 'camera', - 'camera_alt', - 'camera_enhance', - 'camera_front', - 'camera_indoor', - 'camera_outdoor', - 'camera_rear', - 'camera_roll', - 'camera_video', - 'cameraswitch', - 'campaign', - 'camping', - 'cancel', - 'cancel_presentation', - 'cancel_schedule_send', - 'candle', - 'candlestick_chart', - 'captive_portal', - 'capture', - 'car_crash', - 'car_rental', - 'car_repair', - 'card_giftcard', - 'card_membership', - 'card_travel', - 'cardiology', - 'cards', - 'carpenter', - 'carry_on_bag', - 'carry_on_bag_checked', - 'carry_on_bag_inactive', - 'carry_on_bag_question', - 'cases', - 'casino', - 'cast', - 'cast_connected', - 'cast_for_education', - 'cast_pause', - 'cast_warning', - 'castle', - 'category', - 'celebration', - 'cell_merge', - 'cell_tower', - 'cell_wifi', - 'center_focus_strong', - 'center_focus_weak', - 'chair', - 'chair_alt', - 'chalet', - 'change_circle', - 'change_history', - 'charger', - 'charging_station', - 'chart_data', - 'chat', - 'chat_add_on', - 'chat_apps_script', - 'chat_bubble', - 'chat_bubble_outline', - 'chat_error', - 'chat_info', - 'chat_paste_go', - 'check', - 'check_box', - 'check_box_outline_blank', - 'check_circle', - 'check_circle_filled', - 'check_circle_outline', - 'check_in_out', - 'check_indeterminate_small', - 'check_small', - 'checkbook', - 'checked_bag', - 'checked_bag_question', - 'checklist', - 'checklist_rtl', - 'checkroom', - 'cheer', - 'chess', - 'chevron_left', - 'chevron_right', - 'child_care', - 'child_friendly', - 'chip_extraction', - 'chips', - 'chrome_reader_mode', - 'chromecast_2', - 'chromecast_device', - 'chronic', - 'church', - 'cinematic_blur', - 'circle', - 'circle_notifications', - 'circles', - 'circles_ext', - 'clarify', - 'class', - 'clean_hands', - 'cleaning', - 'cleaning_bucket', - 'cleaning_services', - 'clear', - 'clear_all', - 'clear_day', - 'clear_night', - 'climate_mini_split', - 'clinical_notes', - 'clock_loader_10', - 'clock_loader_20', - 'clock_loader_40', - 'clock_loader_60', - 'clock_loader_80', - 'clock_loader_90', - 'close', - 'close_fullscreen', - 'close_small', - 'closed_caption', - 'closed_caption_disabled', - 'closed_caption_off', - 'cloud', - 'cloud_circle', - 'cloud_done', - 'cloud_download', - 'cloud_off', - 'cloud_queue', - 'cloud_sync', - 'cloud_upload', - 'cloudy', - 'cloudy_filled', - 'cloudy_snowing', - 'co2', - 'co_present', - 'code', - 'code_blocks', - 'code_off', - 'coffee', - 'coffee_maker', - 'cognition', - 'collapse_all', - 'collapse_content', - 'collections', - 'collections_bookmark', - 'color_lens', - 'colorize', - 'colors', - 'comic_bubble', - 'comment', - 'comment_bank', - 'comments_disabled', - 'commit', - 'communication', - 'communities', - 'communities_filled', - 'commute', - 'compare', - 'compare_arrows', - 'compass_calibration', - 'component_exchange', - 'compost', - 'compress', - 'computer', - 'concierge', - 'conditions', - 'confirmation_number', - 'congenital', - 'connect_without_contact', - 'connected_tv', - 'connecting_airports', - 'construction', - 'contact_emergency', - 'contact_mail', - 'contact_page', - 'contact_phone', - 'contact_phone_filled', - 'contact_support', - 'contactless', - 'contactless_off', - 'contacts', - 'contacts_product', - 'content_copy', - 'content_cut', - 'content_paste', - 'content_paste_go', - 'content_paste_off', - 'content_paste_search', - 'contract', - 'contract_delete', - 'contract_edit', - 'contrast', - 'contrast_rtl_off', - 'control_camera', - 'control_point', - 'control_point_duplicate', - 'controller_gen', - 'conversion_path', - 'conversion_path_off', - 'conveyor_belt', - 'cookie', - 'cookie_off', - 'cooking', - 'cool_to_dry', - 'copy_all', - 'copyright', - 'coronavirus', - 'corporate_fare', - 'cottage', - 'counter_0', - 'counter_1', - 'counter_2', - 'counter_3', - 'counter_4', - 'counter_5', - 'counter_6', - 'counter_7', - 'counter_8', - 'counter_9', - 'countertops', - 'create', - 'create_new_folder', - 'credit_card', - 'credit_card_gear', - 'credit_card_heart', - 'credit_card_off', - 'credit_score', - 'crib', - 'crisis_alert', - 'crop', - 'crop_16_9', - 'crop_3_2', - 'crop_5_4', - 'crop_7_5', - 'crop_9_16', - 'crop_din', - 'crop_free', - 'crop_landscape', - 'crop_original', - 'crop_portrait', - 'crop_rotate', - 'crop_square', - 'crossword', - 'crowdsource', - 'cruelty_free', - 'css', - 'csv', - 'currency_bitcoin', - 'currency_exchange', - 'currency_franc', - 'currency_lira', - 'currency_pound', - 'currency_ruble', - 'currency_rupee', - 'currency_yen', - 'currency_yuan', - 'curtains', - 'curtains_closed', - 'custom_typography', - 'cut', - 'cycle', - 'cyclone', - 'dangerous', - 'dark_mode', - 'dashboard', - 'dashboard_customize', - 'data_alert', - 'data_array', - 'data_check', - 'data_exploration', - 'data_info_alert', - 'data_loss_prevention', - 'data_object', - 'data_saver_off', - 'data_saver_on', - 'data_table', - 'data_thresholding', - 'data_usage', - 'database', - 'dataset', - 'dataset_linked', - 'date_range', - 'deblur', - 'deceased', - 'decimal_decrease', - 'decimal_increase', - 'deck', - 'dehaze', - 'delete', - 'delete_forever', - 'delete_history', - 'delete_outline', - 'delete_sweep', - 'demography', - 'density_large', - 'density_medium', - 'density_small', - 'dentistry', - 'departure_board', - 'deployed_code', - 'deployed_code_account', - 'deployed_code_alert', - 'deployed_code_history', - 'deployed_code_update', - 'dermatology', - 'description', - 'deselect', - 'design_services', - 'desk', - 'deskphone', - 'desktop_access_disabled', - 'desktop_mac', - 'desktop_windows', - 'destruction', - 'details', - 'detection_and_zone', - 'detector', - 'detector_alarm', - 'detector_battery', - 'detector_co', - 'detector_offline', - 'detector_smoke', - 'detector_status', - 'developer_board', - 'developer_board_off', - 'developer_guide', - 'developer_mode', - 'developer_mode_tv', - 'device_hub', - 'device_reset', - 'device_thermostat', - 'device_unknown', - 'devices', - 'devices_fold', - 'devices_off', - 'devices_other', - 'devices_wearables', - 'dew_point', - 'diagnosis', - 'dialer_sip', - 'dialogs', - 'dialpad', - 'diamond', - 'dictionary', - 'difference', - 'digital_out_of_home', - 'digital_wellbeing', - 'dining', - 'dinner_dining', - 'directions', - 'directions_alt', - 'directions_alt_off', - 'directions_bike', - 'directions_boat', - 'directions_boat_filled', - 'directions_bus', - 'directions_bus_filled', - 'directions_car', - 'directions_car_filled', - 'directions_off', - 'directions_railway', - 'directions_railway_filled', - 'directions_run', - 'directions_subway', - 'directions_subway_filled', - 'directions_transit', - 'directions_transit_filled', - 'directions_walk', - 'directory_sync', - 'dirty_lens', - 'disabled_by_default', - 'disabled_visible', - 'disc_full', - 'discover_tune', - 'dishwasher', - 'dishwasher_gen', - 'display_external_input', - 'display_settings', - 'distance', - 'diversity_1', - 'diversity_2', - 'diversity_3', - 'diversity_4', - 'dns', - 'do_disturb', - 'do_disturb_alt', - 'do_disturb_off', - 'do_disturb_on', - 'do_not_disturb', - 'do_not_disturb_alt', - 'do_not_disturb_off', - 'do_not_disturb_on', - 'do_not_disturb_on_total_silence', - 'do_not_step', - 'do_not_touch', - 'dock', - 'dock_to_bottom', - 'dock_to_left', - 'dock_to_right', - 'docs_add_on', - 'docs_apps_script', - 'document_scanner', - 'domain', - 'domain_add', - 'domain_disabled', - 'domain_verification', - 'domain_verification_off', - 'domino_mask', - 'done', - 'done_all', - 'done_outline', - 'donut_large', - 'donut_small', - 'door_back', - 'door_front', - 'door_open', - 'door_sensor', - 'door_sliding', - 'doorbell', - 'doorbell_3p', - 'doorbell_chime', - 'double_arrow', - 'downhill_skiing', - 'download', - 'download_2', - 'download_done', - 'download_for_offline', - 'downloading', - 'draft', - 'draft_orders', - 'drafts', - 'drag_click', - 'drag_handle', - 'drag_indicator', - 'drag_pan', - 'draw', - 'draw_abstract', - 'draw_collage', - 'drawing_recognition', - 'dresser', - 'drive_eta', - 'drive_file_move', - 'drive_file_move_outline', - 'drive_file_move_rtl', - 'drive_file_rename_outline', - 'drive_folder_upload', - 'drive_fusiontable', - 'dropdown', - 'dry', - 'dry_cleaning', - 'dual_screen', - 'duo', - 'dvr', - 'dynamic_feed', - 'dynamic_form', - 'e911_avatar', - 'e911_emergency', - 'e_mobiledata', - 'e_mobiledata_badge', - 'earbuds', - 'earbuds_battery', - 'early_on', - 'earthquake', - 'east', - 'ecg', - 'ecg_heart', - 'eco', - 'eda', - 'edgesensor_high', - 'edgesensor_low', - 'edit', - 'edit_attributes', - 'edit_calendar', - 'edit_document', - 'edit_location', - 'edit_location_alt', - 'edit_note', - 'edit_notifications', - 'edit_off', - 'edit_road', - 'edit_square', - 'editor_choice', - 'egg', - 'egg_alt', - 'eject', - 'elderly', - 'elderly_woman', - 'electric_bike', - 'electric_bolt', - 'electric_car', - 'electric_meter', - 'electric_moped', - 'electric_rickshaw', - 'electric_scooter', - 'electrical_services', - 'elevation', - 'elevator', - 'email', - 'emergency', - 'emergency_heat', - 'emergency_home', - 'emergency_recording', - 'emergency_share', - 'emergency_share_off', - 'emoji_emotions', - 'emoji_events', - 'emoji_flags', - 'emoji_food_beverage', - 'emoji_nature', - 'emoji_objects', - 'emoji_people', - 'emoji_symbols', - 'emoji_transportation', - 'emoticon', - 'empty_dashboard', - 'enable', - 'encrypted', - 'endocrinology', - 'energy', - 'energy_program_saving', - 'energy_program_time_used', - 'energy_savings_leaf', - 'engineering', - 'enhanced_encryption', - 'ent', - 'enterprise', - 'enterprise_off', - 'equal', - 'equalizer', - 'error', - 'error_circle_rounded', - 'error_med', - 'error_outline', - 'escalator', - 'escalator_warning', - 'euro', - 'euro_symbol', - 'ev_charger', - 'ev_mobiledata_badge', - 'ev_shadow', - 'ev_shadow_add', - 'ev_shadow_minus', - 'ev_station', - 'event', - 'event_available', - 'event_busy', - 'event_list', - 'event_note', - 'event_repeat', - 'event_seat', - 'event_upcoming', - 'exclamation', - 'exercise', - 'exit_to_app', - 'expand', - 'expand_all', - 'expand_circle_down', - 'expand_circle_right', - 'expand_circle_up', - 'expand_content', - 'expand_less', - 'expand_more', - 'experiment', - 'explicit', - 'explore', - 'explore_nearby', - 'explore_off', - 'explosion', - 'export_notes', - 'exposure', - 'exposure_neg_1', - 'exposure_neg_2', - 'exposure_plus_1', - 'exposure_plus_2', - 'exposure_zero', - 'extension', - 'extension_off', - 'eyeglasses', - 'face', - 'face_2', - 'face_3', - 'face_4', - 'face_5', - 'face_6', - 'face_retouching_natural', - 'face_retouching_off', - 'face_unlock', - 'fact_check', - 'factory', - 'falling', - 'familiar_face_and_zone', - 'family_history', - 'family_home', - 'family_link', - 'family_restroom', - 'family_star', - 'farsight_digital', - 'fast_forward', - 'fast_rewind', - 'fastfood', - 'faucet', - 'favorite', - 'favorite_border', - 'fax', - 'feature_search', - 'featured_play_list', - 'featured_seasonal_and_gifts', - 'featured_video', - 'feed', - 'feedback', - 'female', - 'femur', - 'femur_alt', - 'fence', - 'fertile', - 'festival', - 'fiber_dvr', - 'fiber_manual_record', - 'fiber_new', - 'fiber_pin', - 'fiber_smart_record', - 'file_copy', - 'file_download', - 'file_download_done', - 'file_download_off', - 'file_map', - 'file_open', - 'file_present', - 'file_save', - 'file_save_off', - 'file_upload', - 'file_upload_off', - 'filter', - 'filter_1', - 'filter_2', - 'filter_3', - 'filter_4', - 'filter_5', - 'filter_6', - 'filter_7', - 'filter_8', - 'filter_9', - 'filter_9_plus', - 'filter_alt', - 'filter_alt_off', - 'filter_b_and_w', - 'filter_center_focus', - 'filter_drama', - 'filter_frames', - 'filter_hdr', - 'filter_list', - 'filter_list_alt', - 'filter_list_off', - 'filter_none', - 'filter_retrolux', - 'filter_tilt_shift', - 'filter_vintage', - 'finance', - 'finance_chip', - 'finance_mode', - 'find_in_page', - 'find_replace', - 'fingerprint', - 'fire_extinguisher', - 'fire_hydrant', - 'fire_truck', - 'fireplace', - 'first_page', - 'fit_page', - 'fit_screen', - 'fit_width', - 'fitness_center', - 'flag', - 'flag_circle', - 'flag_filled', - 'flaky', - 'flare', - 'flash_auto', - 'flash_off', - 'flash_on', - 'flashlight_off', - 'flashlight_on', - 'flatware', - 'flex_direction', - 'flex_no_wrap', - 'flex_wrap', - 'flight', - 'flight_class', - 'flight_land', - 'flight_takeoff', - 'flights_and_hotels', - 'flightsmode', - 'flip', - 'flip_camera_android', - 'flip_camera_ios', - 'flip_to_back', - 'flip_to_front', - 'flood', - 'floor', - 'floor_lamp', - 'flourescent', - 'flowsheet', - 'fluid', - 'fluid_balance', - 'fluid_med', - 'fluorescent', - 'flutter', - 'flutter_dash', - 'fmd_bad', - 'fmd_good', - 'foggy', - 'folded_hands', - 'folder', - 'folder_copy', - 'folder_data', - 'folder_delete', - 'folder_managed', - 'folder_off', - 'folder_open', - 'folder_shared', - 'folder_special', - 'folder_supervised', - 'folder_zip', - 'follow_the_signs', - 'font_download', - 'font_download_off', - 'food_bank', - 'foot_bones', - 'footprint', - 'for_you', - 'forest', - 'fork_left', - 'fork_right', - 'forklift', - 'format_align_center', - 'format_align_justify', - 'format_align_left', - 'format_align_right', - 'format_bold', - 'format_clear', - 'format_color_fill', - 'format_color_reset', - 'format_color_text', - 'format_h1', - 'format_h2', - 'format_h3', - 'format_h4', - 'format_h5', - 'format_h6', - 'format_image_left', - 'format_image_right', - 'format_indent_decrease', - 'format_indent_increase', - 'format_ink_highlighter', - 'format_italic', - 'format_letter_spacing', - 'format_letter_spacing_2', - 'format_letter_spacing_standard', - 'format_letter_spacing_wide', - 'format_letter_spacing_wider', - 'format_line_spacing', - 'format_list_bulleted', - 'format_list_bulleted_add', - 'format_list_numbered', - 'format_list_numbered_rtl', - 'format_overline', - 'format_paint', - 'format_paragraph', - 'format_quote', - 'format_shapes', - 'format_size', - 'format_strikethrough', - 'format_text_clip', - 'format_text_overflow', - 'format_text_wrap', - 'format_textdirection_l_to_r', - 'format_textdirection_r_to_l', - 'format_underlined', - 'format_underlined_squiggle', - 'forms_add_on', - 'forms_apps_script', - 'fort', - 'forum', - 'forward', - 'forward_10', - 'forward_30', - 'forward_5', - 'forward_circle', - 'forward_media', - 'forward_to_inbox', - 'foundation', - 'frame_inspect', - 'frame_person', - 'frame_person_off', - 'frame_reload', - 'frame_source', - 'free_breakfast', - 'free_cancellation', - 'front_hand', - 'front_loader', - 'full_coverage', - 'full_hd', - 'full_stacked_bar_chart', - 'fullscreen', - 'fullscreen_exit', - 'function', - 'functions', - 'g_mobiledata', - 'g_mobiledata_badge', - 'g_translate', - 'gallery_thumbnail', - 'gamepad', - 'games', - 'garage', - 'garage_door', - 'garage_home', - 'garden_cart', - 'gas_meter', - 'gastroenterology', - 'gate', - 'gavel', - 'general_device', - 'generating_tokens', - 'genetics', - 'genres', - 'gesture', - 'gesture_select', - 'get_app', - 'gif', - 'gif_box', - 'girl', - 'gite', - 'glass_cup', - 'globe', - 'globe_asia', - 'globe_uk', - 'glucose', - 'glyphs', - 'go_to_line', - 'golf_course', - 'google_home_devices', - 'google_plus_reshare', - 'google_tv_remote', - 'google_wifi', - 'gpp_bad', - 'gpp_good', - 'gpp_maybe', - 'gps_fixed', - 'gps_not_fixed', - 'gps_off', - 'grade', - 'gradient', - 'grading', - 'grain', - 'graphic_eq', - 'grass', - 'grid_3x3', - 'grid_3x3_off', - 'grid_4x4', - 'grid_goldenratio', - 'grid_guides', - 'grid_off', - 'grid_on', - 'grid_view', - 'grocery', - 'group', - 'group_add', - 'group_off', - 'group_remove', - 'group_work', - 'grouped_bar_chart', - 'groups', - 'groups_2', - 'groups_3', - 'gynecology', - 'h_mobiledata', - 'h_mobiledata_badge', - 'h_plus_mobiledata', - 'h_plus_mobiledata_badge', - 'hail', - 'hallway', - 'hand_bones', - 'hand_gesture', - 'handshake', - 'handwriting_recognition', - 'handyman', - 'hangout_video', - 'hangout_video_off', - 'hard_drive', - 'hard_drive_2', - 'hardware', - 'hd', - 'hdr_auto', - 'hdr_auto_select', - 'hdr_enhanced_select', - 'hdr_off', - 'hdr_off_select', - 'hdr_on', - 'hdr_on_select', - 'hdr_plus', - 'hdr_plus_off', - 'hdr_strong', - 'hdr_weak', - 'headphones', - 'headphones_battery', - 'headset', - 'headset_mic', - 'headset_off', - 'healing', - 'health_and_beauty', - 'health_and_safety', - 'health_metrics', - 'heap_snapshot_large', - 'heap_snapshot_multiple', - 'heap_snapshot_thumbnail', - 'hearing', - 'hearing_disabled', - 'heart_broken', - 'heart_check', - 'heart_minus', - 'heart_plus', - 'heat', - 'heat_pump', - 'heat_pump_balance', - 'height', - 'helicopter', - 'help', - 'help_center', - 'help_clinic', - 'help_outline', - 'hematology', - 'hevc', - 'hexagon', - 'hide', - 'hide_image', - 'hide_source', - 'high_density', - 'high_quality', - 'high_res', - 'highlight', - 'highlight_keyboard_focus', - 'highlight_mouse_cursor', - 'highlight_off', - 'highlight_text_cursor', - 'highlighter_size_1', - 'highlighter_size_2', - 'highlighter_size_3', - 'highlighter_size_4', - 'highlighter_size_5', - 'hiking', - 'history', - 'history_edu', - 'history_toggle_off', - 'hive', - 'hls', - 'hls_off', - 'holiday_village', - 'home', - 'home_and_garden', - 'home_app_logo', - 'home_filled', - 'home_health', - 'home_improvement_and_tools', - 'home_iot_device', - 'home_max', - 'home_max_dots', - 'home_mini', - 'home_pin', - 'home_repair_service', - 'home_speaker', - 'home_storage', - 'home_work', - 'horizontal_distribute', - 'horizontal_rule', - 'horizontal_split', - 'hot_tub', - 'hotel', - 'hotel_class', - 'hourglass', - 'hourglass_bottom', - 'hourglass_disabled', - 'hourglass_empty', - 'hourglass_full', - 'hourglass_top', - 'house', - 'house_siding', - 'house_with_shield', - 'houseboat', - 'household_supplies', - 'how_to_reg', - 'how_to_vote', - 'hr_resting', - 'html', - 'http', - 'https', - 'hub', - 'humerus', - 'humerus_alt', - 'humidity_high', - 'humidity_indoor', - 'humidity_low', - 'humidity_mid', - 'humidity_percentage', - 'hvac', - 'ice_skating', - 'icecream', - 'id_card', - 'ifl', - 'iframe', - 'iframe_off', - 'image', - 'image_aspect_ratio', - 'image_not_supported', - 'image_search', - 'imagesearch_roller', - 'imagesmode', - 'immunology', - 'import_contacts', - 'import_export', - 'important_devices', - 'in_home_mode', - 'inactive_order', - 'inbox', - 'inbox_customize', - 'incomplete_circle', - 'indeterminate_check_box', - 'indeterminate_question_box', - 'info', - 'info_i', - 'infrared', - 'ink_eraser', - 'ink_eraser_off', - 'ink_highlighter', - 'ink_highlighter_move', - 'ink_marker', - 'ink_pen', - 'inpatient', - 'input', - 'input_circle', - 'insert_chart', - 'insert_chart_filled', - 'insert_chart_outlined', - 'insert_comment', - 'insert_drive_file', - 'insert_emoticon', - 'insert_invitation', - 'insert_link', - 'insert_page_break', - 'insert_photo', - 'insert_text', - 'insights', - 'install_desktop', - 'install_mobile', - 'instant_mix', - 'integration_instructions', - 'interactive_space', - 'interests', - 'interpreter_mode', - 'inventory', - 'inventory_2', - 'invert_colors', - 'invert_colors_off', - 'ios', - 'ios_share', - 'iron', - 'iso', - 'jamboard_kiosk', - 'javascript', - 'join', - 'join_full', - 'join_inner', - 'join_left', - 'join_right', - 'joystick', - 'jump_to_element', - 'kayaking', - 'kebab_dining', - 'kettle', - 'key', - 'key_off', - 'key_vertical', - 'key_visualizer', - 'keyboard', - 'keyboard_alt', - 'keyboard_arrow_down', - 'keyboard_arrow_left', - 'keyboard_arrow_right', - 'keyboard_arrow_up', - 'keyboard_backspace', - 'keyboard_capslock', - 'keyboard_capslock_badge', - 'keyboard_command_key', - 'keyboard_control_key', - 'keyboard_double_arrow_down', - 'keyboard_double_arrow_left', - 'keyboard_double_arrow_right', - 'keyboard_double_arrow_up', - 'keyboard_external_input', - 'keyboard_full', - 'keyboard_hide', - 'keyboard_keys', - 'keyboard_off', - 'keyboard_onscreen', - 'keyboard_option_key', - 'keyboard_previous_language', - 'keyboard_return', - 'keyboard_tab', - 'keyboard_tab_rtl', - 'keyboard_voice', - 'kid_star', - 'king_bed', - 'kitchen', - 'kitesurfing', - 'lab_panel', - 'lab_profile', - 'lab_research', - 'label', - 'label_important', - 'label_important_outline', - 'label_off', - 'label_outline', - 'labs', - 'lan', - 'landscape', - 'landslide', - 'language', - 'language_chinese_array', - 'language_chinese_cangjie', - 'language_chinese_dayi', - 'language_chinese_pinyin', - 'language_chinese_quick', - 'language_chinese_wubi', - 'language_french', - 'language_gb_english', - 'language_international', - 'language_japanese_kana', - 'language_korean_latin', - 'language_pinyin', - 'language_spanish', - 'language_us', - 'language_us_colemak', - 'language_us_dvorak', - 'laps', - 'laptop', - 'laptop_chromebook', - 'laptop_mac', - 'laptop_windows', - 'lasso_select', - 'last_page', - 'launch', - 'laundry', - 'layers', - 'layers_clear', - 'lda', - 'leaderboard', - 'leak_add', - 'leak_remove', - 'left_click', - 'left_panel_close', - 'left_panel_open', - 'legend_toggle', - 'lens', - 'lens_blur', - 'letter_switch', - 'library_add', - 'library_add_check', - 'library_books', - 'library_music', - 'license', - 'lift_to_talk', - 'light', - 'light_group', - 'light_mode', - 'light_off', - 'lightbulb', - 'lightbulb_circle', - 'lightbulb_outline', - 'lightning_stand', - 'line_axis', - 'line_curve', - 'line_end', - 'line_end_arrow', - 'line_end_arrow_notch', - 'line_end_circle', - 'line_end_diamond', - 'line_end_square', - 'line_start', - 'line_start_arrow', - 'line_start_arrow_notch', - 'line_start_circle', - 'line_start_diamond', - 'line_start_square', - 'line_style', - 'line_weight', - 'linear_scale', - 'link', - 'link_off', - 'linked_camera', - 'linked_services', - 'liquor', - 'list', - 'list_alt', - 'list_alt_add', - 'lists', - 'live_help', - 'live_tv', - 'living', - 'local_activity', - 'local_airport', - 'local_atm', - 'local_bar', - 'local_cafe', - 'local_car_wash', - 'local_convenience_store', - 'local_dining', - 'local_drink', - 'local_fire_department', - 'local_florist', - 'local_gas_station', - 'local_grocery_store', - 'local_hospital', - 'local_hotel', - 'local_laundry_service', - 'local_library', - 'local_mall', - 'local_movies', - 'local_offer', - 'local_parking', - 'local_pharmacy', - 'local_phone', - 'local_pizza', - 'local_play', - 'local_police', - 'local_post_office', - 'local_printshop', - 'local_see', - 'local_shipping', - 'local_taxi', - 'location_automation', - 'location_away', - 'location_chip', - 'location_city', - 'location_disabled', - 'location_home', - 'location_off', - 'location_on', - 'location_pin', - 'location_searching', - 'locator_tag', - 'lock', - 'lock_clock', - 'lock_open', - 'lock_open_right', - 'lock_outline', - 'lock_person', - 'lock_reset', - 'login', - 'logo_dev', - 'logout', - 'looks', - 'looks_3', - 'looks_4', - 'looks_5', - 'looks_6', - 'looks_one', - 'looks_two', - 'loop', - 'loupe', - 'low_density', - 'low_priority', - 'loyalty', - 'lte_mobiledata', - 'lte_mobiledata_badge', - 'lte_plus_mobiledata', - 'lte_plus_mobiledata_badge', - 'luggage', - 'lunch_dining', - 'lyrics', - 'macro_auto', - 'macro_off', - 'magic_button', - 'magic_exchange', - 'magic_tether', - 'magnification_large', - 'magnification_small', - 'magnify_docked', - 'magnify_fullscreen', - 'mail', - 'mail_lock', - 'mail_outline', - 'male', - 'man', - 'man_2', - 'man_3', - 'man_4', - 'manage_accounts', - 'manage_history', - 'manage_search', - 'manga', - 'manufacturing', - 'map', - 'maps_home_work', - 'maps_ugc', - 'margin', - 'mark_as_unread', - 'mark_chat_read', - 'mark_chat_unread', - 'mark_email_read', - 'mark_email_unread', - 'mark_unread_chat_alt', - 'markdown', - 'markdown_copy', - 'markdown_paste', - 'markunread', - 'markunread_mailbox', - 'masked_transitions', - 'masks', - 'match_case', - 'match_word', - 'matter', - 'maximize', - 'measuring_tape', - 'media_bluetooth_off', - 'media_bluetooth_on', - 'media_link', - 'mediation', - 'medical_information', - 'medical_mask', - 'medical_services', - 'medication', - 'medication_liquid', - 'meeting_room', - 'memory', - 'memory_alt', - 'menstrual_health', - 'menu', - 'menu_book', - 'menu_open', - 'merge', - 'merge_type', - 'message', - 'metabolism', - 'mfg_nest_yale_lock', - 'mic', - 'mic_double', - 'mic_external_off', - 'mic_external_on', - 'mic_none', - 'mic_off', - 'microbiology', - 'microwave', - 'microwave_gen', - 'military_tech', - 'mimo', - 'mimo_disconnect', - 'mindfulness', - 'minimize', - 'minor_crash', - 'mintmark', - 'missed_video_call', - 'missed_video_call_filled', - 'missing_controller', - 'mist', - 'mitre', - 'mixture_med', - 'mms', - 'mobile_friendly', - 'mobile_off', - 'mobile_screen_share', - 'mobiledata_off', - 'mode', - 'mode_comment', - 'mode_cool', - 'mode_cool_off', - 'mode_dual', - 'mode_edit', - 'mode_edit_outline', - 'mode_fan', - 'mode_fan_off', - 'mode_heat', - 'mode_heat_cool', - 'mode_heat_off', - 'mode_night', - 'mode_of_travel', - 'mode_off_on', - 'mode_standby', - 'model_training', - 'monetization_on', - 'money', - 'money_off', - 'money_off_csred', - 'monitor', - 'monitor_heart', - 'monitor_weight', - 'monitor_weight_gain', - 'monitor_weight_loss', - 'monitoring', - 'monochrome_photos', - 'mood', - 'mood_bad', - 'mop', - 'more', - 'more_down', - 'more_horiz', - 'more_time', - 'more_up', - 'more_vert', - 'mosque', - 'motion_blur', - 'motion_mode', - 'motion_photos_auto', - 'motion_photos_off', - 'motion_photos_on', - 'motion_photos_pause', - 'motion_photos_paused', - 'motion_sensor_active', - 'motion_sensor_alert', - 'motion_sensor_idle', - 'motion_sensor_urgent', - 'motorcycle', - 'mountain_flag', - 'mouse', - 'move', - 'move_down', - 'move_group', - 'move_item', - 'move_location', - 'move_selection_down', - 'move_selection_left', - 'move_selection_right', - 'move_selection_up', - 'move_to_inbox', - 'move_up', - 'moved_location', - 'movie', - 'movie_creation', - 'movie_edit', - 'movie_filter', - 'movie_info', - 'moving', - 'moving_beds', - 'moving_ministry', - 'mp', - 'multicooker', - 'multiline_chart', - 'multiple_stop', - 'museum', - 'music_cast', - 'music_note', - 'music_off', - 'music_video', - 'my_location', - 'mystery', - 'nat', - 'nature', - 'nature_people', - 'navigate_before', - 'navigate_next', - 'navigation', - 'near_me', - 'near_me_disabled', - 'nearby', - 'nearby_error', - 'nearby_off', - 'nephrology', - 'nest_audio', - 'nest_cam_floodlight', - 'nest_cam_indoor', - 'nest_cam_iq', - 'nest_cam_iq_outdoor', - 'nest_cam_magnet_mount', - 'nest_cam_outdoor', - 'nest_cam_stand', - 'nest_cam_wall_mount', - 'nest_cam_wired_stand', - 'nest_clock_farsight_analog', - 'nest_clock_farsight_digital', - 'nest_connect', - 'nest_detect', - 'nest_display', - 'nest_display_max', - 'nest_doorbell_visitor', - 'nest_eco_leaf', - 'nest_farsight_weather', - 'nest_found_savings', - 'nest_gale_wifi', - 'nest_heat_link_e', - 'nest_heat_link_gen_3', - 'nest_hello_doorbell', - 'nest_locator_tag', - 'nest_mini', - 'nest_multi_room', - 'nest_protect', - 'nest_remote', - 'nest_remote_comfort_sensor', - 'nest_secure_alarm', - 'nest_sunblock', - 'nest_tag', - 'nest_thermostat', - 'nest_thermostat_e_eu', - 'nest_thermostat_gen_3', - 'nest_thermostat_sensor', - 'nest_thermostat_sensor_eu', - 'nest_thermostat_zirconium_eu', - 'nest_true_radiant', - 'nest_wake_on_approach', - 'nest_wake_on_press', - 'nest_wifi_gale', - 'nest_wifi_mistral', - 'nest_wifi_point', - 'nest_wifi_point_vento', - 'nest_wifi_pro', - 'nest_wifi_pro_2', - 'nest_wifi_router', - 'network_cell', - 'network_check', - 'network_intelligence_history', - 'network_intelligence_update', - 'network_locked', - 'network_manage', - 'network_node', - 'network_ping', - 'network_wifi', - 'network_wifi_1_bar', - 'network_wifi_1_bar_locked', - 'network_wifi_2_bar', - 'network_wifi_2_bar_locked', - 'network_wifi_3_bar', - 'network_wifi_3_bar_locked', - 'network_wifi_locked', - 'neurology', - 'new_label', - 'new_releases', - 'new_window', - 'news', - 'newsmode', - 'newspaper', - 'newsstand', - 'next_plan', - 'next_week', - 'nfc', - 'night_shelter', - 'night_sight_auto', - 'night_sight_auto_off', - 'night_sight_max', - 'nightlife', - 'nightlight', - 'nightlight_round', - 'nights_stay', - 'no_accounts', - 'no_adult_content', - 'no_backpack', - 'no_crash', - 'no_drinks', - 'no_encryption', - 'no_encryption_gmailerrorred', - 'no_flash', - 'no_food', - 'no_luggage', - 'no_meals', - 'no_meeting_room', - 'no_photography', - 'no_sim', - 'no_sound', - 'no_stroller', - 'no_transfer', - 'noise_aware', - 'noise_control_off', - 'noise_control_on', - 'nordic_walking', - 'north', - 'north_east', - 'north_west', - 'not_accessible', - 'not_accessible_forward', - 'not_interested', - 'not_listed_location', - 'not_started', - 'note', - 'note_add', - 'note_alt', - 'note_stack', - 'note_stack_add', - 'notes', - 'notification_add', - 'notification_important', - 'notification_multiple', - 'notifications', - 'notifications_active', - 'notifications_none', - 'notifications_off', - 'notifications_paused', - 'notifications_unread', - 'numbers', - 'nutrition', - 'ods', - 'odt', - 'offline_bolt', - 'offline_pin', - 'offline_share', - 'oil_barrel', - 'on_device_training', - 'on_hub_device', - 'oncology', - 'ondemand_video', - 'online_prediction', - 'onsen', - 'opacity', - 'open_in_browser', - 'open_in_full', - 'open_in_new', - 'open_in_new_down', - 'open_in_new_off', - 'open_in_phone', - 'open_jam', - 'open_with', - 'ophthalmology', - 'oral_disease', - 'order_approve', - 'order_play', - 'orders', - 'orthopedics', - 'other_admission', - 'other_houses', - 'outbound', - 'outbox', - 'outbox_alt', - 'outdoor_garden', - 'outdoor_grill', - 'outgoing_mail', - 'outlet', - 'outlined_flag', - 'outpatient', - 'outpatient_med', - 'output', - 'output_circle', - 'oven', - 'oven_gen', - 'overview', - 'overview_key', - 'oxygen_saturation', - 'p2p', - 'pace', - 'pacemaker', - 'package', - 'package_2', - 'padding', - 'page_control', - 'page_info', - 'pageless', - 'pages', - 'pageview', - 'paid', - 'palette', - 'pallet', - 'pan_tool', - 'pan_tool_alt', - 'pan_zoom', - 'panorama', - 'panorama_fish_eye', - 'panorama_horizontal', - 'panorama_photosphere', - 'panorama_vertical', - 'panorama_wide_angle', - 'paragliding', - 'park', - 'partly_cloudy_day', - 'partly_cloudy_night', - 'partner_exchange', - 'partner_reports', - 'party_mode', - 'passkey', - 'password', - 'patient_list', - 'pattern', - 'pause', - 'pause_circle', - 'pause_circle_filled', - 'pause_circle_outline', - 'pause_presentation', - 'payment', - 'payments', - 'pedal_bike', - 'pediatrics', - 'pen_size_1', - 'pen_size_2', - 'pen_size_3', - 'pen_size_4', - 'pen_size_5', - 'pending', - 'pending_actions', - 'pentagon', - 'people', - 'people_alt', - 'people_outline', - 'percent', - 'performance_max', - 'pergola', - 'perm_camera_mic', - 'perm_contact_calendar', - 'perm_data_setting', - 'perm_device_information', - 'perm_identity', - 'perm_media', - 'perm_phone_msg', - 'perm_scan_wifi', - 'person', - 'person_2', - 'person_3', - 'person_4', - 'person_add', - 'person_add_alt', - 'person_add_disabled', - 'person_alert', - 'person_apron', - 'person_book', - 'person_cancel', - 'person_celebrate', - 'person_check', - 'person_filled', - 'person_off', - 'person_outline', - 'person_pin', - 'person_pin_circle', - 'person_play', - 'person_raised_hand', - 'person_remove', - 'person_search', - 'personal_bag', - 'personal_bag_off', - 'personal_bag_question', - 'personal_injury', - 'personal_places', - 'personal_video', - 'pest_control', - 'pest_control_rodent', - 'pet_supplies', - 'pets', - 'phishing', - 'phone', - 'phone_alt', - 'phone_android', - 'phone_bluetooth_speaker', - 'phone_callback', - 'phone_disabled', - 'phone_enabled', - 'phone_forwarded', - 'phone_in_talk', - 'phone_iphone', - 'phone_locked', - 'phone_missed', - 'phone_paused', - 'phonelink', - 'phonelink_erase', - 'phonelink_lock', - 'phonelink_off', - 'phonelink_ring', - 'phonelink_ring_off', - 'phonelink_setup', - 'photo', - 'photo_album', - 'photo_auto_merge', - 'photo_camera', - 'photo_camera_back', - 'photo_camera_front', - 'photo_filter', - 'photo_frame', - 'photo_library', - 'photo_prints', - 'photo_size_select_actual', - 'photo_size_select_large', - 'photo_size_select_small', - 'php', - 'physical_therapy', - 'piano', - 'piano_off', - 'picture_as_pdf', - 'picture_in_picture', - 'picture_in_picture_alt', - 'picture_in_picture_center', - 'picture_in_picture_large', - 'picture_in_picture_medium', - 'picture_in_picture_mobile', - 'picture_in_picture_off', - 'picture_in_picture_small', - 'pie_chart', - 'pie_chart_filled', - 'pie_chart_outline', - 'pie_chart_outlined', - 'pill', - 'pill_off', - 'pin', - 'pin_drop', - 'pin_end', - 'pin_invoke', - 'pinch', - 'pinch_zoom_in', - 'pinch_zoom_out', - 'pip', - 'pip_exit', - 'pivot_table_chart', - 'place', - 'place_item', - 'plagiarism', - 'planner_banner_ad_pt', - 'planner_review', - 'play_arrow', - 'play_circle', - 'play_disabled', - 'play_for_work', - 'play_lesson', - 'play_music', - 'play_pause', - 'play_shapes', - 'playing_cards', - 'playlist_add', - 'playlist_add_check', - 'playlist_add_check_circle', - 'playlist_add_circle', - 'playlist_play', - 'playlist_remove', - 'plumbing', - 'plus_one', - 'podcasts', - 'podiatry', - 'podium', - 'point_of_sale', - 'point_scan', - 'policy', - 'poll', - 'polyline', - 'polymer', - 'pool', - 'portable_wifi_off', - 'portrait', - 'position_bottom_left', - 'position_bottom_right', - 'position_top_right', - 'post', - 'post_add', - 'potted_plant', - 'power', - 'power_input', - 'power_off', - 'power_rounded', - 'power_settings_new', - 'prayer_times', - 'precision_manufacturing', - 'pregnancy', - 'pregnant_woman', - 'preliminary', - 'prescriptions', - 'present_to_all', - 'preview', - 'preview_off', - 'price_change', - 'price_check', - 'print', - 'print_add', - 'print_connect', - 'print_disabled', - 'print_error', - 'print_lock', - 'priority', - 'priority_high', - 'privacy', - 'privacy_tip', - 'private_connectivity', - 'problem', - 'procedure', - 'process_chart', - 'production_quantity_limits', - 'productivity', - 'progress_activity', - 'propane', - 'propane_tank', - 'psychiatry', - 'psychology', - 'psychology_alt', - 'public', - 'public_off', - 'publish', - 'published_with_changes', - 'pulmonology', - 'pulse_alert', - 'punch_clock', - 'push_pin', - 'qr_code', - 'qr_code_2', - 'qr_code_2_add', - 'qr_code_scanner', - 'query_builder', - 'query_stats', - 'question_answer', - 'question_exchange', - 'question_mark', - 'queue', - 'queue_music', - 'queue_play_next', - 'quick_phrases', - 'quick_reference', - 'quick_reference_all', - 'quick_reorder', - 'quickreply', - 'quiet_time', - 'quiet_time_active', - 'quiz', - 'r_mobiledata', - 'radar', - 'radio', - 'radio_button_checked', - 'radio_button_partial', - 'radio_button_unchecked', - 'radiology', - 'railway_alert', - 'rainy', - 'rainy_heavy', - 'rainy_light', - 'rainy_snow', - 'ramen_dining', - 'ramp_left', - 'ramp_right', - 'range_hood', - 'rate_review', - 'raven', - 'raw_off', - 'raw_on', - 'read_more', - 'readiness_score', - 'real_estate_agent', - 'rear_camera', - 'rebase', - 'rebase_edit', - 'receipt', - 'receipt_long', - 'recent_actors', - 'recent_patient', - 'recommend', - 'record_voice_over', - 'rectangle', - 'recycling', - 'redeem', - 'redo', - 'reduce_capacity', - 'refresh', - 'regular_expression', - 'relax', - 'release_alert', - 'remember_me', - 'reminder', - 'reminders_alt', - 'remote_gen', - 'remove', - 'remove_circle', - 'remove_circle_outline', - 'remove_done', - 'remove_from_queue', - 'remove_moderator', - 'remove_red_eye', - 'remove_road', - 'remove_selection', - 'remove_shopping_cart', - 'reopen_window', - 'reorder', - 'repartition', - 'repeat', - 'repeat_on', - 'repeat_one', - 'repeat_one_on', - 'replay', - 'replay_10', - 'replay_30', - 'replay_5', - 'replay_circle_filled', - 'reply', - 'reply_all', - 'report', - 'report_gmailerrorred', - 'report_off', - 'report_problem', - 'request_page', - 'request_quote', - 'reset_image', - 'reset_tv', - 'reset_wrench', - 'resize', - 'respiratory_rate', - 'responsive_layout', - 'restart_alt', - 'restaurant', - 'restaurant_menu', - 'restore', - 'restore_from_trash', - 'restore_page', - 'resume', - 'reviews', - 'rewarded_ads', - 'rheumatology', - 'rib_cage', - 'rice_bowl', - 'right_click', - 'right_panel_close', - 'right_panel_open', - 'ring_volume', - 'ring_volume_filled', - 'ripples', - 'robot', - 'robot_2', - 'rocket', - 'rocket_launch', - 'roller_shades', - 'roller_shades_closed', - 'roller_skating', - 'roofing', - 'room', - 'room_preferences', - 'room_service', - 'rotate_90_degrees_ccw', - 'rotate_90_degrees_cw', - 'rotate_left', - 'rotate_right', - 'roundabout_left', - 'roundabout_right', - 'rounded_corner', - 'route', - 'router', - 'routine', - 'rowing', - 'rss_feed', - 'rsvp', - 'rtt', - 'rubric', - 'rule', - 'rule_folder', - 'rule_settings', - 'run_circle', - 'running_with_errors', - 'rv_hookup', - 'safety_check', - 'safety_check_off', - 'safety_divider', - 'sailing', - 'salinity', - 'sanitizer', - 'satellite', - 'satellite_alt', - 'sauna', - 'save', - 'save_alt', - 'save_as', - 'saved_search', - 'savings', - 'scale', - 'scan', - 'scan_delete', - 'scanner', - 'scatter_plot', - 'scene', - 'schedule', - 'schedule_send', - 'schema', - 'school', - 'science', - 'science_off', - 'score', - 'scoreboard', - 'screen_lock_landscape', - 'screen_lock_portrait', - 'screen_lock_rotation', - 'screen_record', - 'screen_rotation', - 'screen_rotation_alt', - 'screen_rotation_up', - 'screen_search_desktop', - 'screen_share', - 'screenshot', - 'screenshot_frame', - 'screenshot_keyboard', - 'screenshot_monitor', - 'screenshot_region', - 'screenshot_tablet', - 'scrollable_header', - 'scuba_diving', - 'sd', - 'sd_card', - 'sd_card_alert', - 'sd_storage', - 'sdk', - 'search', - 'search_check', - 'search_hands_free', - 'search_off', - 'security', - 'security_key', - 'security_update', - 'security_update_good', - 'security_update_warning', - 'segment', - 'select', - 'select_all', - 'select_check_box', - 'select_to_speak', - 'select_window', - 'select_window_off', - 'self_care', - 'self_improvement', - 'sell', - 'send', - 'send_and_archive', - 'send_money', - 'send_time_extension', - 'send_to_mobile', - 'sensor_door', - 'sensor_occupied', - 'sensor_window', - 'sensors', - 'sensors_krx', - 'sensors_krx_off', - 'sensors_off', - 'sentiment_calm', - 'sentiment_content', - 'sentiment_dissatisfied', - 'sentiment_excited', - 'sentiment_extremely_dissatisfied', - 'sentiment_frustrated', - 'sentiment_neutral', - 'sentiment_sad', - 'sentiment_satisfied', - 'sentiment_satisfied_alt', - 'sentiment_stressed', - 'sentiment_very_dissatisfied', - 'sentiment_very_satisfied', - 'sentiment_worried', - 'service_toolbox', - 'set_meal', - 'settings', - 'settings_accessibility', - 'settings_account_box', - 'settings_alert', - 'settings_applications', - 'settings_b_roll', - 'settings_backup_restore', - 'settings_bluetooth', - 'settings_brightness', - 'settings_cell', - 'settings_cinematic_blur', - 'settings_ethernet', - 'settings_heart', - 'settings_input_antenna', - 'settings_input_component', - 'settings_input_composite', - 'settings_input_hdmi', - 'settings_input_svideo', - 'settings_motion_mode', - 'settings_night_sight', - 'settings_overscan', - 'settings_panorama', - 'settings_phone', - 'settings_photo_camera', - 'settings_power', - 'settings_remote', - 'settings_slow_motion', - 'settings_suggest', - 'settings_system_daydream', - 'settings_timelapse', - 'settings_video_camera', - 'settings_voice', - 'settop_component', - 'severe_cold', - 'shadow', - 'shadow_add', - 'shadow_minus', - 'shape_line', - 'shape_recognition', - 'shapes', - 'share', - 'share_location', - 'share_off', - 'share_reviews', - 'share_windows', - 'sheets_rtl', - 'shelf_auto_hide', - 'shelf_position', - 'shelves', - 'shield', - 'shield_lock', - 'shield_locked', - 'shield_moon', - 'shield_person', - 'shield_question', - 'shield_with_heart', - 'shield_with_house', - 'shift', - 'shift_lock', - 'shop', - 'shop_2', - 'shop_two', - 'shopping_bag', - 'shopping_basket', - 'shopping_cart', - 'shopping_cart_checkout', - 'shoppingmode', - 'short_stay', - 'short_text', - 'shortcut', - 'show_chart', - 'shower', - 'shuffle', - 'shuffle_on', - 'shutter_speed', - 'shutter_speed_add', - 'shutter_speed_minus', - 'sick', - 'side_navigation', - 'sign_language', - 'signal_cellular_0_bar', - 'signal_cellular_1_bar', - 'signal_cellular_2_bar', - 'signal_cellular_3_bar', - 'signal_cellular_4_bar', - 'signal_cellular_add', - 'signal_cellular_alt', - 'signal_cellular_alt_1_bar', - 'signal_cellular_alt_2_bar', - 'signal_cellular_connected_no_internet_0_bar', - 'signal_cellular_connected_no_internet_4_bar', - 'signal_cellular_no_sim', - 'signal_cellular_nodata', - 'signal_cellular_null', - 'signal_cellular_off', - 'signal_cellular_pause', - 'signal_disconnected', - 'signal_wifi_0_bar', - 'signal_wifi_4_bar', - 'signal_wifi_4_bar_lock', - 'signal_wifi_bad', - 'signal_wifi_connected_no_internet_4', - 'signal_wifi_off', - 'signal_wifi_statusbar_4_bar', - 'signal_wifi_statusbar_not_connected', - 'signal_wifi_statusbar_null', - 'signature', - 'signpost', - 'sim_card', - 'sim_card_alert', - 'sim_card_download', - 'single_bed', - 'sip', - 'skateboarding', - 'skeleton', - 'skillet', - 'skillet_cooktop', - 'skip_next', - 'skip_previous', - 'skull', - 'sledding', - 'sleep', - 'sleep_score', - 'slide_library', - 'sliders', - 'slideshow', - 'slow_motion_video', - 'smart_button', - 'smart_display', - 'smart_outlet', - 'smart_screen', - 'smart_toy', - 'smartphone', - 'smb_share', - 'smoke_free', - 'smoking_rooms', - 'sms', - 'sms_failed', - 'snippet_folder', - 'snooze', - 'snowboarding', - 'snowing', - 'snowing_heavy', - 'snowmobile', - 'snowshoeing', - 'soap', - 'social_distance', - 'social_leaderboard', - 'solar_power', - 'sort', - 'sort_by_alpha', - 'sos', - 'sound_detection_dog_barking', - 'sound_detection_glass_break', - 'sound_detection_loud_sound', - 'sound_sampler', - 'soup_kitchen', - 'source', - 'source_environment', - 'source_notes', - 'south', - 'south_america', - 'south_east', - 'south_west', - 'spa', - 'space_bar', - 'space_dashboard', - 'spatial_audio', - 'spatial_audio_off', - 'spatial_tracking', - 'speaker', - 'speaker_group', - 'speaker_notes', - 'speaker_notes_off', - 'speaker_phone', - 'special_character', - 'specific_gravity', - 'speech_to_text', - 'speed', - 'spellcheck', - 'splitscreen', - 'splitscreen_bottom', - 'splitscreen_left', - 'splitscreen_right', - 'splitscreen_top', - 'spo2', - 'spoke', - 'sports', - 'sports_and_outdoors', - 'sports_bar', - 'sports_baseball', - 'sports_basketball', - 'sports_cricket', - 'sports_esports', - 'sports_football', - 'sports_golf', - 'sports_gymnastics', - 'sports_handball', - 'sports_hockey', - 'sports_kabaddi', - 'sports_martial_arts', - 'sports_mma', - 'sports_motorsports', - 'sports_rugby', - 'sports_score', - 'sports_soccer', - 'sports_tennis', - 'sports_volleyball', - 'sprinkler', - 'sprint', - 'square', - 'square_foot', - 'ssid_chart', - 'stack', - 'stack_off', - 'stack_star', - 'stacked_bar_chart', - 'stacked_email', - 'stacked_inbox', - 'stacked_line_chart', - 'stacks', - 'stadia_controller', - 'stadium', - 'stairs', - 'star', - 'star_border', - 'star_border_purple500', - 'star_half', - 'star_outline', - 'star_purple500', - 'star_rate', - 'star_rate_half', - 'stars', - 'start', - 'stat_0', - 'stat_1', - 'stat_2', - 'stat_3', - 'stat_minus_1', - 'stat_minus_2', - 'stat_minus_3', - 'stay_current_landscape', - 'stay_current_portrait', - 'stay_primary_landscape', - 'stay_primary_portrait', - 'step', - 'step_into', - 'step_out', - 'step_over', - 'steppers', - 'steps', - 'stethoscope', - 'stethoscope_arrow', - 'stethoscope_check', - 'sticky_note', - 'sticky_note_2', - 'stock_media', - 'stockpot', - 'stop', - 'stop_circle', - 'stop_screen_share', - 'storage', - 'store', - 'store_mall_directory', - 'storefront', - 'storm', - 'straight', - 'straighten', - 'strategy', - 'stream', - 'stream_apps', - 'streetview', - 'stress_management', - 'strikethrough_s', - 'stroke_full', - 'stroke_partial', - 'stroller', - 'style', - 'styler', - 'stylus', - 'stylus_laser_pointer', - 'stylus_note', - 'subdirectory_arrow_left', - 'subdirectory_arrow_right', - 'subheader', - 'subject', - 'subscript', - 'subscriptions', - 'subtitles', - 'subtitles_off', - 'subway', - 'summarize', - 'sunny', - 'sunny_snowing', - 'superscript', - 'supervised_user_circle', - 'supervised_user_circle_off', - 'supervisor_account', - 'support', - 'support_agent', - 'surfing', - 'surgical', - 'surround_sound', - 'swap_calls', - 'swap_driving_apps', - 'swap_driving_apps_wheel', - 'swap_horiz', - 'swap_horizontal_circle', - 'swap_vert', - 'swap_vertical_circle', - 'sweep', - 'swipe', - 'swipe_down', - 'swipe_down_alt', - 'swipe_left', - 'swipe_left_alt', - 'swipe_right', - 'swipe_right_alt', - 'swipe_up', - 'swipe_up_alt', - 'swipe_vertical', - 'switch', - 'switch_access', - 'switch_access_2', - 'switch_access_shortcut', - 'switch_access_shortcut_add', - 'switch_account', - 'switch_camera', - 'switch_left', - 'switch_right', - 'switch_video', - 'switches', - 'sword_rose', - 'swords', - 'symptoms', - 'synagogue', - 'sync', - 'sync_alt', - 'sync_disabled', - 'sync_lock', - 'sync_problem', - 'sync_saved_locally', - 'syringe', - 'system_security_update', - 'system_security_update_good', - 'system_security_update_warning', - 'system_update', - 'system_update_alt', - 'tab', - 'tab_close', - 'tab_close_right', - 'tab_duplicate', - 'tab_group', - 'tab_move', - 'tab_new_right', - 'tab_recent', - 'tab_unselected', - 'table', - 'table_bar', - 'table_chart', - 'table_chart_view', - 'table_lamp', - 'table_restaurant', - 'table_rows', - 'table_rows_narrow', - 'table_view', - 'tablet', - 'tablet_android', - 'tablet_mac', - 'tabs', - 'tactic', - 'tag', - 'tag_faces', - 'takeout_dining', - 'tamper_detection_off', - 'tamper_detection_on', - 'tap_and_play', - 'tapas', - 'target', - 'task', - 'task_alt', - 'taunt', - 'taxi_alert', - 'team_dashboard', - 'temp_preferences_custom', - 'temp_preferences_eco', - 'temple_buddhist', - 'temple_hindu', - 'tenancy', - 'terminal', - 'terrain', - 'text_ad', - 'text_decrease', - 'text_fields', - 'text_fields_alt', - 'text_format', - 'text_increase', - 'text_rotate_up', - 'text_rotate_vertical', - 'text_rotation_angledown', - 'text_rotation_angleup', - 'text_rotation_down', - 'text_rotation_none', - 'text_select_end', - 'text_select_jump_to_beginning', - 'text_select_jump_to_end', - 'text_select_move_back_character', - 'text_select_move_back_word', - 'text_select_move_down', - 'text_select_move_forward_character', - 'text_select_move_forward_word', - 'text_select_move_up', - 'text_select_start', - 'text_snippet', - 'text_to_speech', - 'textsms', - 'texture', - 'texture_add', - 'texture_minus', - 'theater_comedy', - 'theaters', - 'thermometer', - 'thermometer_add', - 'thermometer_gain', - 'thermometer_loss', - 'thermometer_minus', - 'thermostat', - 'thermostat_auto', - 'thermostat_carbon', - 'things_to_do', - 'thumb_down', - 'thumb_down_alt', - 'thumb_down_filled', - 'thumb_down_off', - 'thumb_down_off_alt', - 'thumb_up', - 'thumb_up_alt', - 'thumb_up_filled', - 'thumb_up_off', - 'thumb_up_off_alt', - 'thumbnail_bar', - 'thumbs_up_down', - 'thunderstorm', - 'tibia', - 'tibia_alt', - 'time_auto', - 'time_to_leave', - 'timelapse', - 'timeline', - 'timer', - 'timer_10', - 'timer_10_alt_1', - 'timer_10_select', - 'timer_3', - 'timer_3_alt_1', - 'timer_3_select', - 'timer_off', - 'tips_and_updates', - 'tire_repair', - 'title', - 'toast', - 'toc', - 'today', - 'toggle_off', - 'toggle_on', - 'token', - 'toll', - 'tonality', - 'toolbar', - 'tools_flat_head', - 'tools_installation_kit', - 'tools_ladder', - 'tools_level', - 'tools_phillips', - 'tools_pliers_wire_stripper', - 'tools_power_drill', - 'tools_wrench', - 'tooltip', - 'top_panel_close', - 'top_panel_open', - 'topic', - 'tornado', - 'total_dissolved_solids', - 'touch_app', - 'touchpad_mouse', - 'tour', - 'toys', - 'toys_and_games', - 'toys_fan', - 'track_changes', - 'traffic', - 'trail_length', - 'trail_length_medium', - 'trail_length_short', - 'train', - 'tram', - 'transit_ticket', - 'trophy', - 'transcribe', - 'transfer_within_a_station', - 'transform', - 'transgender', - 'transit_enterexit', - 'transition_chop', - 'transition_dissolve', - 'transition_fade', - 'transition_push', - 'transition_slide', - 'translate', - 'transportation', - 'travel', - 'travel_explore', - 'travel_luggage_and_bags', - 'trending_down', - 'trending_flat', - 'trending_up', - 'trip', - 'trip_origin', - 'trolley', - 'trophy', - 'troubleshoot', - 'try', - 'tsunami', - 'tsv', - 'tty', - 'tune', - 'tungsten', - 'turn_left', - 'turn_right', - 'turn_sharp_left', - 'turn_sharp_right', - 'turn_slight_left', - 'turn_slight_right', - 'turned_in', - 'turned_in_not', - 'tv', - 'tv_gen', - 'tv_guide', - 'tv_off', - 'tv_options_edit_channels', - 'tv_options_input_settings', - 'tv_remote', - 'tv_signin', - 'tv_with_assistant', - 'two_pager', - 'two_wheeler', - 'type_specimen', - 'u_turn_left', - 'u_turn_right', - 'ulna_radius', - 'ulna_radius_alt', - 'umbrella', - 'unarchive', - 'undo', - 'unfold_less', - 'unfold_less_double', - 'unfold_more', - 'unfold_more_double', - 'ungroup', - 'universal_currency', - 'universal_currency_alt', - 'universal_local', - 'unknown_2', - 'unknown_5', - 'unknown_document', - 'unknown_med', - 'unlicense', - 'unpublished', - 'unsubscribe', - 'upcoming', - 'update', - 'update_disabled', - 'upgrade', - 'upload', - 'upload_2', - 'upload_file', - 'urology', - 'usb', - 'usb_off', - 'user_attributes', - 'vaccines', - 'vacuum', - 'valve', - 'vape_free', - 'vaping_rooms', - 'variable_add', - 'variable_insert', - 'variable_remove', - 'variables', - 'ventilator', - 'verified', - 'verified_user', - 'vertical_align_bottom', - 'vertical_align_center', - 'vertical_align_top', - 'vertical_distribute', - 'vertical_shades', - 'vertical_shades_closed', - 'vertical_split', - 'vibration', - 'video_call', - 'video_camera_back', - 'video_camera_front', - 'video_camera_front_off', - 'video_chat', - 'video_file', - 'video_label', - 'video_library', - 'video_search', - 'video_settings', - 'video_stable', - 'videocam', - 'videocam_off', - 'videogame_asset', - 'videogame_asset_off', - 'view_agenda', - 'view_array', - 'view_carousel', - 'view_column', - 'view_column_2', - 'view_comfy', - 'view_comfy_alt', - 'view_compact', - 'view_compact_alt', - 'view_cozy', - 'view_day', - 'view_headline', - 'view_in_ar', - 'view_in_ar_new', - 'view_in_ar_off', - 'view_kanban', - 'view_list', - 'view_module', - 'view_quilt', - 'view_sidebar', - 'view_stream', - 'view_timeline', - 'view_week', - 'vignette', - 'villa', - 'visibility', - 'visibility_lock', - 'visibility_off', - 'vital_signs', - 'vitals', - 'voice_chat', - 'voice_over_off', - 'voice_selection', - 'voicemail', - 'volcano', - 'volume_down', - 'volume_down_alt', - 'volume_mute', - 'volume_off', - 'volume_up', - 'volunteer_activism', - 'voting_chip', - 'vpn_key', - 'vpn_key_alert', - 'vpn_key_off', - 'vpn_lock', - 'vr180_create2d', - 'vr180_create2d_off', - 'vrpano', - 'wall_art', - 'wall_lamp', - 'wallet', - 'wallpaper', - 'wallpaper_slideshow', - 'ward', - 'warehouse', - 'warning', - 'warning_amber', - 'warning_off', - 'wash', - 'watch', - 'watch_button_press', - 'watch_later', - 'watch_off', - 'watch_screentime', - 'watch_wake', - 'water', - 'water_bottle', - 'water_bottle_large', - 'water_damage', - 'water_do', - 'water_drop', - 'water_ec', - 'water_full', - 'water_heater', - 'water_lock', - 'water_loss', - 'water_lux', - 'water_medium', - 'water_orp', - 'water_ph', - 'water_pump', - 'water_voc', - 'waterfall_chart', - 'waves', - 'waving_hand', - 'wb_auto', - 'wb_cloudy', - 'wb_incandescent', - 'wb_iridescent', - 'wb_shade', - 'wb_sunny', - 'wb_twilight', - 'wc', - 'weather_hail', - 'weather_mix', - 'weather_snowy', - 'web', - 'web_asset', - 'web_asset_off', - 'web_stories', - 'web_traffic', - 'webhook', - 'weekend', - 'weight', - 'west', - 'whatshot', - 'wheelchair_pickup', - 'where_to_vote', - 'widgets', - 'width', - 'width_full', - 'width_normal', - 'width_wide', - 'wifi', - 'wifi_1_bar', - 'wifi_2_bar', - 'wifi_add', - 'wifi_calling', - 'wifi_calling_1', - 'wifi_calling_2', - 'wifi_calling_3', - 'wifi_channel', - 'wifi_find', - 'wifi_home', - 'wifi_lock', - 'wifi_notification', - 'wifi_off', - 'wifi_password', - 'wifi_protected_setup', - 'wifi_proxy', - 'wifi_tethering', - 'wifi_tethering_error', - 'wifi_tethering_off', - 'wind_power', - 'window', - 'window_closed', - 'window_open', - 'window_sensor', - 'wine_bar', - 'woman', - 'woman_2', - 'work', - 'work_alert', - 'work_history', - 'work_off', - 'work_outline', - 'work_update', - 'workflow', - 'workspace_premium', - 'workspaces', - 'workspaces_outline', - 'wounds_injuries', - 'wrap_text', - 'wrist', - 'wrong_location', - 'wysiwyg', - 'yard', - 'your_trips', - 'youtube_activity', - 'youtube_searched_for', - 'zone_person_alert', - 'zone_person_idle', - 'zone_person_urgent', - 'zoom_in', - 'zoom_in_map', - 'zoom_out', - 'zoom_out_map', + "10k", + "10mp", + "11mp", + "123", + "12mp", + "13mp", + "14mp", + "15mp", + "16mp", + "17mp", + "18_up_rating", + "18mp", + "19mp", + "1k", + "1k_plus", + "1x_mobiledata", + "1x_mobiledata_badge", + "20mp", + "21mp", + "22mp", + "23mp", + "24mp", + "2d", + "2k", + "2k_plus", + "2mp", + "30fps", + "30fps_select", + "360", + "3d_rotation", + "3g_mobiledata", + "3g_mobiledata_badge", + "3k", + "3k_plus", + "3mp", + "3p", + "4g_mobiledata", + "4g_mobiledata_badge", + "4g_plus_mobiledata", + "4k", + "4k_plus", + "4mp", + "50mp", + "5g", + "5g_mobiledata_badge", + "5k", + "5k_plus", + "5mp", + "60fps", + "60fps_select", + "6_ft_apart", + "6k", + "6k_plus", + "6mp", + "7k", + "7k_plus", + "7mp", + "8k", + "8k_plus", + "8mp", + "9k", + "9k_plus", + "9mp", + "abc", + "ac_unit", + "access_alarm", + "access_alarms", + "access_time", + "access_time_filled", + "accessibility", + "accessibility_new", + "accessible", + "accessible_forward", + "account_balance", + "account_balance_wallet", + "account_box", + "account_child", + "account_child_invert", + "account_circle", + "account_circle_filled", + "account_circle_off", + "account_tree", + "action_key", + "activity_zone", + "acute", + "ad", + "ad_group", + "ad_group_off", + "ad_off", + "ad_units", + "adb", + "add", + "add_a_photo", + "add_ad", + "add_alarm", + "add_alert", + "add_box", + "add_business", + "add_call", + "add_card", + "add_chart", + "add_circle", + "add_circle_outline", + "add_comment", + "add_home", + "add_home_work", + "add_ic_call", + "add_link", + "add_location", + "add_location_alt", + "add_moderator", + "add_notes", + "add_photo_alternate", + "add_reaction", + "add_road", + "add_shopping_cart", + "add_task", + "add_to_drive", + "add_to_home_screen", + "add_to_photos", + "add_to_queue", + "addchart", + "adf_scanner", + "adjust", + "admin_meds", + "admin_panel_settings", + "ads_click", + "agender", + "agriculture", + "air", + "air_freshener", + "air_purifier", + "air_purifier_gen", + "airline_seat_flat", + "airline_seat_flat_angled", + "airline_seat_individual_suite", + "airline_seat_legroom_extra", + "airline_seat_legroom_normal", + "airline_seat_legroom_reduced", + "airline_seat_recline_extra", + "airline_seat_recline_normal", + "airline_stops", + "airlines", + "airplane_ticket", + "airplanemode_active", + "airplanemode_inactive", + "airplay", + "airport_shuttle", + "airware", + "airwave", + "alarm", + "alarm_add", + "alarm_off", + "alarm_on", + "alarm_smart_wake", + "album", + "align_center", + "align_end", + "align_flex_center", + "align_flex_end", + "align_flex_start", + "align_horizontal_center", + "align_horizontal_left", + "align_horizontal_right", + "align_items_stretch", + "align_justify_center", + "align_justify_flex_end", + "align_justify_flex_start", + "align_justify_space_around", + "align_justify_space_between", + "align_justify_space_even", + "align_justify_stretch", + "align_self_stretch", + "align_space_around", + "align_space_between", + "align_space_even", + "align_start", + "align_stretch", + "align_vertical_bottom", + "align_vertical_center", + "align_vertical_top", + "all_inbox", + "all_inclusive", + "all_match", + "all_out", + "allergies", + "allergy", + "alt_route", + "alternate_email", + "altitude", + "ambient_screen", + "ambulance", + "amend", + "amp_stories", + "analytics", + "anchor", + "android", + "animation", + "announcement", + "aod", + "aod_tablet", + "aod_watch", + "apartment", + "api", + "apk_document", + "apk_install", + "app_badging", + "app_blocking", + "app_promo", + "app_registration", + "app_settings_alt", + "app_shortcut", + "apparel", + "approval", + "approval_delegation", + "apps", + "apps_outage", + "aq", + "aq_indoor", + "ar_on_you", + "ar_stickers", + "architecture", + "archive", + "area_chart", + "arming_countdown", + "arrow_and_edge", + "arrow_back", + "arrow_back_ios", + "arrow_back_ios_new", + "arrow_circle_down", + "arrow_circle_left", + "arrow_circle_right", + "arrow_circle_up", + "arrow_downward", + "arrow_downward_alt", + "arrow_drop_down", + "arrow_drop_down_circle", + "arrow_drop_up", + "arrow_forward", + "arrow_forward_ios", + "arrow_insert", + "arrow_left", + "arrow_left_alt", + "arrow_or_edge", + "arrow_outward", + "arrow_range", + "arrow_right", + "arrow_right_alt", + "arrow_selector_tool", + "arrow_split", + "arrow_top_left", + "arrow_top_right", + "arrow_upward", + "arrow_upward_alt", + "arrows_more_down", + "arrows_more_up", + "arrows_outward", + "art_track", + "article", + "article_shortcut", + "artist", + "aspect_ratio", + "assessment", + "assignment", + "assignment_add", + "assignment_ind", + "assignment_late", + "assignment_return", + "assignment_returned", + "assignment_turned_in", + "assist_walker", + "assistant", + "assistant_device", + "assistant_direction", + "assistant_navigation", + "assistant_on_hub", + "assistant_photo", + "assured_workload", + "asterisk", + "astrophotography_auto", + "astrophotography_off", + "atm", + "atr", + "attach_email", + "attach_file", + "attach_file_add", + "attach_money", + "attachment", + "attractions", + "attribution", + "audio_description", + "audio_file", + "audio_video_receiver", + "audiotrack", + "auto_activity_zone", + "auto_awesome", + "auto_awesome_mosaic", + "auto_awesome_motion", + "auto_delete", + "auto_detect_voice", + "auto_draw_solid", + "auto_fix", + "auto_fix_high", + "auto_fix_normal", + "auto_fix_off", + "auto_graph", + "auto_label", + "auto_meeting_room", + "auto_mode", + "auto_read_pause", + "auto_read_play", + "auto_schedule", + "auto_stories", + "auto_timer", + "auto_towing", + "auto_transmission", + "auto_videocam", + "autofps_select", + "autopause", + "autopay", + "autoplay", + "autorenew", + "autostop", + "av_timer", + "avg_pace", + "avg_time", + "award_star", + "azm", + "baby_changing_station", + "back_hand", + "back_to_tab", + "background_dot_large", + "background_dot_small", + "background_grid_small", + "background_replace", + "backlight_high", + "backlight_low", + "backpack", + "backspace", + "backup", + "backup_table", + "badge", + "badge_critical_battery", + "bakery_dining", + "balance", + "balcony", + "ballot", + "bar_chart", + "bar_chart_4_bars", + "barcode", + "barcode_reader", + "barcode_scanner", + "barefoot", + "batch_prediction", + "bath_outdoor", + "bath_private", + "bath_public_large", + "bathroom", + "bathtub", + "battery_0_bar", + "battery_1_bar", + "battery_20", + "battery_2_bar", + "battery_30", + "battery_3_bar", + "battery_4_bar", + "battery_50", + "battery_5_bar", + "battery_60", + "battery_6_bar", + "battery_80", + "battery_90", + "battery_alert", + "battery_change", + "battery_charging_20", + "battery_charging_30", + "battery_charging_50", + "battery_charging_60", + "battery_charging_80", + "battery_charging_90", + "battery_charging_full", + "battery_error", + "battery_full", + "battery_full_alt", + "battery_horiz_000", + "battery_horiz_050", + "battery_horiz_075", + "battery_low", + "battery_plus", + "battery_profile", + "battery_saver", + "battery_share", + "battery_status_good", + "battery_std", + "battery_unknown", + "battery_vert_005", + "battery_vert_020", + "battery_vert_050", + "battery_very_low", + "beach_access", + "bed", + "bedroom_baby", + "bedroom_child", + "bedroom_parent", + "bedtime", + "bedtime_off", + "beenhere", + "bento", + "bia", + "bid_landscape", + "bid_landscape_disabled", + "bigtop_updates", + "bike_scooter", + "biotech", + "blanket", + "blender", + "blind", + "blinds", + "blinds_closed", + "block", + "blood_pressure", + "bloodtype", + "bluetooth", + "bluetooth_audio", + "bluetooth_connected", + "bluetooth_disabled", + "bluetooth_drive", + "bluetooth_searching", + "blur_circular", + "blur_linear", + "blur_medium", + "blur_off", + "blur_on", + "blur_short", + "body_fat", + "body_system", + "bolt", + "bomb", + "book", + "book_2", + "book_3", + "book_4", + "book_5", + "book_online", + "bookmark", + "bookmark_add", + "bookmark_added", + "bookmark_border", + "bookmark_manager", + "bookmark_remove", + "bookmarks", + "border_all", + "border_bottom", + "border_clear", + "border_color", + "border_horizontal", + "border_inner", + "border_left", + "border_outer", + "border_right", + "border_style", + "border_top", + "border_vertical", + "bottom_app_bar", + "bottom_drawer", + "bottom_navigation", + "bottom_panel_close", + "bottom_panel_open", + "bottom_right_click", + "bottom_sheets", + "box", + "box_add", + "box_edit", + "boy", + "brand_awareness", + "branding_watermark", + "breakfast_dining", + "breaking_news", + "breaking_news_alt_1", + "breastfeeding", + "brightness_1", + "brightness_2", + "brightness_3", + "brightness_4", + "brightness_5", + "brightness_6", + "brightness_7", + "brightness_alert", + "brightness_auto", + "brightness_empty", + "brightness_high", + "brightness_low", + "brightness_medium", + "bring_your_own_ip", + "broadcast_on_home", + "broadcast_on_personal", + "broken_image", + "browse", + "browse_activity", + "browse_gallery", + "browser_not_supported", + "browser_updated", + "brunch_dining", + "brush", + "bubble", + "bubble_chart", + "bubbles", + "bug_report", + "build", + "build_circle", + "bungalow", + "burst_mode", + "bus_alert", + "business", + "business_center", + "business_chip", + "business_messages", + "buttons_alt", + "cabin", + "cable", + "cached", + "cake", + "cake_add", + "calculate", + "calendar_add_on", + "calendar_apps_script", + "calendar_clock", + "calendar_month", + "calendar_today", + "calendar_view_day", + "calendar_view_month", + "calendar_view_week", + "call", + "call_end", + "call_end_alt", + "call_log", + "call_made", + "call_merge", + "call_missed", + "call_missed_outgoing", + "call_quality", + "call_received", + "call_split", + "call_to_action", + "camera", + "camera_alt", + "camera_enhance", + "camera_front", + "camera_indoor", + "camera_outdoor", + "camera_rear", + "camera_roll", + "camera_video", + "cameraswitch", + "campaign", + "camping", + "cancel", + "cancel_presentation", + "cancel_schedule_send", + "candle", + "candlestick_chart", + "captive_portal", + "capture", + "car_crash", + "car_rental", + "car_repair", + "card_giftcard", + "card_membership", + "card_travel", + "cardiology", + "cards", + "carpenter", + "carry_on_bag", + "carry_on_bag_checked", + "carry_on_bag_inactive", + "carry_on_bag_question", + "cases", + "casino", + "cast", + "cast_connected", + "cast_for_education", + "cast_pause", + "cast_warning", + "castle", + "category", + "celebration", + "cell_merge", + "cell_tower", + "cell_wifi", + "center_focus_strong", + "center_focus_weak", + "chair", + "chair_alt", + "chalet", + "change_circle", + "change_history", + "charger", + "charging_station", + "chart_data", + "chat", + "chat_add_on", + "chat_apps_script", + "chat_bubble", + "chat_bubble_outline", + "chat_error", + "chat_info", + "chat_paste_go", + "check", + "check_box", + "check_box_outline_blank", + "check_circle", + "check_circle_filled", + "check_circle_outline", + "check_in_out", + "check_indeterminate_small", + "check_small", + "checkbook", + "checked_bag", + "checked_bag_question", + "checklist", + "checklist_rtl", + "checkroom", + "cheer", + "chess", + "chevron_left", + "chevron_right", + "child_care", + "child_friendly", + "chip_extraction", + "chips", + "chrome_reader_mode", + "chromecast_2", + "chromecast_device", + "chronic", + "church", + "cinematic_blur", + "circle", + "circle_notifications", + "circles", + "circles_ext", + "clarify", + "class", + "clean_hands", + "cleaning", + "cleaning_bucket", + "cleaning_services", + "clear", + "clear_all", + "clear_day", + "clear_night", + "climate_mini_split", + "clinical_notes", + "clock_loader_10", + "clock_loader_20", + "clock_loader_40", + "clock_loader_60", + "clock_loader_80", + "clock_loader_90", + "close", + "close_fullscreen", + "close_small", + "closed_caption", + "closed_caption_disabled", + "closed_caption_off", + "cloud", + "cloud_circle", + "cloud_done", + "cloud_download", + "cloud_off", + "cloud_queue", + "cloud_sync", + "cloud_upload", + "cloudy", + "cloudy_filled", + "cloudy_snowing", + "co2", + "co_present", + "code", + "code_blocks", + "code_off", + "coffee", + "coffee_maker", + "cognition", + "collapse_all", + "collapse_content", + "collections", + "collections_bookmark", + "color_lens", + "colorize", + "colors", + "comic_bubble", + "comment", + "comment_bank", + "comments_disabled", + "commit", + "communication", + "communities", + "communities_filled", + "commute", + "compare", + "compare_arrows", + "compass_calibration", + "component_exchange", + "compost", + "compress", + "computer", + "concierge", + "conditions", + "confirmation_number", + "congenital", + "connect_without_contact", + "connected_tv", + "connecting_airports", + "construction", + "contact_emergency", + "contact_mail", + "contact_page", + "contact_phone", + "contact_phone_filled", + "contact_support", + "contactless", + "contactless_off", + "contacts", + "contacts_product", + "content_copy", + "content_cut", + "content_paste", + "content_paste_go", + "content_paste_off", + "content_paste_search", + "contract", + "contract_delete", + "contract_edit", + "contrast", + "contrast_rtl_off", + "control_camera", + "control_point", + "control_point_duplicate", + "controller_gen", + "conversion_path", + "conversion_path_off", + "conveyor_belt", + "cookie", + "cookie_off", + "cooking", + "cool_to_dry", + "copy_all", + "copyright", + "coronavirus", + "corporate_fare", + "cottage", + "counter_0", + "counter_1", + "counter_2", + "counter_3", + "counter_4", + "counter_5", + "counter_6", + "counter_7", + "counter_8", + "counter_9", + "countertops", + "create", + "create_new_folder", + "credit_card", + "credit_card_gear", + "credit_card_heart", + "credit_card_off", + "credit_score", + "crib", + "crisis_alert", + "crop", + "crop_16_9", + "crop_3_2", + "crop_5_4", + "crop_7_5", + "crop_9_16", + "crop_din", + "crop_free", + "crop_landscape", + "crop_original", + "crop_portrait", + "crop_rotate", + "crop_square", + "crossword", + "crowdsource", + "cruelty_free", + "css", + "csv", + "currency_bitcoin", + "currency_exchange", + "currency_franc", + "currency_lira", + "currency_pound", + "currency_ruble", + "currency_rupee", + "currency_yen", + "currency_yuan", + "curtains", + "curtains_closed", + "custom_typography", + "cut", + "cycle", + "cyclone", + "dangerous", + "dark_mode", + "dashboard", + "dashboard_customize", + "data_alert", + "data_array", + "data_check", + "data_exploration", + "data_info_alert", + "data_loss_prevention", + "data_object", + "data_saver_off", + "data_saver_on", + "data_table", + "data_thresholding", + "data_usage", + "database", + "dataset", + "dataset_linked", + "date_range", + "deblur", + "deceased", + "decimal_decrease", + "decimal_increase", + "deck", + "dehaze", + "delete", + "delete_forever", + "delete_history", + "delete_outline", + "delete_sweep", + "demography", + "density_large", + "density_medium", + "density_small", + "dentistry", + "departure_board", + "deployed_code", + "deployed_code_account", + "deployed_code_alert", + "deployed_code_history", + "deployed_code_update", + "dermatology", + "description", + "deselect", + "design_services", + "desk", + "deskphone", + "desktop_access_disabled", + "desktop_mac", + "desktop_windows", + "destruction", + "details", + "detection_and_zone", + "detector", + "detector_alarm", + "detector_battery", + "detector_co", + "detector_offline", + "detector_smoke", + "detector_status", + "developer_board", + "developer_board_off", + "developer_guide", + "developer_mode", + "developer_mode_tv", + "device_hub", + "device_reset", + "device_thermostat", + "device_unknown", + "devices", + "devices_fold", + "devices_off", + "devices_other", + "devices_wearables", + "dew_point", + "diagnosis", + "dialer_sip", + "dialogs", + "dialpad", + "diamond", + "dictionary", + "difference", + "digital_out_of_home", + "digital_wellbeing", + "dining", + "dinner_dining", + "directions", + "directions_alt", + "directions_alt_off", + "directions_bike", + "directions_boat", + "directions_boat_filled", + "directions_bus", + "directions_bus_filled", + "directions_car", + "directions_car_filled", + "directions_off", + "directions_railway", + "directions_railway_filled", + "directions_run", + "directions_subway", + "directions_subway_filled", + "directions_transit", + "directions_transit_filled", + "directions_walk", + "directory_sync", + "dirty_lens", + "disabled_by_default", + "disabled_visible", + "disc_full", + "discover_tune", + "dishwasher", + "dishwasher_gen", + "display_external_input", + "display_settings", + "distance", + "diversity_1", + "diversity_2", + "diversity_3", + "diversity_4", + "dns", + "do_disturb", + "do_disturb_alt", + "do_disturb_off", + "do_disturb_on", + "do_not_disturb", + "do_not_disturb_alt", + "do_not_disturb_off", + "do_not_disturb_on", + "do_not_disturb_on_total_silence", + "do_not_step", + "do_not_touch", + "dock", + "dock_to_bottom", + "dock_to_left", + "dock_to_right", + "docs_add_on", + "docs_apps_script", + "document_scanner", + "domain", + "domain_add", + "domain_disabled", + "domain_verification", + "domain_verification_off", + "domino_mask", + "done", + "done_all", + "done_outline", + "donut_large", + "donut_small", + "door_back", + "door_front", + "door_open", + "door_sensor", + "door_sliding", + "doorbell", + "doorbell_3p", + "doorbell_chime", + "double_arrow", + "downhill_skiing", + "download", + "download_2", + "download_done", + "download_for_offline", + "downloading", + "draft", + "draft_orders", + "drafts", + "drag_click", + "drag_handle", + "drag_indicator", + "drag_pan", + "draw", + "draw_abstract", + "draw_collage", + "drawing_recognition", + "dresser", + "drive_eta", + "drive_file_move", + "drive_file_move_outline", + "drive_file_move_rtl", + "drive_file_rename_outline", + "drive_folder_upload", + "drive_fusiontable", + "dropdown", + "dry", + "dry_cleaning", + "dual_screen", + "duo", + "dvr", + "dynamic_feed", + "dynamic_form", + "e911_avatar", + "e911_emergency", + "e_mobiledata", + "e_mobiledata_badge", + "earbuds", + "earbuds_battery", + "early_on", + "earthquake", + "east", + "ecg", + "ecg_heart", + "eco", + "eda", + "edgesensor_high", + "edgesensor_low", + "edit", + "edit_attributes", + "edit_calendar", + "edit_document", + "edit_location", + "edit_location_alt", + "edit_note", + "edit_notifications", + "edit_off", + "edit_road", + "edit_square", + "editor_choice", + "egg", + "egg_alt", + "eject", + "elderly", + "elderly_woman", + "electric_bike", + "electric_bolt", + "electric_car", + "electric_meter", + "electric_moped", + "electric_rickshaw", + "electric_scooter", + "electrical_services", + "elevation", + "elevator", + "email", + "emergency", + "emergency_heat", + "emergency_home", + "emergency_recording", + "emergency_share", + "emergency_share_off", + "emoji_emotions", + "emoji_events", + "emoji_flags", + "emoji_food_beverage", + "emoji_nature", + "emoji_objects", + "emoji_people", + "emoji_symbols", + "emoji_transportation", + "emoticon", + "empty_dashboard", + "enable", + "encrypted", + "endocrinology", + "energy", + "energy_program_saving", + "energy_program_time_used", + "energy_savings_leaf", + "engineering", + "enhanced_encryption", + "ent", + "enterprise", + "enterprise_off", + "equal", + "equalizer", + "error", + "error_circle_rounded", + "error_med", + "error_outline", + "escalator", + "escalator_warning", + "euro", + "euro_symbol", + "ev_charger", + "ev_mobiledata_badge", + "ev_shadow", + "ev_shadow_add", + "ev_shadow_minus", + "ev_station", + "event", + "event_available", + "event_busy", + "event_list", + "event_note", + "event_repeat", + "event_seat", + "event_upcoming", + "exclamation", + "exercise", + "exit_to_app", + "expand", + "expand_all", + "expand_circle_down", + "expand_circle_right", + "expand_circle_up", + "expand_content", + "expand_less", + "expand_more", + "experiment", + "explicit", + "explore", + "explore_nearby", + "explore_off", + "explosion", + "export_notes", + "exposure", + "exposure_neg_1", + "exposure_neg_2", + "exposure_plus_1", + "exposure_plus_2", + "exposure_zero", + "extension", + "extension_off", + "eyeglasses", + "face", + "face_2", + "face_3", + "face_4", + "face_5", + "face_6", + "face_retouching_natural", + "face_retouching_off", + "face_unlock", + "fact_check", + "factory", + "falling", + "familiar_face_and_zone", + "family_history", + "family_home", + "family_link", + "family_restroom", + "family_star", + "farsight_digital", + "fast_forward", + "fast_rewind", + "fastfood", + "faucet", + "favorite", + "favorite_border", + "fax", + "feature_search", + "featured_play_list", + "featured_seasonal_and_gifts", + "featured_video", + "feed", + "feedback", + "female", + "femur", + "femur_alt", + "fence", + "fertile", + "festival", + "fiber_dvr", + "fiber_manual_record", + "fiber_new", + "fiber_pin", + "fiber_smart_record", + "file_copy", + "file_download", + "file_download_done", + "file_download_off", + "file_map", + "file_open", + "file_present", + "file_save", + "file_save_off", + "file_upload", + "file_upload_off", + "filter", + "filter_1", + "filter_2", + "filter_3", + "filter_4", + "filter_5", + "filter_6", + "filter_7", + "filter_8", + "filter_9", + "filter_9_plus", + "filter_alt", + "filter_alt_off", + "filter_b_and_w", + "filter_center_focus", + "filter_drama", + "filter_frames", + "filter_hdr", + "filter_list", + "filter_list_alt", + "filter_list_off", + "filter_none", + "filter_retrolux", + "filter_tilt_shift", + "filter_vintage", + "finance", + "finance_chip", + "finance_mode", + "find_in_page", + "find_replace", + "fingerprint", + "fire_extinguisher", + "fire_hydrant", + "fire_truck", + "fireplace", + "first_page", + "fit_page", + "fit_screen", + "fit_width", + "fitness_center", + "flag", + "flag_circle", + "flag_filled", + "flaky", + "flare", + "flash_auto", + "flash_off", + "flash_on", + "flashlight_off", + "flashlight_on", + "flatware", + "flex_direction", + "flex_no_wrap", + "flex_wrap", + "flight", + "flight_class", + "flight_land", + "flight_takeoff", + "flights_and_hotels", + "flightsmode", + "flip", + "flip_camera_android", + "flip_camera_ios", + "flip_to_back", + "flip_to_front", + "flood", + "floor", + "floor_lamp", + "flourescent", + "flowsheet", + "fluid", + "fluid_balance", + "fluid_med", + "fluorescent", + "flutter", + "flutter_dash", + "fmd_bad", + "fmd_good", + "foggy", + "folded_hands", + "folder", + "folder_copy", + "folder_data", + "folder_delete", + "folder_managed", + "folder_off", + "folder_open", + "folder_shared", + "folder_special", + "folder_supervised", + "folder_zip", + "follow_the_signs", + "font_download", + "font_download_off", + "food_bank", + "foot_bones", + "footprint", + "for_you", + "forest", + "fork_left", + "fork_right", + "forklift", + "format_align_center", + "format_align_justify", + "format_align_left", + "format_align_right", + "format_bold", + "format_clear", + "format_color_fill", + "format_color_reset", + "format_color_text", + "format_h1", + "format_h2", + "format_h3", + "format_h4", + "format_h5", + "format_h6", + "format_image_left", + "format_image_right", + "format_indent_decrease", + "format_indent_increase", + "format_ink_highlighter", + "format_italic", + "format_letter_spacing", + "format_letter_spacing_2", + "format_letter_spacing_standard", + "format_letter_spacing_wide", + "format_letter_spacing_wider", + "format_line_spacing", + "format_list_bulleted", + "format_list_bulleted_add", + "format_list_numbered", + "format_list_numbered_rtl", + "format_overline", + "format_paint", + "format_paragraph", + "format_quote", + "format_shapes", + "format_size", + "format_strikethrough", + "format_text_clip", + "format_text_overflow", + "format_text_wrap", + "format_textdirection_l_to_r", + "format_textdirection_r_to_l", + "format_underlined", + "format_underlined_squiggle", + "forms_add_on", + "forms_apps_script", + "fort", + "forum", + "forward", + "forward_10", + "forward_30", + "forward_5", + "forward_circle", + "forward_media", + "forward_to_inbox", + "foundation", + "frame_inspect", + "frame_person", + "frame_person_off", + "frame_reload", + "frame_source", + "free_breakfast", + "free_cancellation", + "front_hand", + "front_loader", + "full_coverage", + "full_hd", + "full_stacked_bar_chart", + "fullscreen", + "fullscreen_exit", + "function", + "functions", + "g_mobiledata", + "g_mobiledata_badge", + "g_translate", + "gallery_thumbnail", + "gamepad", + "games", + "garage", + "garage_door", + "garage_home", + "garden_cart", + "gas_meter", + "gastroenterology", + "gate", + "gavel", + "general_device", + "generating_tokens", + "genetics", + "genres", + "gesture", + "gesture_select", + "get_app", + "gif", + "gif_box", + "girl", + "gite", + "glass_cup", + "globe", + "globe_asia", + "globe_uk", + "glucose", + "glyphs", + "go_to_line", + "golf_course", + "google_home_devices", + "google_plus_reshare", + "google_tv_remote", + "google_wifi", + "gpp_bad", + "gpp_good", + "gpp_maybe", + "gps_fixed", + "gps_not_fixed", + "gps_off", + "grade", + "gradient", + "grading", + "grain", + "graphic_eq", + "grass", + "grid_3x3", + "grid_3x3_off", + "grid_4x4", + "grid_goldenratio", + "grid_guides", + "grid_off", + "grid_on", + "grid_view", + "grocery", + "group", + "group_add", + "group_off", + "group_remove", + "group_work", + "grouped_bar_chart", + "groups", + "groups_2", + "groups_3", + "gynecology", + "h_mobiledata", + "h_mobiledata_badge", + "h_plus_mobiledata", + "h_plus_mobiledata_badge", + "hail", + "hallway", + "hand_bones", + "hand_gesture", + "handshake", + "handwriting_recognition", + "handyman", + "hangout_video", + "hangout_video_off", + "hard_drive", + "hard_drive_2", + "hardware", + "hd", + "hdr_auto", + "hdr_auto_select", + "hdr_enhanced_select", + "hdr_off", + "hdr_off_select", + "hdr_on", + "hdr_on_select", + "hdr_plus", + "hdr_plus_off", + "hdr_strong", + "hdr_weak", + "headphones", + "headphones_battery", + "headset", + "headset_mic", + "headset_off", + "healing", + "health_and_beauty", + "health_and_safety", + "health_metrics", + "heap_snapshot_large", + "heap_snapshot_multiple", + "heap_snapshot_thumbnail", + "hearing", + "hearing_disabled", + "heart_broken", + "heart_check", + "heart_minus", + "heart_plus", + "heat", + "heat_pump", + "heat_pump_balance", + "height", + "helicopter", + "help", + "help_center", + "help_clinic", + "help_outline", + "hematology", + "hevc", + "hexagon", + "hide", + "hide_image", + "hide_source", + "high_density", + "high_quality", + "high_res", + "highlight", + "highlight_keyboard_focus", + "highlight_mouse_cursor", + "highlight_off", + "highlight_text_cursor", + "highlighter_size_1", + "highlighter_size_2", + "highlighter_size_3", + "highlighter_size_4", + "highlighter_size_5", + "hiking", + "history", + "history_edu", + "history_toggle_off", + "hive", + "hls", + "hls_off", + "holiday_village", + "home", + "home_and_garden", + "home_app_logo", + "home_filled", + "home_health", + "home_improvement_and_tools", + "home_iot_device", + "home_max", + "home_max_dots", + "home_mini", + "home_pin", + "home_repair_service", + "home_speaker", + "home_storage", + "home_work", + "horizontal_distribute", + "horizontal_rule", + "horizontal_split", + "hot_tub", + "hotel", + "hotel_class", + "hourglass", + "hourglass_bottom", + "hourglass_disabled", + "hourglass_empty", + "hourglass_full", + "hourglass_top", + "house", + "house_siding", + "house_with_shield", + "houseboat", + "household_supplies", + "how_to_reg", + "how_to_vote", + "hr_resting", + "html", + "http", + "https", + "hub", + "humerus", + "humerus_alt", + "humidity_high", + "humidity_indoor", + "humidity_low", + "humidity_mid", + "humidity_percentage", + "hvac", + "ice_skating", + "icecream", + "id_card", + "ifl", + "iframe", + "iframe_off", + "image", + "image_aspect_ratio", + "image_not_supported", + "image_search", + "imagesearch_roller", + "imagesmode", + "immunology", + "import_contacts", + "import_export", + "important_devices", + "in_home_mode", + "inactive_order", + "inbox", + "inbox_customize", + "incomplete_circle", + "indeterminate_check_box", + "indeterminate_question_box", + "info", + "info_i", + "infrared", + "ink_eraser", + "ink_eraser_off", + "ink_highlighter", + "ink_highlighter_move", + "ink_marker", + "ink_pen", + "inpatient", + "input", + "input_circle", + "insert_chart", + "insert_chart_filled", + "insert_chart_outlined", + "insert_comment", + "insert_drive_file", + "insert_emoticon", + "insert_invitation", + "insert_link", + "insert_page_break", + "insert_photo", + "insert_text", + "insights", + "install_desktop", + "install_mobile", + "instant_mix", + "integration_instructions", + "interactive_space", + "interests", + "interpreter_mode", + "inventory", + "inventory_2", + "invert_colors", + "invert_colors_off", + "ios", + "ios_share", + "iron", + "iso", + "jamboard_kiosk", + "javascript", + "join", + "join_full", + "join_inner", + "join_left", + "join_right", + "joystick", + "jump_to_element", + "kayaking", + "kebab_dining", + "kettle", + "key", + "key_off", + "key_vertical", + "key_visualizer", + "keyboard", + "keyboard_alt", + "keyboard_arrow_down", + "keyboard_arrow_left", + "keyboard_arrow_right", + "keyboard_arrow_up", + "keyboard_backspace", + "keyboard_capslock", + "keyboard_capslock_badge", + "keyboard_command_key", + "keyboard_control_key", + "keyboard_double_arrow_down", + "keyboard_double_arrow_left", + "keyboard_double_arrow_right", + "keyboard_double_arrow_up", + "keyboard_external_input", + "keyboard_full", + "keyboard_hide", + "keyboard_keys", + "keyboard_off", + "keyboard_onscreen", + "keyboard_option_key", + "keyboard_previous_language", + "keyboard_return", + "keyboard_tab", + "keyboard_tab_rtl", + "keyboard_voice", + "kid_star", + "king_bed", + "kitchen", + "kitesurfing", + "lab_panel", + "lab_profile", + "lab_research", + "label", + "label_important", + "label_important_outline", + "label_off", + "label_outline", + "labs", + "lan", + "landscape", + "landslide", + "language", + "language_chinese_array", + "language_chinese_cangjie", + "language_chinese_dayi", + "language_chinese_pinyin", + "language_chinese_quick", + "language_chinese_wubi", + "language_french", + "language_gb_english", + "language_international", + "language_japanese_kana", + "language_korean_latin", + "language_pinyin", + "language_spanish", + "language_us", + "language_us_colemak", + "language_us_dvorak", + "laps", + "laptop", + "laptop_chromebook", + "laptop_mac", + "laptop_windows", + "lasso_select", + "last_page", + "launch", + "laundry", + "layers", + "layers_clear", + "lda", + "leaderboard", + "leak_add", + "leak_remove", + "left_click", + "left_panel_close", + "left_panel_open", + "legend_toggle", + "lens", + "lens_blur", + "letter_switch", + "library_add", + "library_add_check", + "library_books", + "library_music", + "license", + "lift_to_talk", + "light", + "light_group", + "light_mode", + "light_off", + "lightbulb", + "lightbulb_circle", + "lightbulb_outline", + "lightning_stand", + "line_axis", + "line_curve", + "line_end", + "line_end_arrow", + "line_end_arrow_notch", + "line_end_circle", + "line_end_diamond", + "line_end_square", + "line_start", + "line_start_arrow", + "line_start_arrow_notch", + "line_start_circle", + "line_start_diamond", + "line_start_square", + "line_style", + "line_weight", + "linear_scale", + "link", + "link_off", + "linked_camera", + "linked_services", + "liquor", + "list", + "list_alt", + "list_alt_add", + "lists", + "live_help", + "live_tv", + "living", + "local_activity", + "local_airport", + "local_atm", + "local_bar", + "local_cafe", + "local_car_wash", + "local_convenience_store", + "local_dining", + "local_drink", + "local_fire_department", + "local_florist", + "local_gas_station", + "local_grocery_store", + "local_hospital", + "local_hotel", + "local_laundry_service", + "local_library", + "local_mall", + "local_movies", + "local_offer", + "local_parking", + "local_pharmacy", + "local_phone", + "local_pizza", + "local_play", + "local_police", + "local_post_office", + "local_printshop", + "local_see", + "local_shipping", + "local_taxi", + "location_automation", + "location_away", + "location_chip", + "location_city", + "location_disabled", + "location_home", + "location_off", + "location_on", + "location_pin", + "location_searching", + "locator_tag", + "lock", + "lock_clock", + "lock_open", + "lock_open_right", + "lock_outline", + "lock_person", + "lock_reset", + "login", + "logo_dev", + "logout", + "looks", + "looks_3", + "looks_4", + "looks_5", + "looks_6", + "looks_one", + "looks_two", + "loop", + "loupe", + "low_density", + "low_priority", + "loyalty", + "lte_mobiledata", + "lte_mobiledata_badge", + "lte_plus_mobiledata", + "lte_plus_mobiledata_badge", + "luggage", + "lunch_dining", + "lyrics", + "macro_auto", + "macro_off", + "magic_button", + "magic_exchange", + "magic_tether", + "magnification_large", + "magnification_small", + "magnify_docked", + "magnify_fullscreen", + "mail", + "mail_lock", + "mail_outline", + "male", + "man", + "man_2", + "man_3", + "man_4", + "manage_accounts", + "manage_history", + "manage_search", + "manga", + "manufacturing", + "map", + "maps_home_work", + "maps_ugc", + "margin", + "mark_as_unread", + "mark_chat_read", + "mark_chat_unread", + "mark_email_read", + "mark_email_unread", + "mark_unread_chat_alt", + "markdown", + "markdown_copy", + "markdown_paste", + "markunread", + "markunread_mailbox", + "masked_transitions", + "masks", + "match_case", + "match_word", + "matter", + "maximize", + "measuring_tape", + "media_bluetooth_off", + "media_bluetooth_on", + "media_link", + "mediation", + "medical_information", + "medical_mask", + "medical_services", + "medication", + "medication_liquid", + "meeting_room", + "memory", + "memory_alt", + "menstrual_health", + "menu", + "menu_book", + "menu_open", + "merge", + "merge_type", + "message", + "metabolism", + "mfg_nest_yale_lock", + "mic", + "mic_double", + "mic_external_off", + "mic_external_on", + "mic_none", + "mic_off", + "microbiology", + "microwave", + "microwave_gen", + "military_tech", + "mimo", + "mimo_disconnect", + "mindfulness", + "minimize", + "minor_crash", + "mintmark", + "missed_video_call", + "missed_video_call_filled", + "missing_controller", + "mist", + "mitre", + "mixture_med", + "mms", + "mobile_friendly", + "mobile_off", + "mobile_screen_share", + "mobiledata_off", + "mode", + "mode_comment", + "mode_cool", + "mode_cool_off", + "mode_dual", + "mode_edit", + "mode_edit_outline", + "mode_fan", + "mode_fan_off", + "mode_heat", + "mode_heat_cool", + "mode_heat_off", + "mode_night", + "mode_of_travel", + "mode_off_on", + "mode_standby", + "model_training", + "monetization_on", + "money", + "money_off", + "money_off_csred", + "monitor", + "monitor_heart", + "monitor_weight", + "monitor_weight_gain", + "monitor_weight_loss", + "monitoring", + "monochrome_photos", + "mood", + "mood_bad", + "mop", + "more", + "more_down", + "more_horiz", + "more_time", + "more_up", + "more_vert", + "mosque", + "motion_blur", + "motion_mode", + "motion_photos_auto", + "motion_photos_off", + "motion_photos_on", + "motion_photos_pause", + "motion_photos_paused", + "motion_sensor_active", + "motion_sensor_alert", + "motion_sensor_idle", + "motion_sensor_urgent", + "motorcycle", + "mountain_flag", + "mouse", + "move", + "move_down", + "move_group", + "move_item", + "move_location", + "move_selection_down", + "move_selection_left", + "move_selection_right", + "move_selection_up", + "move_to_inbox", + "move_up", + "moved_location", + "movie", + "movie_creation", + "movie_edit", + "movie_filter", + "movie_info", + "moving", + "moving_beds", + "moving_ministry", + "mp", + "multicooker", + "multiline_chart", + "multiple_stop", + "museum", + "music_cast", + "music_note", + "music_off", + "music_video", + "my_location", + "mystery", + "nat", + "nature", + "nature_people", + "navigate_before", + "navigate_next", + "navigation", + "near_me", + "near_me_disabled", + "nearby", + "nearby_error", + "nearby_off", + "nephrology", + "nest_audio", + "nest_cam_floodlight", + "nest_cam_indoor", + "nest_cam_iq", + "nest_cam_iq_outdoor", + "nest_cam_magnet_mount", + "nest_cam_outdoor", + "nest_cam_stand", + "nest_cam_wall_mount", + "nest_cam_wired_stand", + "nest_clock_farsight_analog", + "nest_clock_farsight_digital", + "nest_connect", + "nest_detect", + "nest_display", + "nest_display_max", + "nest_doorbell_visitor", + "nest_eco_leaf", + "nest_farsight_weather", + "nest_found_savings", + "nest_gale_wifi", + "nest_heat_link_e", + "nest_heat_link_gen_3", + "nest_hello_doorbell", + "nest_locator_tag", + "nest_mini", + "nest_multi_room", + "nest_protect", + "nest_remote", + "nest_remote_comfort_sensor", + "nest_secure_alarm", + "nest_sunblock", + "nest_tag", + "nest_thermostat", + "nest_thermostat_e_eu", + "nest_thermostat_gen_3", + "nest_thermostat_sensor", + "nest_thermostat_sensor_eu", + "nest_thermostat_zirconium_eu", + "nest_true_radiant", + "nest_wake_on_approach", + "nest_wake_on_press", + "nest_wifi_gale", + "nest_wifi_mistral", + "nest_wifi_point", + "nest_wifi_point_vento", + "nest_wifi_pro", + "nest_wifi_pro_2", + "nest_wifi_router", + "network_cell", + "network_check", + "network_intelligence_history", + "network_intelligence_update", + "network_locked", + "network_manage", + "network_node", + "network_ping", + "network_wifi", + "network_wifi_1_bar", + "network_wifi_1_bar_locked", + "network_wifi_2_bar", + "network_wifi_2_bar_locked", + "network_wifi_3_bar", + "network_wifi_3_bar_locked", + "network_wifi_locked", + "neurology", + "new_label", + "new_releases", + "new_window", + "news", + "newsmode", + "newspaper", + "newsstand", + "next_plan", + "next_week", + "nfc", + "night_shelter", + "night_sight_auto", + "night_sight_auto_off", + "night_sight_max", + "nightlife", + "nightlight", + "nightlight_round", + "nights_stay", + "no_accounts", + "no_adult_content", + "no_backpack", + "no_crash", + "no_drinks", + "no_encryption", + "no_encryption_gmailerrorred", + "no_flash", + "no_food", + "no_luggage", + "no_meals", + "no_meeting_room", + "no_photography", + "no_sim", + "no_sound", + "no_stroller", + "no_transfer", + "noise_aware", + "noise_control_off", + "noise_control_on", + "nordic_walking", + "north", + "north_east", + "north_west", + "not_accessible", + "not_accessible_forward", + "not_interested", + "not_listed_location", + "not_started", + "note", + "note_add", + "note_alt", + "note_stack", + "note_stack_add", + "notes", + "notification_add", + "notification_important", + "notification_multiple", + "notifications", + "notifications_active", + "notifications_none", + "notifications_off", + "notifications_paused", + "notifications_unread", + "numbers", + "nutrition", + "ods", + "odt", + "offline_bolt", + "offline_pin", + "offline_share", + "oil_barrel", + "on_device_training", + "on_hub_device", + "oncology", + "ondemand_video", + "online_prediction", + "onsen", + "opacity", + "open_in_browser", + "open_in_full", + "open_in_new", + "open_in_new_down", + "open_in_new_off", + "open_in_phone", + "open_jam", + "open_with", + "ophthalmology", + "oral_disease", + "order_approve", + "order_play", + "orders", + "orthopedics", + "other_admission", + "other_houses", + "outbound", + "outbox", + "outbox_alt", + "outdoor_garden", + "outdoor_grill", + "outgoing_mail", + "outlet", + "outlined_flag", + "outpatient", + "outpatient_med", + "output", + "output_circle", + "oven", + "oven_gen", + "overview", + "overview_key", + "oxygen_saturation", + "p2p", + "pace", + "pacemaker", + "package", + "package_2", + "padding", + "page_control", + "page_info", + "pageless", + "pages", + "pageview", + "paid", + "palette", + "pallet", + "pan_tool", + "pan_tool_alt", + "pan_zoom", + "panorama", + "panorama_fish_eye", + "panorama_horizontal", + "panorama_photosphere", + "panorama_vertical", + "panorama_wide_angle", + "paragliding", + "park", + "partly_cloudy_day", + "partly_cloudy_night", + "partner_exchange", + "partner_reports", + "party_mode", + "passkey", + "password", + "patient_list", + "pattern", + "pause", + "pause_circle", + "pause_circle_filled", + "pause_circle_outline", + "pause_presentation", + "payment", + "payments", + "pedal_bike", + "pediatrics", + "pen_size_1", + "pen_size_2", + "pen_size_3", + "pen_size_4", + "pen_size_5", + "pending", + "pending_actions", + "pentagon", + "people", + "people_alt", + "people_outline", + "percent", + "performance_max", + "pergola", + "perm_camera_mic", + "perm_contact_calendar", + "perm_data_setting", + "perm_device_information", + "perm_identity", + "perm_media", + "perm_phone_msg", + "perm_scan_wifi", + "person", + "person_2", + "person_3", + "person_4", + "person_add", + "person_add_alt", + "person_add_disabled", + "person_alert", + "person_apron", + "person_book", + "person_cancel", + "person_celebrate", + "person_check", + "person_filled", + "person_off", + "person_outline", + "person_pin", + "person_pin_circle", + "person_play", + "person_raised_hand", + "person_remove", + "person_search", + "personal_bag", + "personal_bag_off", + "personal_bag_question", + "personal_injury", + "personal_places", + "personal_video", + "pest_control", + "pest_control_rodent", + "pet_supplies", + "pets", + "phishing", + "phone", + "phone_alt", + "phone_android", + "phone_bluetooth_speaker", + "phone_callback", + "phone_disabled", + "phone_enabled", + "phone_forwarded", + "phone_in_talk", + "phone_iphone", + "phone_locked", + "phone_missed", + "phone_paused", + "phonelink", + "phonelink_erase", + "phonelink_lock", + "phonelink_off", + "phonelink_ring", + "phonelink_ring_off", + "phonelink_setup", + "photo", + "photo_album", + "photo_auto_merge", + "photo_camera", + "photo_camera_back", + "photo_camera_front", + "photo_filter", + "photo_frame", + "photo_library", + "photo_prints", + "photo_size_select_actual", + "photo_size_select_large", + "photo_size_select_small", + "php", + "physical_therapy", + "piano", + "piano_off", + "picture_as_pdf", + "picture_in_picture", + "picture_in_picture_alt", + "picture_in_picture_center", + "picture_in_picture_large", + "picture_in_picture_medium", + "picture_in_picture_mobile", + "picture_in_picture_off", + "picture_in_picture_small", + "pie_chart", + "pie_chart_filled", + "pie_chart_outline", + "pie_chart_outlined", + "pill", + "pill_off", + "pin", + "pin_drop", + "pin_end", + "pin_invoke", + "pinch", + "pinch_zoom_in", + "pinch_zoom_out", + "pip", + "pip_exit", + "pivot_table_chart", + "place", + "place_item", + "plagiarism", + "planner_banner_ad_pt", + "planner_review", + "play_arrow", + "play_circle", + "play_disabled", + "play_for_work", + "play_lesson", + "play_music", + "play_pause", + "play_shapes", + "playing_cards", + "playlist_add", + "playlist_add_check", + "playlist_add_check_circle", + "playlist_add_circle", + "playlist_play", + "playlist_remove", + "plumbing", + "plus_one", + "podcasts", + "podiatry", + "podium", + "point_of_sale", + "point_scan", + "policy", + "poll", + "polyline", + "polymer", + "pool", + "portable_wifi_off", + "portrait", + "position_bottom_left", + "position_bottom_right", + "position_top_right", + "post", + "post_add", + "potted_plant", + "power", + "power_input", + "power_off", + "power_rounded", + "power_settings_new", + "prayer_times", + "precision_manufacturing", + "pregnancy", + "pregnant_woman", + "preliminary", + "prescriptions", + "present_to_all", + "preview", + "preview_off", + "price_change", + "price_check", + "print", + "print_add", + "print_connect", + "print_disabled", + "print_error", + "print_lock", + "priority", + "priority_high", + "privacy", + "privacy_tip", + "private_connectivity", + "problem", + "procedure", + "process_chart", + "production_quantity_limits", + "productivity", + "progress_activity", + "propane", + "propane_tank", + "psychiatry", + "psychology", + "psychology_alt", + "public", + "public_off", + "publish", + "published_with_changes", + "pulmonology", + "pulse_alert", + "punch_clock", + "push_pin", + "qr_code", + "qr_code_2", + "qr_code_2_add", + "qr_code_scanner", + "query_builder", + "query_stats", + "question_answer", + "question_exchange", + "question_mark", + "queue", + "queue_music", + "queue_play_next", + "quick_phrases", + "quick_reference", + "quick_reference_all", + "quick_reorder", + "quickreply", + "quiet_time", + "quiet_time_active", + "quiz", + "r_mobiledata", + "radar", + "radio", + "radio_button_checked", + "radio_button_partial", + "radio_button_unchecked", + "radiology", + "railway_alert", + "rainy", + "rainy_heavy", + "rainy_light", + "rainy_snow", + "ramen_dining", + "ramp_left", + "ramp_right", + "range_hood", + "rate_review", + "raven", + "raw_off", + "raw_on", + "read_more", + "readiness_score", + "real_estate_agent", + "rear_camera", + "rebase", + "rebase_edit", + "receipt", + "receipt_long", + "recent_actors", + "recent_patient", + "recommend", + "record_voice_over", + "rectangle", + "recycling", + "redeem", + "redo", + "reduce_capacity", + "refresh", + "regular_expression", + "relax", + "release_alert", + "remember_me", + "reminder", + "reminders_alt", + "remote_gen", + "remove", + "remove_circle", + "remove_circle_outline", + "remove_done", + "remove_from_queue", + "remove_moderator", + "remove_red_eye", + "remove_road", + "remove_selection", + "remove_shopping_cart", + "reopen_window", + "reorder", + "repartition", + "repeat", + "repeat_on", + "repeat_one", + "repeat_one_on", + "replay", + "replay_10", + "replay_30", + "replay_5", + "replay_circle_filled", + "reply", + "reply_all", + "report", + "report_gmailerrorred", + "report_off", + "report_problem", + "request_page", + "request_quote", + "reset_image", + "reset_tv", + "reset_wrench", + "resize", + "respiratory_rate", + "responsive_layout", + "restart_alt", + "restaurant", + "restaurant_menu", + "restore", + "restore_from_trash", + "restore_page", + "resume", + "reviews", + "rewarded_ads", + "rheumatology", + "rib_cage", + "rice_bowl", + "right_click", + "right_panel_close", + "right_panel_open", + "ring_volume", + "ring_volume_filled", + "ripples", + "robot", + "robot_2", + "rocket", + "rocket_launch", + "roller_shades", + "roller_shades_closed", + "roller_skating", + "roofing", + "room", + "room_preferences", + "room_service", + "rotate_90_degrees_ccw", + "rotate_90_degrees_cw", + "rotate_left", + "rotate_right", + "roundabout_left", + "roundabout_right", + "rounded_corner", + "route", + "router", + "routine", + "rowing", + "rss_feed", + "rsvp", + "rtt", + "rubric", + "rule", + "rule_folder", + "rule_settings", + "run_circle", + "running_with_errors", + "rv_hookup", + "safety_check", + "safety_check_off", + "safety_divider", + "sailing", + "salinity", + "sanitizer", + "satellite", + "satellite_alt", + "sauna", + "save", + "save_alt", + "save_as", + "saved_search", + "savings", + "scale", + "scan", + "scan_delete", + "scanner", + "scatter_plot", + "scene", + "schedule", + "schedule_send", + "schema", + "school", + "science", + "science_off", + "score", + "scoreboard", + "screen_lock_landscape", + "screen_lock_portrait", + "screen_lock_rotation", + "screen_record", + "screen_rotation", + "screen_rotation_alt", + "screen_rotation_up", + "screen_search_desktop", + "screen_share", + "screenshot", + "screenshot_frame", + "screenshot_keyboard", + "screenshot_monitor", + "screenshot_region", + "screenshot_tablet", + "scrollable_header", + "scuba_diving", + "sd", + "sd_card", + "sd_card_alert", + "sd_storage", + "sdk", + "search", + "search_check", + "search_hands_free", + "search_off", + "security", + "security_key", + "security_update", + "security_update_good", + "security_update_warning", + "segment", + "select", + "select_all", + "select_check_box", + "select_to_speak", + "select_window", + "select_window_off", + "self_care", + "self_improvement", + "sell", + "send", + "send_and_archive", + "send_money", + "send_time_extension", + "send_to_mobile", + "sensor_door", + "sensor_occupied", + "sensor_window", + "sensors", + "sensors_krx", + "sensors_krx_off", + "sensors_off", + "sentiment_calm", + "sentiment_content", + "sentiment_dissatisfied", + "sentiment_excited", + "sentiment_extremely_dissatisfied", + "sentiment_frustrated", + "sentiment_neutral", + "sentiment_sad", + "sentiment_satisfied", + "sentiment_satisfied_alt", + "sentiment_stressed", + "sentiment_very_dissatisfied", + "sentiment_very_satisfied", + "sentiment_worried", + "service_toolbox", + "set_meal", + "settings", + "settings_accessibility", + "settings_account_box", + "settings_alert", + "settings_applications", + "settings_b_roll", + "settings_backup_restore", + "settings_bluetooth", + "settings_brightness", + "settings_cell", + "settings_cinematic_blur", + "settings_ethernet", + "settings_heart", + "settings_input_antenna", + "settings_input_component", + "settings_input_composite", + "settings_input_hdmi", + "settings_input_svideo", + "settings_motion_mode", + "settings_night_sight", + "settings_overscan", + "settings_panorama", + "settings_phone", + "settings_photo_camera", + "settings_power", + "settings_remote", + "settings_slow_motion", + "settings_suggest", + "settings_system_daydream", + "settings_timelapse", + "settings_video_camera", + "settings_voice", + "settop_component", + "severe_cold", + "shadow", + "shadow_add", + "shadow_minus", + "shape_line", + "shape_recognition", + "shapes", + "share", + "share_location", + "share_off", + "share_reviews", + "share_windows", + "sheets_rtl", + "shelf_auto_hide", + "shelf_position", + "shelves", + "shield", + "shield_lock", + "shield_locked", + "shield_moon", + "shield_person", + "shield_question", + "shield_with_heart", + "shield_with_house", + "shift", + "shift_lock", + "shop", + "shop_2", + "shop_two", + "shopping_bag", + "shopping_basket", + "shopping_cart", + "shopping_cart_checkout", + "shoppingmode", + "short_stay", + "short_text", + "shortcut", + "show_chart", + "shower", + "shuffle", + "shuffle_on", + "shutter_speed", + "shutter_speed_add", + "shutter_speed_minus", + "sick", + "side_navigation", + "sign_language", + "signal_cellular_0_bar", + "signal_cellular_1_bar", + "signal_cellular_2_bar", + "signal_cellular_3_bar", + "signal_cellular_4_bar", + "signal_cellular_add", + "signal_cellular_alt", + "signal_cellular_alt_1_bar", + "signal_cellular_alt_2_bar", + "signal_cellular_connected_no_internet_0_bar", + "signal_cellular_connected_no_internet_4_bar", + "signal_cellular_no_sim", + "signal_cellular_nodata", + "signal_cellular_null", + "signal_cellular_off", + "signal_cellular_pause", + "signal_disconnected", + "signal_wifi_0_bar", + "signal_wifi_4_bar", + "signal_wifi_4_bar_lock", + "signal_wifi_bad", + "signal_wifi_connected_no_internet_4", + "signal_wifi_off", + "signal_wifi_statusbar_4_bar", + "signal_wifi_statusbar_not_connected", + "signal_wifi_statusbar_null", + "signature", + "signpost", + "sim_card", + "sim_card_alert", + "sim_card_download", + "single_bed", + "sip", + "skateboarding", + "skeleton", + "skillet", + "skillet_cooktop", + "skip_next", + "skip_previous", + "skull", + "sledding", + "sleep", + "sleep_score", + "slide_library", + "sliders", + "slideshow", + "slow_motion_video", + "smart_button", + "smart_display", + "smart_outlet", + "smart_screen", + "smart_toy", + "smartphone", + "smb_share", + "smoke_free", + "smoking_rooms", + "sms", + "sms_failed", + "snippet_folder", + "snooze", + "snowboarding", + "snowing", + "snowing_heavy", + "snowmobile", + "snowshoeing", + "soap", + "social_distance", + "social_leaderboard", + "solar_power", + "sort", + "sort_by_alpha", + "sos", + "sound_detection_dog_barking", + "sound_detection_glass_break", + "sound_detection_loud_sound", + "sound_sampler", + "soup_kitchen", + "source", + "source_environment", + "source_notes", + "south", + "south_america", + "south_east", + "south_west", + "spa", + "space_bar", + "space_dashboard", + "spatial_audio", + "spatial_audio_off", + "spatial_tracking", + "speaker", + "speaker_group", + "speaker_notes", + "speaker_notes_off", + "speaker_phone", + "special_character", + "specific_gravity", + "speech_to_text", + "speed", + "spellcheck", + "splitscreen", + "splitscreen_bottom", + "splitscreen_left", + "splitscreen_right", + "splitscreen_top", + "spo2", + "spoke", + "sports", + "sports_and_outdoors", + "sports_bar", + "sports_baseball", + "sports_basketball", + "sports_cricket", + "sports_esports", + "sports_football", + "sports_golf", + "sports_gymnastics", + "sports_handball", + "sports_hockey", + "sports_kabaddi", + "sports_martial_arts", + "sports_mma", + "sports_motorsports", + "sports_rugby", + "sports_score", + "sports_soccer", + "sports_tennis", + "sports_volleyball", + "sprinkler", + "sprint", + "square", + "square_foot", + "ssid_chart", + "stack", + "stack_off", + "stack_star", + "stacked_bar_chart", + "stacked_email", + "stacked_inbox", + "stacked_line_chart", + "stacks", + "stadia_controller", + "stadium", + "stairs", + "star", + "star_border", + "star_border_purple500", + "star_half", + "star_outline", + "star_purple500", + "star_rate", + "star_rate_half", + "stars", + "start", + "stat_0", + "stat_1", + "stat_2", + "stat_3", + "stat_minus_1", + "stat_minus_2", + "stat_minus_3", + "stay_current_landscape", + "stay_current_portrait", + "stay_primary_landscape", + "stay_primary_portrait", + "step", + "step_into", + "step_out", + "step_over", + "steppers", + "steps", + "stethoscope", + "stethoscope_arrow", + "stethoscope_check", + "sticky_note", + "sticky_note_2", + "stock_media", + "stockpot", + "stop", + "stop_circle", + "stop_screen_share", + "storage", + "store", + "store_mall_directory", + "storefront", + "storm", + "straight", + "straighten", + "strategy", + "stream", + "stream_apps", + "streetview", + "stress_management", + "strikethrough_s", + "stroke_full", + "stroke_partial", + "stroller", + "style", + "styler", + "stylus", + "stylus_laser_pointer", + "stylus_note", + "subdirectory_arrow_left", + "subdirectory_arrow_right", + "subheader", + "subject", + "subscript", + "subscriptions", + "subtitles", + "subtitles_off", + "subway", + "summarize", + "sunny", + "sunny_snowing", + "superscript", + "supervised_user_circle", + "supervised_user_circle_off", + "supervisor_account", + "support", + "support_agent", + "surfing", + "surgical", + "surround_sound", + "swap_calls", + "swap_driving_apps", + "swap_driving_apps_wheel", + "swap_horiz", + "swap_horizontal_circle", + "swap_vert", + "swap_vertical_circle", + "sweep", + "swipe", + "swipe_down", + "swipe_down_alt", + "swipe_left", + "swipe_left_alt", + "swipe_right", + "swipe_right_alt", + "swipe_up", + "swipe_up_alt", + "swipe_vertical", + "switch", + "switch_access", + "switch_access_2", + "switch_access_shortcut", + "switch_access_shortcut_add", + "switch_account", + "switch_camera", + "switch_left", + "switch_right", + "switch_video", + "switches", + "sword_rose", + "swords", + "symptoms", + "synagogue", + "sync", + "sync_alt", + "sync_disabled", + "sync_lock", + "sync_problem", + "sync_saved_locally", + "syringe", + "system_security_update", + "system_security_update_good", + "system_security_update_warning", + "system_update", + "system_update_alt", + "tab", + "tab_close", + "tab_close_right", + "tab_duplicate", + "tab_group", + "tab_move", + "tab_new_right", + "tab_recent", + "tab_unselected", + "table", + "table_bar", + "table_chart", + "table_chart_view", + "table_lamp", + "table_restaurant", + "table_rows", + "table_rows_narrow", + "table_view", + "tablet", + "tablet_android", + "tablet_mac", + "tabs", + "tactic", + "tag", + "tag_faces", + "takeout_dining", + "tamper_detection_off", + "tamper_detection_on", + "tap_and_play", + "tapas", + "target", + "task", + "task_alt", + "taunt", + "taxi_alert", + "team_dashboard", + "temp_preferences_custom", + "temp_preferences_eco", + "temple_buddhist", + "temple_hindu", + "tenancy", + "terminal", + "terrain", + "text_ad", + "text_decrease", + "text_fields", + "text_fields_alt", + "text_format", + "text_increase", + "text_rotate_up", + "text_rotate_vertical", + "text_rotation_angledown", + "text_rotation_angleup", + "text_rotation_down", + "text_rotation_none", + "text_select_end", + "text_select_jump_to_beginning", + "text_select_jump_to_end", + "text_select_move_back_character", + "text_select_move_back_word", + "text_select_move_down", + "text_select_move_forward_character", + "text_select_move_forward_word", + "text_select_move_up", + "text_select_start", + "text_snippet", + "text_to_speech", + "textsms", + "texture", + "texture_add", + "texture_minus", + "theater_comedy", + "theaters", + "thermometer", + "thermometer_add", + "thermometer_gain", + "thermometer_loss", + "thermometer_minus", + "thermostat", + "thermostat_auto", + "thermostat_carbon", + "things_to_do", + "thumb_down", + "thumb_down_alt", + "thumb_down_filled", + "thumb_down_off", + "thumb_down_off_alt", + "thumb_up", + "thumb_up_alt", + "thumb_up_filled", + "thumb_up_off", + "thumb_up_off_alt", + "thumbnail_bar", + "thumbs_up_down", + "thunderstorm", + "tibia", + "tibia_alt", + "time_auto", + "time_to_leave", + "timelapse", + "timeline", + "timer", + "timer_10", + "timer_10_alt_1", + "timer_10_select", + "timer_3", + "timer_3_alt_1", + "timer_3_select", + "timer_off", + "tips_and_updates", + "tire_repair", + "title", + "toast", + "toc", + "today", + "toggle_off", + "toggle_on", + "token", + "toll", + "tonality", + "toolbar", + "tools_flat_head", + "tools_installation_kit", + "tools_ladder", + "tools_level", + "tools_phillips", + "tools_pliers_wire_stripper", + "tools_power_drill", + "tools_wrench", + "tooltip", + "top_panel_close", + "top_panel_open", + "topic", + "tornado", + "total_dissolved_solids", + "touch_app", + "touchpad_mouse", + "tour", + "toys", + "toys_and_games", + "toys_fan", + "track_changes", + "traffic", + "trail_length", + "trail_length_medium", + "trail_length_short", + "train", + "tram", + "transit_ticket", + "trophy", + "transcribe", + "transfer_within_a_station", + "transform", + "transgender", + "transit_enterexit", + "transition_chop", + "transition_dissolve", + "transition_fade", + "transition_push", + "transition_slide", + "translate", + "transportation", + "travel", + "travel_explore", + "travel_luggage_and_bags", + "trending_down", + "trending_flat", + "trending_up", + "trip", + "trip_origin", + "trolley", + "trophy", + "troubleshoot", + "try", + "tsunami", + "tsv", + "tty", + "tune", + "tungsten", + "turn_left", + "turn_right", + "turn_sharp_left", + "turn_sharp_right", + "turn_slight_left", + "turn_slight_right", + "turned_in", + "turned_in_not", + "tv", + "tv_gen", + "tv_guide", + "tv_off", + "tv_options_edit_channels", + "tv_options_input_settings", + "tv_remote", + "tv_signin", + "tv_with_assistant", + "two_pager", + "two_wheeler", + "type_specimen", + "u_turn_left", + "u_turn_right", + "ulna_radius", + "ulna_radius_alt", + "umbrella", + "unarchive", + "undo", + "unfold_less", + "unfold_less_double", + "unfold_more", + "unfold_more_double", + "ungroup", + "universal_currency", + "universal_currency_alt", + "universal_local", + "unknown_2", + "unknown_5", + "unknown_document", + "unknown_med", + "unlicense", + "unpublished", + "unsubscribe", + "upcoming", + "update", + "update_disabled", + "upgrade", + "upload", + "upload_2", + "upload_file", + "urology", + "usb", + "usb_off", + "user_attributes", + "vaccines", + "vacuum", + "valve", + "vape_free", + "vaping_rooms", + "variable_add", + "variable_insert", + "variable_remove", + "variables", + "ventilator", + "verified", + "verified_user", + "vertical_align_bottom", + "vertical_align_center", + "vertical_align_top", + "vertical_distribute", + "vertical_shades", + "vertical_shades_closed", + "vertical_split", + "vibration", + "video_call", + "video_camera_back", + "video_camera_front", + "video_camera_front_off", + "video_chat", + "video_file", + "video_label", + "video_library", + "video_search", + "video_settings", + "video_stable", + "videocam", + "videocam_off", + "videogame_asset", + "videogame_asset_off", + "view_agenda", + "view_array", + "view_carousel", + "view_column", + "view_column_2", + "view_comfy", + "view_comfy_alt", + "view_compact", + "view_compact_alt", + "view_cozy", + "view_day", + "view_headline", + "view_in_ar", + "view_in_ar_new", + "view_in_ar_off", + "view_kanban", + "view_list", + "view_module", + "view_quilt", + "view_sidebar", + "view_stream", + "view_timeline", + "view_week", + "vignette", + "villa", + "visibility", + "visibility_lock", + "visibility_off", + "vital_signs", + "vitals", + "voice_chat", + "voice_over_off", + "voice_selection", + "voicemail", + "volcano", + "volume_down", + "volume_down_alt", + "volume_mute", + "volume_off", + "volume_up", + "volunteer_activism", + "voting_chip", + "vpn_key", + "vpn_key_alert", + "vpn_key_off", + "vpn_lock", + "vr180_create2d", + "vr180_create2d_off", + "vrpano", + "wall_art", + "wall_lamp", + "wallet", + "wallpaper", + "wallpaper_slideshow", + "ward", + "warehouse", + "warning", + "warning_amber", + "warning_off", + "wash", + "watch", + "watch_button_press", + "watch_later", + "watch_off", + "watch_screentime", + "watch_wake", + "water", + "water_bottle", + "water_bottle_large", + "water_damage", + "water_do", + "water_drop", + "water_ec", + "water_full", + "water_heater", + "water_lock", + "water_loss", + "water_lux", + "water_medium", + "water_orp", + "water_ph", + "water_pump", + "water_voc", + "waterfall_chart", + "waves", + "waving_hand", + "wb_auto", + "wb_cloudy", + "wb_incandescent", + "wb_iridescent", + "wb_shade", + "wb_sunny", + "wb_twilight", + "wc", + "weather_hail", + "weather_mix", + "weather_snowy", + "web", + "web_asset", + "web_asset_off", + "web_stories", + "web_traffic", + "webhook", + "weekend", + "weight", + "west", + "whatshot", + "wheelchair_pickup", + "where_to_vote", + "widgets", + "width", + "width_full", + "width_normal", + "width_wide", + "wifi", + "wifi_1_bar", + "wifi_2_bar", + "wifi_add", + "wifi_calling", + "wifi_calling_1", + "wifi_calling_2", + "wifi_calling_3", + "wifi_channel", + "wifi_find", + "wifi_home", + "wifi_lock", + "wifi_notification", + "wifi_off", + "wifi_password", + "wifi_protected_setup", + "wifi_proxy", + "wifi_tethering", + "wifi_tethering_error", + "wifi_tethering_off", + "wind_power", + "window", + "window_closed", + "window_open", + "window_sensor", + "wine_bar", + "woman", + "woman_2", + "work", + "work_alert", + "work_history", + "work_off", + "work_outline", + "work_update", + "workflow", + "workspace_premium", + "workspaces", + "workspaces_outline", + "wounds_injuries", + "wrap_text", + "wrist", + "wrong_location", + "wysiwyg", + "yard", + "your_trips", + "youtube_activity", + "youtube_searched_for", + "zone_person_alert", + "zone_person_idle", + "zone_person_urgent", + "zoom_in", + "zoom_in_map", + "zoom_out", + "zoom_out_map", ] as const diff --git a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/index.tsx b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/index.tsx index 599781d45..151a3b5ce 100644 --- a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/index.tsx +++ b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/index.tsx @@ -1 +1 @@ -export { MaterialSymbol, type MaterialSymbolProps } from './MaterialSymbol' +export { MaterialSymbol, type MaterialSymbolProps } from "./MaterialSymbol" diff --git a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/types.ts b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/types.ts index 540037651..1ef8dd002 100644 --- a/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/types.ts +++ b/packages/design-system/lib/components/Icons/MaterialIcon/MaterialSymbol/types.ts @@ -2,8 +2,8 @@ import type { JSXElementConstructor, ComponentPropsWithoutRef, JSX, -} from 'react' -import type { MaterialSymbolWeightArray, SymbolCodepointsArray } from './consts' +} from "react" +import type { MaterialSymbolWeightArray, SymbolCodepointsArray } from "./consts" export type SymbolCodepoints = (typeof SymbolCodepointsArray)[number] diff --git a/packages/design-system/lib/components/Icons/MaterialIcon/index.tsx b/packages/design-system/lib/components/Icons/MaterialIcon/index.tsx index ba4c7676c..1fd9d9c61 100644 --- a/packages/design-system/lib/components/Icons/MaterialIcon/index.tsx +++ b/packages/design-system/lib/components/Icons/MaterialIcon/index.tsx @@ -2,4 +2,4 @@ export { MaterialIcon, type MaterialIconProps, type MaterialIconSetIconProps, -} from './MaterialIcon' +} from "./MaterialIcon" diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/bathroom-cabinet-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/bathroom-cabinet-2.tsx index 017b3a9bd..08a938a37 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/bathroom-cabinet-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/bathroom-cabinet-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function BathroomCabinet2(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/conference-room.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/conference-room.tsx index 2d0ee9bbc..08c711f7a 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/conference-room.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/conference-room.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function ConferenceRoom(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/door-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/door-2.tsx index feb4f8017..00623f1d1 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/door-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/door-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Door2(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/hairdresser-1.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/hairdresser-1.tsx index 3f237a56d..1bf3c01f8 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/hairdresser-1.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/hairdresser-1.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Hairdresser1(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/record-player-3.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/record-player-3.tsx index 3624451a9..9828fc3c7 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/record-player-3.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/record-player-3.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function RecordPlayer3(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/toilet-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/toilet-2.tsx index 294fe01f4..0d28a1004 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/toilet-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/toilet-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Toilet2(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/user-police-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/user-police-2.tsx index f78152fb8..6d921cc1e 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/user-police-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Amenities_Facilities/user-police-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function UserPolice2(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Benefits/FilledDiscount.tsx b/packages/design-system/lib/components/Icons/Nucleo/Benefits/FilledDiscount.tsx index f2d5aa60a..411c57a40 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Benefits/FilledDiscount.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Benefits/FilledDiscount.tsx @@ -1,5 +1,5 @@ -import { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" export default function FilledDiscount(props: NucleoIconProps) { const { fill, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Benefits/bouquet.tsx b/packages/design-system/lib/components/Icons/Nucleo/Benefits/bouquet.tsx index ff28ba23e..a2b118e66 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Benefits/bouquet.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Benefits/bouquet.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Bouquet(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Benefits/discount-2-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Benefits/discount-2-2.tsx index f6d2340a2..f19a1ba15 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Benefits/discount-2-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Benefits/discount-2-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Discount22(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Experiences/bowling-pins.tsx b/packages/design-system/lib/components/Icons/Nucleo/Experiences/bowling-pins.tsx index be3ed450d..c586f016b 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Experiences/bowling-pins.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Experiences/bowling-pins.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function BowlingPins(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Experiences/palm-tree-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Experiences/palm-tree-2.tsx index 01d195550..908f1756b 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Experiences/palm-tree-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Experiences/palm-tree-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function PalmTree2(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Food/chips-3.tsx b/packages/design-system/lib/components/Icons/Nucleo/Food/chips-3.tsx index 621f4a6d2..47f16d1cb 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Food/chips-3.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Food/chips-3.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Chips3(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/Food/popcorn-2.tsx b/packages/design-system/lib/components/Icons/Nucleo/Food/popcorn-2.tsx index 3f8123c6c..2a674af6b 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/Food/popcorn-2.tsx +++ b/packages/design-system/lib/components/Icons/Nucleo/Food/popcorn-2.tsx @@ -1,5 +1,5 @@ -import type { NucleoIconProps } from '../../icon' -import { getNucleoIconProps } from '../utils' +import type { NucleoIconProps } from "../../icon" +import { getNucleoIconProps } from "../utils" function Popcorn2(props: NucleoIconProps) { const { fill, strokeWidth, ...iconProps } = getNucleoIconProps(props) diff --git a/packages/design-system/lib/components/Icons/Nucleo/colorVariants.ts b/packages/design-system/lib/components/Icons/Nucleo/colorVariants.ts index 87e06dda0..808eb771f 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/colorVariants.ts +++ b/packages/design-system/lib/components/Icons/Nucleo/colorVariants.ts @@ -1,17 +1,17 @@ export const colorVariants = { - 'Icon/Default': 'var(--Icon-Default)', - 'Icon/Intense': 'var(--Icon-Intense)', - 'Icon/Accent': 'var(--Icon-Accent)', - 'Icon/Inverted': 'var(--Icon-Inverted)', - 'Icon/Interactive/Default': 'var(--Icon-Interactive-Default)', - 'Icon/Interactive/Secondary': 'var(--Icon-Interactive-Secondary)', - 'Icon/Interactive/Accent': 'var(--Icon-Interactive-Accent)', - 'Icon/Interactive/Disabled': 'var(--Icon-Interactive-Disabled)', - 'Icon/Interactive/Placeholder': 'var(--Icon-Interactive-Placeholder)', - 'Icon/Feedback/Information': 'var(--Icon-Feedback-Information)', - 'Icon/Feedback/Success': 'var(--Icon-Feedback-Success)', - 'Icon/Feedback/Warning': 'var(--Icon-Feedback-Warning)', - 'Icon/Feedback/Error': 'var(--Icon-Feedback-Error)', - 'Icon/Feedback/Neutral': 'var(--Icon-Feedback-Neutral)', - CurrentColor: 'currentColor', + "Icon/Default": "var(--Icon-Default)", + "Icon/Intense": "var(--Icon-Intense)", + "Icon/Accent": "var(--Icon-Accent)", + "Icon/Inverted": "var(--Icon-Inverted)", + "Icon/Interactive/Default": "var(--Icon-Interactive-Default)", + "Icon/Interactive/Secondary": "var(--Icon-Interactive-Secondary)", + "Icon/Interactive/Accent": "var(--Icon-Interactive-Accent)", + "Icon/Interactive/Disabled": "var(--Icon-Interactive-Disabled)", + "Icon/Interactive/Placeholder": "var(--Icon-Interactive-Placeholder)", + "Icon/Feedback/Information": "var(--Icon-Feedback-Information)", + "Icon/Feedback/Success": "var(--Icon-Feedback-Success)", + "Icon/Feedback/Warning": "var(--Icon-Feedback-Warning)", + "Icon/Feedback/Error": "var(--Icon-Feedback-Error)", + "Icon/Feedback/Neutral": "var(--Icon-Feedback-Neutral)", + CurrentColor: "currentColor", } diff --git a/packages/design-system/lib/components/Icons/Nucleo/utils.ts b/packages/design-system/lib/components/Icons/Nucleo/utils.ts index 4d09ce247..9cdb22fad 100644 --- a/packages/design-system/lib/components/Icons/Nucleo/utils.ts +++ b/packages/design-system/lib/components/Icons/Nucleo/utils.ts @@ -1,12 +1,12 @@ -import { NucleoIconProps } from '../icon' -import { getIconAriaProps } from '../utils' -import { colorVariants } from './colorVariants' +import { NucleoIconProps } from "../icon" +import { getIconAriaProps } from "../utils" +import { colorVariants } from "./colorVariants" export function getNucleoIconProps(props: NucleoIconProps) { - const fill = props.color ? colorVariants[props.color] : 'currentColor' + const fill = props.color ? colorVariants[props.color] : "currentColor" const strokeWidth = props.strokeWidth || 2 - const width = props.size || '1em' - const height = props.size || '1em' + const width = props.size || "1em" + const height = props.size || "1em" const ariaProps = getIconAriaProps(props) return { fill, strokeWidth, width, height, ...ariaProps } diff --git a/packages/design-system/lib/components/Icons/icon.ts b/packages/design-system/lib/components/Icons/icon.ts index 92ef9c9c5..7a59cdd4a 100644 --- a/packages/design-system/lib/components/Icons/icon.ts +++ b/packages/design-system/lib/components/Icons/icon.ts @@ -1,24 +1,24 @@ -import type { VariantProps } from 'class-variance-authority' -import { iconVariants } from './variants' +import type { VariantProps } from "class-variance-authority" +import { iconVariants } from "./variants" export interface IconProps extends - Omit, 'color'>, + Omit, "color">, VariantProps { size?: number } export interface IllustrationProps extends - Omit, 'color'>, - Omit, 'color'> { + Omit, "color">, + Omit, "color"> { width?: string | number height?: string | number } export interface LogoProps extends Omit< React.SVGAttributes, - 'color' + "color" > { width?: string | number height?: string | number diff --git a/packages/design-system/lib/components/Icons/iconName.ts b/packages/design-system/lib/components/Icons/iconName.ts index 4e4b4b290..43c6d842c 100644 --- a/packages/design-system/lib/components/Icons/iconName.ts +++ b/packages/design-system/lib/components/Icons/iconName.ts @@ -1,185 +1,185 @@ export enum IconName { - Accesories = 'Accesories', - Accessibility = 'Accessibility', - AccountCircle = 'AccountCircle', - Air = 'Air', - AirConAirCooling = 'AirConAirCooling', - AirConditioningInRoom = 'AirConditioningInRoom', - Airplane = 'Airplane', - ArmChair = 'ArmChair', - ArrowFrom = 'ArrowFrom', - ArrowLeft = 'ArrowLeft', - ArrowLeftSmall = 'ArrowLeftSmall', - ArrowRight = 'ArrowRight', - ArrowRightSmall = 'ArrowRightSmall', - ArrowTo = 'ArrowTo', - AwardStar = 'AwardStar', - Bar = 'Bar', - BathroomCabinet = 'BathroomCabinet', - Beach = 'Beach', - BeautySalon = 'BeautySalon', - Bed = 'Bed', - Bike = 'Bike', - Bouquet = 'Bouquet', - Bowling = 'Bowling', - Breakfast = 'Breakfast', - Business = 'Business', - BusinessCentre = 'BusinessCentre', - Calendar = 'Calendar', - Camera = 'Camera', - CashFree = 'CashFree', - Cellphone = 'Cellphone', - Check = 'Check', - CheckCircle = 'CheckCircle', - ChevronDown = 'ChevronDown', - ChevronDownSmall = 'ChevronDownSmall', - ChevronLeft = 'ChevronLeft', - ChevronLeftSmall = 'ChevronLeftSmall', - ChevronRight = 'ChevronRight', - ChevronRightSmall = 'ChevronRightSmall', - ChevronUp = 'ChevronUp', - ChevronUpSmall = 'ChevronUpSmall', - Chips = 'Chips', - City = 'City', - Close = 'Close', - CloseLarge = 'CloseLarge', - CoffeeAlt = 'CoffeeAlt', - CoffeeInReceptionAtCharge = 'CoffeeInReceptionAtCharge', - CoffeeShop = 'CoffeeShop', - Coin = 'Coin', - ComplimentaryColdRefreshments = 'ComplimentaryColdRefreshments', - Concierge = 'Concierge', - ConferenceRoom = 'ConferenceRoom', - ConvenienceStore24h = 'ConvenienceStore24h', - ConventionCentre = 'ConventionCentre', - CreditCard = 'CreditCard', - CroissantCoffeeEgg = 'CroissantCoffeeEgg', - CrossCircle = 'CrossCircle', - CrossCircleOutline = 'CrossCircleOutline', - Cultural = 'Cultural', - CutleryOne = 'CutleryOne', - CutleryTwo = 'CutleryTwo', - Deck = 'Deck', - Desk = 'Desk', - Diamond = 'Diamond', - Dining = 'Dining', - DirectDial = 'DirectDial', - Directions = 'Directions', - DoorOpen = 'DoorOpen', - Dresser = 'Dresser', - ElectricBike = 'ElectricBike', - ElectricCar = 'ElectricCar', - Elevator = 'Elevator', - Email = 'Email', - ExternalLink = 'ExternalLink', - ExtraFamilyFriendly = 'ExtraFamilyFriendly', - EyeHide = 'EyeHide', - EyeShow = 'EyeShow', - Facebook = 'Facebook', - Fan = 'Fan', - Fax = 'Fax', - Fitness = 'Fitness', - FoodDrinks247 = 'FoodDrinks247', - Footstool = 'Footstool', - Gallery = 'Gallery', - Gaming = 'Gaming', - Garage = 'Garage', - Gift = 'Gift', - GiftOpen = 'GiftOpen', - Globe = 'Globe', - Golf = 'Golf', - Granola = 'Granola', - Guard = 'Guard', - Hairdresser = 'Hairdresser', - HairdryerInRoomAllScandic = 'HairdryerInRoomAllScandic', - HandKey = 'HandKey', - Hanger = 'Hanger', - HangerAlt = 'HangerAlt', - Heart = 'Heart', - Heat = 'Heat', - Hiking = 'Hiking', - HotelNight = 'HotelNight', - House = 'House', - Houseboat = 'Houseboat', - IceMachine = 'IceMachine', - Image = 'Image', - InfoCircle = 'InfoCircle', - Instagram = 'Instagram', - Ironing = 'Ironing', - Jacuzzi = 'Jaccuzzi', - Kayaking = 'Kayaking', - Kettle = 'Kettle', - Kids = 'Kids', - KidsMocktail = 'KidsMocktail', - Kitchen = 'Kitchen', - Lamp = 'Lamp', - Landscape = 'Landscape', - LaptopSafe = 'LaptopSafe', - LaundryMachine = 'LaundryMachine', - Link = 'Link', - LocalBar = 'LocalBar', - Location = 'Location', - Lock = 'Lock', - Luggage = 'Luggage', - LuggageLockers = 'LuggageLockers', - MagicWand = 'MagicWand', - Map = 'Map', - Massage = 'Massage', - Minibar = 'Minibar', - Minus = 'Minus', - MoneyHand = 'MoneyHand', - MoneyHandEllipsis = 'MoneyHandEllipsis', - Museum = 'Museum', - Nature = 'Nature', - Nightlife = 'Nightlife', - NightShelter = 'NightShelter', - NonSmoking = 'NonSmoking', - NoSmoking = 'NoSmoking', - OpenInNew = 'OpenInNew', - OpenInNewSmall = 'OpenInNewSmall', - OutdoorFurniture = 'OutdoorFurniture', - PalmTree = 'Palmtree', - Parking = 'Parking', - ParkingOutdoor = 'ParkingOutdoor', - Person = 'Person', - Pets = 'Pets', - Phone = 'Phone', - Plus = 'Plus', - PlusCircle = 'PlusCircle', - Popcorn = 'Popcorn', - PriceTag = 'PriceTag', - RecordPlayer = 'RecordPlayer', - Restaurant = 'Restaurant', - RoomService = 'RoomService', - SafetyBox = 'SafetyBox', - Sauna = 'Sauna', - Search = 'Search', - Service = 'Service', - Shopping = 'Shopping', - Skateboarding = 'Skateboarding', - Skiing = 'Skiing', - Smoking = 'Smoking', - Snowflake = 'Snowflake', - Spa = 'Spa', - Sports = 'Sports', - Star = 'Star', - StarFilled = 'StarFilled', - Street = 'Street', - Swim = 'Swim', - Swipe = 'Swipe', - Theatre = 'Theatre', - Thermostat = 'Thermostat', - Ticket = 'Ticket', - Toilet = 'Toilet', - Train = 'Train', - Tripadvisor = 'Tripadvisor', - Trophy = 'Trophy', - Tshirt = 'Tshirt', - TshirtWash = 'TshirtWash', - TvCasting = 'TvCasting', - TVRemote = 'TVRemote', - Voucher = 'Voucher', - WarningTriangle = 'WarningTriangle', - Wheelchair = 'Wheelchair', - Wifi = 'Wifi', + Accesories = "Accesories", + Accessibility = "Accessibility", + AccountCircle = "AccountCircle", + Air = "Air", + AirConAirCooling = "AirConAirCooling", + AirConditioningInRoom = "AirConditioningInRoom", + Airplane = "Airplane", + ArmChair = "ArmChair", + ArrowFrom = "ArrowFrom", + ArrowLeft = "ArrowLeft", + ArrowLeftSmall = "ArrowLeftSmall", + ArrowRight = "ArrowRight", + ArrowRightSmall = "ArrowRightSmall", + ArrowTo = "ArrowTo", + AwardStar = "AwardStar", + Bar = "Bar", + BathroomCabinet = "BathroomCabinet", + Beach = "Beach", + BeautySalon = "BeautySalon", + Bed = "Bed", + Bike = "Bike", + Bouquet = "Bouquet", + Bowling = "Bowling", + Breakfast = "Breakfast", + Business = "Business", + BusinessCentre = "BusinessCentre", + Calendar = "Calendar", + Camera = "Camera", + CashFree = "CashFree", + Cellphone = "Cellphone", + Check = "Check", + CheckCircle = "CheckCircle", + ChevronDown = "ChevronDown", + ChevronDownSmall = "ChevronDownSmall", + ChevronLeft = "ChevronLeft", + ChevronLeftSmall = "ChevronLeftSmall", + ChevronRight = "ChevronRight", + ChevronRightSmall = "ChevronRightSmall", + ChevronUp = "ChevronUp", + ChevronUpSmall = "ChevronUpSmall", + Chips = "Chips", + City = "City", + Close = "Close", + CloseLarge = "CloseLarge", + CoffeeAlt = "CoffeeAlt", + CoffeeInReceptionAtCharge = "CoffeeInReceptionAtCharge", + CoffeeShop = "CoffeeShop", + Coin = "Coin", + ComplimentaryColdRefreshments = "ComplimentaryColdRefreshments", + Concierge = "Concierge", + ConferenceRoom = "ConferenceRoom", + ConvenienceStore24h = "ConvenienceStore24h", + ConventionCentre = "ConventionCentre", + CreditCard = "CreditCard", + CroissantCoffeeEgg = "CroissantCoffeeEgg", + CrossCircle = "CrossCircle", + CrossCircleOutline = "CrossCircleOutline", + Cultural = "Cultural", + CutleryOne = "CutleryOne", + CutleryTwo = "CutleryTwo", + Deck = "Deck", + Desk = "Desk", + Diamond = "Diamond", + Dining = "Dining", + DirectDial = "DirectDial", + Directions = "Directions", + DoorOpen = "DoorOpen", + Dresser = "Dresser", + ElectricBike = "ElectricBike", + ElectricCar = "ElectricCar", + Elevator = "Elevator", + Email = "Email", + ExternalLink = "ExternalLink", + ExtraFamilyFriendly = "ExtraFamilyFriendly", + EyeHide = "EyeHide", + EyeShow = "EyeShow", + Facebook = "Facebook", + Fan = "Fan", + Fax = "Fax", + Fitness = "Fitness", + FoodDrinks247 = "FoodDrinks247", + Footstool = "Footstool", + Gallery = "Gallery", + Gaming = "Gaming", + Garage = "Garage", + Gift = "Gift", + GiftOpen = "GiftOpen", + Globe = "Globe", + Golf = "Golf", + Granola = "Granola", + Guard = "Guard", + Hairdresser = "Hairdresser", + HairdryerInRoomAllScandic = "HairdryerInRoomAllScandic", + HandKey = "HandKey", + Hanger = "Hanger", + HangerAlt = "HangerAlt", + Heart = "Heart", + Heat = "Heat", + Hiking = "Hiking", + HotelNight = "HotelNight", + House = "House", + Houseboat = "Houseboat", + IceMachine = "IceMachine", + Image = "Image", + InfoCircle = "InfoCircle", + Instagram = "Instagram", + Ironing = "Ironing", + Jacuzzi = "Jaccuzzi", + Kayaking = "Kayaking", + Kettle = "Kettle", + Kids = "Kids", + KidsMocktail = "KidsMocktail", + Kitchen = "Kitchen", + Lamp = "Lamp", + Landscape = "Landscape", + LaptopSafe = "LaptopSafe", + LaundryMachine = "LaundryMachine", + Link = "Link", + LocalBar = "LocalBar", + Location = "Location", + Lock = "Lock", + Luggage = "Luggage", + LuggageLockers = "LuggageLockers", + MagicWand = "MagicWand", + Map = "Map", + Massage = "Massage", + Minibar = "Minibar", + Minus = "Minus", + MoneyHand = "MoneyHand", + MoneyHandEllipsis = "MoneyHandEllipsis", + Museum = "Museum", + Nature = "Nature", + Nightlife = "Nightlife", + NightShelter = "NightShelter", + NonSmoking = "NonSmoking", + NoSmoking = "NoSmoking", + OpenInNew = "OpenInNew", + OpenInNewSmall = "OpenInNewSmall", + OutdoorFurniture = "OutdoorFurniture", + PalmTree = "Palmtree", + Parking = "Parking", + ParkingOutdoor = "ParkingOutdoor", + Person = "Person", + Pets = "Pets", + Phone = "Phone", + Plus = "Plus", + PlusCircle = "PlusCircle", + Popcorn = "Popcorn", + PriceTag = "PriceTag", + RecordPlayer = "RecordPlayer", + Restaurant = "Restaurant", + RoomService = "RoomService", + SafetyBox = "SafetyBox", + Sauna = "Sauna", + Search = "Search", + Service = "Service", + Shopping = "Shopping", + Skateboarding = "Skateboarding", + Skiing = "Skiing", + Smoking = "Smoking", + Snowflake = "Snowflake", + Spa = "Spa", + Sports = "Sports", + Star = "Star", + StarFilled = "StarFilled", + Street = "Street", + Swim = "Swim", + Swipe = "Swipe", + Theatre = "Theatre", + Thermostat = "Thermostat", + Ticket = "Ticket", + Toilet = "Toilet", + Train = "Train", + Tripadvisor = "Tripadvisor", + Trophy = "Trophy", + Tshirt = "Tshirt", + TshirtWash = "TshirtWash", + TvCasting = "TvCasting", + TVRemote = "TVRemote", + Voucher = "Voucher", + WarningTriangle = "WarningTriangle", + Wheelchair = "Wheelchair", + Wifi = "Wifi", } diff --git a/packages/design-system/lib/components/Icons/index.tsx b/packages/design-system/lib/components/Icons/index.tsx index 94178e362..f6c458cf6 100644 --- a/packages/design-system/lib/components/Icons/index.tsx +++ b/packages/design-system/lib/components/Icons/index.tsx @@ -3,4 +3,4 @@ export type { IllustrationProps as LogoAndIllustrationProps, LogoProps, NucleoIconProps, -} from './icon' +} from "./icon" diff --git a/packages/design-system/lib/components/Icons/utils.ts b/packages/design-system/lib/components/Icons/utils.ts index 5f2068f44..0134060aa 100644 --- a/packages/design-system/lib/components/Icons/utils.ts +++ b/packages/design-system/lib/components/Icons/utils.ts @@ -1,5 +1,5 @@ -import { IconProps, IllustrationProps, NucleoIconProps } from './icon' -import { MaterialIconSetIconProps } from './MaterialIcon' +import { IconProps, IllustrationProps, NucleoIconProps } from "./icon" +import { MaterialIconSetIconProps } from "./MaterialIcon" export function getIconAriaProps( props: @@ -8,10 +8,10 @@ export function getIconAriaProps( | MaterialIconSetIconProps | IllustrationProps ) { - const { role, 'aria-label': ariaLabel, 'aria-hidden': ariaHidden } = props + const { role, "aria-label": ariaLabel, "aria-hidden": ariaHidden } = props const computedAriaHidden = ariaHidden !== undefined ? ariaHidden : ariaLabel || role ? false : true - return { role, 'aria-label': ariaLabel, 'aria-hidden': computedAriaHidden } + return { role, "aria-label": ariaLabel, "aria-hidden": computedAriaHidden } } diff --git a/packages/design-system/lib/components/Icons/variants.ts b/packages/design-system/lib/components/Icons/variants.ts index 54f72bf70..3d09a503e 100644 --- a/packages/design-system/lib/components/Icons/variants.ts +++ b/packages/design-system/lib/components/Icons/variants.ts @@ -1,32 +1,32 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './icon.module.css' +import styles from "./icon.module.css" export const iconVariantConfig = { variants: { color: { - 'Icon/Default': styles.iconDefault, - 'Icon/Intense': styles.iconIntense, - 'Icon/Accent': styles.iconAccent, - 'Icon/Inverted': styles.iconInverted, + "Icon/Default": styles.iconDefault, + "Icon/Intense": styles.iconIntense, + "Icon/Accent": styles.iconAccent, + "Icon/Inverted": styles.iconInverted, - 'Icon/Interactive/Default': styles.iconInteractiveDefault, - 'Icon/Interactive/Secondary': styles.iconInteractiveSecondary, - 'Icon/Interactive/Accent': styles.iconInteractiveAccent, - 'Icon/Interactive/Disabled': styles.iconInteractiveDisabled, - 'Icon/Interactive/Placeholder': styles.iconInteractivePlaceholder, + "Icon/Interactive/Default": styles.iconInteractiveDefault, + "Icon/Interactive/Secondary": styles.iconInteractiveSecondary, + "Icon/Interactive/Accent": styles.iconInteractiveAccent, + "Icon/Interactive/Disabled": styles.iconInteractiveDisabled, + "Icon/Interactive/Placeholder": styles.iconInteractivePlaceholder, - 'Icon/Feedback/Information': styles.iconFeedbackInformation, - 'Icon/Feedback/Success': styles.iconFeedbackSuccess, - 'Icon/Feedback/Warning': styles.iconFeedbackWarning, - 'Icon/Feedback/Neutral': styles.iconFeedbackNeutral, - 'Icon/Feedback/Error': styles.iconFeedbackError, + "Icon/Feedback/Information": styles.iconFeedbackInformation, + "Icon/Feedback/Success": styles.iconFeedbackSuccess, + "Icon/Feedback/Warning": styles.iconFeedbackWarning, + "Icon/Feedback/Neutral": styles.iconFeedbackNeutral, + "Icon/Feedback/Error": styles.iconFeedbackError, CurrentColor: styles.currentColor, }, }, defaultVariants: { - color: 'Icon/Default', + color: "Icon/Default", }, } as const diff --git a/packages/design-system/lib/components/Image/imageLoader.test.ts b/packages/design-system/lib/components/Image/imageLoader.test.ts index ec5ef2dd3..48347c245 100644 --- a/packages/design-system/lib/components/Image/imageLoader.test.ts +++ b/packages/design-system/lib/components/Image/imageLoader.test.ts @@ -1,69 +1,69 @@ -import { describe, it, expect } from 'vitest' -import { imageLoader } from './imageLoader' -describe('imageLoader', () => { - it('should generate the correct image URL for absolute URLs', () => { +import { describe, it, expect } from "vitest" +import { imageLoader } from "./imageLoader" +describe("imageLoader", () => { + it("should generate the correct image URL for absolute URLs", () => { const loader = imageLoader({ dimensions: { width: 800, height: 600 } }) const url = loader({ quality: 80, - src: 'https://example.com/image.jpg', + src: "https://example.com/image.jpg", width: 800, }) expect(url).toBe( - 'https://img.scandichotels.com/.netlify/images?url=https://example.com/image.jpg&w=800&q=80' + "https://img.scandichotels.com/.netlify/images?url=https://example.com/image.jpg&w=800&q=80" ) }) - it('should generate the correct image URL for relative URLs', () => { + it("should generate the correct image URL for relative URLs", () => { const loader = imageLoader({ dimensions: { width: 800, height: 600 } }) const url = loader({ quality: 80, - src: '/image.jpg', + src: "/image.jpg", width: 800, }) - expect(url).toBe('/image.jpg?w=800&q=80') + expect(url).toBe("/image.jpg?w=800&q=80") }) - it('should compensate for landscape 3:2 images', () => { + it("should compensate for landscape 3:2 images", () => { const loader = imageLoader({ dimensions: { width: 6000, height: 4000 } }) const url = loader({ - src: '/image.jpg', + src: "/image.jpg", width: 400, }) - expect(url).toBe('/image.jpg?w=600') + expect(url).toBe("/image.jpg?w=600") }) - it('should compensate for landscape ~3:2 images', () => { + it("should compensate for landscape ~3:2 images", () => { const loader = imageLoader({ dimensions: { width: 7952, height: 5304 } }) const url = loader({ - src: '/image.jpg', + src: "/image.jpg", width: 400, }) - expect(url).toBe('/image.jpg?w=600') + expect(url).toBe("/image.jpg?w=600") }) - it('should compensate for standing 2:3 images', () => { + it("should compensate for standing 2:3 images", () => { const loader = imageLoader({ dimensions: { width: 4000, height: 6000 } }) const url = loader({ - src: '/image.jpg', + src: "/image.jpg", width: 800, }) - expect(url).toBe('/image.jpg?w=800') + expect(url).toBe("/image.jpg?w=800") }) - it('should compensate for landscape 2:1 images', () => { + it("should compensate for landscape 2:1 images", () => { const loader = imageLoader({ dimensions: { width: 2000, height: 1000 } }) const url = loader({ - src: '/image.jpg', + src: "/image.jpg", width: 800, }) // used to fetch an image 800x400 image but we, probably, render it with a height of 533 - expect(url).toBe('/image.jpg?w=1200') + expect(url).toBe("/image.jpg?w=1200") }) }) diff --git a/packages/design-system/lib/components/Image/imageLoader.ts b/packages/design-system/lib/components/Image/imageLoader.ts index c4bb441f8..f7bbd498e 100644 --- a/packages/design-system/lib/components/Image/imageLoader.ts +++ b/packages/design-system/lib/components/Image/imageLoader.ts @@ -1,4 +1,4 @@ -import { ImageLoaderProps } from 'next/image' +import { ImageLoaderProps } from "next/image" export const imageLoader = ({ @@ -9,18 +9,18 @@ export const imageLoader = }) => ({ quality, src, width }: ImageLoaderProps) => { const isAbsoluteUrl = - src.startsWith('https://') || src.startsWith('http://') - const hasQS = src.indexOf('?') !== -1 + src.startsWith("https://") || src.startsWith("http://") + const hasQS = src.indexOf("?") !== -1 if ( dimensions && - isLargerThanAspectRatio(dimensions, '3:2') && + isLargerThanAspectRatio(dimensions, "3:2") && width < dimensions.width ) { // If image is wider than 3:2, compensate for low height when rendering in a 3:2 container const scale = width / dimensions.width const minWidthFor32Aspect = - dimensions.height * scale * aspectRatios['3:2'] * 2 + dimensions.height * scale * aspectRatios["3:2"] * 2 width = Math.max(minWidthFor32Aspect, width) } @@ -33,14 +33,14 @@ export const imageLoader = width = roundToNearest(width, 10) if (isAbsoluteUrl) { - return `https://img.scandichotels.com/.netlify/images?url=${src}&w=${width}${quality ? '&q=' + quality : ''}` + return `https://img.scandichotels.com/.netlify/images?url=${src}&w=${width}${quality ? "&q=" + quality : ""}` } - return `${src}${hasQS ? '&' : '?'}w=${width}${quality ? '&q=' + quality : ''}` + return `${src}${hasQS ? "&" : "?"}w=${width}${quality ? "&q=" + quality : ""}` } const aspectRatios = { - '3:2': 3 / 2, + "3:2": 3 / 2, } function isLargerThanAspectRatio( dimensions: { diff --git a/packages/design-system/lib/components/Image/index.tsx b/packages/design-system/lib/components/Image/index.tsx index 77ca5c89e..7e3fce770 100644 --- a/packages/design-system/lib/components/Image/index.tsx +++ b/packages/design-system/lib/components/Image/index.tsx @@ -1,21 +1,21 @@ -'use client' +"use client" -import NextImage, { ImageProps as NextImageProps } from 'next/image' +import NextImage, { ImageProps as NextImageProps } from "next/image" -import ImageFallback from '../ImageFallback' +import ImageFallback from "../ImageFallback" -import { useState, type CSSProperties, type SyntheticEvent } from 'react' -import { imageLoader } from './imageLoader' +import { useState, type CSSProperties, type SyntheticEvent } from "react" +import { imageLoader } from "./imageLoader" type FocalPoint = { x: number y: number } -export type ImageProps = Omit & { +export type ImageProps = Omit & { focalPoint?: FocalPoint dimensions?: { width: number; height: number } - src: NextImageProps['src'] | undefined + src: NextImageProps["src"] | undefined } // Next/Image adds & instead of ? before the params @@ -30,7 +30,7 @@ export default function Image({ const [imageError, setImageError] = useState(false) const styles: CSSProperties = focalPoint ? { - objectFit: 'cover', + objectFit: "cover", objectPosition: `${focalPoint.x}% ${focalPoint.y}%`, ...style, } diff --git a/packages/design-system/lib/components/ImageContainer/index.tsx b/packages/design-system/lib/components/ImageContainer/index.tsx index 90a859e23..161eaa28f 100644 --- a/packages/design-system/lib/components/ImageContainer/index.tsx +++ b/packages/design-system/lib/components/ImageContainer/index.tsx @@ -1,7 +1,7 @@ -import Caption from '../Caption' -import Image from '../Image' +import Caption from "../Caption" +import Image from "../Image" -import styles from './imageContainer.module.css' +import styles from "./imageContainer.module.css" type Image = { id: number diff --git a/packages/design-system/lib/components/ImageFallback/index.tsx b/packages/design-system/lib/components/ImageFallback/index.tsx index c8a672860..1c43c0ab3 100644 --- a/packages/design-system/lib/components/ImageFallback/index.tsx +++ b/packages/design-system/lib/components/ImageFallback/index.tsx @@ -1,7 +1,7 @@ -import { cx } from 'class-variance-authority' -import { MaterialIcon } from '../Icons/MaterialIcon' +import { cx } from "class-variance-authority" +import { MaterialIcon } from "../Icons/MaterialIcon" -import styles from './imageFallback.module.css' +import styles from "./imageFallback.module.css" interface ImageFallbackProps extends React.HTMLAttributes { width?: string @@ -9,8 +9,8 @@ interface ImageFallbackProps extends React.HTMLAttributes { } export default function ImageFallback({ - width = '100%', - height = '100%', + width = "100%", + height = "100%", className, ...props }: ImageFallbackProps) { diff --git a/packages/design-system/lib/components/ImageGallery/index.tsx b/packages/design-system/lib/components/ImageGallery/index.tsx index e262d6736..ccad2da50 100644 --- a/packages/design-system/lib/components/ImageGallery/index.tsx +++ b/packages/design-system/lib/components/ImageGallery/index.tsx @@ -1,16 +1,16 @@ -'use client' +"use client" -import { memo, useState } from 'react' -import { Button as ButtonRAC } from 'react-aria-components' -import { useIntl } from 'react-intl' +import { memo, useState } from "react" +import { Button as ButtonRAC } from "react-aria-components" +import { useIntl } from "react-intl" -import { MaterialIcon } from '../Icons/MaterialIcon' -import Image from '../Image' -import ImageFallback from '../ImageFallback' -import Lightbox from '../Lightbox' -import { Typography } from '../Typography' +import { MaterialIcon } from "../Icons/MaterialIcon" +import Image from "../Image" +import ImageFallback from "../ImageFallback" +import Lightbox from "../Lightbox" +import { Typography } from "../Typography" -import styles from './imageGallery.module.css' +import styles from "./imageGallery.module.css" export interface GalleryImage { src: string @@ -26,7 +26,7 @@ type ImageGalleryProps = { height?: number sizes?: string hideLabel?: boolean - imageCountPosition?: 'top' | 'bottom' + imageCountPosition?: "top" | "bottom" } function ImageGallery({ @@ -36,7 +36,7 @@ function ImageGallery({ height = 280, sizes, hideLabel, - imageCountPosition = 'bottom', + imageCountPosition = "bottom", }: ImageGalleryProps) { const intl = useIntl() const [isOpen, setIsOpen] = useState(false) @@ -45,7 +45,7 @@ function ImageGallery({ ? { fill, sizes: - sizes ?? 'auto, (max-width: 400px) 100vw, (min-width: 401px) 500px', + sizes ?? "auto, (max-width: 400px) 100vw, (min-width: 401px) 500px", } : { height, width: height * 1.5 } @@ -68,7 +68,7 @@ function ImageGallery({ setIsOpen(true)} aria-label={intl.formatMessage({ - id: 'imageGallery.openImageGallery', - defaultMessage: 'Open image gallery', + id: "imageGallery.openImageGallery", + defaultMessage: "Open image gallery", })} />
diff --git a/packages/design-system/lib/components/InfoBox/InfoBox.stories.tsx b/packages/design-system/lib/components/InfoBox/InfoBox.stories.tsx index c33090e57..14d7bc307 100644 --- a/packages/design-system/lib/components/InfoBox/InfoBox.stories.tsx +++ b/packages/design-system/lib/components/InfoBox/InfoBox.stories.tsx @@ -1,15 +1,15 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { expect } from 'storybook/test' -import { InfoBox, Props } from './InfoBox' -import { IconName } from '../Icons/iconName' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { expect } from "storybook/test" +import { InfoBox, Props } from "./InfoBox" +import { IconName } from "../Icons/iconName" const meta: Meta = { - title: 'Core Components/InfoBox', + title: "Core Components/InfoBox", component: InfoBox, parameters: { - layout: 'padded', + layout: "padded", }, - tags: ['autodocs'], + tags: ["autodocs"], } export default meta @@ -17,27 +17,27 @@ type Story = StoryObj export const Default: Story = { args: { - theme: 'Default', + theme: "Default", icon: IconName.Accessibility, - heading: 'Heading', - text: 'This is an informational message', + heading: "Heading", + text: "This is an informational message", }, argTypes: { icon: { - control: { type: 'select' }, + control: { type: "select" }, options: Object.values(IconName), }, theme: { - control: { type: 'select' }, - options: ['Default', 'SAS-Blue'] satisfies Props['theme'][], + control: { type: "select" }, + options: ["Default", "SAS-Blue"] satisfies Props["theme"][], }, }, play: async ({ canvas, args }) => { - const article = await canvas.findByRole('article') + const article = await canvas.findByRole("article") await expect(article).toBeVisible() - const heading = await canvas.findByRole('heading', { name: args.heading }) + const heading = await canvas.findByRole("heading", { name: args.heading }) await expect(heading).toBeVisible() const paragraph = await canvas.findByText(args.text) @@ -47,7 +47,7 @@ export const Default: Story = { export const WithoutIcon: Story = { args: { - heading: 'Heading', - text: 'This is an informational message', + heading: "Heading", + text: "This is an informational message", }, } diff --git a/packages/design-system/lib/components/InfoBox/InfoBox.tsx b/packages/design-system/lib/components/InfoBox/InfoBox.tsx index 9716595c5..0e329c9d4 100644 --- a/packages/design-system/lib/components/InfoBox/InfoBox.tsx +++ b/packages/design-system/lib/components/InfoBox/InfoBox.tsx @@ -1,38 +1,38 @@ -import { cva } from 'class-variance-authority' -import { IconByIconName } from '../Icons/IconByIconName' -import { IconName } from '../Icons/iconName' -import { Typography } from '../Typography' -import styles from './InfoBox.module.css' -import type { VariantProps } from 'class-variance-authority' +import { cva } from "class-variance-authority" +import { IconByIconName } from "../Icons/IconByIconName" +import { IconName } from "../Icons/iconName" +import { Typography } from "../Typography" +import styles from "./InfoBox.module.css" +import type { VariantProps } from "class-variance-authority" const infoBoxVariants = cva(styles.infoBox, { variants: { theme: { - 'SAS-Blue': styles.sasBlue, + "SAS-Blue": styles.sasBlue, Default: styles.default, }, }, defaultVariants: { - theme: 'Default', + theme: "Default", }, }) const iconVariants = cva(styles.iconContainer, { variants: { theme: { - 'SAS-Blue': styles.sasBlue, + "SAS-Blue": styles.sasBlue, Default: styles.default, }, }, defaultVariants: { - theme: 'Default', + theme: "Default", }, }) export type Props = { heading: string text: string - theme?: VariantProps['theme'] + theme?: VariantProps["theme"] icon?: IconName } diff --git a/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx b/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx index a4e2ca69c..bb849ce0b 100644 --- a/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx +++ b/packages/design-system/lib/components/InfoCard/InfoCard.stories.tsx @@ -1,106 +1,106 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { Theme } from '@scandic-hotels/common/utils/theme' -import { InfoCard } from './InfoCard.tsx' -import { infoCardConfig } from './variants.ts' +import { Theme } from "@scandic-hotels/common/utils/theme" +import { InfoCard } from "./InfoCard.tsx" +import { infoCardConfig } from "./variants.ts" const DEFAULT_ARGS = { topTitle: "Here's to your health!", - heading: 'Gym & Wellness', + heading: "Gym & Wellness", primaryButton: { - href: '#', - text: 'Primary button', + href: "#", + text: "Primary button", }, secondaryButton: { - href: '#', - text: 'Secondary button', + href: "#", + text: "Secondary button", }, bodyText: - 'Our gym is open 24/7 and offers state-of-the-art equipment to help you stay fit during your stay.', + "Our gym is open 24/7 and offers state-of-the-art equipment to help you stay fit during your stay.", } const meta: Meta = { - title: 'Product Components/InfoCard', + title: "Product Components/InfoCard", component: InfoCard, argTypes: { topTitle: { - control: 'text', + control: "text", table: { - type: { summary: 'string' }, + type: { summary: "string" }, }, }, topTitleAngled: { - control: 'boolean', + control: "boolean", description: - 'Whether the top title should be angled. Only applies when `hotelTheme` is set to `Theme.scandic`.', - type: 'boolean', + "Whether the top title should be angled. Only applies when `hotelTheme` is set to `Theme.scandic`.", + type: "boolean", }, heading: { - control: 'text', + control: "text", table: { - type: { summary: 'string' }, + type: { summary: "string" }, }, }, bodyText: { - control: 'text', + control: "text", table: { - type: { summary: 'string' }, + type: { summary: "string" }, }, }, theme: { - control: 'select', + control: "select", options: Object.keys(infoCardConfig.variants.theme), table: { type: { - summary: Object.keys(infoCardConfig.variants.theme).join(' | '), + summary: Object.keys(infoCardConfig.variants.theme).join(" | "), }, }, }, height: { - control: 'select', + control: "select", options: Object.keys(infoCardConfig.variants.height), table: { type: { - summary: Object.keys(infoCardConfig.variants.height).join(' | '), + summary: Object.keys(infoCardConfig.variants.height).join(" | "), }, }, }, hotelTheme: { - control: 'select', + control: "select", options: Object.keys(infoCardConfig.variants.hotelTheme), description: - 'The hotel theme to adjust button colors for better contrast.', + "The hotel theme to adjust button colors for better contrast.", table: { - type: { summary: 'Theme', detail: Object.values(Theme).join(' | ') }, + type: { summary: "Theme", detail: Object.values(Theme).join(" | ") }, }, }, backgroundImage: { - control: 'object', + control: "object", table: { type: { - summary: 'InfoCardBackgroundImage', + summary: "InfoCardBackgroundImage", detail: - '{ src: string, alt?: string, focalPoint?: { x: number, y: number }, dimensions?: { width: number, height: number, aspectRatio?: number } }', + "{ src: string, alt?: string, focalPoint?: { x: number, y: number }, dimensions?: { width: number, height: number, aspectRatio?: number } }", }, }, }, primaryButton: { - control: 'object', + control: "object", table: { type: { - summary: 'InfoCardButton', + summary: "InfoCardButton", detail: - '{ href: string, text: string, openInNewTab?: boolean, scrollOnClick?: boolean, onClick?: MouseEventHandler }', + "{ href: string, text: string, openInNewTab?: boolean, scrollOnClick?: boolean, onClick?: MouseEventHandler }", }, }, }, secondaryButton: { - control: 'object', + control: "object", table: { type: { - summary: 'InfoCardButton', + summary: "InfoCardButton", detail: - '{ href: string, text: string, openInNewTab?: boolean, scrollOnClick?: boolean, onClick?: MouseEventHandler }', + "{ href: string, text: string, openInNewTab?: boolean, scrollOnClick?: boolean, onClick?: MouseEventHandler }", }, }, }, @@ -108,26 +108,26 @@ const meta: Meta = { args: { ...DEFAULT_ARGS }, decorators: [ (Story, context) => { - if (context.name.toLowerCase().indexOf('all themes') >= 0) { + if (context.name.toLowerCase().indexOf("all themes") >= 0) { return (
{Object.keys(infoCardConfig.variants.theme).map((theme) => { console.log(theme) const args = { ...context.args, backgroundImage: - theme === 'Image' + theme === "Image" ? { - src: './img/img1.jpg', - alt: 'Image alt text', + src: "./img/img1.jpg", + alt: "Image alt text", } : undefined, } return ( -
+

{theme}

= { } return ( -
+
) @@ -162,35 +162,35 @@ export const Default: Story = { export const Primary_1: Story = { args: { ...meta.args, - theme: 'Primary 1', + theme: "Primary 1", }, } export const Primary_2: Story = { args: { ...meta.args, - theme: 'Primary 2', + theme: "Primary 2", }, } export const Primary_3: Story = { args: { ...meta.args, - theme: 'Primary 3', + theme: "Primary 3", }, } export const Accent: Story = { args: { ...meta.args, - theme: 'Accent', + theme: "Accent", }, } export const White: Story = { args: { ...meta.args, - theme: 'White', + theme: "White", }, } @@ -198,10 +198,10 @@ export const Image: Story = { args: { ...meta.args, backgroundImage: { - src: './img/img1.jpg', - alt: 'Image alt text', + src: "./img/img1.jpg", + alt: "Image alt text", }, - theme: 'Image', + theme: "Image", }, } diff --git a/packages/design-system/lib/components/InfoCard/InfoCard.tsx b/packages/design-system/lib/components/InfoCard/InfoCard.tsx index 37fc1c07d..d4c850716 100644 --- a/packages/design-system/lib/components/InfoCard/InfoCard.tsx +++ b/packages/design-system/lib/components/InfoCard/InfoCard.tsx @@ -1,15 +1,15 @@ -import ButtonLink from '../ButtonLink' -import Image from '../Image' -import { Typography } from '../Typography' +import ButtonLink from "../ButtonLink" +import Image from "../Image" +import { Typography } from "../Typography" -import { getButtonProps } from './utils' +import { getButtonProps } from "./utils" -import { infoCardVariants } from './variants' +import { infoCardVariants } from "./variants" -import styles from './infoCard.module.css' +import styles from "./infoCard.module.css" -import ImageFallback from '../ImageFallback' -import type { InfoCardProps } from './types' +import ImageFallback from "../ImageFallback" +import type { InfoCardProps } from "./types" export function InfoCard({ primaryButton, @@ -35,13 +35,13 @@ export function InfoCard({ return (
- {theme === 'Image' ? ( + {theme === "Image" ? (
{backgroundImage ? ( {backgroundImage.alt, + extends + React.HTMLAttributes, VariantProps { topTitle?: string | null heading?: string | null diff --git a/packages/design-system/lib/components/InfoCard/utils.ts b/packages/design-system/lib/components/InfoCard/utils.ts index 62f1b5f54..1555521a0 100644 --- a/packages/design-system/lib/components/InfoCard/utils.ts +++ b/packages/design-system/lib/components/InfoCard/utils.ts @@ -1,32 +1,32 @@ -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" -import { Theme } from '@scandic-hotels/common/utils/theme' -import type { variants as buttonVariants } from '../Button/variants' -import type { infoCardVariants } from './variants' +import { Theme } from "@scandic-hotels/common/utils/theme" +import type { variants as buttonVariants } from "../Button/variants" +import type { infoCardVariants } from "./variants" type ButtonVariants = VariantProps type InfoCardButtonProps = { primaryButton: { - variant: ButtonVariants['variant'] - color: ButtonVariants['color'] + variant: ButtonVariants["variant"] + color: ButtonVariants["color"] } secondaryButton: { - variant: ButtonVariants['variant'] - color: ButtonVariants['color'] + variant: ButtonVariants["variant"] + color: ButtonVariants["color"] } } -const PRIMARY = { variant: 'Primary', color: 'Primary' } as const -const PRIMARY_INVERTED = { variant: 'Primary', color: 'Inverted' } as const -const SECONDARY = { variant: 'Secondary', color: 'Primary' } as const -const SECONDARY_INVERTED = { variant: 'Secondary', color: 'Inverted' } as const -const TERTIARY = { variant: 'Tertiary', color: 'Primary' } as const +const PRIMARY = { variant: "Primary", color: "Primary" } as const +const PRIMARY_INVERTED = { variant: "Primary", color: "Inverted" } as const +const SECONDARY = { variant: "Secondary", color: "Primary" } as const +const SECONDARY_INVERTED = { variant: "Secondary", color: "Inverted" } as const +const TERTIARY = { variant: "Tertiary", color: "Primary" } as const // Determine button variant and color based on card theme and hotel theme. // This is done to avoid low contrast issues and conflicting colors in // certain combinations and according to design guidelines. export function getButtonProps( - cardTheme: VariantProps['theme'], + cardTheme: VariantProps["theme"], hotelTheme: Theme | null = Theme.scandic ): InfoCardButtonProps { let buttonProps: InfoCardButtonProps = { @@ -35,7 +35,7 @@ export function getButtonProps( } // Image theme always uses inverted buttons, regardless of hotel theme - if (cardTheme === 'Image') { + if (cardTheme === "Image") { return { primaryButton: PRIMARY_INVERTED, secondaryButton: SECONDARY_INVERTED, @@ -44,7 +44,7 @@ export function getButtonProps( switch (hotelTheme) { case Theme.scandic: - if (cardTheme === 'Primary 2' || cardTheme === 'Primary 3') { + if (cardTheme === "Primary 2" || cardTheme === "Primary 3") { buttonProps = { primaryButton: PRIMARY_INVERTED, secondaryButton: SECONDARY_INVERTED, @@ -53,10 +53,10 @@ export function getButtonProps( break case Theme.downtownCamper: if ( - cardTheme === 'Primary 1' || - cardTheme === 'Primary 2' || - cardTheme === 'Primary 3' || - cardTheme === 'Accent' + cardTheme === "Primary 1" || + cardTheme === "Primary 2" || + cardTheme === "Primary 3" || + cardTheme === "Accent" ) { buttonProps = { primaryButton: PRIMARY_INVERTED, @@ -65,15 +65,15 @@ export function getButtonProps( } break case Theme.haymarket: - if (cardTheme === 'Primary 1' || cardTheme === 'White') { + if (cardTheme === "Primary 1" || cardTheme === "White") { buttonProps = { primaryButton: PRIMARY, secondaryButton: SECONDARY, } } else if ( - cardTheme === 'Primary 2' || - cardTheme === 'Primary 3' || - cardTheme === 'Accent' + cardTheme === "Primary 2" || + cardTheme === "Primary 3" || + cardTheme === "Accent" ) { buttonProps = { primaryButton: PRIMARY_INVERTED, @@ -82,7 +82,7 @@ export function getButtonProps( } break case Theme.scandicGo: - if (cardTheme === 'Primary 1' || cardTheme === 'Primary 2') { + if (cardTheme === "Primary 1" || cardTheme === "Primary 2") { buttonProps = { primaryButton: PRIMARY_INVERTED, secondaryButton: SECONDARY_INVERTED, @@ -91,16 +91,16 @@ export function getButtonProps( break case Theme.grandHotel: if ( - cardTheme === 'Primary 2' || - cardTheme === 'Primary 3' || - cardTheme === 'Accent' || - cardTheme === 'White' + cardTheme === "Primary 2" || + cardTheme === "Primary 3" || + cardTheme === "Accent" || + cardTheme === "White" ) { buttonProps = { primaryButton: PRIMARY, secondaryButton: SECONDARY, } - } else if (cardTheme === 'Primary 1') { + } else if (cardTheme === "Primary 1") { buttonProps = { primaryButton: PRIMARY_INVERTED, secondaryButton: SECONDARY_INVERTED, @@ -109,9 +109,9 @@ export function getButtonProps( break case Theme.hotelNorge: if ( - cardTheme === 'Primary 1' || - cardTheme === 'Primary 2' || - cardTheme === 'Primary 3' + cardTheme === "Primary 1" || + cardTheme === "Primary 2" || + cardTheme === "Primary 3" ) { buttonProps = { primaryButton: PRIMARY_INVERTED, @@ -120,20 +120,20 @@ export function getButtonProps( } break case Theme.marski: - if (cardTheme === 'Primary 1') { + if (cardTheme === "Primary 1") { buttonProps = { primaryButton: TERTIARY, secondaryButton: SECONDARY_INVERTED, } - } else if (cardTheme === 'White') { + } else if (cardTheme === "White") { buttonProps = { primaryButton: PRIMARY, secondaryButton: SECONDARY, } } else if ( - cardTheme === 'Primary 2' || - cardTheme === 'Primary 3' || - cardTheme === 'Accent' + cardTheme === "Primary 2" || + cardTheme === "Primary 3" || + cardTheme === "Accent" ) { buttonProps = { primaryButton: PRIMARY_INVERTED, @@ -143,15 +143,15 @@ export function getButtonProps( break case Theme.theDock: if ( - cardTheme === 'Primary 1' || - cardTheme === 'Accent' || - cardTheme === 'White' + cardTheme === "Primary 1" || + cardTheme === "Accent" || + cardTheme === "White" ) { buttonProps = { primaryButton: PRIMARY, secondaryButton: SECONDARY, } - } else if (cardTheme === 'Primary 2' || cardTheme === 'Primary 3') { + } else if (cardTheme === "Primary 2" || cardTheme === "Primary 3") { buttonProps = { primaryButton: PRIMARY_INVERTED, secondaryButton: SECONDARY_INVERTED, diff --git a/packages/design-system/lib/components/InfoCard/variants.ts b/packages/design-system/lib/components/InfoCard/variants.ts index 07aec643a..abaf0d445 100644 --- a/packages/design-system/lib/components/InfoCard/variants.ts +++ b/packages/design-system/lib/components/InfoCard/variants.ts @@ -1,36 +1,36 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import { DEFAULT_THEME, Theme } from '@scandic-hotels/common/utils/theme' -import styles from './infoCard.module.css' +import { DEFAULT_THEME, Theme } from "@scandic-hotels/common/utils/theme" +import styles from "./infoCard.module.css" const variantKeys = { theme: { - 'Primary 1': 'Primary 1', - 'Primary 2': 'Primary 2', - 'Primary 3': 'Primary 3', - Accent: 'Accent', - Image: 'Image', - White: 'White', + "Primary 1": "Primary 1", + "Primary 2": "Primary 2", + "Primary 3": "Primary 3", + Accent: "Accent", + Image: "Image", + White: "White", }, height: { - fixed: 'fixed', - dynamic: 'dynamic', + fixed: "fixed", + dynamic: "dynamic", }, } as const export const infoCardConfig = { variants: { theme: { - [variantKeys.theme['Primary 1']]: styles['theme-primary-1'], - [variantKeys.theme['Primary 2']]: styles['theme-primary-2'], - [variantKeys.theme['Primary 3']]: styles['theme-primary-3'], - [variantKeys.theme['Accent']]: styles['theme-accent'], - [variantKeys.theme['Image']]: styles['theme-image'], - [variantKeys.theme['White']]: styles['theme-white'], + [variantKeys.theme["Primary 1"]]: styles["theme-primary-1"], + [variantKeys.theme["Primary 2"]]: styles["theme-primary-2"], + [variantKeys.theme["Primary 3"]]: styles["theme-primary-3"], + [variantKeys.theme["Accent"]]: styles["theme-accent"], + [variantKeys.theme["Image"]]: styles["theme-image"], + [variantKeys.theme["White"]]: styles["theme-white"], }, height: { - [variantKeys.height.fixed]: styles['height-fixed'], - [variantKeys.height.dynamic]: styles['height-dynamic'], + [variantKeys.height.fixed]: styles["height-fixed"], + [variantKeys.height.dynamic]: styles["height-dynamic"], }, // Only Theme.scandic can be used with the Angled variant. // The topTitleAngled variant will be applied using the compoundVariants. @@ -56,11 +56,11 @@ export const infoCardConfig = { { hotelTheme: Theme.scandic, topTitleAngled: true, - class: styles['top-title-angled'], + class: styles["top-title-angled"], }, ], defaultVariants: { - theme: variantKeys.theme['Primary 1'], + theme: variantKeys.theme["Primary 1"], height: variantKeys.height.fixed, topTitleAngled: false, hotelTheme: DEFAULT_THEME, diff --git a/packages/design-system/lib/components/Input/Input.stories.tsx b/packages/design-system/lib/components/Input/Input.stories.tsx index 877d5b48a..8a225057a 100644 --- a/packages/design-system/lib/components/Input/Input.stories.tsx +++ b/packages/design-system/lib/components/Input/Input.stories.tsx @@ -1,14 +1,14 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { expect } from 'storybook/test' +import { expect } from "storybook/test" -import { Input } from './Input' -import { TextField } from 'react-aria-components' -import { MaterialIcon } from '../Icons/MaterialIcon' -import type { SymbolCodepoints } from '../Icons/MaterialIcon/MaterialSymbol/types' +import { Input } from "./Input" +import { TextField } from "react-aria-components" +import { MaterialIcon } from "../Icons/MaterialIcon" +import type { SymbolCodepoints } from "../Icons/MaterialIcon/MaterialSymbol/types" const meta: Meta = { - title: 'Core Components/Input', + title: "Core Components/Input", // @ts-expect-error Input does not support this, but wrapping does component: ({ isInvalid, validationState, ...props }) => ( @@ -17,117 +17,117 @@ const meta: Meta = { ), argTypes: { label: { - control: 'text', - description: 'The label text displayed for the input field', + control: "text", + description: "The label text displayed for the input field", table: { - type: { summary: 'string' }, + type: { summary: "string" }, }, }, labelPosition: { - control: 'select', - options: ['floating', 'top'], - description: 'Position of the label relative to the input', + control: "select", + options: ["floating", "top"], + description: "Position of the label relative to the input", table: { type: { summary: "'floating' | 'top'" }, defaultValue: { summary: "'floating'" }, }, }, placeholder: { - control: 'text', - description: 'Placeholder text shown when input is empty', + control: "text", + description: "Placeholder text shown when input is empty", table: { - type: { summary: 'string' }, - defaultValue: { summary: 'undefined' }, + type: { summary: "string" }, + defaultValue: { summary: "undefined" }, }, }, required: { - control: 'boolean', - description: 'Whether the input is required', + control: "boolean", + description: "Whether the input is required", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, disabled: { - control: 'boolean', - description: 'Whether the input is disabled', + control: "boolean", + description: "Whether the input is disabled", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, showClearContentIcon: { - control: 'boolean', - description: 'Whether the clear content icon is shown', + control: "boolean", + description: "Whether the clear content icon is shown", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, showLeftIcon: { - control: 'boolean', - description: 'Whether to show a left icon', + control: "boolean", + description: "Whether to show a left icon", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, showRightIcon: { - control: 'boolean', - description: 'Whether to show a right icon', + control: "boolean", + description: "Whether to show a right icon", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, leftIconName: { - control: 'select', + control: "select", options: [ - 'calendar_month', - 'credit_card', - 'email', - 'info_circle', - 'location_on', - 'lock', - 'phone', - 'search', - 'sell', - 'visibility', - 'visibility_off', + "calendar_month", + "credit_card", + "email", + "info_circle", + "location_on", + "lock", + "phone", + "search", + "sell", + "visibility", + "visibility_off", ], - description: 'Icon name for the left icon', + description: "Icon name for the left icon", table: { - type: { summary: 'string' }, + type: { summary: "string" }, defaultValue: { summary: "'person'" }, }, }, rightIconName: { - control: 'select', + control: "select", options: [ - 'calendar_month', - 'credit_card', - 'email', - 'info_circle', - 'location_on', - 'lock', - 'phone', - 'search', - 'sell', - 'visibility', - 'visibility_off', + "calendar_month", + "credit_card", + "email", + "info_circle", + "location_on", + "lock", + "phone", + "search", + "sell", + "visibility", + "visibility_off", ], - description: 'Icon name for the right icon', + description: "Icon name for the right icon", table: { - type: { summary: 'string' }, + type: { summary: "string" }, defaultValue: { summary: "'lock'" }, }, }, showWarning: { - control: 'boolean', - description: 'Whether to show warning validation state', + control: "boolean", + description: "Whether to show warning validation state", table: { - type: { summary: 'boolean' }, - defaultValue: { summary: 'false' }, + type: { summary: "boolean" }, + defaultValue: { summary: "false" }, }, }, // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -140,13 +140,13 @@ type Story = StoryObj export const Default: Story = { args: { - label: 'Label', - name: 'foo', + label: "Label", + name: "foo", required: false, showLeftIcon: false, showRightIcon: false, - leftIconName: 'person', - rightIconName: 'lock', + leftIconName: "person", + rightIconName: "lock", showWarning: false, // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, @@ -167,7 +167,7 @@ export const Default: Story = { showWarning?: boolean } - const validationState = showWarning ? 'warning' : undefined + const validationState = showWarning ? "warning" : undefined return ( @@ -189,15 +189,15 @@ export const Default: Story = { ) }, play: async ({ canvas, userEvent }) => { - const textbox = canvas.getByRole('textbox') + const textbox = canvas.getByRole("textbox") expect(textbox).not.toBeDisabled() - expect(textbox).toHaveValue('') + expect(textbox).toHaveValue("") - await userEvent.type(textbox, 'Hello World') - expect(textbox).toHaveValue('Hello World') + await userEvent.type(textbox, "Hello World") + expect(textbox).toHaveValue("Hello World") await userEvent.clear(textbox) - expect(textbox).toHaveValue('') + expect(textbox).toHaveValue("") }, } diff --git a/packages/design-system/lib/components/Input/Input.test.tsx b/packages/design-system/lib/components/Input/Input.test.tsx index e341b9ce6..9d9767527 100644 --- a/packages/design-system/lib/components/Input/Input.test.tsx +++ b/packages/design-system/lib/components/Input/Input.test.tsx @@ -1,8 +1,8 @@ -import { describe, expect, it, vi, afterEach } from 'vitest' -import { render, screen, fireEvent, cleanup } from '@testing-library/react' -import userEvent from '@testing-library/user-event' -import { Input } from './Input' -import { TextField } from 'react-aria-components' +import { describe, expect, it, vi, afterEach } from "vitest" +import { render, screen, fireEvent, cleanup } from "@testing-library/react" +import userEvent from "@testing-library/user-event" +import { Input } from "./Input" +import { TextField } from "react-aria-components" afterEach(() => { cleanup() @@ -22,158 +22,158 @@ const renderInputStandalone = (props: React.ComponentProps) => { return render() } -describe('Input', () => { - describe('props', () => { - it('applies required attribute', () => { - renderInput({ label: 'Email', required: true }) - expect(screen.getByRole('textbox')).toHaveProperty('required', true) +describe("Input", () => { + describe("props", () => { + it("applies required attribute", () => { + renderInput({ label: "Email", required: true }) + expect(screen.getByRole("textbox")).toHaveProperty("required", true) }) - it('applies readOnly attribute', () => { - renderInput({ label: 'Email', readOnly: true }) - expect(screen.getByRole('textbox')).toHaveProperty('readOnly', true) + it("applies readOnly attribute", () => { + renderInput({ label: "Email", readOnly: true }) + expect(screen.getByRole("textbox")).toHaveProperty("readOnly", true) }) - it('applies placeholder for floating label when provided', () => { - renderInput({ label: 'Email', placeholder: 'Enter email' }) - expect(screen.getByRole('textbox').getAttribute('placeholder')).toBe( - 'Enter email' + it("applies placeholder for floating label when provided", () => { + renderInput({ label: "Email", placeholder: "Enter email" }) + expect(screen.getByRole("textbox").getAttribute("placeholder")).toBe( + "Enter email" ) }) - it('applies empty placeholder for top label by default', () => { - renderInput({ label: 'Email', labelPosition: 'top' }) - expect(screen.getByRole('textbox').getAttribute('placeholder')).toBe('') + it("applies empty placeholder for top label by default", () => { + renderInput({ label: "Email", labelPosition: "top" }) + expect(screen.getByRole("textbox").getAttribute("placeholder")).toBe("") }) - it('applies custom id', () => { + it("applies custom id", () => { // Use standalone render since TextField overrides id via context - renderInputStandalone({ label: 'Email', id: 'custom-id' }) - expect(screen.getByRole('textbox').getAttribute('id')).toBe('custom-id') + renderInputStandalone({ label: "Email", id: "custom-id" }) + expect(screen.getByRole("textbox").getAttribute("id")).toBe("custom-id") }) - it('applies aria-describedby', () => { - renderInput({ label: 'Email', 'aria-describedby': 'error-message' }) - expect(screen.getByRole('textbox').getAttribute('aria-describedby')).toBe( - 'error-message' + it("applies aria-describedby", () => { + renderInput({ label: "Email", "aria-describedby": "error-message" }) + expect(screen.getByRole("textbox").getAttribute("aria-describedby")).toBe( + "error-message" ) }) }) - describe('clear content button', () => { - it('does not show clear button when showClearContentIcon is false', () => { + describe("clear content button", () => { + it("does not show clear button when showClearContentIcon is false", () => { renderInput({ - label: 'Email', - value: 'test', + label: "Email", + value: "test", onChange: vi.fn(), showClearContentIcon: false, }) - expect(screen.queryByLabelText('Clear content')).toBeNull() + expect(screen.queryByLabelText("Clear content")).toBeNull() }) - it('does not show clear button when input is empty', () => { + it("does not show clear button when input is empty", () => { renderInput({ - label: 'Email', - value: '', + label: "Email", + value: "", onChange: vi.fn(), showClearContentIcon: true, }) - expect(screen.queryByLabelText('Clear content')).toBeNull() + expect(screen.queryByLabelText("Clear content")).toBeNull() }) - it('shows clear button when input has value and showClearContentIcon is true', () => { + it("shows clear button when input has value and showClearContentIcon is true", () => { renderInput({ - label: 'Email', - value: 'test', + label: "Email", + value: "test", onChange: vi.fn(), showClearContentIcon: true, }) - expect(screen.getByLabelText('Clear content')).toBeTruthy() + expect(screen.getByLabelText("Clear content")).toBeTruthy() }) }) - describe('icons', () => { - it('renders left icon when provided', () => { + describe("icons", () => { + it("renders left icon when provided", () => { renderInput({ - label: 'Search', + label: "Search", // eslint-disable-next-line formatjs/no-literal-string-in-jsx leftIcon: ๐Ÿ”, }) - expect(screen.getByTestId('left-icon')).toBeTruthy() + expect(screen.getByTestId("left-icon")).toBeTruthy() }) - it('renders right icon when provided', () => { + it("renders right icon when provided", () => { renderInput({ - label: 'Password', + label: "Password", // eslint-disable-next-line formatjs/no-literal-string-in-jsx rightIcon: ๐Ÿ‘, }) - expect(screen.getByTestId('right-icon')).toBeTruthy() + expect(screen.getByTestId("right-icon")).toBeTruthy() }) - it('hides right icon when clear button is shown', () => { + it("hides right icon when clear button is shown", () => { renderInput({ - label: 'Email', - value: 'test', + label: "Email", + value: "test", onChange: vi.fn(), showClearContentIcon: true, // eslint-disable-next-line formatjs/no-literal-string-in-jsx rightIcon: ๐Ÿ‘, }) - expect(screen.queryByTestId('right-icon')).toBeNull() - expect(screen.getByLabelText('Clear content')).toBeTruthy() + expect(screen.queryByTestId("right-icon")).toBeNull() + expect(screen.getByLabelText("Clear content")).toBeTruthy() }) - it('shows right icon when clear button condition not met', () => { + it("shows right icon when clear button condition not met", () => { renderInput({ - label: 'Email', - value: '', + label: "Email", + value: "", onChange: vi.fn(), showClearContentIcon: true, // eslint-disable-next-line formatjs/no-literal-string-in-jsx rightIcon: ๐Ÿ‘, }) - expect(screen.getByTestId('right-icon')).toBeTruthy() + expect(screen.getByTestId("right-icon")).toBeTruthy() }) }) - describe('controlled input', () => { - it('displays the controlled value', () => { + describe("controlled input", () => { + it("displays the controlled value", () => { renderInput({ - label: 'Email', - value: 'test@example.com', + label: "Email", + value: "test@example.com", onChange: vi.fn(), }) - expect(screen.getByRole('textbox')).toHaveProperty( - 'value', - 'test@example.com' + expect(screen.getByRole("textbox")).toHaveProperty( + "value", + "test@example.com" ) }) - it('calls onChange when typing', async () => { + it("calls onChange when typing", async () => { const onChange = vi.fn() - renderInput({ label: 'Email', value: '', onChange }) + renderInput({ label: "Email", value: "", onChange }) - const input = screen.getByRole('textbox') - await userEvent.type(input, 'a') + const input = screen.getByRole("textbox") + await userEvent.type(input, "a") expect(onChange).toHaveBeenCalled() }) - it('does not change value without onChange updating it', () => { + it("does not change value without onChange updating it", () => { const onChange = vi.fn() - renderInput({ label: 'Email', value: 'initial', onChange }) + renderInput({ label: "Email", value: "initial", onChange }) - const input = screen.getByRole('textbox') - fireEvent.change(input, { target: { value: 'changed' } }) + const input = screen.getByRole("textbox") + fireEvent.change(input, { target: { value: "changed" } }) // Value stays the same because it's controlled - expect(input).toHaveProperty('value', 'initial') + expect(input).toHaveProperty("value", "initial") }) }) - describe('ref forwarding', () => { - it('forwards ref to the input element', () => { + describe("ref forwarding", () => { + it("forwards ref to the input element", () => { const ref = { current: null as HTMLInputElement | null } render( @@ -183,7 +183,7 @@ describe('Input', () => { expect(ref.current).toBeInstanceOf(HTMLInputElement) }) - it('allows focusing via ref', () => { + it("allows focusing via ref", () => { const ref = { current: null as HTMLInputElement | null } render( diff --git a/packages/design-system/lib/components/Input/Input.tsx b/packages/design-system/lib/components/Input/Input.tsx index 4a89b6a0e..d2b69597c 100644 --- a/packages/design-system/lib/components/Input/Input.tsx +++ b/packages/design-system/lib/components/Input/Input.tsx @@ -1,26 +1,26 @@ -import { cx } from 'class-variance-authority' +import { cx } from "class-variance-authority" import { type ForwardedRef, forwardRef, useId, useImperativeHandle, useRef, -} from 'react' -import { Input as AriaInput, Label as AriaLabel } from 'react-aria-components' +} from "react" +import { Input as AriaInput, Label as AriaLabel } from "react-aria-components" -import { InputLabel } from '../InputLabel' +import { InputLabel } from "../InputLabel" -import styles from './input.module.css' +import styles from "./input.module.css" -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' -import type { InputProps } from './types' -import { clearInput, useInputHasValue } from './utils' +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" +import type { InputProps } from "./types" +import { clearInput, useInputHasValue } from "./utils" const InputComponent = forwardRef(function AriaInputWithLabelComponent( { label, - labelPosition = 'floating', + labelPosition = "floating", leftIcon, rightIcon, // eslint-disable-next-line @typescript-eslint/no-unused-vars @@ -29,9 +29,9 @@ const InputComponent = forwardRef(function AriaInputWithLabelComponent( placeholder, id, required, - 'data-validation-state': validationState, + "data-validation-state": validationState, ...props - }: InputProps & { 'data-validation-state'?: string }, + }: InputProps & { "data-validation-state"?: string }, ref: ForwardedRef ) { // Create an internal ref that we can access @@ -57,7 +57,7 @@ const InputComponent = forwardRef(function AriaInputWithLabelComponent( } // When labelPosition is 'top', restructure to have label outside container // We need an ID for proper label-input association - if (labelPosition === 'top') { + if (labelPosition === "top") { const inputId = id || generatedId return ( @@ -93,7 +93,7 @@ const InputComponent = forwardRef(function AriaInputWithLabelComponent( // Avoid duplicating label text in placeholder when label is positioned above // Screen readers would announce the label twice (once as label, once as placeholder) // Only use placeholder if explicitly provided, otherwise use empty string - placeholder={placeholder ?? ''} + placeholder={placeholder ?? ""} className={cx( styles.input, styles.inputTopLabel, diff --git a/packages/design-system/lib/components/Input/index.tsx b/packages/design-system/lib/components/Input/index.tsx index 3188ccc6a..6a47963a9 100644 --- a/packages/design-system/lib/components/Input/index.tsx +++ b/packages/design-system/lib/components/Input/index.tsx @@ -1 +1 @@ -export { Input } from './Input' +export { Input } from "./Input" diff --git a/packages/design-system/lib/components/Input/input.module.css b/packages/design-system/lib/components/Input/input.module.css index 738ab5cbd..8163e6727 100644 --- a/packages/design-system/lib/components/Input/input.module.css +++ b/packages/design-system/lib/components/Input/input.module.css @@ -22,11 +22,11 @@ &:has(.input:focus):not(:has(.input:disabled)):not( :has(.input:read-only) - ):not(:has(.input[data-invalid='true'])):not( - :has(.input[aria-invalid='true']) - ):not(:has(.input[data-warning='true'])):not( - :has(.input[data-validation-state='warning']) - ):not([data-validation-state='warning']) { + ):not(:has(.input[data-invalid="true"])):not( + :has(.input[aria-invalid="true"]) + ):not(:has(.input[data-warning="true"])):not( + :has(.input[data-validation-state="warning"]) + ):not([data-validation-state="warning"]) { outline-offset: -2px; outline: 2px solid var(--Border-Interactive-Focus); } @@ -38,7 +38,7 @@ cursor: unset; } - &:has(.input[data-invalid='true'], .input[aria-invalid='true']) { + &:has(.input[data-invalid="true"], .input[aria-invalid="true"]) { border-color: var(--Border-Interactive-Error); &:focus-within, @@ -49,9 +49,9 @@ } } - &:has(.input[data-warning='true']), - &:has(.input[data-validation-state='warning']), - &[data-validation-state='warning'] { + &:has(.input[data-warning="true"]), + &:has(.input[data-validation-state="warning"]), + &[data-validation-state="warning"] { background-color: var(--Surface-Feedback-Warning-light); border-color: var(--Border-Interactive-Focus); @@ -84,7 +84,7 @@ &:focus, &:placeholder-shown, - &[value]:not([value='']) { + &[value]:not([value=""]) { height: 24px; outline: none; } diff --git a/packages/design-system/lib/components/Input/types.ts b/packages/design-system/lib/components/Input/types.ts index dbd0ce62b..7422b32af 100644 --- a/packages/design-system/lib/components/Input/types.ts +++ b/packages/design-system/lib/components/Input/types.ts @@ -1,9 +1,9 @@ -import { ComponentProps } from 'react' -import { Input } from 'react-aria-components' +import { ComponentProps } from "react" +import { Input } from "react-aria-components" export interface InputProps extends ComponentProps { label: string - labelPosition?: 'floating' | 'top' + labelPosition?: "floating" | "top" leftIcon?: React.ReactNode rightIcon?: React.ReactNode onRightIconClick?: () => void diff --git a/packages/design-system/lib/components/Input/utils.test.ts b/packages/design-system/lib/components/Input/utils.test.ts index 4c1d3e578..46eda2761 100644 --- a/packages/design-system/lib/components/Input/utils.test.ts +++ b/packages/design-system/lib/components/Input/utils.test.ts @@ -1,56 +1,56 @@ -import { describe, expect, it, vi, beforeEach } from 'vitest' -import { renderHook } from '@testing-library/react' -import { useInputHasValue, clearInput } from './utils' +import { describe, expect, it, vi, beforeEach } from "vitest" +import { renderHook } from "@testing-library/react" +import { useInputHasValue, clearInput } from "./utils" -describe('useInputHasValue', () => { - const createMockRef = (value = '') => ({ +describe("useInputHasValue", () => { + const createMockRef = (value = "") => ({ current: { value } as HTMLInputElement, }) - describe('controlled input (value prop)', () => { - it('returns true when value has content', () => { + describe("controlled input (value prop)", () => { + it("returns true when value has content", () => { const ref = createMockRef() - const { result } = renderHook(() => useInputHasValue('hello', ref)) + const { result } = renderHook(() => useInputHasValue("hello", ref)) expect(result.current).toBe(true) }) - it('returns false when value is empty string', () => { + it("returns false when value is empty string", () => { const ref = createMockRef() - const { result } = renderHook(() => useInputHasValue('', ref)) + const { result } = renderHook(() => useInputHasValue("", ref)) expect(result.current).toBe(false) }) - it('returns false when value is only whitespace', () => { + it("returns false when value is only whitespace", () => { const ref = createMockRef() - const { result } = renderHook(() => useInputHasValue(' ', ref)) + const { result } = renderHook(() => useInputHasValue(" ", ref)) expect(result.current).toBe(false) }) - it('updates when value prop changes', () => { + it("updates when value prop changes", () => { const ref = createMockRef() const { result, rerender } = renderHook( ({ value }) => useInputHasValue(value, ref), - { initialProps: { value: '' } } + { initialProps: { value: "" } } ) expect(result.current).toBe(false) - rerender({ value: 'new value' }) + rerender({ value: "new value" }) expect(result.current).toBe(true) }) }) }) -describe('clearInput', () => { +describe("clearInput", () => { beforeEach(() => { vi.restoreAllMocks() }) - it('calls onChange with empty value for controlled input', () => { + it("calls onChange with empty value for controlled input", () => { const onChange = vi.fn() const inputRef = { current: { - value: 'test', + value: "test", focus: vi.fn(), } as unknown as HTMLInputElement, } @@ -58,22 +58,22 @@ describe('clearInput', () => { clearInput({ inputRef, onChange, - value: 'test', + value: "test", }) expect(onChange).toHaveBeenCalledWith( expect.objectContaining({ - target: { value: '' }, + target: { value: "" }, }) ) expect(inputRef.current.focus).toHaveBeenCalled() }) - it('sets input value directly for uncontrolled input', () => { - const input = document.createElement('input') - input.value = 'test' - const focusSpy = vi.spyOn(input, 'focus') - const dispatchSpy = vi.spyOn(input, 'dispatchEvent') + it("sets input value directly for uncontrolled input", () => { + const input = document.createElement("input") + input.value = "test" + const focusSpy = vi.spyOn(input, "focus") + const dispatchSpy = vi.spyOn(input, "dispatchEvent") const inputRef = { current: input } @@ -83,19 +83,19 @@ describe('clearInput', () => { value: undefined, }) - expect(input.value).toBe('') + expect(input.value).toBe("") expect(dispatchSpy).toHaveBeenCalled() expect(focusSpy).toHaveBeenCalled() }) - it('does nothing when ref is null', () => { + it("does nothing when ref is null", () => { const onChange = vi.fn() const inputRef = { current: null } clearInput({ inputRef, onChange, - value: 'test', + value: "test", }) expect(onChange).not.toHaveBeenCalled() diff --git a/packages/design-system/lib/components/Input/utils.ts b/packages/design-system/lib/components/Input/utils.ts index a54605b70..0a240dd3c 100644 --- a/packages/design-system/lib/components/Input/utils.ts +++ b/packages/design-system/lib/components/Input/utils.ts @@ -1,5 +1,5 @@ -import type { ChangeEvent, ChangeEventHandler, RefObject } from 'react' -import { useState, useEffect } from 'react' +import type { ChangeEvent, ChangeEventHandler, RefObject } from "react" +import { useState, useEffect } from "react" interface ClearInputOptions { inputRef: RefObject @@ -26,7 +26,7 @@ export function clearInput({ if (isControlled && onChange) { // For controlled components: call onChange with a synthetic event const syntheticEvent = { - target: { value: '' }, + target: { value: "" }, currentTarget: inputRef.current, } as ChangeEvent onChange(syntheticEvent) @@ -35,24 +35,24 @@ export function clearInput({ // This triggers React's change detection properly const nativeInputValueSetter = Object.getOwnPropertyDescriptor( window.HTMLInputElement.prototype, - 'value' + "value" )?.set if (nativeInputValueSetter) { - nativeInputValueSetter.call(inputRef.current, '') + nativeInputValueSetter.call(inputRef.current, "") } else { - inputRef.current.value = '' + inputRef.current.value = "" } // Dispatch input event to trigger any listeners - const inputEvent = new Event('input', { + const inputEvent = new Event("input", { bubbles: true, cancelable: true, }) inputRef.current.dispatchEvent(inputEvent) // Also dispatch change event - const changeEvent = new Event('change', { + const changeEvent = new Event("change", { bubbles: true, cancelable: true, }) @@ -74,16 +74,16 @@ export function useInputHasValue( const [hasValue, setHasValue] = useState(() => { // For controlled components, check value prop if (value !== undefined) { - return String(value ?? '').trim().length > 0 + return String(value ?? "").trim().length > 0 } // For uncontrolled, check ref - return String(inputRef.current?.value ?? '').trim().length > 0 + return String(inputRef.current?.value ?? "").trim().length > 0 }) // Sync with controlled value changes useEffect(() => { if (value !== undefined) { - setHasValue(String(value ?? '').trim().length > 0) + setHasValue(String(value ?? "").trim().length > 0) } }, [value]) @@ -102,17 +102,17 @@ export function useInputHasValue( setTimeout(() => { const target = (event?.target as HTMLInputElement) || inputRef.current if (target) { - setHasValue((target.value ?? '').trim().length > 0) + setHasValue((target.value ?? "").trim().length > 0) } }, 0) } - input.addEventListener('input', updateHasValue) + input.addEventListener("input", updateHasValue) // Also listen to change event as a fallback - input.addEventListener('change', updateHasValue) + input.addEventListener("change", updateHasValue) return () => { - input.removeEventListener('input', updateHasValue) - input.removeEventListener('change', updateHasValue) + input.removeEventListener("input", updateHasValue) + input.removeEventListener("change", updateHasValue) } }, [value, inputRef]) diff --git a/packages/design-system/lib/components/InputLabel/InputLabel.stories.tsx b/packages/design-system/lib/components/InputLabel/InputLabel.stories.tsx index 3538a2390..87c31c594 100644 --- a/packages/design-system/lib/components/InputLabel/InputLabel.stories.tsx +++ b/packages/design-system/lib/components/InputLabel/InputLabel.stories.tsx @@ -1,9 +1,9 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { InputLabel } from './InputLabel' +import { InputLabel } from "./InputLabel" const meta: Meta = { - title: 'Core Components/InputLabel', + title: "Core Components/InputLabel", component: InputLabel, argTypes: {}, } @@ -14,21 +14,21 @@ type Story = StoryObj export const Default: Story = { args: { - children: 'Label', + children: "Label", required: false, }, } export const Discreet: Story = { args: { - children: 'Label', - size: 'discreet', + children: "Label", + size: "discreet", }, } export const Small: Story = { args: { - children: 'Label', - size: 'small', + children: "Label", + size: "small", }, } diff --git a/packages/design-system/lib/components/InputLabel/InputLabel.tsx b/packages/design-system/lib/components/InputLabel/InputLabel.tsx index ed9f4b3b4..504060010 100644 --- a/packages/design-system/lib/components/InputLabel/InputLabel.tsx +++ b/packages/design-system/lib/components/InputLabel/InputLabel.tsx @@ -1,6 +1,6 @@ -import { inputLabelVariants } from './variants' +import { inputLabelVariants } from "./variants" -import type { InputLabelProps } from './types' +import type { InputLabelProps } from "./types" export function InputLabel({ children, @@ -23,7 +23,7 @@ export function InputLabel({ {children} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} - {required && } + {required && } ) } diff --git a/packages/design-system/lib/components/InputLabel/index.tsx b/packages/design-system/lib/components/InputLabel/index.tsx index 944026214..881b57ec0 100644 --- a/packages/design-system/lib/components/InputLabel/index.tsx +++ b/packages/design-system/lib/components/InputLabel/index.tsx @@ -1 +1 @@ -export { InputLabel } from './InputLabel' +export { InputLabel } from "./InputLabel" diff --git a/packages/design-system/lib/components/InputLabel/inputLabel.module.css b/packages/design-system/lib/components/InputLabel/inputLabel.module.css index bcad08308..500e62ffc 100644 --- a/packages/design-system/lib/components/InputLabel/inputLabel.module.css +++ b/packages/design-system/lib/components/InputLabel/inputLabel.module.css @@ -41,10 +41,10 @@ input:focus ~ .inputLabel, input:placeholder-shown ~ .inputLabel, -input[value]:not([value='']) ~ .inputLabel, +input[value]:not([value=""]) ~ .inputLabel, textarea:focus ~ .inputLabel, textarea:placeholder-shown ~ .inputLabel, -textarea[value]:not([value='']) ~ .inputLabel, +textarea[value]:not([value=""]) ~ .inputLabel, .selected { font-family: var(--Label-Font-family), var(--Label-Font-fallback); font-size: var(--Label-Size); @@ -87,7 +87,7 @@ textarea:disabled ~ .inputLabel { order: unset; } -:global(.select-container)[data-open='true'] .inputLabel:not(.discreet), +:global(.select-container)[data-open="true"] .inputLabel:not(.discreet), :global(.react-aria-SelectValue):has(:nth-child(2)) .inputLabel:not(.discreet) { font-size: 12px; } diff --git a/packages/design-system/lib/components/InputLabel/types.ts b/packages/design-system/lib/components/InputLabel/types.ts index e7f6c15b2..40221ddc8 100644 --- a/packages/design-system/lib/components/InputLabel/types.ts +++ b/packages/design-system/lib/components/InputLabel/types.ts @@ -1,6 +1,6 @@ -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" -import type { inputLabelVariants } from './variants' +import type { inputLabelVariants } from "./variants" export interface InputLabelProps extends diff --git a/packages/design-system/lib/components/InputLabel/variants.ts b/packages/design-system/lib/components/InputLabel/variants.ts index 62d3b749d..cc147b4e1 100644 --- a/packages/design-system/lib/components/InputLabel/variants.ts +++ b/packages/design-system/lib/components/InputLabel/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './inputLabel.module.css' +import styles from "./inputLabel.module.css" export const inputLabelVariants = cva(styles.inputLabel, { variants: { @@ -20,7 +20,7 @@ export const inputLabelVariants = cva(styles.inputLabel, { }, }, defaultVariants: { - size: 'regular', + size: "regular", required: false, }, }) diff --git a/packages/design-system/lib/components/JsonToHtml/JsonToHtml.stories.tsx b/packages/design-system/lib/components/JsonToHtml/JsonToHtml.stories.tsx index 76b35f80c..65e06dc4b 100644 --- a/packages/design-system/lib/components/JsonToHtml/JsonToHtml.stories.tsx +++ b/packages/design-system/lib/components/JsonToHtml/JsonToHtml.stories.tsx @@ -1,11 +1,11 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { expect } from 'storybook/test' -import { JsonToHtml } from './JsonToHtml' -import { RTETypeEnum } from './types/rte/enums' -import { RTEImageVaultNode, RTENode } from './types/rte/node' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { expect } from "storybook/test" +import { JsonToHtml } from "./JsonToHtml" +import { RTETypeEnum } from "./types/rte/enums" +import { RTEImageVaultNode, RTENode } from "./types/rte/node" const meta: Meta = { - title: 'Core Components/JsonToHtml', + title: "Core Components/JsonToHtml", component: JsonToHtml, } @@ -15,80 +15,80 @@ type Story = StoryObj const headings: RTENode[] = [ { - uid: 'heading-1', + uid: "heading-1", type: RTETypeEnum.h1, - attrs: { type: 'entry' }, - children: [{ text: 'Heading 1' }], + attrs: { type: "entry" }, + children: [{ text: "Heading 1" }], }, { - uid: 'heading-2', + uid: "heading-2", type: RTETypeEnum.h2, - attrs: { type: 'entry' }, - children: [{ text: 'Heading 2' }], + attrs: { type: "entry" }, + children: [{ text: "Heading 2" }], }, { - uid: 'heading-3', + uid: "heading-3", type: RTETypeEnum.h3, - attrs: { type: 'entry' }, - children: [{ text: 'Heading 3' }], + attrs: { type: "entry" }, + children: [{ text: "Heading 3" }], }, { - uid: 'heading-4', + uid: "heading-4", type: RTETypeEnum.h4, - attrs: { type: 'entry' }, - children: [{ text: 'Heading 4' }], + attrs: { type: "entry" }, + children: [{ text: "Heading 4" }], }, ] const paragraph: RTENode = { - uid: 'paragraph', - attrs: { type: 'asset' }, + uid: "paragraph", + attrs: { type: "asset" }, type: RTETypeEnum.p, children: [ - { text: 'This paragraph has ' }, - { text: 'bold', bold: true }, - { text: ' and ' }, - { text: 'italic', italic: true }, - { text: ' text, plus an inline ' }, + { text: "This paragraph has " }, + { text: "bold", bold: true }, + { text: " and " }, + { text: "italic", italic: true }, + { text: " text, plus an inline " }, { type: RTETypeEnum.a, - attrs: { type: 'asset', url: 'https://example.com' }, - uid: 'link-1', - children: [{ text: 'link' }], + attrs: { type: "asset", url: "https://example.com" }, + uid: "link-1", + children: [{ text: "link" }], }, - { text: '.' }, + { text: "." }, ], } const list: RTENode = { type: RTETypeEnum.ul, - attrs: { type: 'asset' }, - uid: 'list-1', + attrs: { type: "asset" }, + uid: "list-1", children: [ { type: RTETypeEnum.li, - uid: 'list-item-1', - attrs: { type: 'asset' }, - children: [{ text: 'First item' }], + uid: "list-item-1", + attrs: { type: "asset" }, + children: [{ text: "First item" }], }, { type: RTETypeEnum.li, - uid: 'list-item-2', - attrs: { type: 'asset' }, - children: [{ text: 'Second item' }], + uid: "list-item-2", + attrs: { type: "asset" }, + children: [{ text: "Second item" }], }, { type: RTETypeEnum.li, - uid: 'list-item-3', - attrs: { type: 'asset' }, - children: [{ text: 'Third item' }], + uid: "list-item-3", + attrs: { type: "asset" }, + children: [{ text: "Third item" }], }, ], } const code: RTENode = { type: RTETypeEnum.code, - uid: 'code', - attrs: { type: 'asset' }, + uid: "code", + attrs: { type: "asset" }, children: [ { text: `function greet(name: string) { @@ -100,50 +100,50 @@ const code: RTENode = { const blockquote: RTENode = { type: RTETypeEnum.blockquote, - uid: 'blockqoute', - attrs: { type: 'asset' }, - children: [{ text: 'Simplicity is the soul of efficiency.' }], + uid: "blockqoute", + attrs: { type: "asset" }, + children: [{ text: "Simplicity is the soul of efficiency." }], } const horizontalRule: RTENode = { type: RTETypeEnum.hr, - uid: 'horizontal-rule', - attrs: { type: 'entry' }, + uid: "horizontal-rule", + attrs: { type: "entry" }, children: [], } const table: RTENode = { type: RTETypeEnum.table, - uid: 'table', - attrs: { type: 'asset' }, + uid: "table", + attrs: { type: "asset" }, children: [ { type: RTETypeEnum.thead, - uid: 'table-header', - attrs: { type: 'asset' }, + uid: "table-header", + attrs: { type: "asset" }, children: [ { type: RTETypeEnum.tr, - uid: 'table-header-row-1', - attrs: { type: 'asset' }, + uid: "table-header-row-1", + attrs: { type: "asset" }, children: [ { type: RTETypeEnum.th, - uid: 'table-head-1', - attrs: { type: 'asset' }, - children: [{ text: 'Head 1' }], + uid: "table-head-1", + attrs: { type: "asset" }, + children: [{ text: "Head 1" }], }, { type: RTETypeEnum.th, - uid: 'table-head-2', - attrs: { type: 'asset' }, - children: [{ text: 'Head 2' }], + uid: "table-head-2", + attrs: { type: "asset" }, + children: [{ text: "Head 2" }], }, { type: RTETypeEnum.th, - uid: 'table-head-3', - attrs: { type: 'asset' }, - children: [{ text: 'Head 3' }], + uid: "table-head-3", + attrs: { type: "asset" }, + children: [{ text: "Head 3" }], }, ], }, @@ -151,31 +151,31 @@ const table: RTENode = { }, { type: RTETypeEnum.tbody, - uid: 'table-body', - attrs: { type: 'asset' }, + uid: "table-body", + attrs: { type: "asset" }, children: [ { type: RTETypeEnum.tr, - uid: 'table-row-1', - attrs: { type: 'asset' }, + uid: "table-row-1", + attrs: { type: "asset" }, children: [ { type: RTETypeEnum.td, - uid: 'table-cell-1', - attrs: { type: 'asset' }, - children: [{ text: 'Cell 1' }], + uid: "table-cell-1", + attrs: { type: "asset" }, + children: [{ text: "Cell 1" }], }, { type: RTETypeEnum.td, - uid: 'table-cell-2', - attrs: { type: 'asset' }, - children: [{ text: 'Cell 2' }], + uid: "table-cell-2", + attrs: { type: "asset" }, + children: [{ text: "Cell 2" }], }, { type: RTETypeEnum.td, - uid: 'table-cell-3', - attrs: { type: 'asset' }, - children: [{ text: 'Cell 3' }], + uid: "table-cell-3", + attrs: { type: "asset" }, + children: [{ text: "Cell 3" }], }, ], }, @@ -186,17 +186,17 @@ const table: RTENode = { const image: RTEImageVaultNode = { type: RTETypeEnum.ImageVault, - uid: 'image', + uid: "image", attrs: { - type: 'entry', - url: 'https://imagevault.scandichotels.com/publishedmedia/77obkq3g4harjm8wyua9/Scandic_Family_Breakfast_2.jpg', - height: '200px', - width: '200px', - fileName: 'Scandic_Family_Breakfast_2.jpg', + type: "entry", + url: "https://imagevault.scandichotels.com/publishedmedia/77obkq3g4harjm8wyua9/Scandic_Family_Breakfast_2.jpg", + height: "200px", + width: "200px", + fileName: "Scandic_Family_Breakfast_2.jpg", imageVaultId: 1, - title: 'Image Title', + title: "Image Title", dimensions: { width: 200, height: 200, aspectRatio: 1.5 }, - meta: { alt: 'Image Alt', caption: 'Image Caption' }, + meta: { alt: "Image Alt", caption: "Image Caption" }, focalPoint: { x: 50, y: 50 }, }, children: [], @@ -206,11 +206,11 @@ export const Example: Story = { args: { nodes: [ { - uid: 'paragraph', - attrs: { type: 'asset' }, + uid: "paragraph", + attrs: { type: "asset" }, type: RTETypeEnum.p, children: [ - { text: 'This is a kitchen sink of all Rich Text Editor to HTML' }, + { text: "This is a kitchen sink of all Rich Text Editor to HTML" }, ], }, ...headings, @@ -232,19 +232,19 @@ export const Headings: Story = { }, play: async ({ canvas }) => { expect( - await canvas.findByRole('heading', { name: 'Heading 1' }) + await canvas.findByRole("heading", { name: "Heading 1" }) ).toBeInTheDocument() expect( - await canvas.findByRole('heading', { name: 'Heading 2' }) + await canvas.findByRole("heading", { name: "Heading 2" }) ).toBeInTheDocument() expect( - await canvas.findByRole('heading', { name: 'Heading 3' }) + await canvas.findByRole("heading", { name: "Heading 3" }) ).toBeInTheDocument() expect( - await canvas.findByRole('heading', { name: 'Heading 4' }) + await canvas.findByRole("heading", { name: "Heading 4" }) ).toBeInTheDocument() }, } diff --git a/packages/design-system/lib/components/JsonToHtml/JsonToHtml.tsx b/packages/design-system/lib/components/JsonToHtml/JsonToHtml.tsx index 5bd5575e5..91fb27179 100644 --- a/packages/design-system/lib/components/JsonToHtml/JsonToHtml.tsx +++ b/packages/design-system/lib/components/JsonToHtml/JsonToHtml.tsx @@ -1,13 +1,13 @@ -import { cx } from 'class-variance-authority' +import { cx } from "class-variance-authority" -import { nodesToHtml } from './utils' +import { nodesToHtml } from "./utils" -import styles from './jsontohtml.module.css' +import styles from "./jsontohtml.module.css" -import { ImageVaultAsset } from '@scandic-hotels/common/utils/imageVault' -import { ContentBlockType } from './types/rte/enums' -import type { RTENode } from './types/rte/node' -import type { RenderOptions } from './types/rte/option' +import { ImageVaultAsset } from "@scandic-hotels/common/utils/imageVault" +import { ContentBlockType } from "./types/rte/enums" +import type { RTENode } from "./types/rte/node" +import type { RenderOptions } from "./types/rte/option" export type Node = { node: T @@ -15,13 +15,13 @@ export type Node = { export type Embeds = | { - __typename: Exclude + __typename: Exclude system?: { uid: string } | undefined | null url?: string | undefined | null title?: string | undefined | null } | { - __typename: 'ImageContainer' + __typename: "ImageContainer" system?: { uid: string } | null url?: string | null title?: string | null diff --git a/packages/design-system/lib/components/JsonToHtml/jsontohtml.module.css b/packages/design-system/lib/components/JsonToHtml/jsontohtml.module.css index c08bbdd4c..9a05cd982 100644 --- a/packages/design-system/lib/components/JsonToHtml/jsontohtml.module.css +++ b/packages/design-system/lib/components/JsonToHtml/jsontohtml.module.css @@ -83,7 +83,7 @@ gap: var(--Space-x1); &::before { - content: ''; + content: ""; position: relative; top: 3px; width: 16px; @@ -98,13 +98,13 @@ .check > .li::before, .li:has(.check)::before { - mask-image: url('/_static/icons/check_circle.svg'); + mask-image: url("/_static/icons/check_circle.svg"); background-color: var(--Icon-Interactive-Default); } .heart > .li::before, .li:has(.heart)::before { - mask-image: url('/_static/shared/icons/heart.svg'); + mask-image: url("/_static/shared/icons/heart.svg"); } .li > * { diff --git a/packages/design-system/lib/components/JsonToHtml/renderOptions.tsx b/packages/design-system/lib/components/JsonToHtml/renderOptions.tsx index 004280f01..9818f9490 100644 --- a/packages/design-system/lib/components/JsonToHtml/renderOptions.tsx +++ b/packages/design-system/lib/components/JsonToHtml/renderOptions.tsx @@ -1,33 +1,33 @@ -import { cx } from 'class-variance-authority' +import { cx } from "class-variance-authority" -import { Divider } from '../Divider' -import { MaterialIcon } from '../Icons/MaterialIcon' -import Image from '../Image' -import ImageContainer from '../ImageContainer' -import Table from '../Table' -import { Typography } from '../Typography' +import { Divider } from "../Divider" +import { MaterialIcon } from "../Icons/MaterialIcon" +import Image from "../Image" +import ImageContainer from "../ImageContainer" +import Table from "../Table" +import { Typography } from "../Typography" import { extractAvailableListClassNames, hasAvailableParagraphFormat, -} from './utils' +} from "./utils" -import styles from './jsontohtml.module.css' +import styles from "./jsontohtml.module.css" import { DeprecatedImageVaultAssetResponse, ImageVaultAssetResponse, mapImageVaultAssetResponseToImageVaultAsset, mapInsertResponseToImageVaultAsset, -} from '@scandic-hotels/common/utils/imageVault' -import { TextLink } from '../TextLink' -import type { EmbedByUid } from './JsonToHtml' -import type { Attributes } from './types/rte/attrs' +} from "@scandic-hotels/common/utils/imageVault" +import { TextLink } from "../TextLink" +import type { EmbedByUid } from "./JsonToHtml" +import type { Attributes } from "./types/rte/attrs" import { AvailableParagraphFormatEnum, RTEItemTypeEnum, RTETypeEnum, -} from './types/rte/enums' +} from "./types/rte/enums" import { type RTEDefaultNode, type RTEImageNode, @@ -36,11 +36,11 @@ import { type RTENode, type RTERegularNode, type RTETextNode, -} from './types/rte/node' -import type { RenderOptions } from './types/rte/option' +} from "./types/rte/node" +import type { RenderOptions } from "./types/rte/option" function noNestedLinksOrReferences(node: RTENode) { - if ('type' in node) { + if ("type" in node) { if (node.type === RTETypeEnum.reference) { return node.children } else if (node.type === RTETypeEnum.a) { @@ -60,17 +60,17 @@ function extractPossibleAttributes(attrs: Attributes | undefined) { props.id = attrs.id } - if (attrs.class && typeof attrs.class === 'string') { + if (attrs.class && typeof attrs.class === "string") { props.className = attrs.class - } else if (attrs['class-name']) { - props.className = attrs['class-name'] - } else if (attrs.classname && typeof attrs.classname === 'string') { + } else if (attrs["class-name"]) { + props.className = attrs["class-name"] + } else if (attrs.classname && typeof attrs.classname === "string") { props.className = attrs.classname } - if (attrs.style?.['text-align']) { + if (attrs.style?.["text-align"]) { props.style = { - textAlign: attrs.style['text-align'] as React.CSSProperties['textAlign'], + textAlign: attrs.style["text-align"] as React.CSSProperties["textAlign"], } } @@ -94,9 +94,9 @@ export const renderOptions: RenderOptions = { key={node.uid} className={className} {...props} - href={typeof node.attrs.url === 'string' ? node.attrs.url : ''} + href={typeof node.attrs.url === "string" ? node.attrs.url : ""} target={ - typeof node.attrs.target === 'string' ? node.attrs.target : '_blank' + typeof node.attrs.target === "string" ? node.attrs.target : "_blank" } isInline > @@ -310,9 +310,9 @@ export const renderOptions: RenderOptions = { // Determine whether to use a div or p based on children. // Some children use div or sections as wrappers and these are // not allowed inside p tags. - const Elem = node.children.some((child) => 'children' in child) - ? 'div' - : 'p' + const Elem = node.children.some((child) => "children" in child) + ? "div" + : "p" return ( @@ -374,17 +374,17 @@ export const renderOptions: RenderOptions = { next: RTENext, fullRenderOptions: RenderOptions ) => { - if (!('attrs' in node)) { + if (!("attrs" in node)) { return null } const type = node.attrs.type if (type === RTEItemTypeEnum.asset) { const imageTypeRegex = /^image\// - const isImage = imageTypeRegex.test(node.attrs['asset-type'] as string) + const isImage = imageTypeRegex.test(node.attrs["asset-type"] as string) if (isImage) { - const image = embeds?.[node?.attrs?.['asset-uid'] as string] - if (image?.node.__typename === 'SysAsset') { + const image = embeds?.[node?.attrs?.["asset-uid"] as string] + if (image?.node.__typename === "SysAsset") { if (image.node.url) { const alt = image?.node?.title ?? node.attrs.alt const { className, ...props } = extractPossibleAttributes( @@ -404,7 +404,7 @@ export const renderOptions: RenderOptions = { ) } } - } else if (node.attrs['display-type'] === 'link' && node.attrs.href) { + } else if (node.attrs["display-type"] === "link" && node.attrs.href) { const { className, ...props } = extractPossibleAttributes(node.attrs) return ( { const type = node.type - if (!('attrs' in node) || type !== RTETypeEnum.ImageVault) { + if (!("attrs" in node) || type !== RTETypeEnum.ImageVault) { return null } let image = undefined - if ('imageVaultId' in node.attrs && 'fileName' in node.attrs) { + if ("imageVaultId" in node.attrs && "fileName" in node.attrs) { image = mapImageVaultAssetResponseToImageVaultAsset( node.attrs as unknown as ImageVaultAssetResponse ) } - if ('Name' in node.attrs && 'Id' in node.attrs) { + if ("Name" in node.attrs && "Id" in node.attrs) { image = mapInsertResponseToImageVaultAsset( node.attrs as unknown as DeprecatedImageVaultAssetResponse ) @@ -765,7 +765,7 @@ export const renderOptions: RenderOptions = { ) } - if (className === AvailableParagraphFormatEnum['script-1']) { + if (className === AvailableParagraphFormatEnum["script-1"]) { return (

@@ -775,7 +775,7 @@ export const renderOptions: RenderOptions = { ) } - if (className === AvailableParagraphFormatEnum['script-2']) { + if (className === AvailableParagraphFormatEnum["script-2"]) { return (

@@ -785,7 +785,7 @@ export const renderOptions: RenderOptions = { ) } - if (className === AvailableParagraphFormatEnum['subtitle-1']) { + if (className === AvailableParagraphFormatEnum["subtitle-1"]) { return (

@@ -794,7 +794,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 index 306b5661e..c0e1514e4 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/attrs.ts @@ -1,23 +1,23 @@ -import type { Lang } from '@scandic-hotels/common/constants/language' +import type { Lang } from "@scandic-hotels/common/constants/language" -import type { EmbedTypesEnum, RTEItemType, RTEItemTypeEnum } from './enums' +import type { EmbedTypesEnum, RTEItemType, RTEItemTypeEnum } from "./enums" export interface Attributes { [key: string]: unknown - 'class-name'?: string + "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' + "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 } @@ -28,13 +28,13 @@ export interface RTEAnchorAttrs extends Attributes { } export interface RTELinkAttrs extends Attributes { - 'display-type': EmbedTypesEnum.link - 'class-name': string - 'content-type-uid': string - 'entry-uid': string + "display-type": EmbedTypesEnum.link + "class-name": string + "content-type-uid": string + "entry-uid": string locale: Lang href: string - target: HTMLAnchorElement['target'] + target: HTMLAnchorElement["target"] type: RTEItemTypeEnum.entry } diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/constants.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/constants.ts index 591a809df..005d0f953 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/constants.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/constants.ts @@ -1,6 +1,6 @@ export const AVAILABLE_LIST_FORMATS = [ - 'heart', - 'check', - 'two-column', - 'two-columns', + "heart", + "check", + "two-column", + "two-columns", ] diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts index b868f7374..e4eaea493 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/enums.ts @@ -1,80 +1,80 @@ export enum EmbedTypesEnum { - block = 'block', - display = 'display', - download = 'download', - inline = 'inline', - link = 'link', + 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', + 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', + 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', + 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', + "script-1" = "script-1", + "script-2" = "script-2", + "footnote" = "footnote", + "caption" = "caption", + "subtitle-1" = "subtitle-1", + "subtitle-2" = "subtitle-2", } export type ContentBlockType = - | 'AccountPage' - | 'CampaignOverviewPage' - | 'CampaignPage' - | 'CollectionPage' - | 'ContentPage' - | 'DestinationCityPage' - | 'DestinationCountryPage' - | 'DestinationOverviewPage' - | 'HotelPage' - | 'ImageContainer' - | 'LoyaltyPage' - | 'StartPage' - | 'SysAsset' - | 'PromoCampaignPage' + | "AccountPage" + | "CampaignOverviewPage" + | "CampaignPage" + | "CollectionPage" + | "ContentPage" + | "DestinationCityPage" + | "DestinationCountryPage" + | "DestinationOverviewPage" + | "HotelPage" + | "ImageContainer" + | "LoyaltyPage" + | "StartPage" + | "SysAsset" + | "PromoCampaignPage" diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts index 6b43fddd2..c73b01b21 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/node.ts @@ -1,18 +1,18 @@ -import type { JSX } from 'react' +import type { JSX } from "react" import { DeprecatedImageVaultAssetResponse, ImageVaultAssetResponse, -} from '@scandic-hotels/common/utils/imageVault' -import type { EmbedByUid } from '../../JsonToHtml' +} from "@scandic-hotels/common/utils/imageVault" +import type { EmbedByUid } from "../../JsonToHtml" import type { Attributes, RTEAnchorAttrs, RTEAssetAttrs, RTELinkAttrs, -} from './attrs' -import type { RTETypeEnum } from './enums' -import type { RenderOptions } from './option' +} from "./attrs" +import type { RTETypeEnum } from "./enums" +import type { RenderOptions } from "./option" export interface RTEDefaultNode { attrs: Attributes @@ -48,15 +48,15 @@ export interface RTEImageVaultNode extends RTEDefaultNode { } export enum RTEMarkType { - bold = 'bold', - break = 'break', - classnameOrId = 'classnameOrId', - inlineCode = 'inlineCode', - italic = 'italic', - strikethrough = 'strikethrough', - subscript = 'subscript', - superscript = 'superscript', - underline = 'underline', + bold = "bold", + break = "break", + classnameOrId = "classnameOrId", + inlineCode = "inlineCode", + italic = "italic", + strikethrough = "strikethrough", + subscript = "subscript", + superscript = "superscript", + underline = "underline", } type RTETextNodeOptionalKeys = { diff --git a/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts b/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts index 8fd2a4278..126a5aeec 100644 --- a/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts +++ b/packages/design-system/lib/components/JsonToHtml/types/rte/option.ts @@ -1,4 +1,4 @@ -import type { RTERenderMark, RTERenderOptionComponent } from './node' +import type { RTERenderMark, RTERenderOptionComponent } from "./node" export type RenderOptions = { [type: string]: RTERenderOptionComponent | RTERenderMark diff --git a/packages/design-system/lib/components/JsonToHtml/utils.tsx b/packages/design-system/lib/components/JsonToHtml/utils.tsx index 48910bf3b..2983f106f 100644 --- a/packages/design-system/lib/components/JsonToHtml/utils.tsx +++ b/packages/design-system/lib/components/JsonToHtml/utils.tsx @@ -1,26 +1,26 @@ -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 { Embeds, Node } from './JsonToHtml' +import type { Embeds, Node } from "./JsonToHtml" -import { EmbedByUid } from './JsonToHtml' -import { AVAILABLE_LIST_FORMATS } from './types/rte/constants' -import { AvailableParagraphFormatEnum, RTETypeEnum } from './types/rte/enums' +import { EmbedByUid } from "./JsonToHtml" +import { AVAILABLE_LIST_FORMATS } from "./types/rte/constants" +import { AvailableParagraphFormatEnum, RTETypeEnum } from "./types/rte/enums" import { RTEMarkType, type RTENode, type RTERenderMark, type RTERenderOptionComponent, type RTETextNode, -} from './types/rte/node' -import type { RenderOptions } from './types/rte/option' +} from "./types/rte/node" +import type { RenderOptions } from "./types/rte/option" export function groupEmbedsByUid(embedsArray: Node[]) { const embedsByUid = embedsArray.reduce((acc, embed) => { - if ('system' in embed.node && embed.node.system?.uid) { + if ("system" in embed.node && embed.node.system?.uid) { acc[embed.node.system.uid] = embed } return acc @@ -110,7 +110,7 @@ export function extractAvailableListClassNames(className?: string) { if (!className) { return [] } - const classNames = className.split(' ') + const classNames = className.split(" ") return classNames .filter((name) => AVAILABLE_LIST_FORMATS.includes(name)) .map((item) => styles[item] || item) @@ -121,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 @@ -138,7 +138,7 @@ export function nodeToHtml( } function getUniqueId(node: RTENode) { - if ('uid' in node) { + if ("uid" in node) { return node.uid } return node.id diff --git a/packages/design-system/lib/components/Lightbox/FullView/index.tsx b/packages/design-system/lib/components/Lightbox/FullView/index.tsx index 310f66af2..2589c4cd3 100644 --- a/packages/design-system/lib/components/Lightbox/FullView/index.tsx +++ b/packages/design-system/lib/components/Lightbox/FullView/index.tsx @@ -1,16 +1,16 @@ -'use client' +"use client" -import { AnimatePresence, motion } from 'motion/react' -import { useEffect, useState } from 'react' -import { useIntl } from 'react-intl' +import { AnimatePresence, motion } from "motion/react" +import { useEffect, useState } from "react" +import { useIntl } from "react-intl" -import Image from '../../Image' +import Image from "../../Image" -import { IconButton } from '../../IconButton' -import { Typography } from '../../Typography' +import { IconButton } from "../../IconButton" +import { Typography } from "../../Typography" -import { LightboxImage } from '../index' -import styles from './fullView.module.css' +import { LightboxImage } from "../index" +import styles from "./fullView.module.css" type FullViewProps = { image: LightboxImage @@ -56,18 +56,18 @@ export default function FullView({ } const handleKeyDown = (e: KeyboardEvent) => { - if (e.key === 'ArrowLeft') { + if (e.key === "ArrowLeft") { handlePrev() - } else if (e.key === 'ArrowRight') { + } else if (e.key === "ArrowRight") { handleNext() } } useEffect(() => { - window.addEventListener('keydown', handleKeyDown) + window.addEventListener("keydown", handleKeyDown) return () => { - window.removeEventListener('keydown', handleKeyDown) + window.removeEventListener("keydown", handleKeyDown) } }) @@ -90,8 +90,8 @@ export default function FullView({ className={styles.closeButton} onPress={onClose} aria-label={intl.formatMessage({ - id: 'common.close', - defaultMessage: 'Close', + id: "common.close", + defaultMessage: "Close", })} iconName="close" /> diff --git a/packages/design-system/lib/components/Lightbox/Gallery/index.tsx b/packages/design-system/lib/components/Lightbox/Gallery/index.tsx index d065c6dea..2b688fd56 100644 --- a/packages/design-system/lib/components/Lightbox/Gallery/index.tsx +++ b/packages/design-system/lib/components/Lightbox/Gallery/index.tsx @@ -1,18 +1,18 @@ -'use client' -import { AnimatePresence, motion } from 'motion/react' -import { useEffect, useState } from 'react' -import { Button as ButtonRAC } from 'react-aria-components' -import { useIntl } from 'react-intl' +"use client" +import { AnimatePresence, motion } from "motion/react" +import { useEffect, useState } from "react" +import { Button as ButtonRAC } from "react-aria-components" +import { useIntl } from "react-intl" -import { IconButton } from '../../IconButton' -import { Typography } from '../../Typography' +import { IconButton } from "../../IconButton" +import { Typography } from "../../Typography" -import Image from '../../Image' +import Image from "../../Image" -import { cx } from 'class-variance-authority' -import { useMediaQuery } from 'usehooks-ts' -import { LightboxImage } from '..' -import styles from './gallery.module.css' +import { cx } from "class-variance-authority" +import { useMediaQuery } from "usehooks-ts" +import { LightboxImage } from ".." +import styles from "./gallery.module.css" type GalleryProps = { images: LightboxImage[] @@ -35,7 +35,7 @@ export default function Gallery({ const [animateLeft, setAnimateLeft] = useState(true) const mainImage = selectedImage || images[0] const mainImageIndex = images.findIndex((img) => img === mainImage) - const isMobile = useMediaQuery('(max-width: 767px)') + const isMobile = useMediaQuery("(max-width: 767px)") function getThumbImages() { const thumbs = [] @@ -59,18 +59,18 @@ export default function Gallery({ } const handleKeyDown = (e: KeyboardEvent) => { - if (e.key === 'ArrowLeft') { + if (e.key === "ArrowLeft") { handlePrev() - } else if (e.key === 'ArrowRight') { + } else if (e.key === "ArrowRight") { handleNext() } } useEffect(() => { - window.addEventListener('keydown', handleKeyDown) + window.addEventListener("keydown", handleKeyDown) return () => { - window.removeEventListener('keydown', handleKeyDown) + window.removeEventListener("keydown", handleKeyDown) } }) @@ -94,10 +94,10 @@ export default function Gallery({ className={styles.closeButton} onPress={onClose} aria-label={intl.formatMessage({ - id: 'common.close', - defaultMessage: 'Close', + id: "common.close", + defaultMessage: "Close", })} - iconName={isMobile ? 'chevron_left' : 'close'} + iconName={isMobile ? "chevron_left" : "close"} /> {/* Desktop Gallery */} @@ -130,8 +130,8 @@ export default function Gallery({ onClick={onImageClick} tabIndex={0} aria-label={intl.formatMessage({ - id: 'lightbox.openImage', - defaultMessage: 'Open image', + id: "lightbox.openImage", + defaultMessage: "Open image", })} role="button" /> @@ -142,8 +142,8 @@ export default function Gallery({ className={cx(styles.navigationButton, styles.previous)} onPress={handlePrev} aria-label={intl.formatMessage({ - id: 'lightbox.previousImage', - defaultMessage: 'Previous image', + id: "lightbox.previousImage", + defaultMessage: "Previous image", })} iconName="arrow_back" /> @@ -152,8 +152,8 @@ export default function Gallery({ className={cx(styles.navigationButton, styles.next)} onPress={handleNext} aria-label={intl.formatMessage({ - id: 'lightbox.nextImage', - defaultMessage: 'Next image', + id: "lightbox.nextImage", + defaultMessage: "Next image", })} iconName="arrow_forward" /> @@ -173,8 +173,8 @@ export default function Gallery({ className={styles.imageButton} onPress={() => onSelectImage(image)} aria-label={intl.formatMessage({ - id: 'lightbox.openImage', - defaultMessage: 'Open image', + id: "lightbox.openImage", + defaultMessage: "Open image", })} > ( { onSelectImage(image) diff --git a/packages/design-system/lib/components/Lightbox/index.tsx b/packages/design-system/lib/components/Lightbox/index.tsx index fa095a823..93f31cca5 100644 --- a/packages/design-system/lib/components/Lightbox/index.tsx +++ b/packages/design-system/lib/components/Lightbox/index.tsx @@ -1,14 +1,14 @@ -'use client' -import { AnimatePresence, motion } from 'motion/react' -import { useEffect, useState } from 'react' -import { Dialog, Modal, ModalOverlay } from 'react-aria-components' +"use client" +import { AnimatePresence, motion } from "motion/react" +import { useEffect, useState } from "react" +import { Dialog, Modal, ModalOverlay } from "react-aria-components" -import usePopStateHandler from '@scandic-hotels/common/hooks/usePopStateHandler' +import usePopStateHandler from "@scandic-hotels/common/hooks/usePopStateHandler" -import FullView from './FullView' -import Gallery from './Gallery' +import FullView from "./FullView" +import Gallery from "./Gallery" -import styles from './lightbox.module.css' +import styles from "./lightbox.module.css" export type LightboxImage = { src: string @@ -49,7 +49,7 @@ export default function Lightbox({ useEffect(() => { if (isOpen) { - window.history.pushState(null, '', window.location.href) + window.history.pushState(null, "", window.location.href) } }, [isOpen]) @@ -81,7 +81,7 @@ export default function Lightbox({ className={`${styles.content} ${ isFullView ? styles.fullViewContent : styles.galleryContent }`} - initial={{ opacity: 0, scale: 0.95, x: '-50%', y: '-50%' }} + initial={{ opacity: 0, scale: 0.95, x: "-50%", y: "-50%" }} animate={{ opacity: 1, scale: 1 }} exit={{ opacity: 0, scale: 0.95 }} transition={{ duration: 0.2 }} diff --git a/packages/design-system/lib/components/LinkList/LinkList.stories.tsx b/packages/design-system/lib/components/LinkList/LinkList.stories.tsx index 7fb646bd3..324917305 100644 --- a/packages/design-system/lib/components/LinkList/LinkList.stories.tsx +++ b/packages/design-system/lib/components/LinkList/LinkList.stories.tsx @@ -1,10 +1,10 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { LinkList } from './index' -import { IconName } from '../Icons/iconName' -import type { LinkListItemProps } from './LinkListItem' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { LinkList } from "./index" +import { IconName } from "../Icons/iconName" +import type { LinkListItemProps } from "./LinkListItem" const meta: Meta = { - title: 'Core Components/LinkList/LinkList', + title: "Core Components/LinkList/LinkList", component: LinkList, argTypes: {}, } @@ -15,30 +15,30 @@ type Story = StoryObj const illustrationItems = [ { - text: 'First Link Item', + text: "First Link Item", isExternal: false, illustration: { - illustration: 'Granola' as IconName, - size: 'medium', + illustration: "Granola" as IconName, + size: "medium", }, } as LinkListItemProps, { - text: 'Second Link Item', + text: "Second Link Item", isExternal: true, illustration: { - illustration: 'Coin' as IconName, - size: 'small', + illustration: "Coin" as IconName, + size: "small", }, } as LinkListItemProps, ] const textItems = [ { - text: 'First Link Item', + text: "First Link Item", isExternal: false, } as LinkListItemProps, { - text: 'Second Link Item', + text: "Second Link Item", isExternal: true, } as LinkListItemProps, ] diff --git a/packages/design-system/lib/components/LinkList/LinkListItem/IllustrationIcon/index.tsx b/packages/design-system/lib/components/LinkList/LinkListItem/IllustrationIcon/index.tsx index 84d8b4c8a..5f8c806c6 100644 --- a/packages/design-system/lib/components/LinkList/LinkListItem/IllustrationIcon/index.tsx +++ b/packages/design-system/lib/components/LinkList/LinkListItem/IllustrationIcon/index.tsx @@ -1,11 +1,11 @@ -import { IconProps, LogoAndIllustrationProps } from '../../../Icons' -import { IconName } from '../../../Icons/iconName' -import { IllustrationByIconName } from '../../../Icons/IllustrationByIconName' -import { FC } from 'react' +import { IconProps, LogoAndIllustrationProps } from "../../../Icons" +import { IconName } from "../../../Icons/iconName" +import { IllustrationByIconName } from "../../../Icons/IllustrationByIconName" +import { FC } from "react" export interface IllustrationIconProps extends LogoAndIllustrationProps { illustration: IconName - size?: 'small' | 'medium' | 'large' + size?: "small" | "medium" | "large" } function mapIllustrationToIcon(illustration: IconName): FC | null { @@ -21,7 +21,7 @@ const sizeMap = { export function IllustrationIcon({ illustration, - size = 'large', + size = "large", ...props }: IllustrationIconProps) { const IllustrationComponent = mapIllustrationToIcon(illustration) diff --git a/packages/design-system/lib/components/LinkList/LinkListItem/LinkListItem.stories.tsx b/packages/design-system/lib/components/LinkList/LinkListItem/LinkListItem.stories.tsx index 675121ad2..e63e1ce3a 100644 --- a/packages/design-system/lib/components/LinkList/LinkListItem/LinkListItem.stories.tsx +++ b/packages/design-system/lib/components/LinkList/LinkListItem/LinkListItem.stories.tsx @@ -1,13 +1,13 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { LinkListItem } from './index' -import { IconName } from '../../Icons/iconName' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { LinkListItem } from "./index" +import { IconName } from "../../Icons/iconName" const meta: Meta = { - title: 'Core Components/LinkList/LinkListItem', + title: "Core Components/LinkList/LinkListItem", component: LinkListItem, argTypes: { isExternal: { - control: { type: 'boolean' }, + control: { type: "boolean" }, }, }, } @@ -18,24 +18,24 @@ type Story = StoryObj export const Default: Story = { args: { - text: 'Link Item', + text: "Link Item", }, } export const IllustrationItem: Story = { args: { - text: 'Link Item', + text: "Link Item", isExternal: false, illustration: { - illustration: 'Granola' as IconName, - size: 'medium', + illustration: "Granola" as IconName, + size: "medium", }, }, } export const TextOnlyItem: Story = { args: { - text: 'Link Item', + text: "Link Item", isExternal: true, }, } diff --git a/packages/design-system/lib/components/LinkList/LinkListItem/index.tsx b/packages/design-system/lib/components/LinkList/LinkListItem/index.tsx index c23476899..f14f31eef 100644 --- a/packages/design-system/lib/components/LinkList/LinkListItem/index.tsx +++ b/packages/design-system/lib/components/LinkList/LinkListItem/index.tsx @@ -1,14 +1,14 @@ -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { Typography } from '../../Typography' +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { Typography } from "../../Typography" -import styles from './linkListItem.module.css' +import styles from "./linkListItem.module.css" import { IllustrationIcon, IllustrationIconProps, -} from '../LinkListItem/IllustrationIcon' +} from "../LinkListItem/IllustrationIcon" -import { cx } from 'class-variance-authority' -import { Link } from 'react-aria-components' +import { cx } from "class-variance-authority" +import { Link } from "react-aria-components" export interface LinkListItemProps { text: string @@ -50,7 +50,7 @@ export function LinkListItem({ ) diff --git a/packages/design-system/lib/components/LinkList/index.tsx b/packages/design-system/lib/components/LinkList/index.tsx index f10727d45..a1a1f8f91 100644 --- a/packages/design-system/lib/components/LinkList/index.tsx +++ b/packages/design-system/lib/components/LinkList/index.tsx @@ -1,5 +1,5 @@ -import { LinkListItem, type LinkListItemProps } from './LinkListItem' -import styles from './LinkListItem/linkListItem.module.css' +import { LinkListItem, type LinkListItemProps } from "./LinkListItem" +import styles from "./LinkListItem/linkListItem.module.css" export interface LinkListProps { linkListItems: LinkListItemProps[] } diff --git a/packages/design-system/lib/components/Loading/Loading.stories.tsx b/packages/design-system/lib/components/Loading/Loading.stories.tsx index 5cb1c3a1b..ea9a2b64b 100644 --- a/packages/design-system/lib/components/Loading/Loading.stories.tsx +++ b/packages/design-system/lib/components/Loading/Loading.stories.tsx @@ -1,18 +1,18 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { Loading } from './Loading' -import { config } from './variants' +import { Loading } from "./Loading" +import { config } from "./variants" const meta: Meta = { - title: 'Patterns/Loading', + title: "Patterns/Loading", component: Loading, argTypes: { type: { - control: 'select', + control: "select", options: Object.keys(config.variants.type), }, size: { - control: 'number', + control: "number", }, }, } @@ -23,19 +23,19 @@ type Story = StoryObj export const Dark: Story = { args: { - type: 'Dark', + type: "Dark", size: 40, }, } export const White: Story = { args: { - type: 'White', + type: "White", size: 40, }, parameters: { backgrounds: { - default: 'Scandic Primary Dark', + default: "Scandic Primary Dark", }, }, } diff --git a/packages/design-system/lib/components/Loading/Loading.tsx b/packages/design-system/lib/components/Loading/Loading.tsx index dee430237..f04989f7e 100644 --- a/packages/design-system/lib/components/Loading/Loading.tsx +++ b/packages/design-system/lib/components/Loading/Loading.tsx @@ -1,7 +1,7 @@ -import { VariantProps } from 'class-variance-authority' +import { VariantProps } from "class-variance-authority" -import { variants } from './variants' -import { ProgressBar } from 'react-aria-components' +import { variants } from "./variants" +import { ProgressBar } from "react-aria-components" export interface LoadingProps extends VariantProps { ariaLabel?: string @@ -9,7 +9,7 @@ export interface LoadingProps extends VariantProps { } export function Loading({ - ariaLabel = 'Loading', + ariaLabel = "Loading", size = 20, type, }: LoadingProps) { diff --git a/packages/design-system/lib/components/Loading/index.tsx b/packages/design-system/lib/components/Loading/index.tsx index 71170faae..b779bd7f6 100644 --- a/packages/design-system/lib/components/Loading/index.tsx +++ b/packages/design-system/lib/components/Loading/index.tsx @@ -1 +1 @@ -export { Loading } from './Loading' +export { Loading } from "./Loading" diff --git a/packages/design-system/lib/components/Loading/variants.ts b/packages/design-system/lib/components/Loading/variants.ts index 13bc0f9ea..b17abdd2c 100644 --- a/packages/design-system/lib/components/Loading/variants.ts +++ b/packages/design-system/lib/components/Loading/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './loading.module.css' +import styles from "./loading.module.css" export const config = { variants: { @@ -11,7 +11,7 @@ export const config = { }, }, defaultVariants: { - type: 'Dark', + type: "Dark", }, } as const diff --git a/packages/design-system/lib/components/LoadingSpinner/LoadingSpinner.stories.tsx b/packages/design-system/lib/components/LoadingSpinner/LoadingSpinner.stories.tsx index 576afc51e..c2026ae38 100644 --- a/packages/design-system/lib/components/LoadingSpinner/LoadingSpinner.stories.tsx +++ b/packages/design-system/lib/components/LoadingSpinner/LoadingSpinner.stories.tsx @@ -1,13 +1,13 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { LoadingSpinner } from './index' +import { LoadingSpinner } from "./index" const meta: Meta = { - title: 'Patterns/LoadingSpinner', + title: "Patterns/LoadingSpinner", component: LoadingSpinner, argTypes: { fullPage: { - control: 'check', + control: "check", }, }, } diff --git a/packages/design-system/lib/components/LoadingSpinner/index.tsx b/packages/design-system/lib/components/LoadingSpinner/index.tsx index 06a9fc17a..da09c509c 100644 --- a/packages/design-system/lib/components/LoadingSpinner/index.tsx +++ b/packages/design-system/lib/components/LoadingSpinner/index.tsx @@ -1,8 +1,8 @@ -import styles from './loading.module.css' +import styles from "./loading.module.css" export function LoadingSpinner({ fullPage }: { fullPage?: boolean }) { return ( -

+
diff --git a/packages/design-system/lib/components/LoadingSpinner/loading.module.css b/packages/design-system/lib/components/LoadingSpinner/loading.module.css index 543d933af..17b9cb741 100644 --- a/packages/design-system/lib/components/LoadingSpinner/loading.module.css +++ b/packages/design-system/lib/components/LoadingSpinner/loading.module.css @@ -22,7 +22,7 @@ } .spinner div::after { - content: ' '; + content: " "; display: block; position: absolute; top: 3px; diff --git a/packages/design-system/lib/components/LocalCallCharges/index.tsx b/packages/design-system/lib/components/LocalCallCharges/index.tsx index bf5c89b78..bd28bd949 100644 --- a/packages/design-system/lib/components/LocalCallCharges/index.tsx +++ b/packages/design-system/lib/components/LocalCallCharges/index.tsx @@ -1,9 +1,9 @@ -'use client' +"use client" -import { Country } from '@scandic-hotels/common/constants/country' +import { Country } from "@scandic-hotels/common/constants/country" -import { useIntl } from 'react-intl' -import { Typography } from '../Typography' +import { useIntl } from "react-intl" +import { Typography } from "../Typography" interface LocalCallChargesProps { country: string @@ -19,8 +19,8 @@ export function LocalCallCharges({

{intl.formatMessage({ - id: 'common.localCallCharges', - defaultMessage: 'Price: โ‚ฌ0.16/min + local call charges', + id: "common.localCallCharges", + defaultMessage: "Price: โ‚ฌ0.16/min + local call charges", })}

diff --git a/packages/design-system/lib/components/LoginButton/index.tsx b/packages/design-system/lib/components/LoginButton/index.tsx index fb989923a..22dd23f49 100644 --- a/packages/design-system/lib/components/LoginButton/index.tsx +++ b/packages/design-system/lib/components/LoginButton/index.tsx @@ -1,12 +1,13 @@ -'use client' +"use client" -import { login } from '@scandic-hotels/common/constants/routes/handleAuth' +import { login } from "@scandic-hotels/common/constants/routes/handleAuth" -import type { Lang } from '@scandic-hotels/common/constants/language' -import ButtonLink, { ButtonLinkProps } from '../ButtonLink' +import type { Lang } from "@scandic-hotels/common/constants/language" +import ButtonLink, { ButtonLinkProps } from "../ButtonLink" -interface LoginButtonProps - extends React.PropsWithChildren> { +interface LoginButtonProps extends React.PropsWithChildren< + Omit +> { lang: Lang redirectTo: string | null loginPosition: string @@ -21,10 +22,10 @@ export function LoginButton({ let href = login[lang] if (redirectTo) { - const [pathname, existingQuery] = redirectTo.split('?') + const [pathname, existingQuery] = redirectTo.split("?") const searchParams = new URLSearchParams(existingQuery) - searchParams.set('loginPosition', loginPosition) + searchParams.set("loginPosition", loginPosition) const redirectUrl = `${pathname}?${searchParams.toString()}` href = `${href}?redirectTo=${encodeURIComponent(redirectUrl)}` diff --git a/packages/design-system/lib/components/Map/InfoWindow/index.tsx b/packages/design-system/lib/components/Map/InfoWindow/index.tsx index 6b8108770..7a2353583 100644 --- a/packages/design-system/lib/components/Map/InfoWindow/index.tsx +++ b/packages/design-system/lib/components/Map/InfoWindow/index.tsx @@ -1,16 +1,15 @@ import { InfoWindow as GoogleMapsInfoWindow, type InfoWindowProps as GoogleMapsInfoWindowProps, -} from '@vis.gl/react-google-maps' +} from "@vis.gl/react-google-maps" -import styles from './infoWindow.module.css' +import styles from "./infoWindow.module.css" -import type { MouseEventHandler } from 'react' +import type { MouseEventHandler } from "react" -interface InfoWindowProps - extends React.PropsWithChildren< - Omit - > { +interface InfoWindowProps extends React.PropsWithChildren< + Omit +> { pixelOffsetY?: number onMouseEnter?: MouseEventHandler onMouseLeave?: MouseEventHandler diff --git a/packages/design-system/lib/components/Map/InfoWindow/infoWindow.module.css b/packages/design-system/lib/components/Map/InfoWindow/infoWindow.module.css index 52ce0cea3..b8cb0dcfe 100644 --- a/packages/design-system/lib/components/Map/InfoWindow/infoWindow.module.css +++ b/packages/design-system/lib/components/Map/InfoWindow/infoWindow.module.css @@ -21,7 +21,7 @@ justify-self: center; &::after { - content: ''; + content: ""; background-color: var(--Base-Surface-Primary-light-Normal); clip-path: polygon(0 0, 50% 100%, 100% 0); height: 12px; diff --git a/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx index e0871de33..49bc1f2ff 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx +++ b/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/HotelPin/index.tsx @@ -1,12 +1,12 @@ -import { useIntl } from 'react-intl' +import { useIntl } from "react-intl" -import { formatPrice } from '@scandic-hotels/common/utils/numberFormatting' -import { MaterialIcon } from '../../../../Icons/MaterialIcon' -import { Typography } from '../../../../Typography' +import { formatPrice } from "@scandic-hotels/common/utils/numberFormatting" +import { MaterialIcon } from "../../../../Icons/MaterialIcon" +import { Typography } from "../../../../Typography" -import HotelMarker from '../../../Markers/HotelMarker' +import HotelMarker from "../../../Markers/HotelMarker" -import styles from './hotelPin.module.css' +import styles from "./hotelPin.module.css" interface HotelPinProps { isActive: boolean @@ -15,7 +15,7 @@ interface HotelPinProps { hotelAdditionalPrice?: number hotelAdditionalCurrency?: string } -const NOT_AVAILABLE = '-' +const NOT_AVAILABLE = "-" export function HotelPin({ isActive, hotelPrice, @@ -28,7 +28,7 @@ export function HotelPin({ return (
@@ -36,10 +36,10 @@ export function HotelPin({ ) : ( - + )} diff --git a/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/index.tsx index 97216fef0..55c390dfe 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/index.tsx +++ b/packages/design-system/lib/components/Map/InteractiveMap/HotelListingMapContent/index.tsx @@ -2,16 +2,16 @@ import { AdvancedMarker, AdvancedMarkerAnchorPoint, InfoWindow, -} from '@vis.gl/react-google-maps' -import { useMediaQuery } from 'usehooks-ts' +} from "@vis.gl/react-google-maps" +import { useMediaQuery } from "usehooks-ts" -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import { Lang } from '@scandic-hotels/common/constants/language' -import { useIntl } from 'react-intl' -import { StandaloneHotelCardDialog } from '../../../HotelCard/HotelDialogCard/StandaloneHotelCardDialog' -import type { HotelPin as HotelPinType } from '../../types' -import styles from './hotelListingMapContent.module.css' -import { HotelPin } from './HotelPin' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { Lang } from "@scandic-hotels/common/constants/language" +import { useIntl } from "react-intl" +import { StandaloneHotelCardDialog } from "../../../HotelCard/HotelDialogCard/StandaloneHotelCardDialog" +import type { HotelPin as HotelPinType } from "../../types" +import styles from "./hotelListingMapContent.module.css" +import { HotelPin } from "./HotelPin" export type HotelListingMapContentProps = { hotelPins: HotelPinType[] @@ -38,7 +38,7 @@ export function HotelListingMapContent({ pointsCurrency, }: HotelListingMapContentProps) { const intl = useIntl() - const isDesktop = useMediaQuery('(min-width: 900px)') + const isDesktop = useMediaQuery("(min-width: 900px)") const toggleActiveHotelPin = ( args: { hotelName: string; hotelId: string } | null @@ -66,8 +66,8 @@ export function HotelListingMapContent({ const pinCurrency = pin.redemptionPrice ? intl.formatMessage({ - id: 'common.points', - defaultMessage: 'Points', + id: "common.points", + defaultMessage: "Points", }) : pin.currency diff --git a/packages/design-system/lib/components/Map/InteractiveMap/InteractiveMap.stories.tsx b/packages/design-system/lib/components/Map/InteractiveMap/InteractiveMap.stories.tsx index db4c3b8dc..07d8f1338 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/InteractiveMap.stories.tsx +++ b/packages/design-system/lib/components/Map/InteractiveMap/InteractiveMap.stories.tsx @@ -1,14 +1,14 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" // import { expect, fn } from 'storybook/test' -import { Lang } from '@scandic-hotels/common/constants/language' -import { APIProvider } from '@vis.gl/react-google-maps' -import { useState } from 'react' -import { InteractiveMap } from '.' -import { hotelPins } from './storybookData' +import { Lang } from "@scandic-hotels/common/constants/language" +import { APIProvider } from "@vis.gl/react-google-maps" +import { useState } from "react" +import { InteractiveMap } from "." +import { hotelPins } from "./storybookData" const meta: Meta = { - title: 'Patterns/Map/Interactive Map', + title: "Patterns/Map/Interactive Map", component: InteractiveMap, argTypes: {}, } @@ -32,7 +32,7 @@ export const PrimaryDefault: Story = { const mapId = import.meta.env.VITE_GOOGLE_DYNAMIC_MAP_ID if (!mapKey || !mapId) { throw new Error( - 'VITE_GOOGLE_STATIC_MAP_KEY or VITE_GOOGLE_DYNAMIC_MAP_ID is not defined in your .env file. Please add it to run this story.' + "VITE_GOOGLE_STATIC_MAP_KEY or VITE_GOOGLE_DYNAMIC_MAP_ID is not defined in your .env file. Please add it to run this story." ) } @@ -44,8 +44,8 @@ export const PrimaryDefault: Story = {
diff --git a/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx index 4327f0fa1..361130dbd 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx +++ b/packages/design-system/lib/components/Map/InteractiveMap/PoiMapMarkers/index.tsx @@ -1,16 +1,16 @@ import { AdvancedMarker, AdvancedMarkerAnchorPoint, -} from '@vis.gl/react-google-maps' -import { useIntl } from 'react-intl' +} from "@vis.gl/react-google-maps" +import { useIntl } from "react-intl" -import { Typography } from '../../../Typography' +import { Typography } from "../../../Typography" -import { HotelMarkerByType } from '../../Markers/HotelMarkerByType' -import { PoiMarker } from '../../Markers/PoiMarker' +import { HotelMarkerByType } from "../../Markers/HotelMarkerByType" +import { PoiMarker } from "../../Markers/PoiMarker" -import styles from './poiMapMarkers.module.css' -import { MarkerInfo, PointOfInterest } from '../../types' +import styles from "./poiMapMarkers.module.css" +import { MarkerInfo, PointOfInterest } from "../../types" export type PoiMapMarkersProps = { activePoi?: string | null @@ -50,15 +50,15 @@ export default function PoiMapMarkers({ zIndex={activePoi === poi.id ? 2 : 0} onMouseEnter={() => onActivePoiChange?.(poi.id ?? null)} onMouseLeave={() => onActivePoiChange?.(null)} - onClick={() => toggleActivePoi(poi.id ?? '')} + onClick={() => toggleActivePoi(poi.id ?? "")} > @@ -71,8 +71,8 @@ export default function PoiMapMarkers({ {intl.formatMessage( { - id: 'common.distanceKm', - defaultMessage: '{distanceInKm} km', + id: "common.distanceKm", + defaultMessage: "{distanceInKm} km", }, { distanceInKm: poi.distance, diff --git a/packages/design-system/lib/components/Map/InteractiveMap/index.tsx b/packages/design-system/lib/components/Map/InteractiveMap/index.tsx index ff1df5598..14aee0970 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/index.tsx +++ b/packages/design-system/lib/components/Map/InteractiveMap/index.tsx @@ -1,23 +1,23 @@ -'use client' +"use client" -import { Map, type MapProps, useMap } from '@vis.gl/react-google-maps' -import { useEffect, useState } from 'react' -import { useIntl } from 'react-intl' +import { Map, type MapProps, useMap } from "@vis.gl/react-google-maps" +import { useEffect, useState } from "react" +import { useIntl } from "react-intl" -import { IconButton } from '../../IconButton' +import { IconButton } from "../../IconButton" -import { HOTEL_PAGE, MAP_RESTRICTIONS } from '../mapConstants' +import { HOTEL_PAGE, MAP_RESTRICTIONS } from "../mapConstants" -import { useZoomControls } from '@scandic-hotels/common/hooks/map/useZoomControls' +import { useZoomControls } from "@scandic-hotels/common/hooks/map/useZoomControls" -import { HotelListingMapContent } from './HotelListingMapContent' -import PoiMapMarkers from './PoiMapMarkers' +import { HotelListingMapContent } from "./HotelListingMapContent" +import PoiMapMarkers from "./PoiMapMarkers" -import styles from './interactiveMap.module.css' +import styles from "./interactiveMap.module.css" -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import { Lang } from '@scandic-hotels/common/constants/language' -import { HotelPin, MarkerInfo, PointOfInterest } from '../types' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { Lang } from "@scandic-hotels/common/constants/language" +import { HotelPin, MarkerInfo, PointOfInterest } from "../types" export type InteractiveMapProps = { lang: Lang @@ -94,7 +94,7 @@ export function InteractiveMap({ disableDefaultUI: true, clickableIcons: false, mapId, - gestureHandling: 'greedy', + gestureHandling: "greedy", restriction: MAP_RESTRICTIONS, } @@ -145,8 +145,8 @@ export function InteractiveMap({ className={styles.zoomButton} onClick={zoomOut} aria-label={intl.formatMessage({ - id: 'map.zoomOut', - defaultMessage: 'Zoom out', + id: "map.zoomOut", + defaultMessage: "Zoom out", })} isDisabled={isMinZoom} iconName="remove" @@ -157,8 +157,8 @@ export function InteractiveMap({ className={styles.zoomButton} onClick={zoomIn} aria-label={intl.formatMessage({ - id: 'map.zoomIn', - defaultMessage: 'Zoom in', + id: "map.zoomIn", + defaultMessage: "Zoom in", })} isDisabled={isMaxZoom} iconName="add" diff --git a/packages/design-system/lib/components/Map/InteractiveMap/interactiveMap.module.css b/packages/design-system/lib/components/Map/InteractiveMap/interactiveMap.module.css index b6043b768..c89e2e530 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/interactiveMap.module.css +++ b/packages/design-system/lib/components/Map/InteractiveMap/interactiveMap.module.css @@ -6,7 +6,7 @@ z-index: 0; &::after { - content: ''; + content: ""; position: absolute; top: 0; right: 0; diff --git a/packages/design-system/lib/components/Map/InteractiveMap/storybookData.ts b/packages/design-system/lib/components/Map/InteractiveMap/storybookData.ts index 535b8e923..49dd430dc 100644 --- a/packages/design-system/lib/components/Map/InteractiveMap/storybookData.ts +++ b/packages/design-system/lib/components/Map/InteractiveMap/storybookData.ts @@ -1,5 +1,5 @@ -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import { HotelPin } from '../types' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { HotelPin } from "../types" export const hotelPins: HotelPin[] = [ { @@ -7,65 +7,65 @@ export const hotelPins: HotelPin[] = [ lat: 59.331303, lng: 18.065542, }, - name: 'Downtown Camper by Scandic', + name: "Downtown Camper by Scandic", chequePrice: null, publicPrice: 1100, memberPrice: 1067, redemptionPrice: null, voucherPrice: null, - rateType: 'Regular', - currency: 'SEK', + rateType: "Regular", + currency: "SEK", amenities: [ { - filter: 'Hotel facilities', - icon: 'Pool', + filter: "Hotel facilities", + icon: "Pool", id: 1831, - name: 'Pool', + name: "Pool", public: true, sortOrder: 7000, - slug: 'pool', + slug: "pool", }, { - filter: 'Hotel facilities', - icon: 'Restaurant', + filter: "Hotel facilities", + icon: "Restaurant", id: 1383, - name: 'Restaurant', + name: "Restaurant", public: true, sortOrder: 6000, - slug: 'restaurant', + slug: "restaurant", }, { - filter: 'None', - icon: 'KayaksForLoan', + filter: "None", + icon: "KayaksForLoan", id: 162585, - name: 'Kayaks for loan', + name: "Kayaks for loan", public: true, sortOrder: 5000, - slug: 'kayaks-for-loan', + slug: "kayaks-for-loan", }, { - filter: 'Hotel facilities', - icon: 'None', + filter: "Hotel facilities", + icon: "None", id: 239348, - name: 'Rooftop bar', + name: "Rooftop bar", public: false, sortOrder: 4000, - slug: 'rooftop-bar', + slug: "rooftop-bar", }, { - filter: 'None', - icon: 'BikesForLoan', + filter: "None", + icon: "BikesForLoan", id: 5550, - name: 'Bikes for loan', + name: "Bikes for loan", public: true, sortOrder: 3000, - slug: 'bikes-for-loan', + slug: "bikes-for-loan", }, ], ratings: { tripAdvisor: 4.4, }, - operaId: '879', + operaId: "879", facilityIds: [ 1831, 1383, 162585, 239348, 5550, 162586, 5806, 1014, 1835, 1829, 1379, 1382, 162587, 1017, 1378, 1408, 1833, 971, 1834, 162584, 1381, 229144, @@ -73,8 +73,8 @@ export const hotelPins: HotelPin[] = [ ], hasEnoughPoints: false, image: { - alt: 'Bar of Downtown Camper by Scandic in Stockholm', - url: 'https://images-test.scandichotels.com/publishedmedia/p0ffjkfyfnx502knqlxo/Scandic_Downtown_Camper_spa_wellness_the_nest_swim.jpg', + alt: "Bar of Downtown Camper by Scandic in Stockholm", + url: "https://images-test.scandichotels.com/publishedmedia/p0ffjkfyfnx502knqlxo/Scandic_Downtown_Camper_spa_wellness_the_nest_swim.jpg", }, }, { @@ -82,73 +82,73 @@ export const hotelPins: HotelPin[] = [ lat: 59.33469, lng: 18.061586, }, - name: 'Haymarket by Scandic', + name: "Haymarket by Scandic", chequePrice: null, publicPrice: null, memberPrice: 9999, redemptionPrice: null, voucherPrice: null, - rateType: 'Regular', - currency: 'SEK', + rateType: "Regular", + currency: "SEK", amenities: [ { - filter: 'Hotel facilities', - icon: 'Restaurant', + filter: "Hotel facilities", + icon: "Restaurant", id: 1383, - name: 'Restaurant', + name: "Restaurant", public: true, sortOrder: 6000, - slug: 'restaurant', + slug: "restaurant", }, { - filter: 'None', - icon: 'None', + filter: "None", + icon: "None", id: 5806, - name: 'Meeting / conference facilities', + name: "Meeting / conference facilities", public: true, sortOrder: 1500, - slug: 'meeting-conference-facilities', + slug: "meeting-conference-facilities", }, { - filter: 'Hotel facilities', - icon: 'Bar', + filter: "Hotel facilities", + icon: "Bar", id: 1014, - name: 'Bar', + name: "Bar", public: true, sortOrder: 1401, - slug: 'bar', + slug: "bar", }, { - filter: 'Hotel facilities', - icon: 'PetFriendlyRooms', + filter: "Hotel facilities", + icon: "PetFriendlyRooms", id: 1835, - name: 'Pet-friendly rooms', + name: "Pet-friendly rooms", public: true, sortOrder: 1201, - slug: 'pet-friendly-rooms', + slug: "pet-friendly-rooms", }, { - filter: 'Hotel facilities', - icon: 'Gym', + filter: "Hotel facilities", + icon: "Gym", id: 1829, - name: 'Gym', + name: "Gym", public: true, sortOrder: 1101, - slug: 'gym', + slug: "gym", }, ], ratings: { tripAdvisor: 4.1, }, - operaId: '890', + operaId: "890", facilityIds: [ 1383, 5806, 1014, 1835, 1829, 1382, 162587, 1017, 1833, 971, 1834, 1381, 1406, 1913, 345180, 375885, ], hasEnoughPoints: false, image: { - alt: 'Bar', - url: 'https://images-test.scandichotels.com/publishedmedia/lr2b7r655xl0sjcbgxt9/haymarket-by-scandic-bar-pauls_-3-.jpg', + alt: "Bar", + url: "https://images-test.scandichotels.com/publishedmedia/lr2b7r655xl0sjcbgxt9/haymarket-by-scandic-bar-pauls_-3-.jpg", }, }, { @@ -156,7 +156,7 @@ export const hotelPins: HotelPin[] = [ lat: 59.337166, lng: 18.072765, }, - name: 'Scandic Anglais', + name: "Scandic Anglais", chequePrice: { numberOfCheques: 1, additionalPricePerStay: 500, @@ -166,67 +166,67 @@ export const hotelPins: HotelPin[] = [ memberPrice: null, redemptionPrice: null, voucherPrice: null, - rateType: 'Regular', - currency: 'CC', + rateType: "Regular", + currency: "CC", amenities: [ { - filter: 'Hotel facilities', - icon: 'Restaurant', + filter: "Hotel facilities", + icon: "Restaurant", id: 1383, - name: 'Restaurant', + name: "Restaurant", public: true, sortOrder: 6000, - slug: 'restaurant', + slug: "restaurant", }, { - filter: 'Hotel facilities', - icon: 'None', + filter: "Hotel facilities", + icon: "None", id: 239348, - name: 'Rooftop bar', + name: "Rooftop bar", public: false, sortOrder: 4000, - slug: 'rooftop-bar', + slug: "rooftop-bar", }, { - filter: 'None', - icon: 'BikesForLoan', + filter: "None", + icon: "BikesForLoan", id: 5550, - name: 'Bikes for loan', + name: "Bikes for loan", public: true, sortOrder: 3000, - slug: 'bikes-for-loan', + slug: "bikes-for-loan", }, { - filter: 'None', - icon: 'None', + filter: "None", + icon: "None", id: 5806, - name: 'Meeting / conference facilities', + name: "Meeting / conference facilities", public: true, sortOrder: 1500, - slug: 'meeting-conference-facilities', + slug: "meeting-conference-facilities", }, { - filter: 'Hotel facilities', - icon: 'Bar', + filter: "Hotel facilities", + icon: "Bar", id: 1014, - name: 'Bar', + name: "Bar", public: true, sortOrder: 1401, - slug: 'bar', + slug: "bar", }, ], ratings: { tripAdvisor: 3.6, }, - operaId: '810', + operaId: "810", facilityIds: [ 1383, 239348, 5550, 5806, 1014, 1835, 1829, 1379, 2665, 1382, 162587, 1017, 1408, 1833, 971, 1834, 1405, 1406, 956, 1913, ], hasEnoughPoints: false, image: { - alt: 'lobby at scandic anglais in stockholm', - url: 'https://images-test.scandichotels.com/publishedmedia/wi0lzgxhbm4vmfguf7wm/scandic-anglais-lobby6.jpg', + alt: "lobby at scandic anglais in stockholm", + url: "https://images-test.scandichotels.com/publishedmedia/wi0lzgxhbm4vmfguf7wm/scandic-anglais-lobby6.jpg", }, }, { @@ -234,73 +234,73 @@ export const hotelPins: HotelPin[] = [ lat: 59.33099, lng: 18.05926, }, - name: 'Scandic Continental', + name: "Scandic Continental", chequePrice: null, publicPrice: null, memberPrice: null, redemptionPrice: 65000, voucherPrice: null, - rateType: 'Regular', - currency: 'Points', + rateType: "Regular", + currency: "Points", amenities: [ { - filter: 'None', - icon: 'BikesForLoan', + filter: "None", + icon: "BikesForLoan", id: 5550, - name: 'Bikes for loan', + name: "Bikes for loan", public: true, sortOrder: 3000, - slug: 'bikes-for-loan', + slug: "bikes-for-loan", }, { - filter: 'None', - icon: 'None', + filter: "None", + icon: "None", id: 5806, - name: 'Meeting / conference facilities', + name: "Meeting / conference facilities", public: true, sortOrder: 1500, - slug: 'meeting-conference-facilities', + slug: "meeting-conference-facilities", }, { - filter: 'Hotel facilities', - icon: 'PetFriendlyRooms', + filter: "Hotel facilities", + icon: "PetFriendlyRooms", id: 1835, - name: 'Pet-friendly rooms', + name: "Pet-friendly rooms", public: true, sortOrder: 1201, - slug: 'pet-friendly-rooms', + slug: "pet-friendly-rooms", }, { - filter: 'Hotel facilities', - icon: 'Gym', + filter: "Hotel facilities", + icon: "Gym", id: 1829, - name: 'Gym', + name: "Gym", public: true, sortOrder: 1101, - slug: 'gym', + slug: "gym", }, { - filter: 'Hotel facilities', - icon: 'Sauna', + filter: "Hotel facilities", + icon: "Sauna", id: 1379, - name: 'Sauna', + name: "Sauna", public: true, sortOrder: 1001, - slug: 'sauna', + slug: "sauna", }, ], ratings: { tripAdvisor: 4.2, }, - operaId: '811', + operaId: "811", facilityIds: [ 5550, 5806, 1835, 1829, 1379, 2665, 1606, 1382, 1017, 1378, 1408, 1833, 971, 1834, 162583, 1406, 1607, 1911, 1913, 229144, ], hasEnoughPoints: false, image: { - alt: 'Exterior', - url: 'https://images-test.scandichotels.com/publishedmedia/xnvuuzvogv7dzt3nmxit/Scandic_Continental_Exterior_Vasagatan_Day.jpg', + alt: "Exterior", + url: "https://images-test.scandichotels.com/publishedmedia/xnvuuzvogv7dzt3nmxit/Scandic_Continental_Exterior_Vasagatan_Day.jpg", }, }, { @@ -308,72 +308,72 @@ export const hotelPins: HotelPin[] = [ lat: 59.323063, lng: 18.069921, }, - name: 'Scandic Gamla Stan', + name: "Scandic Gamla Stan", chequePrice: null, publicPrice: null, memberPrice: null, redemptionPrice: null, voucherPrice: 1, - rateType: 'Regular', - currency: 'Voucher', + rateType: "Regular", + currency: "Voucher", amenities: [ { - filter: 'Hotel facilities', - icon: 'PetFriendlyRooms', + filter: "Hotel facilities", + icon: "PetFriendlyRooms", id: 1835, - name: 'Pet-friendly rooms', + name: "Pet-friendly rooms", public: true, sortOrder: 1201, - slug: 'pet-friendly-rooms', + slug: "pet-friendly-rooms", }, { - filter: 'Hotel facilities', - icon: 'OutdoorTerrace', + filter: "Hotel facilities", + icon: "OutdoorTerrace", id: 1382, - name: 'Outdoor terrace', + name: "Outdoor terrace", public: true, sortOrder: 550, - slug: 'outdoor-terrace', + slug: "outdoor-terrace", }, { - filter: 'None', - icon: 'Shop', + filter: "None", + icon: "Shop", id: 1408, - name: 'Scandic Shop 24 hrs', + name: "Scandic Shop 24 hrs", public: true, sortOrder: 301, - slug: 'scandic-shop-24-hrs', + slug: "scandic-shop-24-hrs", }, { - filter: 'None', - icon: 'FreeWiFi', + filter: "None", + icon: "FreeWiFi", id: 1833, - name: 'Free WiFi', + name: "Free WiFi", public: true, sortOrder: 250, - slug: 'free-wifi', + slug: "free-wifi", }, { - filter: 'None', - icon: 'LaundryService', + filter: "None", + icon: "LaundryService", id: 1834, - name: 'Laundry service', + name: "Laundry service", public: true, sortOrder: 199, - slug: 'laundry-service', + slug: "laundry-service", }, ], ratings: { tripAdvisor: 4.2, }, - operaId: '821', + operaId: "821", facilityIds: [ 1835, 1382, 1408, 1833, 1834, 1405, 345180, 332224, 375885, 238849, ], hasEnoughPoints: false, image: { - alt: 'Facade Entrance Scandic Gamla Stan Stockholm', - url: 'https://images-test.scandichotels.com/publishedmedia/9attpqkkfy6uwc6keyvg/Scandic-Gamla-Stan-Exterior-facade.jpg', + alt: "Facade Entrance Scandic Gamla Stan Stockholm", + url: "https://images-test.scandichotels.com/publishedmedia/9attpqkkfy6uwc6keyvg/Scandic-Gamla-Stan-Exterior-facade.jpg", }, }, ] diff --git a/packages/design-system/lib/components/Map/Markers/HotelMarker/index.tsx b/packages/design-system/lib/components/Map/Markers/HotelMarker/index.tsx index 8955da01b..896e2716d 100644 --- a/packages/design-system/lib/components/Map/Markers/HotelMarker/index.tsx +++ b/packages/design-system/lib/components/Map/Markers/HotelMarker/index.tsx @@ -1,11 +1,11 @@ -import { hotelMarkerVariants } from './variants' +import { hotelMarkerVariants } from "./variants" export default function HotelMarker({ className, color, ...props }: React.SVGAttributes & { - color?: 'burgundy' | 'white' + color?: "burgundy" | "white" }) { const classNames = hotelMarkerVariants({ color, className }) diff --git a/packages/design-system/lib/components/Map/Markers/HotelMarker/variants.ts b/packages/design-system/lib/components/Map/Markers/HotelMarker/variants.ts index 8bf4a32a5..298d0e063 100644 --- a/packages/design-system/lib/components/Map/Markers/HotelMarker/variants.ts +++ b/packages/design-system/lib/components/Map/Markers/HotelMarker/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './hotelMarker.module.css' +import styles from "./hotelMarker.module.css" export const hotelMarkerVariants = cva(styles.icon, { variants: { @@ -10,6 +10,6 @@ export const hotelMarkerVariants = cva(styles.icon, { }, }, defaultVariants: { - color: 'white', + color: "white", }, }) diff --git a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx index 233a59c69..6aaf64166 100644 --- a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx +++ b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.stories.tsx @@ -1,42 +1,42 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { HotelMarkerByType } from './HotelMarkerByType' -import { SignatureHotelEnum } from '@scandic-hotels/common/constants/signatureHotels' -import { Typography } from '../../Typography' +import { HotelMarkerByType } from "./HotelMarkerByType" +import { SignatureHotelEnum } from "@scandic-hotels/common/constants/signatureHotels" +import { Typography } from "../../Typography" const meta: Meta = { - title: 'Patterns/Map/Hotel Marker By Type', + title: "Patterns/Map/Hotel Marker By Type", component: HotelMarkerByType, argTypes: { hotelType: { - control: 'select', - options: ['Regular', 'Signature', 'Scandic Go'], - description: 'Type of hotel', + control: "select", + options: ["Regular", "Signature", "Scandic Go"], + description: "Type of hotel", table: { type: { summary: "'Regular' | 'Signature' | 'Scandic Go'" }, // defaultValue: { summary: 'Regular' }, }, mapping: { - Signature: 'signature', - 'Scandic Go': 'scandicgo', - Regular: 'regular', + Signature: "signature", + "Scandic Go": "scandicgo", + Regular: "regular", }, }, hotelId: { - control: 'select', + control: "select", description: 'ID of the hotel (e.g. "879" for Downtown Camper)', - options: ['Other', ...Object.keys(SignatureHotelEnum)], + options: ["Other", ...Object.keys(SignatureHotelEnum)], mapping: { - Other: '', + Other: "", ...SignatureHotelEnum, }, }, size: { - control: 'select', + control: "select", table: { type: { summary: "'large' | 'small'" }, }, - options: ['large', 'small'], + options: ["large", "small"], }, }, } @@ -47,17 +47,17 @@ type Story = StoryObj export const PrimaryDefault: Story = { args: { - hotelId: 'Other', - hotelType: 'regular', - size: 'large', + hotelId: "Other", + hotelType: "regular", + size: "large", }, } export const ScandicGo: Story = { args: { - hotelId: 'Other', - hotelType: 'scandicgo', - size: 'large', + hotelId: "Other", + hotelType: "scandicgo", + size: "large", }, argTypes: { hotelId: { @@ -75,9 +75,9 @@ export const ScandicGo: Story = { export const Signature: Story = { args: { - hotelId: 'DowntownCamper', - hotelType: 'signature', - size: 'large', + hotelId: "DowntownCamper", + hotelType: "signature", + size: "large", }, argTypes: { hotelType: { @@ -86,10 +86,10 @@ export const Signature: Story = { }, }, hotelId: { - control: 'select', - options: ['Other', ...Object.keys(SignatureHotelEnum)], + control: "select", + options: ["Other", ...Object.keys(SignatureHotelEnum)], mapping: { - Other: '', + Other: "", ...SignatureHotelEnum, }, }, @@ -98,28 +98,28 @@ export const Signature: Story = { const exampleMarkers = [ { - name: 'Default', - hotelId: 'Other', - hotelType: 'regular', + name: "Default", + hotelId: "Other", + hotelType: "regular", }, { - name: 'Scandic Go', - hotelId: 'Other', - hotelType: 'scandicgo', + name: "Scandic Go", + hotelId: "Other", + hotelType: "scandicgo", }, ...Object.entries(SignatureHotelEnum).map( ([hotelName, hotelId]) => ({ name: hotelName, hotelId, - hotelType: 'signature', + hotelType: "signature", }) as const ), ] as const export const Examples: Story = { args: { - size: 'large', + size: "large", }, argTypes: { hotelType: { @@ -136,8 +136,8 @@ export const Examples: Story = { render: (args) => (
@@ -145,14 +145,14 @@ export const Examples: Story = {
diff --git a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx index da2036a76..b600a646c 100644 --- a/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx +++ b/packages/design-system/lib/components/Map/Markers/HotelMarkerByType.tsx @@ -1,32 +1,31 @@ -import { DowntownCamperMarker } from './HotelMarker/SignatureHotel/DowntownCamper' -import { DowntownCamperSmallMarker } from './HotelMarker/SignatureHotel/DowntownCamperSmall' -import { GrandHotelMarker } from './HotelMarker/SignatureHotel/GrandHotel' -import { GrandHotelSmallMarker } from './HotelMarker/SignatureHotel/GrandHotelSmall' -import { HaymarketMarker } from './HotelMarker/SignatureHotel/Haymarket' -import { HaymarketSmallMarker } from './HotelMarker/SignatureHotel/HaymarketSmall' -import { HotelNorgeMarker } from './HotelMarker/SignatureHotel/HotelNorge' -import { HotelNorgeSmallMarker } from './HotelMarker/SignatureHotel/HotelNorgeSmall' -import { MarskiMarker } from './HotelMarker/SignatureHotel/Marski' -import { MarskiSmallMarker } from './HotelMarker/SignatureHotel/MarskiSmall' -import { ScandicMarker } from './HotelMarker/SignatureHotel/Scandic' -import { ScandicGoMarker } from './HotelMarker/SignatureHotel/ScandicGo' -import { ScandicGoSmallMarker } from './HotelMarker/SignatureHotel/ScandicGoSmall' -import { ScandicSmallMarker } from './HotelMarker/SignatureHotel/ScandicSmall' -import { TheDockMarker } from './HotelMarker/SignatureHotel/TheDock' -import { TheDockSmallMarker } from './HotelMarker/SignatureHotel/TheDockSmall' +import { DowntownCamperMarker } from "./HotelMarker/SignatureHotel/DowntownCamper" +import { DowntownCamperSmallMarker } from "./HotelMarker/SignatureHotel/DowntownCamperSmall" +import { GrandHotelMarker } from "./HotelMarker/SignatureHotel/GrandHotel" +import { GrandHotelSmallMarker } from "./HotelMarker/SignatureHotel/GrandHotelSmall" +import { HaymarketMarker } from "./HotelMarker/SignatureHotel/Haymarket" +import { HaymarketSmallMarker } from "./HotelMarker/SignatureHotel/HaymarketSmall" +import { HotelNorgeMarker } from "./HotelMarker/SignatureHotel/HotelNorge" +import { HotelNorgeSmallMarker } from "./HotelMarker/SignatureHotel/HotelNorgeSmall" +import { MarskiMarker } from "./HotelMarker/SignatureHotel/Marski" +import { MarskiSmallMarker } from "./HotelMarker/SignatureHotel/MarskiSmall" +import { ScandicMarker } from "./HotelMarker/SignatureHotel/Scandic" +import { ScandicGoMarker } from "./HotelMarker/SignatureHotel/ScandicGo" +import { ScandicGoSmallMarker } from "./HotelMarker/SignatureHotel/ScandicGoSmall" +import { ScandicSmallMarker } from "./HotelMarker/SignatureHotel/ScandicSmall" +import { TheDockMarker } from "./HotelMarker/SignatureHotel/TheDock" +import { TheDockSmallMarker } from "./HotelMarker/SignatureHotel/TheDockSmall" -import { SignatureHotelEnum } from '@scandic-hotels/common/constants/signatureHotels' +import { SignatureHotelEnum } from "@scandic-hotels/common/constants/signatureHotels" import { HotelTypes, type HotelType, -} from '@scandic-hotels/common/constants/hotelType' -import { MarkerInfo } from '../types' +} from "@scandic-hotels/common/constants/hotelType" +import { MarkerInfo } from "../types" export interface HotelMarkerByTypeProps - extends MarkerInfo, - React.SVGAttributes { - size?: 'large' | 'small' + extends MarkerInfo, React.SVGAttributes { + size?: "large" | "small" } type MarkerComponent = React.ComponentType< React.SVGAttributes @@ -35,7 +34,7 @@ type MarkerComponent = React.ComponentType< export function HotelMarkerByType({ hotelId, hotelType, - size = 'large', + size = "large", ...props }: HotelMarkerByTypeProps) { const sigatureHotelEntry = @@ -55,14 +54,14 @@ export function HotelMarkerByType({ return } -const defaultMarkers: Record<'large' | 'small', MarkerComponent> = { +const defaultMarkers: Record<"large" | "small", MarkerComponent> = { large: ScandicMarker, small: ScandicSmallMarker, } const byHotelType: Record< - Exclude, - Record<'large' | 'small', MarkerComponent> + Exclude, + Record<"large" | "small", MarkerComponent> > = { [HotelTypes.ScandicGo]: { large: ScandicGoMarker, @@ -72,7 +71,7 @@ const byHotelType: Record< const bySignatureHotel: Record< SignatureHotelEnum, - Record<'large' | 'small', MarkerComponent> + Record<"large" | "small", MarkerComponent> > = { [SignatureHotelEnum.Haymarket]: { large: HaymarketMarker, diff --git a/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx b/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx index f4eb29a9f..1cb416a10 100644 --- a/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx +++ b/packages/design-system/lib/components/Map/Markers/PoiMarker/index.tsx @@ -1,12 +1,12 @@ -import { IconByIconName } from '../../../Icons/IconByIconName' +import { IconByIconName } from "../../../Icons/IconByIconName" import { getIconByPoiGroupAndCategory, type PointOfInterestGroup, -} from '../utils' -import { poiVariants } from './variants' +} from "../utils" +import { poiVariants } from "./variants" -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" interface PoiMarkerProps extends VariantProps { group: PointOfInterestGroup @@ -18,8 +18,8 @@ export function PoiMarker({ group, categoryName, skipBackground, - size = 'small', - className = '', + size = "small", + className = "", }: PoiMarkerProps) { const iconName = getIconByPoiGroupAndCategory(group, categoryName) const classNames = poiVariants({ group, skipBackground, size, className }) @@ -28,8 +28,8 @@ export function PoiMarker({ ) : null diff --git a/packages/design-system/lib/components/Map/Markers/PoiMarker/variants.ts b/packages/design-system/lib/components/Map/Markers/PoiMarker/variants.ts index 30af4ca06..2421a4643 100644 --- a/packages/design-system/lib/components/Map/Markers/PoiMarker/variants.ts +++ b/packages/design-system/lib/components/Map/Markers/PoiMarker/variants.ts @@ -1,21 +1,21 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import type { PointOfInterestGroup } from '../utils' -import styles from './poiMarker.module.css' +import type { PointOfInterestGroup } from "../utils" +import styles from "./poiMarker.module.css" export const poiVariants = cva(styles.poiMarker, { variants: { group: { - ['Attractions']: styles.attractions, - ['Business']: styles.business, - ['Location']: styles.location, - ['Parking']: styles.parking, - ['Public transport']: styles.publicTransport, - ['Shopping & Dining']: styles.shoppingDining, + ["Attractions"]: styles.attractions, + ["Business"]: styles.business, + ["Location"]: styles.location, + ["Parking"]: styles.parking, + ["Public transport"]: styles.publicTransport, + ["Shopping & Dining"]: styles.shoppingDining, } satisfies Record, skipBackground: { true: styles.skipBackground, - false: '', + false: "", }, size: { small: styles.small, @@ -25,6 +25,6 @@ export const poiVariants = cva(styles.poiMarker, { }, defaultVariants: { skipBackground: false, - size: 'small', + size: "small", }, }) diff --git a/packages/design-system/lib/components/Map/Markers/utils.ts b/packages/design-system/lib/components/Map/Markers/utils.ts index 0312d7180..52ca8a6f4 100644 --- a/packages/design-system/lib/components/Map/Markers/utils.ts +++ b/packages/design-system/lib/components/Map/Markers/utils.ts @@ -1,29 +1,29 @@ -import { IconName } from '../../Icons/iconName' +import { IconName } from "../../Icons/iconName" export type PointOfInterestGroup = - | 'Public transport' - | 'Attractions' - | 'Business' - | 'Location' - | 'Parking' - | 'Shopping & Dining' + | "Public transport" + | "Attractions" + | "Business" + | "Location" + | "Parking" + | "Shopping & Dining" export function getIconByPoiGroupAndCategory( group: PointOfInterestGroup, category?: string ) { switch (group) { - case 'Public transport': - return category === 'Airport' ? IconName.Airplane : IconName.Train - case 'Attractions': - return category === 'Museum' ? IconName.Museum : IconName.Camera - case 'Business': + case "Public transport": + return category === "Airport" ? IconName.Airplane : IconName.Train + case "Attractions": + return category === "Museum" ? IconName.Museum : IconName.Camera + case "Business": return IconName.Business - case 'Parking': + case "Parking": return IconName.Parking - case 'Shopping & Dining': - return category === 'Restaurant' ? IconName.Restaurant : IconName.Shopping - case 'Location': + case "Shopping & Dining": + return category === "Restaurant" ? IconName.Restaurant : IconName.Shopping + case "Location": default: return IconName.Location } diff --git a/packages/design-system/lib/components/Map/types.ts b/packages/design-system/lib/components/Map/types.ts index 450f14f1f..ba53e877c 100644 --- a/packages/design-system/lib/components/Map/types.ts +++ b/packages/design-system/lib/components/Map/types.ts @@ -1,6 +1,6 @@ -import { CurrencyEnum } from '@scandic-hotels/common/constants/currency' -import { FacilityEnum } from '@scandic-hotels/common/constants/facilities' -import { HotelType } from '@scandic-hotels/common/constants/hotelType' +import { CurrencyEnum } from "@scandic-hotels/common/constants/currency" +import { FacilityEnum } from "@scandic-hotels/common/constants/facilities" +import { HotelType } from "@scandic-hotels/common/constants/hotelType" export type HotelPin = { bookingCode?: string | null @@ -43,12 +43,12 @@ export type HotelPin = { } export const PointOfInterestGroups = { - PublicTransport: 'Public transport', - Attractions: 'Attractions', - Business: 'Business', - Location: 'Location', - Parking: 'Parking', - ShoppingAndDining: 'Shopping & Dining', + PublicTransport: "Public transport", + Attractions: "Attractions", + Business: "Business", + Location: "Location", + Parking: "Parking", + ShoppingAndDining: "Shopping & Dining", } as const export type PointOfInterestGroup = diff --git a/packages/design-system/lib/components/MessageBanner/MessageBanner.stories.tsx b/packages/design-system/lib/components/MessageBanner/MessageBanner.stories.tsx index 49a7c796a..1a55de74b 100644 --- a/packages/design-system/lib/components/MessageBanner/MessageBanner.stories.tsx +++ b/packages/design-system/lib/components/MessageBanner/MessageBanner.stories.tsx @@ -1,22 +1,22 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { MessageBanner } from './index' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { MessageBanner } from "./index" -type MessageBannerType = 'default' | 'error' | 'info' -type TextColor = 'default' | 'error' +type MessageBannerType = "default" | "error" | "info" +type TextColor = "default" | "error" const meta: Meta = { - title: 'Core Components/MessageBanner', + title: "Core Components/MessageBanner", component: MessageBanner, argTypes: { type: { - control: { type: 'select' }, - options: ['default', 'error', 'info'] as MessageBannerType[], + control: { type: "select" }, + options: ["default", "error", "info"] as MessageBannerType[], }, textColor: { - control: { type: 'select' }, - options: ['default', 'error'] as TextColor[], + control: { type: "select" }, + options: ["default", "error"] as TextColor[], }, - text: { control: 'text' }, + text: { control: "text" }, }, } @@ -25,40 +25,40 @@ type Story = StoryObj export const Default: Story = { args: { - type: 'default', - textColor: 'default', - text: 'This is a default message', + type: "default", + textColor: "default", + text: "This is a default message", }, } export const Warning: Story = { args: { - type: 'error', - textColor: 'default', - text: 'This is a warning message', + type: "error", + textColor: "default", + text: "This is a warning message", }, } export const WarningErrorText: Story = { args: { - type: 'error', - textColor: 'error', - text: 'Warning with error text color', + type: "error", + textColor: "error", + text: "Warning with error text color", }, } export const Info: Story = { args: { - type: 'info', - textColor: 'default', - text: 'This is an info message', + type: "info", + textColor: "default", + text: "This is an info message", }, } export const InfoErrorText: Story = { args: { - type: 'info', - textColor: 'error', - text: 'Info with error text color', + type: "info", + textColor: "error", + text: "Info with error text color", }, } diff --git a/packages/design-system/lib/components/MessageBanner/index.tsx b/packages/design-system/lib/components/MessageBanner/index.tsx index 7b1425fa6..ed245d020 100644 --- a/packages/design-system/lib/components/MessageBanner/index.tsx +++ b/packages/design-system/lib/components/MessageBanner/index.tsx @@ -1,12 +1,12 @@ -import { cva } from 'class-variance-authority' -import styles from './messageBanner.module.css' -import { Typography } from '../Typography' -import { MaterialIcon } from '../Icons/MaterialIcon' +import { cva } from "class-variance-authority" +import styles from "./messageBanner.module.css" +import { Typography } from "../Typography" +import { MaterialIcon } from "../Icons/MaterialIcon" -type MessageBannerType = 'default' | 'error' | 'info' -type TextColor = 'default' | 'error' +type MessageBannerType = "default" | "error" | "info" +type TextColor = "default" | "error" -const textVariants = cva('', { +const textVariants = cva("", { variants: { textColor: { default: styles.textDefault, @@ -14,7 +14,7 @@ const textVariants = cva('', { }, }, defaultVariants: { - textColor: 'default', + textColor: "default", }, }) @@ -25,19 +25,19 @@ type MessageBannerProps = { } export function MessageBanner({ - type = 'default', - textColor = 'default', + type = "default", + textColor = "default", text, }: MessageBannerProps) { const textClass = textVariants({ textColor }) - const iconName = type === 'error' ? 'error' : 'info' + const iconName = type === "error" ? "error" : "info" const iconColor = - type === 'error' - ? 'Icon/Feedback/Error' - : type === 'info' - ? 'Icon/Feedback/Information' - : 'Icon/Default' + type === "error" + ? "Icon/Feedback/Error" + : type === "info" + ? "Icon/Feedback/Information" + : "Icon/Default" return (
diff --git a/packages/design-system/lib/components/Modal/ModalContentWithActions/index.tsx b/packages/design-system/lib/components/Modal/ModalContentWithActions/index.tsx index 076381ee1..09d6c166e 100644 --- a/packages/design-system/lib/components/Modal/ModalContentWithActions/index.tsx +++ b/packages/design-system/lib/components/Modal/ModalContentWithActions/index.tsx @@ -1,10 +1,10 @@ -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { OldDSButton as Button } from '../../OldDSButton' -import Subtitle from '../../Subtitle' +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { OldDSButton as Button } from "../../OldDSButton" +import Subtitle from "../../Subtitle" -import styles from './modalContent.module.css' +import styles from "./modalContent.module.css" -import type { ReactNode } from 'react' +import type { ReactNode } from "react" interface ModalContentProps { title?: string @@ -12,14 +12,14 @@ interface ModalContentProps { primaryAction: { label: string onClick: () => void - intent?: 'primary' | 'secondary' | 'text' + intent?: "primary" | "secondary" | "text" isLoading?: boolean disabled?: boolean } | null secondaryAction: { label: string onClick: () => void - intent?: 'primary' | 'secondary' | 'text' + intent?: "primary" | "secondary" | "text" } | null onClose?: () => void } @@ -46,7 +46,7 @@ export function ModalContentWithActions({ {secondaryAction && ( @@ -186,8 +186,8 @@ function ErrorMessage({ icon="info" color="Icon/Feedback/Error" aria-label={intl.formatMessage({ - id: 'common.error', - defaultMessage: 'Error', + id: "common.error", + defaultMessage: "Error", })} /> {formatErrorMessage(intl, errorMessage)} diff --git a/packages/design-system/lib/components/PasswordInput/index.tsx b/packages/design-system/lib/components/PasswordInput/index.tsx index 30ca48acc..08a400bc3 100644 --- a/packages/design-system/lib/components/PasswordInput/index.tsx +++ b/packages/design-system/lib/components/PasswordInput/index.tsx @@ -1 +1 @@ -export { PasswordInput } from './PasswordInput' +export { PasswordInput } from "./PasswordInput" diff --git a/packages/design-system/lib/components/Payment/Icons/AmericanExpressIcon.tsx b/packages/design-system/lib/components/Payment/Icons/AmericanExpressIcon.tsx index d403cd22f..751216ffe 100644 --- a/packages/design-system/lib/components/Payment/Icons/AmericanExpressIcon.tsx +++ b/packages/design-system/lib/components/Payment/Icons/AmericanExpressIcon.tsx @@ -1,4 +1,4 @@ -import type { PaymentIconProps } from './IconProps' +import type { PaymentIconProps } from "./IconProps" export const AmericanExpressIcon = (props: PaymentIconProps) => ( ( /> { return ( @@ -13,7 +13,7 @@ export const ApplePayIcon = (props: PaymentIconProps) => { ( ( ( ( { return ( diff --git a/packages/design-system/lib/components/Payment/Icons/GooglePayIcon.tsx b/packages/design-system/lib/components/Payment/Icons/GooglePayIcon.tsx index b55e87a17..87bc53808 100644 --- a/packages/design-system/lib/components/Payment/Icons/GooglePayIcon.tsx +++ b/packages/design-system/lib/components/Payment/Icons/GooglePayIcon.tsx @@ -1,4 +1,4 @@ -import { PaymentIconProps } from './IconProps' +import { PaymentIconProps } from "./IconProps" export const GooglePayIcon = (props: PaymentIconProps) => { return ( diff --git a/packages/design-system/lib/components/Payment/Icons/IconProps.ts b/packages/design-system/lib/components/Payment/Icons/IconProps.ts index d4fca76de..f67c5282f 100644 --- a/packages/design-system/lib/components/Payment/Icons/IconProps.ts +++ b/packages/design-system/lib/components/Payment/Icons/IconProps.ts @@ -1,5 +1,5 @@ export type PaymentIconProps = { className?: string alt?: string - role: 'img' + role: "img" } diff --git a/packages/design-system/lib/components/Payment/Icons/JcbIcon.tsx b/packages/design-system/lib/components/Payment/Icons/JcbIcon.tsx index cdca7cd30..ba08e568b 100644 --- a/packages/design-system/lib/components/Payment/Icons/JcbIcon.tsx +++ b/packages/design-system/lib/components/Payment/Icons/JcbIcon.tsx @@ -1,4 +1,4 @@ -import { PaymentIconProps } from './IconProps' +import { PaymentIconProps } from "./IconProps" export const JcbIcon = (props: PaymentIconProps) => ( ( ( ( { return ( @@ -18,13 +18,13 @@ export const MobilePayIcon = (props: PaymentIconProps) => { fill="#5A78FF" /> { d="M26.5698 11.8656C25.2424 12.416 24.134 13.1748 23.4082 14.0894L21.5371 9.57038C22.3906 8.57877 23.477 7.81462 24.6987 7.34652C26.0262 6.79607 27.3673 6.52964 28.5068 6.68487L30.3784 11.2037C29.0736 11.1054 27.7649 11.3329 26.5698 11.8656Z" fill="#5A78FF" /> - + ( { return ( diff --git a/packages/design-system/lib/components/Payment/Icons/VippsIcon.tsx b/packages/design-system/lib/components/Payment/Icons/VippsIcon.tsx index 840873a2e..8dabbb59f 100644 --- a/packages/design-system/lib/components/Payment/Icons/VippsIcon.tsx +++ b/packages/design-system/lib/components/Payment/Icons/VippsIcon.tsx @@ -1,4 +1,4 @@ -import { PaymentIconProps } from './IconProps' +import { PaymentIconProps } from "./IconProps" export const VippsIcon = (props: PaymentIconProps) => { return ( diff --git a/packages/design-system/lib/components/Payment/Icons/VisaIcon.tsx b/packages/design-system/lib/components/Payment/Icons/VisaIcon.tsx index d8d0476bf..a624ee200 100644 --- a/packages/design-system/lib/components/Payment/Icons/VisaIcon.tsx +++ b/packages/design-system/lib/components/Payment/Icons/VisaIcon.tsx @@ -1,4 +1,4 @@ -import { PaymentIconProps } from './IconProps' +import { PaymentIconProps } from "./IconProps" export const VisaIcon = (props: PaymentIconProps) => ( = { - title: 'Product Components/Payment/PaymentMethodIcon', + title: "Product Components/Payment/PaymentMethodIcon", component: PaymentMethodIcon, parameters: { - layout: 'centered', + layout: "centered", }, argTypes: { paymentMethod: { - control: { type: 'select' }, + control: { type: "select" }, options: methods, - description: 'Payment method to display', + description: "Payment method to display", }, alt: { - control: { type: 'text' }, - description: 'Alt text for the icon', + control: { type: "text" }, + description: "Alt text for the icon", }, }, } @@ -32,25 +32,25 @@ type Story = StoryObj export const Playground: Story = { args: { paymentMethod: PaymentMethodEnum.visa, - alt: 'Visa payment method', + alt: "Visa payment method", }, play: async ({ canvas, args }) => { - const img = await canvas.findByRole('img') + const img = await canvas.findByRole("img") expect(img).toBeInTheDocument() - expect(img).toHaveAttribute('alt', args.alt) + expect(img).toHaveAttribute("alt", args.alt) }, } export const All: Story = { parameters: { - layout: 'padded', + layout: "padded", }, render: (args) => (
@@ -58,10 +58,10 @@ export const All: Story = {
= { - title: 'Core Components/Progress', + title: "Core Components/Progress", component: Progress, parameters: { backgrounds: { disable: true }, }, argTypes: { value: { - control: { type: 'range', min: 0, max: 100, step: 1 }, - description: 'The current progress value (0-100)', + control: { type: "range", min: 0, max: 100, step: 1 }, + description: "The current progress value (0-100)", }, - 'aria-label': { - control: 'text', - description: 'Accessible label for the progress bar', + "aria-label": { + control: "text", + description: "Accessible label for the progress bar", }, }, args: { - 'aria-label': 'Loading progress', + "aria-label": "Loading progress", }, } diff --git a/packages/design-system/lib/components/Progress/index.tsx b/packages/design-system/lib/components/Progress/index.tsx index 29ed6c9fe..d8ca7539b 100644 --- a/packages/design-system/lib/components/Progress/index.tsx +++ b/packages/design-system/lib/components/Progress/index.tsx @@ -1,13 +1,13 @@ -import { ProgressBar } from 'react-aria-components' -import { cx } from 'class-variance-authority' -import styles from './progress.module.css' -import { ProgressProps } from './types' +import { ProgressBar } from "react-aria-components" +import { cx } from "class-variance-authority" +import styles from "./progress.module.css" +import { ProgressProps } from "./types" export function Progress({ value, minValue = 0, maxValue = 100, - 'aria-label': ariaLabel, + "aria-label": ariaLabel, className, }: ProgressProps) { return ( diff --git a/packages/design-system/lib/components/Progress/types.ts b/packages/design-system/lib/components/Progress/types.ts index d4dfcceba..3d0872b03 100644 --- a/packages/design-system/lib/components/Progress/types.ts +++ b/packages/design-system/lib/components/Progress/types.ts @@ -2,6 +2,6 @@ export interface ProgressProps { value: number minValue?: number maxValue?: number - 'aria-label'?: string + "aria-label"?: string className?: string } diff --git a/packages/design-system/lib/components/Progress/variants.ts b/packages/design-system/lib/components/Progress/variants.ts index c34833f1e..68b776742 100644 --- a/packages/design-system/lib/components/Progress/variants.ts +++ b/packages/design-system/lib/components/Progress/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './progress.module.css' +import styles from "./progress.module.css" export const config = { variants: {}, diff --git a/packages/design-system/lib/components/Radio/Radio.tsx b/packages/design-system/lib/components/Radio/Radio.tsx index 4483769b0..582ad2a20 100644 --- a/packages/design-system/lib/components/Radio/Radio.tsx +++ b/packages/design-system/lib/components/Radio/Radio.tsx @@ -1,14 +1,14 @@ -import { PropsWithChildren } from 'react' -import { Radio as AriaRadio } from 'react-aria-components' -import styles from './radio.module.css' -import { variants } from './variants' -import { cx } from 'class-variance-authority' +import { PropsWithChildren } from "react" +import { Radio as AriaRadio } from "react-aria-components" +import styles from "./radio.module.css" +import { variants } from "./variants" +import { cx } from "class-variance-authority" interface RadioProps extends PropsWithChildren { value: string id?: string isDisabled?: boolean - color?: 'Burgundy' + color?: "Burgundy" wrapping?: boolean } diff --git a/packages/design-system/lib/components/Radio/index.tsx b/packages/design-system/lib/components/Radio/index.tsx index b2d70f722..64b2c1d68 100644 --- a/packages/design-system/lib/components/Radio/index.tsx +++ b/packages/design-system/lib/components/Radio/index.tsx @@ -1 +1 @@ -export { Radio } from './Radio' +export { Radio } from "./Radio" diff --git a/packages/design-system/lib/components/Radio/variants.ts b/packages/design-system/lib/components/Radio/variants.ts index a909b0a32..2c7141285 100644 --- a/packages/design-system/lib/components/Radio/variants.ts +++ b/packages/design-system/lib/components/Radio/variants.ts @@ -1,15 +1,15 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './radio.module.css' +import styles from "./radio.module.css" export const config = { variants: { color: { - Burgundy: styles['color-burgundy'], + Burgundy: styles["color-burgundy"], }, }, defaultVariants: { - color: 'Burgundy', + color: "Burgundy", }, } as const 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 b6160e06d..1ae4e9430 100644 --- a/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx +++ b/packages/design-system/lib/components/RateCard/Campaign/Campaign.stories.tsx @@ -1,26 +1,26 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import CampaignRateCard from '.' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import CampaignRateCard from "." const meta: Meta = { - title: 'Product Components/RateCard/Campaign', + title: "Product Components/RateCard/Campaign", component: CampaignRateCard, decorators: [ (Story) => ( -
+
), ], argTypes: { - rateTitle: { control: 'text' }, - paymentTerm: { control: 'text' }, - bannerText: { control: 'text' }, - rate: { control: 'object' }, - memberRate: { control: 'object' }, - omnibusRate: { control: 'object' }, - comparisonRate: { control: 'object' }, - approximateRate: { control: 'object' }, - rateTermDetails: { control: 'object' }, + rateTitle: { control: "text" }, + paymentTerm: { control: "text" }, + bannerText: { control: "text" }, + rate: { control: "object" }, + memberRate: { control: "object" }, + omnibusRate: { control: "object" }, + comparisonRate: { control: "object" }, + approximateRate: { control: "object" }, + rateTermDetails: { control: "object" }, }, } @@ -30,28 +30,28 @@ type Story = StoryObj export const Default: Story = { args: { - rateTitle: 'NON-REFUNDABLE', - paymentTerm: 'PAY NOW', - bannerText: 'Campaign โˆ™ Breakfast included', + rateTitle: "NON-REFUNDABLE", + paymentTerm: "PAY NOW", + bannerText: "Campaign โˆ™ Breakfast included", rate: { label: "Valentine's Special", - price: '198', - unit: 'EUR/NIGHT', + price: "198", + unit: "EUR/NIGHT", }, approximateRate: { - price: '198', - label: 'Approx.', - unit: 'EUR', + price: "198", + label: "Approx.", + unit: "EUR", }, omnibusRate: { - price: '249', - label: 'Lowest past price (last 30 days)', - unit: 'EUR', + price: "249", + label: "Lowest past price (last 30 days)", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -59,23 +59,23 @@ export const Default: Story = { export const Package: Story = { args: { - rateTitle: 'NON-REFUNDABLE', - paymentTerm: 'PAY NOW', - bannerText: 'WDCPHG โˆ™ Breakfast included', + rateTitle: "NON-REFUNDABLE", + paymentTerm: "PAY NOW", + bannerText: "WDCPHG โˆ™ Breakfast included", rate: { - label: 'Luxurious wine & dine in Copenhagen', - price: '1989', - unit: 'EUR/NIGHT', + label: "Luxurious wine & dine in Copenhagen", + price: "1989", + unit: "EUR/NIGHT", }, approximateRate: { - price: '1989', - label: 'Approx.', - unit: 'EUR', + price: "1989", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -83,28 +83,28 @@ export const Package: Story = { export const CampaignLoggedIn: Story = { args: { - rateTitle: 'NON-REFUNDABLE', - paymentTerm: 'PAY NOW', - bannerText: 'SUM2025 โˆ™ Breakfast included', + rateTitle: "NON-REFUNDABLE", + paymentTerm: "PAY NOW", + bannerText: "SUM2025 โˆ™ Breakfast included", rate: { - label: 'Luxurious wine & dine in Copenhagen', - price: '198', - unit: 'EUR/NIGHT', + label: "Luxurious wine & dine in Copenhagen", + price: "198", + unit: "EUR/NIGHT", }, approximateRate: { - price: '198', - label: 'Approx.', - unit: 'EUR', + price: "198", + label: "Approx.", + unit: "EUR", }, comparisonRate: { - price: '249', - unit: 'EUR/NIGHT', + price: "249", + unit: "EUR/NIGHT", }, isHighlightedRate: true, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -112,33 +112,33 @@ export const CampaignLoggedIn: Story = { export const CampaignOmnibus: Story = { args: { - rateTitle: 'NON-REFUNDABLE', - paymentTerm: 'PAY NOW', - bannerText: 'WDCPHG โˆ™ Breakfast included', + rateTitle: "NON-REFUNDABLE", + paymentTerm: "PAY NOW", + bannerText: "WDCPHG โˆ™ Breakfast included", rate: { - label: 'Luxurious wine & dine in Copenhagen', - price: '198', - unit: 'EUR/NIGHT', + label: "Luxurious wine & dine in Copenhagen", + price: "198", + unit: "EUR/NIGHT", }, memberRate: { - label: 'Member price', - price: '150', - unit: 'EUR/NIGHT', + label: "Member price", + price: "150", + unit: "EUR/NIGHT", }, approximateRate: { - price: '198', - label: 'Approx.', - unit: 'EUR', + price: "198", + label: "Approx.", + unit: "EUR", }, omnibusRate: { - price: '101', - label: 'Lowest past price (last 30 days)', - unit: 'EUR', + price: "101", + label: "Lowest past price (last 30 days)", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, diff --git a/packages/design-system/lib/components/RateCard/Campaign/index.tsx b/packages/design-system/lib/components/RateCard/Campaign/index.tsx index c7d1bde35..d31fa1dab 100644 --- a/packages/design-system/lib/components/RateCard/Campaign/index.tsx +++ b/packages/design-system/lib/components/RateCard/Campaign/index.tsx @@ -1,15 +1,15 @@ -import { cx } from 'class-variance-authority' +import { cx } from "class-variance-authority" -import { Typography } from '../../Typography' -import { Rate, RateTermDetails } from '../types' +import { Typography } from "../../Typography" +import { Rate, RateTermDetails } from "../types" -import { Button as ButtonRAC } from 'react-aria-components' -import { useIntl } from 'react-intl' -import { IconButton } from '../../IconButton' -import { MaterialIcon } from '../../Icons/MaterialIcon' -import Modal from '../Modal' -import styles from '../rate-card.module.css' -import { variants } from '../variants' +import { Button as ButtonRAC } from "react-aria-components" +import { useIntl } from "react-intl" +import { IconButton } from "../../IconButton" +import { MaterialIcon } from "../../Icons/MaterialIcon" +import Modal from "../Modal" +import styles from "../rate-card.module.css" +import { variants } from "../variants" interface CampaignRateCardProps { id: string @@ -20,7 +20,7 @@ interface CampaignRateCardProps { rate: Rate memberRate?: Rate omnibusRate?: Rate - comparisonRate?: Omit + comparisonRate?: Omit isHighlightedRate?: boolean isHighlightedRateLabel?: boolean approximateRate?: Rate @@ -48,7 +48,7 @@ export default function CampaignRateCard({ rateTermDetails, }: CampaignRateCardProps) { const classNames = variants({ - variant: 'Campaign', + variant: "Campaign", }) const intl = useIntl() @@ -84,8 +84,8 @@ export default function CampaignRateCard({ size="sm" className={styles.triggerButton} aria-label={intl.formatMessage({ - id: 'selectRate.rateCard.openReservationPolicy', - defaultMessage: 'Open reservation policy', + id: "selectRate.rateCard.openReservationPolicy", + defaultMessage: "Open reservation policy", })} iconName="info" /> @@ -167,7 +167,7 @@ export default function CampaignRateCard({ {comparisonRate.price} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} - {' '} + {" "} {comparisonRate.unit} 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 b834d71c4..b4645a217 100644 --- a/packages/design-system/lib/components/RateCard/Code/Code.stories.tsx +++ b/packages/design-system/lib/components/RateCard/Code/Code.stories.tsx @@ -1,22 +1,22 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import CodeRateCard from '.' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import CodeRateCard from "." const meta: Meta = { - title: 'Product Components/RateCard/Code', + title: "Product Components/RateCard/Code", component: CodeRateCard, decorators: [ (Story) => ( -
+
), ], argTypes: { - rateTitle: { control: 'text' }, - paymentTerm: { control: 'text' }, - rate: { control: 'object' }, - approximateRate: { control: 'object' }, - rateTermDetails: { contorlr: 'object' }, + rateTitle: { control: "text" }, + paymentTerm: { control: "text" }, + rate: { control: "object" }, + approximateRate: { control: "object" }, + rateTermDetails: { contorlr: "object" }, }, } @@ -26,23 +26,23 @@ type Story = StoryObj export const Default: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'Campaign โˆ™ Breakfast excluded', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "Campaign โˆ™ Breakfast excluded", rate: { label: "Valentine's Special", - price: '1989', - unit: 'EUR/night', + price: "1989", + unit: "EUR/night", }, approximateRate: { - price: '1989', - label: 'Approx.', - unit: 'EUR', + price: "1989", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -50,18 +50,18 @@ export const Default: Story = { export const Voucher: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'VOG โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "VOG โˆ™ Breakfast included", rate: { - label: 'Promotional name here', - price: '1', - unit: 'VOUCHER', + label: "Promotional name here", + price: "1", + unit: "VOUCHER", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -69,23 +69,23 @@ export const Voucher: Story = { export const CorporateCheck: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'VOG โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "VOG โˆ™ Breakfast included", rate: { - label: 'Promotional name here', - price: '2cc + 800', - unit: 'SEK', + label: "Promotional name here", + price: "2cc + 800", + unit: "SEK", }, approximateRate: { - price: '76', - label: 'Approx.', - unit: 'EUR', + price: "76", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -93,23 +93,23 @@ export const CorporateCheck: Story = { export const DNumberDefault: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'D0043148 โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "D0043148 โˆ™ Breakfast included", rate: { - label: 'Helsinki Partners Oy', - price: '1989', - unit: 'EUR/NIGHT', + label: "Helsinki Partners Oy", + price: "1989", + unit: "EUR/NIGHT", }, approximateRate: { - price: '76', - label: 'Approx.', - unit: 'EUR', + price: "76", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -117,24 +117,24 @@ export const DNumberDefault: Story = { export const DNumberHighlightedRate: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'D0043148 โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "D0043148 โˆ™ Breakfast included", rate: { - label: 'Helsinki Partners Oy', - price: '198', - unit: 'EUR/NIGHT', + label: "Helsinki Partners Oy", + price: "198", + unit: "EUR/NIGHT", }, approximateRate: { - price: '76', - label: 'Approx.', - unit: 'EUR', + price: "76", + label: "Approx.", + unit: "EUR", }, isHighlightedRate: true, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -142,23 +142,23 @@ export const DNumberHighlightedRate: Story = { export const LNumberDefault: Story = { args: { - rateTitle: 'NON-REFUNDABLE', - paymentTerm: 'PAY NOW', - bannerText: 'L0043148 โˆ™ Breakfast included', + rateTitle: "NON-REFUNDABLE", + paymentTerm: "PAY NOW", + bannerText: "L0043148 โˆ™ Breakfast included", rate: { - label: 'Nordic Team Travel', - price: '198', - unit: 'EUR/NIGHT', + label: "Nordic Team Travel", + price: "198", + unit: "EUR/NIGHT", }, approximateRate: { - price: '76', - label: 'Approx.', - unit: 'EUR', + price: "76", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -166,27 +166,27 @@ export const LNumberDefault: Story = { export const LNumberStrikethrough: Story = { args: { - rateTitle: 'NON-REFUNDABLE', - paymentTerm: 'PAY NOW', - bannerText: 'L0043148 โˆ™ Breakfast included', + rateTitle: "NON-REFUNDABLE", + paymentTerm: "PAY NOW", + bannerText: "L0043148 โˆ™ Breakfast included", rate: { - label: 'Nordic Team Travel', - price: '198', - unit: 'EUR/NIGHT', + label: "Nordic Team Travel", + price: "198", + unit: "EUR/NIGHT", }, comparisonRate: { - price: '249', - unit: 'EUR/NIGHT', + price: "249", + unit: "EUR/NIGHT", }, approximateRate: { - price: '230/218', - label: 'Approx.', - unit: 'EUR', + price: "230/218", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, diff --git a/packages/design-system/lib/components/RateCard/Code/index.tsx b/packages/design-system/lib/components/RateCard/Code/index.tsx index 233dad1ce..fed4ebffc 100644 --- a/packages/design-system/lib/components/RateCard/Code/index.tsx +++ b/packages/design-system/lib/components/RateCard/Code/index.tsx @@ -1,14 +1,14 @@ -import { Rate, RateTermDetails } from '../types' +import { Rate, RateTermDetails } from "../types" -import { cx } from 'class-variance-authority' -import { Button as ButtonRAC } from 'react-aria-components' -import { useIntl } from 'react-intl' -import { IconButton } from '../../IconButton' -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { Typography } from '../../Typography' -import Modal from '../Modal' -import styles from '../rate-card.module.css' -import { variants } from '../variants' +import { cx } from "class-variance-authority" +import { Button as ButtonRAC } from "react-aria-components" +import { useIntl } from "react-intl" +import { IconButton } from "../../IconButton" +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { Typography } from "../../Typography" +import Modal from "../Modal" +import styles from "../rate-card.module.css" +import { variants } from "../variants" interface CodeRateCardProps { id: string @@ -17,7 +17,7 @@ interface CodeRateCardProps { paymentTerm: string rate: Rate bannerText: string - comparisonRate?: Omit + comparisonRate?: Omit approximateRate?: Rate roomTypeCode: string isHighlightedRate?: boolean @@ -41,7 +41,7 @@ export default function CodeRateCard({ rateTermDetails, }: CodeRateCardProps) { const classNames = variants({ - variant: 'Code', + variant: "Code", }) const intl = useIntl() @@ -74,8 +74,8 @@ export default function CodeRateCard({ size="sm" className={styles.triggerButton} aria-label={intl.formatMessage({ - id: 'selectRate.rateCard.openReservationPolicy', - defaultMessage: 'Open reservation policy', + id: "selectRate.rateCard.openReservationPolicy", + defaultMessage: "Open reservation policy", })} iconName="info" /> @@ -113,7 +113,7 @@ export default function CodeRateCard({

{rate.label}

@@ -135,7 +135,7 @@ export default function CodeRateCard({ {comparisonRate.price} {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} - {' '} + {" "} {comparisonRate.unit} diff --git a/packages/design-system/lib/components/RateCard/Modal/index.tsx b/packages/design-system/lib/components/RateCard/Modal/index.tsx index 11c7c1cd4..65d62dc72 100644 --- a/packages/design-system/lib/components/RateCard/Modal/index.tsx +++ b/packages/design-system/lib/components/RateCard/Modal/index.tsx @@ -1,26 +1,26 @@ -'use client' +"use client" -import { AnimatePresence, motion } from 'motion/react' -import { type PropsWithChildren, useEffect, useState } from 'react' +import { AnimatePresence, motion } from "motion/react" +import { type PropsWithChildren, useEffect, useState } from "react" import { Modal as AriaModal, Dialog, DialogTrigger, ModalOverlay, -} from 'react-aria-components' +} from "react-aria-components" import { type AnimationState, AnimationStateEnum, type InnerModalProps, type ModalProps, -} from './modal' -import { fade, slideInOut } from './motionVariants' +} from "./modal" +import { fade, slideInOut } from "./motionVariants" -import { useIntl } from 'react-intl' -import { IconButton } from '../../IconButton' -import { Typography } from '../../Typography' -import styles from './modal.module.css' +import { useIntl } from "react-intl" +import { IconButton } from "../../IconButton" +import { Typography } from "../../Typography" +import styles from "./modal.module.css" const MotionOverlay = motion.create(ModalOverlay) const MotionModal = motion.create(AriaModal) @@ -94,8 +94,8 @@ function InnerModal({ emphasis onPress={close} aria-label={intl.formatMessage({ - id: 'common.close', - defaultMessage: 'Close', + id: "common.close", + defaultMessage: "Close", })} iconName="close" /> @@ -127,7 +127,7 @@ export default function Modal({ ) useEffect(() => { - if (typeof isOpen === 'boolean') { + if (typeof isOpen === "boolean") { setAnimation( isOpen ? AnimationStateEnum.visible : AnimationStateEnum.hidden ) diff --git a/packages/design-system/lib/components/RateCard/Modal/modal.ts b/packages/design-system/lib/components/RateCard/Modal/modal.ts index 44e2321ab..3221bcdd1 100644 --- a/packages/design-system/lib/components/RateCard/Modal/modal.ts +++ b/packages/design-system/lib/components/RateCard/Modal/modal.ts @@ -1,9 +1,9 @@ -import type { Dispatch, JSX, SetStateAction } from 'react' +import type { Dispatch, JSX, SetStateAction } from "react" export enum AnimationStateEnum { - unmounted = 'unmounted', - hidden = 'hidden', - visible = 'visible', + unmounted = "unmounted", + hidden = "hidden", + visible = "visible", } export type AnimationState = keyof typeof AnimationStateEnum @@ -23,7 +23,7 @@ export type ModalProps = { } ) -export type InnerModalProps = Omit & { +export type InnerModalProps = Omit & { animation: AnimationState setAnimation: Dispatch> } diff --git a/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts b/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts index 71c66a010..97b2e0c0f 100644 --- a/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts +++ b/packages/design-system/lib/components/RateCard/Modal/motionVariants.ts @@ -1,11 +1,11 @@ export const fade = { hidden: { opacity: 0, - transition: { duration: 0.4, ease: 'easeInOut' }, + transition: { duration: 0.4, ease: "easeInOut" }, }, visible: { opacity: 1, - transition: { duration: 0.4, ease: 'easeInOut' }, + transition: { duration: 0.4, ease: "easeInOut" }, }, } as const @@ -13,12 +13,12 @@ export const slideInOut = { hidden: { opacity: 0, y: 32, - transition: { duration: 0.4, ease: 'easeInOut' }, + transition: { duration: 0.4, ease: "easeInOut" }, }, visible: { opacity: 1, y: 0, - transition: { duration: 0.4, ease: 'easeInOut' }, + transition: { duration: 0.4, ease: "easeInOut" }, }, } as const @@ -26,11 +26,11 @@ export const slideFromTop = { hidden: { opacity: 0, y: -32, - transition: { duration: 0.4, ease: 'easeInOut' }, + transition: { duration: 0.4, ease: "easeInOut" }, }, visible: { opacity: 1, y: 0, - transition: { duration: 0.4, ease: 'easeInOut' }, + transition: { duration: 0.4, ease: "easeInOut" }, }, } as const 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 6b619d602..6bb005b64 100644 --- a/packages/design-system/lib/components/RateCard/NoRateAvailable/NoRateAvailable.stories.tsx +++ b/packages/design-system/lib/components/RateCard/NoRateAvailable/NoRateAvailable.stories.tsx @@ -1,20 +1,20 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import NoRateAvailableCard from '.' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import NoRateAvailableCard from "." const meta: Meta = { - title: 'Product Components/RateCard/NoRateAvailable', + title: "Product Components/RateCard/NoRateAvailable", component: NoRateAvailableCard, decorators: [ (Story) => ( -
+
), ], argTypes: { - rateTitle: { control: 'text' }, - paymentTerm: { control: 'text' }, - noPricesAvailableText: { control: 'text' }, + rateTitle: { control: "text" }, + paymentTerm: { control: "text" }, + noPricesAvailableText: { control: "text" }, }, } @@ -24,39 +24,39 @@ type Story = StoryObj export const NoRateAvailable: Story = { args: { - variant: 'Regular', - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', - noPricesAvailableText: 'No prices available', + variant: "Regular", + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", + noPricesAvailableText: "No prices available", }, } export const NoRateAvailableCampaign: Story = { args: { - variant: 'Campaign', - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', - bannerText: 'Campaign โˆ™ Breakfast included', - noPricesAvailableText: 'No prices available', + variant: "Campaign", + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", + bannerText: "Campaign โˆ™ Breakfast included", + noPricesAvailableText: "No prices available", }, } export const NoRateAvailableCode: Story = { args: { - variant: 'Code', - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', - bannerText: 'WDCPHG โˆ™ Breakfast included', - noPricesAvailableText: 'No prices available', + variant: "Code", + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", + bannerText: "WDCPHG โˆ™ Breakfast included", + noPricesAvailableText: "No prices available", }, } export const NoRateAvailablePoints: Story = { args: { - variant: 'Points', - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', - bannerText: 'WDCPHG โˆ™ Breakfast included', - noPricesAvailableText: 'No prices available', + variant: "Points", + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", + bannerText: "WDCPHG โˆ™ Breakfast included", + noPricesAvailableText: "No prices available", }, } diff --git a/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx b/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx index e7ff27beb..00a3353ea 100644 --- a/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx +++ b/packages/design-system/lib/components/RateCard/NoRateAvailable/index.tsx @@ -1,10 +1,10 @@ -import { IconButton } from '../../IconButton' -import { Typography } from '../../Typography' -import styles from '../rate-card.module.css' -import { variants } from '../variants' +import { IconButton } from "../../IconButton" +import { Typography } from "../../Typography" +import styles from "../rate-card.module.css" +import { variants } from "../variants" interface NoRateAvailableCardProps { - variant: 'Regular' | 'Campaign' | 'Code' | 'Points' + variant: "Regular" | "Campaign" | "Code" | "Points" rateTitle: string paymentTerm: string bannerText?: string 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 8b22d74dd..9ada1641a 100644 --- a/packages/design-system/lib/components/RateCard/Points/Points.stories.tsx +++ b/packages/design-system/lib/components/RateCard/Points/Points.stories.tsx @@ -1,27 +1,27 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import PointsRateCard from '.' +import PointsRateCard from "." const meta: Meta = { - title: 'Product Components/RateCard/Points', + title: "Product Components/RateCard/Points", component: PointsRateCard, decorators: [ (Story) => ( -
+
), ], argTypes: { - rateTitle: { control: 'text' }, - paymentTerm: { control: 'text' }, - bannerText: { control: 'text' }, - rates: { control: 'object' }, - selectedRate: { control: 'text' }, - onRateSelect: { action: 'onRateSelect' }, - isNotEnoughPoints: { control: 'boolean' }, - notEnoughPointsText: { control: 'text' }, - rateTermDetails: { control: 'object' }, + rateTitle: { control: "text" }, + paymentTerm: { control: "text" }, + bannerText: { control: "text" }, + rates: { control: "object" }, + selectedRate: { control: "text" }, + onRateSelect: { action: "onRateSelect" }, + isNotEnoughPoints: { control: "boolean" }, + notEnoughPointsText: { control: "text" }, + rateTermDetails: { control: "object" }, }, } @@ -31,40 +31,40 @@ type Story = StoryObj export const Default: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'Reward night โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "Reward night โˆ™ Breakfast included", rates: [ { - points: '20000', - currency: 'PTS', - rateCode: 'REDNIGHT7', + points: "20000", + currency: "PTS", + rateCode: "REDNIGHT7", }, { - points: '15000', - currency: 'PTS', + points: "15000", + currency: "PTS", additionalPrice: { - price: '250', - currency: 'EUR', + price: "250", + currency: "EUR", }, - rateCode: 'REDNIGHT7A', + rateCode: "REDNIGHT7A", }, { - points: '10000', - currency: 'PTS', + points: "10000", + currency: "PTS", additionalPrice: { - price: '500', - currency: 'EUR', + price: "500", + currency: "EUR", }, - rateCode: 'REDNIGHT7B', + rateCode: "REDNIGHT7B", }, ], selectedRate: undefined, onRateSelect: (value) => console.log(value), rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -72,42 +72,42 @@ export const Default: Story = { export const WithDisabledRates: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'Reward night โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "Reward night โˆ™ Breakfast included", rates: [ { - points: '20000', - currency: 'PTS', + points: "20000", + currency: "PTS", isDisabled: true, - rateCode: 'REDNIGHT7', + rateCode: "REDNIGHT7", }, { - points: '15000', - currency: 'PTS', + points: "15000", + currency: "PTS", isDisabled: true, additionalPrice: { - price: '250', - currency: 'EUR', + price: "250", + currency: "EUR", }, - rateCode: 'REDNIGHT7A', + rateCode: "REDNIGHT7A", }, { - points: '10000', - currency: 'PTS', + points: "10000", + currency: "PTS", additionalPrice: { - price: '500', - currency: 'EUR', + price: "500", + currency: "EUR", }, - rateCode: 'REDNIGHT7B', + rateCode: "REDNIGHT7B", }, ], - selectedRate: '2', + selectedRate: "2", onRateSelect: (value) => console.log(value), rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -115,42 +115,42 @@ export const WithDisabledRates: Story = { export const NotEnoughPoints: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY LATER', - bannerText: 'Reward night โˆ™ Breakfast included', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY LATER", + bannerText: "Reward night โˆ™ Breakfast included", rates: [ { - points: '20000', - currency: 'PTS', - rateCode: 'REDNIGHT7', + points: "20000", + currency: "PTS", + rateCode: "REDNIGHT7", }, { - points: '15000', - currency: 'PTS', + points: "15000", + currency: "PTS", additionalPrice: { - price: '250', - currency: 'EUR', + price: "250", + currency: "EUR", }, - rateCode: 'REDNIGHT7A', + rateCode: "REDNIGHT7A", }, { - points: '10000', - currency: 'PTS', + points: "10000", + currency: "PTS", additionalPrice: { - price: '500', - currency: 'EUR', + price: "500", + currency: "EUR", }, - rateCode: 'REDNIGHT7B', + rateCode: "REDNIGHT7B", }, ], selectedRate: undefined, isNotEnoughPoints: true, - notEnoughPointsText: 'Not enough points', + notEnoughPointsText: "Not enough points", onRateSelect: (value) => console.log(value), rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, diff --git a/packages/design-system/lib/components/RateCard/Points/index.tsx b/packages/design-system/lib/components/RateCard/Points/index.tsx index 43289cb2d..6684a90db 100644 --- a/packages/design-system/lib/components/RateCard/Points/index.tsx +++ b/packages/design-system/lib/components/RateCard/Points/index.tsx @@ -1,14 +1,14 @@ -import { Typography } from '../../Typography' -import { RatePointsOption, RateTermDetails } from '../types' +import { Typography } from "../../Typography" +import { RatePointsOption, RateTermDetails } from "../types" -import { RadioGroup } from 'react-aria-components' -import { useIntl } from 'react-intl' -import { IconButton } from '../../IconButton' -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { Radio } from '../../Radio' -import Modal from '../Modal' -import styles from '../rate-card.module.css' -import { variants } from '../variants' +import { RadioGroup } from "react-aria-components" +import { useIntl } from "react-intl" +import { IconButton } from "../../IconButton" +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { Radio } from "../../Radio" +import Modal from "../Modal" +import styles from "../rate-card.module.css" +import { variants } from "../variants" interface PointsRateCardProps { rateTitle: string @@ -38,7 +38,7 @@ export default function PointsRateCard({ rateTermDetails, }: PointsRateCardProps) { const classNames = variants({ - variant: 'Points', + variant: "Points", }) const intl = useIntl() @@ -60,8 +60,8 @@ export default function PointsRateCard({ emphasis size="sm" aria-label={intl.formatMessage({ - id: 'selectRate.rateCard.openReservationPolicy', - defaultMessage: 'Open reservation policy', + id: "selectRate.rateCard.openReservationPolicy", + defaultMessage: "Open reservation policy", })} iconName="info" /> @@ -119,7 +119,7 @@ export default function PointsRateCard({ {/* eslint-disable-next-line formatjs/no-literal-string-in-jsx */} - {`${rate.currency} ${rate.additionalPrice ? ' + ' : ''}`} + {`${rate.currency} ${rate.additionalPrice ? " + " : ""}`}

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 d5d60b52d..9d2f169f8 100644 --- a/packages/design-system/lib/components/RateCard/Regular/Regular.stories.tsx +++ b/packages/design-system/lib/components/RateCard/Regular/Regular.stories.tsx @@ -1,24 +1,24 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import RegularRateCard from '.' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import RegularRateCard from "." const meta: Meta = { - title: 'Product Components/RateCard/Regular', + title: "Product Components/RateCard/Regular", component: RegularRateCard, decorators: [ (Story) => ( -
+
), ], argTypes: { - rateTitle: { control: 'text' }, - paymentTerm: { control: 'text' }, - rate: { control: 'object' }, - memberRate: { control: 'object' }, - omnibusRate: { control: 'object' }, - approximateRate: { control: 'object' }, - rateTermDetails: { control: 'object' }, + rateTitle: { control: "text" }, + paymentTerm: { control: "text" }, + rate: { control: "object" }, + memberRate: { control: "object" }, + omnibusRate: { control: "object" }, + approximateRate: { control: "object" }, + rateTermDetails: { control: "object" }, }, } @@ -28,32 +28,32 @@ type Story = StoryObj export const Default: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", rate: { - label: 'Standard Price', - price: '1980', - unit: 'SEK/NIGHT', + label: "Standard Price", + price: "1980", + unit: "SEK/NIGHT", }, memberRate: { - label: 'Member Price', - price: '1900', - unit: 'SEK/NIGHT', + label: "Member Price", + price: "1900", + unit: "SEK/NIGHT", }, approximateRate: { - price: '198', - label: 'Approx.', - unit: 'EUR', + price: "198", + label: "Approx.", + unit: "EUR", }, omnibusRate: { - label: 'Lowest past price (last 30 days)', - price: '1690', - unit: 'SEK/NIGHT', + label: "Lowest past price (last 30 days)", + price: "1690", + unit: "SEK/NIGHT", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -62,27 +62,27 @@ export const Default: Story = { export const Selected: Story = { args: { isSelected: true, - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", rate: { - label: 'Standard Price', - price: '1980', - unit: 'SEK/NIGHT', + label: "Standard Price", + price: "1980", + unit: "SEK/NIGHT", }, memberRate: { - label: 'Member Price', - price: '1900', - unit: 'SEK/NIGHT', + label: "Member Price", + price: "1900", + unit: "SEK/NIGHT", }, approximateRate: { - price: '198', - label: 'Approx.', - unit: 'EUR', + price: "198", + label: "Approx.", + unit: "EUR", }, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, @@ -90,28 +90,28 @@ export const Selected: Story = { export const MemberRateActive: Story = { args: { - rateTitle: 'FREE CANCELLATION', - paymentTerm: 'PAY NOW', + rateTitle: "FREE CANCELLATION", + paymentTerm: "PAY NOW", rate: { - label: 'Standard Price', - price: '1980', - unit: 'SEK', + label: "Standard Price", + price: "1980", + unit: "SEK", }, memberRate: { - label: 'Member Price', - price: '1900', - unit: 'SEK/NIGHT', + label: "Member Price", + price: "1900", + unit: "SEK/NIGHT", }, approximateRate: { - price: '190', - label: 'Approx.', - unit: 'EUR', + price: "190", + label: "Approx.", + unit: "EUR", }, isMemberRateActive: true, rateTermDetails: [ { - title: 'Rate definition 1', - terms: ['term 1', 'term 2', 'term 3'], + title: "Rate definition 1", + terms: ["term 1", "term 2", "term 3"], }, ], }, diff --git a/packages/design-system/lib/components/RateCard/Regular/index.tsx b/packages/design-system/lib/components/RateCard/Regular/index.tsx index 9c186ce2c..7a43c0c92 100644 --- a/packages/design-system/lib/components/RateCard/Regular/index.tsx +++ b/packages/design-system/lib/components/RateCard/Regular/index.tsx @@ -1,14 +1,14 @@ -import { Rate, RateTermDetails } from '../types' +import { Rate, RateTermDetails } from "../types" -import { cx } from 'class-variance-authority' -import { Button as ButtonRAC } from 'react-aria-components' -import { useIntl } from 'react-intl' -import { IconButton } from '../../IconButton' -import { MaterialIcon } from '../../Icons/MaterialIcon' -import { Typography } from '../../Typography' -import Modal from '../Modal' -import styles from '../rate-card.module.css' -import { variants } from '../variants' +import { cx } from "class-variance-authority" +import { Button as ButtonRAC } from "react-aria-components" +import { useIntl } from "react-intl" +import { IconButton } from "../../IconButton" +import { MaterialIcon } from "../../Icons/MaterialIcon" +import { Typography } from "../../Typography" +import Modal from "../Modal" +import styles from "../rate-card.module.css" +import { variants } from "../variants" interface RegularRateCardProps { id: string @@ -39,7 +39,7 @@ export default function RegularRateCard({ handleChange, rateTermDetails, }: RegularRateCardProps) { - const classNames = variants({ variant: 'Regular' }) + const classNames = variants({ variant: "Regular" }) const intl = useIntl() @@ -69,8 +69,8 @@ export default function RegularRateCard({ size="sm" className={styles.triggerButton} aria-label={intl.formatMessage({ - id: 'selectRate.rateCard.openReservationPolicy', - defaultMessage: 'Open reservation policy', + id: "selectRate.rateCard.openReservationPolicy", + defaultMessage: "Open reservation policy", })} iconName="info" /> diff --git a/packages/design-system/lib/components/RateCard/variants.ts b/packages/design-system/lib/components/RateCard/variants.ts index 3e81f57ef..b2da80eec 100644 --- a/packages/design-system/lib/components/RateCard/variants.ts +++ b/packages/design-system/lib/components/RateCard/variants.ts @@ -1,18 +1,18 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './rate-card.module.css' +import styles from "./rate-card.module.css" export const config = { variants: { variant: { - Regular: styles['variant-regular'], - Campaign: styles['variant-campaign'], - Code: styles['variant-code'], - Points: styles['variant-points'], + Regular: styles["variant-regular"], + Campaign: styles["variant-campaign"], + Code: styles["variant-code"], + Points: styles["variant-points"], }, }, defaultVariants: { - variant: 'Regular', + variant: "Regular", }, } as const diff --git a/packages/design-system/lib/components/Select/Select.stories.tsx b/packages/design-system/lib/components/Select/Select.stories.tsx index 479d9754f..a0ec5ebcb 100644 --- a/packages/design-system/lib/components/Select/Select.stories.tsx +++ b/packages/design-system/lib/components/Select/Select.stories.tsx @@ -1,9 +1,9 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { Select } from './Select' +import { Select } from "./Select" const meta: Meta = { - title: 'Core Components/Select', + title: "Core Components/Select", component: Select, argTypes: {}, } @@ -13,43 +13,43 @@ export default meta type Story = StoryObj const items = [ - { label: 'Foo', value: 'foo' }, - { label: 'Bar', value: 'bar' }, - { label: 'Baz', value: 'baz' }, + { label: "Foo", value: "foo" }, + { label: "Bar", value: "bar" }, + { label: "Baz", value: "baz" }, ] export const Default: Story = { args: { items, - label: 'Select an item', - name: 'foo', + label: "Select an item", + name: "foo", }, } export const DefaultSelected: Story = { args: { items, - label: 'Select an item', - name: 'foo', - defaultSelectedKey: 'foo', + label: "Select an item", + name: "foo", + defaultSelectedKey: "foo", }, } export const Icons: Story = { args: { items, - label: 'Select an item', - name: 'foo', - icon: 'star', - itemIcon: 'check', + label: "Select an item", + name: "foo", + icon: "star", + itemIcon: "check", }, } export const Filtering: Story = { args: { items, - label: 'Select an item', - name: 'foo', + label: "Select an item", + name: "foo", enableFiltering: true, }, } @@ -57,9 +57,9 @@ export const Filtering: Story = { export const FilteringSelected: Story = { args: { items, - label: 'Select an item', - name: 'foo', + label: "Select an item", + name: "foo", enableFiltering: true, - defaultSelectedKey: 'foo', + defaultSelectedKey: "foo", }, } diff --git a/packages/design-system/lib/components/Select/Select.tsx b/packages/design-system/lib/components/Select/Select.tsx index 0e6664836..c57bb4fd3 100644 --- a/packages/design-system/lib/components/Select/Select.tsx +++ b/packages/design-system/lib/components/Select/Select.tsx @@ -4,19 +4,19 @@ import { Popover, ListBox, Button, -} from 'react-aria-components' -import { cx } from 'class-variance-authority' +} from "react-aria-components" +import { cx } from "class-variance-authority" -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' -import { SelectItem } from './SelectItem' -import { SelectFilter } from './SelectFilter' +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" +import { SelectItem } from "./SelectItem" +import { SelectFilter } from "./SelectFilter" -import type { SelectProps, SelectFilterProps } from './types' +import type { SelectProps, SelectFilterProps } from "./types" -import styles from './select.module.css' -import { useState } from 'react' -import { InputLabel } from '../InputLabel' +import styles from "./select.module.css" +import { useState } from "react" +import { InputLabel } from "../InputLabel" export function Select({ name, @@ -41,7 +41,7 @@ export function Select({ /> ) } - const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default' + const iconColor = isDisabled ? "Icon/Interactive/Disabled" : "Icon/Default" return ( (defaultSelectedKey ?? null) - const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default' + const iconColor = isDisabled ? "Icon/Interactive/Disabled" : "Icon/Default" const inputRef = useRef(null!) diff --git a/packages/design-system/lib/components/Select/SelectItem.tsx b/packages/design-system/lib/components/Select/SelectItem.tsx index 0a2d8a631..651e91163 100644 --- a/packages/design-system/lib/components/Select/SelectItem.tsx +++ b/packages/design-system/lib/components/Select/SelectItem.tsx @@ -1,8 +1,8 @@ -import { ListBoxItem } from 'react-aria-components' -import { Typography } from '../Typography' -import styles from './select.module.css' -import { MaterialIcon } from '../Icons/MaterialIcon' -import { SelectItemProps } from './types' +import { ListBoxItem } from "react-aria-components" +import { Typography } from "../Typography" +import styles from "./select.module.css" +import { MaterialIcon } from "../Icons/MaterialIcon" +import { SelectItemProps } from "./types" export function SelectItem({ children, @@ -10,7 +10,7 @@ export function SelectItem({ isDisabled, ...props }: SelectItemProps) { - const iconColor = isDisabled ? 'Icon/Interactive/Disabled' : 'Icon/Default' + const iconColor = isDisabled ? "Icon/Interactive/Disabled" : "Icon/Default" return ( {children} diff --git a/packages/design-system/lib/components/Select/index.tsx b/packages/design-system/lib/components/Select/index.tsx index 20fbbe724..5f216efba 100644 --- a/packages/design-system/lib/components/Select/index.tsx +++ b/packages/design-system/lib/components/Select/index.tsx @@ -1,3 +1,3 @@ -export { Select } from './Select' -export { SelectItem } from './SelectItem' -export { SelectFilter } from './SelectFilter' +export { Select } from "./Select" +export { SelectItem } from "./SelectItem" +export { SelectFilter } from "./SelectFilter" diff --git a/packages/design-system/lib/components/Select/select.module.css b/packages/design-system/lib/components/Select/select.module.css index 9797a8f27..27f00a436 100644 --- a/packages/design-system/lib/components/Select/select.module.css +++ b/packages/design-system/lib/components/Select/select.module.css @@ -7,7 +7,7 @@ box-sizing: border-box; &[data-required] .label::after { - content: ' *'; + content: " *"; } &[data-open] { .chevron { @@ -92,7 +92,7 @@ padding: 0; width: 100%; - &[value]:not([value='']) { + &[value]:not([value=""]) { min-height: 24px; } } diff --git a/packages/design-system/lib/components/Select/types.ts b/packages/design-system/lib/components/Select/types.ts index 027f506d1..2cde3e0a3 100644 --- a/packages/design-system/lib/components/Select/types.ts +++ b/packages/design-system/lib/components/Select/types.ts @@ -1,18 +1,18 @@ -import { ComponentProps, InputHTMLAttributes } from 'react' -import { ComboBox, Key, ListBoxItem, Select } from 'react-aria-components' -import { MaterialIconProps } from '../Icons/MaterialIcon' +import { ComponentProps, InputHTMLAttributes } from "react" +import { ComboBox, Key, ListBoxItem, Select } from "react-aria-components" +import { MaterialIconProps } from "../Icons/MaterialIcon" interface Item extends Record { label: string value: Key isDisabled?: boolean - icon?: MaterialIconProps['icon'] + icon?: MaterialIconProps["icon"] } export interface SelectProps extends ComponentProps { autoComplete?: string - icon?: MaterialIconProps['icon'] - itemIcon?: MaterialIconProps['icon'] + icon?: MaterialIconProps["icon"] + itemIcon?: MaterialIconProps["icon"] items: Item[] name: string label: string @@ -21,15 +21,15 @@ export interface SelectProps extends ComponentProps { } export interface SelectItemProps extends ComponentProps { - icon?: MaterialIconProps['icon'] + icon?: MaterialIconProps["icon"] children: string } export interface SelectFilterProps extends ComponentProps { - autoComplete?: InputHTMLAttributes['autoComplete'] - inputMode?: InputHTMLAttributes['inputMode'] - icon?: MaterialIconProps['icon'] - itemIcon?: MaterialIconProps['icon'] + autoComplete?: InputHTMLAttributes["autoComplete"] + inputMode?: InputHTMLAttributes["inputMode"] + icon?: MaterialIconProps["icon"] + itemIcon?: MaterialIconProps["icon"] items: Item[] name: string label: string diff --git a/packages/design-system/lib/components/SidePeek/KeepBodyVisible.tsx b/packages/design-system/lib/components/SidePeek/KeepBodyVisible.tsx index b688bc4be..e59a60635 100644 --- a/packages/design-system/lib/components/SidePeek/KeepBodyVisible.tsx +++ b/packages/design-system/lib/components/SidePeek/KeepBodyVisible.tsx @@ -1,5 +1,5 @@ -import useSetOverflowVisibleOnRA from '@scandic-hotels/common/hooks/useSetOverflowVisibleOnRA' -import { useEffect } from 'react' +import useSetOverflowVisibleOnRA from "@scandic-hotels/common/hooks/useSetOverflowVisibleOnRA" +import { useEffect } from "react" export function KeepBodyVisible() { const toggle = useSetOverflowVisibleOnRA() diff --git a/packages/design-system/lib/components/SidePeek/SelfControlled.tsx b/packages/design-system/lib/components/SidePeek/SelfControlled.tsx index 9c60917a5..5c156d5fa 100644 --- a/packages/design-system/lib/components/SidePeek/SelfControlled.tsx +++ b/packages/design-system/lib/components/SidePeek/SelfControlled.tsx @@ -1,18 +1,18 @@ -'use client' +"use client" -import { useEffect } from 'react' -import { Dialog, Modal, ModalOverlay } from 'react-aria-components' -import { useIntl } from 'react-intl' +import { useEffect } from "react" +import { Dialog, Modal, ModalOverlay } from "react-aria-components" +import { useIntl } from "react-intl" -import usePopStateHandler from '@scandic-hotels/common/hooks/usePopStateHandler' +import usePopStateHandler from "@scandic-hotels/common/hooks/usePopStateHandler" -import { IconButton } from '../IconButton' -import { Typography } from '../Typography' +import { IconButton } from "../IconButton" +import { Typography } from "../Typography" -import SidePeekSEO from './SidePeekSEO' +import SidePeekSEO from "./SidePeekSEO" -import { KeepBodyVisible } from './KeepBodyVisible' -import styles from './sidePeek.module.css' +import { KeepBodyVisible } from "./KeepBodyVisible" +import styles from "./sidePeek.module.css" interface SidePeekSelfControlledProps extends React.PropsWithChildren { title: string @@ -41,7 +41,7 @@ export default function SidePeekSelfControlled({ useEffect(() => { if (isOpen) { - window.history.pushState(null, '', window.location.href) + window.history.pushState(null, "", window.location.href) } }, [isOpen]) @@ -68,8 +68,8 @@ export default function SidePeekSelfControlled({ emphasis onPress={() => handleClose(true)} aria-label={intl.formatMessage({ - id: 'common.close', - defaultMessage: 'Close', + id: "common.close", + defaultMessage: "Close", })} iconName="close" /> diff --git a/packages/design-system/lib/components/SidePeek/SidePeekContext/SidePeekProvider.tsx b/packages/design-system/lib/components/SidePeek/SidePeekContext/SidePeekProvider.tsx index 7215f63bc..c0dddeca9 100644 --- a/packages/design-system/lib/components/SidePeek/SidePeekContext/SidePeekProvider.tsx +++ b/packages/design-system/lib/components/SidePeek/SidePeekContext/SidePeekProvider.tsx @@ -1,6 +1,6 @@ -'use client' -import { useEffect, useState } from 'react' -import { SidePeekContext } from './index' +"use client" +import { useEffect, useState } from "react" +import { SidePeekContext } from "./index" interface SidepeekProviderProps extends React.PropsWithChildren { onOpen?: (sidePeek: string) => void @@ -16,7 +16,7 @@ export default function SidePeekProvider({ }: SidepeekProviderProps) { const [activeSidePeek, setActiveSidePeek] = useState(null) useEffect(() => { - const sidePeekParam = searchParams.get('s') + const sidePeekParam = searchParams.get("s") if (sidePeekParam !== activeSidePeek) { setActiveSidePeek(sidePeekParam) } diff --git a/packages/design-system/lib/components/SidePeek/SidePeekContext/index.tsx b/packages/design-system/lib/components/SidePeek/SidePeekContext/index.tsx index a9419db08..dbceaf827 100644 --- a/packages/design-system/lib/components/SidePeek/SidePeekContext/index.tsx +++ b/packages/design-system/lib/components/SidePeek/SidePeekContext/index.tsx @@ -1,5 +1,5 @@ -'use client' -import { createContext } from 'react' +"use client" +import { createContext } from "react" interface ISidePeekContext { handleClose: (isOpen: boolean) => void diff --git a/packages/design-system/lib/components/SidePeek/index.tsx b/packages/design-system/lib/components/SidePeek/index.tsx index c7ec94582..2aa1546a4 100644 --- a/packages/design-system/lib/components/SidePeek/index.tsx +++ b/packages/design-system/lib/components/SidePeek/index.tsx @@ -1,17 +1,17 @@ -'use client' +"use client" -import { useCallback, useContext, useRef } from 'react' -import { Dialog, Modal, ModalOverlay } from 'react-aria-components' -import { IconButton } from '../IconButton' -import { Typography } from '../Typography' +import { useCallback, useContext, useRef } from "react" +import { Dialog, Modal, ModalOverlay } from "react-aria-components" +import { IconButton } from "../IconButton" +import { Typography } from "../Typography" -import { SidePeekContext } from './SidePeekContext' +import { SidePeekContext } from "./SidePeekContext" -import SidePeekSEO from './SidePeekSEO' +import SidePeekSEO from "./SidePeekSEO" -import { debounce } from '@scandic-hotels/common/utils/debounce' -import { KeepBodyVisible } from './KeepBodyVisible' -import styles from './sidePeek.module.css' +import { debounce } from "@scandic-hotels/common/utils/debounce" +import { KeepBodyVisible } from "./KeepBodyVisible" +import styles from "./sidePeek.module.css" interface SidePeekProps { contentKey?: string @@ -45,7 +45,7 @@ export default function SidePeek({ const height = entry.contentRect.height dialogRef.current?.style.setProperty( - '--sidepeek-header-height', + "--sidepeek-header-height", `${height}px` ) }, 100) @@ -56,7 +56,7 @@ export default function SidePeek({ return () => { observer.unobserve(node) observer.disconnect() - dialogRef.current?.style.removeProperty('--sidepeek-header-height') + dialogRef.current?.style.removeProperty("--sidepeek-header-height") } } }, []) diff --git a/packages/design-system/lib/components/SkeletonShimmer/index.tsx b/packages/design-system/lib/components/SkeletonShimmer/index.tsx index 80f3feeb4..b51e13a71 100644 --- a/packages/design-system/lib/components/SkeletonShimmer/index.tsx +++ b/packages/design-system/lib/components/SkeletonShimmer/index.tsx @@ -1,6 +1,6 @@ -import { cva, cx } from 'class-variance-authority' +import { cva, cx } from "class-variance-authority" -import styles from './skeleton.module.css' +import styles from "./skeleton.module.css" const variants = cva(styles.shimmer, { variants: { @@ -10,12 +10,12 @@ const variants = cva(styles.shimmer, { }, display: { block: styles.block, - 'inline-block': styles.inlineBlock, + "inline-block": styles.inlineBlock, }, }, defaultVariants: { - contrast: 'light', - display: 'inline-block', + contrast: "light", + display: "inline-block", }, }) @@ -23,14 +23,14 @@ export default function SkeletonShimmer({ className, height, width, - contrast = 'light', - display = 'inline-block', + contrast = "light", + display = "inline-block", }: { className?: string height?: string width?: string - contrast?: 'light' | 'dark' - display?: 'block' | 'inline-block' + contrast?: "light" | "dark" + display?: "block" | "inline-block" }) { return ( {/* zero width space, allows for font styles to affect height */} diff --git a/packages/design-system/lib/components/SkeletonShimmer/skeleton.module.css b/packages/design-system/lib/components/SkeletonShimmer/skeleton.module.css index 8a90bebf6..96e23e40d 100644 --- a/packages/design-system/lib/components/SkeletonShimmer/skeleton.module.css +++ b/packages/design-system/lib/components/SkeletonShimmer/skeleton.module.css @@ -37,7 +37,7 @@ transform: translateX(-100%); background-image: var(--shimmer); animation: shimmer 3s infinite; - content: ''; + content: ""; } .shimmer span { visibility: hidden; diff --git a/packages/design-system/lib/components/StaticMap/index.tsx b/packages/design-system/lib/components/StaticMap/index.tsx index 9c9d1ef82..3e3773468 100644 --- a/packages/design-system/lib/components/StaticMap/index.tsx +++ b/packages/design-system/lib/components/StaticMap/index.tsx @@ -1,4 +1,4 @@ -import { getUrlWithSignature } from './utils' +import { getUrlWithSignature } from "./utils" export type StaticMapProps = { city?: string @@ -10,7 +10,7 @@ export type StaticMapProps = { width: number height: number zoomLevel?: number - mapType?: 'roadmap' | 'satellite' | 'terrain' | 'hybrid' + mapType?: "roadmap" | "satellite" | "terrain" | "hybrid" altText: string mapId?: string googleMapKey: string @@ -45,7 +45,7 @@ export default async function StaticMap({ width, height, zoomLevel = 14, - mapType = 'roadmap', + mapType = "roadmap", altText, mapId, googleMapKey, @@ -53,7 +53,7 @@ export default async function StaticMap({ }: StaticMapProps) { // const key = env.GOOGLE_STATIC_MAP_KEY // const secret = env.GOOGLE_STATIC_MAP_SIGNATURE_SECRET - const baseUrl = 'https://maps.googleapis.com/maps/api/staticmap' + const baseUrl = "https://maps.googleapis.com/maps/api/staticmap" const center = getCenter({ coordinates, city, country }) if (!center) { @@ -66,7 +66,7 @@ export default async function StaticMap({ ) if (mapId) { - url.searchParams.append('map_id', mapId) + url.searchParams.append("map_id", mapId) } const src = getUrlWithSignature(url, googleMapSecret) diff --git a/packages/design-system/lib/components/StaticMap/utils.ts b/packages/design-system/lib/components/StaticMap/utils.ts index c6dafbbf5..2e01028c6 100644 --- a/packages/design-system/lib/components/StaticMap/utils.ts +++ b/packages/design-system/lib/components/StaticMap/utils.ts @@ -1,4 +1,4 @@ -import crypto from 'node:crypto' +import crypto from "node:crypto" /** * Util functions taken from https://developers.google.com/maps/documentation/maps-static/digital-signature#sample-code-for-url-signing @@ -13,7 +13,7 @@ import crypto from 'node:crypto' * @return {string} */ function removeWebSafe(safeEncodedString: string) { - return safeEncodedString.replace(/-/g, '+').replace(/_/g, '/') + return safeEncodedString.replace(/-/g, "+").replace(/_/g, "/") } /** @@ -24,7 +24,7 @@ function removeWebSafe(safeEncodedString: string) { * @return {string} */ function makeWebSafe(encodedString: string) { - return encodedString.replace(/\+/g, '-').replace(/\//g, '_') + return encodedString.replace(/\+/g, "-").replace(/\//g, "_") } /** @@ -34,7 +34,7 @@ function makeWebSafe(encodedString: string) { * @return {string} */ function decodeBase64Hash(code: string) { - return Buffer.from(code, 'base64') + return Buffer.from(code, "base64") } /** @@ -45,7 +45,7 @@ function decodeBase64Hash(code: string) { * @return {string} */ function encodeBase64Hash(key: Buffer, data: string) { - return crypto.createHmac('sha1', key).update(data).digest('base64') + return crypto.createHmac("sha1", key).update(data).digest("base64") } /** @@ -55,7 +55,7 @@ function encodeBase64Hash(key: Buffer, data: string) { * @param {string} secret Your unique secret key. * @return {string} */ -export function getUrlWithSignature(url: URL, secret = '') { +export function getUrlWithSignature(url: URL, secret = "") { const path = url.pathname + url.search const safeSecret = decodeBase64Hash(removeWebSafe(secret)) const hashedSignature = makeWebSafe(encodeBase64Hash(safeSecret, path)) diff --git a/packages/design-system/lib/components/Stepper/index.tsx b/packages/design-system/lib/components/Stepper/index.tsx index 1592c4b7d..ce7a88b3a 100644 --- a/packages/design-system/lib/components/Stepper/index.tsx +++ b/packages/design-system/lib/components/Stepper/index.tsx @@ -1,8 +1,8 @@ -import { IconButton } from '../IconButton' -import { Tooltip } from '../Tooltip' -import { Typography } from '../Typography' +import { IconButton } from "../IconButton" +import { Tooltip } from "../Tooltip" +import { Typography } from "../Typography" -import styles from './stepper.module.css' +import styles from "./stepper.module.css" type StepperProps = { count: number diff --git a/packages/design-system/lib/components/Subtitle/index.tsx b/packages/design-system/lib/components/Subtitle/index.tsx index 217e7a5bf..863890334 100644 --- a/packages/design-system/lib/components/Subtitle/index.tsx +++ b/packages/design-system/lib/components/Subtitle/index.tsx @@ -1,12 +1,13 @@ -import { Slot } from '@radix-ui/react-slot' +import { Slot } from "@radix-ui/react-slot" -import { subtitleVariants } from './variants' +import { subtitleVariants } from "./variants" -import type { VariantProps } from 'class-variance-authority' -import { Children, ReactNode } from 'react' +import type { VariantProps } from "class-variance-authority" +import { Children, ReactNode } from "react" interface SubtitleProps - extends Omit, 'color'>, + extends + Omit, "color">, VariantProps { asChild?: boolean } @@ -16,7 +17,7 @@ interface SubtitleProps */ export default function Subtitle({ asChild = false, - className = '', + className = "", color, textAlign, textTransform, @@ -26,7 +27,7 @@ export default function Subtitle({ if (checkForEmptyChildren(props.children) === 0) { return null } - const Comp = asChild ? Slot : 'p' + const Comp = asChild ? Slot : "p" const classNames = subtitleVariants({ className, color, @@ -39,7 +40,7 @@ export default function Subtitle({ function checkForEmptyChildren(children: ReactNode) { return Children.toArray(children).filter((child) => { - if (child === '') { + if (child === "") { return false } else if (child == null) { return false diff --git a/packages/design-system/lib/components/Subtitle/variants.ts b/packages/design-system/lib/components/Subtitle/variants.ts index ea4c68c0f..8f5bc72dd 100644 --- a/packages/design-system/lib/components/Subtitle/variants.ts +++ b/packages/design-system/lib/components/Subtitle/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './subtitle.module.css' +import styles from "./subtitle.module.css" const config = { variants: { @@ -32,10 +32,10 @@ const config = { }, }, defaultVariants: { - color: 'black', - textAlign: 'left', - textTransform: 'regular', - type: 'one', + color: "black", + textAlign: "left", + textTransform: "regular", + type: "one", }, } as const diff --git a/packages/design-system/lib/components/Switch/index.tsx b/packages/design-system/lib/components/Switch/index.tsx index a5491bc92..c3539ac6a 100644 --- a/packages/design-system/lib/components/Switch/index.tsx +++ b/packages/design-system/lib/components/Switch/index.tsx @@ -1,11 +1,11 @@ -'use client' +"use client" -import { Switch as AriaSwitch } from 'react-aria-components' -import { RegisterOptions, useController, useFormContext } from 'react-hook-form' +import { Switch as AriaSwitch } from "react-aria-components" +import { RegisterOptions, useController, useFormContext } from "react-hook-form" -import styles from './switch.module.css' -import { MaterialIcon } from '../Icons/MaterialIcon' -import Caption from '../Caption' +import styles from "./switch.module.css" +import { MaterialIcon } from "../Icons/MaterialIcon" +import Caption from "../Caption" interface SwitchProps extends React.InputHTMLAttributes { name: string diff --git a/packages/design-system/lib/components/Switch/switch.module.css b/packages/design-system/lib/components/Switch/switch.module.css index 4364d0704..3996f5602 100644 --- a/packages/design-system/lib/components/Switch/switch.module.css +++ b/packages/design-system/lib/components/Switch/switch.module.css @@ -17,7 +17,7 @@ display: block; &:before { - content: ''; + content: ""; display: block; margin: 2px; width: 16px; diff --git a/packages/design-system/lib/components/Table/ScrollWrapper/index.tsx b/packages/design-system/lib/components/Table/ScrollWrapper/index.tsx index 2ba88c50e..a2d542fe3 100644 --- a/packages/design-system/lib/components/Table/ScrollWrapper/index.tsx +++ b/packages/design-system/lib/components/Table/ScrollWrapper/index.tsx @@ -1,10 +1,10 @@ -'use client' +"use client" -import { useMemo } from 'react' +import { useMemo } from "react" -import styles from './scrollWrapper.module.css' +import styles from "./scrollWrapper.module.css" -import useScrollShadows from '@scandic-hotels/common/hooks/useScrollShadows' +import useScrollShadows from "@scandic-hotels/common/hooks/useScrollShadows" export default function ScrollWrapper({ className, @@ -21,7 +21,7 @@ export default function ScrollWrapper({ if (showRightShadow) { cls.push(styles.rightShadow) } - return cls.join(' ') + return cls.join(" ") }, [showLeftShadow, showRightShadow, className]) return ( diff --git a/packages/design-system/lib/components/Table/ScrollWrapper/scrollWrapper.module.css b/packages/design-system/lib/components/Table/ScrollWrapper/scrollWrapper.module.css index 46d4d98cd..46d7107e9 100644 --- a/packages/design-system/lib/components/Table/ScrollWrapper/scrollWrapper.module.css +++ b/packages/design-system/lib/components/Table/ScrollWrapper/scrollWrapper.module.css @@ -5,7 +5,7 @@ .scrollWrapper::before, .scrollWrapper::after { - content: ''; + content: ""; position: absolute; top: 0; height: 100%; diff --git a/packages/design-system/lib/components/Table/TBody.tsx b/packages/design-system/lib/components/Table/TBody.tsx index 8ef45b527..3d6a45dcc 100644 --- a/packages/design-system/lib/components/Table/TBody.tsx +++ b/packages/design-system/lib/components/Table/TBody.tsx @@ -1,4 +1,4 @@ -import styles from './table.module.css' +import styles from "./table.module.css" function TBody({ children }: React.PropsWithChildren) { return {children} diff --git a/packages/design-system/lib/components/Table/TD.tsx b/packages/design-system/lib/components/Table/TD.tsx index 7ac669188..210437ecf 100644 --- a/packages/design-system/lib/components/Table/TD.tsx +++ b/packages/design-system/lib/components/Table/TD.tsx @@ -1,4 +1,4 @@ -import styles from './table.module.css' +import styles from "./table.module.css" function TD({ children, diff --git a/packages/design-system/lib/components/Table/TH.tsx b/packages/design-system/lib/components/Table/TH.tsx index 01c9835bb..657dc2b1d 100644 --- a/packages/design-system/lib/components/Table/TH.tsx +++ b/packages/design-system/lib/components/Table/TH.tsx @@ -1,8 +1,8 @@ -import styles from './table.module.css' +import styles from "./table.module.css" -import type { THeadProps } from './table' +import type { THeadProps } from "./table" -function TH({ children, width = 'auto', ...props }: THeadProps) { +function TH({ children, width = "auto", ...props }: THeadProps) { return ( {children} diff --git a/packages/design-system/lib/components/Table/THead.tsx b/packages/design-system/lib/components/Table/THead.tsx index b4d0e83e2..f049c168e 100644 --- a/packages/design-system/lib/components/Table/THead.tsx +++ b/packages/design-system/lib/components/Table/THead.tsx @@ -1,4 +1,4 @@ -import styles from './table.module.css' +import styles from "./table.module.css" function THead({ children }: React.PropsWithChildren) { return {children} diff --git a/packages/design-system/lib/components/Table/TR.tsx b/packages/design-system/lib/components/Table/TR.tsx index 0c3a251d9..d6b12ded8 100644 --- a/packages/design-system/lib/components/Table/TR.tsx +++ b/packages/design-system/lib/components/Table/TR.tsx @@ -1,4 +1,4 @@ -import styles from './table.module.css' +import styles from "./table.module.css" function TR({ children, diff --git a/packages/design-system/lib/components/Table/index.tsx b/packages/design-system/lib/components/Table/index.tsx index eb0f0b7c3..917f01287 100644 --- a/packages/design-system/lib/components/Table/index.tsx +++ b/packages/design-system/lib/components/Table/index.tsx @@ -1,12 +1,12 @@ -import TBody from './TBody' -import TD from './TD' -import TH from './TH' -import THead from './THead' -import TR from './TR' -import { tableVariants } from './variants' +import TBody from "./TBody" +import TD from "./TD" +import TH from "./TH" +import THead from "./THead" +import TR from "./TR" +import { tableVariants } from "./variants" -import type { TableProps } from './table' -import ScrollWrapper from './ScrollWrapper' +import type { TableProps } from "./table" +import ScrollWrapper from "./ScrollWrapper" function Table({ className, @@ -14,7 +14,7 @@ function Table({ borderRadius, variant, layout, - width = '100%', + width = "100%", children, ...props }: TableProps) { diff --git a/packages/design-system/lib/components/Table/table.ts b/packages/design-system/lib/components/Table/table.ts index daddbf10d..f2a00988b 100644 --- a/packages/design-system/lib/components/Table/table.ts +++ b/packages/design-system/lib/components/Table/table.ts @@ -1,14 +1,16 @@ -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" -import type { tableVariants } from './variants' +import type { tableVariants } from "./variants" export interface TableProps - extends React.PropsWithChildren>, + extends + React.PropsWithChildren>, VariantProps { width?: string } -export interface THeadProps - extends React.PropsWithChildren> { +export interface THeadProps extends React.PropsWithChildren< + React.HTMLAttributes +> { width?: string } diff --git a/packages/design-system/lib/components/Table/variants.ts b/packages/design-system/lib/components/Table/variants.ts index 6f983141a..c70202dcf 100644 --- a/packages/design-system/lib/components/Table/variants.ts +++ b/packages/design-system/lib/components/Table/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './table.module.css' +import styles from "./table.module.css" export const tableVariants = cva(styles.table, { variants: { @@ -12,7 +12,7 @@ export const tableVariants = cva(styles.table, { content: styles.content, }, borderRadius: { - none: '', + none: "", small: styles.smallRadius, medium: styles.mediumRadius, large: styles.largeRadius, @@ -22,6 +22,6 @@ export const tableVariants = cva(styles.table, { }, }, defaultVariants: { - borderRadius: 'medium', + borderRadius: "medium", }, }) diff --git a/packages/design-system/lib/components/TextLink/TextLink.stories.tsx b/packages/design-system/lib/components/TextLink/TextLink.stories.tsx index 8f2e707b1..d8664f329 100644 --- a/packages/design-system/lib/components/TextLink/TextLink.stories.tsx +++ b/packages/design-system/lib/components/TextLink/TextLink.stories.tsx @@ -1,31 +1,31 @@ -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { expect } from 'storybook/test' +import { expect } from "storybook/test" -import { TextLink } from '.' -import { MaterialIcon } from '../Icons/MaterialIcon' -import { Typography } from '../Typography' -import { config } from './variants' +import { TextLink } from "." +import { MaterialIcon } from "../Icons/MaterialIcon" +import { Typography } from "../Typography" +import { config } from "./variants" const meta: Meta = { - title: 'Core Components/TextLink', + title: "Core Components/TextLink", component: TextLink, argTypes: { theme: { - control: 'select', + control: "select", options: Object.keys(config.variants.theme), default: config.defaultVariants.theme, }, isInline: { - control: 'boolean', + control: "boolean", default: false, description: - 'Should be used when the link is placed inside a text block, removes the padding.', + "Should be used when the link is placed inside a text block, removes the padding.", }, isDisabled: { - control: 'boolean', + control: "boolean", default: false, - description: 'Disables the link and makes it non-interactive.', + description: "Disables the link and makes it non-interactive.", }, }, } @@ -36,12 +36,12 @@ type Story = StoryObj export const Default: Story = { args: { - href: 'https://www.scandichotels.com/en', + href: "https://www.scandichotels.com/en", }, render: (args) => Default link, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -49,12 +49,12 @@ export const Default: Story = { export const Inverted: Story = { args: { ...Default.args, - theme: 'Inverted', + theme: "Inverted", }, render: (args) => Inverted link, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -66,8 +66,8 @@ export const Disabled: Story = { }, render: (args) => Disabled link, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -83,8 +83,8 @@ export const WithIcon: Story = { ), play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -92,12 +92,12 @@ export const WithIcon: Story = { export const Small: Story = { args: { ...Default.args, - typography: 'Link/sm', + typography: "Link/sm", }, render: (args) => Small link, play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -105,7 +105,7 @@ export const Small: Story = { export const SmallWithIcon: Story = { args: { ...Default.args, - typography: 'Link/sm', + typography: "Link/sm", }, render: (args) => ( @@ -114,8 +114,8 @@ export const SmallWithIcon: Story = { ), play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } @@ -128,7 +128,7 @@ export const Inline: Story = { render: (args) => (

- Lorem ipsum dolor sit amet, consectetur adipiscing elit.{' '} + Lorem ipsum dolor sit amet, consectetur adipiscing elit.{" "} Inline link Curabitur vitae neque non ipsum efficitur hendrerit at ut nulla. Cras in tellus et ligula posuere ullamcorper. Praesent pulvinar rutrum metus ut gravida. @@ -136,8 +136,8 @@ export const Inline: Story = { ), play: async ({ canvasElement }) => { - const link = canvasElement.querySelector('a') - if (!link) throw new Error('Link not found') + const link = canvasElement.querySelector("a") + if (!link) throw new Error("Link not found") expect(link).toBeInTheDocument() }, } diff --git a/packages/design-system/lib/components/TextLink/TextLink.tsx b/packages/design-system/lib/components/TextLink/TextLink.tsx index 93832c3cb..2912b81e4 100644 --- a/packages/design-system/lib/components/TextLink/TextLink.tsx +++ b/packages/design-system/lib/components/TextLink/TextLink.tsx @@ -1,12 +1,12 @@ -'use client' +"use client" -import { cx } from 'class-variance-authority' -import NextLink from 'next/link' -import { TextLinkProps } from './types' -import { variants } from './variants' +import { cx } from "class-variance-authority" +import NextLink from "next/link" +import { TextLinkProps } from "./types" +import { variants } from "./variants" -import styles from './textLink.module.css' -import { useIntl } from 'react-intl' +import styles from "./textLink.module.css" +import { useIntl } from "react-intl" export function TextLink({ theme, @@ -34,12 +34,12 @@ export function TextLink({ [styles.inline]: isInline, })} title={ - props.target === '_blank' + props.target === "_blank" ? intl.formatMessage({ - id: 'common.linkOpenInNewTab', - defaultMessage: 'Opens in a new tab/window', + id: "common.linkOpenInNewTab", + defaultMessage: "Opens in a new tab/window", }) - : '' + : "" } /> ) diff --git a/packages/design-system/lib/components/TextLink/index.tsx b/packages/design-system/lib/components/TextLink/index.tsx index 3835e2b3a..0db94bffb 100644 --- a/packages/design-system/lib/components/TextLink/index.tsx +++ b/packages/design-system/lib/components/TextLink/index.tsx @@ -1 +1 @@ -export { TextLink } from './TextLink' +export { TextLink } from "./TextLink" diff --git a/packages/design-system/lib/components/TextLink/types.ts b/packages/design-system/lib/components/TextLink/types.ts index bf9dd61bc..05ea67b79 100644 --- a/packages/design-system/lib/components/TextLink/types.ts +++ b/packages/design-system/lib/components/TextLink/types.ts @@ -1,12 +1,11 @@ -import type { VariantProps } from 'class-variance-authority' -import NextLink from 'next/link' -import type { ComponentProps } from 'react' +import type { VariantProps } from "class-variance-authority" +import NextLink from "next/link" +import type { ComponentProps } from "react" -import type { variants } from './variants' +import type { variants } from "./variants" export interface TextLinkProps - extends ComponentProps, - VariantProps { + extends ComponentProps, VariantProps { isDisabled?: boolean isInline?: boolean } diff --git a/packages/design-system/lib/components/TextLink/variants.ts b/packages/design-system/lib/components/TextLink/variants.ts index a6c1393d5..d1b385897 100644 --- a/packages/design-system/lib/components/TextLink/variants.ts +++ b/packages/design-system/lib/components/TextLink/variants.ts @@ -1,23 +1,23 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" import { config as typographyConfig, withTypography, -} from '../Typography/variants' +} from "../Typography/variants" -import { deepmerge } from 'deepmerge-ts' -import styles from './textLink.module.css' +import { deepmerge } from "deepmerge-ts" +import styles from "./textLink.module.css" export const config = { variants: { theme: { - Primary: styles['theme-primary'], - Inverted: styles['theme-inverted'], - InteractiveDefault: styles['theme-interactive-default'], + Primary: styles["theme-primary"], + Inverted: styles["theme-inverted"], + InteractiveDefault: styles["theme-interactive-default"], }, }, defaultVariants: { - theme: 'Primary', + theme: "Primary", }, } as const @@ -28,7 +28,7 @@ const textLinkConfig = { }, defaultVariants: { ...config.defaultVariants, - typography: 'Link/md', + typography: "Link/md", }, } as const diff --git a/packages/design-system/lib/components/TextLinkButton/TextLinkButton.tsx b/packages/design-system/lib/components/TextLinkButton/TextLinkButton.tsx index ea1567518..76009178a 100644 --- a/packages/design-system/lib/components/TextLinkButton/TextLinkButton.tsx +++ b/packages/design-system/lib/components/TextLinkButton/TextLinkButton.tsx @@ -1,15 +1,15 @@ -import { cx } from 'class-variance-authority' +import { cx } from "class-variance-authority" -import { TextLinkProps } from '../TextLink/types' -import { getTextLinkClasses } from './textLinkStyles' +import { TextLinkProps } from "../TextLink/types" +import { getTextLinkClasses } from "./textLinkStyles" -import styles from './textLinkButton.module.css' +import styles from "./textLinkButton.module.css" export type TextLinkButtonProps = { - theme?: TextLinkProps['theme'] - typography?: TextLinkProps['typography'] - isDisabled?: TextLinkProps['isDisabled'] - isInline?: TextLinkProps['isInline'] + theme?: TextLinkProps["theme"] + typography?: TextLinkProps["typography"] + isDisabled?: TextLinkProps["isDisabled"] + isInline?: TextLinkProps["isInline"] } & React.ButtonHTMLAttributes /* A Button with the same styling as a TextLink to handle an edge case. */ diff --git a/packages/design-system/lib/components/TextLinkButton/index.tsx b/packages/design-system/lib/components/TextLinkButton/index.tsx index 9a2a31d47..816cda208 100644 --- a/packages/design-system/lib/components/TextLinkButton/index.tsx +++ b/packages/design-system/lib/components/TextLinkButton/index.tsx @@ -1 +1 @@ -export { TextLinkButton } from './TextLinkButton' +export { TextLinkButton } from "./TextLinkButton" diff --git a/packages/design-system/lib/components/TextLinkButton/textLinkStyles.ts b/packages/design-system/lib/components/TextLinkButton/textLinkStyles.ts index 30cec680d..d9884d440 100644 --- a/packages/design-system/lib/components/TextLinkButton/textLinkStyles.ts +++ b/packages/design-system/lib/components/TextLinkButton/textLinkStyles.ts @@ -1,7 +1,7 @@ -import { cx } from 'class-variance-authority' -import { variants } from '../TextLink/variants' -import styles from '../TextLink/textLink.module.css' -import type { TextLinkButtonProps } from './TextLinkButton' +import { cx } from "class-variance-authority" +import { variants } from "../TextLink/variants" +import styles from "../TextLink/textLink.module.css" +import type { TextLinkButtonProps } from "./TextLinkButton" export function getTextLinkClasses({ theme, diff --git a/packages/design-system/lib/components/Title/index.tsx b/packages/design-system/lib/components/Title/index.tsx index 161d92361..cf31b0204 100644 --- a/packages/design-system/lib/components/Title/index.tsx +++ b/packages/design-system/lib/components/Title/index.tsx @@ -1,12 +1,13 @@ -import { Children, ReactNode } from 'react' -import { headingVariants } from './variants' +import { Children, ReactNode } from "react" +import { headingVariants } from "./variants" -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" -type HeadingLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' +type HeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" export interface HeadingProps - extends Omit, 'color'>, + extends + Omit, "color">, VariantProps { as?: HeadingLevel level?: HeadingLevel @@ -22,12 +23,12 @@ export default function Title({ */ as, children, - className = '', + className = "", color, /** * What HTML tag to use. Defaults to h1. */ - level = 'h1', + level = "h1", textAlign, textTransform, ...rest @@ -52,7 +53,7 @@ export default function Title({ function checkForEmptyChildren(children: ReactNode) { return Children.toArray(children).filter((child) => { - if (child === '') { + if (child === "") { return false } else if (child == null) { return false diff --git a/packages/design-system/lib/components/Title/variants.ts b/packages/design-system/lib/components/Title/variants.ts index 98a2adaf4..0c8ef8686 100644 --- a/packages/design-system/lib/components/Title/variants.ts +++ b/packages/design-system/lib/components/Title/variants.ts @@ -1,6 +1,6 @@ -import { cva } from 'class-variance-authority' +import { cva } from "class-variance-authority" -import styles from './title.module.css' +import styles from "./title.module.css" const config = { variants: { @@ -37,10 +37,10 @@ const config = { }, }, defaultVariants: { - color: 'burgundy', - textAlign: 'left', - textTransform: 'uppercase', - type: 'h1', + color: "burgundy", + textAlign: "left", + textTransform: "uppercase", + type: "h1", }, } as const diff --git a/packages/design-system/lib/components/Toasts/Toast.stories.tsx b/packages/design-system/lib/components/Toasts/Toast.stories.tsx index 8ee732970..99501d8a0 100644 --- a/packages/design-system/lib/components/Toasts/Toast.stories.tsx +++ b/packages/design-system/lib/components/Toasts/Toast.stories.tsx @@ -1,27 +1,27 @@ -import { Toast } from './Toast' +import { Toast } from "./Toast" -import type { Meta, StoryObj } from '@storybook/nextjs-vite' -import { expect } from 'storybook/test' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" +import { expect } from "storybook/test" -import { config } from './variants.ts' +import { config } from "./variants.ts" const meta: Meta = { - title: 'Core Components/Toast/Toast', + title: "Core Components/Toast/Toast", component: Toast, argTypes: { variant: { - control: 'select', - type: 'string', + control: "select", + type: "string", options: Object.keys(config.variants.variant), table: { - defaultValue: { summary: 'info' }, + defaultValue: { summary: "info" }, }, }, message: { - control: 'text', - type: 'string', + control: "text", + type: "string", table: { - defaultValue: { summary: 'Toast message' }, + defaultValue: { summary: "Toast message" }, }, }, }, @@ -33,36 +33,36 @@ type Story = StoryObj export const Default: Story = { args: { - variant: 'info', - message: 'This is a toast', + variant: "info", + message: "This is a toast", }, play: async ({ canvas }) => { - const toast = await canvas.findByRole('status') + const toast = await canvas.findByRole("status") expect(toast).toBeVisible() }, } export const DefaultWithCustomContent: Story = { args: { - variant: 'info', + variant: "info", children: ( -

This is a custom info toast

+

This is a custom info toast

), }, play: async ({ canvas }) => { - const toast = await canvas.findByRole('status') + const toast = await canvas.findByRole("status") expect(toast).toBeVisible() - expect(canvas.getByText('This is a custom info toast')).toBeVisible() + expect(canvas.getByText("This is a custom info toast")).toBeVisible() }, } export const Success: Story = { args: { - variant: 'success', - message: 'This is a success toast', + variant: "success", + message: "This is a success toast", }, play: async ({ canvas, args }) => { - const toast = await canvas.findByRole('status') + const toast = await canvas.findByRole("status") expect(toast).toBeVisible() expect(canvas.getByText(args.message as string)).toBeVisible() }, @@ -70,11 +70,11 @@ export const Success: Story = { export const Error: Story = { args: { - variant: 'error', - message: 'This is an error toast', + variant: "error", + message: "This is an error toast", }, play: async ({ canvas, args }) => { - const toast = await canvas.findByRole('alert') + const toast = await canvas.findByRole("alert") expect(toast).toBeVisible() expect(canvas.getByText(args.message as string)).toBeVisible() }, @@ -82,11 +82,11 @@ export const Error: Story = { export const Warning: Story = { args: { - variant: 'warning', - message: 'This is a warning toast', + variant: "warning", + message: "This is a warning toast", }, play: async ({ canvas, args }) => { - const toast = await canvas.findByRole('alert') + const toast = await canvas.findByRole("alert") expect(toast).toBeVisible() expect(canvas.getByText(args.message as string)).toBeVisible() }, diff --git a/packages/design-system/lib/components/Toasts/Toast.tsx b/packages/design-system/lib/components/Toasts/Toast.tsx index c07f91489..0fe7c344a 100644 --- a/packages/design-system/lib/components/Toasts/Toast.tsx +++ b/packages/design-system/lib/components/Toasts/Toast.tsx @@ -1,15 +1,15 @@ -import type { VariantProps } from 'class-variance-authority' +import type { VariantProps } from "class-variance-authority" -import { MaterialIcon, MaterialIconSetIconProps } from '../Icons/MaterialIcon' -import { toastVariants } from './variants' +import { MaterialIcon, MaterialIconSetIconProps } from "../Icons/MaterialIcon" +import { toastVariants } from "./variants" -import { useIntl } from 'react-intl' -import { IconButton } from '../IconButton' -import { Typography } from '../Typography' -import styles from './toasts.module.css' +import { useIntl } from "react-intl" +import { IconButton } from "../IconButton" +import { Typography } from "../Typography" +import styles from "./toasts.module.css" export type ToastsProps = VariantProps & { - variant: NonNullable['variant']> + variant: NonNullable["variant"]> onClose?: () => void } & ( | { @@ -41,8 +41,8 @@ export function Toast({ children, message, onClose, variant }: ToastsProps) { - case 'info': + case "info": return - case 'success': + case "success": return - case 'warning': + case "warning": return } } -function getRole(variant: ToastsProps['variant']) { +function getRole(variant: ToastsProps["variant"]) { switch (variant) { - case 'error': - case 'warning': - return 'alert' - case 'info': - case 'success': + case "error": + case "warning": + return "alert" + case "info": + case "success": default: - return 'status' + return "status" } } diff --git a/packages/design-system/lib/components/Toasts/ToastHandler.stories.tsx b/packages/design-system/lib/components/Toasts/ToastHandler.stories.tsx index cad92bb92..d9995ca2f 100644 --- a/packages/design-system/lib/components/Toasts/ToastHandler.stories.tsx +++ b/packages/design-system/lib/components/Toasts/ToastHandler.stories.tsx @@ -1,30 +1,30 @@ -import { toast } from './index.tsx' -import { Toast } from './Toast.tsx' +import { toast } from "./index.tsx" +import { Toast } from "./Toast.tsx" -import type { Meta, StoryObj } from '@storybook/nextjs-vite' +import type { Meta, StoryObj } from "@storybook/nextjs-vite" -import { config } from './variants.ts' -import { ToastHandler } from './ToastHandler.tsx' -import { Button } from '../Button/Button.tsx' -import { expect, waitFor } from 'storybook/test' +import { config } from "./variants.ts" +import { ToastHandler } from "./ToastHandler.tsx" +import { Button } from "../Button/Button.tsx" +import { expect, waitFor } from "storybook/test" const meta: Meta = { - title: 'Core Components/Toast/ToastHandler', + title: "Core Components/Toast/ToastHandler", component: Toast, argTypes: { variant: { - control: 'select', - type: 'string', + control: "select", + type: "string", options: Object.keys(config.variants.variant), table: { - defaultValue: { summary: 'info' }, + defaultValue: { summary: "info" }, }, }, message: { - control: 'text', - type: 'string', + control: "text", + type: "string", table: { - defaultValue: { summary: 'Toast message' }, + defaultValue: { summary: "Toast message" }, }, }, }, @@ -36,26 +36,26 @@ type Story = StoryObj export const Default: Story = { args: { - variant: 'info', - message: 'This is a toast', + variant: "info", + message: "This is a toast", }, render: (args) => { return }, play: async ({ canvas, userEvent, args }) => { - let toast = canvas.queryByRole('status') + let toast = canvas.queryByRole("status") expect(toast).not.toBeInTheDocument() - const showToastButton = await canvas.findByRole('button') + const showToastButton = await canvas.findByRole("button") await userEvent.click(showToastButton) toast = await canvas.findByRole( - ['info', 'success'].indexOf(args.variant) !== -1 ? 'status' : 'alert' + ["info", "success"].indexOf(args.variant) !== -1 ? "status" : "alert" ) await waitFor(async () => await expect(toast).toBeVisible()) - const closeButton = await canvas.findByLabelText('Dismiss notification') + const closeButton = await canvas.findByLabelText("Dismiss notification") await userEvent.click(closeButton) await waitFor(async () => await expect(toast).not.toBeVisible()) @@ -67,10 +67,10 @@ const Renderer = ({ variant, }: { message: string - variant: 'info' | 'success' | 'warning' | 'error' + variant: "info" | "success" | "warning" | "error" onDismiss?: () => void }) => { - const text = 'Show Toast' + const text = "Show Toast" return ( <>