@helsenorge/designsystem-react 8.5.0 → 8.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AnchorLink.js +60 -0
- package/AnchorLink.js.map +1 -0
- package/Avatar.js +34 -0
- package/Avatar.js.map +1 -0
- package/Badge.js +31 -0
- package/Badge.js.map +1 -0
- package/Button.js +130 -0
- package/Button.js.map +1 -0
- package/CHANGELOG.md +28 -3
- package/Checkbox.js +113 -0
- package/Checkbox.js.map +1 -0
- package/Close.js +31 -0
- package/Close.js.map +1 -0
- package/ErrorBoundary.js +35 -0
- package/ErrorBoundary.js.map +1 -0
- package/ErrorWrapper.js +14 -0
- package/ErrorWrapper.js.map +1 -0
- package/Expander.js +108 -0
- package/Expander.js.map +1 -0
- package/FormGroup.js +113 -0
- package/FormGroup.js.map +1 -0
- package/FormLayout.js +38 -0
- package/FormLayout.js.map +1 -0
- package/HelpBubble.js +68 -0
- package/HelpBubble.js.map +1 -0
- package/HighlightPanel.js +71 -0
- package/HighlightPanel.js.map +1 -0
- package/HorizontalScroll.js +49 -0
- package/HorizontalScroll.js.map +1 -0
- package/Icon.js +62 -0
- package/Icon.js.map +1 -0
- package/Illustration.js +41 -0
- package/Illustration.js.map +1 -0
- package/Input.js +140 -0
- package/Input.js.map +1 -0
- package/Label.js +108 -0
- package/Label.js.map +1 -0
- package/LazyIcon.js +30 -0
- package/LazyIcon.js.map +1 -0
- package/LazyIllustration.js +34 -0
- package/LazyIllustration.js.map +1 -0
- package/LinkList.js +63 -0
- package/LinkList.js.map +1 -0
- package/List.js +13 -0
- package/List.js.map +1 -0
- package/ListHeader.js +94 -0
- package/ListHeader.js.map +1 -0
- package/ListHeaderText.js +35 -0
- package/ListHeaderText.js.map +1 -0
- package/MaxCharacters.js +15 -0
- package/MaxCharacters.js.map +1 -0
- package/NotificationBadge.js +68 -0
- package/NotificationBadge.js.map +1 -0
- package/Panel.js +255 -0
- package/Panel.js.map +1 -0
- package/PopOver.js +85 -0
- package/PopOver.js.map +1 -0
- package/RadioButton.js +104 -0
- package/RadioButton.js.map +1 -0
- package/Select.js +76 -0
- package/Select.js.map +1 -0
- package/{components/Spacer/Spacer.js → Spacer.js} +10 -9
- package/Spacer.js.map +1 -0
- package/StatusDot.js +33 -0
- package/StatusDot.js.map +1 -0
- package/StepButtons.js +28 -0
- package/StepButtons.js.map +1 -0
- package/TabList.js +68 -0
- package/TabList.js.map +1 -0
- package/TabPanel.js +18 -0
- package/TabPanel.js.map +1 -0
- package/Table.js +98 -0
- package/Table.js.map +1 -0
- package/TableBody.js +13 -0
- package/TableBody.js.map +1 -0
- package/{components/Table/TableCell/TableCell.js → TableCell.js} +12 -13
- package/TableCell.js.map +1 -0
- package/TableExpandedRow.js +37 -0
- package/TableExpandedRow.js.map +1 -0
- package/TableExpanderCell.js +34 -0
- package/TableExpanderCell.js.map +1 -0
- package/TableHead.js +24 -0
- package/TableHead.js.map +1 -0
- package/TableHeadCell.js +44 -0
- package/TableHeadCell.js.map +1 -0
- package/TableRow.js +62 -0
- package/TableRow.js.map +1 -0
- package/Textarea.js +110 -0
- package/Textarea.js.map +1 -0
- package/Title.js +25 -0
- package/Title.js.map +1 -0
- package/TooltipWord.js +28 -0
- package/TooltipWord.js.map +1 -0
- package/Trigger.js +73 -0
- package/Trigger.js.map +1 -0
- package/__mocks__/uuid.js +1 -1
- package/components/AnchorLink/index.js +1 -1
- package/components/Avatar/index.js +3 -3
- package/components/Badge/index.js +1 -1
- package/components/Button/index.js +1 -1
- package/components/Checkbox/index.js +3 -3
- package/components/Chip/index.js +30 -6
- package/components/Chip/index.js.map +1 -1
- package/components/Close/index.js +2 -2
- package/components/DictionaryTrigger/index.js +25 -2
- package/components/DictionaryTrigger/index.js.map +1 -1
- package/components/Dropdown/index.js +124 -4
- package/components/Dropdown/index.js.map +1 -1
- package/components/Duolist/index.js +70 -5
- package/components/Duolist/index.js.map +1 -1
- package/components/EmptyState/index.js +159 -2
- package/components/EmptyState/index.js.map +1 -1
- package/components/ErrorWrapper/index.js +3 -3
- package/components/Expander/index.js +4 -4
- package/components/ExpanderHierarchy/index.js +102 -2
- package/components/ExpanderHierarchy/index.js.map +1 -1
- package/components/ExpanderList/index.js +139 -3
- package/components/ExpanderList/index.js.map +1 -1
- package/components/EyebrowHeader/index.js +9 -2
- package/components/EyebrowHeader/index.js.map +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/FormLayout/index.js +5 -5
- package/components/HelpBubble/index.js +4 -4
- package/components/HelpPanel/index.js +21 -2
- package/components/HelpPanel/index.js.map +1 -1
- package/components/HelpQuestion/index.js +31 -2
- package/components/HelpQuestion/index.js.map +1 -1
- package/components/HighlightPanel/index.js +4 -4
- package/components/HorizontalScroll/index.js +1 -1
- package/components/Icon/index.js +5 -5
- package/components/Icons/ActiveMonitoring.js +4 -4
- package/components/Icons/ActiveMonitoring.js.map +1 -1
- package/components/Icons/AcupunctureBack.js +6 -6
- package/components/Icons/AcupunctureBack.js.map +1 -1
- package/components/Icons/AlarmClock.js +15 -5
- package/components/Icons/AlarmClock.js.map +1 -1
- package/components/Icons/AlertSignFill.js +4 -4
- package/components/Icons/AlertSignFill.js.map +1 -1
- package/components/Icons/AlertSignStroke.js +4 -4
- package/components/Icons/AlertSignStroke.js.map +1 -1
- package/components/Icons/Amputation.js +3 -3
- package/components/Icons/Amputation.js.map +1 -1
- package/components/Icons/Anxiety.js +3 -3
- package/components/Icons/Anxiety.js.map +1 -1
- package/components/Icons/Apple.js +3 -3
- package/components/Icons/Apple.js.map +1 -1
- package/components/Icons/Archive.js +7 -7
- package/components/Icons/Archive.js.map +1 -1
- package/components/Icons/ArmFlexing.js +3 -3
- package/components/Icons/ArmFlexing.js.map +1 -1
- package/components/Icons/ArrowDown.js +7 -7
- package/components/Icons/ArrowDown.js.map +1 -1
- package/components/Icons/ArrowLeft.js +3 -3
- package/components/Icons/ArrowLeft.js.map +1 -1
- package/components/Icons/ArrowRight.js +3 -3
- package/components/Icons/ArrowRight.js.map +1 -1
- package/components/Icons/ArrowUp.js +7 -7
- package/components/Icons/ArrowUp.js.map +1 -1
- package/components/Icons/ArrowUpRight.js +4 -4
- package/components/Icons/ArrowUpRight.js.map +1 -1
- package/components/Icons/Attachment.js +4 -4
- package/components/Icons/Attachment.js.map +1 -1
- package/components/Icons/Atv.js +3 -3
- package/components/Icons/Atv.js.map +1 -1
- package/components/Icons/Avatar.js +4 -4
- package/components/Icons/Avatar.js.map +1 -1
- package/components/Icons/AwakePersonOnPillow.js +2 -2
- package/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/components/Icons/Baby.js +3 -3
- package/components/Icons/Baby.js.map +1 -1
- package/components/Icons/BandAid.js +3 -3
- package/components/Icons/BandAid.js.map +1 -1
- package/components/Icons/BeerAndPills.js +3 -3
- package/components/Icons/BeerAndPills.js.map +1 -1
- package/components/Icons/Bell.js +3 -3
- package/components/Icons/Bell.js.map +1 -1
- package/components/Icons/Bike.js +3 -3
- package/components/Icons/Bike.js.map +1 -1
- package/components/Icons/BirthControl.js +4 -4
- package/components/Icons/BirthControl.js.map +1 -1
- package/components/Icons/BirthdayCake.js +2 -2
- package/components/Icons/BirthdayCake.js.map +1 -1
- package/components/Icons/Boat.js +3 -3
- package/components/Icons/Boat.js.map +1 -1
- package/components/Icons/Body.js +4 -4
- package/components/Icons/Body.js.map +1 -1
- package/components/Icons/Braille.js +4 -4
- package/components/Icons/Braille.js.map +1 -1
- package/components/Icons/Brain.js +3 -3
- package/components/Icons/Brain.js.map +1 -1
- package/components/Icons/BreastReconstruction.js +4 -4
- package/components/Icons/BreastReconstruction.js.map +1 -1
- package/components/Icons/BreastRemoval.js +4 -4
- package/components/Icons/BreastRemoval.js.map +1 -1
- package/components/Icons/Breasts.js +2 -2
- package/components/Icons/Breasts.js.map +1 -1
- package/components/Icons/BrokenHeart.js +3 -3
- package/components/Icons/BrokenHeart.js.map +1 -1
- package/components/Icons/BrokenPuzzle.js +3 -3
- package/components/Icons/BrokenPuzzle.js.map +1 -1
- package/components/Icons/Bus.js +13 -6
- package/components/Icons/Bus.js.map +1 -1
- package/components/Icons/Calendar.js +6 -6
- package/components/Icons/Calendar.js.map +1 -1
- package/components/Icons/CalendarChange.js +7 -7
- package/components/Icons/CalendarChange.js.map +1 -1
- package/components/Icons/CalendarCheck.js +7 -7
- package/components/Icons/CalendarCheck.js.map +1 -1
- package/components/Icons/CalendarEvent.js +3 -3
- package/components/Icons/CalendarEvent.js.map +1 -1
- package/components/Icons/CalendarSave.js +4 -4
- package/components/Icons/CalendarSave.js.map +1 -1
- package/components/Icons/Cancer.js +17 -3
- package/components/Icons/Cancer.js.map +1 -1
- package/components/Icons/Candle.js +5 -5
- package/components/Icons/Candle.js.map +1 -1
- package/components/Icons/Car.js +2 -2
- package/components/Icons/Car.js.map +1 -1
- package/components/Icons/Carton.js +19 -14
- package/components/Icons/Carton.js.map +1 -1
- package/components/Icons/Change.js +14 -8
- package/components/Icons/Change.js.map +1 -1
- package/components/Icons/Check.js +4 -4
- package/components/Icons/Check.js.map +1 -1
- package/components/Icons/CheckFill.js +7 -7
- package/components/Icons/CheckFill.js.map +1 -1
- package/components/Icons/CheckOutline.js +4 -4
- package/components/Icons/CheckOutline.js.map +1 -1
- package/components/Icons/Chest.js +2 -2
- package/components/Icons/Chest.js.map +1 -1
- package/components/Icons/ChevronDown.js +3 -3
- package/components/Icons/ChevronDown.js.map +1 -1
- package/components/Icons/ChevronLeft.js +3 -3
- package/components/Icons/ChevronLeft.js.map +1 -1
- package/components/Icons/ChevronRight.js +3 -3
- package/components/Icons/ChevronRight.js.map +1 -1
- package/components/Icons/ChevronUp.js +3 -3
- package/components/Icons/ChevronUp.js.map +1 -1
- package/components/Icons/ChevronsDown.js +6 -6
- package/components/Icons/ChevronsDown.js.map +1 -1
- package/components/Icons/ChevronsUp.js +7 -7
- package/components/Icons/ChevronsUp.js.map +1 -1
- package/components/Icons/ChildPlaying.js +9 -3
- package/components/Icons/ChildPlaying.js.map +1 -1
- package/components/Icons/Cigarette.js +3 -3
- package/components/Icons/Cigarette.js.map +1 -1
- package/components/Icons/Coins.js +4 -4
- package/components/Icons/Coins.js.map +1 -1
- package/components/Icons/Contacts.js +4 -4
- package/components/Icons/Contacts.js.map +1 -1
- package/components/Icons/Copy.js +15 -4
- package/components/Icons/Copy.js.map +1 -1
- package/components/Icons/CoronaCertificate.js +3 -3
- package/components/Icons/CoronaCertificate.js.map +1 -1
- package/components/Icons/Coronavirus.js +3 -3
- package/components/Icons/Coronavirus.js.map +1 -1
- package/components/Icons/Cough.js +3 -3
- package/components/Icons/Cough.js.map +1 -1
- package/components/Icons/CreditCard.js +33 -10
- package/components/Icons/CreditCard.js.map +1 -1
- package/components/Icons/CriticalHealthInfo.js +3 -3
- package/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/components/Icons/Cross.js +3 -3
- package/components/Icons/Cross.js.map +1 -1
- package/components/Icons/DataExchange.js +4 -4
- package/components/Icons/DataExchange.js.map +1 -1
- package/components/Icons/DataReceived.js +4 -4
- package/components/Icons/DataReceived.js.map +1 -1
- package/components/Icons/DataSent.js +4 -4
- package/components/Icons/DataSent.js.map +1 -1
- package/components/Icons/Depression.js +3 -3
- package/components/Icons/Depression.js.map +1 -1
- package/components/Icons/DigestiveSystem.js +9 -3
- package/components/Icons/DigestiveSystem.js.map +1 -1
- package/components/Icons/Dizzy.js +3 -3
- package/components/Icons/Dizzy.js.map +1 -1
- package/components/Icons/Documents.js +3 -3
- package/components/Icons/Documents.js.map +1 -1
- package/components/Icons/Dog.js +3 -3
- package/components/Icons/Dog.js.map +1 -1
- package/components/Icons/DonorCard.js +3 -3
- package/components/Icons/DonorCard.js.map +1 -1
- package/components/Icons/Download.js +7 -7
- package/components/Icons/Download.js.map +1 -1
- package/components/Icons/Draft.js +3 -3
- package/components/Icons/Draft.js.map +1 -1
- package/components/Icons/EChat.js +4 -4
- package/components/Icons/EChat.js.map +1 -1
- package/components/Icons/Ear.js +10 -7
- package/components/Icons/Ear.js.map +1 -1
- package/components/Icons/EarDeaf.js +4 -4
- package/components/Icons/EarDeaf.js.map +1 -1
- package/components/Icons/EarHearingAid.js +7 -7
- package/components/Icons/EarHearingAid.js.map +1 -1
- package/components/Icons/EarNoseThroat.js +11 -3
- package/components/Icons/EarNoseThroat.js.map +1 -1
- package/components/Icons/EarVolume.js +13 -8
- package/components/Icons/EarVolume.js.map +1 -1
- package/components/Icons/ElderlyPerson.js +2 -2
- package/components/Icons/ElderlyPerson.js.map +1 -1
- package/components/Icons/Embolization.js +4 -4
- package/components/Icons/Embolization.js.map +1 -1
- package/components/Icons/EmergencyCall.js +5 -5
- package/components/Icons/EmergencyCall.js.map +1 -1
- package/components/Icons/EmoticonAnnoyed.js +12 -8
- package/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/components/Icons/EmoticonDelighted.js +10 -7
- package/components/Icons/EmoticonDelighted.js.map +1 -1
- package/components/Icons/EmoticonDisappointed.js +10 -7
- package/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/components/Icons/EmoticonHappy.js +10 -7
- package/components/Icons/EmoticonHappy.js.map +1 -1
- package/components/Icons/EmoticonMeh.js +10 -7
- package/components/Icons/EmoticonMeh.js.map +1 -1
- package/components/Icons/EnterFullScreen.js +13 -4
- package/components/Icons/EnterFullScreen.js.map +1 -1
- package/components/Icons/Envelope.js +4 -4
- package/components/Icons/Envelope.js.map +1 -1
- package/components/Icons/Epilepsy.js +3 -3
- package/components/Icons/Epilepsy.js.map +1 -1
- package/components/Icons/Eraser.js +10 -4
- package/components/Icons/Eraser.js.map +1 -1
- package/components/Icons/ErrorSignFill.js +4 -4
- package/components/Icons/ErrorSignFill.js.map +1 -1
- package/components/Icons/ErrorSignStroke.js +4 -4
- package/components/Icons/ErrorSignStroke.js.map +1 -1
- package/components/Icons/EuropeanHealthCard.js +6 -3
- package/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/components/Icons/ExitFullScreen.js +13 -4
- package/components/Icons/ExitFullScreen.js.map +1 -1
- package/components/Icons/Eye.js +12 -4
- package/components/Icons/Eye.js.map +1 -1
- package/components/Icons/Facebook.js +3 -3
- package/components/Icons/Facebook.js.map +1 -1
- package/components/Icons/FallingLeaf.js +14 -9
- package/components/Icons/FallingLeaf.js.map +1 -1
- package/components/Icons/Female.js +3 -3
- package/components/Icons/Female.js.map +1 -1
- package/components/Icons/FemaleDoctor.js +2 -2
- package/components/Icons/FemaleDoctor.js.map +1 -1
- package/components/Icons/Ferry.js +3 -3
- package/components/Icons/Ferry.js.map +1 -1
- package/components/Icons/File.js +6 -6
- package/components/Icons/File.js.map +1 -1
- package/components/Icons/Filter.js +5 -5
- package/components/Icons/Filter.js.map +1 -1
- package/components/Icons/FingerBleed.js +3 -3
- package/components/Icons/FingerBleed.js.map +1 -1
- package/components/Icons/FirstAidKit.js +3 -3
- package/components/Icons/FirstAidKit.js.map +1 -1
- package/components/Icons/Fish.js +21 -14
- package/components/Icons/Fish.js.map +1 -1
- package/components/Icons/FloppyDisk.js +4 -4
- package/components/Icons/FloppyDisk.js.map +1 -1
- package/components/Icons/Football.js +3 -3
- package/components/Icons/Football.js.map +1 -1
- package/components/Icons/Form.js +4 -4
- package/components/Icons/Form.js.map +1 -1
- package/components/Icons/Forward.js +10 -4
- package/components/Icons/Forward.js.map +1 -1
- package/components/Icons/Gallery.js +7 -7
- package/components/Icons/Gallery.js.map +1 -1
- package/components/Icons/Garden.js +3 -3
- package/components/Icons/Garden.js.map +1 -1
- package/components/Icons/GasCan.js +3 -3
- package/components/Icons/GasCan.js.map +1 -1
- package/components/Icons/GenderIdentity.js +4 -4
- package/components/Icons/GenderIdentity.js.map +1 -1
- package/components/Icons/GlassWater.js +3 -3
- package/components/Icons/GlassWater.js.map +1 -1
- package/components/Icons/Glasses.js +4 -4
- package/components/Icons/Glasses.js.map +1 -1
- package/components/Icons/Globe.js +4 -4
- package/components/Icons/Globe.js.map +1 -1
- package/components/Icons/Grain.js +3 -3
- package/components/Icons/Grain.js.map +1 -1
- package/components/Icons/Graph.js +12 -9
- package/components/Icons/Graph.js.map +1 -1
- package/components/Icons/Group.js +8 -8
- package/components/Icons/Group.js.map +1 -1
- package/components/Icons/GroupTwins.js +35 -21
- package/components/Icons/GroupTwins.js.map +1 -1
- package/components/Icons/HTMLFile.js +10 -7
- package/components/Icons/HTMLFile.js.map +1 -1
- package/components/Icons/HandWaving.js +3 -3
- package/components/Icons/HandWaving.js.map +1 -1
- package/components/Icons/HandWithDisease.js +3 -3
- package/components/Icons/HandWithDisease.js.map +1 -1
- package/components/Icons/HandsAndHeart.js +5 -5
- package/components/Icons/HandsAndHeart.js.map +1 -1
- package/components/Icons/HealthClinic.js +4 -4
- package/components/Icons/HealthClinic.js.map +1 -1
- package/components/Icons/HealthWarning.js +4 -4
- package/components/Icons/HealthWarning.js.map +1 -1
- package/components/Icons/HealthcarePerson.js +27 -14
- package/components/Icons/HealthcarePerson.js.map +1 -1
- package/components/Icons/HealthcarePersonell.js +36 -18
- package/components/Icons/HealthcarePersonell.js.map +1 -1
- package/components/Icons/HearingProtection.js +12 -9
- package/components/Icons/HearingProtection.js.map +1 -1
- package/components/Icons/Heart.js +4 -4
- package/components/Icons/Heart.js.map +1 -1
- package/components/Icons/HeartHands.js +29 -22
- package/components/Icons/HeartHands.js.map +1 -1
- package/components/Icons/HelpSign.js +4 -4
- package/components/Icons/HelpSign.js.map +1 -1
- package/components/Icons/HelpingHand.js +3 -3
- package/components/Icons/HelpingHand.js.map +1 -1
- package/components/Icons/Hemodialysis.js +3 -3
- package/components/Icons/Hemodialysis.js.map +1 -1
- package/components/Icons/Hiker.js +2 -2
- package/components/Icons/Hiker.js.map +1 -1
- package/components/Icons/Hipprosthesis.js +4 -4
- package/components/Icons/Hipprosthesis.js.map +1 -1
- package/components/Icons/History.js +4 -4
- package/components/Icons/History.js.map +1 -1
- package/components/Icons/HivAndAids.js +3 -3
- package/components/Icons/HivAndAids.js.map +1 -1
- package/components/Icons/Home.js +7 -7
- package/components/Icons/Home.js.map +1 -1
- package/components/Icons/Hormone.js +3 -3
- package/components/Icons/Hormone.js.map +1 -1
- package/components/Icons/Hospital.js +7 -7
- package/components/Icons/Hospital.js.map +1 -1
- package/components/Icons/Hourglass.js +7 -7
- package/components/Icons/Hourglass.js.map +1 -1
- package/components/Icons/ImgFile.js +4 -4
- package/components/Icons/ImgFile.js.map +1 -1
- package/components/Icons/Inbox.js +6 -3
- package/components/Icons/Inbox.js.map +1 -1
- package/components/Icons/InfoSignFill.js +4 -4
- package/components/Icons/InfoSignFill.js.map +1 -1
- package/components/Icons/InfoSignStroke.js +4 -4
- package/components/Icons/InfoSignStroke.js.map +1 -1
- package/components/Icons/Instagram.js +9 -2
- package/components/Icons/Instagram.js.map +1 -1
- package/components/Icons/Intravenous.js +4 -4
- package/components/Icons/Intravenous.js.map +1 -1
- package/components/Icons/JointPain.js +3 -3
- package/components/Icons/JointPain.js.map +1 -1
- package/components/Icons/Journal.js +4 -4
- package/components/Icons/Journal.js.map +1 -1
- package/components/Icons/JpgFile.js +4 -4
- package/components/Icons/JpgFile.js.map +1 -1
- package/components/Icons/Kidney.js +3 -3
- package/components/Icons/Kidney.js.map +1 -1
- package/components/Icons/KitchenScale.js +4 -4
- package/components/Icons/KitchenScale.js.map +1 -1
- package/components/Icons/Kjernejournal.js +3 -3
- package/components/Icons/Kjernejournal.js.map +1 -1
- package/components/Icons/Laboratory.js +4 -4
- package/components/Icons/Laboratory.js.map +1 -1
- package/components/Icons/LaptopBlog.js +3 -3
- package/components/Icons/LaptopBlog.js.map +1 -1
- package/components/Icons/LawBook.js +6 -3
- package/components/Icons/LawBook.js.map +1 -1
- package/components/Icons/LegalDocument.js +13 -10
- package/components/Icons/LegalDocument.js.map +1 -1
- package/components/Icons/LightBulb.js +2 -2
- package/components/Icons/LightBulb.js.map +1 -1
- package/components/Icons/List.js +7 -7
- package/components/Icons/List.js.map +1 -1
- package/components/Icons/Location.js +6 -3
- package/components/Icons/Location.js.map +1 -1
- package/components/Icons/Lock.js +4 -4
- package/components/Icons/Lock.js.map +1 -1
- package/components/Icons/Login.js +20 -11
- package/components/Icons/Login.js.map +1 -1
- package/components/Icons/Logout.js +20 -11
- package/components/Icons/Logout.js.map +1 -1
- package/components/Icons/Lungs.js +3 -3
- package/components/Icons/Lungs.js.map +1 -1
- package/components/Icons/Makeup.js +2 -2
- package/components/Icons/Makeup.js.map +1 -1
- package/components/Icons/MaleDoctor.js +2 -2
- package/components/Icons/MaleDoctor.js.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.js +11 -3
- package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/components/Icons/MaleGenitalia.js +2 -2
- package/components/Icons/MaleGenitalia.js.map +1 -1
- package/components/Icons/Medicine.js +6 -6
- package/components/Icons/Medicine.js.map +1 -1
- package/components/Icons/MedicineWarning.js +4 -4
- package/components/Icons/MedicineWarning.js.map +1 -1
- package/components/Icons/MentalHealthAdult.js +9 -3
- package/components/Icons/MentalHealthAdult.js.map +1 -1
- package/components/Icons/MentalHealthChild.js +9 -3
- package/components/Icons/MentalHealthChild.js.map +1 -1
- package/components/Icons/Menu.js +4 -4
- package/components/Icons/Menu.js.map +1 -1
- package/components/Icons/Microscope.js +4 -4
- package/components/Icons/Microscope.js.map +1 -1
- package/components/Icons/Minus.js +3 -3
- package/components/Icons/Minus.js.map +1 -1
- package/components/Icons/Mirror.js +3 -3
- package/components/Icons/Mirror.js.map +1 -1
- package/components/Icons/MobilePhone.js +4 -4
- package/components/Icons/MobilePhone.js.map +1 -1
- package/components/Icons/MotherHoldingBaby.js +2 -2
- package/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/components/Icons/MuscleBack.js +11 -3
- package/components/Icons/MuscleBack.js.map +1 -1
- package/components/Icons/MuscleLeg.js +9 -3
- package/components/Icons/MuscleLeg.js.map +1 -1
- package/components/Icons/Mushroom.js +3 -3
- package/components/Icons/Mushroom.js.map +1 -1
- package/components/Icons/Music.js +3 -3
- package/components/Icons/Music.js.map +1 -1
- package/components/Icons/MusselsAndSalt.js +2 -2
- package/components/Icons/MusselsAndSalt.js.map +1 -1
- package/components/Icons/NoAccess.js +20 -17
- package/components/Icons/NoAccess.js.map +1 -1
- package/components/Icons/NoEye.js +9 -9
- package/components/Icons/NoEye.js.map +1 -1
- package/components/Icons/NoFilter.js +10 -4
- package/components/Icons/NoFilter.js.map +1 -1
- package/components/Icons/Notepad.js +2 -2
- package/components/Icons/Notepad.js.map +1 -1
- package/components/Icons/Osteotomy.js +4 -4
- package/components/Icons/Osteotomy.js.map +1 -1
- package/components/Icons/PaintRoller.js +3 -3
- package/components/Icons/PaintRoller.js.map +1 -1
- package/components/Icons/PaperPlane.js +4 -4
- package/components/Icons/PaperPlane.js.map +1 -1
- package/components/Icons/PatientAndPerson.js +2 -2
- package/components/Icons/PatientAndPerson.js.map +1 -1
- package/components/Icons/Pause.js +4 -4
- package/components/Icons/Pause.js.map +1 -1
- package/components/Icons/PdfFile.js +4 -4
- package/components/Icons/PdfFile.js.map +1 -1
- package/components/Icons/Pencil.js +4 -4
- package/components/Icons/Pencil.js.map +1 -1
- package/components/Icons/PeopleTalking.js +3 -3
- package/components/Icons/PeopleTalking.js.map +1 -1
- package/components/Icons/Peritonealdialysis.js +4 -4
- package/components/Icons/Peritonealdialysis.js.map +1 -1
- package/components/Icons/Person.js +2 -2
- package/components/Icons/Person.js.map +1 -1
- package/components/Icons/PersonAndPatient.js +2 -2
- package/components/Icons/PersonAndPatient.js.map +1 -1
- package/components/Icons/PersonCancel.js +28 -19
- package/components/Icons/PersonCancel.js.map +1 -1
- package/components/Icons/PersonInXRayMachine.js +4 -4
- package/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/components/Icons/PersonOverweight.js +3 -3
- package/components/Icons/PersonOverweight.js.map +1 -1
- package/components/Icons/PersonRelaxing.js +9 -3
- package/components/Icons/PersonRelaxing.js.map +1 -1
- package/components/Icons/PersonWithBrain.js +6 -3
- package/components/Icons/PersonWithBrain.js.map +1 -1
- package/components/Icons/PersonWithBrokenArm.js +3 -3
- package/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/components/Icons/PersonWithCrutches.js +3 -3
- package/components/Icons/PersonWithCrutches.js.map +1 -1
- package/components/Icons/PersonWithJaw.js +9 -3
- package/components/Icons/PersonWithJaw.js.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.js +8 -2
- package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/components/Icons/PersonWithSenses.js +15 -3
- package/components/Icons/PersonWithSenses.js.map +1 -1
- package/components/Icons/PersonWorking.js +9 -3
- package/components/Icons/PersonWorking.js.map +1 -1
- package/components/Icons/PersonalPlan.js +14 -11
- package/components/Icons/PersonalPlan.js.map +1 -1
- package/components/Icons/PizzaSlice.js +8 -2
- package/components/Icons/PizzaSlice.js.map +1 -1
- package/components/Icons/Plane.js +3 -3
- package/components/Icons/Plane.js.map +1 -1
- package/components/Icons/Plant.js +3 -3
- package/components/Icons/Plant.js.map +1 -1
- package/components/Icons/PlateKnifeFork.js +17 -14
- package/components/Icons/PlateKnifeFork.js.map +1 -1
- package/components/Icons/Play.js +4 -4
- package/components/Icons/Play.js.map +1 -1
- package/components/Icons/PlusLarge.js +4 -4
- package/components/Icons/PlusLarge.js.map +1 -1
- package/components/Icons/PlusSmall.js +4 -4
- package/components/Icons/PlusSmall.js.map +1 -1
- package/components/Icons/PngFile.js +4 -4
- package/components/Icons/PngFile.js.map +1 -1
- package/components/Icons/Podcast.js +4 -4
- package/components/Icons/Podcast.js.map +1 -1
- package/components/Icons/PoisonInformation.js +9 -3
- package/components/Icons/PoisonInformation.js.map +1 -1
- package/components/Icons/Pregnant.js +2 -2
- package/components/Icons/Pregnant.js.map +1 -1
- package/components/Icons/Printer.js +7 -7
- package/components/Icons/Printer.js.map +1 -1
- package/components/Icons/Psychosis.js +2 -2
- package/components/Icons/Psychosis.js.map +1 -1
- package/components/Icons/Publication.js +4 -4
- package/components/Icons/Publication.js.map +1 -1
- package/components/Icons/Puzzle.js +5 -2
- package/components/Icons/Puzzle.js.map +1 -1
- package/components/Icons/QrCode.js +7 -7
- package/components/Icons/QrCode.js.map +1 -1
- package/components/Icons/Quarrel.js +4 -4
- package/components/Icons/Quarrel.js.map +1 -1
- package/components/Icons/RadioTherapy.js +4 -4
- package/components/Icons/RadioTherapy.js.map +1 -1
- package/components/Icons/RadioactiveTreatment.js +4 -4
- package/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/components/Icons/Radioiodine.js +4 -4
- package/components/Icons/Radioiodine.js.map +1 -1
- package/components/Icons/Receipt.js +2 -2
- package/components/Icons/Receipt.js.map +1 -1
- package/components/Icons/Receptionist.js +4 -4
- package/components/Icons/Receptionist.js.map +1 -1
- package/components/Icons/Recovery.js +4 -4
- package/components/Icons/Recovery.js.map +1 -1
- package/components/Icons/Referral.js +4 -4
- package/components/Icons/Referral.js.map +1 -1
- package/components/Icons/Refresh.js +4 -4
- package/components/Icons/Refresh.js.map +1 -1
- package/components/Icons/Refund.js +3 -3
- package/components/Icons/Refund.js.map +1 -1
- package/components/Icons/Reminder.js +14 -9
- package/components/Icons/Reminder.js.map +1 -1
- package/components/Icons/Reply.js +10 -4
- package/components/Icons/Reply.js.map +1 -1
- package/components/Icons/Rocket.js +3 -3
- package/components/Icons/Rocket.js.map +1 -1
- package/components/Icons/RtfFile.js +4 -4
- package/components/Icons/RtfFile.js.map +1 -1
- package/components/Icons/STDs.js +4 -4
- package/components/Icons/STDs.js.map +1 -1
- package/components/Icons/Save.js +12 -4
- package/components/Icons/Save.js.map +1 -1
- package/components/Icons/Scale.js +3 -3
- package/components/Icons/Scale.js.map +1 -1
- package/components/Icons/ScreenReader.js +18 -11
- package/components/Icons/ScreenReader.js.map +1 -1
- package/components/Icons/Search.js +4 -4
- package/components/Icons/Search.js.map +1 -1
- package/components/Icons/SectionSign.js +6 -6
- package/components/Icons/SectionSign.js.map +1 -1
- package/components/Icons/Settings.js +7 -7
- package/components/Icons/Settings.js.map +1 -1
- package/components/Icons/Sexualorientation.js +4 -4
- package/components/Icons/Sexualorientation.js.map +1 -1
- package/components/Icons/ShakingHand.js +3 -3
- package/components/Icons/ShakingHand.js.map +1 -1
- package/components/Icons/Share.js +10 -4
- package/components/Icons/Share.js.map +1 -1
- package/components/Icons/Shield.js +4 -4
- package/components/Icons/Shield.js.map +1 -1
- package/components/Icons/ShuntOperation.js +3 -3
- package/components/Icons/ShuntOperation.js.map +1 -1
- package/components/Icons/Skeleton.js +2 -2
- package/components/Icons/Skeleton.js.map +1 -1
- package/components/Icons/Skin.js +3 -3
- package/components/Icons/Skin.js.map +1 -1
- package/components/Icons/Snake.js +3 -3
- package/components/Icons/Snake.js.map +1 -1
- package/components/Icons/Snapchat.js +6 -3
- package/components/Icons/Snapchat.js.map +1 -1
- package/components/Icons/SortDown.js +19 -7
- package/components/Icons/SortDown.js.map +1 -1
- package/components/Icons/SortUp.js +19 -7
- package/components/Icons/SortUp.js.map +1 -1
- package/components/Icons/SpeechBubble.js +6 -6
- package/components/Icons/SpeechBubble.js.map +1 -1
- package/components/Icons/Spray.js +2 -2
- package/components/Icons/Spray.js.map +1 -1
- package/components/Icons/Stopwatch.js +7 -7
- package/components/Icons/Stopwatch.js.map +1 -1
- package/components/Icons/Sun.js +14 -9
- package/components/Icons/Sun.js.map +1 -1
- package/components/Icons/SupportingPerson.js +25 -22
- package/components/Icons/SupportingPerson.js.map +1 -1
- package/components/Icons/Surgery.js +3 -3
- package/components/Icons/Surgery.js.map +1 -1
- package/components/Icons/Sweets.js +19 -14
- package/components/Icons/Sweets.js.map +1 -1
- package/components/Icons/Syringe.js +6 -6
- package/components/Icons/Syringe.js.map +1 -1
- package/components/Icons/Taxi.js +2 -2
- package/components/Icons/Taxi.js.map +1 -1
- package/components/Icons/TeddyBear.js +3 -3
- package/components/Icons/TeddyBear.js.map +1 -1
- package/components/Icons/Teenagers.js +4 -4
- package/components/Icons/Teenagers.js.map +1 -1
- package/components/Icons/ThinkingAboutBaby.js +3 -3
- package/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/components/Icons/Ticket.js +3 -3
- package/components/Icons/Ticket.js.map +1 -1
- package/components/Icons/TimePassing.js +7 -7
- package/components/Icons/TimePassing.js.map +1 -1
- package/components/Icons/Tombstone.js +12 -9
- package/components/Icons/Tombstone.js.map +1 -1
- package/components/Icons/Toolbox.js +36 -30
- package/components/Icons/Toolbox.js.map +1 -1
- package/components/Icons/Tooth.js +3 -3
- package/components/Icons/Tooth.js.map +1 -1
- package/components/Icons/TotalKneeProsthesis.js +4 -4
- package/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/components/Icons/Train.js +3 -3
- package/components/Icons/Train.js.map +1 -1
- package/components/Icons/Transplantation.js +3 -3
- package/components/Icons/Transplantation.js.map +1 -1
- package/components/Icons/TrashCan.js +7 -7
- package/components/Icons/TrashCan.js.map +1 -1
- package/components/Icons/TravelRoute.js +21 -16
- package/components/Icons/TravelRoute.js.map +1 -1
- package/components/Icons/TriangleX.js +32 -35
- package/components/Icons/TriangleX.js.map +1 -1
- package/components/Icons/Twitter.js +3 -3
- package/components/Icons/Twitter.js.map +1 -1
- package/components/Icons/Undo.js +8 -8
- package/components/Icons/Undo.js.map +1 -1
- package/components/Icons/UniProsthesis.js +3 -3
- package/components/Icons/UniProsthesis.js.map +1 -1
- package/components/Icons/Upload.js +10 -4
- package/components/Icons/Upload.js.map +1 -1
- package/components/Icons/UserOrganization.js +2 -2
- package/components/Icons/UserOrganization.js.map +1 -1
- package/components/Icons/Vaccine.js +7 -7
- package/components/Icons/Vaccine.js.map +1 -1
- package/components/Icons/VerticalDots.js +4 -4
- package/components/Icons/VerticalDots.js.map +1 -1
- package/components/Icons/VideoCamera.js +7 -7
- package/components/Icons/VideoCamera.js.map +1 -1
- package/components/Icons/VideoChat.js +4 -4
- package/components/Icons/VideoChat.js.map +1 -1
- package/components/Icons/Wallet.js +4 -4
- package/components/Icons/Wallet.js.map +1 -1
- package/components/Icons/Watch.js +6 -6
- package/components/Icons/Watch.js.map +1 -1
- package/components/Icons/Website.js +4 -4
- package/components/Icons/Website.js.map +1 -1
- package/components/Icons/Wheelchair.js +4 -4
- package/components/Icons/Wheelchair.js.map +1 -1
- package/components/Icons/WheelchairActive.js +3 -3
- package/components/Icons/WheelchairActive.js.map +1 -1
- package/components/Icons/Window.js +3 -3
- package/components/Icons/Window.js.map +1 -1
- package/components/Icons/WordDocument.js +3 -3
- package/components/Icons/WordDocument.js.map +1 -1
- package/components/Icons/WorkSuitcase.js +2 -2
- package/components/Icons/WorkSuitcase.js.map +1 -1
- package/components/Icons/X.js +4 -4
- package/components/Icons/X.js.map +1 -1
- package/components/Icons/XOutline.js +3 -3
- package/components/Icons/XOutline.js.map +1 -1
- package/components/Icons/XmlFile.js +4 -4
- package/components/Icons/XmlFile.js.map +1 -1
- package/components/Icons/YouTube.js +3 -3
- package/components/Icons/YouTube.js.map +1 -1
- package/components/Icons/Zoom.js +6 -6
- package/components/Icons/Zoom.js.map +1 -1
- package/components/Illustration/index.js +3 -3
- package/components/Illustrations/Doctor.js +8 -8
- package/components/Illustrations/Doctor.js.map +1 -1
- package/components/Illustrations/DoctorMedium.js +49 -41
- package/components/Illustrations/DoctorMedium.js.map +1 -1
- package/components/Illustrations/DoctorSmall.js +48 -38
- package/components/Illustrations/DoctorSmall.js.map +1 -1
- package/components/Illustrations/FacialRecognitionFingerprint.js +6 -6
- package/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
- package/components/Illustrations/FacialRecognitionFingerprintMedium.js +297 -253
- package/components/Illustrations/FacialRecognitionFingerprintMedium.js.map +1 -1
- package/components/Illustrations/HealthcarePersonnel.js +7 -7
- package/components/Illustrations/HealthcarePersonnel.js.map +1 -1
- package/components/Illustrations/HealthcarePersonnelMedium.js +202 -171
- package/components/Illustrations/HealthcarePersonnelMedium.js.map +1 -1
- package/components/Illustrations/HealthcarePersonnelSmall.js +190 -165
- package/components/Illustrations/HealthcarePersonnelSmall.js.map +1 -1
- package/components/Input/index.js +3 -3
- package/components/Label/index.js +7 -8
- package/components/Label/index.js.map +1 -1
- package/components/LazyIcon/index.js +2 -2
- package/components/LazyIllustration/index.js +5 -5
- package/components/LinkList/index.js +3 -3
- package/components/List/index.js +2 -2
- package/components/ListHeader/ListHeaderText/index.js +1 -1
- package/components/ListHeader/index.js +5 -5
- package/components/Loader/index.js +67 -4
- package/components/Loader/index.js.map +1 -1
- package/components/Logo/index.js +41 -2
- package/components/Logo/index.js.map +1 -1
- package/components/Modal/index.js +162 -5
- package/components/Modal/index.js.map +1 -1
- package/components/NotificationPanel/index.js +98 -2
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/Panel/index.js +4 -4
- package/components/PanelList/index.js +15 -2
- package/components/PanelList/index.js.map +1 -1
- package/components/PopMenu/index.js +92 -6
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopOver/index.js +4 -4
- package/components/Portal/index.js +3 -3
- package/components/Progressbar/index.js +92 -6
- package/components/Progressbar/index.js.map +1 -1
- package/components/Progressbar/styles.module.scss +5 -0
- package/components/Progressbar/styles.module.scss.d.ts +1 -0
- package/components/PromoPanel/index.js +57 -2
- package/components/PromoPanel/index.js.map +1 -1
- package/components/RadioButton/index.js +5 -5
- package/components/Select/index.js +1 -1
- package/components/ServiceMessage/index.js +110 -2
- package/components/ServiceMessage/index.js.map +1 -1
- package/components/SharingStatus/index.js +16 -2
- package/components/SharingStatus/index.js.map +1 -1
- package/components/Slider/index.js +189 -3
- package/components/Slider/index.js.map +1 -1
- package/components/Spacer/index.js +2 -2
- package/components/StatusDot/index.js +4 -4
- package/components/Step/index.js +31 -2
- package/components/Step/index.js.map +1 -1
- package/components/StepButtons/index.js +1 -1
- package/components/Stepper/index.js +49 -2
- package/components/Stepper/index.js.map +1 -1
- package/components/Table/TableBody/index.js +3 -3
- package/components/Table/TableCell/index.js +5 -5
- package/components/Table/TableExpandedRow/index.js +1 -1
- package/components/Table/TableExpanderCell/index.js +3 -3
- package/components/Table/TableHead/index.js +4 -4
- package/components/Table/TableHeadCell/index.js +3 -3
- package/components/Table/TableRow/index.js +3 -3
- package/components/Table/index.js +22 -22
- package/components/Tabs/TabList/index.js +2 -2
- package/components/Tabs/TabPanel/index.js +1 -1
- package/components/Tabs/index.js +94 -2
- package/components/Tabs/index.js.map +1 -1
- package/components/Tag/index.js +22 -5
- package/components/Tag/index.js.map +1 -1
- package/components/TagList/index.js +6 -2
- package/components/TagList/index.js.map +1 -1
- package/components/Textarea/index.js +1 -1
- package/components/Tile/index.js +70 -3
- package/components/Tile/index.js.map +1 -1
- package/components/Title/index.js +5 -5
- package/components/Toggle/index.js +2653 -5
- package/components/Toggle/index.js.map +1 -1
- package/components/Tooltip/TooltipWord/index.js +1 -1
- package/components/Tooltip/index.js +54 -5
- package/components/Tooltip/index.js.map +1 -1
- package/components/Trigger/index.js +2 -2
- package/components/Validation/index.js +47 -3
- package/components/Validation/index.js.map +1 -1
- package/{components → docs}/ButtonWithModal/ButtonWithModal.d.ts +1 -1
- package/{components → docs}/HelpBubbleExample/HelpBubbleExample.d.ts +1 -1
- package/{components → docs}/TooltipExample/TooltipExample.d.ts +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js +9 -8
- package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/hooks/useIcons.js +9 -9
- package/hooks/useUuid.js +3 -3
- package/index.js +3 -3
- package/package.json +1 -1
- package/utils/component.js +2 -2
- package/utils/uuid.js +4 -7
- package/utils/uuid.js.map +1 -1
- package/{components/Illustration/utils.js → utils.js} +1 -1
- package/utils.js.map +1 -0
- package/uuid.js +14 -0
- package/uuid.js.map +1 -0
- package/_virtual/_cloneBuffer.js +0 -5
- package/_virtual/_cloneBuffer.js.map +0 -1
- package/_virtual/_commonjs-dynamic-modules.js +0 -7
- package/_virtual/_commonjs-dynamic-modules.js.map +0 -1
- package/_virtual/_commonjsHelpers.js +0 -9
- package/_virtual/_commonjsHelpers.js.map +0 -1
- package/_virtual/_nodeUtil.js +0 -5
- package/_virtual/_nodeUtil.js.map +0 -1
- package/_virtual/dynamic-import-helper.js +0 -17
- package/_virtual/dynamic-import-helper.js.map +0 -1
- package/_virtual/isBuffer.js +0 -5
- package/_virtual/isBuffer.js.map +0 -1
- package/_virtual/memoizerific.js +0 -5
- package/_virtual/memoizerific.js.map +0 -1
- package/components/AnchorLink/AnchorLink.js +0 -53
- package/components/AnchorLink/AnchorLink.js.map +0 -1
- package/components/Avatar/Avatar.js +0 -33
- package/components/Avatar/Avatar.js.map +0 -1
- package/components/Badge/Badge.js +0 -30
- package/components/Badge/Badge.js.map +0 -1
- package/components/Badge/NotificationBadge.js +0 -68
- package/components/Badge/NotificationBadge.js.map +0 -1
- package/components/Button/Button.js +0 -118
- package/components/Button/Button.js.map +0 -1
- package/components/ButtonWithModal/ButtonWithModal.js +0 -11
- package/components/ButtonWithModal/ButtonWithModal.js.map +0 -1
- package/components/ButtonWithModal/index.js +0 -5
- package/components/ButtonWithModal/index.js.map +0 -1
- package/components/Checkbox/Checkbox.js +0 -110
- package/components/Checkbox/Checkbox.js.map +0 -1
- package/components/Chip/Chip.js +0 -30
- package/components/Chip/Chip.js.map +0 -1
- package/components/Close/Close.js +0 -30
- package/components/Close/Close.js.map +0 -1
- package/components/DictionaryTrigger/DictionaryTrigger.js +0 -27
- package/components/DictionaryTrigger/DictionaryTrigger.js.map +0 -1
- package/components/Dropdown/Dropdown.js +0 -117
- package/components/Dropdown/Dropdown.js.map +0 -1
- package/components/Duolist/Duolist.js +0 -63
- package/components/Duolist/Duolist.js.map +0 -1
- package/components/EmptyState/EmptyState.js +0 -10
- package/components/EmptyState/EmptyState.js.map +0 -1
- package/components/EmptyState/NobodyHome.js +0 -155
- package/components/EmptyState/NobodyHome.js.map +0 -1
- package/components/ErrorWrapper/ErrorWrapper.js +0 -12
- package/components/ErrorWrapper/ErrorWrapper.js.map +0 -1
- package/components/Expander/Expander.js +0 -101
- package/components/Expander/Expander.js.map +0 -1
- package/components/ExpanderHierarchy/Expander.js +0 -31
- package/components/ExpanderHierarchy/Expander.js.map +0 -1
- package/components/ExpanderHierarchy/ExpanderButton.js +0 -46
- package/components/ExpanderHierarchy/ExpanderButton.js.map +0 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.js +0 -28
- package/components/ExpanderHierarchy/ExpanderHierarchy.js.map +0 -1
- package/components/ExpanderHierarchy/utils.js +0 -20
- package/components/ExpanderHierarchy/utils.js.map +0 -1
- package/components/ExpanderList/ExpanderList.js +0 -139
- package/components/ExpanderList/ExpanderList.js.map +0 -1
- package/components/EyebrowHeader/EyebrowHeader.js +0 -12
- package/components/EyebrowHeader/EyebrowHeader.js.map +0 -1
- package/components/FormExample/FormExample.js +0 -161
- package/components/FormExample/FormExample.js.map +0 -1
- package/components/FormExample/index.js +0 -8
- package/components/FormExample/index.js.map +0 -1
- package/components/FormExample/styles.module.scss +0 -33
- package/components/FormExample/styles.module.scss.d.ts +0 -12
- package/components/FormGroup/FormGroup.js +0 -101
- package/components/FormGroup/FormGroup.js.map +0 -1
- package/components/FormLayout/FormLayout.js +0 -38
- package/components/FormLayout/FormLayout.js.map +0 -1
- package/components/GridExample/GridExample.js +0 -8
- package/components/GridExample/GridExample.js.map +0 -1
- package/components/GridExample/index.js +0 -6
- package/components/GridExample/index.js.map +0 -1
- package/components/HelpBubble/HelpBubble.js +0 -61
- package/components/HelpBubble/HelpBubble.js.map +0 -1
- package/components/HelpBubbleExample/HelpBubbleExample.js +0 -20
- package/components/HelpBubbleExample/HelpBubbleExample.js.map +0 -1
- package/components/HelpBubbleExample/index.js +0 -5
- package/components/HelpBubbleExample/index.js.map +0 -1
- package/components/HelpPanel/HelpPanel.js +0 -24
- package/components/HelpPanel/HelpPanel.js.map +0 -1
- package/components/HelpQuestion/HelpQuestion.js +0 -31
- package/components/HelpQuestion/HelpQuestion.js.map +0 -1
- package/components/HighlightPanel/HighlightPanel.js +0 -61
- package/components/HighlightPanel/HighlightPanel.js.map +0 -1
- package/components/HorizontalScroll/HorizontalScroll.js +0 -47
- package/components/HorizontalScroll/HorizontalScroll.js.map +0 -1
- package/components/Icon/Icon.js +0 -60
- package/components/Icon/Icon.js.map +0 -1
- package/components/Illustration/Illustration.js +0 -41
- package/components/Illustration/Illustration.js.map +0 -1
- package/components/Illustration/utils.js.map +0 -1
- package/components/Input/Input.js +0 -129
- package/components/Input/Input.js.map +0 -1
- package/components/Label/Label.js +0 -79
- package/components/Label/Label.js.map +0 -1
- package/components/Label/SubLabel.js +0 -19
- package/components/Label/SubLabel.js.map +0 -1
- package/components/LazyIcon/ErrorBoundary.js +0 -21
- package/components/LazyIcon/ErrorBoundary.js.map +0 -1
- package/components/LazyIcon/LazyIcon.js +0 -31
- package/components/LazyIcon/LazyIcon.js.map +0 -1
- package/components/LazyIllustration/LazyIllustration.js +0 -35
- package/components/LazyIllustration/LazyIllustration.js.map +0 -1
- package/components/LinkList/LinkList.js +0 -60
- package/components/LinkList/LinkList.js.map +0 -1
- package/components/List/List.js +0 -13
- package/components/List/List.js.map +0 -1
- package/components/ListHeader/ListHeader.js +0 -84
- package/components/ListHeader/ListHeader.js.map +0 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.js +0 -30
- package/components/ListHeader/ListHeaderText/ListHeaderText.js.map +0 -1
- package/components/Loader/Loader.js +0 -67
- package/components/Loader/Loader.js.map +0 -1
- package/components/Logo/Logo.js +0 -40
- package/components/Logo/Logo.js.map +0 -1
- package/components/MaxCharacters/MaxCharacters.js +0 -15
- package/components/MaxCharacters/MaxCharacters.js.map +0 -1
- package/components/Modal/Modal.js +0 -145
- package/components/Modal/Modal.js.map +0 -1
- package/components/NotificationPanel/NotificationPanel.js +0 -94
- package/components/NotificationPanel/NotificationPanel.js.map +0 -1
- package/components/Panel/Panel.js +0 -191
- package/components/Panel/Panel.js.map +0 -1
- package/components/PanelList/PanelList.js +0 -17
- package/components/PanelList/PanelList.js.map +0 -1
- package/components/PopMenu/PopMenu.js +0 -89
- package/components/PopMenu/PopMenu.js.map +0 -1
- package/components/PopOver/PopOver.js +0 -56
- package/components/PopOver/PopOver.js.map +0 -1
- package/components/PopOver/utils.js +0 -33
- package/components/PopOver/utils.js.map +0 -1
- package/components/Progressbar/Progressbar.js +0 -89
- package/components/Progressbar/Progressbar.js.map +0 -1
- package/components/PromoPanel/PromoPanel.js +0 -52
- package/components/PromoPanel/PromoPanel.js.map +0 -1
- package/components/RadioButton/RadioButton.js +0 -104
- package/components/RadioButton/RadioButton.js.map +0 -1
- package/components/Select/Select.js +0 -70
- package/components/Select/Select.js.map +0 -1
- package/components/ServiceMessage/ServiceMessage.js +0 -92
- package/components/ServiceMessage/ServiceMessage.js.map +0 -1
- package/components/SharingStatus/SharingStatus.js +0 -16
- package/components/SharingStatus/SharingStatus.js.map +0 -1
- package/components/Slider/Slider.js +0 -178
- package/components/Slider/Slider.js.map +0 -1
- package/components/Spacer/Spacer.js.map +0 -1
- package/components/StatusDot/StatusDot.js +0 -29
- package/components/StatusDot/StatusDot.js.map +0 -1
- package/components/Step/Step.js +0 -30
- package/components/Step/Step.js.map +0 -1
- package/components/StepButtons/StepButtons.js +0 -21
- package/components/StepButtons/StepButtons.js.map +0 -1
- package/components/Stepper/Dot.js +0 -16
- package/components/Stepper/Dot.js.map +0 -1
- package/components/Stepper/DotList.js +0 -7
- package/components/Stepper/DotList.js.map +0 -1
- package/components/Stepper/Stepper.js +0 -35
- package/components/Stepper/Stepper.js.map +0 -1
- package/components/Stepper/utils.js +0 -16
- package/components/Stepper/utils.js.map +0 -1
- package/components/Table/Table.js +0 -76
- package/components/Table/Table.js.map +0 -1
- package/components/Table/TableBody/TableBody.js +0 -13
- package/components/Table/TableBody/TableBody.js.map +0 -1
- package/components/Table/TableCell/TableCell.js.map +0 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.js +0 -31
- package/components/Table/TableExpandedRow/TableExpandedRow.js.map +0 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.js +0 -35
- package/components/Table/TableExpanderCell/TableExpanderCell.js.map +0 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +0 -25
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js.map +0 -1
- package/components/Table/TableHead/TableHead.js +0 -24
- package/components/Table/TableHead/TableHead.js.map +0 -1
- package/components/Table/TableHeadCell/TableHeadCell.js +0 -42
- package/components/Table/TableHeadCell/TableHeadCell.js.map +0 -1
- package/components/Table/TableRow/TableRow.js +0 -40
- package/components/Table/TableRow/TableRow.js.map +0 -1
- package/components/Table/utils.js +0 -32
- package/components/Table/utils.js.map +0 -1
- package/components/Tabs/Tab.js +0 -6
- package/components/Tabs/Tab.js.map +0 -1
- package/components/Tabs/TabList/TabItem.js +0 -45
- package/components/Tabs/TabList/TabItem.js.map +0 -1
- package/components/Tabs/TabList/TabList.js +0 -28
- package/components/Tabs/TabList/TabList.js.map +0 -1
- package/components/Tabs/TabPanel/TabPanel.js +0 -17
- package/components/Tabs/TabPanel/TabPanel.js.map +0 -1
- package/components/Tabs/Tabs.js +0 -92
- package/components/Tabs/Tabs.js.map +0 -1
- package/components/Tag/Tag.js +0 -22
- package/components/Tag/Tag.js.map +0 -1
- package/components/TagList/TagList.js +0 -8
- package/components/TagList/TagList.js.map +0 -1
- package/components/Textarea/Textarea.js +0 -105
- package/components/Textarea/Textarea.js.map +0 -1
- package/components/Tile/Tile.js +0 -67
- package/components/Tile/Tile.js.map +0 -1
- package/components/Title/Title.js +0 -25
- package/components/Title/Title.js.map +0 -1
- package/components/Toggle/Toggle.js +0 -92
- package/components/Toggle/Toggle.js.map +0 -1
- package/components/Tooltip/Tooltip.js +0 -55
- package/components/Tooltip/Tooltip.js.map +0 -1
- package/components/Tooltip/TooltipWord/TooltipWord.js +0 -27
- package/components/Tooltip/TooltipWord/TooltipWord.js.map +0 -1
- package/components/TooltipExample/TooltipExample.js +0 -8
- package/components/TooltipExample/TooltipExample.js.map +0 -1
- package/components/TooltipExample/index.js +0 -5
- package/components/TooltipExample/index.js.map +0 -1
- package/components/Trigger/HelpSign.js +0 -7
- package/components/Trigger/HelpSign.js.map +0 -1
- package/components/Trigger/Trigger.js +0 -73
- package/components/Trigger/Trigger.js.map +0 -1
- package/components/Validation/ErrorList.js +0 -8
- package/components/Validation/ErrorList.js.map +0 -1
- package/components/Validation/ErrorListItem.js +0 -12
- package/components/Validation/ErrorListItem.js.map +0 -1
- package/components/Validation/Validation.js +0 -18
- package/components/Validation/Validation.js.map +0 -1
- package/components/Validation/ValidationSummary.js +0 -25
- package/components/Validation/ValidationSummary.js.map +0 -1
- package/docs/index.d.ts +0 -8
- package/docs/index.js +0 -14
- package/docs/index.js.map +0 -1
- /package/{components → docs}/ButtonWithModal/index.d.ts +0 -0
- /package/{components → docs}/FormExample/FormExample.d.ts +0 -0
- /package/{components → docs}/FormExample/index.d.ts +0 -0
- /package/{components → docs}/GridExample/GridExample.d.ts +0 -0
- /package/{components → docs}/GridExample/index.d.ts +0 -0
- /package/{components → docs}/HelpBubbleExample/index.d.ts +0 -0
- /package/{components → docs}/TooltipExample/index.d.ts +0 -0
package/Icon.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../src/components/Icon/Icon.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, IconSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { StatusDotModes } from '../StatusDot';\n\nexport type SvgIcon = React.FC<SvgPathProps>;\n\nexport interface BaseIconProps {\n /* aria-label for the <svg> element. Used as <title> tag. */\n ariaLabel?: string;\n /* Changes the size of the icon. */\n size?: number;\n /* Changes the color of the icon. */\n color?: string;\n /* Changes the hover color of the icon. */\n hoverColor?: string;\n /* Adds custom classes to the element. */\n className?: string;\n /* Swaps the displayed icon to the hover version and changes its color. */\n isHovered?: boolean;\n /** Defines the color of the icon */\n mode?: keyof typeof FormMode | StatusDotModes;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport interface IconProps extends BaseIconProps {\n /* Sets which icon should be displayed. */\n svgIcon: SvgIcon;\n}\n\nexport interface SvgPathProps {\n size: IconSize;\n isHovered: boolean;\n mode?: keyof typeof FormMode | StatusDotModes;\n}\n\ninterface IconConfig {\n size: IconSize;\n isHovered: boolean;\n normal: React.ReactElement;\n normalHover: React.ReactElement;\n xSmall?: React.ReactElement;\n xSmallHover?: React.ReactElement;\n xxSmall?: React.ReactElement;\n xxSmallHover?: React.ReactElement;\n}\n\nexport const getIcon = ({\n size,\n isHovered,\n normal,\n normalHover,\n xSmall,\n xSmallHover,\n xxSmall,\n xxSmallHover,\n}: IconConfig): React.ReactElement => {\n if (size <= IconSize.XXSmall && xxSmall && xxSmallHover) {\n return isHovered ? xxSmallHover : xxSmall;\n }\n if (size <= IconSize.XSmall && xSmall && xSmallHover) {\n return isHovered ? xSmallHover : xSmall;\n }\n\n return isHovered ? normalHover : normal;\n};\n\nexport const Icon = React.forwardRef((props: IconProps, ref: React.ForwardedRef<SVGSVGElement>) => {\n const {\n svgIcon,\n ariaLabel,\n className = '',\n size = IconSize.Small,\n color = 'black',\n hoverColor = color || 'black',\n isHovered = false,\n mode,\n testId,\n ...other\n } = props;\n\n const svgRaw = React.createElement(svgIcon, {\n size,\n isHovered,\n mode,\n });\n\n const titleId = useUuid();\n const svgColor = isHovered ? hoverColor : color;\n\n return (\n <svg\n data-testid={testId}\n data-analyticsid={AnalyticsId.Icon}\n ref={ref}\n className={classNames(`hnds-style-icon`, className)}\n role={ariaLabel ? 'img' : 'presentation'}\n aria-labelledby={ariaLabel ? titleId : undefined}\n focusable={false}\n aria-hidden={ariaLabel ? undefined : true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n fill={svgColor}\n color={svgColor}\n {...other}\n >\n {ariaLabel && <title id={titleId}>{ariaLabel}</title>}\n {svgRaw}\n </svg>\n );\n});\n\nIcon.displayName = 'Icon';\n\nexport default Icon;\n"],"names":["getIcon","size","isHovered","normal","normalHover","xSmall","xSmallHover","xxSmall","xxSmallHover","IconSize","Icon","React","props","ref","svgIcon","ariaLabel","className","color","hoverColor","mode","testId","other","svgRaw","titleId","useUuid","svgColor","jsxs","AnalyticsId","classNames","jsx"],"mappings":";;;;;AAmDO,MAAMA,IAAU,CAAC;AAAA,EACtB,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,cAAAC;AACF,MACMP,KAAQQ,EAAS,WAAWF,KAAWC,IAClCN,IAAYM,IAAeD,IAEhCN,KAAQQ,EAAS,UAAUJ,KAAUC,IAChCJ,IAAYI,IAAcD,IAG5BH,IAAYE,IAAcD,GAGtBO,IAAOC,EAAM,WAAW,CAACC,GAAkBC,MAA2C;AAC3F,QAAA;AAAA,IACJ,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,MAAAf,IAAOQ,EAAS;AAAA,IAChB,OAAAQ,IAAQ;AAAA,IACR,YAAAC,IAAaD,KAAS;AAAA,IACtB,WAAAf,IAAY;AAAA,IACZ,MAAAiB;AAAA,IACA,QAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAT,GAEEU,IAASX,EAAM,cAAcG,GAAS;AAAA,IAC1C,MAAAb;AAAA,IACA,WAAAC;AAAA,IACA,MAAAiB;AAAA,EAAA,CACD,GAEKI,IAAUC,KACVC,IAAWvB,IAAYgB,IAAaD;AAGxC,SAAA,gBAAAS;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAaN;AAAA,MACb,oBAAkBO,EAAY;AAAA,MAC9B,KAAAd;AAAA,MACA,WAAWe,EAAW,mBAAmBZ,CAAS;AAAA,MAClD,MAAMD,IAAY,QAAQ;AAAA,MAC1B,mBAAiBA,IAAYQ,IAAU;AAAA,MACvC,WAAW;AAAA,MACX,eAAaR,IAAY,SAAY;AAAA,MACrC,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUd,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,MACR,MAAMwB;AAAA,MACN,OAAOA;AAAA,MACN,GAAGJ;AAAA,MAEH,UAAA;AAAA,QAAAN,KAAc,gBAAAc,EAAA,SAAA,EAAM,IAAIN,GAAU,UAAUR,GAAA;AAAA,QAC5CO;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;AAEDZ,EAAK,cAAc;"}
|
package/Illustration.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import r from "react";
|
|
3
|
+
import { g as p } from "./utils.js";
|
|
4
|
+
import { AnalyticsId as g } from "./constants.js";
|
|
5
|
+
import { useUuid as h } from "./hooks/useUuid.js";
|
|
6
|
+
var I = /* @__PURE__ */ ((e) => (e.Medium = "0 0 512 512", e.Small = "0 0 200 200", e))(I || {});
|
|
7
|
+
const v = r.forwardRef((e, s) => {
|
|
8
|
+
const { illustration: o, ariaLabel: i, className: n = "", size: t = 512, color: a = "neutral", testId: m, ...d } = e, l = h(), c = p({
|
|
9
|
+
size: t,
|
|
10
|
+
medium: "0 0 512 512",
|
|
11
|
+
small: "0 0 200 200"
|
|
12
|
+
/* Small */
|
|
13
|
+
}), u = {
|
|
14
|
+
"data-testid": m,
|
|
15
|
+
"data-analyticsid": g.Illustration,
|
|
16
|
+
ref: s,
|
|
17
|
+
className: n,
|
|
18
|
+
role: i ? "img" : "presentation",
|
|
19
|
+
"aria-labelledby": i ? l : void 0,
|
|
20
|
+
focusable: !1,
|
|
21
|
+
"aria-hidden": i ? void 0 : !0,
|
|
22
|
+
viewBox: c,
|
|
23
|
+
style: { minWidth: t, minHeight: t },
|
|
24
|
+
width: t,
|
|
25
|
+
height: t,
|
|
26
|
+
fill: a,
|
|
27
|
+
...d
|
|
28
|
+
};
|
|
29
|
+
return r.createElement(o, {
|
|
30
|
+
size: t,
|
|
31
|
+
color: a,
|
|
32
|
+
svgProperties: u,
|
|
33
|
+
title: i && /* @__PURE__ */ f("title", { id: l, children: i })
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
v.displayName = "Illustration";
|
|
37
|
+
export {
|
|
38
|
+
v as I,
|
|
39
|
+
I as V
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=Illustration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Illustration.js","sources":["../src/components/Illustration/Illustration.tsx"],"sourcesContent":["import React from 'react';\n\nimport { getIllustration } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\n\nexport type IllustrationColor = 'neutral' | 'cherry' | 'blueberry';\n\nexport enum ViewBoxSize {\n Medium = '0 0 512 512',\n Small = '0 0 200 200',\n}\n\nexport interface BaseSvgIllustrationProps {\n color: IllustrationColor;\n svgProperties: React.SVGProps<SVGSVGElement>;\n title: React.ReactNode;\n}\nexport interface SvgIllustrationProps extends BaseSvgIllustrationProps {\n size: number;\n}\n\nexport type SvgIllustration = React.ComponentType<SvgIllustrationProps>;\n\nexport interface BaseIllustrationProps {\n /* aria-label for the <svg> element. Used as <title> tag. */\n ariaLabel?: string;\n /* Changes the size of the illustration. */\n size?: number;\n /* Changes the color of the illustration. */\n color?: IllustrationColor;\n /* Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport interface IllustrationProps extends BaseIllustrationProps {\n /* Sets which illustration should be displayed. */\n illustration: SvgIllustration;\n}\n\nexport const Illustration = React.forwardRef<SVGSVGElement, IllustrationProps>((props, ref) => {\n const { illustration, ariaLabel, className = '', size = 512, color = 'neutral', testId, ...other } = props;\n\n const titleId = useUuid();\n const viewBox = getIllustration({ size, medium: ViewBoxSize.Medium, small: ViewBoxSize.Small });\n\n const svgProperties = {\n 'data-testid': testId,\n 'data-analyticsid': AnalyticsId.Illustration,\n ref,\n className,\n role: ariaLabel ? 'img' : 'presentation',\n 'aria-labelledby': ariaLabel ? titleId : undefined,\n focusable: false,\n 'aria-hidden': ariaLabel ? undefined : true,\n viewBox,\n style: { minWidth: size, minHeight: size },\n width: size,\n height: size,\n fill: color,\n ...other,\n };\n\n const svgElement = React.createElement(illustration, {\n size,\n color,\n svgProperties: svgProperties,\n title: ariaLabel && <title id={titleId}>{ariaLabel}</title>,\n });\n\n return svgElement;\n});\n\nIllustration.displayName = 'Illustration';\n\nexport default Illustration;\n"],"names":["ViewBoxSize","Illustration","React","props","ref","illustration","ariaLabel","className","size","color","testId","other","titleId","useUuid","viewBox","getIllustration","svgProperties","AnalyticsId","jsx"],"mappings":";;;;;AAQY,IAAAA,sBAAAA,OACVA,EAAA,SAAS,eACTA,EAAA,QAAQ,eAFEA,IAAAA,KAAA,CAAA,CAAA;AAkCL,MAAMC,IAAeC,EAAM,WAA6C,CAACC,GAAOC,MAAQ;AAC7F,QAAM,EAAE,cAAAC,GAAc,WAAAC,GAAW,WAAAC,IAAY,IAAI,MAAAC,IAAO,KAAK,OAAAC,IAAQ,WAAW,QAAAC,GAAQ,GAAGC,EAAA,IAAUR,GAE/FS,IAAUC,KACVC,IAAUC,EAAgB;AAAA,IAAE,MAAAP;AAAA,IAAM,QAAQ;AAAA,IAAoB,OAAO;AAAA;AAAA,GAAmB,GAExFQ,IAAgB;AAAA,IACpB,eAAeN;AAAA,IACf,oBAAoBO,EAAY;AAAA,IAChC,KAAAb;AAAA,IACA,WAAAG;AAAA,IACA,MAAMD,IAAY,QAAQ;AAAA,IAC1B,mBAAmBA,IAAYM,IAAU;AAAA,IACzC,WAAW;AAAA,IACX,eAAeN,IAAY,SAAY;AAAA,IACvC,SAAAQ;AAAA,IACA,OAAO,EAAE,UAAUN,GAAM,WAAWA,EAAK;AAAA,IACzC,OAAOA;AAAA,IACP,QAAQA;AAAA,IACR,MAAMC;AAAA,IACN,GAAGE;AAAA,EAAA;AAUE,SAPYT,EAAM,cAAcG,GAAc;AAAA,IACnD,MAAAG;AAAA,IACA,OAAAC;AAAA,IACA,eAAAO;AAAA,IACA,OAAOV,KAAa,gBAAAY,EAAC,SAAM,EAAA,IAAIN,GAAU,UAAUN,GAAA;AAAA,EAAA,CACpD;AAGH,CAAC;AAEDL,EAAa,cAAc;"}
|
package/Input.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { jsx as c, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import ve, { useRef as $, useState as L, useEffect as _e } from "react";
|
|
3
|
+
import y from "classnames";
|
|
4
|
+
import { FormMode as s, FormSize as ye, IconSize as B, AnalyticsId as ke, AVERAGE_CHARACTER_WIDTH_PX as Ie } from "./constants.js";
|
|
5
|
+
import { useBreakpoint as we, Breakpoint as Ne } from "./hooks/useBreakpoint.js";
|
|
6
|
+
import { useUuid as M } from "./hooks/useUuid.js";
|
|
7
|
+
import { getColor as U } from "./theme/currys/color.js";
|
|
8
|
+
import { getAriaDescribedBy as Re } from "./utils/accessibility.js";
|
|
9
|
+
import { mergeRefs as We } from "./utils/refs.js";
|
|
10
|
+
import { E as Se } from "./ErrorWrapper.js";
|
|
11
|
+
import { I as Ee } from "./Icon.js";
|
|
12
|
+
import { a as ze } from "./Label.js";
|
|
13
|
+
import { L as Ae } from "./LazyIcon.js";
|
|
14
|
+
import { M as Ve } from "./MaxCharacters.js";
|
|
15
|
+
import t from "./components/Input/styles.module.scss";
|
|
16
|
+
var De = /* @__PURE__ */ ((e) => (e.text = "text", e.number = "number", e.email = "email", e.password = "password", e.search = "search", e.tel = "tel", e.url = "url", e.date = "date", e.time = "time", e))(De || {});
|
|
17
|
+
const Ke = (e, l, p) => {
|
|
18
|
+
const o = l ? "1.5rem" : "2rem", f = l ? `${p}px` : "0px";
|
|
19
|
+
return `calc(${e * Ie}px + ${o} + ${f} + 4px)`;
|
|
20
|
+
}, $e = ve.forwardRef((e, l) => {
|
|
21
|
+
const {
|
|
22
|
+
className: p,
|
|
23
|
+
defaultValue: o,
|
|
24
|
+
placeholder: f,
|
|
25
|
+
type: h = "text",
|
|
26
|
+
name: F,
|
|
27
|
+
transparent: P = !1,
|
|
28
|
+
icon: r,
|
|
29
|
+
iconRight: g,
|
|
30
|
+
inputId: j,
|
|
31
|
+
inputWrapperRef: H,
|
|
32
|
+
mode: i = s.onwhite,
|
|
33
|
+
size: O,
|
|
34
|
+
baseIncrementValue: k,
|
|
35
|
+
label: X,
|
|
36
|
+
error: q,
|
|
37
|
+
errorText: I,
|
|
38
|
+
errorTextId: G,
|
|
39
|
+
testId: J,
|
|
40
|
+
disabled: u,
|
|
41
|
+
readOnly: Q,
|
|
42
|
+
autoComplete: T = "off",
|
|
43
|
+
afterInputChildren: Y,
|
|
44
|
+
rightOfInput: Z,
|
|
45
|
+
width: w,
|
|
46
|
+
required: ee,
|
|
47
|
+
onChange: N,
|
|
48
|
+
onKeyDown: R,
|
|
49
|
+
autoFocus: te,
|
|
50
|
+
maxCharacters: d,
|
|
51
|
+
maxText: ne,
|
|
52
|
+
inputContainerRef: re,
|
|
53
|
+
...ae
|
|
54
|
+
} = e, oe = we(), m = $(null), W = M(j), [S, E] = L(o || ""), [ie, ce] = L(void 0), b = $(!1), z = M(G), A = /^[0-9]$/;
|
|
55
|
+
_e(() => {
|
|
56
|
+
E(o || "");
|
|
57
|
+
}, [o]);
|
|
58
|
+
const se = i === s.ondark, le = i === s.onblueberry, ue = !!d && S.toString().length > d, x = i === s.oninvalid || !!I || !!q || ue, C = O === ye.large, de = P && i !== s.ondark && !x, me = y(t["input-wrapper"], p), pe = y(t["input-container"], {
|
|
59
|
+
[t["input-container--transparent"]]: de,
|
|
60
|
+
[t["input-container--on-blueberry"]]: le,
|
|
61
|
+
[t["input-container--on-dark"]]: se,
|
|
62
|
+
[t["input-container--invalid"]]: x,
|
|
63
|
+
[t["input-container--large"]]: C,
|
|
64
|
+
[t["input-container--disabled"]]: u,
|
|
65
|
+
[t["input-container--with-icon"]]: r
|
|
66
|
+
}), fe = y(t["input-container__input"], {
|
|
67
|
+
[t["input-container__input--large"]]: C,
|
|
68
|
+
[t["input-container__input--disabled"]]: u
|
|
69
|
+
}), V = u ? U("neutral", 700) : U("black"), v = oe === Ne.xs || !C ? B.XSmall : B.Small, D = () => {
|
|
70
|
+
if (r)
|
|
71
|
+
return typeof r == "string" ? /* @__PURE__ */ c(Ae, { className: t["input-container__input__icon"], color: V, size: v, iconName: r }) : /* @__PURE__ */ c(Ee, { className: t["input-container__input__icon"], color: V, size: v, svgIcon: r });
|
|
72
|
+
}, he = (n) => {
|
|
73
|
+
if (m && m.current && r) {
|
|
74
|
+
const a = g ? 0 : 1;
|
|
75
|
+
m.current.children[a].focus(), e.onClick && e.onClick(n);
|
|
76
|
+
}
|
|
77
|
+
}, ge = (n) => {
|
|
78
|
+
const a = be(n);
|
|
79
|
+
N && N(n), E(a), ce(a);
|
|
80
|
+
}, be = (n) => {
|
|
81
|
+
if (typeof k > "u" || h !== "number") return n.target.value;
|
|
82
|
+
const a = Number(n.target.value);
|
|
83
|
+
return !ie && !b.current && (a === 1 || a === -1) && (n.target.value = k + ""), n.target.value;
|
|
84
|
+
}, xe = (n) => {
|
|
85
|
+
A.test(n.key) && (b.current = !0), R && R(n);
|
|
86
|
+
}, Ce = (n) => {
|
|
87
|
+
A.test(n.key) && (b.current = !1);
|
|
88
|
+
}, K = w ? Ke(w, !!r, v) : void 0;
|
|
89
|
+
return /* @__PURE__ */ c(Se, { errorText: I, errorTextId: z, children: /* @__PURE__ */ _("div", { "data-testid": J, "data-analyticsid": ke.Input, className: me, ref: H, children: [
|
|
90
|
+
ze(X, W, i),
|
|
91
|
+
/* @__PURE__ */ _("div", { className: t["content-wrapper"], children: [
|
|
92
|
+
/* @__PURE__ */ _(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
onClick: he,
|
|
96
|
+
ref: We([m, re]),
|
|
97
|
+
className: pe,
|
|
98
|
+
style: { maxWidth: K },
|
|
99
|
+
children: [
|
|
100
|
+
!g && D(),
|
|
101
|
+
/* @__PURE__ */ c(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
onChange: ge,
|
|
105
|
+
onKeyDown: xe,
|
|
106
|
+
onKeyUp: Ce,
|
|
107
|
+
name: F,
|
|
108
|
+
type: h,
|
|
109
|
+
defaultValue: o,
|
|
110
|
+
id: W,
|
|
111
|
+
className: fe,
|
|
112
|
+
ref: l,
|
|
113
|
+
"aria-labelledby": e["aria-labelledby"] ?? void 0,
|
|
114
|
+
"aria-describedby": Re(e, z),
|
|
115
|
+
"aria-invalid": !!x,
|
|
116
|
+
disabled: u,
|
|
117
|
+
placeholder: f,
|
|
118
|
+
readOnly: Q,
|
|
119
|
+
autoComplete: T || "off",
|
|
120
|
+
required: ee,
|
|
121
|
+
autoFocus: te,
|
|
122
|
+
...ae
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
g && D()
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
),
|
|
129
|
+
/* @__PURE__ */ c("div", { className: t["content-wrapper__right-of-input"], children: Z })
|
|
130
|
+
] }),
|
|
131
|
+
d && /* @__PURE__ */ c(Ve, { maxCharacters: d, length: S.toString().length, maxText: ne, mode: i, maxWidth: K }),
|
|
132
|
+
Y
|
|
133
|
+
] }) });
|
|
134
|
+
});
|
|
135
|
+
$e.displayName = "Input";
|
|
136
|
+
export {
|
|
137
|
+
$e as I,
|
|
138
|
+
De as a
|
|
139
|
+
};
|
|
140
|
+
//# sourceMappingURL=Input.js.map
|
package/Input.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../src/components/Input/Input.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport { FormMode, FormSize, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { mergeRefs } from '../../utils/refs';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport { renderLabel } from '../Label';\nimport LazyIcon from '../LazyIcon';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon | IconName;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputContainerRef */\n inputContainerRef?: React.RefObject<HTMLDivElement>;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement>;\n /** Changes the color profile of the input */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the input */\n size?: keyof typeof FormSize;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n}\n\nexport enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputId,\n inputWrapperRef,\n mode = FormMode.onwhite,\n size,\n baseIncrementValue,\n label,\n error,\n errorText,\n errorTextId,\n testId,\n disabled,\n readOnly,\n autoComplete = 'off',\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n maxText,\n inputContainerRef,\n ...rest\n } = props;\n const breakpoint = useBreakpoint();\n const inputContainerRefLocal = useRef<HTMLDivElement>(null);\n const inputIdState = useUuid(inputId);\n const [input, setInput] = useState(defaultValue || '');\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const errorTextUuid = useUuid(errorTextId);\n const numRegex = /^[0-9]$/;\n\n useEffect(() => {\n setInput(defaultValue || '');\n }, [defaultValue]);\n\n const onDark = mode === FormMode.ondark;\n const onBlueberry = mode === FormMode.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = mode === FormMode.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const isLarge = size === FormSize.large;\n const isTransparent = transparent && mode !== FormMode.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--large']]: isLarge,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--large']]: isLarge,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 700) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !isLarge ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n if (!icon) {\n return;\n }\n\n if (typeof icon === 'string') {\n return <LazyIcon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} iconName={icon} />;\n }\n\n return <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRefLocal && inputContainerRefLocal.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRefLocal.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n props.onClick && props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n onKeyDown && onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper errorText={errorText} errorTextId={errorTextUuid}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel(label, inputIdState, mode as FormMode)}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n onClick={handleClick}\n ref={mergeRefs([inputContainerRefLocal, inputContainerRef])}\n className={inputContainer}\n style={{ maxWidth }}\n >\n {!iconRight && renderIcon()}\n <input\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputIdState}\n className={inputClass}\n ref={ref}\n aria-labelledby={props['aria-labelledby'] ?? undefined}\n aria-describedby={getAriaDescribedBy(props, errorTextUuid)}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n {...rest}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters maxCharacters={maxCharacters} length={input.toString().length} maxText={maxText} mode={mode} maxWidth={maxWidth} />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n});\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["InputTypes","getInputMaxWidth","characters","hasIcon","iconSize","paddingWidth","iconWidth","AVERAGE_CHARACTER_WIDTH_PX","Input","React","props","ref","className","defaultValue","placeholder","type","name","transparent","icon","iconRight","inputId","inputWrapperRef","mode","FormMode","size","baseIncrementValue","label","error","errorText","errorTextId","testId","disabled","readOnly","autoComplete","afterInputChildren","rightOfInput","width","required","onChange","onKeyDown","autoFocus","maxCharacters","maxText","inputContainerRef","rest","breakpoint","useBreakpoint","inputContainerRefLocal","useRef","inputIdState","useUuid","input","setInput","useState","prevValue","setPrevValue","numKeyPressed","errorTextUuid","numRegex","useEffect","onDark","onBlueberry","maxCharactersExceeded","onError","isLarge","FormSize","isTransparent","inputWrapperClass","cn","styles","inputContainer","inputClass","iconColor","getColor","Breakpoint","IconSize","renderIcon","jsx","LazyIcon","Icon","handleClick","e","selectedChild","handleChange","newValue","getIncrementValue","valueAsNumber","handleKeyDown","handleKeyUp","maxWidth","ErrorWrapper","jsxs","AnalyticsId","renderLabel","mergeRefs","getAriaDescribedBy","MaxCharacters"],"mappings":";;;;;;;;;;;;;;;AAqFY,IAAAA,uBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,OAAO,QATGA,IAAAA,MAAA,CAAA,CAAA;AAYZ,MAAMC,KAAmB,CAACC,GAAoBC,GAAkBC,MAA6B;AACrF,QAAAC,IAAeF,IAAU,WAAW,QACpCG,IAAYH,IAAU,GAAGC,CAAQ,OAAO;AAGvC,SAAA,QAAQF,IAAaK,EAA0B,QAAQF,CAAY,MAAMC,CAAS;AAC3F,GAEME,KAAQC,GAAM,WAAW,CAACC,GAAmBC,MAAqC;AAChF,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,MAAAC;AAAA,IACA,aAAAC,IAAc;AAAA,IACd,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,MAAAC,IAAOC,EAAS;AAAA,IAChB,MAAAC;AAAA,IACA,oBAAAC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ACA,IAAIoC;AAAA,gBACJ,WAAWsB;AAAA,gBACX,KAAA5D;AAAA,gBACA,mBAAiBD,EAAM,iBAAiB,KAAK;AAAA,gBAC7C,oBAAkBqF,GAAmBrF,GAAO+C,CAAa;AAAA,gBACzD,gBAAc,CAAC,CAACM;AAAA,gBAChB,UAAAhC;AAAA,gBACA,aAAAjB;AAAA,gBACA,UAAAkB;AAAA,gBACA,cAAcC,KAAgB;AAAA,gBAC9B,UAAAI;AAAA,gBAEA,WAAAG;AAAA,gBACC,GAAGI;AAAA,cAAA;AAAA,YACN;AAAA,YACCzB,KAAayD,EAAW;AAAA,UAAA;AAAA,QAAA;AAAA,MAC3B;AAAA,wBACC,OAAI,EAAA,WAAWP,EAAO,iCAAiC,GAAI,UAAalC,GAAA;AAAA,IAAA,GAC3E;AAAA,IACCM,KACE,gBAAAoC,EAAAmB,IAAA,EAAc,eAAAvD,GAA8B,QAAQU,EAAM,SAAA,EAAW,QAAQ,SAAAT,IAAkB,MAAApB,GAAY,UAAAmE,EAAoB,CAAA;AAAA,IAEjIvD;AAAA,EAAA,EACH,CAAA,EACF,CAAA;AAEJ,CAAC;AAED1B,GAAM,cAAc;"}
|
package/Label.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { jsxs as m, Fragment as x, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import S from "react";
|
|
3
|
+
import y from "classnames";
|
|
4
|
+
import { AnalyticsId as L, FormMode as u } from "./constants.js";
|
|
5
|
+
import { S as N } from "./Spacer.js";
|
|
6
|
+
import a from "./components/Label/styles.module.scss";
|
|
7
|
+
import { isComponent as b } from "./utils/component.js";
|
|
8
|
+
import { S as z } from "./StatusDot.js";
|
|
9
|
+
const A = ({ className: e, id: r, mode: s, sublabelTexts: n, testId: o }) => {
|
|
10
|
+
const l = (p) => n && n.map((c, h) => {
|
|
11
|
+
const F = y(a.label, a["label--sublabel"], {
|
|
12
|
+
[a["label--semibold"]]: c.type === "semibold",
|
|
13
|
+
[a["label--on-dark"]]: s === u.ondark
|
|
14
|
+
});
|
|
15
|
+
return p === c.hideFromScreenReader && /* @__PURE__ */ t("span", { className: F, children: c.text }, h);
|
|
16
|
+
}), i = l(), d = l(!0);
|
|
17
|
+
return /* @__PURE__ */ m(x, { children: [
|
|
18
|
+
/* @__PURE__ */ t(N, { size: "3xs" }),
|
|
19
|
+
i && /* @__PURE__ */ t("div", { className: e, id: r, "data-testid": o, "data-analyticsid": L.Sublabel, children: i }),
|
|
20
|
+
d && /* @__PURE__ */ t("div", { className: e, "data-testid": o, children: d })
|
|
21
|
+
] });
|
|
22
|
+
}, G = (e) => {
|
|
23
|
+
let r = "";
|
|
24
|
+
return b(e, f) && e.props.labelTexts.forEach((s) => {
|
|
25
|
+
r += s.hideFromScreenReader ? "" : s.text;
|
|
26
|
+
}), r;
|
|
27
|
+
}, J = (e, r, s) => /* @__PURE__ */ t(x, { children: e && b(e, f) ? S.cloneElement(e, {
|
|
28
|
+
htmlFor: r,
|
|
29
|
+
mode: s
|
|
30
|
+
}) : typeof e == "string" && /* @__PURE__ */ t(f, { labelTexts: [{ text: e, type: "semibold" }], htmlFor: r, mode: s }) }), K = (e, r, s, n, o, l, i, d) => /* @__PURE__ */ t(x, { children: e && b(e, f) ? S.cloneElement(e, {
|
|
31
|
+
htmlFor: s,
|
|
32
|
+
mode: n,
|
|
33
|
+
children: r,
|
|
34
|
+
labelClassName: y(o, e.props.labelClassName),
|
|
35
|
+
labelTextClassName: l,
|
|
36
|
+
sublabelWrapperClassName: i,
|
|
37
|
+
sublabel: d ? void 0 : e.props.sublabel,
|
|
38
|
+
statusDot: d ? void 0 : e.props.statusDot
|
|
39
|
+
}) : typeof e == "string" && /* @__PURE__ */ t(
|
|
40
|
+
f,
|
|
41
|
+
{
|
|
42
|
+
labelTexts: [{ text: e }],
|
|
43
|
+
htmlFor: s,
|
|
44
|
+
mode: n,
|
|
45
|
+
labelClassName: o,
|
|
46
|
+
labelTextClassName: l,
|
|
47
|
+
sublabelWrapperClassName: i,
|
|
48
|
+
children: r
|
|
49
|
+
}
|
|
50
|
+
) }), f = ({
|
|
51
|
+
afterLabelChildren: e,
|
|
52
|
+
children: r,
|
|
53
|
+
className: s,
|
|
54
|
+
htmlFor: n,
|
|
55
|
+
labelClassName: o,
|
|
56
|
+
labelTextClassName: l,
|
|
57
|
+
labelId: i,
|
|
58
|
+
labelTexts: d,
|
|
59
|
+
mode: p = u.onwhite,
|
|
60
|
+
statusDot: c,
|
|
61
|
+
sublabel: h,
|
|
62
|
+
sublabelWrapperClassName: F,
|
|
63
|
+
testId: k
|
|
64
|
+
}) => {
|
|
65
|
+
const w = r && typeof r < "u", g = y(
|
|
66
|
+
a["label-wrapper"],
|
|
67
|
+
{ [a["label-wrapper--no-bottom-margin"]]: w, [a["label-wrapper--after-label-children"]]: e },
|
|
68
|
+
s
|
|
69
|
+
), E = () => d.map((v, R) => {
|
|
70
|
+
const j = y(
|
|
71
|
+
a.label,
|
|
72
|
+
{
|
|
73
|
+
[a["label--semibold"]]: v.type === "semibold",
|
|
74
|
+
[a["label--on-dark"]]: p === u.ondark
|
|
75
|
+
},
|
|
76
|
+
l
|
|
77
|
+
);
|
|
78
|
+
return /* @__PURE__ */ t("span", { "aria-hidden": v.hideFromScreenReader, className: j, children: v.text }, R);
|
|
79
|
+
});
|
|
80
|
+
return /* @__PURE__ */ m("div", { className: g, children: [
|
|
81
|
+
/* @__PURE__ */ m("div", { children: [
|
|
82
|
+
/* @__PURE__ */ t("label", { className: o, id: i, htmlFor: n, "data-testid": k, "data-analyticsid": L.Label, children: /* @__PURE__ */ m("span", { className: a["label-content-wrapper"], children: [
|
|
83
|
+
r,
|
|
84
|
+
/* @__PURE__ */ t("span", { className: a.label__texts, children: E() })
|
|
85
|
+
] }) }),
|
|
86
|
+
/* @__PURE__ */ m("div", { className: F, children: [
|
|
87
|
+
h && b(h, A) && S.cloneElement(h, {
|
|
88
|
+
mode: p
|
|
89
|
+
}),
|
|
90
|
+
c && b(c, z) && /* @__PURE__ */ m(x, { children: [
|
|
91
|
+
/* @__PURE__ */ t(N, { size: "3xs" }),
|
|
92
|
+
S.cloneElement(c, {
|
|
93
|
+
mode: p === u.ondark ? "ondark" : "onwhite"
|
|
94
|
+
})
|
|
95
|
+
] })
|
|
96
|
+
] })
|
|
97
|
+
] }),
|
|
98
|
+
e && /* @__PURE__ */ t("div", { className: a["after-label-children"], children: e })
|
|
99
|
+
] });
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
f as L,
|
|
103
|
+
A as S,
|
|
104
|
+
J as a,
|
|
105
|
+
G as g,
|
|
106
|
+
K as r
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=Label.js.map
|
package/Label.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../src/components/Label/SubLabel.tsx","../src/components/Label/Label.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { LabelText } from './Label';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport Spacer from '../Spacer';\n\nimport styles from './styles.module.scss';\n\nexport interface SublabelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** id that is placed on the wrapper */\n id: string;\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: FormMode;\n /** Array of sublabel strings. Can be of type semibold or normal */\n sublabelTexts?: LabelText[];\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const Sublabel: React.FC<SublabelProps> = ({ className, id, mode, sublabelTexts, testId }) => {\n const mapSublabels = (hideFromScreenReader?: boolean): React.ReactNode => {\n return (\n sublabelTexts &&\n sublabelTexts.map((sublabelText, index) => {\n const labelClasses = cn(styles.label, styles['label--sublabel'], {\n [styles['label--semibold']]: sublabelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n });\n return (\n hideFromScreenReader === sublabelText.hideFromScreenReader && (\n <span className={labelClasses} key={index}>\n {sublabelText.text}\n </span>\n )\n );\n })\n );\n };\n\n const subLabels = mapSublabels();\n const ariaHiddenSublabels = mapSublabels(true);\n\n return (\n <>\n <Spacer size={'3xs'} />\n {subLabels && (\n <div className={className} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Sublabel}>\n {subLabels}\n </div>\n )}\n {ariaHiddenSublabels && (\n <div className={className} data-testid={testId}>\n {ariaHiddenSublabels}\n </div>\n )}\n </>\n );\n};\n","import React, { FunctionComponent } from 'react';\n\nimport cn from 'classnames';\n\nimport { Sublabel, SublabelProps } from './SubLabel';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport Spacer from '../Spacer';\nimport StatusDot, { StatusDotProps } from '../StatusDot';\n\nimport styles from './styles.module.scss';\n\nexport type LabelText = {\n hideFromScreenReader?: boolean;\n text: string;\n type?: 'semibold' | 'normal';\n};\n\nexport interface LabelProps {\n /** Component shown after label - discourage use of this */\n afterLabelChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n children?: React.ReactNode;\n /** Adds custom classes to the label tag. */\n labelClassName?: string;\n /** Adds custom classes to the label text. */\n labelTextClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Id that is put on the \"for\" attribute of the label */\n htmlFor?: string;\n /** Id som plasseres på <label/> */\n labelId?: string;\n /** Array of main label strings. Can be of type semibold or normal */\n labelTexts: LabelText[];\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: keyof typeof FormMode;\n /** StatusDot placed underneath the last sublabel */\n statusDot?: React.ReactNode;\n /** Sublabel component */\n sublabel?: React.ReactNode;\n /** Adds custom classes to the div wrapping the sublabels. */\n sublabelWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const getLabelText = (label: React.ReactNode): string => {\n let allLabelText = '';\n\n if (isComponent<LabelProps>(label, Label)) {\n label.props.labelTexts.forEach(labelText => {\n allLabelText += !labelText.hideFromScreenReader ? labelText.text : '';\n });\n }\n\n return allLabelText;\n};\n\nexport const renderLabel = (label: React.ReactNode, inputId: string, mode: FormMode): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n })\n : typeof label === 'string' && <Label labelTexts={[{ text: label, type: 'semibold' }]} htmlFor={inputId} mode={mode} />}\n </>\n );\n};\n\nexport const renderLabelAsParent = (\n label: React.ReactNode,\n children: React.ReactNode,\n inputId: string,\n mode: FormMode,\n labelClassName?: string,\n labelTextClassName?: string,\n sublabelWrapperClassName?: string,\n large?: boolean\n): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n children: children,\n labelClassName: cn(labelClassName, label.props.labelClassName),\n labelTextClassName: labelTextClassName,\n sublabelWrapperClassName: sublabelWrapperClassName,\n sublabel: large ? undefined : label.props.sublabel,\n statusDot: large ? undefined : label.props.statusDot,\n })\n : typeof label === 'string' && (\n <Label\n labelTexts={[{ text: label }]}\n htmlFor={inputId}\n mode={mode}\n labelClassName={labelClassName}\n labelTextClassName={labelTextClassName}\n sublabelWrapperClassName={sublabelWrapperClassName}\n >\n {children}\n </Label>\n )}\n </>\n );\n};\n\nconst Label: FunctionComponent<LabelProps> = ({\n afterLabelChildren,\n children,\n className,\n htmlFor,\n labelClassName,\n labelTextClassName,\n labelId,\n labelTexts,\n mode = FormMode.onwhite,\n statusDot,\n sublabel,\n sublabelWrapperClassName,\n testId,\n}) => {\n const hasChildren = children && typeof children !== 'undefined';\n const labelWrapperClasses = cn(\n styles['label-wrapper'],\n { [styles['label-wrapper--no-bottom-margin']]: hasChildren, [styles['label-wrapper--after-label-children']]: afterLabelChildren },\n className\n );\n\n const mapLabels = (): React.ReactNode => {\n return labelTexts.map((labelText, index) => {\n const labelClasses = cn(\n styles.label,\n {\n [styles['label--semibold']]: labelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n },\n labelTextClassName\n );\n return (\n <span aria-hidden={labelText.hideFromScreenReader} className={labelClasses} key={index}>\n {labelText.text}\n </span>\n );\n });\n };\n\n return (\n <div className={labelWrapperClasses}>\n <div>\n <label className={labelClassName} id={labelId} htmlFor={htmlFor} data-testid={testId} data-analyticsid={AnalyticsId.Label}>\n <span className={styles['label-content-wrapper']}>\n {children}\n <span className={styles.label__texts}>{mapLabels()}</span>\n </span>\n </label>\n <div className={sublabelWrapperClassName}>\n {sublabel &&\n isComponent<SublabelProps>(sublabel, Sublabel) &&\n React.cloneElement(sublabel, {\n mode: mode as FormMode,\n })}\n {statusDot && isComponent<StatusDotProps>(statusDot, StatusDot) && (\n <>\n <Spacer size={'3xs'} />\n {React.cloneElement(statusDot, {\n mode: mode === FormMode.ondark ? 'ondark' : 'onwhite',\n })}\n </>\n )}\n </div>\n </div>\n {afterLabelChildren && <div className={styles['after-label-children']}>{afterLabelChildren}</div>}\n </div>\n );\n};\n\nexport default Label;\n"],"names":["Sublabel","className","id","mode","sublabelTexts","testId","mapSublabels","hideFromScreenReader","sublabelText","index","labelClasses","cn","styles","FormMode","jsx","subLabels","ariaHiddenSublabels","jsxs","Fragment","Spacer","AnalyticsId","getLabelText","label","allLabelText","isComponent","Label","labelText","renderLabel","inputId","React","renderLabelAsParent","children","labelClassName","labelTextClassName","sublabelWrapperClassName","large","afterLabelChildren","htmlFor","labelId","labelTexts","statusDot","sublabel","hasChildren","labelWrapperClasses","mapLabels","StatusDot"],"mappings":";;;;;;;;AAuBa,MAAAA,IAAoC,CAAC,EAAE,WAAAC,GAAW,IAAAC,GAAI,MAAAC,GAAM,eAAAC,GAAe,QAAAC,QAAa;AAC7F,QAAAC,IAAe,CAACC,MAElBH,KACAA,EAAc,IAAI,CAACI,GAAcC,MAAU;AACzC,UAAMC,IAAeC,EAAGC,EAAO,OAAOA,EAAO,iBAAiB,GAAG;AAAA,MAC/D,CAACA,EAAO,iBAAiB,CAAC,GAAGJ,EAAa,SAAS;AAAA,MACnD,CAACI,EAAO,gBAAgB,CAAC,GAAGT,MAASU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/jsx-runtime";
|
|
3
|
+
import { lazy as m, useMemo as e, Suspense as I } from "react";
|
|
4
|
+
import { useIsServerSide as x } from "./hooks/useIsServerSide.js";
|
|
5
|
+
import { I as a } from "./Icon.js";
|
|
6
|
+
import { IconSize as l } from "./constants.js";
|
|
7
|
+
const h = (o) => m(() => c(/* @__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/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/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/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/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/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/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/Sexualorientation.tsx": () => import("./components/Icons/Sexualorientation.js"), "../Icons/ShakingHand.tsx": () => import("./components/Icons/ShakingHand.js"), "../Icons/Share.tsx": () => import("./components/Icons/Share.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/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/${o}.tsx`, 3)), A = ({ iconName: o, size: t = l.Small, ...r }) => {
|
|
8
|
+
const i = e(() => h(o), [o]);
|
|
9
|
+
if (x())
|
|
10
|
+
return null;
|
|
11
|
+
const n = /* @__PURE__ */ s(
|
|
12
|
+
"svg",
|
|
13
|
+
{
|
|
14
|
+
"data-testid": "fallback",
|
|
15
|
+
role: "presentation",
|
|
16
|
+
focusable: !1,
|
|
17
|
+
"aria-hidden": !0,
|
|
18
|
+
viewBox: "0 0 48 48",
|
|
19
|
+
style: { minWidth: t, minHeight: t },
|
|
20
|
+
width: t,
|
|
21
|
+
height: t
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ s(p, { fallback: n, reset: o, children: /* @__PURE__ */ s(I, { fallback: n, children: /* @__PURE__ */ s(a, { svgIcon: i, size: t, ...r }) }) });
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
A as L,
|
|
28
|
+
h as l
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=LazyIcon.js.map
|
package/LazyIcon.js.map
ADDED
|
@@ -0,0 +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":["lazyLoadIcon","iconName","lazy","__variableDynamicImportRuntimeHelper","LazyIcon","size","IconSize","rest","icon","useMemo","useIsServerSide","fallback","jsx","ErrorBoundary","Suspense","Icon"],"mappings":";;;;;;AAYa,MAAAA,IAAe,CAACC,MAC3BC,EAAc,MAAMC,EAAkC,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,GAAA,wBAAA,MAAA,OAAA,+BAAA,GAAA,sBAAA,MAAA,OAAA,6BAAA,GAAA,wBAAA,MAAA,OAAA,+BAAA,GAAA,2BAAA,MAAA,OAAA,kCAAA,GAAA,0BAAA,MAAA,OAAA,iCAAA,GAAA,0BAAA,MAAA,OAAA,iCAAA,GAAA,2BAAA,MAAA,OAAA,kCAAA,GAAA,wBAA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S;AAGZ,WAAA;AAGT,QAAMC,IACJ,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUP,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,IAAA;AAAA,EAAA;AAIZ,2BACGQ,GAAc,EAAA,UAAAF,GAAoB,OAAOV,GACxC,4BAACa,GAAS,EAAA,UAAAH,GACR,UAAC,gBAAAC,EAAAG,GAAA,EAAK,SAASP,GAAM,MAAAH,GAAa,GAAGE,EAAM,CAAA,GAC7C,EACF,CAAA;AAEJ;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { _ as e, E as a } from "./ErrorBoundary.js";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { lazy as n, useMemo as m, Suspense as u } from "react";
|
|
4
|
+
import { useIsServerSide as c } from "./hooks/useIsServerSide.js";
|
|
5
|
+
import { I as p } from "./Illustration.js";
|
|
6
|
+
import { g as I } from "./utils.js";
|
|
7
|
+
import { IllustrationSizeList as d } from "./components/Illustrations/IllustrationNames.js";
|
|
8
|
+
const f = (r, t) => {
|
|
9
|
+
const i = d[r], s = I({ size: t, ...i });
|
|
10
|
+
return n(() => e(/* @__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/${s}.tsx`, 3));
|
|
11
|
+
}, H = ({ illustrationName: r, size: t = 512, ...i }) => {
|
|
12
|
+
const s = m(() => f(r, t), [r, t]);
|
|
13
|
+
if (c())
|
|
14
|
+
return null;
|
|
15
|
+
const l = /* @__PURE__ */ o(
|
|
16
|
+
"svg",
|
|
17
|
+
{
|
|
18
|
+
"data-testid": "fallback",
|
|
19
|
+
role: "presentation",
|
|
20
|
+
focusable: !1,
|
|
21
|
+
"aria-hidden": !0,
|
|
22
|
+
viewBox: "0 0 512 512",
|
|
23
|
+
style: { minWidth: t, minHeight: t },
|
|
24
|
+
width: t,
|
|
25
|
+
height: t
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ o(a, { fallback: l, reset: r, children: /* @__PURE__ */ o(u, { fallback: l, children: /* @__PURE__ */ o(p, { illustration: s, size: t, ...i }) }) });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
H as L,
|
|
32
|
+
f as l
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=LazyIllustration.js.map
|
|
@@ -0,0 +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":["lazyLoadIllustration","illustrationName","size","sizes","IllustrationSizeList","illustrationFileName","getIllustration","lazy","__variableDynamicImportRuntimeHelper","LazyIllustration","rest","illustration","useMemo","useIsServerSide","fallback","jsx","ErrorBoundary","Suspense","Illustration"],"mappings":";;;;;;;AAaa,MAAAA,IAAuB,CAACC,GAAoCC,MAA6D;AAC9H,QAAAC,IAAQC,EAAqBH,CAAgB,GAC7CI,IAAuBC,EAAgB,EAAE,MAAAJ,GAAM,GAAGC,EAAO,CAAA;AAE/D,SAAOI,EAAsB,MAAMC,EAAA,uBAAA,OAAA,EAAA,+BAAA,MAAA,OAAA,sCAAA,GAAA,qCAAA,MAAA,OAAA,4CAAA,GAAA,oCAAA,MAAA,OAAA,2CAAA,GAAA,qDAAA,MAAA,OAAA,4DAAA,GAAA,2DAAA,MAAA,OAAA,kEAAA,GAAA,4CAAA,MAAA,OAAA,mDAAA,GAAA,kDAAA,MAAA,OAA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