@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,161 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import { useForm as h } from "react-hook-form";
|
|
3
|
-
import { isTest as q } from "../../utils/environment.js";
|
|
4
|
-
import H from "../Button/Button.js";
|
|
5
|
-
import { Checkbox as s } from "../Checkbox/Checkbox.js";
|
|
6
|
-
import { FormGroup as a } from "../FormGroup/FormGroup.js";
|
|
7
|
-
import { FormLayout as w, FormLayoutColumns as C } from "../FormLayout/FormLayout.js";
|
|
8
|
-
import L from "../Icons/Hospital.js";
|
|
9
|
-
import B from "../Input/Input.js";
|
|
10
|
-
import n from "../Label/Label.js";
|
|
11
|
-
import { RadioButton as p } from "../RadioButton/RadioButton.js";
|
|
12
|
-
import { Select as N } from "../Select/Select.js";
|
|
13
|
-
import R from "../Spacer/Spacer.js";
|
|
14
|
-
import G from "../Textarea/Textarea.js";
|
|
15
|
-
import { Validation as _ } from "../Validation/Validation.js";
|
|
16
|
-
var j = /* @__PURE__ */ ((t) => (t.formgroup = "formgroup", t.checkbox = "checkbox", t.radiobutton = "radiobutton", t.textarea = "textarea", t.input = "input", t.select = "select", t))(j || {});
|
|
17
|
-
const re = (t) => {
|
|
18
|
-
const {
|
|
19
|
-
exampleType: l = "formgroup"
|
|
20
|
-
/* formgroup */
|
|
21
|
-
} = t, {
|
|
22
|
-
register: o,
|
|
23
|
-
handleSubmit: z,
|
|
24
|
-
formState: { errors: r }
|
|
25
|
-
} = h(), i = /* @__PURE__ */ new Date();
|
|
26
|
-
i.setHours(0), i.setMinutes(0), i.setSeconds(0);
|
|
27
|
-
const c = /* @__PURE__ */ new Date();
|
|
28
|
-
c.setDate(i.getDate() - 5), c.setHours(6), c.setMinutes(10), c.setSeconds(0);
|
|
29
|
-
const u = /* @__PURE__ */ new Date();
|
|
30
|
-
u.setDate(i.getDate() + 5), u.setHours(22), u.setMinutes(0), u.setSeconds(0);
|
|
31
|
-
const d = "Du må velge minst én farge", I = "Du må velge minst to størrelser", g = "Du må velge minst én plassering", y = "Historien må være på maks 40 tegn", D = "Navn må fylles ut", k = 'Du må velge "Frankenstein"', E = (m) => m.length >= 2 || I, F = (m) => m.toString() === "Frankenstein" || k, x = () => /* @__PURE__ */ e.createElement(
|
|
32
|
-
a,
|
|
33
|
-
{
|
|
34
|
-
title: "FormGroup-tittel",
|
|
35
|
-
legend: "Farge",
|
|
36
|
-
error: r.colour ? r.colour.message : void 0,
|
|
37
|
-
errorTextId: "error",
|
|
38
|
-
size: t.size
|
|
39
|
-
},
|
|
40
|
-
/* @__PURE__ */ e.createElement(w, { maxColumns: C.two }, /* @__PURE__ */ e.createElement(
|
|
41
|
-
s,
|
|
42
|
-
{
|
|
43
|
-
inputId: "colour1",
|
|
44
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Blueberry" }] }),
|
|
45
|
-
...o("colour", { required: d })
|
|
46
|
-
}
|
|
47
|
-
), /* @__PURE__ */ e.createElement(
|
|
48
|
-
s,
|
|
49
|
-
{
|
|
50
|
-
inputId: "colour2",
|
|
51
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Cherry" }] }),
|
|
52
|
-
...o("colour", { required: d })
|
|
53
|
-
}
|
|
54
|
-
), /* @__PURE__ */ e.createElement(
|
|
55
|
-
s,
|
|
56
|
-
{
|
|
57
|
-
inputId: "colour3",
|
|
58
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Neutral" }] }),
|
|
59
|
-
...o("colour", { required: d })
|
|
60
|
-
}
|
|
61
|
-
))
|
|
62
|
-
), S = () => /* @__PURE__ */ e.createElement(a, { legend: "Størrelser", error: r.sizes ? r.sizes.message : void 0, size: t.size, errorTextId: "error1" }, /* @__PURE__ */ e.createElement(s, { inputId: "sizes1", label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Small" }] }), ...o("sizes", { validate: E }) }), /* @__PURE__ */ e.createElement(s, { inputId: "sizes2", label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Medium" }] }), ...o("sizes", { validate: E }) }), /* @__PURE__ */ e.createElement(s, { inputId: "sizes3", label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Large" }] }), ...o("sizes", { validate: E }) })), b = () => /* @__PURE__ */ e.createElement(
|
|
63
|
-
a,
|
|
64
|
-
{
|
|
65
|
-
legend: "Plassering",
|
|
66
|
-
error: r.positions ? r.positions.message : void 0,
|
|
67
|
-
size: t.size,
|
|
68
|
-
errorTextId: "error2"
|
|
69
|
-
},
|
|
70
|
-
/* @__PURE__ */ e.createElement(
|
|
71
|
-
p,
|
|
72
|
-
{
|
|
73
|
-
inputId: "positions1",
|
|
74
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Venstre" }] }),
|
|
75
|
-
...o("positions", { required: g })
|
|
76
|
-
}
|
|
77
|
-
),
|
|
78
|
-
/* @__PURE__ */ e.createElement(
|
|
79
|
-
p,
|
|
80
|
-
{
|
|
81
|
-
inputId: "positions2",
|
|
82
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Høyre" }] }),
|
|
83
|
-
...o("positions", { required: g })
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
|
-
/* @__PURE__ */ e.createElement(
|
|
87
|
-
p,
|
|
88
|
-
{
|
|
89
|
-
inputId: "positions3",
|
|
90
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Midten" }] }),
|
|
91
|
-
...o("positions", { required: g })
|
|
92
|
-
}
|
|
93
|
-
)
|
|
94
|
-
), f = () => /* @__PURE__ */ e.createElement(a, { error: r.story ? r.story.message : void 0, errorTextId: "error3" }, /* @__PURE__ */ e.createElement(
|
|
95
|
-
G,
|
|
96
|
-
{
|
|
97
|
-
defaultValue: `Dette er en test
|
|
98
|
-
|
|
99
|
-
Hello
|
|
100
|
-
|
|
101
|
-
test
|
|
102
|
-
|
|
103
|
-
test test`,
|
|
104
|
-
grow: !0,
|
|
105
|
-
maxCharacters: 40,
|
|
106
|
-
minRows: 5,
|
|
107
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Historie", type: "semibold" }] }),
|
|
108
|
-
textareaId: "story",
|
|
109
|
-
...o("story", { maxLength: { value: 40, message: y } })
|
|
110
|
-
}
|
|
111
|
-
)), T = () => /* @__PURE__ */ e.createElement(a, { size: t.size, error: r.name ? r.name.message : void 0, errorTextId: "error4" }, /* @__PURE__ */ e.createElement(
|
|
112
|
-
B,
|
|
113
|
-
{
|
|
114
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Navn", type: "semibold" }] }),
|
|
115
|
-
placeholder: "Skriv noe!",
|
|
116
|
-
icon: L,
|
|
117
|
-
inputId: "name",
|
|
118
|
-
...o("name", { required: D })
|
|
119
|
-
}
|
|
120
|
-
)), v = () => /* @__PURE__ */ e.createElement(a, { size: t.size, error: r.monster ? r.monster.message : void 0, errorTextId: "error5" }, /* @__PURE__ */ e.createElement(
|
|
121
|
-
N,
|
|
122
|
-
{
|
|
123
|
-
selectId: "monster",
|
|
124
|
-
label: /* @__PURE__ */ e.createElement(n, { labelTexts: [{ text: "Velg et monster", type: "semibold" }] }),
|
|
125
|
-
...o("monster", { validate: F })
|
|
126
|
-
},
|
|
127
|
-
/* @__PURE__ */ e.createElement("option", { value: "Troll" }, "Troll"),
|
|
128
|
-
/* @__PURE__ */ e.createElement("option", { value: "Frankenstein" }, "Frankenstein")
|
|
129
|
-
)), M = () => {
|
|
130
|
-
if (l === "formgroup")
|
|
131
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, x(), S(), b(), f(), T(), v());
|
|
132
|
-
if (l === "checkbox")
|
|
133
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, x());
|
|
134
|
-
if (l === "radiobutton")
|
|
135
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, b());
|
|
136
|
-
if (l === "textarea")
|
|
137
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, f());
|
|
138
|
-
if (l === "input")
|
|
139
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, T());
|
|
140
|
-
if (l === "select")
|
|
141
|
-
return /* @__PURE__ */ e.createElement(e.Fragment, null, v());
|
|
142
|
-
};
|
|
143
|
-
return /* @__PURE__ */ e.createElement(
|
|
144
|
-
"form",
|
|
145
|
-
{
|
|
146
|
-
noValidate: !0,
|
|
147
|
-
onSubmit: z((m) => {
|
|
148
|
-
!q() && console.log(m);
|
|
149
|
-
})
|
|
150
|
-
},
|
|
151
|
-
/* @__PURE__ */ e.createElement(_, { size: t.size, errorTitle: "Sjekk at alt er riktig utfylt:", errors: r }, M()),
|
|
152
|
-
/* @__PURE__ */ e.createElement(R, null),
|
|
153
|
-
/* @__PURE__ */ e.createElement(H, { type: "submit" }, "Send inn")
|
|
154
|
-
);
|
|
155
|
-
};
|
|
156
|
-
export {
|
|
157
|
-
re as FormExample,
|
|
158
|
-
j as FormExampleVariants,
|
|
159
|
-
re as default
|
|
160
|
-
};
|
|
161
|
-
//# sourceMappingURL=FormExample.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormExample.js","sources":["../../../src/components/FormExample/FormExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useForm } from 'react-hook-form';\n\nimport { FormSize } from '../../constants';\nimport { isTest } from '../../utils/environment';\nimport Button from '../Button';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport FormLayout, { FormLayoutColumns } from '../FormLayout';\nimport Hospital from '../Icons/Hospital';\nimport Input from '../Input';\nimport Label from '../Label';\nimport RadioButton from '../RadioButton';\nimport Select from '../Select';\nimport Spacer from '../Spacer';\nimport Textarea from '../Textarea';\nimport Validation from '../Validation';\n\nexport interface FormExampleProps {\n exampleType: FormExampleVariants;\n size?: keyof typeof FormSize;\n}\n\nexport enum FormExampleVariants {\n formgroup = 'formgroup',\n checkbox = 'checkbox',\n radiobutton = 'radiobutton',\n textarea = 'textarea',\n input = 'input',\n select = 'select',\n}\n\ninterface FormExampleData {\n colour: string;\n sizes: string[];\n positions: string;\n story: string;\n name: string;\n monster: string[];\n}\n\nexport const FormExample = (props: FormExampleProps): JSX.Element => {\n const { exampleType = FormExampleVariants.formgroup } = props;\n const {\n register,\n handleSubmit,\n formState: { errors },\n } = useForm<FormExampleData>();\n\n const defaultDate = new Date();\n defaultDate.setHours(0);\n defaultDate.setMinutes(0);\n defaultDate.setSeconds(0);\n const minDate = new Date();\n minDate.setDate(defaultDate.getDate() - 5);\n minDate.setHours(6);\n minDate.setMinutes(10);\n minDate.setSeconds(0);\n const maxDate = new Date();\n maxDate.setDate(defaultDate.getDate() + 5);\n maxDate.setHours(22);\n maxDate.setMinutes(0);\n maxDate.setSeconds(0);\n\n const colorErrorMessage = 'Du må velge minst én farge';\n const sizeErrorMessage = 'Du må velge minst to størrelser';\n const positionErrorMessage = 'Du må velge minst én plassering';\n const storyErrorMessage = 'Historien må være på maks 40 tegn';\n const nameErrorMessage = 'Navn må fylles ut';\n const monsterErrorMessage = 'Du må velge \"Frankenstein\"';\n\n const requireTwo = (value: Array<string>): true | string => {\n return value.length >= 2 || sizeErrorMessage;\n };\n\n const requireFrankenstein = (value: Array<string>): true | string => {\n return value.toString() === 'Frankenstein' || monsterErrorMessage;\n };\n\n const color = () => (\n <FormGroup\n title={'FormGroup-tittel'}\n legend={'Farge'}\n error={errors.colour ? errors.colour.message : undefined}\n errorTextId=\"error\"\n size={props.size}\n >\n <FormLayout maxColumns={FormLayoutColumns.two}>\n <Checkbox\n inputId=\"colour1\"\n label={<Label labelTexts={[{ text: 'Blueberry' }]} />}\n {...register('colour', { required: colorErrorMessage })}\n />\n <Checkbox\n inputId=\"colour2\"\n label={<Label labelTexts={[{ text: 'Cherry' }]} />}\n {...register('colour', { required: colorErrorMessage })}\n />\n <Checkbox\n inputId=\"colour3\"\n label={<Label labelTexts={[{ text: 'Neutral' }]} />}\n {...register('colour', { required: colorErrorMessage })}\n />\n </FormLayout>\n </FormGroup>\n );\n\n const size = () => (\n <FormGroup legend={'Størrelser'} error={errors.sizes ? errors.sizes.message : undefined} size={props.size} errorTextId=\"error1\">\n <Checkbox inputId=\"sizes1\" label={<Label labelTexts={[{ text: 'Small' }]} />} {...register('sizes', { validate: requireTwo })} />\n <Checkbox inputId=\"sizes2\" label={<Label labelTexts={[{ text: 'Medium' }]} />} {...register('sizes', { validate: requireTwo })} />\n <Checkbox inputId=\"sizes3\" label={<Label labelTexts={[{ text: 'Large' }]} />} {...register('sizes', { validate: requireTwo })} />\n </FormGroup>\n );\n\n const position = () => (\n <FormGroup\n legend={'Plassering'}\n error={errors.positions ? (errors.positions.message as string) : undefined}\n size={props.size}\n errorTextId=\"error2\"\n >\n <RadioButton\n inputId=\"positions1\"\n label={<Label labelTexts={[{ text: 'Venstre' }]} />}\n {...register('positions', { required: positionErrorMessage })}\n />\n <RadioButton\n inputId=\"positions2\"\n label={<Label labelTexts={[{ text: 'Høyre' }]} />}\n {...register('positions', { required: positionErrorMessage })}\n />\n <RadioButton\n inputId=\"positions3\"\n label={<Label labelTexts={[{ text: 'Midten' }]} />}\n {...register('positions', { required: positionErrorMessage })}\n />\n </FormGroup>\n );\n\n const story = () => (\n <FormGroup error={errors.story ? (errors.story.message as string) : undefined} errorTextId=\"error3\">\n <Textarea\n defaultValue={`Dette er en test \\n\\n Hello \\n\\n test \\n\\n test test`}\n grow\n maxCharacters={40}\n minRows={5}\n label={<Label labelTexts={[{ text: 'Historie', type: 'semibold' }]} />}\n textareaId=\"story\"\n {...register('story', { maxLength: { value: 40, message: storyErrorMessage } })}\n />\n </FormGroup>\n );\n\n const name = () => (\n <FormGroup size={props.size} error={errors.name ? (errors.name.message as string) : undefined} errorTextId=\"error4\">\n <Input\n label={<Label labelTexts={[{ text: 'Navn', type: 'semibold' }]} />}\n placeholder={'Skriv noe!'}\n icon={Hospital}\n inputId=\"name\"\n {...register('name', { required: nameErrorMessage })}\n />\n </FormGroup>\n );\n\n const monster = () => (\n <FormGroup size={props.size} error={errors.monster ? (errors.monster.message as string) : undefined} errorTextId=\"error5\">\n <Select\n selectId=\"monster\"\n label={<Label labelTexts={[{ text: 'Velg et monster', type: 'semibold' }]} />}\n {...register('monster', { validate: requireFrankenstein })}\n >\n <option value={'Troll'}>{'Troll'}</option>\n <option value={'Frankenstein'}>{'Frankenstein'}</option>\n </Select>\n </FormGroup>\n );\n\n const getFormExample = () => {\n if (exampleType === FormExampleVariants.formgroup) {\n return (\n <>\n {color()}\n {size()}\n {position()}\n {story()}\n {name()}\n {monster()}\n </>\n );\n } else if (exampleType === FormExampleVariants.checkbox) {\n return <>{color()}</>;\n } else if (exampleType === FormExampleVariants.radiobutton) {\n return <>{position()}</>;\n } else if (exampleType === FormExampleVariants.textarea) {\n return <>{story()}</>;\n } else if (exampleType === FormExampleVariants.input) {\n return <>{name()}</>;\n } else if (exampleType === FormExampleVariants.select) {\n return <>{monster()}</>;\n }\n };\n\n return (\n <form\n noValidate\n onSubmit={handleSubmit(data => {\n // eslint-disable-next-line no-console\n !isTest() && console.log(data);\n })}\n >\n <Validation size={props.size} errorTitle={'Sjekk at alt er riktig utfylt:'} errors={errors}>\n {getFormExample()}\n </Validation>\n <Spacer />\n <Button type=\"submit\">{'Send inn'}</Button>\n </form>\n );\n};\n\nexport default FormExample;\n"],"names":["FormExampleVariants","FormExample","props","exampleType","register","handleSubmit","errors","useForm","defaultDate","minDate","maxDate","colorErrorMessage","sizeErrorMessage","positionErrorMessage","storyErrorMessage","nameErrorMessage","monsterErrorMessage","requireTwo","value","requireFrankenstein","color","React","FormGroup","FormLayout","FormLayoutColumns","Checkbox","Label","size","position","RadioButton","story","Textarea","name","Input","Hospital","monster","Select","getFormExample","data","isTest","Validation","Spacer","Button"],"mappings":";;;;;;;;;;;;;;;AAwBY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,cAAc,eACdA,EAAA,WAAW,YACXA,EAAA,QAAQ,SACRA,EAAA,SAAS,UANCA,IAAAA,KAAA,CAAA,CAAA;AAkBC,MAAAC,KAAc,CAACC,MAAyC;AAC7D,QAAA;AAAA,IAAE,aAAAC,IAAc;AAAA;AAAA,EAAkC,IAAAD,GAClD;AAAA,IACJ,UAAAE;AAAA,IACA,cAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,EAAO;AAAA,MAClBC,EAAyB,GAEvBC,wBAAkB;AACxB,EAAAA,EAAY,SAAS,CAAC,GACtBA,EAAY,WAAW,CAAC,GACxBA,EAAY,WAAW,CAAC;AAClB,QAAAC,wBAAc;AACpB,EAAAA,EAAQ,QAAQD,EAAY,QAAQ,IAAI,CAAC,GACzCC,EAAQ,SAAS,CAAC,GAClBA,EAAQ,WAAW,EAAE,GACrBA,EAAQ,WAAW,CAAC;AACd,QAAAC,wBAAc;AACpB,EAAAA,EAAQ,QAAQF,EAAY,QAAQ,IAAI,CAAC,GACzCE,EAAQ,SAAS,EAAE,GACnBA,EAAQ,WAAW,CAAC,GACpBA,EAAQ,WAAW,CAAC;AAEpB,QAAMC,IAAoB,8BACpBC,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AA,cAACmB,KAAW,MAAMtC,EAAM,MAAM,YAAY,kCAAkC,QAAAI,EACzE,GAAA+B,EAAA,CACH;AAAA,oCACCI,GAAO,IAAA;AAAA,IACPpB,gBAAAA,EAAA,cAAAqB,GAAA,EAAO,MAAK,SAAA,GAAU,UAAW;AAAA,EAAA;AAGxC;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
@use 'sass:map';
|
|
2
|
-
@import '../../scss/spacers';
|
|
3
|
-
@import '../../scss/breakpoints';
|
|
4
|
-
|
|
5
|
-
.date-time {
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-flow: column wrap;
|
|
8
|
-
|
|
9
|
-
@media (min-width: map.get($grid-breakpoints, sm)) {
|
|
10
|
-
flex-direction: row;
|
|
11
|
-
align-items: flex-end;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&__date-picker {
|
|
15
|
-
padding-right: getSpacer(l);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&__time-wrapper {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: flex-end;
|
|
21
|
-
padding-top: getSpacer(m);
|
|
22
|
-
|
|
23
|
-
@media (min-width: map.get($grid-breakpoints, sm)) {
|
|
24
|
-
padding-top: 0;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
&__time-separator {
|
|
29
|
-
margin-bottom: getSpacer(xs);
|
|
30
|
-
margin-right: getSpacer(xs);
|
|
31
|
-
margin-left: getSpacer(2xs);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type Styles = {
|
|
2
|
-
'date-time': string;
|
|
3
|
-
'date-time__date-picker': string;
|
|
4
|
-
'date-time__time-separator': string;
|
|
5
|
-
'date-time__time-wrapper': string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export type ClassNames = keyof Styles;
|
|
9
|
-
|
|
10
|
-
declare const styles: Styles;
|
|
11
|
-
|
|
12
|
-
export default styles;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import r, { useState as U } from "react";
|
|
2
|
-
import d from "classnames";
|
|
3
|
-
import { FormMode as x, FormSize as N, AnalyticsId as A } from "../../constants.js";
|
|
4
|
-
import { useUuid as T } from "../../hooks/useUuid.js";
|
|
5
|
-
import { isComponent as m } from "../../utils/component.js";
|
|
6
|
-
import { Checkbox as D } from "../Checkbox/Checkbox.js";
|
|
7
|
-
import { ErrorWrapper as H } from "../ErrorWrapper/ErrorWrapper.js";
|
|
8
|
-
import { FormLayout as j } from "../FormLayout/FormLayout.js";
|
|
9
|
-
import q from "../Input/Input.js";
|
|
10
|
-
import { RadioButton as J, getRadioLabelClasses as K } from "../RadioButton/RadioButton.js";
|
|
11
|
-
import { Select as O } from "../Select/Select.js";
|
|
12
|
-
import P from "../Textarea/Textarea.js";
|
|
13
|
-
import { Title as Q } from "../Title/Title.js";
|
|
14
|
-
import p from "../FormGroup/styles.module.scss";
|
|
15
|
-
const k = r.forwardRef((t, _) => {
|
|
16
|
-
const {
|
|
17
|
-
className: F,
|
|
18
|
-
fieldsetClassName: G,
|
|
19
|
-
mode: a = x.onwhite,
|
|
20
|
-
size: s = N.medium,
|
|
21
|
-
error: o,
|
|
22
|
-
errorTextId: y,
|
|
23
|
-
name: l,
|
|
24
|
-
htmlMarkup: f = "fieldset",
|
|
25
|
-
renderError: R = !0,
|
|
26
|
-
errorWrapperClassName: b,
|
|
27
|
-
errorWrapperTestId: w
|
|
28
|
-
} = t, [S, W] = U(), v = T(), n = T(y), u = a === x.ondark, L = s === N.large, M = d(p["form-group-wrapper"], F), z = d({
|
|
29
|
-
[p["form-group-wrapper__title--on-dark"]]: u && !o
|
|
30
|
-
}), c = d(p["field-set__legend"], {
|
|
31
|
-
[p["field-set__legend--on-dark"]]: u && !o
|
|
32
|
-
}), I = d(p["field-set"], G), i = (e, B) => {
|
|
33
|
-
if (m(e, j))
|
|
34
|
-
return r.cloneElement(e, {
|
|
35
|
-
size: s,
|
|
36
|
-
mapHelper: i
|
|
37
|
-
});
|
|
38
|
-
if (m(e, k))
|
|
39
|
-
return r.cloneElement(e, {
|
|
40
|
-
mode: a,
|
|
41
|
-
size: s,
|
|
42
|
-
error: o,
|
|
43
|
-
renderError: !1,
|
|
44
|
-
errorTextId: n
|
|
45
|
-
});
|
|
46
|
-
if (m(e, D))
|
|
47
|
-
return r.cloneElement(e, {
|
|
48
|
-
name: l ?? e.props.name,
|
|
49
|
-
mode: a,
|
|
50
|
-
size: s,
|
|
51
|
-
error: !!o,
|
|
52
|
-
errorTextId: n
|
|
53
|
-
});
|
|
54
|
-
if (m(e, J)) {
|
|
55
|
-
const C = typeof e.props.inputId > "u" ? v + B : e.props.inputId;
|
|
56
|
-
return r.cloneElement(e, {
|
|
57
|
-
inputId: C,
|
|
58
|
-
name: l ?? e.props.name,
|
|
59
|
-
mode: a,
|
|
60
|
-
size: s,
|
|
61
|
-
onChange: (E) => {
|
|
62
|
-
W(E.target.id), e.props.onChange && e.props.onChange(E);
|
|
63
|
-
},
|
|
64
|
-
error: !!o,
|
|
65
|
-
errorTextId: n,
|
|
66
|
-
labelClassNames: K(C, a, L, S)
|
|
67
|
-
});
|
|
68
|
-
} else {
|
|
69
|
-
if (m(e, q))
|
|
70
|
-
return r.cloneElement(e, {
|
|
71
|
-
name: l ?? e.props.name,
|
|
72
|
-
mode: a,
|
|
73
|
-
size: s,
|
|
74
|
-
error: !!o,
|
|
75
|
-
errorTextId: n
|
|
76
|
-
});
|
|
77
|
-
if (m(e, P))
|
|
78
|
-
return r.cloneElement(e, {
|
|
79
|
-
name: l ?? e.props.name,
|
|
80
|
-
mode: a,
|
|
81
|
-
error: !!o,
|
|
82
|
-
errorTextId: n
|
|
83
|
-
});
|
|
84
|
-
if (m(e, O))
|
|
85
|
-
return r.cloneElement(e, {
|
|
86
|
-
name: l ?? e.props.name,
|
|
87
|
-
mode: a,
|
|
88
|
-
error: !!o,
|
|
89
|
-
errorTextId: n
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
return e;
|
|
93
|
-
}, g = () => /* @__PURE__ */ r.createElement("div", null, f === "div" && /* @__PURE__ */ r.createElement("div", { className: I }, t.legend && /* @__PURE__ */ r.createElement("h5", { className: c }, t.legend), r.Children.map(t.children, i)), f === "fieldset" && /* @__PURE__ */ r.createElement("fieldset", { name: t.fieldsetName, className: I }, t.legend && /* @__PURE__ */ r.createElement("legend", { className: c }, t.legend), r.Children.map(t.children, i)));
|
|
94
|
-
return /* @__PURE__ */ r.createElement("div", { "data-testid": t.testId, "data-analyticsid": A.FormGroup, className: M, ref: _, tabIndex: -1 }, t.title && /* @__PURE__ */ r.createElement(Q, { className: z, htmlMarkup: "h4", appearance: "title4", margin: { marginTop: 0, marginBottom: o ? 1 : 2 } }, t.title), R ? /* @__PURE__ */ r.createElement(H, { className: b, errorText: o, testId: w, errorTextId: n }, g()) : g());
|
|
95
|
-
});
|
|
96
|
-
k.displayName = "FormGroup";
|
|
97
|
-
export {
|
|
98
|
-
k as FormGroup,
|
|
99
|
-
k as default
|
|
100
|
-
};
|
|
101
|
-
//# sourceMappingURL=FormGroup.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup.js","sources":["../../../src/components/FormGroup/FormGroup.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, FormSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { isComponent } from '../../utils/component';\nimport Checkbox, { CheckboxProps } from '../Checkbox/Checkbox';\nimport ErrorWrapper from '../ErrorWrapper';\nimport FormLayout, { FormLayoutProps } from '../FormLayout';\nimport Input, { InputProps } from '../Input/Input';\nimport RadioButton, { RadioButtonProps, getRadioLabelClasses } from '../RadioButton/RadioButton';\nimport Select, { SelectProps } from '../Select';\nimport Textarea, { TextareaProps } from '../Textarea';\nimport Title from '../Title';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport type FormGroupTags = 'fieldset' | 'div';\n\nexport interface FormGroupProps {\n /** title for the the fieldset */\n title?: string;\n /** text placed in the legend tag of the fieldset */\n legend?: string;\n /** Items in the FormGroup component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the errorWrapper. */\n errorWrapperClassName?: string;\n /** Adds custom classes to the fieldset element. */\n fieldsetClassName?: string;\n /** Changes the visuals of the formgroup */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Error message */\n error?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error-wrapper. */\n errorWrapperTestId?: string;\n /** Unique name for the child input element */\n name?: string;\n /** Unique name for the fieldset */\n fieldsetName?: string;\n /** Sets div instead of fieldset tag */\n htmlMarkup?: FormGroupTags;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n}\n\nexport const FormGroup = React.forwardRef((props: FormGroupProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {\n className,\n fieldsetClassName,\n mode = FormMode.onwhite,\n size = FormSize.medium,\n error,\n errorTextId,\n name,\n htmlMarkup = 'fieldset',\n renderError = true,\n errorWrapperClassName,\n errorWrapperTestId,\n } = props;\n const [checkedRadioId, setCheckedRadioId] = useState<string>();\n const radioGroupId = useUuid();\n const errorTextUuid = useUuid(errorTextId);\n const onDark = mode === FormMode.ondark;\n const isLarge = size === FormSize.large;\n const formGroupWrapperClasses = classNames(formGroupStyles['form-group-wrapper'], className);\n const titleClasses = classNames({\n [formGroupStyles['form-group-wrapper__title--on-dark']]: onDark && !error,\n });\n\n const legendClasses = classNames(formGroupStyles['field-set__legend'], {\n [formGroupStyles['field-set__legend--on-dark']]: onDark && !error,\n });\n\n const fieldsetClasses = classNames(formGroupStyles['field-set'], fieldsetClassName);\n\n const mapFormComponent = (child: React.ReactNode, index: number): React.ReactNode => {\n if (isComponent<FormLayoutProps>(child, FormLayout)) {\n return React.cloneElement(child, {\n size,\n mapHelper: mapFormComponent,\n });\n } else if (isComponent<FormGroupProps>(child, FormGroup)) {\n return React.cloneElement(child, {\n mode,\n size,\n error,\n renderError: false,\n errorTextId: errorTextUuid,\n });\n } else if (isComponent<CheckboxProps>(child, Checkbox)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n mode,\n size,\n error: !!error,\n errorTextId: errorTextUuid,\n });\n } else if (isComponent<RadioButtonProps>(child, RadioButton)) {\n const radioId = typeof child.props.inputId === 'undefined' ? radioGroupId + index : child.props.inputId;\n return React.cloneElement(child, {\n inputId: radioId,\n name: name ?? child.props.name,\n mode,\n size,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => {\n setCheckedRadioId(event.target.id);\n child.props.onChange && child.props.onChange(event);\n },\n error: !!error,\n errorTextId: errorTextUuid,\n labelClassNames: getRadioLabelClasses(radioId, mode as FormMode, isLarge, checkedRadioId),\n });\n } else if (isComponent<InputProps>(child, Input)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n mode,\n size,\n error: !!error,\n errorTextId: errorTextUuid,\n });\n } else if (isComponent<TextareaProps>(child, Textarea)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n mode,\n error: !!error,\n errorTextId: errorTextUuid,\n });\n } else if (isComponent<SelectProps>(child, Select)) {\n return React.cloneElement(child, {\n name: name ?? child.props.name,\n mode,\n error: !!error,\n errorTextId: errorTextUuid,\n });\n }\n return child;\n };\n\n const formGroupContent = (): React.ReactNode => {\n return (\n <div>\n {htmlMarkup === 'div' && (\n <div className={fieldsetClasses}>\n {props.legend && <h5 className={legendClasses}>{props.legend}</h5>}\n {React.Children.map(props.children, mapFormComponent)}\n </div>\n )}\n {htmlMarkup === 'fieldset' && (\n <fieldset name={props.fieldsetName} className={fieldsetClasses}>\n {props.legend && <legend className={legendClasses}>{props.legend}</legend>}\n {React.Children.map(props.children, mapFormComponent)}\n </fieldset>\n )}\n </div>\n );\n };\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormGroup} className={formGroupWrapperClasses} ref={ref} tabIndex={-1}>\n {props.title && (\n <Title className={titleClasses} htmlMarkup={'h4'} appearance={'title4'} margin={{ marginTop: 0, marginBottom: error ? 1 : 2 }}>\n {props.title}\n </Title>\n )}\n {renderError ? (\n <ErrorWrapper className={errorWrapperClassName} errorText={error} testId={errorWrapperTestId} errorTextId={errorTextUuid}>\n {formGroupContent()}\n </ErrorWrapper>\n ) : (\n formGroupContent()\n )}\n </div>\n );\n});\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"names":["FormGroup","React","props","ref","className","fieldsetClassName","mode","FormMode","size","FormSize","error","errorTextId","name","htmlMarkup","renderError","errorWrapperClassName","errorWrapperTestId","checkedRadioId","setCheckedRadioId","useState","radioGroupId","useUuid","errorTextUuid","onDark","isLarge","formGroupWrapperClasses","classNames","formGroupStyles","titleClasses","legendClasses","fieldsetClasses","mapFormComponent","child","index","isComponent","FormLayout","Checkbox","RadioButton","radioId","event","getRadioLabelClasses","Input","Textarea","Select","formGroupContent","AnalyticsId","Title","ErrorWrapper"],"mappings":";;;;;;;;;;;;;;AAuDO,MAAMA,IAAYC,EAAM,WAAW,CAACC,GAAuBC,MAA4C;AACtG,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,MAAAC,IAAOC,EAAS;AAAA,IAChB,MAAAC,IAAOC,EAAS;AAAA,IAChB,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,MAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,uBAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAd,GACE,CAACe,GAAgBC,CAAiB,IAAIC,EAAiB,GACvDC,IAAeC,KACfC,IAAgBD,EAAQV,CAAW,GACnCY,IAASjB,MAASC,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,UAAA,EAAO,WAAW4B,EAAgB,GAAA3B,EAAM,MAAO,GAChED,EAAM,SAAS,IAAIC,EAAM,UAAU6B,CAAgB,CACtD,CAEJ;AAKF,SAAA9B,gBAAAA,EAAA,cAAC,SAAI,eAAaC,EAAM,QAAQ,oBAAkB2C,EAAY,WAAW,WAAWpB,GAAyB,KAAAtB,GAAU,UAAU,GAC9H,GAAAD,EAAM,SACLD,gBAAAA,EAAA,cAAC6C,GAAM,EAAA,WAAWlB,GAAc,YAAY,MAAM,YAAY,UAAU,QAAQ,EAAE,WAAW,GAAG,cAAclB,IAAQ,IAAI,OACvHR,EAAM,KACT,GAEDY,IACEb,gBAAAA,EAAA,cAAA8C,GAAA,EAAa,WAAWhC,GAAuB,WAAWL,GAAO,QAAQM,GAAoB,aAAaM,KACxGsB,EACH,CAAA,IAEAA,EAEJ,CAAA;AAEJ,CAAC;AAED5C,EAAU,cAAc;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import i from "classnames";
|
|
3
|
-
import { FormSize as y, AnalyticsId as p } from "../../constants.js";
|
|
4
|
-
import t from "../FormLayout/styles.module.scss";
|
|
5
|
-
var v = /* @__PURE__ */ ((e) => (e.one = "one", e.two = "two", e.three = "three", e.four = "four", e.five = "five", e))(v || {});
|
|
6
|
-
const w = r.forwardRef((e, m) => {
|
|
7
|
-
const { maxColumns: o = "one", colMinWidth: s = 300, size: f, className: c, mapHelper: a } = e, n = { "--min-col-width": `${s}px` }, d = i(
|
|
8
|
-
t["form-layout-container"],
|
|
9
|
-
{
|
|
10
|
-
[t["form-layout-container--large"]]: f === y.large
|
|
11
|
-
},
|
|
12
|
-
c
|
|
13
|
-
), u = i(t["form-layout-child"], {
|
|
14
|
-
[t["form-layout-child--two"]]: o === "two",
|
|
15
|
-
[t["form-layout-child--three"]]: o === "three",
|
|
16
|
-
[t["form-layout-child--four"]]: o === "four",
|
|
17
|
-
[t["form-layout-child--five"]]: o === "five"
|
|
18
|
-
/* five */
|
|
19
|
-
});
|
|
20
|
-
return /* @__PURE__ */ r.createElement(
|
|
21
|
-
"div",
|
|
22
|
-
{
|
|
23
|
-
"data-testid": e.testId,
|
|
24
|
-
"data-analyticsid": p.FormLayout,
|
|
25
|
-
style: n,
|
|
26
|
-
className: d,
|
|
27
|
-
ref: m
|
|
28
|
-
},
|
|
29
|
-
r.Children.map(e.children, (l, h) => /* @__PURE__ */ r.createElement("div", { className: u }, a ? a(l, h) : l))
|
|
30
|
-
);
|
|
31
|
-
});
|
|
32
|
-
w.displayName = "FormLayout";
|
|
33
|
-
export {
|
|
34
|
-
w as FormLayout,
|
|
35
|
-
v as FormLayoutColumns,
|
|
36
|
-
w as default
|
|
37
|
-
};
|
|
38
|
-
//# sourceMappingURL=FormLayout.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormLayout.js","sources":["../../../src/components/FormLayout/FormLayout.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormSize } from '../../constants';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport enum FormLayoutColumns {\n one = 'one',\n two = 'two',\n three = 'three',\n four = 'four',\n five = 'five',\n}\n\nexport interface FormLayoutProps {\n /** The max number of columns that will exist if space is available */\n maxColumns?: keyof typeof FormLayoutColumns;\n /** Sets the minimum width for the columns in pixels - this determines how many will fit on a row */\n colMinWidth?: number;\n /** Items in the FormLayout component */\n children?: React.ReactNode;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Function that helps map the form children */\n mapHelper?: (child: React.ReactNode, index: number) => React.ReactNode;\n}\n\nexport const FormLayout = React.forwardRef((props: FormLayoutProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const { maxColumns: columns = FormLayoutColumns.one, colMinWidth = 300, size, className, mapHelper } = props;\n\n const cssVariable = { '--min-col-width': `${colMinWidth}px` } as React.CSSProperties;\n const formLayoutContainerClasses = classNames(\n formGroupStyles['form-layout-container'],\n {\n [formGroupStyles['form-layout-container--large']]: size === FormSize.large,\n },\n className\n );\n const formLayoutChildClasses = classNames(formGroupStyles['form-layout-child'], {\n [formGroupStyles['form-layout-child--two']]: columns === FormLayoutColumns.two,\n [formGroupStyles['form-layout-child--three']]: columns === FormLayoutColumns.three,\n [formGroupStyles['form-layout-child--four']]: columns === FormLayoutColumns.four,\n [formGroupStyles['form-layout-child--five']]: columns === FormLayoutColumns.five,\n });\n\n return (\n <div\n data-testid={props.testId}\n data-analyticsid={AnalyticsId.FormLayout}\n style={cssVariable}\n className={formLayoutContainerClasses}\n ref={ref}\n >\n {React.Children.map(props.children, (child: React.ReactNode, index: number) => {\n return <div className={formLayoutChildClasses}>{mapHelper ? mapHelper(child, index) : child}</div>;\n })}\n </div>\n );\n});\n\nFormLayout.displayName = 'FormLayout';\n\nexport default FormLayout;\n"],"names":["FormLayoutColumns","FormLayout","React","props","ref","columns","colMinWidth","size","className","mapHelper","cssVariable","formLayoutContainerClasses","classNames","formGroupStyles","FormSize","formLayoutChildClasses","AnalyticsId","child","index"],"mappings":";;;;AAQY,IAAAA,sBAAAA,OACVA,EAAA,MAAM,OACNA,EAAA,MAAM,OACNA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,OAAO,QALGA,IAAAA,KAAA,CAAA,CAAA;AAyBL,MAAMC,IAAaC,EAAM,WAAW,CAACC,GAAwBC,MAA4C;AACxG,QAAA,EAAE,YAAYC,IAAU,OAAuB,aAAAC,IAAc,KAAK,MAAAC,GAAM,WAAAC,GAAW,WAAAC,EAAc,IAAAN,GAEjGO,IAAc,EAAE,mBAAmB,GAAGJ,CAAW,QACjDK,IAA6BC;AAAA,IACjCC,EAAgB,uBAAuB;AAAA,IACvC;AAAA,MACE,CAACA,EAAgB,8BAA8B,CAAC,GAAGN,MAASO,EAAS;AAAA,IACvE;AAAA,IACAN;AAAA,EAAA,GAEIO,IAAyBH,EAAWC,EAAgB,mBAAmB,GAAG;AAAA,IAC9E,CAACA,EAAgB,wBAAwB,CAAC,GAAGR,MAAY;AAAA,IACzD,CAACQ,EAAgB,0BAA0B,CAAC,GAAGR,MAAY;AAAA,IAC3D,CAACQ,EAAgB,yBAAyB,CAAC,GAAGR,MAAY;AAAA,IAC1D,CAACQ,EAAgB,yBAAyB,CAAC,GAAGR,MAAY;AAAA;AAAA,EAAA,CAC3D;AAGC,SAAAH,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAaC,EAAM;AAAA,MACnB,oBAAkBa,EAAY;AAAA,MAC9B,OAAON;AAAA,MACP,WAAWC;AAAA,MACX,KAAAP;AAAA,IAAA;AAAA,IAECF,EAAM,SAAS,IAAIC,EAAM,UAAU,CAACc,GAAwBC,MACpDhB,gBAAAA,EAAA,cAAC,SAAI,WAAWa,EAAA,GAAyBN,IAAYA,EAAUQ,GAAOC,CAAK,IAAID,CAAM,CAC7F;AAAA,EAAA;AAGP,CAAC;AAEDhB,EAAW,cAAc;"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import { isSupernova as r } from "../../docs/index.js";
|
|
3
|
-
const l = ({ gridLayout: a = r(), children: t }) => r() || a === "padding" ? /* @__PURE__ */ e.createElement("div", { style: { padding: "0.5rem" } }, t) : a === "helsenorge" ? /* @__PURE__ */ e.createElement("div", { className: "container py-5" }, /* @__PURE__ */ e.createElement("div", { className: "row" }, /* @__PURE__ */ e.createElement("div", { className: "col" }, t))) : /* @__PURE__ */ e.createElement(e.Fragment, null, t);
|
|
4
|
-
export {
|
|
5
|
-
l as GridExample,
|
|
6
|
-
l as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=GridExample.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GridExample.js","sources":["../../../src/components/GridExample/GridExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport { isSupernova } from '../../docs';\n\ntype GridLayout = 'helsenorge' | 'padding' | 'none';\n\ninterface GridExampleProps {\n gridLayout: GridLayout;\n children?: React.ReactNode;\n}\n\nexport const GridExample: React.FC<GridExampleProps> = ({ gridLayout = isSupernova(), children }) => {\n if (isSupernova() || gridLayout === 'padding') {\n return <div style={{ padding: '0.5rem' }}>{children}</div>;\n }\n\n if (gridLayout === 'helsenorge') {\n return (\n <div className=\"container py-5\">\n <div className=\"row\">\n <div className=\"col\">{children}</div>\n </div>\n </div>\n );\n }\n\n return <>{children}</>;\n};\n\nexport default GridExample;\n"],"names":["GridExample","gridLayout","isSupernova","children","React"],"mappings":";;AAWO,MAAMA,IAA0C,CAAC,EAAE,YAAAC,IAAaC,EAAY,GAAG,UAAAC,QAChFD,EAAA,KAAiBD,MAAe,4CAC1B,OAAI,EAAA,OAAO,EAAE,SAAS,SAAA,KAAaE,CAAS,IAGlDF,MAAe,eAEdG,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAU,oDACZ,OAAI,EAAA,WAAU,MACb,GAAAA,gBAAAA,EAAA,cAAC,OAAI,EAAA,WAAU,MAAO,GAAAD,CAAS,CACjC,CACF,sDAIMA,CAAS;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import c from "classnames";
|
|
3
|
-
import { AnalyticsId as L } from "../../constants.js";
|
|
4
|
-
import H from "../AnchorLink/AnchorLink.js";
|
|
5
|
-
import w from "../Close/Close.js";
|
|
6
|
-
import A, { PopOverVariant as I } from "../PopOver/PopOver.js";
|
|
7
|
-
import t from "../HelpBubble/styles.module.scss";
|
|
8
|
-
const M = I, R = e.forwardRef((b, m) => {
|
|
9
|
-
const {
|
|
10
|
-
children: u,
|
|
11
|
-
className: p = "",
|
|
12
|
-
noCloseButton: n,
|
|
13
|
-
linkText: r = "Mer hjelp",
|
|
14
|
-
linkUrl: o,
|
|
15
|
-
linkTarget: f,
|
|
16
|
-
onLinkClick: a,
|
|
17
|
-
onClose: d,
|
|
18
|
-
closeAriaLabel: h,
|
|
19
|
-
// Props passed on to PopOver
|
|
20
|
-
showBubble: s,
|
|
21
|
-
helpBubbleId: k,
|
|
22
|
-
variant: _,
|
|
23
|
-
controllerRef: B,
|
|
24
|
-
role: i,
|
|
25
|
-
testId: C
|
|
26
|
-
} = b, l = i === "tooltip";
|
|
27
|
-
if (!s && !l)
|
|
28
|
-
return null;
|
|
29
|
-
const E = c(t.helpbubble, p), N = c(t.helpbubble__content, {
|
|
30
|
-
[t["helpbubble__content--close"]]: !n && !l
|
|
31
|
-
}), v = () => {
|
|
32
|
-
if (!l) {
|
|
33
|
-
if (a && r)
|
|
34
|
-
return /* @__PURE__ */ e.createElement("button", { className: t.helpbubble__link, onClick: a, type: "button" }, r);
|
|
35
|
-
if (o && r)
|
|
36
|
-
return /* @__PURE__ */ e.createElement(H, { href: o, target: f }, r);
|
|
37
|
-
}
|
|
38
|
-
}, y = () => {
|
|
39
|
-
if (!(n || l))
|
|
40
|
-
return /* @__PURE__ */ e.createElement("div", { className: t.helpbubble__close }, /* @__PURE__ */ e.createElement(w, { small: !0, onClick: d, ariaLabel: h }));
|
|
41
|
-
};
|
|
42
|
-
return /* @__PURE__ */ e.createElement(
|
|
43
|
-
A,
|
|
44
|
-
{
|
|
45
|
-
id: k,
|
|
46
|
-
variant: _,
|
|
47
|
-
controllerRef: B,
|
|
48
|
-
role: i,
|
|
49
|
-
ref: m,
|
|
50
|
-
show: l && s,
|
|
51
|
-
testId: C
|
|
52
|
-
},
|
|
53
|
-
/* @__PURE__ */ e.createElement("div", { className: E, "data-analyticsid": L.HelpBubble }, y(), /* @__PURE__ */ e.createElement("div", { className: N }, u, v()))
|
|
54
|
-
);
|
|
55
|
-
});
|
|
56
|
-
R.displayName = "HelpBubble";
|
|
57
|
-
export {
|
|
58
|
-
M as HelpBubbleVariant,
|
|
59
|
-
R as default
|
|
60
|
-
};
|
|
61
|
-
//# sourceMappingURL=HelpBubble.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelpBubble.js","sources":["../../../src/components/HelpBubble/HelpBubble.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport AnchorLink, { AnchorLinkTargets } from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverProps, PopOverVariant } from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\ntype HelpBubbleRole = 'tooltip';\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. Note that if role=\"tooltip\", you must not include interactive/focusable elements. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement>;\n /** Adds custom classes to the element. */\n className?: string;\n /** Determines the placement of the helpbubble. Default: automatic positioning. */\n variant?: keyof typeof HelpBubbleVariant;\n /** Show the bubble. Default: false. */\n showBubble?: boolean;\n /** Hide the close button in the bubble. Close button is never rendered if role=\"tooltip\". */\n noCloseButton?: boolean;\n /** Visible text on the link. Link is never rendered if role=\"tooltip\". */\n linkText?: string;\n /** Url the link leads to */\n linkUrl?: string;\n /** Sets the target type of the link. _blank adds an arrow icon at the end of the link */\n linkTarget?: AnchorLinkTargets;\n /** Function is called when link is clicked */\n onLinkClick?: () => void;\n /** Function is called when user clicks the button */\n onClose?: () => void;\n /** aria-label to be passed onto Close */\n closeAriaLabel?: string;\n /** Sets role of the HelpBubble element. If set to \"tooltip\", */\n role?: HelpBubbleRole;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst HelpBubble = React.forwardRef<HTMLDivElement | SVGSVGElement, HelpBubbleProps>((props, ref) => {\n const {\n children,\n className = '',\n noCloseButton,\n linkText = 'Mer hjelp',\n linkUrl,\n linkTarget,\n onLinkClick,\n onClose,\n closeAriaLabel,\n // Props passed on to PopOver\n showBubble,\n helpBubbleId,\n variant,\n controllerRef,\n role,\n testId,\n } = props;\n\n const isTooltip = role === 'tooltip';\n\n if (!showBubble && !isTooltip) {\n return null;\n }\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n\n const contentClasses = classNames(styles.helpbubble__content, {\n [styles['helpbubble__content--close']]: !noCloseButton && !isTooltip,\n });\n\n const renderLink = (): JSX.Element | undefined => {\n // Det er ikke tillatt med interaktive/fokuserbare elementer i role=\"tooltip\"\n if (isTooltip) {\n return;\n }\n if (onLinkClick && linkText) {\n return (\n <button className={styles.helpbubble__link} onClick={onLinkClick} type=\"button\">\n {linkText}\n </button>\n );\n } else if (linkUrl && linkText) {\n return (\n <AnchorLink href={linkUrl} target={linkTarget}>\n {linkText}\n </AnchorLink>\n );\n }\n };\n\n const renderCloseButton = (): JSX.Element | undefined => {\n if (noCloseButton || isTooltip) {\n return;\n }\n return (\n <div className={styles.helpbubble__close}>\n <Close small onClick={onClose} ariaLabel={closeAriaLabel} />\n </div>\n );\n };\n\n return (\n <PopOver\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role={role}\n ref={ref}\n show={isTooltip && showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n {renderCloseButton()}\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n </div>\n </PopOver>\n );\n});\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n"],"names":["HelpBubbleVariant","PopOverVariant","HelpBubble","React","props","ref","children","className","noCloseButton","linkText","linkUrl","linkTarget","onLinkClick","onClose","closeAriaLabel","showBubble","helpBubbleId","variant","controllerRef","role","testId","isTooltip","helpBubbleClasses","classNames","styles","contentClasses","renderLink","AnchorLink","renderCloseButton","Close","PopOver","Analytics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,SAAAC;AAAA,MACA,eAAAC;AAAA,MACA,MAAAC;AAAA,MACA,KAAAd;AAAA,MACA,MAAMgB,KAAaN;AAAA,MACnB,QAAAK;AAAA,IAAA;AAAA,oCAEC,OAAI,EAAA,WAAWE,GAAmB,oBAAkBS,EAAY,cAC9DH,EACD,GAAAzB,gBAAAA,EAAA,cAAC,SAAI,WAAWsB,KACbnB,GACAoB,EAAA,CACH,CACF;AAAA,EAAA;AAGN,CAAC;AAEDxB,EAAW,cAAc;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import e, { useRef as o } from "react";
|
|
2
|
-
import a from "../HelpBubble/HelpBubble.js";
|
|
3
|
-
const r = (i) => {
|
|
4
|
-
const t = o(null);
|
|
5
|
-
return /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("span", null, "Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non."), /* @__PURE__ */ e.createElement("div", { style: { position: "relative", display: "inline" } }, /* @__PURE__ */ e.createElement("span", { ref: t, style: { display: "inline-block", color: "red" } }, "Jeg er en tooltip tekst."), /* @__PURE__ */ e.createElement(
|
|
6
|
-
a,
|
|
7
|
-
{
|
|
8
|
-
...i,
|
|
9
|
-
onClose: () => {
|
|
10
|
-
alert("Bubble closed");
|
|
11
|
-
},
|
|
12
|
-
controllerRef: t
|
|
13
|
-
},
|
|
14
|
-
i.children
|
|
15
|
-
)), /* @__PURE__ */ e.createElement("span", null, "Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non."));
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
r as default
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=HelpBubbleExample.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelpBubbleExample.js","sources":["../../../src/components/HelpBubbleExample/HelpBubbleExample.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport HelpBubble, { HelpBubbleProps } from '../HelpBubble/HelpBubble';\n\nconst HelpBubbleExample: React.FC<HelpBubbleProps> = props => {\n const controllerRef = useRef<HTMLSpanElement>(null);\n\n return (\n <div>\n <span>\n {\n 'Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non.'\n }\n </span>\n <div style={{ position: 'relative', display: 'inline' }}>\n <span ref={controllerRef} style={{ display: 'inline-block', color: 'red' }}>\n {'Jeg er en tooltip tekst.'}\n </span>\n <HelpBubble\n {...props}\n onClose={() => {\n alert('Bubble closed');\n }}\n controllerRef={controllerRef}\n >\n {props.children}\n </HelpBubble>\n </div>\n <span>\n {\n 'Consequat adipisicing nostrud non in labore sunt consequat mollit dolore quis voluptate eu veniam adipisicing. Dolor ipsum excepteur anim id ea dolore esse. Sint exercitation duis pariatur in qui ea reprehenderit consectetur sunt minim in ut cupidatat dolore. Eiusmod ut Lorem nostrud id adipisicing ullamco enim. Velit officia mollit laboris amet reprehenderit ad. Nisi cupidatat dolor voluptate officia mollit eu nostrud ipsum. Dolor labore ullamco nostrud consectetur dolor duis qui magna reprehenderit. Esse reprehenderit dolor fugiat sunt adipisicing est. Aliquip duis pariatur labore amet sit occaecat ea eiusmod cillum. Adipisicing magna aute officia cillum non.'\n }\n </span>\n </div>\n );\n};\n\nexport default HelpBubbleExample;\n"],"names":["HelpBubbleExample","props","controllerRef","useRef","React","HelpBubble"],"mappings":";;AAIA,MAAMA,IAA+C,CAASC,MAAA;AACtD,QAAAC,IAAgBC,EAAwB,IAAI;AAGhD,SAAAC,gBAAAA,EAAA,cAAC,OACC,MAAAA,gBAAAA,EAAA,cAAC,QAEG,MAAA,+pBAEJ,GACAA,gBAAAA,EAAA,cAAC,OAAI,EAAA,OAAO,EAAE,UAAU,YAAY,SAAS,SAAS,EAAA,GACnDA,gBAAAA,EAAA,cAAA,QAAA,EAAK,KAAKF,GAAe,OAAO,EAAE,SAAS,gBAAgB,OAAO,MAChE,EAAA,GAAA,0BACH,GACAE,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGJ;AAAA,MACJ,SAAS,MAAM;AACb,cAAM,eAAe;AAAA,MACvB;AAAA,MACA,eAAAC;AAAA,IAAA;AAAA,IAECD,EAAM;AAAA,EAAA,CAEX,GACCG,gBAAAA,EAAA,cAAA,QAAA,MAEG,+pBAEJ,CACF;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import s from "react";
|
|
2
|
-
import n from "classnames";
|
|
3
|
-
import p from "../HighlightPanel/HighlightPanel.js";
|
|
4
|
-
import c from "../Icons/HandWaving.js";
|
|
5
|
-
import e from "../HelpPanel/styles.module.scss";
|
|
6
|
-
const d = ({ className: a, testId: l, size: t, children: r, title: m }) => {
|
|
7
|
-
const o = n(e["help-panel"], a);
|
|
8
|
-
return /* @__PURE__ */ s.createElement(
|
|
9
|
-
p,
|
|
10
|
-
{
|
|
11
|
-
className: o,
|
|
12
|
-
contentWrapperClassName: e["help-panel"],
|
|
13
|
-
testId: l,
|
|
14
|
-
size: t,
|
|
15
|
-
svgIcon: c,
|
|
16
|
-
title: m
|
|
17
|
-
},
|
|
18
|
-
r
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
export {
|
|
22
|
-
d as default
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=HelpPanel.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPanel.js","sources":["../../../src/components/HelpPanel/HelpPanel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport HighlightPanel, { HighlightPanelSize } from '../HighlightPanel';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Changes the size. Default: medium */\n size?: keyof typeof HighlightPanelSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets title if needed */\n title?: string;\n}\n\nconst HelpPanel: React.FC<HelpPanelProps> = ({ className, testId, size, children, title }) => {\n const helpPanelClassName = classNames(styles['help-panel'], className);\n\n return (\n <HighlightPanel\n className={helpPanelClassName}\n contentWrapperClassName={styles['help-panel']}\n testId={testId}\n size={size}\n svgIcon={HandWaving}\n title={title}\n >\n {children}\n </HighlightPanel>\n );\n};\n\nexport default HelpPanel;\n"],"names":["HelpPanel","className","testId","size","children","title","helpPanelClassName","classNames","styles","React","HighlightPanel","HandWaving"],"mappings":";;;;;AAsBM,MAAAA,IAAsC,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,MAAAC,GAAM,UAAAC,GAAU,OAAAC,QAAY;AAC5F,QAAMC,IAAqBC,EAAWC,EAAO,YAAY,GAAGP,CAAS;AAGnE,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWJ;AAAA,MACX,yBAAyBE,EAAO,YAAY;AAAA,MAC5C,QAAAN;AAAA,MACA,MAAAC;AAAA,MACA,SAASQ;AAAA,MACT,OAAAN;AAAA,IAAA;AAAA,IAECD;AAAA,EAAA;AAGP;"}
|