@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys/color';\n\ntype LogoColor = 'black' | 'white';\n\nexport interface LogoProps {\n /** Changes the size of the logo. */\n size?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /**\tChanges the color of the logo. */\n color?: LogoColor;\n /** Changes to the byline variant of the logo. */\n byline?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Logo: React.FC<LogoProps> = ({ size = 300, color = 'black', byline = false, className, testId }) => {\n const uuid = useUuid();\n\n if (byline) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n role={'img'}\n aria-labelledby={uuid}\n viewBox=\"0 0 87 12\"\n className={className}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Logo}\n >\n <title id={uuid}>{'Helsenorge'}</title>\n <g fill={getCol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 1.6.7 1.6 1.6 0 1-.7 1.7-1.6 1.7zM30.4 3.7c-.7-.2-1.4-.5-1.4-1s.4-.7 1-.7.9.5.9.9V3h1.7v-.1c0-1.3-1.1-2.2-2.6-2.2-1.6 0-2.6.8-2.6 2.1 0 1.5 1.3 1.9 2.4 2.3.7.2 1.4.4 1.4.9s-.3.8-1.1.8c-.7 0-1.1-.4-1.1-1v-.1h-1.7v.1c0 1.5 1.1 2.4 2.8 2.4 1.7 0 2.7-.8 2.7-2.2-.1-1.5-1.4-2-2.4-2.3z\" />\n </g>\n </svg>\n );\n }\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n role={'img'}\n aria-labelledby={uuid}\n viewBox=\"0 0 502 220\"\n className={className}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Logo}\n >\n <title id={uuid}>{'Helsenorge'}</title>\n <g fill={getColor(color)}>\n <path d=\"M39.8 2.5v26.9H17V2.5H1v69.9h16V43.6h22.8v28.8h16.1V2.5zM250.3 58.6V2.5h-16v69.9h43.5V58.6zM142.9 122.5c-16.1 0-27.4 13.6-27.4 33.1s11.2 33.1 27.4 33.1 27.4-13.6 27.4-33.1-11.3-33.1-27.4-33.1zm19 33.1c0 11.9-5 25.9-19 25.9s-19-13.9-19-25.9c0-11.9 5-25.9 19-25.9s19 14 19 25.9zM501 40c0-19.1-11.1-32.4-27-32.4-16.4 0-27.4 13.3-27.4 33.1 0 19.5 11.5 33.1 28 33.1 12.2 0 21.4-6 24.7-16.2l.5-1.6h-8.3l-.3.7c-2.8 6.2-8.8 9.8-16.6 9.8-12.9 0-18.5-11.5-19.5-22.7H501V40zm-8.3-3.2h-37.6c1-10.8 6.5-21.9 18.9-21.9 13.2 0 18.3 12.6 18.7 21.9zM30.4 122.4c-10.8 0-16.6 6.7-19.5 11.8v-9.9H3.3v62.6h8.1v-31.4c0-8.4 4.4-25.7 18.1-25.7 14 0 15.9 12 15.9 25v32.1h8.1v-32.1c.1-16.1-2.7-32.4-23.1-32.4zM134.3 59V43H157V30h-22.7V15.9H165V2.5h-46.4v69.9h47.3V59zM466.7 173.4v-16h22.7v-13h-22.7v-14.1h30.7v-13.4H451v69.9h47.3v-13.4zM246.7 140.5v-16.3h-7.6v62.6h8.1v-37.6l27.3-19.6v-9zM393.5 120.6l-14.7 10.5c-4.4-5.6-11.2-8.7-18.8-8.7-13.6 0-23.6 9.8-23.6 23.3 0 10.6 6.2 19.1 16 22.2l-16 17.5c-4 4.6-5.7 8.3-5.7 12.7 0 12.6 11.1 20.7 28.2 20.7 16.9 0 28.3-8.3 28.3-20.7 0-12.5-11.1-20.6-28.3-20.6-1.7 0-3.9.2-5.6.5l8-9c12.9-.7 22.2-10.4 22.2-23.3 0-2.8-.4-5.5-1.2-7.8 0-.1-.1-.2-.1-.3l11.2-8.1v-8.9zm-34.4 64.2c12.1 0 20 5.2 20 13.4s-7.8 13.5-20 13.5c-12.1 0-19.9-5.3-19.9-13.5 0-7.8 8.3-13.4 19.9-13.4zm.9-23c-8.8 0-15.2-6.8-15.2-16 0-9.3 6.4-16 15.2-16s15.2 6.7 15.2 16c0 9.2-6.4 16-15.2 16zM366.7 30.3c-6.6-2.3-13.5-4.7-13.5-9.2 0-4.8 4.2-7 9.3-7 5.4 0 9 4.5 9 8.5v.8h16.2v-.6c0-13-10.2-21.7-25.4-21.7-15.3 0-24.9 7.8-24.9 20.4 0 14.7 13.1 18.4 22.9 21.9 6.5 2.4 13.6 4.3 13.6 8.7 0 4.6-3.4 8-10.6 8-6.5 0-10.9-3.8-10.9-9.4v-.8h-16.7v.8c0 14.5 10.3 23.1 27.5 23.1 16.5 0 26-7.6 26-21.5 0-14.4-12.5-18.5-22.5-22z\" />\n </g>\n </svg>\n );\n};\n\nexport default Logo;\n"],"names":["Logo","size","color","byline","className","testId","uuid","useUuid","React","AnalyticsId","getColor"],"mappings":";;;;AAqBM,MAAAA,IAA4B,CAAC,EAAE,MAAAC,IAAO,KAAK,OAAAC,IAAQ,SAAS,QAAAC,IAAS,IAAO,WAAAC,GAAW,QAAAC,QAAa;AACxG,QAAMC,IAAOC;AAEb,SAAIJ,IAEAK,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAOP;AAAA,MACP,MAAM;AAAA,MACN,mBAAiBK;AAAA,MACjB,SAAQ;AAAA,MACR,WAAAF;AAAA,MACA,eAAaC;AAAA,MACb,oBAAkBI,EAAY;AAAA,IAAA;AAAA,IAE7BD,gBAAAA,EAAA,cAAA,SAAA,EAAM,IAAIF,EAAA,GAAO,YAAa;AAAA,IAC/BE,gBAAAA,EAAA,cAAC,KAAE,EAAA,MAAME,EAASR,CAAK,KACpBM,gBAAAA,EAAA,cAAA,QAAA,EAAK,GAAE,wxCAAwxC,CAAA,CAClyC;AAAA,EAAA,IAMJA,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAOP;AAAA,MACP,MAAM;AAAA,MACN,mBAAiBK;AAAA,MACjB,SAAQ;AAAA,MACR,WAAAF;AAAA,MACA,eAAaC;AAAA,MACb,oBAAkBI,EAAY;AAAA,IAAA;AAAA,IAE7BD,gBAAAA,EAAA,cAAA,SAAA,EAAM,IAAIF,EAAA,GAAO,YAAa;AAAA,IAC/BE,gBAAAA,EAAA,cAAC,KAAE,EAAA,MAAME,EAASR,CAAK,KACpBM,gBAAAA,EAAA,cAAA,QAAA,EAAK,GAAE,gqDAAgqD,CAAA,CAC1qD;AAAA,EAAA;AAGN;"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import l from "react";
|
|
2
|
-
import n from "classnames";
|
|
3
|
-
import { FormMode as f } from "../../constants.js";
|
|
4
|
-
import a from "../MaxCharacters/styles.module.scss";
|
|
5
|
-
const x = ({ maxCharacters: r, maxText: e, length: t, mode: s, maxWidth: c }) => {
|
|
6
|
-
const o = t / r, m = n(a["max-characters"], {
|
|
7
|
-
[a["max-characters--on-dark"]]: s === f.ondark,
|
|
8
|
-
[a["max-characters--invalid"]]: o > 1
|
|
9
|
-
}), i = o > 0.95 ? "polite" : "off";
|
|
10
|
-
return /* @__PURE__ */ l.createElement("div", { "aria-live": i, "aria-atomic": "true", className: m, style: { maxWidth: c } }, `${t}/${r} ${e || "tegn"}`);
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
x as default
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=MaxCharacters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MaxCharacters.js","sources":["../../../src/components/MaxCharacters/MaxCharacters.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { FormMode } from '../../constants';\n\nimport styles from './styles.module.scss';\n\ninterface MaxCharactersProps {\n /** Current input length */\n length: number;\n /** max character limit in textarea */\n maxCharacters: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n /** Changes the visuals of the textarea */\n mode?: keyof typeof FormMode;\n /** Max width of the component */\n maxWidth?: string;\n}\n\nconst MaxCharacters: React.FC<MaxCharactersProps> = ({ maxCharacters, maxText, length, mode, maxWidth }) => {\n const progress = length / maxCharacters;\n\n const counterTextClass = classNames(styles['max-characters'], {\n [styles[`max-characters--on-dark`]]: mode === FormMode.ondark,\n [styles[`max-characters--invalid`]]: progress > 1,\n });\n\n const ariaLevel = progress > 0.95 ? 'polite' : 'off';\n\n return (\n <div aria-live={ariaLevel} aria-atomic={'true'} className={counterTextClass} style={{ maxWidth }}>\n {`${length}/${maxCharacters} ${maxText ? maxText : 'tegn'}`}\n </div>\n );\n};\n\nexport default MaxCharacters;\n"],"names":["MaxCharacters","maxCharacters","maxText","length","mode","maxWidth","progress","counterTextClass","classNames","styles","FormMode","ariaLevel","React"],"mappings":";;;;AAqBM,MAAAA,IAA8C,CAAC,EAAE,eAAAC,GAAe,SAAAC,GAAS,QAAAC,GAAQ,MAAAC,GAAM,UAAAC,QAAe;AAC1G,QAAMC,IAAWH,IAASF,GAEpBM,IAAmBC,EAAWC,EAAO,gBAAgB,GAAG;AAAA,IAC5D,CAACA,EAAO,yBAAyB,CAAC,GAAGL,MAASM,EAAS;AAAA,IACvD,CAACD,EAAO,yBAAyB,CAAC,GAAGH,IAAW;AAAA,EAAA,CACjD,GAEKK,IAAYL,IAAW,OAAO,WAAW;AAG7C,SAAAM,gBAAAA,EAAA,cAAC,SAAI,aAAWD,GAAW,eAAa,QAAQ,WAAWJ,GAAkB,OAAO,EAAE,UAAAF,OACnF,GAAGF,CAAM,IAAIF,CAAa,IAAIC,KAAoB,MAAM,EAC3D;AAEJ;"}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import t, { useEffect as k } from "react";
|
|
2
|
-
import o from "classnames";
|
|
3
|
-
import { ZIndex as H, AnalyticsId as K, IconSize as d } from "../../constants.js";
|
|
4
|
-
import { useFocusTrap as O } from "../../hooks/useFocusTrap.js";
|
|
5
|
-
import { useIsVisible as L } from "../../hooks/useIsVisible.js";
|
|
6
|
-
import { palette as v } from "../../theme/palette.js";
|
|
7
|
-
import { uuid as D } from "../../utils/uuid.js";
|
|
8
|
-
import S from "../Button/Button.js";
|
|
9
|
-
import V from "../Close/Close.js";
|
|
10
|
-
import { Icon as E } from "../Icon/Icon.js";
|
|
11
|
-
import Z from "../Icons/AlertSignFill.js";
|
|
12
|
-
import j from "../Icons/AlertSignStroke.js";
|
|
13
|
-
import q from "../Icons/CheckOutline.js";
|
|
14
|
-
import G from "../Portal/index.js";
|
|
15
|
-
import { Title as J } from "../Title/Title.js";
|
|
16
|
-
import a from "../Modal/styles.module.scss";
|
|
17
|
-
var M = /* @__PURE__ */ ((e) => (e.normal = "normal", e.warning = "warning", e.error = "error", e.success = "success", e.image = "image", e))(M || {}), Q = /* @__PURE__ */ ((e) => (e.large = "large", e.medium = "medium", e))(Q || {});
|
|
18
|
-
const U = (e) => e === "error" ? /* @__PURE__ */ t.createElement(E, { size: d.Small, svgIcon: Z, color: v.cherry500 }) : e === "warning" ? /* @__PURE__ */ t.createElement(E, { size: d.Small, svgIcon: j, color: v.black }) : e === "success" ? /* @__PURE__ */ t.createElement(E, { size: d.Small, svgIcon: q, color: v.kiwi900 }) : null, X = (e, n) => {
|
|
19
|
-
const m = U(e);
|
|
20
|
-
return m ? /* @__PURE__ */ t.createElement("div", { className: a.modal__iconWrapper }, m) : n ? /* @__PURE__ */ t.createElement("div", { className: a.modal__iconWrapper }, t.cloneElement(n, {
|
|
21
|
-
size: d.Small
|
|
22
|
-
})) : null;
|
|
23
|
-
}, fe = (e) => {
|
|
24
|
-
var I, B;
|
|
25
|
-
const {
|
|
26
|
-
variant: n = "normal",
|
|
27
|
-
primaryButtonText: m = "OK",
|
|
28
|
-
titleId: W = D(),
|
|
29
|
-
className: x = "",
|
|
30
|
-
size: c = "large",
|
|
31
|
-
zIndex: T = H.Modal
|
|
32
|
-
} = e, b = t.useRef(null), s = t.useRef(null), u = t.useRef(null);
|
|
33
|
-
O(u, !0);
|
|
34
|
-
const R = L(b), g = t.useRef(null), z = L(g), r = s.current && s.current.scrollHeight > s.current.clientHeight;
|
|
35
|
-
function y(l) {
|
|
36
|
-
l.key === "Escape" && e.onClose && (l.stopPropagation(), e.onClose());
|
|
37
|
-
}
|
|
38
|
-
function C(l) {
|
|
39
|
-
l.target && _.current === l.target && e.onClose && (l.stopPropagation(), e.onClose());
|
|
40
|
-
}
|
|
41
|
-
function $() {
|
|
42
|
-
document.body.style.overflow = "hidden";
|
|
43
|
-
}
|
|
44
|
-
function A() {
|
|
45
|
-
document.body.style.removeProperty("overflow");
|
|
46
|
-
}
|
|
47
|
-
const i = n === "image", _ = t.useRef(null), h = e.secondaryButtonText && ((I = e.secondaryButtonText) == null ? void 0 : I.length) > 0 || e.onSuccess, N = e.ariaLabelledBy ? void 0 : e.ariaLabel, f = e.ariaLabelledBy ? e.ariaLabelledBy : e.ariaLabel ? void 0 : W;
|
|
48
|
-
k(() => {
|
|
49
|
-
const l = _.current;
|
|
50
|
-
return $(), !e.disableCloseEvents && l && (l.addEventListener("keydown", y), l.addEventListener("click", C)), () => {
|
|
51
|
-
A(), !e.disableCloseEvents && l && (l.removeEventListener("keydown", y), l.removeEventListener("click", C));
|
|
52
|
-
};
|
|
53
|
-
}, [e.disableCloseEvents]), k(() => {
|
|
54
|
-
var l;
|
|
55
|
-
(l = u.current) == null || l.focus();
|
|
56
|
-
}, []);
|
|
57
|
-
const P = o(
|
|
58
|
-
x,
|
|
59
|
-
a.modal,
|
|
60
|
-
n && a[`modal--${n}`],
|
|
61
|
-
c && a[`modal--${c}`],
|
|
62
|
-
r && !h && a["modal--no-actions"]
|
|
63
|
-
), F = o({
|
|
64
|
-
[a["modal__title--error"]]: n === "error",
|
|
65
|
-
[a["modal__title--success"]]: n === "success"
|
|
66
|
-
/* success */
|
|
67
|
-
}), w = /* @__PURE__ */ t.createElement("div", { "data-testid": "dialog-container" }, /* @__PURE__ */ t.createElement(
|
|
68
|
-
"div",
|
|
69
|
-
{
|
|
70
|
-
ref: _,
|
|
71
|
-
className: a["modal-overlay"],
|
|
72
|
-
"data-testid": e.testId,
|
|
73
|
-
"data-analyticsid": K.Modal,
|
|
74
|
-
style: { zIndex: T }
|
|
75
|
-
},
|
|
76
|
-
/* @__PURE__ */ t.createElement("div", { className: a.align }, /* @__PURE__ */ t.createElement(
|
|
77
|
-
"div",
|
|
78
|
-
{
|
|
79
|
-
className: P,
|
|
80
|
-
role: "dialog",
|
|
81
|
-
"aria-modal": "true",
|
|
82
|
-
tabIndex: -1,
|
|
83
|
-
"aria-label": N,
|
|
84
|
-
"aria-labelledby": f,
|
|
85
|
-
ref: u
|
|
86
|
-
},
|
|
87
|
-
/* @__PURE__ */ t.createElement(
|
|
88
|
-
"div",
|
|
89
|
-
{
|
|
90
|
-
className: o(a.modal__shadow, a["modal__shadow--top"], {
|
|
91
|
-
[a["modal__shadow--show"]]: !R && r
|
|
92
|
-
})
|
|
93
|
-
}
|
|
94
|
-
),
|
|
95
|
-
/* @__PURE__ */ t.createElement(
|
|
96
|
-
"div",
|
|
97
|
-
{
|
|
98
|
-
className: o(a.modal__contentWrapper, {
|
|
99
|
-
[a["modal__contentWrapper--image"]]: i
|
|
100
|
-
}),
|
|
101
|
-
tabIndex: r ? 0 : void 0,
|
|
102
|
-
role: r ? "region" : void 0,
|
|
103
|
-
"aria-label": r ? N : void 0,
|
|
104
|
-
"aria-labelledby": r ? f : void 0,
|
|
105
|
-
ref: s
|
|
106
|
-
},
|
|
107
|
-
!e.noCloseButton && /* @__PURE__ */ t.createElement("div", { className: a.modal__closeWrapper }, /* @__PURE__ */ t.createElement("div", { className: o(a.modal__closeWrapper__close) }, /* @__PURE__ */ t.createElement(V, { onClick: e.onClose, ariaLabel: e.ariaLabelCloseBtn }))),
|
|
108
|
-
/* @__PURE__ */ t.createElement(
|
|
109
|
-
"div",
|
|
110
|
-
{
|
|
111
|
-
className: o(c && a[`modal__contentWrapper__scroll--${c}`], {
|
|
112
|
-
[a["modal__contentWrapper__scroll--image"]]: i
|
|
113
|
-
})
|
|
114
|
-
},
|
|
115
|
-
/* @__PURE__ */ t.createElement("div", { ref: b }),
|
|
116
|
-
/* @__PURE__ */ t.createElement("div", { className: a.modal__contentWrapper__title }, X(n, e.icon), /* @__PURE__ */ t.createElement(J, { id: f, htmlMarkup: "h3", appearance: "title3", className: F }, e.title), e.afterTitleChildren && /* @__PURE__ */ t.createElement("div", { className: a.modal__afterTitleChildren }, e.afterTitleChildren)),
|
|
117
|
-
i && /* @__PURE__ */ t.createElement("div", null, /* @__PURE__ */ t.createElement("div", { className: a.modal__contentWrapper__imageWrapper }, e.children), /* @__PURE__ */ t.createElement("span", { className: a.modal__contentWrapper__imageDescription }, e.description)),
|
|
118
|
-
!i && e.children && /* @__PURE__ */ t.createElement("div", null, e.children),
|
|
119
|
-
!i && !e.children && /* @__PURE__ */ t.createElement("p", { className: a.modal__description }, e.description),
|
|
120
|
-
/* @__PURE__ */ t.createElement("div", { ref: g })
|
|
121
|
-
)
|
|
122
|
-
),
|
|
123
|
-
/* @__PURE__ */ t.createElement(
|
|
124
|
-
"div",
|
|
125
|
-
{
|
|
126
|
-
className: o(a.modal__shadow, a["modal__shadow--bottom"], {
|
|
127
|
-
[a["modal__shadow--show"]]: !z && r
|
|
128
|
-
})
|
|
129
|
-
}
|
|
130
|
-
),
|
|
131
|
-
h && /* @__PURE__ */ t.createElement("div", { className: o(a["modal__call-to-action"], c && a[`modal__call-to-action--${c}`]) }, e.onSuccess && /* @__PURE__ */ t.createElement(S, { onClick: e.onSuccess }, m), e.secondaryButtonText && ((B = e.secondaryButtonText) == null ? void 0 : B.length) > 0 && /* @__PURE__ */ t.createElement(S, { variant: "borderless", onClick: e.onClose }, e.secondaryButtonText))
|
|
132
|
-
))
|
|
133
|
-
));
|
|
134
|
-
if (e.printable) {
|
|
135
|
-
const l = "print-modal";
|
|
136
|
-
return /* @__PURE__ */ t.createElement(G, { className: l, testId: "print-modal" }, /* @__PURE__ */ t.createElement("style", { media: "print" }, `body > *:not(.${l}) {display: none;}`), w);
|
|
137
|
-
}
|
|
138
|
-
return w;
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
Q as ModalSize,
|
|
142
|
-
M as ModalVariants,
|
|
143
|
-
fe as default
|
|
144
|
-
};
|
|
145
|
-
//# sourceMappingURL=Modal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.js","sources":["../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId, ZIndex } from '../../constants';\nimport useFocusTrap from '../../hooks/useFocusTrap';\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { palette } from '../../theme/palette';\nimport { uuid } from '../../utils/uuid';\nimport Button from '../Button';\nimport Close from '../Close';\nimport Icon, { IconSize } from '../Icon';\nimport AlertSignFill from '../Icons/AlertSignFill';\nimport AlertSignStroke from '../Icons/AlertSignStroke';\nimport CheckOutline from '../Icons/CheckOutline';\nimport Portal from '../Portal';\nimport Title from '../Title/Title';\n\nimport styles from './styles.module.scss';\n\nexport enum ModalVariants {\n normal = 'normal',\n warning = 'warning',\n error = 'error',\n success = 'success',\n image = 'image',\n}\n\nexport enum ModalSize {\n large = 'large',\n medium = 'medium',\n}\n\nexport interface ModalProps {\n /** Title of the modal */\n title: string;\n /** id of the modal title */\n titleId?: string;\n /** Description of the modal. Will not render if the modal has children. */\n description?: string;\n /** Changes the visual representation of the modal */\n variant?: keyof typeof ModalVariants;\n /** Change width of the modal (default: large) */\n size?: keyof typeof ModalSize;\n /** Icon displayed in title */\n icon?: React.ReactElement;\n /** Hides the close button */\n noCloseButton?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Primary button text */\n primaryButtonText?: string;\n /** Secondary button text */\n secondaryButtonText?: string;\n /** Sets the aria-label of the modal */\n ariaLabel?: string;\n /** Sets the aria-labelledby of the modal */\n ariaLabelledBy?: string;\n /** Close button aria-label */\n ariaLabelCloseBtn?: string;\n /** Alternative component to modal */\n children?: React.ReactNode;\n /** Component shown after title */\n afterTitleChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Customize the z-index of the modal */\n zIndex?: number;\n /** Function is called when user clicks primary button */\n onSuccess?: () => void;\n /** Function is called when user clicks secondary button, clicks escape or outside the modal */\n onClose?: () => void;\n /** When enabled the component will be rendered in the bottom of document.body */\n printable?: boolean;\n /** If disabled, clicking escape or outside the modal will not close it */\n disableCloseEvents?: boolean;\n}\n\nconst getVariantIcon = (variant?: ModalProps['variant']): JSX.Element | null => {\n if (variant === ModalVariants.error) {\n return <Icon size={IconSize.Small} svgIcon={AlertSignFill} color={palette.cherry500} />;\n } else if (variant === ModalVariants.warning) {\n return <Icon size={IconSize.Small} svgIcon={AlertSignStroke} color={palette.black} />;\n } else if (variant === ModalVariants.success) {\n return <Icon size={IconSize.Small} svgIcon={CheckOutline} color={palette.kiwi900} />;\n }\n return null;\n};\n\nconst getIcon = (variant?: ModalProps['variant'], icon?: ModalProps['icon']): JSX.Element | null => {\n const variantIcon = getVariantIcon(variant);\n if (variantIcon) {\n return <div className={styles.modal__iconWrapper}>{variantIcon}</div>;\n }\n if (icon) {\n return (\n <div className={styles.modal__iconWrapper}>\n {React.cloneElement(icon, {\n size: IconSize.Small,\n })}\n </div>\n );\n }\n return null;\n};\n\nconst Modal: React.FC<ModalProps> = props => {\n const {\n variant = ModalVariants.normal,\n primaryButtonText = 'OK',\n titleId = uuid(),\n className = '',\n size = ModalSize.large,\n zIndex = ZIndex.Modal,\n } = props;\n\n const topContent = React.useRef<HTMLDivElement>(null);\n const modalContentRef = React.useRef<HTMLDivElement>(null);\n const dialogRef = React.useRef<HTMLDivElement>(null);\n useFocusTrap(dialogRef, true);\n const topContentVisible = useIsVisible(topContent);\n const bottomContent = React.useRef<HTMLDivElement>(null);\n const bottomContentVisible = useIsVisible(bottomContent);\n const contentIsScrollable = modalContentRef.current && modalContentRef.current.scrollHeight > modalContentRef.current.clientHeight;\n\n function handleKeyboardEvent(e: KeyboardEvent): void {\n if (e.key === 'Escape' && props.onClose) {\n e.stopPropagation();\n props.onClose();\n }\n }\n\n function handleClickEvent(event: MouseEvent): void {\n if (event.target && overlayRef.current === event.target && props.onClose) {\n event.stopPropagation();\n props.onClose();\n }\n }\n\n function disableBodyScroll(): void {\n document.body.style.overflow = 'hidden';\n }\n\n function enableBodyScroll(): void {\n document.body.style.removeProperty('overflow');\n }\n\n /* Displays a full window size modal with image */\n const imageView = variant === ModalVariants.image;\n\n const overlayRef = React.useRef<HTMLDivElement>(null);\n\n const showActions = (props.secondaryButtonText && props.secondaryButtonText?.length > 0) || props.onSuccess;\n\n // ariaLabelledBy prioriteres over ariaLabel, men dersom ariaLabel brukes trengs ikke ariaLabelledBy\n const ariaLabel = !props.ariaLabelledBy ? props.ariaLabel : undefined;\n const ariaLabelledBy = props.ariaLabelledBy ? props.ariaLabelledBy : !props.ariaLabel ? titleId : undefined;\n\n useEffect(() => {\n const overlayElement = overlayRef.current;\n disableBodyScroll();\n if (!props.disableCloseEvents && overlayElement) {\n overlayElement.addEventListener('keydown', handleKeyboardEvent);\n overlayElement.addEventListener('click', handleClickEvent);\n }\n return (): void => {\n enableBodyScroll();\n if (!props.disableCloseEvents && overlayElement) {\n overlayElement.removeEventListener('keydown', handleKeyboardEvent);\n overlayElement.removeEventListener('click', handleClickEvent);\n }\n };\n }, [props.disableCloseEvents]);\n\n useEffect(() => {\n dialogRef.current?.focus();\n }, []);\n\n const dialogClasses = cn(\n className,\n styles.modal,\n variant && styles[`modal--${variant}`],\n size && styles[`modal--${size}`],\n contentIsScrollable && !showActions && styles['modal--no-actions']\n );\n\n const titleClasses = cn({\n [styles['modal__title--error']]: variant === ModalVariants.error,\n [styles['modal__title--success']]: variant === ModalVariants.success,\n });\n\n const Component = (\n <div data-testid=\"dialog-container\">\n <div\n ref={overlayRef}\n className={styles['modal-overlay']}\n data-testid={props.testId}\n data-analyticsid={AnalyticsId.Modal}\n style={{ zIndex }}\n >\n <div className={styles.align}>\n <div\n className={dialogClasses}\n role=\"dialog\"\n aria-modal=\"true\"\n tabIndex={-1}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n ref={dialogRef}\n >\n <div\n className={cn(styles['modal__shadow'], styles['modal__shadow--top'], {\n [styles['modal__shadow--show']]: !topContentVisible && contentIsScrollable,\n })}\n />\n <div\n className={cn(styles.modal__contentWrapper, {\n [styles['modal__contentWrapper--image']]: imageView,\n })}\n tabIndex={contentIsScrollable ? 0 : undefined}\n role={contentIsScrollable ? 'region' : undefined}\n aria-label={contentIsScrollable ? ariaLabel : undefined}\n aria-labelledby={contentIsScrollable ? ariaLabelledBy : undefined}\n ref={modalContentRef}\n >\n {!props.noCloseButton && (\n <div className={styles.modal__closeWrapper}>\n <div className={cn(styles.modal__closeWrapper__close)}>\n <Close onClick={props.onClose} ariaLabel={props.ariaLabelCloseBtn} />\n </div>\n </div>\n )}\n <div\n className={cn(size && styles[`modal__contentWrapper__scroll--${size}`], {\n [styles['modal__contentWrapper__scroll--image']]: imageView,\n })}\n >\n <div ref={topContent} />\n <div className={styles.modal__contentWrapper__title}>\n {getIcon(variant, props.icon)}\n <Title id={ariaLabelledBy} htmlMarkup=\"h3\" appearance=\"title3\" className={titleClasses}>\n {props.title}\n </Title>\n {props.afterTitleChildren && <div className={styles['modal__afterTitleChildren']}>{props.afterTitleChildren}</div>}\n </div>\n {imageView && (\n <div>\n <div className={styles['modal__contentWrapper__imageWrapper']}>{props.children}</div>\n <span className={styles['modal__contentWrapper__imageDescription']}>{props.description}</span>\n </div>\n )}\n {!imageView && props.children && <div>{props.children}</div>}\n {!imageView && !props.children && <p className={styles.modal__description}>{props.description}</p>}\n <div ref={bottomContent} />\n </div>\n </div>\n <div\n className={cn(styles['modal__shadow'], styles['modal__shadow--bottom'], {\n [styles['modal__shadow--show']]: !bottomContentVisible && contentIsScrollable,\n })}\n />\n {showActions && (\n <div className={cn(styles['modal__call-to-action'], size && styles[`modal__call-to-action--${size}`])}>\n {props.onSuccess && <Button onClick={props.onSuccess}>{primaryButtonText}</Button>}\n {props.secondaryButtonText && props.secondaryButtonText?.length > 0 && (\n <Button variant=\"borderless\" onClick={props.onClose}>\n {props.secondaryButtonText}\n </Button>\n )}\n </div>\n )}\n </div>\n </div>\n </div>\n </div>\n );\n\n if (props.printable) {\n const printModal = 'print-modal';\n return (\n <Portal className={printModal} testId=\"print-modal\">\n <style media=\"print\">{`body > *:not(.${printModal}) {display: none;}`}</style>\n {Component}\n </Portal>\n );\n }\n\n return Component;\n};\n\nexport default Modal;\n"],"names":["ModalVariants","ModalSize","getVariantIcon","variant","React","Icon","IconSize","AlertSignFill","palette","AlertSignStroke","CheckOutline","getIcon","icon","variantIcon","styles","Modal","props","primaryButtonText","titleId","uuid","className","size","zIndex","ZIndex","topContent","modalContentRef","dialogRef","useFocusTrap","topContentVisible","useIsVisible","bottomContent","bottomContentVisible","contentIsScrollable","handleKeyboardEvent","e","handleClickEvent","event","overlayRef","disableBodyScroll","enableBodyScroll","imageView","showActions","_a","ariaLabel","ariaLabelledBy","useEffect","overlayElement","dialogClasses","cn","titleClasses","Component","AnalyticsId","Close","Title","Button","_b","printModal","Portal"],"mappings":";;;;;;;;;;;;;;;;AAoBY,IAAAA,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,QAAQ,SACRA,EAAA,UAAU,WACVA,EAAA,QAAQ,SALEA,IAAAA,KAAA,CAAA,CAAA,GAQAC,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UAFCA,IAAAA,KAAA,CAAA,CAAA;AAkDZ,MAAMC,IAAiB,CAACC,MAClBA,MAAY,UACPC,gBAAAA,EAAA,cAACC,KAAK,MAAMC,EAAS,OAAO,SAASC,GAAe,OAAOC,EAAQ,UAAW,CAAA,IAC5EL,MAAY,YACdC,gBAAAA,EAAA,cAACC,KAAK,MAAMC,EAAS,OAAO,SAASG,GAAiB,OAAOD,EAAQ,MAAO,CAAA,IAC1EL,MAAY,YACdC,gBAAAA,EAAA,cAACC,KAAK,MAAMC,EAAS,OAAO,SAASI,GAAc,OAAOF,EAAQ,QAAS,CAAA,IAE7E,MAGHG,IAAU,CAACR,GAAiCS,MAAkD;AAC5F,QAAAC,IAAcX,EAAeC,CAAO;AAC1C,SAAIU,IACMT,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAWU,EAAO,sBAAqBD,CAAY,IAE7DD,oCAEC,OAAI,EAAA,WAAWE,EAAO,sBACpBV,EAAM,aAAaQ,GAAM;AAAA,IACxB,MAAMN,EAAS;AAAA,EAChB,CAAA,CACH,IAGG;AACT,GAEMS,KAA8B,CAASC,MAAA;;AACrC,QAAA;AAAA,IACJ,SAAAb,IAAU;AAAA,IACV,mBAAAc,IAAoB;AAAA,IACpB,SAAAC,IAAUC,EAAK;AAAA,IACf,WAAAC,IAAY;AAAA,IACZ,MAAAC,IAAO;AAAA,IACP,QAAAC,IAASC,EAAO;AAAA,EACd,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WD,GAAY,QAAO,cACpC,GAAApD,gBAAAA,EAAA,cAAC,SAAM,EAAA,OAAM,QAAS,GAAA,iBAAiBoD,CAAU,oBAAqB,GACrEN,CACH;AAAA,EAEJ;AAEO,SAAAA;AACT;"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import l from "classnames";
|
|
3
|
-
import { AnalyticsId as R, IconSize as C } from "../../constants.js";
|
|
4
|
-
import { useUuid as T } from "../../hooks/useUuid.js";
|
|
5
|
-
import { getColor as F } from "../../theme/currys/color.js";
|
|
6
|
-
import { getAriaLabelAttributes as V } from "../../utils/accessibility.js";
|
|
7
|
-
import $ from "../Badge/NotificationBadge.js";
|
|
8
|
-
import H from "../Close/Close.js";
|
|
9
|
-
import M from "../Expander/Expander.js";
|
|
10
|
-
import e from "../NotificationPanel/styles.module.scss";
|
|
11
|
-
const U = ({ fluid: c, children: r }) => {
|
|
12
|
-
if (c) {
|
|
13
|
-
const i = l(e["fluid-wrapper"]);
|
|
14
|
-
return /* @__PURE__ */ t.createElement("div", { className: i }, r);
|
|
15
|
-
}
|
|
16
|
-
return r;
|
|
17
|
-
}, Z = t.forwardRef((c, r) => {
|
|
18
|
-
const {
|
|
19
|
-
children: i,
|
|
20
|
-
variant: s = "info",
|
|
21
|
-
dismissable: m = !1,
|
|
22
|
-
onClick: E,
|
|
23
|
-
expanderChildren: o,
|
|
24
|
-
expanderButtonText: d,
|
|
25
|
-
expanderButtonClosedText: f,
|
|
26
|
-
expanderOpenFromStart: N = !1,
|
|
27
|
-
compactVariant: a,
|
|
28
|
-
label: n,
|
|
29
|
-
labelHtmlMarkup: h = "h1",
|
|
30
|
-
fluid: v = !1,
|
|
31
|
-
size: u,
|
|
32
|
-
className: I,
|
|
33
|
-
labelId: S,
|
|
34
|
-
role: g,
|
|
35
|
-
testId: w
|
|
36
|
-
} = c, p = T(S), A = () => {
|
|
37
|
-
const b = a === "outline", k = l(e["notification-panel__content"]), y = l(e["notification-panel__label"], {
|
|
38
|
-
[e["notification-panel__label--no-content"]]: !i && !o,
|
|
39
|
-
[e["notification-panel__label--compact"]]: !!a,
|
|
40
|
-
[e["notification-panel__label--outline"]]: b
|
|
41
|
-
}), z = l(e["notification-panel__children"], {
|
|
42
|
-
[e["notification-panel__children--with-label"]]: n,
|
|
43
|
-
[e["notification-panel__children--expander-no-label"]]: o && !n,
|
|
44
|
-
[e["notification-panel__children--outline"]]: b
|
|
45
|
-
}), O = h, [x, P] = t.useState(N);
|
|
46
|
-
return /* @__PURE__ */ t.createElement("div", { className: k, id: n ? void 0 : p }, n && /* @__PURE__ */ t.createElement(O, { className: y, id: p }, n), i && /* @__PURE__ */ t.createElement("div", { className: z }, i), o && d && f && !a && /* @__PURE__ */ t.createElement(
|
|
47
|
-
M,
|
|
48
|
-
{
|
|
49
|
-
title: x ? d : f,
|
|
50
|
-
onExpand: P,
|
|
51
|
-
expanded: x,
|
|
52
|
-
testId: "expand"
|
|
53
|
-
},
|
|
54
|
-
o
|
|
55
|
-
));
|
|
56
|
-
}, B = l(
|
|
57
|
-
e["notification-panel"],
|
|
58
|
-
e[`notification-panel--${s}`],
|
|
59
|
-
u && e[`notification-panel--${u}`],
|
|
60
|
-
{
|
|
61
|
-
[e["notification-panel--compact"]]: !!a,
|
|
62
|
-
[e["notification-panel--compact--basic"]]: a === "basic",
|
|
63
|
-
[e["notification-panel--compact--outline"]]: a === "outline",
|
|
64
|
-
[e["notification-panel--with-content"]]: o || n && i,
|
|
65
|
-
[e["notification-panel--dismissable"]]: m
|
|
66
|
-
},
|
|
67
|
-
I
|
|
68
|
-
), _ = g || s === "error" && "alert" || void 0, L = _ ? V({ label: n, id: p }) : void 0;
|
|
69
|
-
return /* @__PURE__ */ t.createElement(U, { fluid: v }, /* @__PURE__ */ t.createElement(
|
|
70
|
-
"div",
|
|
71
|
-
{
|
|
72
|
-
ref: r,
|
|
73
|
-
role: _,
|
|
74
|
-
"data-testid": w,
|
|
75
|
-
"data-analyticsid": R.NotificationPanel,
|
|
76
|
-
className: B,
|
|
77
|
-
...L
|
|
78
|
-
},
|
|
79
|
-
/* @__PURE__ */ t.createElement(
|
|
80
|
-
$,
|
|
81
|
-
{
|
|
82
|
-
variant: s,
|
|
83
|
-
size: a ? C.XSmall : C.Small,
|
|
84
|
-
className: e["notification-panel__icon"]
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
m && /* @__PURE__ */ t.createElement("span", { className: e["notification-panel__close"] }, /* @__PURE__ */ t.createElement(H, { ariaLabel: c.ariaLabelCloseBtn, onClick: E, color: F("black") })),
|
|
88
|
-
A()
|
|
89
|
-
));
|
|
90
|
-
});
|
|
91
|
-
export {
|
|
92
|
-
Z as default
|
|
93
|
-
};
|
|
94
|
-
//# sourceMappingURL=NotificationPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationPanel.js","sources":["../../../src/components/NotificationPanel/NotificationPanel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport NotificationBadge from '../Badge/NotificationBadge';\nimport Close from '../Close';\nimport Expander from '../Expander';\n\nimport styles from './styles.module.scss';\n\nexport type NotificationPanelVariants = 'info' | 'warn' | 'error' | 'success';\nexport type NotificationCompactVariants = 'basic' | 'outline';\nexport type NotificationPanelSizes = 'small' | 'medium' | 'large';\nexport type LabelTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'span';\n\nexport interface NotificationPanelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds inner child elements. */\n children?: React.ReactNode;\n /** Adds inner expander elements. */\n expanderChildren?: React.ReactNode;\n /** Text for expanderButton. */\n expanderButtonText?: string;\n /** Text for expanderButton when closed. */\n expanderButtonClosedText?: string;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Changes the visual representation of the notification panel. */\n variant?: NotificationPanelVariants;\n /** Makes the panel more compact. Available in basic and outline. */\n compactVariant?: NotificationCompactVariants;\n /** Sets a fixed size for the content container. */\n size?: NotificationPanelSizes;\n /** Used in combination with dismissiable property to close the notification panel. */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Toggles the close button in the top right corner. */\n dismissable?: boolean;\n /** Enables a fluid outer container that spans the entire width of parent. */\n fluid?: boolean;\n /** Sets a label for the notification panel. */\n label?: string;\n /** Changes the underlying element of the label. */\n labelHtmlMarkup?: LabelTags;\n /** Close button aria-label */\n ariaLabelCloseBtn?: string;\n /** Custom id for the label */\n labelId?: string;\n /** Custom role for the panel. Default is no role. If variant is alert or crisis, the aria role will be set to \"alert\" unless the role-prop is also set. */\n role?: 'region' | 'alert';\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ntype WrapFluidProps = Pick<NotificationPanelProps, 'fluid'> & {\n children: React.ReactElement;\n};\n\nconst FluidWrapper: React.FC<WrapFluidProps> = ({ fluid, children }) => {\n if (fluid) {\n const fluidClasses = classNames(styles['fluid-wrapper']);\n\n return <div className={fluidClasses}>{children}</div>;\n }\n return children;\n};\n\nconst NotificationPanel = React.forwardRef<HTMLDivElement, NotificationPanelProps>((props, ref) => {\n const {\n children,\n variant = 'info',\n dismissable = false,\n onClick,\n expanderChildren,\n expanderButtonText,\n expanderButtonClosedText,\n expanderOpenFromStart = false,\n compactVariant,\n label,\n labelHtmlMarkup = 'h1',\n fluid = false,\n size,\n className,\n labelId,\n role,\n testId,\n } = props;\n const uuid = useUuid(labelId);\n const renderContent = (): JSX.Element => {\n const outlineVariant = compactVariant === 'outline';\n const contentClasses = classNames(styles['notification-panel__content']);\n const labelClasses = classNames(styles['notification-panel__label'], {\n [styles['notification-panel__label--no-content']]: !children && !expanderChildren,\n [styles['notification-panel__label--compact']]: !!compactVariant,\n [styles['notification-panel__label--outline']]: outlineVariant,\n });\n const childrenClasses = classNames(styles['notification-panel__children'], {\n [styles['notification-panel__children--with-label']]: label,\n [styles['notification-panel__children--expander-no-label']]: expanderChildren && !label,\n [styles['notification-panel__children--outline']]: outlineVariant,\n });\n const CustomTag = labelHtmlMarkup;\n\n const [expanderOpen, setExpanderOpen] = React.useState(expanderOpenFromStart);\n return (\n <div className={contentClasses} id={!label ? uuid : undefined}>\n {label && (\n <CustomTag className={labelClasses} id={uuid}>\n {label}\n </CustomTag>\n )}\n {children && <div className={childrenClasses}>{children}</div>}\n {expanderChildren && expanderButtonText && expanderButtonClosedText && !compactVariant && (\n <Expander\n title={expanderOpen ? expanderButtonText : expanderButtonClosedText}\n onExpand={setExpanderOpen}\n expanded={expanderOpen}\n testId=\"expand\"\n >\n {expanderChildren}\n </Expander>\n )}\n </div>\n );\n };\n\n const notificationPanelClasses = classNames(\n styles['notification-panel'],\n styles[`notification-panel--${variant}`],\n size && styles[`notification-panel--${size}`],\n {\n [styles['notification-panel--compact']]: !!compactVariant,\n [styles['notification-panel--compact--basic']]: compactVariant === 'basic',\n [styles['notification-panel--compact--outline']]: compactVariant === 'outline',\n [styles['notification-panel--with-content']]: expanderChildren || (label && children),\n [styles['notification-panel--dismissable']]: dismissable,\n },\n className\n );\n\n const ariaRole = role || (variant === 'error' && 'alert') || undefined;\n const ariaLabelAttributes = ariaRole ? getAriaLabelAttributes({ label, id: uuid }) : undefined;\n\n return (\n <FluidWrapper fluid={fluid}>\n <div\n ref={ref}\n role={ariaRole}\n data-testid={testId}\n data-analyticsid={AnalyticsId.NotificationPanel}\n className={notificationPanelClasses}\n {...ariaLabelAttributes}\n >\n <NotificationBadge\n variant={variant}\n size={compactVariant ? IconSize.XSmall : IconSize.Small}\n className={styles['notification-panel__icon']}\n />\n {dismissable && (\n <span className={styles['notification-panel__close']}>\n <Close ariaLabel={props.ariaLabelCloseBtn} onClick={onClick} color={getColor('black')} />\n </span>\n )}\n {renderContent()}\n </div>\n </FluidWrapper>\n );\n});\n\nexport default NotificationPanel;\n"],"names":["FluidWrapper","fluid","children","fluidClasses","classNames","styles","React","NotificationPanel","props","ref","variant","dismissable","onClick","expanderChildren","expanderButtonText","expanderButtonClosedText","expanderOpenFromStart","compactVariant","label","labelHtmlMarkup","size","className","labelId","role","testId","uuid","useUuid","renderContent","outlineVariant","contentClasses","labelClasses","childrenClasses","CustomTag","expanderOpen","setExpanderOpen","Expander","notificationPanelClasses","ariaRole","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","NotificationBadge","IconSize","Close","getColor"],"mappings":";;;;;;;;;;AA8DA,MAAMA,IAAyC,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AACtE,MAAID,GAAO;AACT,UAAME,IAAeC,EAAWC,EAAO,eAAe,CAAC;AAEvD,WAAQC,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAWH,EAAA,GAAeD,CAAS;AAAA,EACjD;AACO,SAAAA;AACT,GAEMK,IAAoBD,EAAM,WAAmD,CAACE,GAAOC,MAAQ;AAC3F,QAAA;AAAA,IACJ,UAAAP;AAAA,IACA,SAAAQ,IAAU;AAAA,IACV,aAAAC,IAAc;AAAA,IACd,SAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,uBAAAC,IAAwB;AAAA,IACxB,gBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,OAAAlB,IAAQ;AAAA,IACR,MAAAmB;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAhB,GACEiB,IAAOC,EAAQJ,CAAO,GACtBK,IAAgB,MAAmB;AACvC,UAAMC,IAAiBX,MAAmB,WACpCY,IAAiBzB,EAAWC,EAAO,6BAA6B,CAAC,GACjEyB,IAAe1B,EAAWC,EAAO,2BAA2B,GAAG;AAAA,MACnE,CAACA,EAAO,uCAAuC,CAAC,GAAG,CAACH,KAAY,CAACW;AAAA,MAC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AAC,GAAGQ,KAAqBK,KAAShB;AAAA,MAC5E,CAACG,EAAO,iCAAiC,CAAC,GAAGM;AAAA,IAC/C;AAAA,IACAU;AAAA,EAAA,GAGIgB,IAAWd,KAASb,MAAY,WAAW,WAAY,QACvD4B,IAAsBD,IAAWE,EAAuB,EAAE,OAAArB,GAAO,IAAIO,EAAA,CAAM,IAAI;AAGnF,SAAAnB,gBAAAA,EAAA,cAACN,KAAa,OAAAC,EACZ,GAAAK,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAG;AAAA,MACA,MAAM4B;AAAA,MACN,eAAab;AAAA,MACb,oBAAkBgB,EAAY;AAAA,MAC9B,WAAWJ;AAAA,MACV,GAAGE;AAAA,IAAA;AAAA,IAEJhC,gBAAAA,EAAA;AAAA,MAACmC;AAAA,MAAA;AAAA,QACC,SAAA/B;AAAA,QACA,MAAMO,IAAiByB,EAAS,SAASA,EAAS;AAAA,QAClD,WAAWrC,EAAO,0BAA0B;AAAA,MAAA;AAAA,IAC9C;AAAA,IACCM,KACEL,gBAAAA,EAAA,cAAA,QAAA,EAAK,WAAWD,EAAO,2BAA2B,EACjD,GAAAC,gBAAAA,EAAA,cAACqC,GAAM,EAAA,WAAWnC,EAAM,mBAAmB,SAAAI,GAAkB,OAAOgC,EAAS,OAAO,GAAG,CACzF;AAAA,IAEDjB,EAAc;AAAA,EAAA,CAEnB;AAEJ,CAAC;"}
|
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import r from "classnames";
|
|
3
|
-
import { AnalyticsId as oe, IconSize as A } from "../../constants.js";
|
|
4
|
-
import { useExpand as se } from "../../hooks/useExpand.js";
|
|
5
|
-
import { useUuid as H } from "../../hooks/useUuid.js";
|
|
6
|
-
import { palette as W } from "../../theme/palette.js";
|
|
7
|
-
import { getAriaLabelAttributes as ce } from "../../utils/accessibility.js";
|
|
8
|
-
import ie from "../Badge/Badge.js";
|
|
9
|
-
import X from "../Button/Button.js";
|
|
10
|
-
import { Icon as C } from "../Icon/Icon.js";
|
|
11
|
-
import me from "../Icons/AlertSignFill.js";
|
|
12
|
-
import ue from "../Icons/ArrowRight.js";
|
|
13
|
-
import de from "../Icons/Calendar.js";
|
|
14
|
-
import pe from "../Icons/ChevronDown.js";
|
|
15
|
-
import _e from "../Icons/ChevronUp.js";
|
|
16
|
-
import Ee from "../Icons/Pencil.js";
|
|
17
|
-
import fe from "../Icons/Watch.js";
|
|
18
|
-
import { Title as ye } from "../Title/Title.js";
|
|
19
|
-
import e from "../Panel/styles.module.scss";
|
|
20
|
-
var ve = /* @__PURE__ */ ((a) => (a.normal = "normal", a.new = "new", a.error = "error", a.draft = "draft", a))(ve || {}), be = /* @__PURE__ */ ((a) => (a.fill = "fill", a.white = "white", a.stroke = "stroke", a.line = "line", a))(be || {}), Ce = /* @__PURE__ */ ((a) => (a.layout1 = "layout1", a.layout2 = "layout2", a.layout3a = "layout3a", a.layout3b = "layout3b", a.layout3c = "layout3c", a))(Ce || {});
|
|
21
|
-
const S = ({ status: a, statusMessage: n }) => {
|
|
22
|
-
const m = () => a === "error" ? { color: W.cherry500, svgIcon: me } : { color: W.black, svgIcon: Ee }, s = r(e["status-message"], {
|
|
23
|
-
[e["status-message--new"]]: a === "new"
|
|
24
|
-
/* new */
|
|
25
|
-
});
|
|
26
|
-
return (a === "error" || a === "draft") && n ? /* @__PURE__ */ t.createElement("div", { className: s, "data-testid": "display-status" }, /* @__PURE__ */ t.createElement(C, { ...m(), size: A.XSmall }), " ", /* @__PURE__ */ t.createElement("span", null, n)) : null;
|
|
27
|
-
}, L = ({ children: a }) => typeof a > "u" ? null : /* @__PURE__ */ t.createElement("div", { className: e["header-container"] }, a), Ne = ({ date: a, time: n }) => a || n ? /* @__PURE__ */ t.createElement("div", { className: e["datetime-container"], "data-testid": "datetime" }, a && /* @__PURE__ */ t.createElement("div", { className: e["datetime-container__icon"] }, /* @__PURE__ */ t.createElement(C, { svgIcon: de, size: A.XSmall }), /* @__PURE__ */ t.createElement("span", null, a)), n && /* @__PURE__ */ t.createElement("div", { className: e["datetime-container__icon"] }, /* @__PURE__ */ t.createElement(C, { svgIcon: fe, size: A.XSmall }), /* @__PURE__ */ t.createElement("span", null, n))) : null, he = ({
|
|
28
|
-
contentA: a,
|
|
29
|
-
contentB: n,
|
|
30
|
-
contentHeader: m,
|
|
31
|
-
ctaContainer: s,
|
|
32
|
-
icon: l,
|
|
33
|
-
status: c,
|
|
34
|
-
statusMessage: d,
|
|
35
|
-
titleElement: p
|
|
36
|
-
}) => {
|
|
37
|
-
const i = r(e["panel__layout-1"], {
|
|
38
|
-
[e["panel__layout-1--with-icon"]]: l
|
|
39
|
-
}), o = r(e.panel__icon, e["panel__icon--layout-1"], {
|
|
40
|
-
[e["panel__icon--no-content"]]: !a && !n
|
|
41
|
-
});
|
|
42
|
-
return /* @__PURE__ */ t.createElement("div", { className: i }, /* @__PURE__ */ t.createElement(S, { status: c, statusMessage: d }), /* @__PURE__ */ t.createElement(L, null, m), l && /* @__PURE__ */ t.createElement("div", { className: o }, l), /* @__PURE__ */ t.createElement("div", { className: e["panel__layout-1__content-a"] }, p, a), n && /* @__PURE__ */ t.createElement("div", null, n), s);
|
|
43
|
-
}, we = ({
|
|
44
|
-
contentA: a,
|
|
45
|
-
contentB: n,
|
|
46
|
-
contentHeader: m,
|
|
47
|
-
ctaContainer: s,
|
|
48
|
-
icon: l,
|
|
49
|
-
status: c,
|
|
50
|
-
statusMessage: d,
|
|
51
|
-
titleElement: p
|
|
52
|
-
}) => {
|
|
53
|
-
const i = r(e["panel__layout-2"], {
|
|
54
|
-
[e["panel__layout-2--with-icon"]]: l
|
|
55
|
-
}), o = r(e.panel__icon, e["panel__icon--layout-2"], {
|
|
56
|
-
[e["panel__icon--no-content"]]: !a && !n
|
|
57
|
-
}), y = e["panel__layout-2__last-column"];
|
|
58
|
-
return /* @__PURE__ */ t.createElement("div", { className: i }, /* @__PURE__ */ t.createElement(S, { status: c, statusMessage: d }), /* @__PURE__ */ t.createElement(L, null, m), l && /* @__PURE__ */ t.createElement("div", { className: o }, l), /* @__PURE__ */ t.createElement("div", { className: e["panel__layout-2__content-a"] }, p, a), n && /* @__PURE__ */ t.createElement("div", { className: y }, n), s && /* @__PURE__ */ t.createElement("div", { className: y }, s));
|
|
59
|
-
}, Ie = ({
|
|
60
|
-
contentA: a,
|
|
61
|
-
contentB: n,
|
|
62
|
-
contentHeader: m,
|
|
63
|
-
ctaContainer: s,
|
|
64
|
-
icon: l,
|
|
65
|
-
layout: c,
|
|
66
|
-
status: d,
|
|
67
|
-
statusMessage: p,
|
|
68
|
-
titleElement: i
|
|
69
|
-
}) => {
|
|
70
|
-
const o = r(e["panel__layout-3"], {
|
|
71
|
-
[e["panel__layout-3--with-icon"]]: l,
|
|
72
|
-
[e["panel__layout-3--a"]]: c === "layout3a",
|
|
73
|
-
[e["panel__layout-3--b"]]: c === "layout3b",
|
|
74
|
-
[e["panel__layout-3--c"]]: c === "layout3c"
|
|
75
|
-
/* layout3c */
|
|
76
|
-
}), y = r(e.panel__icon, e["panel__icon--layout-3"], {
|
|
77
|
-
[e["panel__icon--no-content"]]: !a && !n
|
|
78
|
-
});
|
|
79
|
-
return /* @__PURE__ */ t.createElement("div", { className: o }, /* @__PURE__ */ t.createElement(S, { status: d, statusMessage: p }), /* @__PURE__ */ t.createElement(L, null, m), l && /* @__PURE__ */ t.createElement("div", { className: y }, l), /* @__PURE__ */ t.createElement("div", null, i, a), /* @__PURE__ */ t.createElement("div", { className: e["panel__layout-3__last-column"] }, n && /* @__PURE__ */ t.createElement("div", { className: e["panel__layout-3__last-column__content-b"] }, n), s));
|
|
80
|
-
}, Oe = t.forwardRef(function(n, m) {
|
|
81
|
-
const {
|
|
82
|
-
buttonAriaLabel: s,
|
|
83
|
-
buttonAriaLabelledById: l,
|
|
84
|
-
buttonText: c = "Se detaljer",
|
|
85
|
-
buttonTextClose: d = "Skjul detaljer",
|
|
86
|
-
buttonHtmlMarkup: p = "a",
|
|
87
|
-
buttonOnClick: i,
|
|
88
|
-
children: o,
|
|
89
|
-
className: y,
|
|
90
|
-
containerAsButton: w = !1,
|
|
91
|
-
contentA: M,
|
|
92
|
-
contentB: z,
|
|
93
|
-
contentHeader: F,
|
|
94
|
-
date: B,
|
|
95
|
-
expanded: U = !1,
|
|
96
|
-
focusable: O = !1,
|
|
97
|
-
icon: D,
|
|
98
|
-
layout: v = "layout2",
|
|
99
|
-
noTopBorder: q,
|
|
100
|
-
onExpand: R,
|
|
101
|
-
renderChildrenWhenClosed: G = !1,
|
|
102
|
-
status: _ = "normal",
|
|
103
|
-
statusMessage: I,
|
|
104
|
-
target: J = "_self",
|
|
105
|
-
testId: K,
|
|
106
|
-
time: $,
|
|
107
|
-
title: g,
|
|
108
|
-
titleHtmlMarkup: P = "h2",
|
|
109
|
-
url: x,
|
|
110
|
-
variant: E = "fill"
|
|
111
|
-
/* fill */
|
|
112
|
-
} = n, [f, Q] = se(U, R), k = H(), N = H(), j = I && _ === "new", h = typeof z > "u", Y = v === "layout1" || h, Z = !h && v === "layout2", V = !h && (v === "layout3a" || v === "layout3b" || v === "layout3c"), ee = r(e["panel-wrapper"], y), te = r(e.panel, {
|
|
113
|
-
[e["panel--fill"]]: E === "fill",
|
|
114
|
-
[e["panel--stroke"]]: E === "stroke",
|
|
115
|
-
[e["panel--white"]]: E === "white",
|
|
116
|
-
[e["panel--line"]]: E === "line",
|
|
117
|
-
[e["panel--no-top-border"]]: E === "line" && q,
|
|
118
|
-
[e["panel--selected"]]: f,
|
|
119
|
-
[e["panel--new"]]: _ === "new",
|
|
120
|
-
[e["panel--draft"]]: _ === "draft",
|
|
121
|
-
[e["panel--error"]]: _ === "error",
|
|
122
|
-
[e["panel--status"]]: _ && _ !== "normal",
|
|
123
|
-
[e["panel--with-icon"]]: D,
|
|
124
|
-
[e["panel--button"]]: w,
|
|
125
|
-
[e["panel--clickable"]]: o || x || R || i || w
|
|
126
|
-
}), ae = () => {
|
|
127
|
-
const u = o || x || i, b = r(e["panel__btn-container"], {
|
|
128
|
-
[e["panel__btn-container--no-content-b"]]: h,
|
|
129
|
-
[e["panel__btn-container--no-button"]]: !u
|
|
130
|
-
});
|
|
131
|
-
return (u || B || $) && /* @__PURE__ */ t.createElement("div", { className: b }, /* @__PURE__ */ t.createElement(Ne, { date: B, time: $ }), u && /* @__PURE__ */ t.createElement("div", { className: e["panel__details-btn"] }, ne()));
|
|
132
|
-
}, ne = () => {
|
|
133
|
-
const u = ce({
|
|
134
|
-
label: s,
|
|
135
|
-
id: l && `${N} ${l}` || g && k && `${N} ${k}`,
|
|
136
|
-
prefer: "label"
|
|
137
|
-
}), b = {
|
|
138
|
-
onClick: i || (() => Q(!f)),
|
|
139
|
-
className: w ? e.panel__expand : void 0,
|
|
140
|
-
variant: "borderless",
|
|
141
|
-
ellipsis: !0,
|
|
142
|
-
...u
|
|
143
|
-
};
|
|
144
|
-
return o ? /* @__PURE__ */ t.createElement(X, { testId: "expand", "aria-expanded": f, ...b }, /* @__PURE__ */ t.createElement("span", { id: N }, f ? d : c), /* @__PURE__ */ t.createElement(C, { svgIcon: f ? _e : pe })) : /* @__PURE__ */ t.createElement(X, { testId: "url", htmlMarkup: p, href: x, target: J, ...b }, /* @__PURE__ */ t.createElement("span", { id: N }, c), /* @__PURE__ */ t.createElement(C, { svgIcon: ue }));
|
|
145
|
-
}, le = () => {
|
|
146
|
-
if (!o || !G && !f)
|
|
147
|
-
return null;
|
|
148
|
-
const u = r(e["panel-details"], {
|
|
149
|
-
[e["panel-details--open"]]: f,
|
|
150
|
-
[e["panel-details--line"]]: E === "line",
|
|
151
|
-
[e["panel-details--white"]]: E === "white"
|
|
152
|
-
/* white */
|
|
153
|
-
});
|
|
154
|
-
return /* @__PURE__ */ t.createElement("div", { className: u, "data-testid": "panel-details" }, /* @__PURE__ */ t.createElement("div", null, o));
|
|
155
|
-
}, re = () => {
|
|
156
|
-
const u = r(e["title-container"], {
|
|
157
|
-
[e["title-container--no-content-a"]]: !M
|
|
158
|
-
}), b = r(e["title-container__title"], {
|
|
159
|
-
[e["title-container__title--badge"]]: j
|
|
160
|
-
});
|
|
161
|
-
return g && /* @__PURE__ */ t.createElement("div", { className: u }, /* @__PURE__ */ t.createElement(ye, { appearance: "title3", htmlMarkup: P, id: k, className: b }, g), j && /* @__PURE__ */ t.createElement("div", { className: e.panel__badge }, /* @__PURE__ */ t.createElement(ie, { color: "blueberry", testId: "badge-status" }, I)));
|
|
162
|
-
}, T = {
|
|
163
|
-
contentA: M,
|
|
164
|
-
contentB: z,
|
|
165
|
-
contentHeader: F,
|
|
166
|
-
ctaContainer: ae(),
|
|
167
|
-
icon: D,
|
|
168
|
-
status: _,
|
|
169
|
-
statusMessage: I,
|
|
170
|
-
titleElement: re()
|
|
171
|
-
};
|
|
172
|
-
return /* @__PURE__ */ t.createElement(
|
|
173
|
-
"div",
|
|
174
|
-
{
|
|
175
|
-
tabIndex: O ? -1 : void 0,
|
|
176
|
-
ref: m,
|
|
177
|
-
"data-testid": K,
|
|
178
|
-
className: ee,
|
|
179
|
-
"data-analyticsid": oe.Panel
|
|
180
|
-
},
|
|
181
|
-
/* @__PURE__ */ t.createElement("div", { className: te }, Y && /* @__PURE__ */ t.createElement(he, { ...T }), Z && /* @__PURE__ */ t.createElement(we, { ...T }), V && /* @__PURE__ */ t.createElement(Ie, { ...T, layout: v })),
|
|
182
|
-
le()
|
|
183
|
-
);
|
|
184
|
-
});
|
|
185
|
-
export {
|
|
186
|
-
Ce as PanelLayout,
|
|
187
|
-
ve as PanelStatus,
|
|
188
|
-
be as PanelVariant,
|
|
189
|
-
Oe as default
|
|
190
|
-
};
|
|
191
|
-
//# sourceMappingURL=Panel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.js","sources":["../../../src/components/Panel/Panel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnchorTarget, AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { useUuid } from '../../hooks/useUuid';\nimport { palette } from '../../theme/palette';\nimport { AriaLabelAttributes, getAriaLabelAttributes } from '../../utils/accessibility';\nimport Badge from '../Badge';\nimport Button, { ButtonProps, ButtonTags } from '../Button';\nimport Icon, { IconSize, SvgPathProps } from '../Icon';\nimport AlertSignFill from '../Icons/AlertSignFill';\nimport ArrowRight from '../Icons/ArrowRight';\nimport Calendar from '../Icons/Calendar';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport Pencil from '../Icons/Pencil';\nimport Watch from '../Icons/Watch';\nimport Title, { TitleTags } from '../Title';\n\nimport panelStyles from './styles.module.scss';\n\nexport enum PanelStatus {\n normal = 'normal',\n new = 'new',\n error = 'error',\n draft = 'draft',\n}\n\nexport enum PanelVariant {\n fill = 'fill',\n white = 'white',\n stroke = 'stroke',\n line = 'line',\n}\n\nexport enum PanelLayout {\n layout1 = 'layout1',\n layout2 = 'layout2',\n layout3a = 'layout3a',\n layout3b = 'layout3b',\n layout3c = 'layout3c',\n}\n\nexport interface PanelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** Panel section A content */\n contentA?: React.ReactNode | string;\n /** Panel section B content */\n contentB?: React.ReactNode | string;\n /** Content for a container that renders above A and B regardless of layout */\n contentHeader?: React.ReactNode;\n /** Container acts as a button, clicking anywhere triggers a panel button click */\n containerAsButton?: boolean;\n /** Panel children */\n children?: React.ReactNode;\n /** Displays date with icon */\n date?: string;\n /** Expands or collapses the panel */\n expanded?: boolean;\n /** Whether the panel can be focused */\n focusable?: boolean;\n /** Icon displayed in title */\n icon?: React.ReactNode;\n /** Panel button text */\n buttonText?: string;\n /** Panel button close text */\n buttonTextClose?: string;\n /** HTML markup for panel button. Default: a */\n buttonHtmlMarkup?: ButtonTags;\n /** Callback when the panel button is clicked */\n buttonOnClick?: ButtonProps['onClick'];\n /** Panel button is aria-labelledby the text in the button itself + the element set in buttonAriaLabelledById. Default: auto-generated id for title (if title is set). */\n buttonAriaLabelledById?: string;\n /** Panel button aria label */\n buttonAriaLabel?: string;\n /** Layout of the panel */\n layout?: keyof typeof PanelLayout;\n /** Removes top border when variant is \"line\" */\n noTopBorder?: boolean;\n /** Called when the panel is opened/closed */\n onExpand?: (isExpanded: boolean) => void;\n /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */\n renderChildrenWhenClosed?: boolean;\n /** Displays a status on the left side: default normal */\n status?: keyof typeof PanelStatus;\n /** Displayed on top of the panel with a status icon */\n statusMessage?: string;\n /** Sets the data-testid attribute for testing purposes */\n testId?: string;\n /** Displays time with icon */\n time?: string;\n /** Title of the panel */\n title?: string;\n /** Changes the underlying element of the title. Default: h2 */\n titleHtmlMarkup?: TitleTags;\n /** Changes the visual representation of the panel */\n variant?: keyof typeof PanelVariant;\n /** URL to details, renders as a button with anchor tag */\n url?: string;\n /** target used in the button: default is _self */\n target?: AnchorTarget;\n}\n\nexport interface LayoutProps\n extends Pick<PanelProps, 'contentA' | 'contentB' | 'contentHeader' | 'icon' | 'layout' | 'status' | 'statusMessage'> {\n ctaContainer?: React.ReactNode;\n titleElement: React.ReactNode;\n}\n\nconst StatusText: React.FC<{ status?: keyof typeof PanelStatus; statusMessage?: string }> = ({ status, statusMessage }) => {\n const statusIcon = (): { color: string; svgIcon: React.FC<SvgPathProps> } => {\n if (status === PanelStatus.error) {\n return { color: palette.cherry500, svgIcon: AlertSignFill };\n }\n\n return { color: palette.black, svgIcon: Pencil };\n };\n\n const statusMessageClass = classNames(panelStyles['status-message'], {\n [panelStyles['status-message--new']]: status === PanelStatus.new,\n });\n\n if ((status === PanelStatus.error || status === PanelStatus.draft) && statusMessage) {\n return (\n <div className={statusMessageClass} data-testid=\"display-status\">\n {<Icon {...statusIcon()} size={IconSize.XSmall} />} <span>{statusMessage}</span>\n </div>\n );\n }\n\n return null;\n};\n\nconst PreContainer: React.FC<{ children?: React.ReactNode }> = ({ children }) => {\n if (typeof children === 'undefined') return null;\n return <div className={panelStyles['header-container']}>{children}</div>;\n};\n\nconst DateTime: React.FC<{ date?: string; time?: string }> = ({ date, time }) => {\n if (date || time) {\n return (\n <div className={panelStyles['datetime-container']} data-testid=\"datetime\">\n {date && (\n <div className={panelStyles['datetime-container__icon']}>\n <Icon svgIcon={Calendar} size={IconSize.XSmall} />\n <span>{date}</span>\n </div>\n )}\n {time && (\n <div className={panelStyles['datetime-container__icon']}>\n <Icon svgIcon={Watch} size={IconSize.XSmall} />\n <span>{time}</span>\n </div>\n )}\n </div>\n );\n }\n\n return null;\n};\n\nconst PanelLayout1: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n status,\n statusMessage,\n titleElement,\n}) => {\n const panelLayoutClasses = classNames(panelStyles['panel__layout-1'], {\n [panelStyles['panel__layout-1--with-icon']]: icon,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-1'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n\n return (\n <div className={panelLayoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div className={panelStyles['panel__layout-1__content-a']}>\n {titleElement}\n {contentA}\n </div>\n {contentB && <div>{contentB}</div>}\n {ctaContainer}\n </div>\n );\n};\n\nconst PanelLayout2: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n status,\n statusMessage,\n titleElement,\n}) => {\n const panelLayoutClasses = classNames(panelStyles['panel__layout-2'], {\n [panelStyles['panel__layout-2--with-icon']]: icon,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-2'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n const lastColumnClass = panelStyles['panel__layout-2__last-column'];\n\n return (\n <div className={panelLayoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div className={panelStyles['panel__layout-2__content-a']}>\n {titleElement}\n {contentA}\n </div>\n {contentB && <div className={lastColumnClass}>{contentB}</div>}\n {ctaContainer && <div className={lastColumnClass}>{ctaContainer}</div>}\n </div>\n );\n};\n\nconst PanelLayout3: React.FC<LayoutProps> = ({\n contentA,\n contentB,\n contentHeader,\n ctaContainer,\n icon,\n layout,\n status,\n statusMessage,\n titleElement,\n}) => {\n const layoutClasses = classNames(panelStyles['panel__layout-3'], {\n [panelStyles['panel__layout-3--with-icon']]: icon,\n [panelStyles['panel__layout-3--a']]: layout === PanelLayout.layout3a,\n [panelStyles['panel__layout-3--b']]: layout === PanelLayout.layout3b,\n [panelStyles['panel__layout-3--c']]: layout === PanelLayout.layout3c,\n });\n const iconClasses = classNames(panelStyles.panel__icon, panelStyles['panel__icon--layout-3'], {\n [panelStyles['panel__icon--no-content']]: !contentA && !contentB,\n });\n\n return (\n <div className={layoutClasses}>\n <StatusText status={status} statusMessage={statusMessage} />\n <PreContainer>{contentHeader}</PreContainer>\n {icon && <div className={iconClasses}>{icon}</div>}\n <div>\n {titleElement}\n {contentA}\n </div>\n <div className={panelStyles['panel__layout-3__last-column']}>\n {contentB && <div className={panelStyles['panel__layout-3__last-column__content-b']}>{contentB}</div>}\n {ctaContainer}\n </div>\n </div>\n );\n};\n\nconst Panel = React.forwardRef(function PanelForwardedRef(props: PanelProps, ref: React.ForwardedRef<HTMLHeadingElement>) {\n const {\n buttonAriaLabel,\n buttonAriaLabelledById,\n buttonText = 'Se detaljer',\n buttonTextClose = 'Skjul detaljer',\n buttonHtmlMarkup = 'a',\n buttonOnClick,\n children,\n className,\n containerAsButton = false,\n contentA,\n contentB,\n contentHeader,\n date,\n expanded = false,\n focusable = false,\n icon,\n layout = PanelLayout.layout2,\n noTopBorder,\n onExpand,\n renderChildrenWhenClosed = false,\n status = PanelStatus.normal,\n statusMessage,\n target = '_self',\n testId,\n time,\n title,\n titleHtmlMarkup = 'h2',\n url,\n variant = PanelVariant.fill,\n } = props;\n\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const titleId = useUuid();\n const buttonTextId = useUuid();\n const hasBadge = statusMessage && status === PanelStatus.new;\n const noContentB = typeof contentB === 'undefined';\n const layout1 = layout === 'layout1' || noContentB;\n const layout2 = !noContentB && layout === 'layout2';\n const layout3 = !noContentB && (layout === 'layout3a' || layout === 'layout3b' || layout === 'layout3c');\n const panelWrapperClasses = classNames(panelStyles['panel-wrapper'], className);\n\n const panelClasses = classNames(panelStyles.panel, {\n [panelStyles['panel--fill']]: variant === PanelVariant.fill,\n [panelStyles['panel--stroke']]: variant === PanelVariant.stroke,\n [panelStyles['panel--white']]: variant === PanelVariant.white,\n [panelStyles['panel--line']]: variant === PanelVariant.line,\n [panelStyles['panel--no-top-border']]: variant === PanelVariant.line && noTopBorder,\n [panelStyles['panel--selected']]: isExpanded,\n [panelStyles['panel--new']]: status === PanelStatus.new,\n [panelStyles['panel--draft']]: status === PanelStatus.draft,\n [panelStyles['panel--error']]: status === PanelStatus.error,\n [panelStyles['panel--status']]: status && status !== PanelStatus.normal,\n [panelStyles['panel--with-icon']]: icon,\n [panelStyles['panel--button']]: containerAsButton,\n [panelStyles['panel--clickable']]: children || url || onExpand || buttonOnClick || containerAsButton,\n });\n\n const renderCTAContainer = () => {\n const hasButton = children || url || buttonOnClick;\n const btnContainerClasses = classNames(panelStyles['panel__btn-container'], {\n [panelStyles['panel__btn-container--no-content-b']]: noContentB,\n [panelStyles['panel__btn-container--no-button']]: !hasButton,\n });\n\n return (\n (hasButton || date || time) && (\n <div className={btnContainerClasses}>\n {<DateTime date={date} time={time} />}\n {hasButton && <div className={panelStyles['panel__details-btn']}>{renderDetailsButton()}</div>}\n </div>\n )\n );\n };\n\n const renderDetailsButton = (): React.ReactNode => {\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: buttonAriaLabel,\n id: (buttonAriaLabelledById && `${buttonTextId} ${buttonAriaLabelledById}`) || (title && titleId && `${buttonTextId} ${titleId}`),\n prefer: 'label',\n });\n\n const commonProps: Partial<ButtonProps> & AriaLabelAttributes = {\n onClick: buttonOnClick ? buttonOnClick : (): void => setIsExpanded(!isExpanded),\n className: containerAsButton ? panelStyles['panel__expand'] : undefined,\n variant: 'borderless',\n ellipsis: true,\n ...ariaLabelAttributes,\n };\n\n if (children) {\n return (\n <Button testId=\"expand\" aria-expanded={isExpanded} {...commonProps}>\n <span id={buttonTextId}>{isExpanded ? buttonTextClose : buttonText}</span>\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} />\n </Button>\n );\n }\n\n return (\n <Button testId=\"url\" htmlMarkup={buttonHtmlMarkup} href={url} target={target} {...commonProps}>\n <span id={buttonTextId}>{buttonText}</span>\n <Icon svgIcon={ArrowRight} />\n </Button>\n );\n };\n\n const renderContent = (): React.ReactNode | null => {\n if (!children || (!renderChildrenWhenClosed && !isExpanded)) {\n return null;\n }\n\n const panelDetailsClasses = classNames(panelStyles['panel-details'], {\n [panelStyles['panel-details--open']]: isExpanded,\n [panelStyles['panel-details--line']]: variant === PanelVariant.line,\n [panelStyles['panel-details--white']]: variant === PanelVariant.white,\n });\n\n return (\n <div className={panelDetailsClasses} data-testid=\"panel-details\">\n <div>{children}</div>\n </div>\n );\n };\n\n const renderTitle = () => {\n const titleContainerClasses = classNames(panelStyles['title-container'], {\n [panelStyles['title-container--no-content-a']]: !contentA,\n });\n const titleClasses = classNames(panelStyles['title-container__title'], {\n [panelStyles['title-container__title--badge']]: hasBadge,\n });\n\n return (\n title && (\n <div className={titleContainerClasses}>\n <Title appearance=\"title3\" htmlMarkup={titleHtmlMarkup} id={titleId} className={titleClasses}>\n {title}\n </Title>\n {hasBadge && (\n <div className={panelStyles.panel__badge}>\n <Badge color=\"blueberry\" testId=\"badge-status\">\n {statusMessage}\n </Badge>\n </div>\n )}\n </div>\n )\n );\n };\n\n const layoutProps: LayoutProps = {\n contentA: contentA,\n contentB: contentB,\n contentHeader: contentHeader,\n ctaContainer: renderCTAContainer(),\n icon: icon,\n status: status,\n statusMessage: statusMessage,\n titleElement: renderTitle(),\n };\n\n return (\n <div\n // eslint-disable-next-line no-constant-condition\n tabIndex={focusable ? -1 : undefined}\n ref={ref}\n data-testid={testId}\n className={panelWrapperClasses}\n data-analyticsid={AnalyticsId.Panel}\n >\n <div className={panelClasses}>\n {layout1 && <PanelLayout1 {...layoutProps} />}\n {layout2 && <PanelLayout2 {...layoutProps} />}\n {layout3 && <PanelLayout3 {...layoutProps} layout={layout} />}\n </div>\n {renderContent()}\n </div>\n );\n});\n\nexport default Panel;\n"],"names":["PanelStatus","PanelVariant","PanelLayout","StatusText","status","statusMessage","statusIcon","palette","AlertSignFill","Pencil","statusMessageClass","classNames","panelStyles","Icon","IconSize","React","PreContainer","children","DateTime","date","time","Calendar","Watch","PanelLayout1","contentA","contentB","contentHeader","ctaContainer","icon","titleElement","panelLayoutClasses","iconClasses","PanelLayout2","lastColumnClass","PanelLayout3","layout","layoutClasses","Panel","props","ref","buttonAriaLabel","buttonAriaLabelledById","buttonText","buttonTextClose","buttonHtmlMarkup","buttonOnClick","className","containerAsButton","expanded","focusable","noTopBorder","onExpand","renderChildrenWhenClosed","target","testId","title","titleHtmlMarkup","url","variant","isExpanded","setIsExpanded","useExpand","titleId","useUuid","buttonTextId","hasBadge","noContentB","layout1","layout2","layout3","panelWrapperClasses","panelClasses","renderCTAContainer","hasButton","btnContainerClasses","renderDetailsButton","ariaLabelAttributes","getAriaLabelAttributes","commonProps","Button","ChevronUp","ChevronDown","ArrowRight","renderContent","panelDetailsClasses","renderTitle","titleContainerClasses","titleClasses","Title","Badge","layoutProps","AnalyticsId"],"mappings":";;;;;;;;;;;;;;;;;;;AAuBY,IAAAA,uBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,MAAM,OACNA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SAJEA,IAAAA,MAAA,CAAA,CAAA,GAOAC,uBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,QAAQ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A,IAE9B5E,gBAAAA,EAAA,cAAC,SAAI,WAAWwD,GAAA,GACbJ,KAAYpD,gBAAAA,EAAA,cAAAQ,IAAA,EAAc,GAAGmE,EAAa,CAAA,GAC1CtB,qCAAYpC,IAAc,EAAA,GAAG0D,GAAa,GAC1CrB,qCAAYnC,IAAc,EAAA,GAAGwD,GAAa,QAAAvD,EAAgB,CAAA,CAC7D;AAAA,IACCgD,GAAc;AAAA,EAAA;AAGrB,CAAC;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import a from "react";
|
|
2
|
-
import p from "classnames";
|
|
3
|
-
import { AnalyticsId as c } from "../../constants.js";
|
|
4
|
-
import f, { PanelVariant as o } from "../Panel/Panel.js";
|
|
5
|
-
import P from "../PanelList/styles.module.scss";
|
|
6
|
-
const u = (t) => a.isValidElement(t) && t.type === f, v = a.forwardRef(function(l, s) {
|
|
7
|
-
const { testId: i, children: m, variant: n = o.fill } = l, d = (e, r) => a.cloneElement(e, {
|
|
8
|
-
variant: n,
|
|
9
|
-
noTopBorder: n === o.line && !r,
|
|
10
|
-
className: p(e.props.className, n !== o.line && P["panel-list__panel"])
|
|
11
|
-
});
|
|
12
|
-
return /* @__PURE__ */ a.createElement("div", { ref: s, "data-testid": i, "data-analyticsid": c.PanelList }, a.Children.map(m, (e, r) => u(e) ? d(e, r === 0) : e));
|
|
13
|
-
});
|
|
14
|
-
export {
|
|
15
|
-
v as default
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=PanelList.js.map
|