@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,9 +1,95 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import p, { useRef as m, useState as $ } from "react";
|
|
3
|
+
import f from "classnames";
|
|
4
|
+
import { IconSize as c, AnalyticsId as q } from "../../constants.js";
|
|
5
|
+
import { useBreakpoint as F } from "../../hooks/useBreakpoint.js";
|
|
6
|
+
import { useHover as J } from "../../hooks/useHover.js";
|
|
7
|
+
import { useOutsideEvent as K } from "../../hooks/useOutsideEvent.js";
|
|
8
|
+
import { getColor as B } from "../../theme/currys/color.js";
|
|
9
|
+
import { breakpoints as Q } from "../../theme/grid.js";
|
|
10
|
+
import { isComponent as O } from "../../utils/component.js";
|
|
11
|
+
import { I as d } from "../../Icon.js";
|
|
12
|
+
import U from "../Icons/VerticalDots.js";
|
|
13
|
+
import V from "../Icons/X.js";
|
|
14
|
+
import { L as Y } from "../../LazyIcon.js";
|
|
15
|
+
import { L as N } from "../../LinkList.js";
|
|
16
|
+
import { a as Z } from "../../PopOver.js";
|
|
17
|
+
import i from "./styles.module.scss";
|
|
18
|
+
var oo = /* @__PURE__ */ ((o) => (o.onWhite = "on-white", o.onGray = "on-gray", o.onBlueberry = "on-blueberry", o))(oo || {}), eo = /* @__PURE__ */ ((o) => (o.right = "right", o.left = "left", o))(eo || {});
|
|
19
|
+
const ko = (o) => {
|
|
20
|
+
const v = m(null), b = m(null), z = m(null), g = m(null), [n, u] = $(!1), {
|
|
21
|
+
children: I,
|
|
22
|
+
popOverClassName: H,
|
|
23
|
+
popMenuClassName: L,
|
|
24
|
+
openButtonTestId: R,
|
|
25
|
+
closeButtonTestId: S,
|
|
26
|
+
popOverTestId: x,
|
|
27
|
+
popMenuVariant: C = "on-white",
|
|
28
|
+
openButtonAriaLabel: T,
|
|
29
|
+
closeButtonAriaLabel: w,
|
|
30
|
+
svgIcon: r,
|
|
31
|
+
labelText: l,
|
|
32
|
+
labelTextPosition: h = "right"
|
|
33
|
+
/* right */
|
|
34
|
+
} = o, X = f(i["pop-menu-button"], {
|
|
35
|
+
[i[`pop-menu-button--${C}`]]: C
|
|
36
|
+
}), _ = F() < Q.md;
|
|
37
|
+
K(g, () => {
|
|
38
|
+
u(!1);
|
|
39
|
+
});
|
|
40
|
+
const { isHovered: a } = J(v), k = _ ? c.XSmall : c.Small, A = (e) => {
|
|
41
|
+
u(!1), e && e();
|
|
42
|
+
}, E = () => {
|
|
43
|
+
if (O(I, N))
|
|
44
|
+
return /* @__PURE__ */ t(
|
|
45
|
+
Z,
|
|
46
|
+
{
|
|
47
|
+
testId: x,
|
|
48
|
+
className: f(i["pop-menu__pop-over"], H),
|
|
49
|
+
arrowClassName: i["pop-menu__pop-over-arrow"],
|
|
50
|
+
controllerRef: b,
|
|
51
|
+
popOverRef: z,
|
|
52
|
+
children: p.Children.map(
|
|
53
|
+
I,
|
|
54
|
+
(e) => p.cloneElement(e, {
|
|
55
|
+
children: p.Children.map(
|
|
56
|
+
e.props.children,
|
|
57
|
+
(s) => O(s, N.Link) ? p.cloneElement(s, {
|
|
58
|
+
onClick: (W) => A(() => s.props.onClick && s.props.onClick(W))
|
|
59
|
+
}) : s
|
|
60
|
+
)
|
|
61
|
+
})
|
|
62
|
+
)
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
}, j = (e) => {
|
|
66
|
+
e && e.stopPropagation(), u(!n);
|
|
67
|
+
}, D = r && typeof r == "string" ? /* @__PURE__ */ t(Y, { iconName: r, size: c.XSmall, isHovered: a }) : r && /* @__PURE__ */ t(d, { svgIcon: r, size: c.XSmall, isHovered: a }), G = r ? D : /* @__PURE__ */ t(d, { svgIcon: r ?? U, color: B("black"), size: k, isHovered: a }), M = /* @__PURE__ */ t(d, { svgIcon: V, color: B("black"), size: k, isHovered: a }), P = /* @__PURE__ */ y(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
ref: v,
|
|
71
|
+
"data-testid": n ? S : R,
|
|
72
|
+
className: X,
|
|
73
|
+
"aria-label": n ? w : T,
|
|
74
|
+
"aria-expanded": n,
|
|
75
|
+
onClick: j,
|
|
76
|
+
type: "button",
|
|
77
|
+
children: [
|
|
78
|
+
l && h == "left" && /* @__PURE__ */ t("span", { children: l }),
|
|
79
|
+
/* @__PURE__ */ t("div", { ref: b, children: n ? M : G }),
|
|
80
|
+
l && h == "right" && /* @__PURE__ */ t("span", { children: l })
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
return /* @__PURE__ */ y("div", { ref: g, className: f(i["pop-menu-button"], L), "data-analyticsid": q.PopMenu, children: [
|
|
85
|
+
P,
|
|
86
|
+
n && E()
|
|
87
|
+
] });
|
|
88
|
+
};
|
|
3
89
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
90
|
+
ko as PopMenu,
|
|
91
|
+
eo as PopMenuLabelPosition,
|
|
92
|
+
oo as PopMenuVariant,
|
|
93
|
+
ko as default
|
|
8
94
|
};
|
|
9
95
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Icon, { SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport VerticalDots from '../Icons/VerticalDots';\nimport X from '../Icons/X';\nimport LazyIcon from '../LazyIcon';\nimport LinkList, { LinkListProps, LinkProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport enum PopMenuLabelPosition {\n right = 'right',\n left = 'left',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n /** Sets the icon on the trigger button. */\n svgIcon?: SvgIcon | IconName;\n /** Optional text next to the trigger button. */\n labelText?: string;\n /** Placement of the label text relative to the trigger button. */\n labelTextPosition?: PopMenuLabelPosition;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const triggerButtonRef = useRef<HTMLButtonElement>(null);\n const iconRef = useRef<HTMLDivElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const outerRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n svgIcon,\n labelText,\n labelTextPosition = PopMenuLabelPosition.right,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n\n useOutsideEvent(outerRef, () => {\n setIsOpen(false);\n });\n\n const { isHovered: triggerButtonIsHovered } = useHover(triggerButtonRef);\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n\n const handleClick = (cb?: () => void): void => {\n setIsOpen(false);\n cb && cb();\n };\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={iconRef}\n popOverRef={popOverRef}\n >\n {React.Children.map(children, child =>\n React.cloneElement(child, {\n children: React.Children.map(child.props.children, child =>\n isComponent<LinkProps>(child, LinkList.Link)\n ? React.cloneElement(child, {\n onClick: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n handleClick(() => child.props.onClick && child.props.onClick(event)),\n })\n : child\n ),\n })\n )}\n </PopOver>\n );\n }\n };\n\n const toggleOpenOnClick = (e?: React.MouseEvent<HTMLElement, MouseEvent>): void => {\n e && e.stopPropagation();\n setIsOpen(!isOpen);\n };\n\n const iconComponent =\n svgIcon && typeof svgIcon === 'string' ? (\n <LazyIcon iconName={svgIcon} size={IconSize.XSmall} isHovered={triggerButtonIsHovered} />\n ) : (\n svgIcon && <Icon svgIcon={svgIcon} size={IconSize.XSmall} isHovered={triggerButtonIsHovered} />\n );\n\n const openIcon = svgIcon ? (\n iconComponent\n ) : (\n <Icon svgIcon={svgIcon ?? VerticalDots} color={getColor('black')} size={mobileIconSize} isHovered={triggerButtonIsHovered} />\n );\n\n const closeIcon = <Icon svgIcon={X} color={getColor('black')} size={mobileIconSize} isHovered={triggerButtonIsHovered} />;\n\n const triggerButton = (\n <button\n ref={triggerButtonRef}\n data-testid={isOpen ? closeButtonTestId : openButtonTestId}\n className={buttonClasses}\n aria-label={isOpen ? closeButtonAriaLabel : openButtonAriaLabel}\n aria-expanded={isOpen}\n onClick={toggleOpenOnClick}\n type=\"button\"\n >\n {labelText && labelTextPosition == PopMenuLabelPosition.left && <span>{labelText}</span>}\n {<div ref={iconRef}>{isOpen ? closeIcon : openIcon}</div>}\n {labelText && labelTextPosition == PopMenuLabelPosition.right && <span>{labelText}</span>}\n </button>\n );\n\n return (\n <div ref={outerRef} className={classNames(styles['pop-menu-button'], popMenuClassName)} data-analyticsid={AnalyticsId.PopMenu}>\n {triggerButton}\n {isOpen && renderChildren()}\n </div>\n );\n};\n\nexport default PopMenu;\n"],"names":["PopMenuVariant","PopMenuLabelPosition","PopMenu","props","triggerButtonRef","useRef","iconRef","popOverRef","outerRef","isOpen","setIsOpen","useState","children","popOverClassName","popMenuClassName","openButtonTestId","closeButtonTestId","popOverTestId","popMenuVariant","openButtonAriaLabel","closeButtonAriaLabel","svgIcon","labelText","labelTextPosition","buttonClasses","classNames","styles","mobile","useBreakpoint","breakpoints","useOutsideEvent","triggerButtonIsHovered","useHover","mobileIconSize","IconSize","handleClick","cb","renderChildren","isComponent","LinkList","jsx","PopOver","child","React","event","toggleOpenOnClick","iconComponent","LazyIcon","Icon","openIcon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,MACL,eAAaK,IAASO,IAAoBD;AAAA,MAC1C,WAAWS;AAAA,MACX,cAAYf,IAASW,IAAuBD;AAAA,MAC5C,iBAAeV;AAAA,MACf,SAASoC;AAAA,MACT,MAAK;AAAA,MAEJ,UAAA;AAAA,QAAAvB,KAAaC,KAAqB,UAA8B,gBAAAiB,EAAA,QAAA,EAAM,UAAUlB,GAAA;AAAA,0BAC/E,OAAI,EAAA,KAAKhB,GAAU,UAAAG,IAAS2C,IAAYH,GAAS;AAAA,QAClD3B,KAAaC,KAAqB,WAA8B,gBAAAiB,EAAC,UAAM,UAAUlB,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAItF,SACG,gBAAAiC,EAAA,OAAA,EAAI,KAAK/C,GAAU,WAAWiB,EAAWC,EAAO,iBAAiB,GAAGZ,CAAgB,GAAG,oBAAkB0C,EAAY,SACnH,UAAA;AAAA,IAAAF;AAAA,IACA7C,KAAU4B,EAAe;AAAA,EAC5B,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { a } from "../../PopOver.js";
|
|
2
|
+
import { P as p } from "../../PopOver.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
p as PopOverVariant,
|
|
5
|
+
a as default
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import c from "react";
|
|
2
|
-
import { createPortal as
|
|
2
|
+
import { createPortal as l } from "react-dom";
|
|
3
3
|
import { AnalyticsId as n } from "../../constants.js";
|
|
4
|
-
function p({ children:
|
|
4
|
+
function p({ children: s, parent: e, className: o, testId: i }) {
|
|
5
5
|
const t = c.useMemo(() => document.createElement("div"), []);
|
|
6
6
|
return t.setAttribute("data-analyticsid", n.Portal), i && t.setAttribute("data-testid", i), c.useEffect(() => {
|
|
7
7
|
const a = e && e.appendChild ? e : document.body, d = ["portal-container"];
|
|
8
8
|
return o && o.split(" ").forEach((r) => d.push(r)), d.forEach((r) => t.classList.add(r)), a.appendChild(t), () => {
|
|
9
9
|
a.removeChild(t);
|
|
10
10
|
};
|
|
11
|
-
}, [t, e, o]), s
|
|
11
|
+
}, [t, e, o]), l(s, t);
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
14
|
p as default
|
|
@@ -1,9 +1,95 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as v, Fragment as $, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as B, useEffect as C } from "react";
|
|
3
|
+
import E from "classnames";
|
|
4
|
+
import { ZIndex as I } from "../../constants.js";
|
|
5
|
+
import { palette as o } from "../../theme/palette.js";
|
|
6
|
+
import a from "./styles.module.scss";
|
|
7
|
+
var R = /* @__PURE__ */ ((e) => (e.small = "small", e.medium = "medium", e.large = "large", e))(R || {}), j = /* @__PURE__ */ ((e) => (e.ondark = "ondark", e.onlight = "onlight", e))(j || {}), D = /* @__PURE__ */ ((e) => (e.screen = "screen", e.parent = "parent", e))(D || {});
|
|
8
|
+
const Z = ({
|
|
9
|
+
value: e,
|
|
10
|
+
size: i = "large",
|
|
11
|
+
mode: c = "onlight",
|
|
12
|
+
overlay: t,
|
|
13
|
+
testId: w,
|
|
14
|
+
ariaLabel: k
|
|
15
|
+
}) => {
|
|
16
|
+
t && (c = "ondark"), e = Math.max(0, Math.min(e, 100));
|
|
17
|
+
let n;
|
|
18
|
+
i === "large" ? n = 96 : i === "medium" ? n = 50 : n = 44;
|
|
19
|
+
const m = n / 2, p = 8, d = m - p / 2, l = m * 2, r = m, y = c === "onlight" ? o.blueberry100 : o.neutral700, h = c === "onlight" ? o.blueberry600 : o.white, f = 2 * Math.PI * d, _ = f - e / 100 * f, u = `${e}%`, g = B(null);
|
|
20
|
+
C(() => {
|
|
21
|
+
var x, b;
|
|
22
|
+
t === "parent" && ((b = (x = g.current) == null ? void 0 : x.parentElement) != null && b.style) && (g.current.parentElement.style.position = "relative");
|
|
23
|
+
}, []);
|
|
24
|
+
const N = E({
|
|
25
|
+
[a["progressbar--overlay"]]: t,
|
|
26
|
+
[a["progressbar--overlay-screen"]]: t === "screen",
|
|
27
|
+
[a["progressbar--overlay-parent"]]: t === "parent"
|
|
28
|
+
/* parent */
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ v($, { children: [
|
|
31
|
+
/* @__PURE__ */ s(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref: g,
|
|
35
|
+
className: N,
|
|
36
|
+
"data-testid": w,
|
|
37
|
+
role: "progressbar",
|
|
38
|
+
"aria-valuemin": 0,
|
|
39
|
+
"aria-valuemax": 100,
|
|
40
|
+
"aria-valuenow": e,
|
|
41
|
+
"aria-label": k,
|
|
42
|
+
style: t === "screen" ? { zIndex: I.OverlayScreen } : {},
|
|
43
|
+
children: /* @__PURE__ */ v(
|
|
44
|
+
"svg",
|
|
45
|
+
{
|
|
46
|
+
role: "presentation",
|
|
47
|
+
width: l,
|
|
48
|
+
height: l,
|
|
49
|
+
viewBox: `0 0 ${l} ${l}`,
|
|
50
|
+
className: a.progressbar__svg,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ s("circle", { cx: r, cy: r, r: d, stroke: y, strokeWidth: p, fill: "none" }),
|
|
53
|
+
/* @__PURE__ */ s(
|
|
54
|
+
"circle",
|
|
55
|
+
{
|
|
56
|
+
cx: r,
|
|
57
|
+
cy: r,
|
|
58
|
+
r: d,
|
|
59
|
+
stroke: h,
|
|
60
|
+
strokeWidth: p,
|
|
61
|
+
fill: "none",
|
|
62
|
+
strokeDasharray: f,
|
|
63
|
+
strokeDashoffset: _,
|
|
64
|
+
className: a["progressbar__progress-circle"],
|
|
65
|
+
transform: `rotate(-90 ${r} ${r})`
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ s(
|
|
69
|
+
"text",
|
|
70
|
+
{
|
|
71
|
+
className: "progress-wheel__text--large",
|
|
72
|
+
fontSize: "1.5rem",
|
|
73
|
+
fill: h,
|
|
74
|
+
x: r,
|
|
75
|
+
y: r,
|
|
76
|
+
textAnchor: "middle",
|
|
77
|
+
alignmentBaseline: "middle",
|
|
78
|
+
children: i === "large" && u
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ s("div", { className: a["progressbar__sr-only-text"], "aria-live": "assertive", "aria-atomic": "true", children: u })
|
|
87
|
+
] });
|
|
88
|
+
};
|
|
3
89
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
90
|
+
D as Overlay,
|
|
91
|
+
j as ProgressBarMode,
|
|
92
|
+
R as ProgressbarSize,
|
|
93
|
+
Z as default
|
|
8
94
|
};
|
|
9
95
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Progressbar/Progressbar.tsx"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\n\nimport classNames from 'classnames';\n\nimport { ZIndex } from '../../constants';\nimport { palette } from '../../theme/palette';\n\nimport styles from './styles.module.scss';\n\nexport enum ProgressbarSize {\n small = 'small',\n medium = 'medium',\n large = 'large',\n}\n\nexport enum ProgressBarMode {\n ondark = 'ondark',\n onlight = 'onlight',\n}\n\nexport enum Overlay {\n screen = 'screen',\n parent = 'parent',\n}\nexport interface ProgressbarProps {\n /** The value of the progressbar given in percent. Value between 0 and 100 */\n value: number;\n /** Size of the progressbar. Default is large */\n size?: ProgressbarSize;\n /** Changes the visuals of the ProgressBar. Default is onLight */\n mode?: ProgressBarMode;\n /** Loader is displayed with grey background covering the entire screen */\n overlay?: keyof typeof Overlay;\n /** Aria label for the progressbar */\n ariaLabel?: string;\n /** Sets the data-testid attribute */\n testId?: string;\n}\n\nconst Progressbar: React.FC<ProgressbarProps> = ({\n value,\n size = ProgressbarSize.large,\n mode = ProgressBarMode.onlight,\n overlay,\n testId,\n ariaLabel,\n}: ProgressbarProps) => {\n if (overlay) {\n mode = ProgressBarMode.ondark;\n }\n // Restrict value to be between 0 and 100\n value = Math.max(0, Math.min(value, 100));\n\n let width;\n if (size === ProgressbarSize.large) {\n width = 96;\n } else if (size === ProgressbarSize.medium) {\n width = 50;\n } else {\n width = 44;\n }\n\n const totalRadius = width / 2;\n const strokeWidth = 8;\n const radius = totalRadius - strokeWidth / 2;\n const viewBoxSize = totalRadius * 2;\n const viewBoxCenter = totalRadius;\n const circleBackgroundColor = mode === ProgressBarMode.onlight ? palette.blueberry100 : palette.neutral700;\n const mainColor = mode === ProgressBarMode.onlight ? palette.blueberry600 : palette.white;\n const circumference = 2 * Math.PI * radius;\n const strokeDashoffset = circumference - (value / 100) * circumference;\n const valueText = `${value}%`;\n\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (overlay === Overlay.parent && wrapperRef.current?.parentElement?.style) {\n wrapperRef.current.parentElement.style.position = 'relative';\n }\n }, []);\n\n const wrapperClasses = classNames({\n [styles['progressbar--overlay']]: overlay,\n [styles['progressbar--overlay-screen']]: overlay === Overlay.screen,\n [styles['progressbar--overlay-parent']]: overlay === Overlay.parent,\n });\n\n return (\n <>\n <div\n ref={wrapperRef}\n className={wrapperClasses}\n data-testid={testId}\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuenow={value}\n aria-label={ariaLabel}\n style={overlay === Overlay.screen ? { zIndex: ZIndex.OverlayScreen } : {}}\n >\n <svg\n role=\"presentation\"\n width={viewBoxSize}\n height={viewBoxSize}\n viewBox={`0 0 ${viewBoxSize} ${viewBoxSize}`}\n className={styles['progressbar__svg']}\n >\n <circle cx={viewBoxCenter} cy={viewBoxCenter} r={radius} stroke={circleBackgroundColor} strokeWidth={strokeWidth} fill=\"none\" />\n <circle\n cx={viewBoxCenter}\n cy={viewBoxCenter}\n r={radius}\n stroke={mainColor}\n strokeWidth={strokeWidth}\n fill=\"none\"\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n className={styles['progressbar__progress-circle']}\n transform={`rotate(-90 ${viewBoxCenter} ${viewBoxCenter})`}\n />\n <text\n className=\"progress-wheel__text--large\"\n fontSize={'1.5rem'}\n fill={mainColor}\n x={viewBoxCenter}\n y={viewBoxCenter}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n >\n {size === ProgressbarSize.large && valueText}\n </text>\n </svg>\n </div>\n <div className={styles['progressbar__sr-only-text']} aria-live=\"assertive\" aria-atomic=\"true\">\n {valueText}\n </div>\n </>\n );\n};\n\nexport default Progressbar;\n"],"names":["ProgressbarSize","ProgressBarMode","Overlay","Progressbar","value","size","mode","overlay","testId","ariaLabel","width","totalRadius","strokeWidth","radius","viewBoxSize","viewBoxCenter","circleBackgroundColor","palette","mainColor","circumference","strokeDashoffset","valueText","wrapperRef","useRef","useEffect","_b","_a","wrapperClasses","classNames","styles","jsxs","Fragment","jsx","ZIndex"],"mappings":";;;;;;AASY,IAAAA,sBAAAA,OACVA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,QAAQ,SAHEA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,UAAU,WAFAA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,SAAS,UAFCA,IAAAA,KAAA,CAAA,CAAA;AAmBZ,MAAMC,IAA0C,CAAC;AAAA,EAC/C,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,MAAwB;AACtB,EAAIF,MACKD,IAAA,WAGTF,IAAQ,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AAAA,YACC,MAAK;AAAA,YACL,OAAOhB;AAAA,YACP,QAAQA;AAAA,YACR,SAAS,OAAOA,CAAW,IAAIA,CAAW;AAAA,YAC1C,WAAWe,EAAO;AAAA,YAElB,UAAA;AAAA,cAAC,gBAAAG,EAAA,UAAA,EAAO,IAAIjB,GAAe,IAAIA,GAAe,GAAGF,GAAQ,QAAQG,GAAuB,aAAAJ,GAA0B,MAAK,OAAO,CAAA;AAAA,cAC9H,gBAAAoB;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,IAAIjB;AAAA,kBACJ,IAAIA;AAAA,kBACJ,GAAGF;AAAA,kBACH,QAAQK;AAAA,kBACR,aAAAN;AAAA,kBACA,MAAK;AAAA,kBACL,iBAAiBO;AAAA,kBACjB,kBAAAC;AAAA,kBACA,WAAWS,EAAO,8BAA8B;AAAA,kBAChD,WAAW,cAAcd,CAAa,IAAIA,CAAa;AAAA,gBAAA;AAAA,cACzD;AAAA,cACA,gBAAAiB;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,UAAU;AAAA,kBACV,MAAMd;AAAA,kBACN,GAAGH;AAAA,kBACH,GAAGA;AAAA,kBACH,YAAW;AAAA,kBACX,mBAAkB;AAAA,kBAEjB,gBAAS,WAAyBM;AAAA,gBAAA;AAAA,cACrC;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAW,EAAC,OAAI,EAAA,WAAWH,EAAO,2BAA2B,GAAG,aAAU,aAAY,eAAY,QACpF,UACHR,EAAA,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,5 +1,60 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import C from "react";
|
|
3
|
+
import b from "classnames";
|
|
4
|
+
import { AnalyticsId as g, IconSize as a } from "../../constants.js";
|
|
5
|
+
import { useBreakpoint as P, Breakpoint as m } from "../../hooks/useBreakpoint.js";
|
|
6
|
+
import { useHover as v } from "../../hooks/useHover.js";
|
|
7
|
+
import { getColor as c } from "../../theme/currys/color.js";
|
|
8
|
+
import { I as y } from "../../Icon.js";
|
|
9
|
+
import I from "../Icons/ArrowRight.js";
|
|
10
|
+
import _ from "../Icons/ArrowUpRight.js";
|
|
11
|
+
import { L as N } from "../../LazyIllustration.js";
|
|
12
|
+
import { T as z } from "../../Title.js";
|
|
13
|
+
import n from "./styles.module.scss";
|
|
14
|
+
const H = (t) => t.linkComponent ? C.cloneElement(t.linkComponent, { children: t.children }) : t.linkHtmlMarkup === "button" ? /* @__PURE__ */ e("button", { type: "button", onClick: t.linkOnClick, children: t.children }) : /* @__PURE__ */ e("a", { href: t.href, target: t.target, onClick: t.linkOnClick, children: t.children }), X = (t) => {
|
|
15
|
+
const { isHovered: u, hoverRef: k } = v(), { color: l = "neutral", titleHtmlMarkup: s = "h2", linkHtmlMarkup: d = "a" } = t, i = P(), f = b(
|
|
16
|
+
n.promopanel,
|
|
17
|
+
n[`promopanel--${l}`],
|
|
18
|
+
!t.illustration && n["promopanel--no-illustration"]
|
|
19
|
+
), r = /* @__PURE__ */ e(
|
|
20
|
+
H,
|
|
21
|
+
{
|
|
22
|
+
href: t.href,
|
|
23
|
+
target: t.target,
|
|
24
|
+
linkComponent: t.linkComponent,
|
|
25
|
+
linkHtmlMarkup: d,
|
|
26
|
+
linkOnClick: t.linkOnClick,
|
|
27
|
+
children: t.title || t.children
|
|
28
|
+
}
|
|
29
|
+
), h = i >= m.md ? 156 : 110;
|
|
30
|
+
return /* @__PURE__ */ o("div", { className: f, "data-testid": t.testId, "data-analyticsid": g.PromoPanel, ref: k, children: [
|
|
31
|
+
t.illustration && /* @__PURE__ */ e(
|
|
32
|
+
N,
|
|
33
|
+
{
|
|
34
|
+
illustrationName: t.illustration,
|
|
35
|
+
size: h,
|
|
36
|
+
color: l,
|
|
37
|
+
className: n.promopanel__illustration
|
|
38
|
+
}
|
|
39
|
+
),
|
|
40
|
+
/* @__PURE__ */ o("div", { className: n.promopanel__content, children: [
|
|
41
|
+
t.title && /* @__PURE__ */ e(z, { htmlMarkup: s, appearance: "title3", children: r }),
|
|
42
|
+
t.title ? t.children : r
|
|
43
|
+
] }),
|
|
44
|
+
/* @__PURE__ */ e(
|
|
45
|
+
y,
|
|
46
|
+
{
|
|
47
|
+
className: n.promopanel__icon,
|
|
48
|
+
svgIcon: t.target === "_blank" ? _ : I,
|
|
49
|
+
size: i >= m.md ? a.Small : a.XSmall,
|
|
50
|
+
isHovered: u,
|
|
51
|
+
color: c("blueberry", 500),
|
|
52
|
+
hoverColor: c("blueberry", 600)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
2
57
|
export {
|
|
3
|
-
|
|
58
|
+
X as default
|
|
4
59
|
};
|
|
5
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/PromoPanel/PromoPanel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { getColor } from '../../theme/currys/color';\nimport { PaletteNames } from '../../theme/palette';\nimport { AnchorLinkTags, AnchorLinkTargets } from '../AnchorLink';\nimport Icon from '../Icon';\nimport ArrowRight from '../Icons/ArrowRight';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\nimport LazyIllustration from '../LazyIllustration';\nimport Title, { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type PromoPanelColors = Extract<PaletteNames, 'neutral' | 'blueberry' | 'cherry'>;\n\nexport interface PromoPanelProps {\n /** Used as the link text if set. title or children must be set for the link to have accessible text. */\n title?: string;\n /** Used as the link text if title is not set. */\n children?: string;\n /** Illustration element */\n illustration?: 'Doctor' | 'HealthcarePersonnel';\n /** Changes the underlying element of the title. */\n titleHtmlMarkup?: TitleTags;\n /** Changes the background color. Default: white */\n color?: PromoPanelColors;\n /** Not used if linkComponent is set */\n href?: string;\n /** Anchor link target. If linkComponent is set, this prop is only used to display the right icon for external links. */\n target?: AnchorLinkTargets;\n /** HTML markup for anchor link. Not used if linkComponent is set. Default: a */\n linkHtmlMarkup?: AnchorLinkTags;\n /** Function that is called when clicked. Not used if linkComponent is set. */\n linkOnClick?: () => void;\n /** Custom link component. Must be \"a\" a or \"button\" element with no styling. */\n linkComponent?: React.ReactElement;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface PromoPanelLinkProps {\n children?: string;\n href?: string;\n target?: AnchorLinkTargets;\n linkComponent?: React.ReactElement;\n linkHtmlMarkup?: AnchorLinkTags;\n linkOnClick?: () => void;\n}\n\nconst PromoPanelLink: React.FC<PromoPanelLinkProps> = props => {\n if (props.linkComponent) {\n return React.cloneElement(props.linkComponent, { children: props.children });\n }\n\n if (props.linkHtmlMarkup === 'button') {\n return (\n <button type={'button'} onClick={props.linkOnClick}>\n {props.children}\n </button>\n );\n }\n return (\n <a href={props.href} target={props.target} onClick={props.linkOnClick}>\n {props.children}\n </a>\n );\n};\n\nconst PromoPanel: React.FC<PromoPanelProps> = props => {\n const { isHovered, hoverRef } = useHover<HTMLDivElement>();\n\n const { color = 'neutral', titleHtmlMarkup = 'h2', linkHtmlMarkup = 'a' } = props;\n\n const breakpoint = useBreakpoint();\n\n const promoPanelClasses = classNames(\n styles.promopanel,\n styles[`promopanel--${color}`],\n !props.illustration && styles['promopanel--no-illustration']\n );\n\n const promoPanelLink = (\n <PromoPanelLink\n href={props.href}\n target={props.target}\n linkComponent={props.linkComponent}\n linkHtmlMarkup={linkHtmlMarkup}\n linkOnClick={props.linkOnClick}\n >\n {props.title || props.children}\n </PromoPanelLink>\n );\n\n const illustrationSize = ((): number => {\n if (breakpoint >= Breakpoint.md) {\n return 156;\n }\n\n return 110;\n })();\n\n return (\n <div className={promoPanelClasses} data-testid={props.testId} data-analyticsid={AnalyticsId.PromoPanel} ref={hoverRef}>\n {props.illustration && (\n <LazyIllustration\n illustrationName={props.illustration}\n size={illustrationSize}\n color={color}\n className={styles.promopanel__illustration}\n />\n )}\n <div className={styles.promopanel__content}>\n {props.title && (\n <Title htmlMarkup={titleHtmlMarkup} appearance={'title3'}>\n {promoPanelLink}\n </Title>\n )}\n {!props.title ? promoPanelLink : props.children}\n </div>\n <Icon\n className={styles.promopanel__icon}\n svgIcon={props.target === '_blank' ? ArrowUpRight : ArrowRight}\n size={breakpoint >= Breakpoint.md ? IconSize.Small : IconSize.XSmall}\n isHovered={isHovered}\n color={getColor('blueberry', 500)}\n hoverColor={getColor('blueberry', 600)}\n />\n </div>\n );\n};\n\nexport default PromoPanel;\n"],"names":["PromoPanelLink","props","React","jsx","PromoPanel","isHovered","hoverRef","useHover","color","titleHtmlMarkup","linkHtmlMarkup","breakpoint","useBreakpoint","promoPanelClasses","classNames","styles","promoPanelLink","illustrationSize","Breakpoint","jsxs","AnalyticsId","LazyIllustration","Title","Icon","ArrowUpRight","ArrowRight","IconSize","getColor"],"mappings":";;;;;;;;;;;;;AAsDA,MAAMA,IAAgD,CAASC,MACzDA,EAAM,gBACDC,EAAM,aAAaD,EAAM,eAAe,EAAE,UAAUA,EAAM,UAAU,IAGzEA,EAAM,mBAAmB,WAEzB,gBAAAE,EAAC,YAAO,MAAM,UAAU,SAASF,EAAM,aACpC,YAAM,SACT,CAAA,IAID,gBAAAE,EAAA,KAAA,EAAE,MAAMF,EAAM,MAAM,QAAQA,EAAM,QAAQ,SAASA,EAAM,aACvD,UAAAA,EAAM,SACT,CAAA,GAIEG,IAAwC,CAASH,MAAA;AACrD,QAAM,EAAE,WAAAI,GAAW,UAAAC,EAAS,IAAIC,EAAyB,GAEnD,EAAE,OAAAC,IAAQ,WAAW,iBAAAC,IAAkB,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,GAAG;AAAA,MAAA;AAAA,IACvC;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { R as o } from "../../RadioButton.js";
|
|
2
|
+
import { g as s } from "../../RadioButton.js";
|
|
3
3
|
export {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
o as RadioButton,
|
|
5
|
+
o as default,
|
|
6
|
+
s as getRadioLabelClasses
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,113 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { jsxs as d, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w } from "react";
|
|
3
|
+
import h from "classnames";
|
|
4
|
+
import { useBreakpoint as L } from "../../hooks/useBreakpoint.js";
|
|
5
|
+
import { useHover as C } from "../../hooks/useHover.js";
|
|
6
|
+
import { useUuid as X } from "../../hooks/useUuid.js";
|
|
7
|
+
import { getColor as I } from "../../theme/currys/color.js";
|
|
8
|
+
import { breakpoints as j } from "../../theme/grid.js";
|
|
9
|
+
import { getAriaLabelAttributes as y } from "../../utils/accessibility.js";
|
|
10
|
+
import { N as A } from "../../NotificationBadge.js";
|
|
11
|
+
import { C as M } from "../../Close.js";
|
|
12
|
+
import { I as H } from "../../Icon.js";
|
|
13
|
+
import { IconSize as N } from "../../constants.js";
|
|
14
|
+
import U from "../Icons/ChevronDown.js";
|
|
15
|
+
import B from "../Icons/ChevronUp.js";
|
|
16
|
+
import F from "../Icons/Forward.js";
|
|
17
|
+
import $ from "../Icons/X.js";
|
|
18
|
+
import e from "./styles.module.scss";
|
|
19
|
+
const q = ({ label: a, variant: c, id: l, hasExpander: r, isExpanded: m, dismissable: v, onExpand: t, onDismiss: _, closeBtnText: n }) => {
|
|
20
|
+
const g = L(), { isHovered: o, hoverRef: f } = C(), i = g < j.lg ? N.XSmall : N.Small, b = r ? "button" : "span", p = h(
|
|
21
|
+
e["service-message__label-container"],
|
|
22
|
+
r && e["service-message__label-container--has-expander"]
|
|
23
|
+
);
|
|
24
|
+
return /* @__PURE__ */ s("div", { className: p, ref: f, children: /* @__PURE__ */ s("div", { className: e["service-message__container"], children: /* @__PURE__ */ s("div", { className: e["service-message__row"], children: /* @__PURE__ */ s("div", { className: e["service-message__col"], children: /* @__PURE__ */ d("div", { className: e["service-message__label"], children: [
|
|
25
|
+
/* @__PURE__ */ s(A, { variant: c, size: i, isHovered: o }),
|
|
26
|
+
/* @__PURE__ */ s("h1", { className: e["service-message__title"], id: l, children: /* @__PURE__ */ s(
|
|
27
|
+
b,
|
|
28
|
+
{
|
|
29
|
+
className: e["service-message__toggle"],
|
|
30
|
+
onClick: r ? t : void 0,
|
|
31
|
+
"aria-expanded": r ? m : void 0,
|
|
32
|
+
children: a
|
|
33
|
+
}
|
|
34
|
+
) }),
|
|
35
|
+
r && /* @__PURE__ */ s(H, { size: i, svgIcon: m ? B : U, isHovered: o }),
|
|
36
|
+
!r && v && /* @__PURE__ */ s(M, { onClick: _, ariaLabel: n, className: e["service-message__close"] })
|
|
37
|
+
] }) }) }) }) });
|
|
38
|
+
}, x = ({ info: a, extraInfo: c, urlTitle: l, url: r, target: m, dismissable: v, closeBtnText: t, onDismiss: _ }) => {
|
|
39
|
+
const { hoverRef: n, isHovered: g } = C(), { hoverRef: o, isHovered: f } = C(), i = r && l;
|
|
40
|
+
return /* @__PURE__ */ s("div", { className: e["service-message__container"], children: /* @__PURE__ */ s("div", { className: e["service-message__row"], children: /* @__PURE__ */ s("div", { className: e["service-message__col"], children: /* @__PURE__ */ d("div", { className: e["service-message__content"], children: [
|
|
41
|
+
a && /* @__PURE__ */ s("p", { className: e["service-message__info"], children: a }),
|
|
42
|
+
c && /* @__PURE__ */ s("p", { className: h(e["service-message__info"], e["service-message__info--extra"]), children: c }),
|
|
43
|
+
/* @__PURE__ */ d("div", { className: e["service-message__actions"], children: [
|
|
44
|
+
i && /* @__PURE__ */ d("a", { className: e["service-message__action"], href: r, ref: n, target: m, children: [
|
|
45
|
+
l,
|
|
46
|
+
/* @__PURE__ */ s(H, { size: N.XSmall, svgIcon: F, color: I("blueberry", 700), isHovered: g })
|
|
47
|
+
] }),
|
|
48
|
+
v && /* @__PURE__ */ d(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
ref: o,
|
|
52
|
+
className: h(e["service-message__action"], e["service-message__action--close"]),
|
|
53
|
+
"aria-label": t,
|
|
54
|
+
onClick: _,
|
|
55
|
+
children: [
|
|
56
|
+
t,
|
|
57
|
+
/* @__PURE__ */ s(H, { size: N.XSmall, svgIcon: $, color: I("blueberry", 700), isHovered: f })
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] })
|
|
62
|
+
] }) }) }) });
|
|
63
|
+
}, ae = ({
|
|
64
|
+
label: a,
|
|
65
|
+
dismissable: c = !0,
|
|
66
|
+
onDismiss: l,
|
|
67
|
+
info: r,
|
|
68
|
+
extraInfo: m,
|
|
69
|
+
urlTitle: v,
|
|
70
|
+
url: t,
|
|
71
|
+
target: _ = "_self",
|
|
72
|
+
closeBtnText: n = "fjern melding",
|
|
73
|
+
expanderOpenFromStart: g = !1,
|
|
74
|
+
variant: o = "error",
|
|
75
|
+
testId: f
|
|
76
|
+
}) => {
|
|
77
|
+
const [i, b] = w(g), p = X(), u = !!r || !!m, S = o === "error" ? "alert" : "region", k = y({ label: a, id: p }), R = () => {
|
|
78
|
+
u && b(!i);
|
|
79
|
+
}, z = h(e["service-message"], e[`service-message--${o}`]);
|
|
80
|
+
return /* @__PURE__ */ d("div", { className: z, role: S, ...k, "data-testid": f, children: [
|
|
81
|
+
/* @__PURE__ */ s(
|
|
82
|
+
q,
|
|
83
|
+
{
|
|
84
|
+
label: a,
|
|
85
|
+
variant: o,
|
|
86
|
+
id: p,
|
|
87
|
+
hasExpander: u,
|
|
88
|
+
isExpanded: i,
|
|
89
|
+
dismissable: c,
|
|
90
|
+
onExpand: R,
|
|
91
|
+
onDismiss: l,
|
|
92
|
+
closeBtnText: n
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
u && i && /* @__PURE__ */ s(
|
|
96
|
+
x,
|
|
97
|
+
{
|
|
98
|
+
info: r,
|
|
99
|
+
extraInfo: m,
|
|
100
|
+
urlTitle: v,
|
|
101
|
+
url: t,
|
|
102
|
+
target: _,
|
|
103
|
+
dismissable: c,
|
|
104
|
+
onDismiss: l,
|
|
105
|
+
closeBtnText: n
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] });
|
|
109
|
+
};
|
|
2
110
|
export {
|
|
3
|
-
|
|
111
|
+
ae as default
|
|
4
112
|
};
|
|
5
113
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnchorLinkTargets } from '../AnchorLink';\nimport NotificationBadge from '../Badge/NotificationBadge';\nimport Close from '../Close';\nimport Icon, { IconSize } from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport Forward from '../Icons/Forward';\nimport X from '../Icons/X';\nimport { NotificationPanelVariants } from '../NotificationPanel';\n\nimport styles from './styles.module.scss';\n\ninterface LabelProps {\n label: string;\n variant: NotificationPanelVariants;\n id: string;\n hasExpander: boolean;\n isExpanded: boolean;\n dismissable: boolean;\n onExpand: () => void;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Label: React.FC<LabelProps> = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {\n const breakpoint = useBreakpoint();\n const { isHovered, hoverRef } = useHover<HTMLDivElement>();\n\n const iconSize = breakpoint < breakpoints.lg ? IconSize.XSmall : IconSize.Small;\n const CustomTag = hasExpander ? 'button' : 'span';\n\n const labelContainerClasses = classNames(\n styles['service-message__label-container'],\n hasExpander && styles[`service-message__label-container--has-expander`]\n );\n\n return (\n <div className={labelContainerClasses} ref={hoverRef}>\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__label']}>\n <NotificationBadge variant={variant} size={iconSize} isHovered={isHovered} />\n <h1 className={styles['service-message__title']} id={id}>\n <CustomTag\n className={styles['service-message__toggle']}\n onClick={hasExpander ? onExpand : undefined}\n aria-expanded={hasExpander ? isExpanded : undefined}\n >\n {label}\n </CustomTag>\n </h1>\n {hasExpander && <Icon size={iconSize} svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} />}\n {!hasExpander && dismissable && (\n <Close onClick={onDismiss} ariaLabel={closeBtnText} className={styles['service-message__close']} />\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface ContentProps {\n info?: string;\n extraInfo?: string;\n urlTitle?: string;\n url?: string;\n target?: AnchorLinkTargets;\n dismissable: boolean;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Content: React.FC<ContentProps> = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnText, onDismiss }) => {\n const { hoverRef: readMoreRef, isHovered: readMoreHoverRefIsHovered } = useHover<HTMLAnchorElement>();\n const { hoverRef: closeButtonRef, isHovered: closeButtonIsHovered } = useHover<HTMLButtonElement>();\n\n const hasUrl = url && urlTitle;\n\n return (\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__content']}>\n {info && <p className={styles['service-message__info']}>{info}</p>}\n {extraInfo && (\n <p className={classNames(styles['service-message__info'], styles['service-message__info--extra'])}>{extraInfo}</p>\n )}\n <div className={styles['service-message__actions']}>\n {hasUrl && (\n <a className={styles['service-message__action']} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button\n ref={closeButtonRef}\n className={classNames(styles['service-message__action'], styles['service-message__action--close'])}\n aria-label={closeBtnText}\n onClick={onDismiss}\n >\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={closeButtonIsHovered} />\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expanded */\n info?: string;\n /** String displayed in service-message when expanded, with a smaller font */\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n expanderOpenFromStart = false,\n variant = 'error',\n testId,\n}) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const labelId = useUuid();\n const hasExpander = !!info || !!extraInfo;\n\n const ariaRole = variant === 'error' ? 'alert' : 'region';\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: labelId });\n\n const handleClick = (): void => {\n hasExpander && setIsExpanded(!isExpanded);\n };\n\n const classes = classNames(styles['service-message'], styles[`service-message--${variant}`]);\n\n return (\n <div className={classes} role={ariaRole} {...ariaLabelAttributes} data-testid={testId}>\n <Label\n label={label}\n variant={variant}\n id={labelId}\n hasExpander={hasExpander}\n isExpanded={isExpanded}\n dismissable={dismissable}\n onExpand={handleClick}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n {hasExpander && isExpanded && (\n <Content\n info={info}\n extraInfo={extraInfo}\n urlTitle={urlTitle}\n url={url}\n target={target}\n dismissable={dismissable}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n )}\n </div>\n );\n};\n\nexport default ServiceMessage;\n"],"names":["Label","label","variant","id","hasExpander","isExpanded","dismissable","onExpand","onDismiss","closeBtnText","breakpoint","useBreakpoint","isHovered","hoverRef","useHover","iconSize","breakpoints","IconSize","CustomTag","labelContainerClasses","classNames","styles","jsx","jsxs","NotificationBadge","Icon","ChevronUp","ChevronDown","Close","Content","info","extraInfo","urlTitle","url","target","readMoreRef","readMoreHoverRefIsHovered","closeButtonRef","closeButtonIsHovered","hasUrl","Forward","getColor","X","ServiceMessage","expanderOpenFromStart","testId","setIsExpanded","useState","labelId","useUuid","ariaRole","ariaLabelAttributes","getAriaLabelAttributes","handleClick","classes"],"mappings":";;;;;;;;;;;;;;;;;;AAkCA,MAAMA,IAA8B,CAAC,EAAE,OAAAC,GAAO,SAAAC,GAAS,IAAAC,GAAI,aAAAC,GAAa,YAAAC,GAAY,aAAAC,GAAa,UAAAC,GAAU,WAAAC,GAAW,cAAAC,EAAA,MAAmB;AACvI,QAAMC,IAAaC,KACb,EAAE,WAAAC,GAAW,UAAAC,EAAS,IAAIC,EAAyB,GAEnDC,IAAWL,IAAaM,EAAY,KAAKC,EAAS,SAASA,EAAS,OACpEC,IAAYd,IAAc,WAAW,QAEr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A,QACA,aAAA5B;AAAA,QACA,WAAAE;AAAA,QACA,cAAAC;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,5 +1,19 @@
|
|
|
1
|
-
import a from "
|
|
1
|
+
import { jsxs as p, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import { AnalyticsId as u, IconSize as g } from "../../constants.js";
|
|
4
|
+
import { palette as _ } from "../../theme/palette.js";
|
|
5
|
+
import { I as f } from "../../Icon.js";
|
|
6
|
+
import s from "./styles.module.scss";
|
|
7
|
+
const w = (e) => {
|
|
8
|
+
const { color: r = "blueberry", icon: l, children: o, className: n, testId: i, wrapText: c } = e, m = t(s["sharing-status"], n), d = t(s["sharing-status__dot"], s[`sharing-status__dot--${r}`]), h = t(s["sharing-status__label"], s[`sharing-status__label--${r}`], {
|
|
9
|
+
[s["sharing-status__label--wrap"]]: c
|
|
10
|
+
});
|
|
11
|
+
return /* @__PURE__ */ p("span", { className: m, "data-testid": i, "data-analyticsid": u.SharingStatus, children: [
|
|
12
|
+
/* @__PURE__ */ a("span", { className: d, children: /* @__PURE__ */ a(f, { color: _.white, svgIcon: l, size: g.XXSmall }) }),
|
|
13
|
+
/* @__PURE__ */ a("span", { className: h, children: o })
|
|
14
|
+
] });
|
|
15
|
+
};
|
|
2
16
|
export {
|
|
3
|
-
|
|
17
|
+
w as default
|
|
4
18
|
};
|
|
5
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/SharingStatus/SharingStatus.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { PaletteNames, palette } from '../../theme/palette';\nimport Icon, { SvgIcon } from '../Icon';\n\nimport styles from './styles.module.scss';\n\nexport type SharingStatusColor = Extract<PaletteNames, 'kiwi' | 'cherry' | 'neutral' | 'blueberry' | 'banana'>;\n\nexport interface SharingStatusProps {\n /** Color choices represent variants of sharingstatus */\n color?: SharingStatusColor;\n /** Adds custom classes to the element. */\n className?: string;\n /** Icon to be displayed next to the sharingstatus */\n icon: SvgIcon;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the text placed to the right of the sharingstatus */\n children: string;\n /** turn on and off word wrapping */\n wrapText?: boolean;\n}\n\nconst SharingStatus: React.FC<SharingStatusProps> = props => {\n const { color = 'blueberry', icon, children, className, testId, wrapText } = props;\n\n const sharingStatusClasses = classNames(styles['sharing-status'], className);\n const dotClasses = classNames(styles['sharing-status__dot'], styles[`sharing-status__dot--${color}`]);\n const labelClasses = classNames(styles['sharing-status__label'], styles[`sharing-status__label--${color}`], {\n [styles['sharing-status__label--wrap']]: wrapText,\n });\n\n return (\n <span className={sharingStatusClasses} data-testid={testId} data-analyticsid={AnalyticsId.SharingStatus}>\n <span className={dotClasses}>\n <Icon color={palette.white} svgIcon={icon} size={IconSize.XXSmall} />\n </span>\n <span className={labelClasses}>{children}</span>\n </span>\n );\n};\n\nexport default SharingStatus;\n"],"names":["SharingStatus","props","color","icon","children","className","testId","wrapText","sharingStatusClasses","classNames","styles","dotClasses","labelClasses","jsxs","AnalyticsId","jsx","Icon","palette","IconSize"],"mappings":";;;;;;AA2BA,MAAMA,IAA8C,CAASC,MAAA;AACrD,QAAA,EAAE,OAAAC,IAAQ,aAAa,MAAAC,GAAM,UAAAC,GAAU,WAAAC,GAAW,QAAAC,GAAQ,UAAAC,EAAa,IAAAN,GAEvEO,IAAuBC,EAAWC,EAAO,gBAAgB,GAAGL,CAAS,GACrEM,IAAaF,EAAWC,EAAO,qBAAqB,GAAGA,EAAO,wBAAwBR,CAAK,EAAE,CAAC,GAC9FU,IAAeH,EAAWC,EAAO,uBAAuB,GAAGA,EAAO,0BAA0BR,CAAK,EAAE,GAAG;AAAA,IAC1G,CAACQ,EAAO,6BAA6B,CAAC,GAAGH;AAAA,EAAA,CAC1C;AAGC,SAAA,gBAAAM,EAAC,UAAK,WAAWL,GAAsB,eAAaF,GAAQ,oBAAkBQ,EAAY,eACxF,UAAA;AAAA,IAAA,gBAAAC,EAAC,QAAK,EAAA,WAAWJ,GACf,UAAA,gBAAAI,EAACC,GAAK,EAAA,OAAOC,EAAQ,OAAO,SAASd,GAAM,MAAMe,EAAS,QAAS,CAAA,GACrE;AAAA,IACC,gBAAAH,EAAA,QAAA,EAAK,WAAWH,GAAe,UAAAR,EAAS,CAAA;AAAA,EAC3C,EAAA,CAAA;AAEJ;"}
|