@helsenorge/designsystem-react 11.1.0 → 11.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/CHANGELOG.md +1544 -881
  2. package/Close.js +21 -6
  3. package/Close.js.map +1 -1
  4. package/Drawer.js +362 -0
  5. package/Drawer.js.map +1 -0
  6. package/InfoTeaser.js +75 -0
  7. package/InfoTeaser.js.map +1 -0
  8. package/LazyIcon.js +1 -1
  9. package/LazyIcon.js.map +1 -1
  10. package/LazyIllustration.js +1 -1
  11. package/LazyIllustration.js.map +1 -1
  12. package/Panel.js +38 -5
  13. package/Panel.js.map +1 -1
  14. package/components/ArticleTeaser/ArticleTeaser.d.ts +23 -0
  15. package/components/ArticleTeaser/ArticleTeaser.test.d.ts +1 -0
  16. package/components/ArticleTeaser/index.d.ts +3 -0
  17. package/components/ArticleTeaser/index.js +67 -0
  18. package/components/ArticleTeaser/index.js.map +1 -0
  19. package/components/ArticleTeaser/resourceHelper.d.ts +3 -0
  20. package/components/ArticleTeaser/styles.module.scss +79 -0
  21. package/components/ArticleTeaser/styles.module.scss.d.ts +13 -0
  22. package/components/Close/Close.d.ts +1 -1
  23. package/components/Close/styles.module.scss +46 -20
  24. package/components/Close/styles.module.scss.d.ts +2 -0
  25. package/components/Drawer/Drawer.d.ts +4 -0
  26. package/components/Drawer/index.js +1 -346
  27. package/components/Drawer/index.js.map +1 -1
  28. package/components/Drawer/styles.module.scss +4 -0
  29. package/components/Drawer/styles.module.scss.d.ts +1 -0
  30. package/components/Dropdown/index.js +1 -3
  31. package/components/Dropdown/index.js.map +1 -1
  32. package/components/HelpDrawer/HelpDrawer.d.ts +8 -0
  33. package/components/HelpDrawer/HelpDrawer.test.d.ts +1 -0
  34. package/components/HelpDrawer/index.d.ts +3 -0
  35. package/components/HelpDrawer/index.js +10 -0
  36. package/components/HelpDrawer/index.js.map +1 -0
  37. package/components/HelpDrawer/styles.module.scss +16 -0
  38. package/components/HelpDrawer/styles.module.scss.d.ts +10 -0
  39. package/components/HelpTeaser/HelpTeaser.d.ts +20 -0
  40. package/components/HelpTeaser/HelpTeaser.test.d.ts +1 -0
  41. package/components/HelpTeaser/index.d.ts +3 -0
  42. package/components/HelpTeaser/index.js +25 -0
  43. package/components/HelpTeaser/index.js.map +1 -0
  44. package/components/HelpTeaser/styles.module.scss +22 -0
  45. package/components/HelpTeaser/styles.module.scss.d.ts +10 -0
  46. package/components/Icons/AdditionalIconInformation.d.ts +1 -1
  47. package/components/Icons/AdditionalIconInformation.js +1 -1
  48. package/components/Icons/AdditionalIconInformation.js.map +1 -1
  49. package/components/Icons/IconNames.d.ts +1 -1
  50. package/components/Icons/IconNames.js +1 -0
  51. package/components/Icons/IconNames.js.map +1 -1
  52. package/components/Icons/Toddler.d.ts +4 -0
  53. package/components/Icons/Toddler.js +10 -0
  54. package/components/Icons/Toddler.js.map +1 -0
  55. package/components/Illustrations/BabyMobile.d.ts +8 -0
  56. package/components/Illustrations/BabyMobile.js +11 -0
  57. package/components/Illustrations/BabyMobile.js.map +1 -0
  58. package/components/Illustrations/BabyMobileMedium.d.ts +4 -0
  59. package/components/Illustrations/BabyMobileMedium.js +424 -0
  60. package/components/Illustrations/BabyMobileMedium.js.map +1 -0
  61. package/components/Illustrations/Child.d.ts +12 -0
  62. package/components/Illustrations/Child.js +11 -0
  63. package/components/Illustrations/Child.js.map +1 -0
  64. package/components/Illustrations/ChildMedium.d.ts +4 -0
  65. package/components/Illustrations/ChildMedium.js +185 -0
  66. package/components/Illustrations/ChildMedium.js.map +1 -0
  67. package/components/Illustrations/GiveBabyFood.d.ts +11 -0
  68. package/components/Illustrations/GiveBabyFood.js +11 -0
  69. package/components/Illustrations/GiveBabyFood.js.map +1 -0
  70. package/components/Illustrations/GiveBabyFoodMedium.d.ts +4 -0
  71. package/components/Illustrations/GiveBabyFoodMedium.js +377 -0
  72. package/components/Illustrations/GiveBabyFoodMedium.js.map +1 -0
  73. package/components/Illustrations/IllustrationNames.d.ts +1 -1
  74. package/components/Illustrations/IllustrationNames.js +15 -1
  75. package/components/Illustrations/IllustrationNames.js.map +1 -1
  76. package/components/Illustrations/Stroller.d.ts +12 -0
  77. package/components/Illustrations/Stroller.js +11 -0
  78. package/components/Illustrations/Stroller.js.map +1 -0
  79. package/components/Illustrations/StrollerMedium.d.ts +4 -0
  80. package/components/Illustrations/StrollerMedium.js +236 -0
  81. package/components/Illustrations/StrollerMedium.js.map +1 -0
  82. package/components/InfoTeaser/InfoTeaser.d.ts +28 -0
  83. package/components/InfoTeaser/InfoTeaser.test.d.ts +1 -0
  84. package/components/InfoTeaser/index.d.ts +3 -0
  85. package/components/InfoTeaser/index.js +5 -0
  86. package/components/InfoTeaser/index.js.map +1 -0
  87. package/components/InfoTeaser/resourceHelper.d.ts +3 -0
  88. package/components/InfoTeaser/styles.module.scss +98 -0
  89. package/components/InfoTeaser/styles.module.scss.d.ts +15 -0
  90. package/components/Panel/Panel.d.ts +3 -0
  91. package/components/Panel/resourceHelper.d.ts +3 -0
  92. package/components/Panel/styles.module.scss +6 -6
  93. package/constants.d.ts +2 -0
  94. package/constants.js +2 -0
  95. package/constants.js.map +1 -1
  96. package/designsystem-react.css +3 -1
  97. package/hooks/useBreakpoint.js +10 -28
  98. package/hooks/useBreakpoint.js.map +1 -1
  99. package/package.json +1 -1
  100. package/resources/HN.Designsystem.ArticleTeaser.en-GB.json.d.ts +7 -0
  101. package/resources/HN.Designsystem.ArticleTeaser.nb-NO.json.d.ts +7 -0
  102. package/resources/HN.Designsystem.Dropdown.nb-NO.json.d.ts +1 -2
  103. package/resources/HN.Designsystem.InfoTeaser.en-GB.json.d.ts +7 -0
  104. package/resources/HN.Designsystem.InfoTeaser.nb-NO.json.d.ts +7 -0
  105. package/resources/HN.Designsystem.Panel.en-GB.json.d.ts +7 -0
  106. package/resources/HN.Designsystem.Panel.nb-NO.json.d.ts +7 -0
  107. package/scss/supernova/styles/colors.css +3 -1
package/LazyIcon.js CHANGED
@@ -4,7 +4,7 @@ import { lazy, useMemo, Suspense } from "react";
4
4
  import { useIsServerSide } from "./hooks/useIsServerSide.js";
5
5
  import { I as Icon } from "./Icon.js";
6
6
  import { IconSize } from "./constants.js";
7
- const lazyLoadIcon = (iconName) => lazy(() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../Icons/ActiveMonitoring.tsx": () => import("./components/Icons/ActiveMonitoring.js"), "../Icons/AcupunctureBack.tsx": () => import("./components/Icons/AcupunctureBack.js"), "../Icons/AlarmClock.tsx": () => import("./components/Icons/AlarmClock.js"), "../Icons/AlertSignFill.tsx": () => import("./components/Icons/AlertSignFill.js"), "../Icons/AlertSignStroke.tsx": () => import("./components/Icons/AlertSignStroke.js"), "../Icons/Amputation.tsx": () => import("./components/Icons/Amputation.js"), "../Icons/Anxiety.tsx": () => import("./components/Icons/Anxiety.js"), "../Icons/Apple.tsx": () => import("./components/Icons/Apple.js"), "../Icons/Archive.tsx": () => import("./components/Icons/Archive.js"), "../Icons/ArmFlexing.tsx": () => import("./components/Icons/ArmFlexing.js"), "../Icons/ArrowDown.tsx": () => import("./components/Icons/ArrowDown.js"), "../Icons/ArrowLeft.tsx": () => import("./components/Icons/ArrowLeft.js"), "../Icons/ArrowRight.tsx": () => import("./components/Icons/ArrowRight.js"), "../Icons/ArrowUp.tsx": () => import("./components/Icons/ArrowUp.js"), "../Icons/ArrowUpRight.tsx": () => import("./components/Icons/ArrowUpRight.js"), "../Icons/Attachment.tsx": () => import("./components/Icons/Attachment.js"), "../Icons/Atv.tsx": () => import("./components/Icons/Atv.js"), "../Icons/Avatar.tsx": () => import("./components/Icons/Avatar.js"), "../Icons/AwakePersonOnPillow.tsx": () => import("./components/Icons/AwakePersonOnPillow.js"), "../Icons/Baby.tsx": () => import("./components/Icons/Baby.js"), "../Icons/BandAid.tsx": () => import("./components/Icons/BandAid.js"), "../Icons/BeerAndPills.tsx": () => import("./components/Icons/BeerAndPills.js"), "../Icons/Bell.tsx": () => import("./components/Icons/Bell.js"), "../Icons/Bike.tsx": () => import("./components/Icons/Bike.js"), "../Icons/BirthControl.tsx": () => import("./components/Icons/BirthControl.js"), "../Icons/BirthdayCake.tsx": () => import("./components/Icons/BirthdayCake.js"), "../Icons/Boat.tsx": () => import("./components/Icons/Boat.js"), "../Icons/Body.tsx": () => import("./components/Icons/Body.js"), "../Icons/Braille.tsx": () => import("./components/Icons/Braille.js"), "../Icons/Brain.tsx": () => import("./components/Icons/Brain.js"), "../Icons/BreastReconstruction.tsx": () => import("./components/Icons/BreastReconstruction.js"), "../Icons/BreastRemoval.tsx": () => import("./components/Icons/BreastRemoval.js"), "../Icons/Breasts.tsx": () => import("./components/Icons/Breasts.js"), "../Icons/BrokenHeart.tsx": () => import("./components/Icons/BrokenHeart.js"), "../Icons/BrokenPuzzle.tsx": () => import("./components/Icons/BrokenPuzzle.js"), "../Icons/Bus.tsx": () => import("./components/Icons/Bus.js"), "../Icons/Calendar.tsx": () => import("./components/Icons/Calendar.js"), "../Icons/CalendarChange.tsx": () => import("./components/Icons/CalendarChange.js"), "../Icons/CalendarCheck.tsx": () => import("./components/Icons/CalendarCheck.js"), "../Icons/CalendarEvent.tsx": () => import("./components/Icons/CalendarEvent.js"), "../Icons/CalendarSave.tsx": () => import("./components/Icons/CalendarSave.js"), "../Icons/Cancer.tsx": () => import("./components/Icons/Cancer.js"), "../Icons/Candle.tsx": () => import("./components/Icons/Candle.js"), "../Icons/Car.tsx": () => import("./components/Icons/Car.js"), "../Icons/Carton.tsx": () => import("./components/Icons/Carton.js"), "../Icons/Change.tsx": () => import("./components/Icons/Change.js"), "../Icons/Check.tsx": () => import("./components/Icons/Check.js"), "../Icons/CheckFill.tsx": () => import("./components/Icons/CheckFill.js"), "../Icons/CheckOutline.tsx": () => import("./components/Icons/CheckOutline.js"), "../Icons/Chest.tsx": () => import("./components/Icons/Chest.js"), "../Icons/ChevronDown.tsx": () => import("./components/Icons/ChevronDown.js"), "../Icons/ChevronLeft.tsx": () => import("./components/Icons/ChevronLeft.js"), "../Icons/ChevronRight.tsx": () => import("./components/Icons/ChevronRight.js"), "../Icons/ChevronUp.tsx": () => import("./components/Icons/ChevronUp.js"), "../Icons/ChevronsDown.tsx": () => import("./components/Icons/ChevronsDown.js"), "../Icons/ChevronsUp.tsx": () => import("./components/Icons/ChevronsUp.js"), "../Icons/ChildPlaying.tsx": () => import("./components/Icons/ChildPlaying.js"), "../Icons/Cigarette.tsx": () => import("./components/Icons/Cigarette.js"), "../Icons/Coins.tsx": () => import("./components/Icons/Coins.js"), "../Icons/Contacts.tsx": () => import("./components/Icons/Contacts.js"), "../Icons/Copy.tsx": () => import("./components/Icons/Copy.js"), "../Icons/CoronaCertificate.tsx": () => import("./components/Icons/CoronaCertificate.js"), "../Icons/Coronavirus.tsx": () => import("./components/Icons/Coronavirus.js"), "../Icons/Cough.tsx": () => import("./components/Icons/Cough.js"), "../Icons/CreditCard.tsx": () => import("./components/Icons/CreditCard.js"), "../Icons/CriticalHealthInfo.tsx": () => import("./components/Icons/CriticalHealthInfo.js"), "../Icons/Cross.tsx": () => import("./components/Icons/Cross.js"), "../Icons/DataExchange.tsx": () => import("./components/Icons/DataExchange.js"), "../Icons/DataReceived.tsx": () => import("./components/Icons/DataReceived.js"), "../Icons/DataSent.tsx": () => import("./components/Icons/DataSent.js"), "../Icons/Depression.tsx": () => import("./components/Icons/Depression.js"), "../Icons/DigestiveSystem.tsx": () => import("./components/Icons/DigestiveSystem.js"), "../Icons/Dizzy.tsx": () => import("./components/Icons/Dizzy.js"), "../Icons/Documents.tsx": () => import("./components/Icons/Documents.js"), "../Icons/Dog.tsx": () => import("./components/Icons/Dog.js"), "../Icons/DonorCard.tsx": () => import("./components/Icons/DonorCard.js"), "../Icons/DotAlert.tsx": () => import("./components/Icons/DotAlert.js"), "../Icons/DotCancelled.tsx": () => import("./components/Icons/DotCancelled.js"), "../Icons/DotHalfDisc.tsx": () => import("./components/Icons/DotHalfDisc.js"), "../Icons/DotInfo.tsx": () => import("./components/Icons/DotInfo.js"), "../Icons/DotLookingGlass.tsx": () => import("./components/Icons/DotLookingGlass.js"), "../Icons/DotQuestionMark.tsx": () => import("./components/Icons/DotQuestionMark.js"), "../Icons/DotSuccess.tsx": () => import("./components/Icons/DotSuccess.js"), "../Icons/DotTransparent.tsx": () => import("./components/Icons/DotTransparent.js"), "../Icons/DotWarningTriangle.tsx": () => import("./components/Icons/DotWarningTriangle.js"), "../Icons/Download.tsx": () => import("./components/Icons/Download.js"), "../Icons/Draft.tsx": () => import("./components/Icons/Draft.js"), "../Icons/EChat.tsx": () => import("./components/Icons/EChat.js"), "../Icons/Ear.tsx": () => import("./components/Icons/Ear.js"), "../Icons/EarDeaf.tsx": () => import("./components/Icons/EarDeaf.js"), "../Icons/EarHearingAid.tsx": () => import("./components/Icons/EarHearingAid.js"), "../Icons/EarNoseThroat.tsx": () => import("./components/Icons/EarNoseThroat.js"), "../Icons/EarVolume.tsx": () => import("./components/Icons/EarVolume.js"), "../Icons/ElderlyPerson.tsx": () => import("./components/Icons/ElderlyPerson.js"), "../Icons/Embolization.tsx": () => import("./components/Icons/Embolization.js"), "../Icons/EmergencyCall.tsx": () => import("./components/Icons/EmergencyCall.js"), "../Icons/EmoticonAnnoyed.tsx": () => import("./components/Icons/EmoticonAnnoyed.js"), "../Icons/EmoticonDelighted.tsx": () => import("./components/Icons/EmoticonDelighted.js"), "../Icons/EmoticonDisappointed.tsx": () => import("./components/Icons/EmoticonDisappointed.js"), "../Icons/EmoticonHappy.tsx": () => import("./components/Icons/EmoticonHappy.js"), "../Icons/EmoticonMeh.tsx": () => import("./components/Icons/EmoticonMeh.js"), "../Icons/EmptyBox.tsx": () => import("./components/Icons/EmptyBox.js"), "../Icons/EnterFullScreen.tsx": () => import("./components/Icons/EnterFullScreen.js"), "../Icons/Envelope.tsx": () => import("./components/Icons/Envelope.js"), "../Icons/Epilepsy.tsx": () => import("./components/Icons/Epilepsy.js"), "../Icons/Eraser.tsx": () => import("./components/Icons/Eraser.js"), "../Icons/ErrorSignFill.tsx": () => import("./components/Icons/ErrorSignFill.js"), "../Icons/ErrorSignStroke.tsx": () => import("./components/Icons/ErrorSignStroke.js"), "../Icons/EuropeanHealthCard.tsx": () => import("./components/Icons/EuropeanHealthCard.js"), "../Icons/ExitFullScreen.tsx": () => import("./components/Icons/ExitFullScreen.js"), "../Icons/Eye.tsx": () => import("./components/Icons/Eye.js"), "../Icons/Facebook.tsx": () => import("./components/Icons/Facebook.js"), "../Icons/FallingLeaf.tsx": () => import("./components/Icons/FallingLeaf.js"), "../Icons/Female.tsx": () => import("./components/Icons/Female.js"), "../Icons/FemaleDoctor.tsx": () => import("./components/Icons/FemaleDoctor.js"), "../Icons/Ferry.tsx": () => import("./components/Icons/Ferry.js"), "../Icons/File.tsx": () => import("./components/Icons/File.js"), "../Icons/Filter.tsx": () => import("./components/Icons/Filter.js"), "../Icons/FingerBleed.tsx": () => import("./components/Icons/FingerBleed.js"), "../Icons/FirstAidKit.tsx": () => import("./components/Icons/FirstAidKit.js"), "../Icons/Fish.tsx": () => import("./components/Icons/Fish.js"), "../Icons/FloppyDisk.tsx": () => import("./components/Icons/FloppyDisk.js"), "../Icons/Football.tsx": () => import("./components/Icons/Football.js"), "../Icons/Form.tsx": () => import("./components/Icons/Form.js"), "../Icons/Forward.tsx": () => import("./components/Icons/Forward.js"), "../Icons/Gallery.tsx": () => import("./components/Icons/Gallery.js"), "../Icons/Garden.tsx": () => import("./components/Icons/Garden.js"), "../Icons/GasCan.tsx": () => import("./components/Icons/GasCan.js"), "../Icons/GenderIdentity.tsx": () => import("./components/Icons/GenderIdentity.js"), "../Icons/GlassWater.tsx": () => import("./components/Icons/GlassWater.js"), "../Icons/Glasses.tsx": () => import("./components/Icons/Glasses.js"), "../Icons/Globe.tsx": () => import("./components/Icons/Globe.js"), "../Icons/Grain.tsx": () => import("./components/Icons/Grain.js"), "../Icons/Graph.tsx": () => import("./components/Icons/Graph.js"), "../Icons/Group.tsx": () => import("./components/Icons/Group.js"), "../Icons/GroupTwins.tsx": () => import("./components/Icons/GroupTwins.js"), "../Icons/HTMLFile.tsx": () => import("./components/Icons/HTMLFile.js"), "../Icons/HandWaving.tsx": () => import("./components/Icons/HandWaving.js"), "../Icons/HandWithDisease.tsx": () => import("./components/Icons/HandWithDisease.js"), "../Icons/HandsAndHeart.tsx": () => import("./components/Icons/HandsAndHeart.js"), "../Icons/HealthClinic.tsx": () => import("./components/Icons/HealthClinic.js"), "../Icons/HealthMeasurements.tsx": () => import("./components/Icons/HealthMeasurements.js"), "../Icons/HealthWarning.tsx": () => import("./components/Icons/HealthWarning.js"), "../Icons/HealthcarePerson.tsx": () => import("./components/Icons/HealthcarePerson.js"), "../Icons/HealthcarePersonell.tsx": () => import("./components/Icons/HealthcarePersonell.js"), "../Icons/HearingProtection.tsx": () => import("./components/Icons/HearingProtection.js"), "../Icons/Heart.tsx": () => import("./components/Icons/Heart.js"), "../Icons/HeartHands.tsx": () => import("./components/Icons/HeartHands.js"), "../Icons/HelpSign.tsx": () => import("./components/Icons/HelpSign.js"), "../Icons/HelpingHand.tsx": () => import("./components/Icons/HelpingHand.js"), "../Icons/Hemodialysis.tsx": () => import("./components/Icons/Hemodialysis.js"), "../Icons/Hiker.tsx": () => import("./components/Icons/Hiker.js"), "../Icons/Hipprosthesis.tsx": () => import("./components/Icons/Hipprosthesis.js"), "../Icons/History.tsx": () => import("./components/Icons/History.js"), "../Icons/HivAndAids.tsx": () => import("./components/Icons/HivAndAids.js"), "../Icons/Home.tsx": () => import("./components/Icons/Home.js"), "../Icons/HomeFill.tsx": () => import("./components/Icons/HomeFill.js"), "../Icons/Hormone.tsx": () => import("./components/Icons/Hormone.js"), "../Icons/Hospital.tsx": () => import("./components/Icons/Hospital.js"), "../Icons/Hourglass.tsx": () => import("./components/Icons/Hourglass.js"), "../Icons/ImgFile.tsx": () => import("./components/Icons/ImgFile.js"), "../Icons/Inbox.tsx": () => import("./components/Icons/Inbox.js"), "../Icons/InfoSignFill.tsx": () => import("./components/Icons/InfoSignFill.js"), "../Icons/InfoSignStroke.tsx": () => import("./components/Icons/InfoSignStroke.js"), "../Icons/Instagram.tsx": () => import("./components/Icons/Instagram.js"), "../Icons/Intravenous.tsx": () => import("./components/Icons/Intravenous.js"), "../Icons/JointPain.tsx": () => import("./components/Icons/JointPain.js"), "../Icons/Journal.tsx": () => import("./components/Icons/Journal.js"), "../Icons/JpgFile.tsx": () => import("./components/Icons/JpgFile.js"), "../Icons/Kidney.tsx": () => import("./components/Icons/Kidney.js"), "../Icons/KitchenScale.tsx": () => import("./components/Icons/KitchenScale.js"), "../Icons/Kjernejournal.tsx": () => import("./components/Icons/Kjernejournal.js"), "../Icons/Laboratory.tsx": () => import("./components/Icons/Laboratory.js"), "../Icons/LaptopBlog.tsx": () => import("./components/Icons/LaptopBlog.js"), "../Icons/LawBook.tsx": () => import("./components/Icons/LawBook.js"), "../Icons/LegalDocument.tsx": () => import("./components/Icons/LegalDocument.js"), "../Icons/LightBulb.tsx": () => import("./components/Icons/LightBulb.js"), "../Icons/List.tsx": () => import("./components/Icons/List.js"), "../Icons/Location.tsx": () => import("./components/Icons/Location.js"), "../Icons/LocationFill.tsx": () => import("./components/Icons/LocationFill.js"), "../Icons/Lock.tsx": () => import("./components/Icons/Lock.js"), "../Icons/Login.tsx": () => import("./components/Icons/Login.js"), "../Icons/Logout.tsx": () => import("./components/Icons/Logout.js"), "../Icons/Lungs.tsx": () => import("./components/Icons/Lungs.js"), "../Icons/Makeup.tsx": () => import("./components/Icons/Makeup.js"), "../Icons/MaleDoctor.tsx": () => import("./components/Icons/MaleDoctor.js"), "../Icons/MaleDoctorAndPerson.tsx": () => import("./components/Icons/MaleDoctorAndPerson.js"), "../Icons/MaleDoctorCompact.tsx": () => import("./components/Icons/MaleDoctorCompact.js"), "../Icons/MaleDoctorCompactFill.tsx": () => import("./components/Icons/MaleDoctorCompactFill.js"), "../Icons/MaleGenitalia.tsx": () => import("./components/Icons/MaleGenitalia.js"), "../Icons/Medicine.tsx": () => import("./components/Icons/Medicine.js"), "../Icons/MedicineWarning.tsx": () => import("./components/Icons/MedicineWarning.js"), "../Icons/MentalHealthAdult.tsx": () => import("./components/Icons/MentalHealthAdult.js"), "../Icons/MentalHealthChild.tsx": () => import("./components/Icons/MentalHealthChild.js"), "../Icons/Menu.tsx": () => import("./components/Icons/Menu.js"), "../Icons/Microscope.tsx": () => import("./components/Icons/Microscope.js"), "../Icons/Minus.tsx": () => import("./components/Icons/Minus.js"), "../Icons/Mirror.tsx": () => import("./components/Icons/Mirror.js"), "../Icons/MobilePhone.tsx": () => import("./components/Icons/MobilePhone.js"), "../Icons/MotherHoldingBaby.tsx": () => import("./components/Icons/MotherHoldingBaby.js"), "../Icons/MuscleBack.tsx": () => import("./components/Icons/MuscleBack.js"), "../Icons/MuscleLeg.tsx": () => import("./components/Icons/MuscleLeg.js"), "../Icons/Mushroom.tsx": () => import("./components/Icons/Mushroom.js"), "../Icons/Music.tsx": () => import("./components/Icons/Music.js"), "../Icons/MusselsAndSalt.tsx": () => import("./components/Icons/MusselsAndSalt.js"), "../Icons/NoAccess.tsx": () => import("./components/Icons/NoAccess.js"), "../Icons/NoEye.tsx": () => import("./components/Icons/NoEye.js"), "../Icons/NoFilter.tsx": () => import("./components/Icons/NoFilter.js"), "../Icons/Notepad.tsx": () => import("./components/Icons/Notepad.js"), "../Icons/Osteotomy.tsx": () => import("./components/Icons/Osteotomy.js"), "../Icons/PaintRoller.tsx": () => import("./components/Icons/PaintRoller.js"), "../Icons/PaperPlane.tsx": () => import("./components/Icons/PaperPlane.js"), "../Icons/PatientAndPerson.tsx": () => import("./components/Icons/PatientAndPerson.js"), "../Icons/Pause.tsx": () => import("./components/Icons/Pause.js"), "../Icons/PdfFile.tsx": () => import("./components/Icons/PdfFile.js"), "../Icons/Pencil.tsx": () => import("./components/Icons/Pencil.js"), "../Icons/PeopleTalking.tsx": () => import("./components/Icons/PeopleTalking.js"), "../Icons/Peritonealdialysis.tsx": () => import("./components/Icons/Peritonealdialysis.js"), "../Icons/Person.tsx": () => import("./components/Icons/Person.js"), "../Icons/PersonAndPatient.tsx": () => import("./components/Icons/PersonAndPatient.js"), "../Icons/PersonCancel.tsx": () => import("./components/Icons/PersonCancel.js"), "../Icons/PersonInXRayMachine.tsx": () => import("./components/Icons/PersonInXRayMachine.js"), "../Icons/PersonOverweight.tsx": () => import("./components/Icons/PersonOverweight.js"), "../Icons/PersonRelaxing.tsx": () => import("./components/Icons/PersonRelaxing.js"), "../Icons/PersonWithBrain.tsx": () => import("./components/Icons/PersonWithBrain.js"), "../Icons/PersonWithBrokenArm.tsx": () => import("./components/Icons/PersonWithBrokenArm.js"), "../Icons/PersonWithCrutches.tsx": () => import("./components/Icons/PersonWithCrutches.js"), "../Icons/PersonWithJaw.tsx": () => import("./components/Icons/PersonWithJaw.js"), "../Icons/PersonWithMagnifyingGlass.tsx": () => import("./components/Icons/PersonWithMagnifyingGlass.js"), "../Icons/PersonWithSenses.tsx": () => import("./components/Icons/PersonWithSenses.js"), "../Icons/PersonWorking.tsx": () => import("./components/Icons/PersonWorking.js"), "../Icons/PersonalPlan.tsx": () => import("./components/Icons/PersonalPlan.js"), "../Icons/PizzaSlice.tsx": () => import("./components/Icons/PizzaSlice.js"), "../Icons/Plane.tsx": () => import("./components/Icons/Plane.js"), "../Icons/Plant.tsx": () => import("./components/Icons/Plant.js"), "../Icons/PlateKnifeFork.tsx": () => import("./components/Icons/PlateKnifeFork.js"), "../Icons/Play.tsx": () => import("./components/Icons/Play.js"), "../Icons/PlusLarge.tsx": () => import("./components/Icons/PlusLarge.js"), "../Icons/PlusSmall.tsx": () => import("./components/Icons/PlusSmall.js"), "../Icons/PngFile.tsx": () => import("./components/Icons/PngFile.js"), "../Icons/Podcast.tsx": () => import("./components/Icons/Podcast.js"), "../Icons/PoisonInformation.tsx": () => import("./components/Icons/PoisonInformation.js"), "../Icons/Pregnant.tsx": () => import("./components/Icons/Pregnant.js"), "../Icons/Printer.tsx": () => import("./components/Icons/Printer.js"), "../Icons/Psychosis.tsx": () => import("./components/Icons/Psychosis.js"), "../Icons/Publication.tsx": () => import("./components/Icons/Publication.js"), "../Icons/Puzzle.tsx": () => import("./components/Icons/Puzzle.js"), "../Icons/QrCode.tsx": () => import("./components/Icons/QrCode.js"), "../Icons/Quarrel.tsx": () => import("./components/Icons/Quarrel.js"), "../Icons/RadioTherapy.tsx": () => import("./components/Icons/RadioTherapy.js"), "../Icons/RadioactiveTreatment.tsx": () => import("./components/Icons/RadioactiveTreatment.js"), "../Icons/Radioiodine.tsx": () => import("./components/Icons/Radioiodine.js"), "../Icons/Receipt.tsx": () => import("./components/Icons/Receipt.js"), "../Icons/Receptionist.tsx": () => import("./components/Icons/Receptionist.js"), "../Icons/Recovery.tsx": () => import("./components/Icons/Recovery.js"), "../Icons/Referral.tsx": () => import("./components/Icons/Referral.js"), "../Icons/Refresh.tsx": () => import("./components/Icons/Refresh.js"), "../Icons/Refund.tsx": () => import("./components/Icons/Refund.js"), "../Icons/Reminder.tsx": () => import("./components/Icons/Reminder.js"), "../Icons/Reply.tsx": () => import("./components/Icons/Reply.js"), "../Icons/Rocket.tsx": () => import("./components/Icons/Rocket.js"), "../Icons/RtfFile.tsx": () => import("./components/Icons/RtfFile.js"), "../Icons/STDs.tsx": () => import("./components/Icons/STDs.js"), "../Icons/Save.tsx": () => import("./components/Icons/Save.js"), "../Icons/Scale.tsx": () => import("./components/Icons/Scale.js"), "../Icons/ScreenReader.tsx": () => import("./components/Icons/ScreenReader.js"), "../Icons/Search.tsx": () => import("./components/Icons/Search.js"), "../Icons/SectionSign.tsx": () => import("./components/Icons/SectionSign.js"), "../Icons/Settings.tsx": () => import("./components/Icons/Settings.js"), "../Icons/SettingsFill.tsx": () => import("./components/Icons/SettingsFill.js"), "../Icons/Sexualorientation.tsx": () => import("./components/Icons/Sexualorientation.js"), "../Icons/ShakingHand.tsx": () => import("./components/Icons/ShakingHand.js"), "../Icons/Share.tsx": () => import("./components/Icons/Share.js"), "../Icons/SharedHealthData.tsx": () => import("./components/Icons/SharedHealthData.js"), "../Icons/SharedHealthMeasurements.tsx": () => import("./components/Icons/SharedHealthMeasurements.js"), "../Icons/Shield.tsx": () => import("./components/Icons/Shield.js"), "../Icons/ShuntOperation.tsx": () => import("./components/Icons/ShuntOperation.js"), "../Icons/Skeleton.tsx": () => import("./components/Icons/Skeleton.js"), "../Icons/Skin.tsx": () => import("./components/Icons/Skin.js"), "../Icons/Snake.tsx": () => import("./components/Icons/Snake.js"), "../Icons/Snapchat.tsx": () => import("./components/Icons/Snapchat.js"), "../Icons/SortDown.tsx": () => import("./components/Icons/SortDown.js"), "../Icons/SortUp.tsx": () => import("./components/Icons/SortUp.js"), "../Icons/SpeechBubble.tsx": () => import("./components/Icons/SpeechBubble.js"), "../Icons/Spray.tsx": () => import("./components/Icons/Spray.js"), "../Icons/StickyNote.tsx": () => import("./components/Icons/StickyNote.js"), "../Icons/StickyNotes.tsx": () => import("./components/Icons/StickyNotes.js"), "../Icons/Stopwatch.tsx": () => import("./components/Icons/Stopwatch.js"), "../Icons/Sun.tsx": () => import("./components/Icons/Sun.js"), "../Icons/SupportingPerson.tsx": () => import("./components/Icons/SupportingPerson.js"), "../Icons/Surgery.tsx": () => import("./components/Icons/Surgery.js"), "../Icons/Sweets.tsx": () => import("./components/Icons/Sweets.js"), "../Icons/Syringe.tsx": () => import("./components/Icons/Syringe.js"), "../Icons/Taxi.tsx": () => import("./components/Icons/Taxi.js"), "../Icons/TeddyBear.tsx": () => import("./components/Icons/TeddyBear.js"), "../Icons/Teenagers.tsx": () => import("./components/Icons/Teenagers.js"), "../Icons/ThinkingAboutBaby.tsx": () => import("./components/Icons/ThinkingAboutBaby.js"), "../Icons/Ticket.tsx": () => import("./components/Icons/Ticket.js"), "../Icons/TimePassing.tsx": () => import("./components/Icons/TimePassing.js"), "../Icons/Tombstone.tsx": () => import("./components/Icons/Tombstone.js"), "../Icons/Toolbox.tsx": () => import("./components/Icons/Toolbox.js"), "../Icons/Tooth.tsx": () => import("./components/Icons/Tooth.js"), "../Icons/TotalKneeProsthesis.tsx": () => import("./components/Icons/TotalKneeProsthesis.js"), "../Icons/Train.tsx": () => import("./components/Icons/Train.js"), "../Icons/Transplantation.tsx": () => import("./components/Icons/Transplantation.js"), "../Icons/TrashCan.tsx": () => import("./components/Icons/TrashCan.js"), "../Icons/TravelRoute.tsx": () => import("./components/Icons/TravelRoute.js"), "../Icons/TriangleX.tsx": () => import("./components/Icons/TriangleX.js"), "../Icons/Twitter.tsx": () => import("./components/Icons/Twitter.js"), "../Icons/Undo.tsx": () => import("./components/Icons/Undo.js"), "../Icons/UniProsthesis.tsx": () => import("./components/Icons/UniProsthesis.js"), "../Icons/Upload.tsx": () => import("./components/Icons/Upload.js"), "../Icons/UserOrganization.tsx": () => import("./components/Icons/UserOrganization.js"), "../Icons/Vaccine.tsx": () => import("./components/Icons/Vaccine.js"), "../Icons/VerticalDots.tsx": () => import("./components/Icons/VerticalDots.js"), "../Icons/VideoCamera.tsx": () => import("./components/Icons/VideoCamera.js"), "../Icons/VideoChat.tsx": () => import("./components/Icons/VideoChat.js"), "../Icons/Wallet.tsx": () => import("./components/Icons/Wallet.js"), "../Icons/Watch.tsx": () => import("./components/Icons/Watch.js"), "../Icons/Website.tsx": () => import("./components/Icons/Website.js"), "../Icons/Wheelchair.tsx": () => import("./components/Icons/Wheelchair.js"), "../Icons/WheelchairActive.tsx": () => import("./components/Icons/WheelchairActive.js"), "../Icons/Window.tsx": () => import("./components/Icons/Window.js"), "../Icons/WordDocument.tsx": () => import("./components/Icons/WordDocument.js"), "../Icons/WorkSuitcase.tsx": () => import("./components/Icons/WorkSuitcase.js"), "../Icons/X.tsx": () => import("./components/Icons/X.js"), "../Icons/XOutline.tsx": () => import("./components/Icons/XOutline.js"), "../Icons/XmlFile.tsx": () => import("./components/Icons/XmlFile.js"), "../Icons/YouTube.tsx": () => import("./components/Icons/YouTube.js"), "../Icons/Zoom.tsx": () => import("./components/Icons/Zoom.js") }), `../Icons/${iconName}.tsx`, 3));
7
+ const lazyLoadIcon = (iconName) => lazy(() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../Icons/ActiveMonitoring.tsx": () => import("./components/Icons/ActiveMonitoring.js"), "../Icons/AcupunctureBack.tsx": () => import("./components/Icons/AcupunctureBack.js"), "../Icons/AlarmClock.tsx": () => import("./components/Icons/AlarmClock.js"), "../Icons/AlertSignFill.tsx": () => import("./components/Icons/AlertSignFill.js"), "../Icons/AlertSignStroke.tsx": () => import("./components/Icons/AlertSignStroke.js"), "../Icons/Amputation.tsx": () => import("./components/Icons/Amputation.js"), "../Icons/Anxiety.tsx": () => import("./components/Icons/Anxiety.js"), "../Icons/Apple.tsx": () => import("./components/Icons/Apple.js"), "../Icons/Archive.tsx": () => import("./components/Icons/Archive.js"), "../Icons/ArmFlexing.tsx": () => import("./components/Icons/ArmFlexing.js"), "../Icons/ArrowDown.tsx": () => import("./components/Icons/ArrowDown.js"), "../Icons/ArrowLeft.tsx": () => import("./components/Icons/ArrowLeft.js"), "../Icons/ArrowRight.tsx": () => import("./components/Icons/ArrowRight.js"), "../Icons/ArrowUp.tsx": () => import("./components/Icons/ArrowUp.js"), "../Icons/ArrowUpRight.tsx": () => import("./components/Icons/ArrowUpRight.js"), "../Icons/Attachment.tsx": () => import("./components/Icons/Attachment.js"), "../Icons/Atv.tsx": () => import("./components/Icons/Atv.js"), "../Icons/Avatar.tsx": () => import("./components/Icons/Avatar.js"), "../Icons/AwakePersonOnPillow.tsx": () => import("./components/Icons/AwakePersonOnPillow.js"), "../Icons/Baby.tsx": () => import("./components/Icons/Baby.js"), "../Icons/BandAid.tsx": () => import("./components/Icons/BandAid.js"), "../Icons/BeerAndPills.tsx": () => import("./components/Icons/BeerAndPills.js"), "../Icons/Bell.tsx": () => import("./components/Icons/Bell.js"), "../Icons/Bike.tsx": () => import("./components/Icons/Bike.js"), "../Icons/BirthControl.tsx": () => import("./components/Icons/BirthControl.js"), "../Icons/BirthdayCake.tsx": () => import("./components/Icons/BirthdayCake.js"), "../Icons/Boat.tsx": () => import("./components/Icons/Boat.js"), "../Icons/Body.tsx": () => import("./components/Icons/Body.js"), "../Icons/Braille.tsx": () => import("./components/Icons/Braille.js"), "../Icons/Brain.tsx": () => import("./components/Icons/Brain.js"), "../Icons/BreastReconstruction.tsx": () => import("./components/Icons/BreastReconstruction.js"), "../Icons/BreastRemoval.tsx": () => import("./components/Icons/BreastRemoval.js"), "../Icons/Breasts.tsx": () => import("./components/Icons/Breasts.js"), "../Icons/BrokenHeart.tsx": () => import("./components/Icons/BrokenHeart.js"), "../Icons/BrokenPuzzle.tsx": () => import("./components/Icons/BrokenPuzzle.js"), "../Icons/Bus.tsx": () => import("./components/Icons/Bus.js"), "../Icons/Calendar.tsx": () => import("./components/Icons/Calendar.js"), "../Icons/CalendarChange.tsx": () => import("./components/Icons/CalendarChange.js"), "../Icons/CalendarCheck.tsx": () => import("./components/Icons/CalendarCheck.js"), "../Icons/CalendarEvent.tsx": () => import("./components/Icons/CalendarEvent.js"), "../Icons/CalendarSave.tsx": () => import("./components/Icons/CalendarSave.js"), "../Icons/Cancer.tsx": () => import("./components/Icons/Cancer.js"), "../Icons/Candle.tsx": () => import("./components/Icons/Candle.js"), "../Icons/Car.tsx": () => import("./components/Icons/Car.js"), "../Icons/Carton.tsx": () => import("./components/Icons/Carton.js"), "../Icons/Change.tsx": () => import("./components/Icons/Change.js"), "../Icons/Check.tsx": () => import("./components/Icons/Check.js"), "../Icons/CheckFill.tsx": () => import("./components/Icons/CheckFill.js"), "../Icons/CheckOutline.tsx": () => import("./components/Icons/CheckOutline.js"), "../Icons/Chest.tsx": () => import("./components/Icons/Chest.js"), "../Icons/ChevronDown.tsx": () => import("./components/Icons/ChevronDown.js"), "../Icons/ChevronLeft.tsx": () => import("./components/Icons/ChevronLeft.js"), "../Icons/ChevronRight.tsx": () => import("./components/Icons/ChevronRight.js"), "../Icons/ChevronUp.tsx": () => import("./components/Icons/ChevronUp.js"), "../Icons/ChevronsDown.tsx": () => import("./components/Icons/ChevronsDown.js"), "../Icons/ChevronsUp.tsx": () => import("./components/Icons/ChevronsUp.js"), "../Icons/ChildPlaying.tsx": () => import("./components/Icons/ChildPlaying.js"), "../Icons/Cigarette.tsx": () => import("./components/Icons/Cigarette.js"), "../Icons/Coins.tsx": () => import("./components/Icons/Coins.js"), "../Icons/Contacts.tsx": () => import("./components/Icons/Contacts.js"), "../Icons/Copy.tsx": () => import("./components/Icons/Copy.js"), "../Icons/CoronaCertificate.tsx": () => import("./components/Icons/CoronaCertificate.js"), "../Icons/Coronavirus.tsx": () => import("./components/Icons/Coronavirus.js"), "../Icons/Cough.tsx": () => import("./components/Icons/Cough.js"), "../Icons/CreditCard.tsx": () => import("./components/Icons/CreditCard.js"), "../Icons/CriticalHealthInfo.tsx": () => import("./components/Icons/CriticalHealthInfo.js"), "../Icons/Cross.tsx": () => import("./components/Icons/Cross.js"), "../Icons/DataExchange.tsx": () => import("./components/Icons/DataExchange.js"), "../Icons/DataReceived.tsx": () => import("./components/Icons/DataReceived.js"), "../Icons/DataSent.tsx": () => import("./components/Icons/DataSent.js"), "../Icons/Depression.tsx": () => import("./components/Icons/Depression.js"), "../Icons/DigestiveSystem.tsx": () => import("./components/Icons/DigestiveSystem.js"), "../Icons/Dizzy.tsx": () => import("./components/Icons/Dizzy.js"), "../Icons/Documents.tsx": () => import("./components/Icons/Documents.js"), "../Icons/Dog.tsx": () => import("./components/Icons/Dog.js"), "../Icons/DonorCard.tsx": () => import("./components/Icons/DonorCard.js"), "../Icons/DotAlert.tsx": () => import("./components/Icons/DotAlert.js"), "../Icons/DotCancelled.tsx": () => import("./components/Icons/DotCancelled.js"), "../Icons/DotHalfDisc.tsx": () => import("./components/Icons/DotHalfDisc.js"), "../Icons/DotInfo.tsx": () => import("./components/Icons/DotInfo.js"), "../Icons/DotLookingGlass.tsx": () => import("./components/Icons/DotLookingGlass.js"), "../Icons/DotQuestionMark.tsx": () => import("./components/Icons/DotQuestionMark.js"), "../Icons/DotSuccess.tsx": () => import("./components/Icons/DotSuccess.js"), "../Icons/DotTransparent.tsx": () => import("./components/Icons/DotTransparent.js"), "../Icons/DotWarningTriangle.tsx": () => import("./components/Icons/DotWarningTriangle.js"), "../Icons/Download.tsx": () => import("./components/Icons/Download.js"), "../Icons/Draft.tsx": () => import("./components/Icons/Draft.js"), "../Icons/EChat.tsx": () => import("./components/Icons/EChat.js"), "../Icons/Ear.tsx": () => import("./components/Icons/Ear.js"), "../Icons/EarDeaf.tsx": () => import("./components/Icons/EarDeaf.js"), "../Icons/EarHearingAid.tsx": () => import("./components/Icons/EarHearingAid.js"), "../Icons/EarNoseThroat.tsx": () => import("./components/Icons/EarNoseThroat.js"), "../Icons/EarVolume.tsx": () => import("./components/Icons/EarVolume.js"), "../Icons/ElderlyPerson.tsx": () => import("./components/Icons/ElderlyPerson.js"), "../Icons/Embolization.tsx": () => import("./components/Icons/Embolization.js"), "../Icons/EmergencyCall.tsx": () => import("./components/Icons/EmergencyCall.js"), "../Icons/EmoticonAnnoyed.tsx": () => import("./components/Icons/EmoticonAnnoyed.js"), "../Icons/EmoticonDelighted.tsx": () => import("./components/Icons/EmoticonDelighted.js"), "../Icons/EmoticonDisappointed.tsx": () => import("./components/Icons/EmoticonDisappointed.js"), "../Icons/EmoticonHappy.tsx": () => import("./components/Icons/EmoticonHappy.js"), "../Icons/EmoticonMeh.tsx": () => import("./components/Icons/EmoticonMeh.js"), "../Icons/EmptyBox.tsx": () => import("./components/Icons/EmptyBox.js"), "../Icons/EnterFullScreen.tsx": () => import("./components/Icons/EnterFullScreen.js"), "../Icons/Envelope.tsx": () => import("./components/Icons/Envelope.js"), "../Icons/Epilepsy.tsx": () => import("./components/Icons/Epilepsy.js"), "../Icons/Eraser.tsx": () => import("./components/Icons/Eraser.js"), "../Icons/ErrorSignFill.tsx": () => import("./components/Icons/ErrorSignFill.js"), "../Icons/ErrorSignStroke.tsx": () => import("./components/Icons/ErrorSignStroke.js"), "../Icons/EuropeanHealthCard.tsx": () => import("./components/Icons/EuropeanHealthCard.js"), "../Icons/ExitFullScreen.tsx": () => import("./components/Icons/ExitFullScreen.js"), "../Icons/Eye.tsx": () => import("./components/Icons/Eye.js"), "../Icons/Facebook.tsx": () => import("./components/Icons/Facebook.js"), "../Icons/FallingLeaf.tsx": () => import("./components/Icons/FallingLeaf.js"), "../Icons/Female.tsx": () => import("./components/Icons/Female.js"), "../Icons/FemaleDoctor.tsx": () => import("./components/Icons/FemaleDoctor.js"), "../Icons/Ferry.tsx": () => import("./components/Icons/Ferry.js"), "../Icons/File.tsx": () => import("./components/Icons/File.js"), "../Icons/Filter.tsx": () => import("./components/Icons/Filter.js"), "../Icons/FingerBleed.tsx": () => import("./components/Icons/FingerBleed.js"), "../Icons/FirstAidKit.tsx": () => import("./components/Icons/FirstAidKit.js"), "../Icons/Fish.tsx": () => import("./components/Icons/Fish.js"), "../Icons/FloppyDisk.tsx": () => import("./components/Icons/FloppyDisk.js"), "../Icons/Football.tsx": () => import("./components/Icons/Football.js"), "../Icons/Form.tsx": () => import("./components/Icons/Form.js"), "../Icons/Forward.tsx": () => import("./components/Icons/Forward.js"), "../Icons/Gallery.tsx": () => import("./components/Icons/Gallery.js"), "../Icons/Garden.tsx": () => import("./components/Icons/Garden.js"), "../Icons/GasCan.tsx": () => import("./components/Icons/GasCan.js"), "../Icons/GenderIdentity.tsx": () => import("./components/Icons/GenderIdentity.js"), "../Icons/GlassWater.tsx": () => import("./components/Icons/GlassWater.js"), "../Icons/Glasses.tsx": () => import("./components/Icons/Glasses.js"), "../Icons/Globe.tsx": () => import("./components/Icons/Globe.js"), "../Icons/Grain.tsx": () => import("./components/Icons/Grain.js"), "../Icons/Graph.tsx": () => import("./components/Icons/Graph.js"), "../Icons/Group.tsx": () => import("./components/Icons/Group.js"), "../Icons/GroupTwins.tsx": () => import("./components/Icons/GroupTwins.js"), "../Icons/HTMLFile.tsx": () => import("./components/Icons/HTMLFile.js"), "../Icons/HandWaving.tsx": () => import("./components/Icons/HandWaving.js"), "../Icons/HandWithDisease.tsx": () => import("./components/Icons/HandWithDisease.js"), "../Icons/HandsAndHeart.tsx": () => import("./components/Icons/HandsAndHeart.js"), "../Icons/HealthClinic.tsx": () => import("./components/Icons/HealthClinic.js"), "../Icons/HealthMeasurements.tsx": () => import("./components/Icons/HealthMeasurements.js"), "../Icons/HealthWarning.tsx": () => import("./components/Icons/HealthWarning.js"), "../Icons/HealthcarePerson.tsx": () => import("./components/Icons/HealthcarePerson.js"), "../Icons/HealthcarePersonell.tsx": () => import("./components/Icons/HealthcarePersonell.js"), "../Icons/HearingProtection.tsx": () => import("./components/Icons/HearingProtection.js"), "../Icons/Heart.tsx": () => import("./components/Icons/Heart.js"), "../Icons/HeartHands.tsx": () => import("./components/Icons/HeartHands.js"), "../Icons/HelpSign.tsx": () => import("./components/Icons/HelpSign.js"), "../Icons/HelpingHand.tsx": () => import("./components/Icons/HelpingHand.js"), "../Icons/Hemodialysis.tsx": () => import("./components/Icons/Hemodialysis.js"), "../Icons/Hiker.tsx": () => import("./components/Icons/Hiker.js"), "../Icons/Hipprosthesis.tsx": () => import("./components/Icons/Hipprosthesis.js"), "../Icons/History.tsx": () => import("./components/Icons/History.js"), "../Icons/HivAndAids.tsx": () => import("./components/Icons/HivAndAids.js"), "../Icons/Home.tsx": () => import("./components/Icons/Home.js"), "../Icons/HomeFill.tsx": () => import("./components/Icons/HomeFill.js"), "../Icons/Hormone.tsx": () => import("./components/Icons/Hormone.js"), "../Icons/Hospital.tsx": () => import("./components/Icons/Hospital.js"), "../Icons/Hourglass.tsx": () => import("./components/Icons/Hourglass.js"), "../Icons/ImgFile.tsx": () => import("./components/Icons/ImgFile.js"), "../Icons/Inbox.tsx": () => import("./components/Icons/Inbox.js"), "../Icons/InfoSignFill.tsx": () => import("./components/Icons/InfoSignFill.js"), "../Icons/InfoSignStroke.tsx": () => import("./components/Icons/InfoSignStroke.js"), "../Icons/Instagram.tsx": () => import("./components/Icons/Instagram.js"), "../Icons/Intravenous.tsx": () => import("./components/Icons/Intravenous.js"), "../Icons/JointPain.tsx": () => import("./components/Icons/JointPain.js"), "../Icons/Journal.tsx": () => import("./components/Icons/Journal.js"), "../Icons/JpgFile.tsx": () => import("./components/Icons/JpgFile.js"), "../Icons/Kidney.tsx": () => import("./components/Icons/Kidney.js"), "../Icons/KitchenScale.tsx": () => import("./components/Icons/KitchenScale.js"), "../Icons/Kjernejournal.tsx": () => import("./components/Icons/Kjernejournal.js"), "../Icons/Laboratory.tsx": () => import("./components/Icons/Laboratory.js"), "../Icons/LaptopBlog.tsx": () => import("./components/Icons/LaptopBlog.js"), "../Icons/LawBook.tsx": () => import("./components/Icons/LawBook.js"), "../Icons/LegalDocument.tsx": () => import("./components/Icons/LegalDocument.js"), "../Icons/LightBulb.tsx": () => import("./components/Icons/LightBulb.js"), "../Icons/List.tsx": () => import("./components/Icons/List.js"), "../Icons/Location.tsx": () => import("./components/Icons/Location.js"), "../Icons/LocationFill.tsx": () => import("./components/Icons/LocationFill.js"), "../Icons/Lock.tsx": () => import("./components/Icons/Lock.js"), "../Icons/Login.tsx": () => import("./components/Icons/Login.js"), "../Icons/Logout.tsx": () => import("./components/Icons/Logout.js"), "../Icons/Lungs.tsx": () => import("./components/Icons/Lungs.js"), "../Icons/Makeup.tsx": () => import("./components/Icons/Makeup.js"), "../Icons/MaleDoctor.tsx": () => import("./components/Icons/MaleDoctor.js"), "../Icons/MaleDoctorAndPerson.tsx": () => import("./components/Icons/MaleDoctorAndPerson.js"), "../Icons/MaleDoctorCompact.tsx": () => import("./components/Icons/MaleDoctorCompact.js"), "../Icons/MaleDoctorCompactFill.tsx": () => import("./components/Icons/MaleDoctorCompactFill.js"), "../Icons/MaleGenitalia.tsx": () => import("./components/Icons/MaleGenitalia.js"), "../Icons/Medicine.tsx": () => import("./components/Icons/Medicine.js"), "../Icons/MedicineWarning.tsx": () => import("./components/Icons/MedicineWarning.js"), "../Icons/MentalHealthAdult.tsx": () => import("./components/Icons/MentalHealthAdult.js"), "../Icons/MentalHealthChild.tsx": () => import("./components/Icons/MentalHealthChild.js"), "../Icons/Menu.tsx": () => import("./components/Icons/Menu.js"), "../Icons/Microscope.tsx": () => import("./components/Icons/Microscope.js"), "../Icons/Minus.tsx": () => import("./components/Icons/Minus.js"), "../Icons/Mirror.tsx": () => import("./components/Icons/Mirror.js"), "../Icons/MobilePhone.tsx": () => import("./components/Icons/MobilePhone.js"), "../Icons/MotherHoldingBaby.tsx": () => import("./components/Icons/MotherHoldingBaby.js"), "../Icons/MuscleBack.tsx": () => import("./components/Icons/MuscleBack.js"), "../Icons/MuscleLeg.tsx": () => import("./components/Icons/MuscleLeg.js"), "../Icons/Mushroom.tsx": () => import("./components/Icons/Mushroom.js"), "../Icons/Music.tsx": () => import("./components/Icons/Music.js"), "../Icons/MusselsAndSalt.tsx": () => import("./components/Icons/MusselsAndSalt.js"), "../Icons/NoAccess.tsx": () => import("./components/Icons/NoAccess.js"), "../Icons/NoEye.tsx": () => import("./components/Icons/NoEye.js"), "../Icons/NoFilter.tsx": () => import("./components/Icons/NoFilter.js"), "../Icons/Notepad.tsx": () => import("./components/Icons/Notepad.js"), "../Icons/Osteotomy.tsx": () => import("./components/Icons/Osteotomy.js"), "../Icons/PaintRoller.tsx": () => import("./components/Icons/PaintRoller.js"), "../Icons/PaperPlane.tsx": () => import("./components/Icons/PaperPlane.js"), "../Icons/PatientAndPerson.tsx": () => import("./components/Icons/PatientAndPerson.js"), "../Icons/Pause.tsx": () => import("./components/Icons/Pause.js"), "../Icons/PdfFile.tsx": () => import("./components/Icons/PdfFile.js"), "../Icons/Pencil.tsx": () => import("./components/Icons/Pencil.js"), "../Icons/PeopleTalking.tsx": () => import("./components/Icons/PeopleTalking.js"), "../Icons/Peritonealdialysis.tsx": () => import("./components/Icons/Peritonealdialysis.js"), "../Icons/Person.tsx": () => import("./components/Icons/Person.js"), "../Icons/PersonAndPatient.tsx": () => import("./components/Icons/PersonAndPatient.js"), "../Icons/PersonCancel.tsx": () => import("./components/Icons/PersonCancel.js"), "../Icons/PersonInXRayMachine.tsx": () => import("./components/Icons/PersonInXRayMachine.js"), "../Icons/PersonOverweight.tsx": () => import("./components/Icons/PersonOverweight.js"), "../Icons/PersonRelaxing.tsx": () => import("./components/Icons/PersonRelaxing.js"), "../Icons/PersonWithBrain.tsx": () => import("./components/Icons/PersonWithBrain.js"), "../Icons/PersonWithBrokenArm.tsx": () => import("./components/Icons/PersonWithBrokenArm.js"), "../Icons/PersonWithCrutches.tsx": () => import("./components/Icons/PersonWithCrutches.js"), "../Icons/PersonWithJaw.tsx": () => import("./components/Icons/PersonWithJaw.js"), "../Icons/PersonWithMagnifyingGlass.tsx": () => import("./components/Icons/PersonWithMagnifyingGlass.js"), "../Icons/PersonWithSenses.tsx": () => import("./components/Icons/PersonWithSenses.js"), "../Icons/PersonWorking.tsx": () => import("./components/Icons/PersonWorking.js"), "../Icons/PersonalPlan.tsx": () => import("./components/Icons/PersonalPlan.js"), "../Icons/PizzaSlice.tsx": () => import("./components/Icons/PizzaSlice.js"), "../Icons/Plane.tsx": () => import("./components/Icons/Plane.js"), "../Icons/Plant.tsx": () => import("./components/Icons/Plant.js"), "../Icons/PlateKnifeFork.tsx": () => import("./components/Icons/PlateKnifeFork.js"), "../Icons/Play.tsx": () => import("./components/Icons/Play.js"), "../Icons/PlusLarge.tsx": () => import("./components/Icons/PlusLarge.js"), "../Icons/PlusSmall.tsx": () => import("./components/Icons/PlusSmall.js"), "../Icons/PngFile.tsx": () => import("./components/Icons/PngFile.js"), "../Icons/Podcast.tsx": () => import("./components/Icons/Podcast.js"), "../Icons/PoisonInformation.tsx": () => import("./components/Icons/PoisonInformation.js"), "../Icons/Pregnant.tsx": () => import("./components/Icons/Pregnant.js"), "../Icons/Printer.tsx": () => import("./components/Icons/Printer.js"), "../Icons/Psychosis.tsx": () => import("./components/Icons/Psychosis.js"), "../Icons/Publication.tsx": () => import("./components/Icons/Publication.js"), "../Icons/Puzzle.tsx": () => import("./components/Icons/Puzzle.js"), "../Icons/QrCode.tsx": () => import("./components/Icons/QrCode.js"), "../Icons/Quarrel.tsx": () => import("./components/Icons/Quarrel.js"), "../Icons/RadioTherapy.tsx": () => import("./components/Icons/RadioTherapy.js"), "../Icons/RadioactiveTreatment.tsx": () => import("./components/Icons/RadioactiveTreatment.js"), "../Icons/Radioiodine.tsx": () => import("./components/Icons/Radioiodine.js"), "../Icons/Receipt.tsx": () => import("./components/Icons/Receipt.js"), "../Icons/Receptionist.tsx": () => import("./components/Icons/Receptionist.js"), "../Icons/Recovery.tsx": () => import("./components/Icons/Recovery.js"), "../Icons/Referral.tsx": () => import("./components/Icons/Referral.js"), "../Icons/Refresh.tsx": () => import("./components/Icons/Refresh.js"), "../Icons/Refund.tsx": () => import("./components/Icons/Refund.js"), "../Icons/Reminder.tsx": () => import("./components/Icons/Reminder.js"), "../Icons/Reply.tsx": () => import("./components/Icons/Reply.js"), "../Icons/Rocket.tsx": () => import("./components/Icons/Rocket.js"), "../Icons/RtfFile.tsx": () => import("./components/Icons/RtfFile.js"), "../Icons/STDs.tsx": () => import("./components/Icons/STDs.js"), "../Icons/Save.tsx": () => import("./components/Icons/Save.js"), "../Icons/Scale.tsx": () => import("./components/Icons/Scale.js"), "../Icons/ScreenReader.tsx": () => import("./components/Icons/ScreenReader.js"), "../Icons/Search.tsx": () => import("./components/Icons/Search.js"), "../Icons/SectionSign.tsx": () => import("./components/Icons/SectionSign.js"), "../Icons/Settings.tsx": () => import("./components/Icons/Settings.js"), "../Icons/SettingsFill.tsx": () => import("./components/Icons/SettingsFill.js"), "../Icons/Sexualorientation.tsx": () => import("./components/Icons/Sexualorientation.js"), "../Icons/ShakingHand.tsx": () => import("./components/Icons/ShakingHand.js"), "../Icons/Share.tsx": () => import("./components/Icons/Share.js"), "../Icons/SharedHealthData.tsx": () => import("./components/Icons/SharedHealthData.js"), "../Icons/SharedHealthMeasurements.tsx": () => import("./components/Icons/SharedHealthMeasurements.js"), "../Icons/Shield.tsx": () => import("./components/Icons/Shield.js"), "../Icons/ShuntOperation.tsx": () => import("./components/Icons/ShuntOperation.js"), "../Icons/Skeleton.tsx": () => import("./components/Icons/Skeleton.js"), "../Icons/Skin.tsx": () => import("./components/Icons/Skin.js"), "../Icons/Snake.tsx": () => import("./components/Icons/Snake.js"), "../Icons/Snapchat.tsx": () => import("./components/Icons/Snapchat.js"), "../Icons/SortDown.tsx": () => import("./components/Icons/SortDown.js"), "../Icons/SortUp.tsx": () => import("./components/Icons/SortUp.js"), "../Icons/SpeechBubble.tsx": () => import("./components/Icons/SpeechBubble.js"), "../Icons/Spray.tsx": () => import("./components/Icons/Spray.js"), "../Icons/StickyNote.tsx": () => import("./components/Icons/StickyNote.js"), "../Icons/StickyNotes.tsx": () => import("./components/Icons/StickyNotes.js"), "../Icons/Stopwatch.tsx": () => import("./components/Icons/Stopwatch.js"), "../Icons/Sun.tsx": () => import("./components/Icons/Sun.js"), "../Icons/SupportingPerson.tsx": () => import("./components/Icons/SupportingPerson.js"), "../Icons/Surgery.tsx": () => import("./components/Icons/Surgery.js"), "../Icons/Sweets.tsx": () => import("./components/Icons/Sweets.js"), "../Icons/Syringe.tsx": () => import("./components/Icons/Syringe.js"), "../Icons/Taxi.tsx": () => import("./components/Icons/Taxi.js"), "../Icons/TeddyBear.tsx": () => import("./components/Icons/TeddyBear.js"), "../Icons/Teenagers.tsx": () => import("./components/Icons/Teenagers.js"), "../Icons/ThinkingAboutBaby.tsx": () => import("./components/Icons/ThinkingAboutBaby.js"), "../Icons/Ticket.tsx": () => import("./components/Icons/Ticket.js"), "../Icons/TimePassing.tsx": () => import("./components/Icons/TimePassing.js"), "../Icons/Toddler.tsx": () => import("./components/Icons/Toddler.js"), "../Icons/Tombstone.tsx": () => import("./components/Icons/Tombstone.js"), "../Icons/Toolbox.tsx": () => import("./components/Icons/Toolbox.js"), "../Icons/Tooth.tsx": () => import("./components/Icons/Tooth.js"), "../Icons/TotalKneeProsthesis.tsx": () => import("./components/Icons/TotalKneeProsthesis.js"), "../Icons/Train.tsx": () => import("./components/Icons/Train.js"), "../Icons/Transplantation.tsx": () => import("./components/Icons/Transplantation.js"), "../Icons/TrashCan.tsx": () => import("./components/Icons/TrashCan.js"), "../Icons/TravelRoute.tsx": () => import("./components/Icons/TravelRoute.js"), "../Icons/TriangleX.tsx": () => import("./components/Icons/TriangleX.js"), "../Icons/Twitter.tsx": () => import("./components/Icons/Twitter.js"), "../Icons/Undo.tsx": () => import("./components/Icons/Undo.js"), "../Icons/UniProsthesis.tsx": () => import("./components/Icons/UniProsthesis.js"), "../Icons/Upload.tsx": () => import("./components/Icons/Upload.js"), "../Icons/UserOrganization.tsx": () => import("./components/Icons/UserOrganization.js"), "../Icons/Vaccine.tsx": () => import("./components/Icons/Vaccine.js"), "../Icons/VerticalDots.tsx": () => import("./components/Icons/VerticalDots.js"), "../Icons/VideoCamera.tsx": () => import("./components/Icons/VideoCamera.js"), "../Icons/VideoChat.tsx": () => import("./components/Icons/VideoChat.js"), "../Icons/Wallet.tsx": () => import("./components/Icons/Wallet.js"), "../Icons/Watch.tsx": () => import("./components/Icons/Watch.js"), "../Icons/Website.tsx": () => import("./components/Icons/Website.js"), "../Icons/Wheelchair.tsx": () => import("./components/Icons/Wheelchair.js"), "../Icons/WheelchairActive.tsx": () => import("./components/Icons/WheelchairActive.js"), "../Icons/Window.tsx": () => import("./components/Icons/Window.js"), "../Icons/WordDocument.tsx": () => import("./components/Icons/WordDocument.js"), "../Icons/WorkSuitcase.tsx": () => import("./components/Icons/WorkSuitcase.js"), "../Icons/X.tsx": () => import("./components/Icons/X.js"), "../Icons/XOutline.tsx": () => import("./components/Icons/XOutline.js"), "../Icons/XmlFile.tsx": () => import("./components/Icons/XmlFile.js"), "../Icons/YouTube.tsx": () => import("./components/Icons/YouTube.js"), "../Icons/Zoom.tsx": () => import("./components/Icons/Zoom.js") }), `../Icons/${iconName}.tsx`, 3));
8
8
  const LazyIcon = ({ iconName, size = IconSize.Small, ...rest }) => {
9
9
  const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);
10
10
  const isServerSide = useIsServerSide();
package/LazyIcon.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"LazyIcon.js","sources":["../src/components/LazyIcon/LazyIcon.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { useIsServerSide } from '../../hooks/useIsServerSide';\nimport Icon, { BaseIconProps, IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> =>\n lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n const isServerSide = useIsServerSide();\n\n if (isServerSide) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n"],"names":[],"mappings":";;;;;;AAYa,MAAA,eAAe,CAAC,aAC3B,KAAc,MAAM,qCAAA,uBAAA,OAAA,EAAA,iCAAA,MAAA,OAAA,wCAAA,GAAA,gCAAA,MAAA,OAAA,uCAAA,GAAA,2BAAA,MAAA,OAAA,kCAAA,GAAA,8BAAA,MAAA,OAAA,qCAAA,GAAA,gCAAA,MAAA,OAAA,uCAAA,GAAA,2BAAA,MAAA,OAAA,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R,UAAC,oBAAA,MAAA,EAAK,SAAS,MAAM,MAAa,GAAG,KAAA,CAAM,EAC7C,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"LazyIcon.js","sources":["../src/components/LazyIcon/LazyIcon.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { useIsServerSide } from '../../hooks/useIsServerSide';\nimport Icon, { BaseIconProps, IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> =>\n lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n const isServerSide = useIsServerSide();\n\n if (isServerSide) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n"],"names":[],"mappings":";;;;;;AAYa,MAAA,eAAe,CAAC,aAC3B,KAAc,MAAM,qCAAA,uBAAA,OAAA,EAAA,iCAAA,MAAA,OAAA,wCAAA,GAAA,gCAAA,MAAA,OAAA,uCAAA,GAAA,2BAAA,MAAA,OAAA,kCAAA,GAAA,8BAAA,MAAA,OAAA,qCAAA,GAAA,gCAAA,MAAA,OAAA,uCAAA,GAAA,2BAAA,MAAA,OAAA,kCAAA,GAA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8BAAC,UAAS,EAAA,UACR,UAAC,oBAAA,MAAA,EAAK,SAAS,MAAM,MAAa,GAAG,KAAA,CAAM,EAC7C,CAAA,GACF;AAEJ;"}
@@ -8,7 +8,7 @@ import { IllustrationSizeList } from "./components/Illustrations/IllustrationNam
8
8
  const lazyLoadIllustration = (illustrationName, size) => {
9
9
  const sizes = IllustrationSizeList[illustrationName];
10
10
  const illustrationFileName = getIllustration({ size, ...sizes });
11
- return lazy(() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../Illustrations/Doctor.tsx": () => import("./components/Illustrations/Doctor.js"), "../Illustrations/DoctorMedium.tsx": () => import("./components/Illustrations/DoctorMedium.js"), "../Illustrations/DoctorSmall.tsx": () => import("./components/Illustrations/DoctorSmall.js"), "../Illustrations/FacialRecognitionFingerprint.tsx": () => import("./components/Illustrations/FacialRecognitionFingerprint.js"), "../Illustrations/FacialRecognitionFingerprintMedium.tsx": () => import("./components/Illustrations/FacialRecognitionFingerprintMedium.js"), "../Illustrations/HealthcarePersonnel.tsx": () => import("./components/Illustrations/HealthcarePersonnel.js"), "../Illustrations/HealthcarePersonnelMedium.tsx": () => import("./components/Illustrations/HealthcarePersonnelMedium.js"), "../Illustrations/HealthcarePersonnelSmall.tsx": () => import("./components/Illustrations/HealthcarePersonnelSmall.js"), "../Illustrations/ReadLetters.tsx": () => import("./components/Illustrations/ReadLetters.js"), "../Illustrations/ReadLettersMedium.tsx": () => import("./components/Illustrations/ReadLettersMedium.js"), "../Illustrations/Support2.tsx": () => import("./components/Illustrations/Support2.js"), "../Illustrations/Support2Medium.tsx": () => import("./components/Illustrations/Support2Medium.js") }), `../Illustrations/${illustrationFileName}.tsx`, 3));
11
+ return lazy(() => __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "../Illustrations/BabyMobile.tsx": () => import("./components/Illustrations/BabyMobile.js"), "../Illustrations/BabyMobileMedium.tsx": () => import("./components/Illustrations/BabyMobileMedium.js"), "../Illustrations/Child.tsx": () => import("./components/Illustrations/Child.js"), "../Illustrations/ChildMedium.tsx": () => import("./components/Illustrations/ChildMedium.js"), "../Illustrations/Doctor.tsx": () => import("./components/Illustrations/Doctor.js"), "../Illustrations/DoctorMedium.tsx": () => import("./components/Illustrations/DoctorMedium.js"), "../Illustrations/DoctorSmall.tsx": () => import("./components/Illustrations/DoctorSmall.js"), "../Illustrations/FacialRecognitionFingerprint.tsx": () => import("./components/Illustrations/FacialRecognitionFingerprint.js"), "../Illustrations/FacialRecognitionFingerprintMedium.tsx": () => import("./components/Illustrations/FacialRecognitionFingerprintMedium.js"), "../Illustrations/GiveBabyFood.tsx": () => import("./components/Illustrations/GiveBabyFood.js"), "../Illustrations/GiveBabyFoodMedium.tsx": () => import("./components/Illustrations/GiveBabyFoodMedium.js"), "../Illustrations/HealthcarePersonnel.tsx": () => import("./components/Illustrations/HealthcarePersonnel.js"), "../Illustrations/HealthcarePersonnelMedium.tsx": () => import("./components/Illustrations/HealthcarePersonnelMedium.js"), "../Illustrations/HealthcarePersonnelSmall.tsx": () => import("./components/Illustrations/HealthcarePersonnelSmall.js"), "../Illustrations/ReadLetters.tsx": () => import("./components/Illustrations/ReadLetters.js"), "../Illustrations/ReadLettersMedium.tsx": () => import("./components/Illustrations/ReadLettersMedium.js"), "../Illustrations/Stroller.tsx": () => import("./components/Illustrations/Stroller.js"), "../Illustrations/StrollerMedium.tsx": () => import("./components/Illustrations/StrollerMedium.js"), "../Illustrations/Support2.tsx": () => import("./components/Illustrations/Support2.js"), "../Illustrations/Support2Medium.tsx": () => import("./components/Illustrations/Support2Medium.js") }), `../Illustrations/${illustrationFileName}.tsx`, 3));
12
12
  };
13
13
  const LazyIllustration = ({ illustrationName, size = 512, ...rest }) => {
14
14
  const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);
@@ -1 +1 @@
1
- {"version":3,"file":"LazyIllustration.js","sources":["../src/components/LazyIllustration/LazyIllustration.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport { useIsServerSide } from '../../hooks/useIsServerSide';\nimport Illustration, { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationName, IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n};\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n const isServerSide = useIsServerSide();\n\n if (isServerSide) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n"],"names":[],"mappings":";;;;;;;AAaa,MAAA,uBAAuB,CAAC,kBAAoC,SAA6D;AAC9H,QAAA,QAAQ,qBAAqB,gBAAgB;AACnD,QAAM,uBAAuB,gBAAgB,EAAE,MAAM,GAAG,OAAO;AAE/D,SAAO,KAAsB,MAAM,s1CAAA,oBAAA,oBAAA,QAAA,CAAA,CAAsD;AAC3F;AAEa,MAAA,mBAAoD,CAAC,EAAE,kBAAkB,OAAO,KAAK,GAAG,WAAW;AACxG,QAAA,eAAe,QAAQ,MAAM,qBAAqB,kBAAkB,IAAI,GAAG,CAAC,kBAAkB,IAAI,CAAC;AACzG,QAAM,eAAe,gBAAgB;AAErC,MAAI,cAAc;AACT,WAAA;AAAA,EAAA;AAGT,QAAM,WACJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAU,MAAM,WAAW,KAAK;AAAA,MACzC,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAGF,SACG,oBAAA,eAAA,EAAc,UAAoB,OAAO,kBACxC,UAAC,oBAAA,UAAA,EAAS,UACR,UAAA,oBAAC,gBAAa,cAA4B,MAAa,GAAG,KAAA,CAAM,EAClE,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"LazyIllustration.js","sources":["../src/components/LazyIllustration/LazyIllustration.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport { useIsServerSide } from '../../hooks/useIsServerSide';\nimport Illustration, { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationName, IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n};\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n const isServerSide = useIsServerSide();\n\n if (isServerSide) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n"],"names":[],"mappings":";;;;;;;AAaa,MAAA,uBAAuB,CAAC,kBAAoC,SAA6D;AAC9H,QAAA,QAAQ,qBAAqB,gBAAgB;AACnD,QAAM,uBAAuB,gBAAgB,EAAE,MAAM,GAAG,OAAO;AAE/D,SAAO,KAAsB,MAAM,0lEAAA,oBAAA,oBAAA,QAAA,CAAA,CAAsD;AAC3F;AAEa,MAAA,mBAAoD,CAAC,EAAE,kBAAkB,OAAO,KAAK,GAAG,WAAW;AACxG,QAAA,eAAe,QAAQ,MAAM,qBAAqB,kBAAkB,IAAI,GAAG,CAAC,kBAAkB,IAAI,CAAC;AACzG,QAAM,eAAe,gBAAgB;AAErC,MAAI,cAAc;AACT,WAAA;AAAA,EAAA;AAGT,QAAM,WACJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAU,MAAM,WAAW,KAAK;AAAA,MACzC,OAAO;AAAA,MACP,QAAQ;AAAA,IAAA;AAAA,EACV;AAGF,SACG,oBAAA,eAAA,EAAc,UAAoB,OAAO,kBACxC,UAAC,oBAAA,UAAA,EAAS,UACR,UAAA,oBAAC,gBAAa,cAA4B,MAAa,GAAG,KAAA,CAAM,EAClE,CAAA,GACF;AAEJ;"}
package/Panel.js CHANGED
@@ -1,14 +1,36 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import React__default from "react";
3
3
  import classNames from "classnames";
4
+ import { LanguageLocales, IconSize } from "./constants.js";
4
5
  import { B as Button } from "./Button.js";
5
6
  import { I as Icon } from "./Icon.js";
6
- import { IconSize } from "./constants.js";
7
7
  import { P as PanelTitle } from "./PanelTitle.js";
8
+ import { useLanguage } from "./utils/language.js";
8
9
  import ChevronDown from "./components/Icons/ChevronDown.js";
9
10
  import ChevronRight from "./components/Icons/ChevronRight.js";
10
11
  import ChevronUp from "./components/Icons/ChevronUp.js";
11
12
  import styles from "./components/Panel/styles.module.scss";
13
+ const expandButtonOpen$1 = "See details";
14
+ const expandButtonClose$1 = "Hide details";
15
+ const enGB = {
16
+ expandButtonOpen: expandButtonOpen$1,
17
+ expandButtonClose: expandButtonClose$1
18
+ };
19
+ const expandButtonOpen = "Se detaljer";
20
+ const expandButtonClose = "Skjul detaljer";
21
+ const nbNO = {
22
+ expandButtonOpen,
23
+ expandButtonClose
24
+ };
25
+ const getResources = (language) => {
26
+ switch (language) {
27
+ case LanguageLocales.ENGLISH:
28
+ return enGB;
29
+ case LanguageLocales.NORWEGIAN:
30
+ default:
31
+ return nbNO;
32
+ }
33
+ };
12
34
  var PanelLayout = /* @__PURE__ */ ((PanelLayout2) => {
13
35
  PanelLayout2["vertical"] = "vertical";
14
36
  PanelLayout2["horizontal"] = "horizontal";
@@ -34,7 +56,11 @@ var PanelStatus = /* @__PURE__ */ ((PanelStatus2) => {
34
56
  PanelStatus2["draft"] = "draft";
35
57
  return PanelStatus2;
36
58
  })(PanelStatus || {});
37
- const ExpandButton = ({ onClick, isExpanded }) => {
59
+ const ExpandButton = ({
60
+ onClick,
61
+ isExpanded,
62
+ resources
63
+ }) => {
38
64
  const buttonClassName = classNames(styles["expander__button"], isExpanded && styles["expander__button--expanded"]);
39
65
  return /* @__PURE__ */ jsxs(
40
66
  Button,
@@ -46,7 +72,7 @@ const ExpandButton = ({ onClick, isExpanded }) => {
46
72
  onClick,
47
73
  children: [
48
74
  /* @__PURE__ */ jsx(Icon, { svgIcon: isExpanded ? ChevronUp : ChevronDown, size: IconSize.XSmall }),
49
- /* @__PURE__ */ jsx("span", { children: isExpanded ? "Skjul detaljer" : "Se detaljer" })
75
+ /* @__PURE__ */ jsx("span", { children: isExpanded ? resources.expandButtonClose : resources.expandButtonOpen })
50
76
  ]
51
77
  }
52
78
  );
@@ -61,7 +87,8 @@ const Panel = ({
61
87
  status = "none",
62
88
  buttonBottomOnClick,
63
89
  buttonBottomText,
64
- className
90
+ className,
91
+ resources
65
92
  }) => {
66
93
  const [preContainer, setPreContainer] = React__default.useState([]);
67
94
  const [title, setTitle] = React__default.useState([]);
@@ -72,6 +99,12 @@ const Panel = ({
72
99
  const panelRef = React__default.useRef(null);
73
100
  const expandedContentRef = React__default.useRef(null);
74
101
  const defaultScroll = 100;
102
+ const { language } = useLanguage(LanguageLocales.NORWEGIAN);
103
+ const defaultResources = getResources(language);
104
+ const mergedResources = {
105
+ ...defaultResources,
106
+ ...resources
107
+ };
75
108
  React__default.useEffect(() => {
76
109
  let localHasIcon = false;
77
110
  const newPreContainer = [];
@@ -149,7 +182,7 @@ const Panel = ({
149
182
  preContainer,
150
183
  title,
151
184
  /* @__PURE__ */ jsx("div", { className: contentContainerLayout, children: content }),
152
- /* @__PURE__ */ jsx(ExpandButton, { onClick: () => setIsExpanded(!isExpanded), isExpanded }),
185
+ /* @__PURE__ */ jsx(ExpandButton, { onClick: () => setIsExpanded(!isExpanded), isExpanded, resources: mergedResources }),
153
186
  isExpanded && /* @__PURE__ */ jsxs("div", { ref: expandedContentRef, children: [
154
187
  /* @__PURE__ */ jsx("div", { className: styles["panel__expander__separator"] }),
155
188
  expandableContent
package/Panel.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.js","sources":["../src/components/Panel/Panel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { PaletteNames } from '../../theme/palette';\nimport Button from '../Button';\nimport Icon, { IconSize } from '../Icon';\nimport PanelTitle, { PanelTitleProps } from './PanelTitle';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronRight from '../Icons/ChevronRight';\nimport ChevronUp from '../Icons/ChevronUp';\n\nimport styles from './styles.module.scss';\n\nexport enum PanelLayout {\n vertical = 'vertical',\n horizontal = 'horizontal',\n combined = 'combined',\n bAsRightCol = 'bAsRightCol',\n}\n\nexport type PanelColors = Extract<PaletteNames, 'white' | 'neutral'>;\n\nexport enum PanelVariant {\n fill = 'fill',\n line = 'line',\n outline = 'outline',\n}\n\nexport enum PanelStacking {\n default = 'default',\n bFirst = 'bFirst',\n}\n\nexport enum PanelStatus {\n none = 'none',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport interface PanelProps {\n /** Sets the text on the bottom call to action button */\n buttonBottomText?: string;\n /** Sets the action on the bottom call to action button */\n buttonBottomOnClick?: () => void;\n /** Sets the layout and order of the content boxes */\n layout?: PanelLayout;\n /** Sets the visual variant of panel */\n variant?: PanelVariant;\n /** Sets the color for panel if it has variant fill */\n color?: PanelColors;\n /** Sets classes on the outermost container of the panel */\n className?: string;\n /** Sets the stacking order of the content boxes */\n stacking?: PanelStacking;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Children elements to be rendered inside the panel */\n children?: React.ReactNode;\n /** Displays a status on the left side: default normal */\n status?: PanelStatus;\n}\n\nconst ExpandButton = ({ onClick, isExpanded }: { onClick: () => void; isExpanded: boolean | undefined }): React.JSX.Element => {\n const buttonClassName = classNames(styles['expander__button'], isExpanded && styles['expander__button--expanded']);\n\n return (\n <Button\n variant=\"borderless\"\n textClassName={styles['expander__button__text']}\n wrapperClassName={buttonClassName}\n aria-expanded={isExpanded}\n onClick={onClick}\n >\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} size={IconSize.XSmall} />\n {/* @todo: språk på knapp */}\n <span>{isExpanded ? 'Skjul detaljer' : 'Se detaljer'}</span>\n </Button>\n );\n};\n\nconst Panel: React.FC<PanelProps> & {\n PreContainer: React.FC<ContentProps>;\n Title: React.FC<PanelTitleProps>;\n A: React.FC<ContentProps>;\n B: React.FC<ContentProps>;\n C: React.FC<ContentProps>;\n ExpandedContent: React.FC<ContentProps>;\n} = ({\n layout = PanelLayout.vertical,\n variant = PanelVariant.fill,\n color = 'neutral',\n stacking = PanelStacking.default,\n testId,\n children,\n status = PanelStatus.none,\n buttonBottomOnClick,\n buttonBottomText,\n className,\n}: PanelProps) => {\n const [preContainer, setPreContainer] = React.useState<React.ReactNode[]>([]);\n const [title, setTitle] = React.useState<React.ReactNode[]>([]);\n const [content, setContent] = React.useState<React.ReactNode[]>([]);\n const [expandableContent, setExpandableContent] = React.useState<React.ReactNode[]>([]);\n const [hasIcon, setHasIcon] = React.useState(false);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const panelRef = React.useRef<HTMLDivElement>(null);\n const expandedContentRef = React.useRef<HTMLDivElement>(null);\n const defaultScroll = 100;\n\n React.useEffect(() => {\n let localHasIcon = false;\n const newPreContainer: React.ReactNode[] = [];\n const newTitle: React.ReactNode[] = [];\n const newContent: React.ReactNode[] = [];\n const newExpandableContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, child => {\n if (React.isValidElement(child)) {\n if (child.type === PreContainer) {\n newPreContainer.push(child);\n } else if (child.type === PanelTitle) {\n newTitle.push(child);\n if (child.props.icon) {\n localHasIcon = true;\n }\n } else if (child.type === A || child.type === B || child.type === C) {\n newContent.push(child);\n } else if (child.type === ExpandedContent) {\n newExpandableContent.push(child);\n }\n }\n });\n\n setPreContainer(newPreContainer);\n setTitle(newTitle);\n setContent(newContent);\n setExpandableContent(newExpandableContent);\n setHasIcon(localHasIcon);\n }, [children]);\n\n React.useEffect(() => {\n // Scroller oppover når expanded content åpnes\n if (isExpanded) {\n if (panelRef.current && expandedContentRef.current) {\n const panelRect = panelRef.current.getBoundingClientRect();\n const expandedContentRect = expandedContentRef.current.getBoundingClientRect();\n\n const scrollAmount = Math.min(defaultScroll, panelRect.top - 20);\n\n // Scroller kun oppover, og kun dersom expandedContent havner utenfor skjermen når åpnet\n if (scrollAmount > 0 && expandedContentRect.bottom > window.innerHeight) {\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (prefersReducedMotion) {\n return;\n }\n window.scrollBy({\n top: scrollAmount,\n behavior: 'smooth',\n });\n }\n }\n }\n }, [isExpanded]);\n\n const colorScheme = variant === PanelVariant.fill ? color : 'white';\n\n const outerClassnames = classNames(className, {\n [styles['panel__border--outline--outer']]: variant === PanelVariant.outline,\n [styles['panel__border--line']]: variant === PanelVariant.line,\n [styles['panel__border--fill--neutral']]: variant === PanelVariant.fill && colorScheme === 'neutral',\n });\n const panelClassnames = classNames(styles['panel'], styles[`panel--${colorScheme}`], styles['panel--status'], {\n [styles['panel--line']]: variant === PanelVariant.line,\n [styles['panel--new']]: status === PanelStatus.new,\n [styles['panel--draft']]: status === PanelStatus.draft,\n [styles['panel--error']]: status === PanelStatus.error,\n [styles['panel--icon']]: hasIcon,\n });\n const contentContainerLayout = classNames(styles['panel__content'], styles[`panel__content--${layout}`], {\n [styles[`panel__content--b-first`]]: stacking === PanelStacking.bFirst,\n });\n const expanderBorderLayout = classNames({\n [styles['panel__expander__border--expanded']]: isExpanded && status === PanelStatus.none,\n [styles[`panel__expander__border--not-expanded--${colorScheme}`]]: !isExpanded && status === PanelStatus.none,\n [styles[`panel__expander__border--not-expanded--line`]]: !isExpanded && status === PanelStatus.none && variant === PanelVariant.line,\n });\n\n return expandableContent.length > 0 ? (\n <div className={outerClassnames}>\n <div className={classNames({ [styles['panel__border--outline--inner']]: variant === PanelVariant.outline })}>\n <div className={expanderBorderLayout}>\n <div className={panelClassnames} data-testid={testId} ref={panelRef}>\n {preContainer}\n {title}\n <div className={contentContainerLayout}>{content}</div>\n <ExpandButton onClick={() => setIsExpanded(!isExpanded)} isExpanded={isExpanded} />\n {isExpanded && (\n <div ref={expandedContentRef}>\n <div className={styles['panel__expander__separator']} />\n {expandableContent}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className={outerClassnames}>\n <div className={classNames({ [styles['panel__border--outline--inner']]: variant === PanelVariant.outline })}>\n <div className={panelClassnames} data-testid={testId} ref={panelRef}>\n {preContainer}\n {title}\n <div className={contentContainerLayout}>{content}</div>\n {buttonBottomText && buttonBottomOnClick && (\n <div className={styles['panel__button-bottom']}>\n <Button variant=\"borderless\" type=\"button\" size=\"medium\" onClick={buttonBottomOnClick}>\n {buttonBottomText}\n <Icon svgIcon={ChevronRight} size={IconSize.XSmall} />\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport interface ContentProps {\n /** Children elements to be rendered inside the content box */\n children?: React.ReactNode;\n}\n\nexport const PreContainer: React.FC<ContentProps> = ({ children }) => {\n return <div className={styles['panel__pre-container']}>{children}</div>;\n};\n\nexport const A: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__content__item'], styles['panel__content__item--a']);\n return <div className={styling}>{children}</div>;\n};\n\nexport const B: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__content__item'], styles['panel__content__item--b']);\n return <div className={styling}>{children}</div>;\n};\n\nexport const C: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__content__item'], styles['panel__content__item--c']);\n return <div className={styling}>{children}</div>;\n};\n\nexport const ExpandedContent: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__expander__content']);\n return <div className={styling}>{children}</div>;\n};\n\nPanel.PreContainer = PreContainer;\nPanel.Title = PanelTitle;\nPanel.A = A;\nPanel.B = B;\nPanel.C = C;\nPanel.ExpandedContent = ExpandedContent;\n\nexport default Panel;\n"],"names":["PanelLayout","PanelVariant","PanelStacking","PanelStatus","React"],"mappings":";;;;;;;;;;;AAcY,IAAA,gCAAAA,iBAAL;AACLA,eAAA,UAAW,IAAA;AACXA,eAAA,YAAa,IAAA;AAC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,QAAA,EAAO,SAAQ,cAAa,MAAK,UAAS,MAAK,UAAS,SAAS,qBAC/D,UAAA;AAAA,MAAA;AAAA,0BACA,MAAK,EAAA,SAAS,cAAc,MAAM,SAAS,OAAQ,CAAA;AAAA,IAAA,EAAA,CACtD,EACF,CAAA;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA,GACF;AAEJ;AAOO,MAAM,eAAuC,CAAC,EAAE,eAAe;AACpE,6BAAQ,OAAI,EAAA,WAAW,OAAO,sBAAsB,GAAI,UAAS;AACnE;AAEO,MAAM,IAA4B,CAAC,EAAE,eAAe;AACzD,QAAM,UAAU,WAAW,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAC5F,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEO,MAAM,IAA4B,CAAC,EAAE,eAAe;AACzD,QAAM,UAAU,WAAW,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAC5F,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEO,MAAM,IAA4B,CAAC,EAAE,eAAe;AACzD,QAAM,UAAU,WAAW,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAC5F,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEO,MAAM,kBAA0C,CAAC,EAAE,eAAe;AACvE,QAAM,UAAU,WAAW,OAAO,0BAA0B,CAAC;AAC7D,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEA,MAAM,eAAe;AACrB,MAAM,QAAQ;AACd,MAAM,IAAI;AACV,MAAM,IAAI;AACV,MAAM,IAAI;AACV,MAAM,kBAAkB;"}
1
+ {"version":3,"file":"Panel.js","sources":["../src/components/Panel/resourceHelper.ts","../src/components/Panel/Panel.tsx"],"sourcesContent":["import { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Panel.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Panel.nb-NO.json';\nimport { HNDesignsystemPanel } from '../../resources/Resources';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemPanel => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { LanguageLocales } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\nimport Button from '../Button';\nimport Icon, { IconSize } from '../Icon';\nimport PanelTitle, { PanelTitleProps } from './PanelTitle';\nimport { getResources } from './resourceHelper';\nimport { HNDesignsystemPanel } from '../../resources/Resources';\nimport { useLanguage } from '../../utils/language';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronRight from '../Icons/ChevronRight';\nimport ChevronUp from '../Icons/ChevronUp';\n\nimport styles from './styles.module.scss';\n\nexport enum PanelLayout {\n vertical = 'vertical',\n horizontal = 'horizontal',\n combined = 'combined',\n bAsRightCol = 'bAsRightCol',\n}\n\nexport type PanelColors = Extract<PaletteNames, 'white' | 'neutral'>;\n\nexport enum PanelVariant {\n fill = 'fill',\n line = 'line',\n outline = 'outline',\n}\n\nexport enum PanelStacking {\n default = 'default',\n bFirst = 'bFirst',\n}\n\nexport enum PanelStatus {\n none = 'none',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport interface PanelProps {\n /** Sets the text on the bottom call to action button */\n buttonBottomText?: string;\n /** Sets the action on the bottom call to action button */\n buttonBottomOnClick?: () => void;\n /** Sets the layout and order of the content boxes */\n layout?: PanelLayout;\n /** Sets the visual variant of panel */\n variant?: PanelVariant;\n /** Sets the color for panel if it has variant fill */\n color?: PanelColors;\n /** Sets classes on the outermost container of the panel */\n className?: string;\n /** Sets the stacking order of the content boxes */\n stacking?: PanelStacking;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Children elements to be rendered inside the panel */\n children?: React.ReactNode;\n /** Displays a status on the left side: default normal */\n status?: PanelStatus;\n /** Resources for component */\n resources?: Partial<HNDesignsystemPanel>;\n}\n\nconst ExpandButton = ({\n onClick,\n isExpanded,\n resources,\n}: {\n onClick: () => void;\n isExpanded: boolean | undefined;\n resources: Partial<HNDesignsystemPanel>;\n}): React.JSX.Element => {\n const buttonClassName = classNames(styles['expander__button'], isExpanded && styles['expander__button--expanded']);\n\n return (\n <Button\n variant=\"borderless\"\n textClassName={styles['expander__button__text']}\n wrapperClassName={buttonClassName}\n aria-expanded={isExpanded}\n onClick={onClick}\n >\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} size={IconSize.XSmall} />\n <span>{isExpanded ? resources.expandButtonClose : resources.expandButtonOpen}</span>\n </Button>\n );\n};\n\nconst Panel: React.FC<PanelProps> & {\n PreContainer: React.FC<ContentProps>;\n Title: React.FC<PanelTitleProps>;\n A: React.FC<ContentProps>;\n B: React.FC<ContentProps>;\n C: React.FC<ContentProps>;\n ExpandedContent: React.FC<ContentProps>;\n} = ({\n layout = PanelLayout.vertical,\n variant = PanelVariant.fill,\n color = 'neutral',\n stacking = PanelStacking.default,\n testId,\n children,\n status = PanelStatus.none,\n buttonBottomOnClick,\n buttonBottomText,\n className,\n resources,\n}: PanelProps) => {\n const [preContainer, setPreContainer] = React.useState<React.ReactNode[]>([]);\n const [title, setTitle] = React.useState<React.ReactNode[]>([]);\n const [content, setContent] = React.useState<React.ReactNode[]>([]);\n const [expandableContent, setExpandableContent] = React.useState<React.ReactNode[]>([]);\n const [hasIcon, setHasIcon] = React.useState(false);\n const [isExpanded, setIsExpanded] = React.useState(false);\n const panelRef = React.useRef<HTMLDivElement>(null);\n const expandedContentRef = React.useRef<HTMLDivElement>(null);\n const defaultScroll = 100;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemPanel = {\n ...defaultResources,\n ...resources,\n };\n\n React.useEffect(() => {\n let localHasIcon = false;\n const newPreContainer: React.ReactNode[] = [];\n const newTitle: React.ReactNode[] = [];\n const newContent: React.ReactNode[] = [];\n const newExpandableContent: React.ReactNode[] = [];\n\n React.Children.forEach(children, child => {\n if (React.isValidElement(child)) {\n if (child.type === PreContainer) {\n newPreContainer.push(child);\n } else if (child.type === PanelTitle) {\n newTitle.push(child);\n if (child.props.icon) {\n localHasIcon = true;\n }\n } else if (child.type === A || child.type === B || child.type === C) {\n newContent.push(child);\n } else if (child.type === ExpandedContent) {\n newExpandableContent.push(child);\n }\n }\n });\n\n setPreContainer(newPreContainer);\n setTitle(newTitle);\n setContent(newContent);\n setExpandableContent(newExpandableContent);\n setHasIcon(localHasIcon);\n }, [children]);\n\n React.useEffect(() => {\n // Scroller oppover når expanded content åpnes\n if (isExpanded) {\n if (panelRef.current && expandedContentRef.current) {\n const panelRect = panelRef.current.getBoundingClientRect();\n const expandedContentRect = expandedContentRef.current.getBoundingClientRect();\n\n const scrollAmount = Math.min(defaultScroll, panelRect.top - 20);\n\n // Scroller kun oppover, og kun dersom expandedContent havner utenfor skjermen når åpnet\n if (scrollAmount > 0 && expandedContentRect.bottom > window.innerHeight) {\n const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n if (prefersReducedMotion) {\n return;\n }\n window.scrollBy({\n top: scrollAmount,\n behavior: 'smooth',\n });\n }\n }\n }\n }, [isExpanded]);\n\n const colorScheme = variant === PanelVariant.fill ? color : 'white';\n\n const outerClassnames = classNames(className, {\n [styles['panel__border--outline--outer']]: variant === PanelVariant.outline,\n [styles['panel__border--line']]: variant === PanelVariant.line,\n [styles['panel__border--fill--neutral']]: variant === PanelVariant.fill && colorScheme === 'neutral',\n });\n const panelClassnames = classNames(styles['panel'], styles[`panel--${colorScheme}`], styles['panel--status'], {\n [styles['panel--line']]: variant === PanelVariant.line,\n [styles['panel--new']]: status === PanelStatus.new,\n [styles['panel--draft']]: status === PanelStatus.draft,\n [styles['panel--error']]: status === PanelStatus.error,\n [styles['panel--icon']]: hasIcon,\n });\n const contentContainerLayout = classNames(styles['panel__content'], styles[`panel__content--${layout}`], {\n [styles[`panel__content--b-first`]]: stacking === PanelStacking.bFirst,\n });\n const expanderBorderLayout = classNames({\n [styles['panel__expander__border--expanded']]: isExpanded && status === PanelStatus.none,\n [styles[`panel__expander__border--not-expanded--${colorScheme}`]]: !isExpanded && status === PanelStatus.none,\n [styles[`panel__expander__border--not-expanded--line`]]: !isExpanded && status === PanelStatus.none && variant === PanelVariant.line,\n });\n\n return expandableContent.length > 0 ? (\n <div className={outerClassnames}>\n <div className={classNames({ [styles['panel__border--outline--inner']]: variant === PanelVariant.outline })}>\n <div className={expanderBorderLayout}>\n <div className={panelClassnames} data-testid={testId} ref={panelRef}>\n {preContainer}\n {title}\n <div className={contentContainerLayout}>{content}</div>\n <ExpandButton onClick={() => setIsExpanded(!isExpanded)} isExpanded={isExpanded} resources={mergedResources} />\n {isExpanded && (\n <div ref={expandedContentRef}>\n <div className={styles['panel__expander__separator']} />\n {expandableContent}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className={outerClassnames}>\n <div className={classNames({ [styles['panel__border--outline--inner']]: variant === PanelVariant.outline })}>\n <div className={panelClassnames} data-testid={testId} ref={panelRef}>\n {preContainer}\n {title}\n <div className={contentContainerLayout}>{content}</div>\n {buttonBottomText && buttonBottomOnClick && (\n <div className={styles['panel__button-bottom']}>\n <Button variant=\"borderless\" type=\"button\" size=\"medium\" onClick={buttonBottomOnClick}>\n {buttonBottomText}\n <Icon svgIcon={ChevronRight} size={IconSize.XSmall} />\n </Button>\n </div>\n )}\n </div>\n </div>\n </div>\n );\n};\n\nexport interface ContentProps {\n /** Children elements to be rendered inside the content box */\n children?: React.ReactNode;\n}\n\nexport const PreContainer: React.FC<ContentProps> = ({ children }) => {\n return <div className={styles['panel__pre-container']}>{children}</div>;\n};\n\nexport const A: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__content__item'], styles['panel__content__item--a']);\n return <div className={styling}>{children}</div>;\n};\n\nexport const B: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__content__item'], styles['panel__content__item--b']);\n return <div className={styling}>{children}</div>;\n};\n\nexport const C: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__content__item'], styles['panel__content__item--c']);\n return <div className={styling}>{children}</div>;\n};\n\nexport const ExpandedContent: React.FC<ContentProps> = ({ children }) => {\n const styling = classNames(styles['panel__expander__content']);\n return <div className={styling}>{children}</div>;\n};\n\nPanel.PreContainer = PreContainer;\nPanel.Title = PanelTitle;\nPanel.A = A;\nPanel.B = B;\nPanel.C = C;\nPanel.ExpandedContent = ExpandedContent;\n\nexport default Panel;\n"],"names":["PanelLayout","PanelVariant","PanelStacking","PanelStatus","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAKa,MAAA,eAAe,CAAC,aAAmD;AAC9E,UAAQ,UAAU;AAAA,IAChB,KAAK,gBAAgB;AACZ,aAAA;AAAA,IACT,KAAK,gBAAgB;AAAA,IACrB;AACS,aAAA;AAAA,EAAA;AAEb;ACKY,IAAA,gCAAAA,iBAAL;AACLA,eAAA,UAAW,IAAA;AACXA,eAAA,YAAa,IAAA;AACbA,eAAA,UAAW,IAAA;AACXA,eAAA,aAAc,IAAA;AAJJA,SAAAA;AAAA,GAAA,eAAA,CAAA,CAAA;AASA,IAAA,iCAAAC,kBAAL;AACLA,gBAAA,MAAO,IAAA;AACPA,gBAAA,MAAO,IAAA;AACPA,gBAAA,SAAU,IAAA;AAHAA,SAAAA;AAAA,GAAA,gBAAA,CAAA,CAAA;AAMA,IAAA,kCAAAC,mBAAL;AACLA,iBAAA,SAAU,IAAA;AACVA,iBAAA,QAAS,IAAA;AAFCA,SAAAA;AAAA,GAAA,iBAAA,CAAA,CAAA;AAKA,IAAA,gCAAAC,iBAAL;AACLA,eAAA,MAAO,IAAA;AACPA,eAAA,KAAM,IAAA;AACNA,eAAA,OAAQ,IAAA;AACRA,eAAA,OAAQ,IAAA;AAJEA,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Q,OAAI,EAAA,WAAW,OAAO,sBAAsB,GAAI,UAAS;AACnE;AAEO,MAAM,IAA4B,CAAC,EAAE,eAAe;AACzD,QAAM,UAAU,WAAW,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAC5F,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEO,MAAM,IAA4B,CAAC,EAAE,eAAe;AACzD,QAAM,UAAU,WAAW,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAC5F,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEO,MAAM,IAA4B,CAAC,EAAE,eAAe;AACzD,QAAM,UAAU,WAAW,OAAO,sBAAsB,GAAG,OAAO,yBAAyB,CAAC;AAC5F,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEO,MAAM,kBAA0C,CAAC,EAAE,eAAe;AACvE,QAAM,UAAU,WAAW,OAAO,0BAA0B,CAAC;AAC7D,SAAQ,oBAAA,OAAA,EAAI,WAAW,SAAU,SAAS,CAAA;AAC5C;AAEA,MAAM,eAAe;AACrB,MAAM,QAAQ;AACd,MAAM,IAAI;AACV,MAAM,IAAI;AACV,MAAM,IAAI;AACV,MAAM,kBAAkB;"}
@@ -0,0 +1,23 @@
1
+ import { default as React } from 'react';
2
+ import { HNDesignsystemArticleTeaser } from '../../resources/Resources';
3
+ export type ArticleTeaserTags = 'div' | 'section' | 'aside' | 'article';
4
+ export interface ArticleTeaserProps {
5
+ /** Callback for the button. Should be used for setting the expanded boolean */
6
+ onExpand: () => void;
7
+ /** What's in the box? */
8
+ children: React.ReactNode;
9
+ /** Id of the content, used to set aria-controls */
10
+ contentId: string;
11
+ /** If the component is expanded or not */
12
+ expanded: boolean;
13
+ /** For overriding the height of the collapsed teaser */
14
+ heightCollapsed?: string;
15
+ /** Changes the underlying element of the wrapper */
16
+ htmlMarkup?: ArticleTeaserTags;
17
+ /** Resources for component */
18
+ resources?: Partial<HNDesignsystemArticleTeaser>;
19
+ /** Sets the data-testid attribute */
20
+ testId?: string;
21
+ }
22
+ declare const ArticleTeaser: React.FC<ArticleTeaserProps>;
23
+ export default ArticleTeaser;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { default as ArticleTeaser } from './ArticleTeaser';
2
+ export * from './ArticleTeaser';
3
+ export default ArticleTeaser;
@@ -0,0 +1,67 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import classNames from "classnames";
3
+ import { LanguageLocales, AnalyticsId } from "../../constants.js";
4
+ import { useLanguage } from "../../utils/language.js";
5
+ import styles from "./styles.module.scss";
6
+ const expandButtonClose$1 = "Show more";
7
+ const expandButtonOpen$1 = "Show less";
8
+ const enGB = {
9
+ expandButtonClose: expandButtonClose$1,
10
+ expandButtonOpen: expandButtonOpen$1
11
+ };
12
+ const expandButtonClose = "Vis mer";
13
+ const expandButtonOpen = "Vis mindre";
14
+ const nbNO = {
15
+ expandButtonClose,
16
+ expandButtonOpen
17
+ };
18
+ const getResources = (language) => {
19
+ switch (language) {
20
+ case LanguageLocales.ENGLISH:
21
+ return enGB;
22
+ case LanguageLocales.NORWEGIAN:
23
+ default:
24
+ return nbNO;
25
+ }
26
+ };
27
+ const ArticleTeaser = (props) => {
28
+ const { onExpand, children, contentId, expanded, htmlMarkup = "div", resources, testId } = props;
29
+ const WrapperTag = htmlMarkup;
30
+ const { language } = useLanguage(LanguageLocales.NORWEGIAN);
31
+ const defaultResources = getResources(language);
32
+ const mergedResources = {
33
+ ...defaultResources,
34
+ ...resources
35
+ };
36
+ return /* @__PURE__ */ jsxs(WrapperTag, { className: classNames(styles.articleteaser), "data-testid": testId, "data-analyticsid": AnalyticsId.ArticleTeaser, children: [
37
+ /* @__PURE__ */ jsx(
38
+ "div",
39
+ {
40
+ className: classNames(styles["articleteaser__content"], {
41
+ [styles["articleteaser__content--collapsed"]]: !expanded
42
+ }),
43
+ style: {
44
+ maxHeight: expanded ? "none" : props.heightCollapsed
45
+ },
46
+ children
47
+ }
48
+ ),
49
+ /* @__PURE__ */ jsx(
50
+ "button",
51
+ {
52
+ type: "button",
53
+ className: classNames(styles["articleteaser__button"], {
54
+ [styles["articleteaser__button--expanded"]]: expanded
55
+ }),
56
+ onClick: onExpand,
57
+ "aria-expanded": expanded,
58
+ "aria-controls": contentId,
59
+ children: expanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose
60
+ }
61
+ )
62
+ ] });
63
+ };
64
+ export {
65
+ ArticleTeaser as default
66
+ };
67
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/ArticleTeaser/resourceHelper.ts","../../../src/components/ArticleTeaser/ArticleTeaser.tsx"],"sourcesContent":["import { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.ArticleTeaser.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.ArticleTeaser.nb-NO.json';\nimport { HNDesignsystemArticleTeaser } from '../../resources/Resources';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemArticleTeaser => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { HNDesignsystemArticleTeaser } from '../../resources/Resources';\nimport { useLanguage } from '../../utils/language';\n\nimport styles from './styles.module.scss';\n\nexport type ArticleTeaserTags = 'div' | 'section' | 'aside' | 'article';\n\nexport interface ArticleTeaserProps {\n /** Callback for the button. Should be used for setting the expanded boolean */\n onExpand: () => void;\n /** What's in the box? */\n children: React.ReactNode;\n /** Id of the content, used to set aria-controls */\n contentId: string;\n /** If the component is expanded or not */\n expanded: boolean;\n /** For overriding the height of the collapsed teaser */\n heightCollapsed?: string;\n /** Changes the underlying element of the wrapper */\n htmlMarkup?: ArticleTeaserTags;\n /** Resources for component */\n resources?: Partial<HNDesignsystemArticleTeaser>;\n /** Sets the data-testid attribute */\n testId?: string;\n}\n\nconst ArticleTeaser: React.FC<ArticleTeaserProps> = props => {\n const { onExpand, children, contentId, expanded, htmlMarkup = 'div', resources, testId } = props;\n const WrapperTag = htmlMarkup;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemArticleTeaser = {\n ...defaultResources,\n ...resources,\n };\n\n return (\n <WrapperTag className={classNames(styles.articleteaser)} data-testid={testId} data-analyticsid={AnalyticsId.ArticleTeaser}>\n <div\n className={classNames(styles['articleteaser__content'], {\n [styles['articleteaser__content--collapsed']]: !expanded,\n })}\n style={{\n maxHeight: expanded ? 'none' : props.heightCollapsed,\n }}\n >\n {children}\n </div>\n <button\n type=\"button\"\n className={classNames(styles['articleteaser__button'], {\n [styles['articleteaser__button--expanded']]: expanded,\n })}\n onClick={onExpand}\n aria-expanded={expanded}\n aria-controls={contentId}\n >\n {expanded ? mergedResources.expandButtonOpen : mergedResources.expandButtonClose}\n </button>\n </WrapperTag>\n );\n};\n\nexport default ArticleTeaser;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAKa,MAAA,eAAe,CAAC,aAA2D;AACtF,UAAQ,UAAU;AAAA,IAChB,KAAK,gBAAgB;AACZ,aAAA;AAAA,IACT,KAAK,gBAAgB;AAAA,IACrB;AACS,aAAA;AAAA,EAAA;AAEb;ACmBA,MAAM,gBAA8C,CAAS,UAAA;AACrD,QAAA,EAAE,UAAU,UAAU,WAAW,UAAU,aAAa,OAAO,WAAW,OAAA,IAAW;AAC3F,QAAM,aAAa;AAEnB,QAAM,EAAE,SAAa,IAAA,YAA6B,gBAAgB,SAAS;AACrE,QAAA,mBAAmB,aAAa,QAAQ;AAE9C,QAAM,kBAA+C;AAAA,IACnD,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAGE,SAAA,qBAAC,YAAW,EAAA,WAAW,WAAW,OAAO,aAAa,GAAG,eAAa,QAAQ,oBAAkB,YAAY,eAC1G,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,WAAW,OAAO,wBAAwB,GAAG;AAAA,UACtD,CAAC,OAAO,mCAAmC,CAAC,GAAG,CAAC;AAAA,QAAA,CACjD;AAAA,QACD,OAAO;AAAA,UACL,WAAW,WAAW,SAAS,MAAM;AAAA,QACvC;AAAA,QAEC;AAAA,MAAA;AAAA,IACH;AAAA,IACA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAW,WAAW,OAAO,uBAAuB,GAAG;AAAA,UACrD,CAAC,OAAO,iCAAiC,CAAC,GAAG;AAAA,QAAA,CAC9C;AAAA,QACD,SAAS;AAAA,QACT,iBAAe;AAAA,QACf,iBAAe;AAAA,QAEd,UAAA,WAAW,gBAAgB,mBAAmB,gBAAgB;AAAA,MAAA;AAAA,IAAA;AAAA,EACjE,GACF;AAEJ;"}
@@ -0,0 +1,3 @@
1
+ import { LanguageLocales } from '../../constants';
2
+ import { HNDesignsystemArticleTeaser } from '../../resources/Resources';
3
+ export declare const getResources: (language: LanguageLocales) => HNDesignsystemArticleTeaser;