@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,70 +0,0 @@
|
|
|
1
|
-
import r from "react";
|
|
2
|
-
import s from "classnames";
|
|
3
|
-
import { FormMode as F, AnalyticsId as H, IconSize as M, AVERAGE_CHARACTER_WIDTH_PX as U } from "../../constants.js";
|
|
4
|
-
import { useUuid as w } from "../../hooks/useUuid.js";
|
|
5
|
-
import { getColor as v } from "../../theme/currys/color.js";
|
|
6
|
-
import { getAriaDescribedBy as V } from "../../utils/accessibility.js";
|
|
7
|
-
import { ErrorWrapper as X } from "../ErrorWrapper/ErrorWrapper.js";
|
|
8
|
-
import { Icon as $ } from "../Icon/Icon.js";
|
|
9
|
-
import G from "../Icons/ChevronDown.js";
|
|
10
|
-
import { renderLabel as L } from "../Label/Label.js";
|
|
11
|
-
import e from "../Select/styles.module.scss";
|
|
12
|
-
const P = (o) => `calc(${o * U}px + 2rem)`, j = (o, t) => t ? v("neutral", 500) : v(o ? "cherry" : "blueberry", 600), ae = r.forwardRef(function(t, c) {
|
|
13
|
-
const {
|
|
14
|
-
className: y,
|
|
15
|
-
children: I,
|
|
16
|
-
concept: h = "normal",
|
|
17
|
-
disabled: l,
|
|
18
|
-
error: E,
|
|
19
|
-
errorText: i,
|
|
20
|
-
errorTextId: x,
|
|
21
|
-
label: W,
|
|
22
|
-
selectId: d,
|
|
23
|
-
name: g = d,
|
|
24
|
-
mode: n = F.onwhite,
|
|
25
|
-
testId: N,
|
|
26
|
-
width: m,
|
|
27
|
-
required: p,
|
|
28
|
-
value: S,
|
|
29
|
-
defaultValue: A,
|
|
30
|
-
autoComplete: u = "off",
|
|
31
|
-
wrapperClassName: R,
|
|
32
|
-
...T
|
|
33
|
-
} = t, f = w(d), b = w(x), C = n === "onblueberry", a = n === "oninvalid" || !!i || !!E, _ = j(a, !!l), D = m ? P(m) : void 0, q = s(
|
|
34
|
-
e["select-inner-wrapper"],
|
|
35
|
-
{
|
|
36
|
-
[e["select-inner-wrapper--transparent"]]: h === "transparent",
|
|
37
|
-
[e["select-inner-wrapper--on-blueberry"]]: C,
|
|
38
|
-
[e["select-inner-wrapper--invalid"]]: a,
|
|
39
|
-
[e["select-inner-wrapper--disabled"]]: l
|
|
40
|
-
},
|
|
41
|
-
y
|
|
42
|
-
), z = s(e.select, {
|
|
43
|
-
[e["select--on-blueberry"]]: C,
|
|
44
|
-
[e["select--invalid"]]: a
|
|
45
|
-
}), B = s(e["select-wrapper"], R);
|
|
46
|
-
return /* @__PURE__ */ r.createElement(X, { errorText: i, errorTextId: b }, /* @__PURE__ */ r.createElement("div", { "data-testid": N, "data-analyticsid": H.Select, className: B, style: { maxWidth: D } }, L(W, f, n), /* @__PURE__ */ r.createElement("div", { className: q }, /* @__PURE__ */ r.createElement($, { className: e["select-arrow"], svgIcon: G, color: _, size: M.XSmall }), /* @__PURE__ */ r.createElement(
|
|
47
|
-
"select",
|
|
48
|
-
{
|
|
49
|
-
"aria-invalid": !!a,
|
|
50
|
-
id: f,
|
|
51
|
-
name: g,
|
|
52
|
-
className: z,
|
|
53
|
-
disabled: l,
|
|
54
|
-
ref: c,
|
|
55
|
-
required: p,
|
|
56
|
-
"aria-describedby": V(t, b),
|
|
57
|
-
"aria-required": !!p,
|
|
58
|
-
value: S,
|
|
59
|
-
defaultValue: A,
|
|
60
|
-
autoComplete: u || void 0,
|
|
61
|
-
...T
|
|
62
|
-
},
|
|
63
|
-
I
|
|
64
|
-
))));
|
|
65
|
-
});
|
|
66
|
-
export {
|
|
67
|
-
ae as Select,
|
|
68
|
-
ae as default
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX, FormMode, IconSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport { renderLabel } from '../Label';\n\nimport selectStyles from './styles.module.scss';\n\ntype SelectConcept = 'normal' | 'transparent';\n\nexport interface SelectProps\n extends Pick<\n React.SelectHTMLAttributes<HTMLSelectElement>,\n 'aria-describedby' | 'name' | 'disabled' | 'required' | 'value' | 'onChange' | 'autoComplete'\n > {\n /** Sets the content of the select element. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the component */\n concept?: SelectConcept;\n /** The label text above the select */\n label?: React.ReactNode;\n /** Changes the visuals of the component */\n mode?: keyof typeof FormMode;\n /** Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** select id of the select element */\n selectId?: string;\n /** Width of select in characters (approximate) */\n width?: number;\n /** Gives defaultvalue to the comp. Preferred over selected prop on option by react */\n defaultValue?: string | number;\n /** Adds custom classes to the wrapper tag */\n wrapperClassName?: string;\n}\n\nconst getSelectMaxWidth = (characters: number): string => {\n const paddingWidth = '2rem';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth})`;\n};\n\nconst getIconColor = (invalid: boolean, disabled: boolean) => {\n const iconColor = invalid ? 'cherry' : 'blueberry';\n return disabled ? getColor('neutral', 500) : getColor(iconColor, 600);\n};\n\nexport const Select = React.forwardRef(function SelectForwardedRef(props: SelectProps, ref: React.Ref<HTMLSelectElement>) {\n const {\n className,\n children,\n concept = 'normal',\n disabled,\n error,\n errorText,\n errorTextId,\n label,\n selectId,\n name = selectId,\n mode = FormMode.onwhite,\n testId,\n width,\n required,\n value,\n defaultValue,\n autoComplete = 'off',\n wrapperClassName,\n ...rest\n } = props;\n\n const uuid = useUuid(selectId);\n const errorTextUuid = useUuid(errorTextId);\n const onBlueberry = mode === 'onblueberry';\n const invalid = mode === 'oninvalid' || !!errorText || !!error;\n const iconColor = getIconColor(invalid, !!disabled);\n const maxWidth = width ? getSelectMaxWidth(width) : undefined;\n\n const selectInnerWrapperClasses = classNames(\n selectStyles['select-inner-wrapper'],\n {\n [selectStyles['select-inner-wrapper--transparent']]: concept === 'transparent',\n [selectStyles['select-inner-wrapper--on-blueberry']]: onBlueberry,\n [selectStyles['select-inner-wrapper--invalid']]: invalid,\n [selectStyles['select-inner-wrapper--disabled']]: disabled,\n },\n className\n );\n\n const selectClasses = classNames(selectStyles.select, {\n [selectStyles['select--on-blueberry']]: onBlueberry,\n [selectStyles['select--invalid']]: invalid,\n });\n\n const selectWrapperClasses = classNames(selectStyles['select-wrapper'], wrapperClassName);\n\n return (\n <ErrorWrapper errorText={errorText} errorTextId={errorTextUuid}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Select} className={selectWrapperClasses} style={{ maxWidth }}>\n {renderLabel(label, uuid, mode as FormMode)}\n <div className={selectInnerWrapperClasses}>\n <Icon className={selectStyles['select-arrow']} svgIcon={ChevronDown} color={iconColor} size={IconSize.XSmall} />\n <select\n aria-invalid={!!invalid}\n id={uuid}\n name={name}\n className={selectClasses}\n disabled={disabled}\n ref={ref}\n required={required}\n aria-describedby={getAriaDescribedBy(props, errorTextUuid)}\n aria-required={!!required}\n value={value}\n defaultValue={defaultValue}\n autoComplete={autoComplete ? autoComplete : undefined}\n {...rest}\n >\n {children}\n </select>\n </div>\n </div>\n </ErrorWrapper>\n );\n});\n\nexport default Select;\n"],"names":["getSelectMaxWidth","characters","AVERAGE_CHARACTER_WIDTH_PX","getIconColor","invalid","disabled","getColor","Select","React","props","ref","className","children","concept","error","errorText","errorTextId","label","selectId","name","mode","FormMode","testId","width","required","value","defaultValue","autoComplete","wrapperClassName","rest","uuid","useUuid","errorTextUuid","onBlueberry","iconColor","maxWidth","selectInnerWrapperClasses","classNames","selectStyles","selectClasses","selectWrapperClasses","ErrorWrapper","AnalyticsId","renderLabel","Icon","ChevronDown","IconSize","getAriaDescribedBy"],"mappings":";;;;;;;;;;;AAkDA,MAAMA,IAAoB,CAACC,MAGlB,QAAQA,IAAaC,CAA0B,cAGlDC,IAAe,CAACC,GAAkBC,MAE/BA,IAAWC,EAAS,WAAW,GAAG,IAAIA,EAD3BF,IAAU,WAAW,aAC0B,GAAG,GAGzDG,KAASC,EAAM,WAAW,SAA4BC,GAAoBC,GAAmC;AAClH,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,UAAAR;AAAA,IACA,OAAAS;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC,IAAOD;AAAA,IACP,MAAAE,IAAOC,EAAS;AAAA,IAChB,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,kBA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A,MACJ,MAAAX;AAAA,MACA,WAAWoB;AAAA,MACX,UAAAlC;AAAA,MACA,KAAAK;AAAA,MACA,UAAAc;AAAA,MACA,oBAAkBuB,EAAmBtC,GAAOuB,CAAa;AAAA,MACzD,iBAAe,CAAC,CAACR;AAAA,MACjB,OAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAcC,KAA8B;AAAA,MAC3C,GAAGE;AAAA,IAAA;AAAA,IAEHjB;AAAA,EAEL,CAAA,CACF,CACF;AAEJ,CAAC;"}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import e, { useState as h } from "react";
|
|
2
|
-
import p from "classnames";
|
|
3
|
-
import { useBreakpoint as z } from "../../hooks/useBreakpoint.js";
|
|
4
|
-
import { useHover as u } from "../../hooks/useHover.js";
|
|
5
|
-
import { useUuid as w } from "../../hooks/useUuid.js";
|
|
6
|
-
import { getColor as H } from "../../theme/currys/color.js";
|
|
7
|
-
import { breakpoints as L } from "../../theme/grid.js";
|
|
8
|
-
import { getAriaLabelAttributes as X } from "../../utils/accessibility.js";
|
|
9
|
-
import y from "../Badge/NotificationBadge.js";
|
|
10
|
-
import A from "../Close/Close.js";
|
|
11
|
-
import { Icon as C } from "../Icon/Icon.js";
|
|
12
|
-
import { IconSize as E } from "../../constants.js";
|
|
13
|
-
import M from "../Icons/ChevronDown.js";
|
|
14
|
-
import U from "../Icons/ChevronUp.js";
|
|
15
|
-
import B from "../Icons/Forward.js";
|
|
16
|
-
import j from "../Icons/X.js";
|
|
17
|
-
import s from "../ServiceMessage/styles.module.scss";
|
|
18
|
-
const F = ({ label: o, variant: c, id: m, hasExpander: r, isExpanded: i, dismissable: v, onExpand: l, onDismiss: _, closeBtnText: n }) => {
|
|
19
|
-
const d = z(), { isHovered: a, hoverRef: g } = u(), t = d < L.lg ? E.XSmall : E.Small, N = r ? "button" : "span", f = p(
|
|
20
|
-
s["service-message__label-container"],
|
|
21
|
-
r && s["service-message__label-container--has-expander"]
|
|
22
|
-
);
|
|
23
|
-
return /* @__PURE__ */ e.createElement("div", { className: f, ref: g }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__container"] }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__row"] }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__col"] }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__label"] }, /* @__PURE__ */ e.createElement(y, { variant: c, size: t, isHovered: a }), /* @__PURE__ */ e.createElement("h1", { className: s["service-message__title"], id: m }, /* @__PURE__ */ e.createElement(
|
|
24
|
-
N,
|
|
25
|
-
{
|
|
26
|
-
className: s["service-message__toggle"],
|
|
27
|
-
onClick: r ? l : void 0,
|
|
28
|
-
"aria-expanded": r ? i : void 0
|
|
29
|
-
},
|
|
30
|
-
o
|
|
31
|
-
)), r && /* @__PURE__ */ e.createElement(C, { size: t, svgIcon: i ? U : M, isHovered: a }), !r && v && /* @__PURE__ */ e.createElement(A, { onClick: _, ariaLabel: n, className: s["service-message__close"] }))))));
|
|
32
|
-
}, $ = ({ info: o, extraInfo: c, urlTitle: m, url: r, target: i, dismissable: v, closeBtnText: l, onDismiss: _ }) => {
|
|
33
|
-
const { hoverRef: n, isHovered: d } = u(), { hoverRef: a, isHovered: g } = u(), t = r && m;
|
|
34
|
-
return /* @__PURE__ */ e.createElement("div", { className: s["service-message__container"] }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__row"] }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__col"] }, /* @__PURE__ */ e.createElement("div", { className: s["service-message__content"] }, o && /* @__PURE__ */ e.createElement("p", { className: s["service-message__info"] }, o), c && /* @__PURE__ */ e.createElement("p", { className: p(s["service-message__info"], s["service-message__info--extra"]) }, c), /* @__PURE__ */ e.createElement("div", { className: s["service-message__actions"] }, t && /* @__PURE__ */ e.createElement("a", { className: s["service-message__action"], href: r, ref: n, target: i }, m, /* @__PURE__ */ e.createElement(C, { size: E.XSmall, svgIcon: B, color: H("blueberry", 700), isHovered: d })), v && /* @__PURE__ */ e.createElement(
|
|
35
|
-
"button",
|
|
36
|
-
{
|
|
37
|
-
ref: a,
|
|
38
|
-
className: p(s["service-message__action"], s["service-message__action--close"]),
|
|
39
|
-
"aria-label": l,
|
|
40
|
-
onClick: _
|
|
41
|
-
},
|
|
42
|
-
l,
|
|
43
|
-
/* @__PURE__ */ e.createElement(C, { size: E.XSmall, svgIcon: j, color: H("blueberry", 700), isHovered: g })
|
|
44
|
-
))))));
|
|
45
|
-
}, ae = ({
|
|
46
|
-
label: o,
|
|
47
|
-
dismissable: c = !0,
|
|
48
|
-
onDismiss: m,
|
|
49
|
-
info: r,
|
|
50
|
-
extraInfo: i,
|
|
51
|
-
urlTitle: v,
|
|
52
|
-
url: l,
|
|
53
|
-
target: _ = "_self",
|
|
54
|
-
closeBtnText: n = "fjern melding",
|
|
55
|
-
expanderOpenFromStart: d = !1,
|
|
56
|
-
variant: a = "error",
|
|
57
|
-
testId: g
|
|
58
|
-
}) => {
|
|
59
|
-
const [t, N] = h(d), f = w(), b = !!r || !!i, R = a === "error" ? "alert" : "region", S = X({ label: o, id: f }), k = () => {
|
|
60
|
-
b && N(!t);
|
|
61
|
-
}, I = p(s["service-message"], s[`service-message--${a}`]);
|
|
62
|
-
return /* @__PURE__ */ e.createElement("div", { className: I, role: R, ...S, "data-testid": g }, /* @__PURE__ */ e.createElement(
|
|
63
|
-
F,
|
|
64
|
-
{
|
|
65
|
-
label: o,
|
|
66
|
-
variant: a,
|
|
67
|
-
id: f,
|
|
68
|
-
hasExpander: b,
|
|
69
|
-
isExpanded: t,
|
|
70
|
-
dismissable: c,
|
|
71
|
-
onExpand: k,
|
|
72
|
-
onDismiss: m,
|
|
73
|
-
closeBtnText: n
|
|
74
|
-
}
|
|
75
|
-
), b && t && /* @__PURE__ */ e.createElement(
|
|
76
|
-
$,
|
|
77
|
-
{
|
|
78
|
-
info: r,
|
|
79
|
-
extraInfo: i,
|
|
80
|
-
urlTitle: v,
|
|
81
|
-
url: l,
|
|
82
|
-
target: _,
|
|
83
|
-
dismissable: c,
|
|
84
|
-
onDismiss: m,
|
|
85
|
-
closeBtnText: n
|
|
86
|
-
}
|
|
87
|
-
));
|
|
88
|
-
};
|
|
89
|
-
export {
|
|
90
|
-
ae as default
|
|
91
|
-
};
|
|
92
|
-
//# sourceMappingURL=ServiceMessage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceMessage.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","NotificationBadge","React","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,QAErCe,IAAwBC;AAAA,IAC5BC,EAAO,kCAAkC;AAAA,IACzCjB,KAAeiB,EAAO,gDAAgD;AAAA,EAAA;AAGxE,yCACG,OAAI,EAAA,WAAWF,GAAuB,KAAKN,EAAA,mCACzC,OAAI,EAAA,WAAWQ,EAAO,4BAA4B,EAAA,mCAChD,OAAI,EAAA,WAAWA,EAAO,sBAAsB,EAAA,mCAC1C,OAAI,EAAA,WAAWA,EAAO,sBAAsB,EAAA,mCAC1C,OAAI,EAAA,WAAWA,EAAO,wBAAwB,EAAA,mCAC5CC,GAAk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,GAAS,GAEnEK,IAAc,MAAY;AACf,IAAAhD,KAAAyC,EAAc,CAACxC,CAAU;AAAA,EAAA,GAGpCgD,IAAUjC,EAAWC,EAAO,iBAAiB,GAAGA,EAAO,oBAAoBnB,CAAO,EAAE,CAAC;AAGzF,SAAAqB,gBAAAA,EAAA,cAAC,SAAI,WAAW8B,GAAS,MAAMJ,GAAW,GAAGC,GAAqB,eAAaN,EAC7E,GAAArB,gBAAAA,EAAA;AAAA,IAACvB;AAAA,IAAA;AAAA,MACC,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,IAAI6C;AAAA,MACJ,aAAA3C;AAAA,MACA,YAAAC;AAAA,MACA,aAAAC;AAAA,MACA,UAAU8C;AAAA,MACV,WAAA5C;AAAA,MACA,cAAAC;AAAA,IAAA;AAAA,EAAA,GAEDL,KAAeC,KACdkB,gBAAAA,EAAA;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,MAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,MACA,QAAAC;AAAA,MACA,aAAA3B;AAAA,MACA,WAAAE;AAAA,MACA,cAAAC;AAAA,IAAA;AAAA,EAAA,CAGN;AAEJ;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import a from "classnames";
|
|
3
|
-
import { AnalyticsId as d, IconSize as _ } from "../../constants.js";
|
|
4
|
-
import { palette as h } from "../../theme/palette.js";
|
|
5
|
-
import { Icon as g } from "../Icon/Icon.js";
|
|
6
|
-
import s from "../SharingStatus/styles.module.scss";
|
|
7
|
-
const E = (r) => {
|
|
8
|
-
const { color: e = "blueberry", icon: l, children: n, className: o, testId: c, wrapText: i } = r, m = a(s["sharing-status"], o), p = a(s["sharing-status__dot"], s[`sharing-status__dot--${e}`]), u = a(s["sharing-status__label"], s[`sharing-status__label--${e}`], {
|
|
9
|
-
[s["sharing-status__label--wrap"]]: i
|
|
10
|
-
});
|
|
11
|
-
return /* @__PURE__ */ t.createElement("span", { className: m, "data-testid": c, "data-analyticsid": d.SharingStatus }, /* @__PURE__ */ t.createElement("span", { className: p }, /* @__PURE__ */ t.createElement(g, { color: h.white, svgIcon: l, size: _.XXSmall })), /* @__PURE__ */ t.createElement("span", { className: u }, n));
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
E as default
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=SharingStatus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SharingStatus.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","React","AnalyticsId","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;AAED,SACGM,gBAAAA,EAAA,cAAA,QAAA,EAAK,WAAWL,GAAsB,eAAaF,GAAQ,oBAAkBQ,EAAY,cACxF,GAAAD,gBAAAA,EAAA,cAAC,QAAK,EAAA,WAAWF,KACdE,gBAAAA,EAAA,cAAAE,GAAA,EAAK,OAAOC,EAAQ,OAAO,SAASb,GAAM,MAAMc,EAAS,QAAA,CAAS,CACrE,GACCJ,gBAAAA,EAAA,cAAA,QAAA,EAAK,WAAWD,EAAA,GAAeR,CAAS,CAC3C;AAEJ;"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import a, { useState as D, useRef as z, useEffect as v } from "react";
|
|
2
|
-
import M from "classnames";
|
|
3
|
-
import { AnalyticsId as Z } from "../../constants.js";
|
|
4
|
-
import { useSize as x } from "../../hooks/useSize.js";
|
|
5
|
-
import { useUuid as C } from "../../hooks/useUuid.js";
|
|
6
|
-
import { getAriaLabelAttributes as V } from "../../utils/accessibility.js";
|
|
7
|
-
import { Title as ee } from "../Title/Title.js";
|
|
8
|
-
import n from "../Slider/styles.module.scss";
|
|
9
|
-
const te = (s, k, f) => {
|
|
10
|
-
const [_, o] = D(s), p = (r) => {
|
|
11
|
-
r > f ? o(f) : r < k ? o(k) : o(r);
|
|
12
|
-
};
|
|
13
|
-
return v(() => {
|
|
14
|
-
p(s);
|
|
15
|
-
}, [k, f]), [_, p];
|
|
16
|
-
}, fe = ({
|
|
17
|
-
title: s,
|
|
18
|
-
ariaLabel: k,
|
|
19
|
-
labelLeft: f,
|
|
20
|
-
labelRight: _,
|
|
21
|
-
disabled: o = !1,
|
|
22
|
-
onChange: p,
|
|
23
|
-
steps: r,
|
|
24
|
-
step: g = 1,
|
|
25
|
-
minValue: i = 0,
|
|
26
|
-
maxValue: d = r ? r.length - 1 : 100,
|
|
27
|
-
selected: w = !0,
|
|
28
|
-
testId: K,
|
|
29
|
-
value: m
|
|
30
|
-
}) => {
|
|
31
|
-
const [L, U] = D(!1), [y, R] = D(typeof m > "u" ? w : !0), [c, u] = te(
|
|
32
|
-
typeof m > "u" ? (d - i) / 2 + i : m,
|
|
33
|
-
i,
|
|
34
|
-
d
|
|
35
|
-
), h = C(), N = C(), b = C(), P = z(null), j = z(null), { width: B } = x(P) || { width: 0 }, X = d / 10;
|
|
36
|
-
v(() => {
|
|
37
|
-
const t = () => {
|
|
38
|
-
U(!1);
|
|
39
|
-
};
|
|
40
|
-
return document.addEventListener("pointerup", t), () => {
|
|
41
|
-
document.removeEventListener("pointerup", t);
|
|
42
|
-
};
|
|
43
|
-
}, []);
|
|
44
|
-
const $ = (t) => {
|
|
45
|
-
var T;
|
|
46
|
-
const e = ((T = P.current) == null ? void 0 : T.getBoundingClientRect().x) ?? 0, l = (t - e) / B, E = d - i;
|
|
47
|
-
let S = l * E + i;
|
|
48
|
-
return S = Math.round(S / g) * g, S = Math.max(i, Math.min(d, S)), S;
|
|
49
|
-
};
|
|
50
|
-
v(() => {
|
|
51
|
-
const t = (e) => {
|
|
52
|
-
if (!o && L) {
|
|
53
|
-
const l = $(e.clientX);
|
|
54
|
-
u(l);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
return document.addEventListener("pointermove", t), () => {
|
|
58
|
-
document.removeEventListener("pointermove", t);
|
|
59
|
-
};
|
|
60
|
-
}, [L]), v(() => {
|
|
61
|
-
m !== c && typeof m < "u" && (A(), u(m));
|
|
62
|
-
}, [m]), v(() => {
|
|
63
|
-
!o && y && p && p(c);
|
|
64
|
-
}, [c, y]), v(() => {
|
|
65
|
-
typeof m > "u" && w !== y && R(w);
|
|
66
|
-
}, [w]);
|
|
67
|
-
const A = () => {
|
|
68
|
-
y === !1 && R(!0);
|
|
69
|
-
}, H = (t) => {
|
|
70
|
-
if (o) return;
|
|
71
|
-
let e = !1;
|
|
72
|
-
switch (t.key) {
|
|
73
|
-
case "ArrowLeft":
|
|
74
|
-
case "ArrowDown":
|
|
75
|
-
u(c - g), e = !0;
|
|
76
|
-
break;
|
|
77
|
-
case "PageDown":
|
|
78
|
-
u(c - X), e = !0;
|
|
79
|
-
break;
|
|
80
|
-
case "ArrowRight":
|
|
81
|
-
case "ArrowUp":
|
|
82
|
-
u(c + g), e = !0;
|
|
83
|
-
break;
|
|
84
|
-
case "PageUp":
|
|
85
|
-
u(c + X), e = !0;
|
|
86
|
-
break;
|
|
87
|
-
case "Home":
|
|
88
|
-
u(i), e = !0;
|
|
89
|
-
break;
|
|
90
|
-
case "End":
|
|
91
|
-
u(d), e = !0;
|
|
92
|
-
break;
|
|
93
|
-
}
|
|
94
|
-
e && (A(), t.preventDefault(), t.stopPropagation());
|
|
95
|
-
}, O = (t) => {
|
|
96
|
-
var l;
|
|
97
|
-
if (o) return;
|
|
98
|
-
const e = $(t.clientX);
|
|
99
|
-
u(e), (l = j.current) == null || l.focus();
|
|
100
|
-
}, W = (t) => {
|
|
101
|
-
var e;
|
|
102
|
-
o || (U(!0), A(), t.preventDefault(), t.stopPropagation(), (e = j.current) == null || e.focus());
|
|
103
|
-
}, q = d !== i ? B / (d - i) * (c - i) : 0, F = () => {
|
|
104
|
-
const t = r ? Math.round((c - i) / g) : null;
|
|
105
|
-
if (r && t !== null && t >= 0 && t < r.length) {
|
|
106
|
-
const e = r[t], l = e.emojiUniCode, E = typeof e.label < "u" ? e.label.toString() : void 0;
|
|
107
|
-
return l && E ? `${l} ${E}` : l || E;
|
|
108
|
-
}
|
|
109
|
-
}, G = V({
|
|
110
|
-
label: k,
|
|
111
|
-
id: (() => {
|
|
112
|
-
if (s && f && _)
|
|
113
|
-
return [h, N, b].join(" ");
|
|
114
|
-
if (s && f)
|
|
115
|
-
return [h, N].join(" ");
|
|
116
|
-
if (s && _)
|
|
117
|
-
return [h, b].join(" ");
|
|
118
|
-
if (s)
|
|
119
|
-
return h;
|
|
120
|
-
})(),
|
|
121
|
-
prefer: "label"
|
|
122
|
-
}), I = (t, e) => ({ left: `${t / (e - 1) * 100}%` }), J = () => /* @__PURE__ */ a.createElement("div", { className: n["slider__emoji-container"] }, r == null ? void 0 : r.map((t, e) => t.emojiUniCode && /* @__PURE__ */ a.createElement(
|
|
123
|
-
"div",
|
|
124
|
-
{
|
|
125
|
-
"aria-hidden": !0,
|
|
126
|
-
key: "emoji" + e,
|
|
127
|
-
className: n.slider__emoji,
|
|
128
|
-
style: I(e, r.length)
|
|
129
|
-
},
|
|
130
|
-
t.emojiUniCode
|
|
131
|
-
))), Q = () => r == null ? void 0 : r.map((t, e) => /* @__PURE__ */ a.createElement("div", { key: "step" + e, className: n.slider__track__step, style: I(e, r.length) })), Y = () => /* @__PURE__ */ a.createElement("div", { className: n["slider__value-container"] }, r == null ? void 0 : r.map((t, e) => typeof t.label < "u" && /* @__PURE__ */ a.createElement(
|
|
132
|
-
"div",
|
|
133
|
-
{
|
|
134
|
-
"aria-hidden": !0,
|
|
135
|
-
key: "label" + e,
|
|
136
|
-
className: n.slider__value,
|
|
137
|
-
style: I(e, r.length)
|
|
138
|
-
},
|
|
139
|
-
t.label
|
|
140
|
-
)));
|
|
141
|
-
return /* @__PURE__ */ a.createElement("div", { className: n.slider, "data-testid": K, "data-analyticsid": Z.Slider }, s && /* @__PURE__ */ a.createElement(ee, { className: n.slider__title, htmlMarkup: "h3", margin: 0, appearance: "title3", id: h }, s), /* @__PURE__ */ a.createElement("div", { className: n["slider__content-container"] }, J(), /* @__PURE__ */ a.createElement(
|
|
142
|
-
"div",
|
|
143
|
-
{
|
|
144
|
-
ref: P,
|
|
145
|
-
className: M(n["slider__track-wrapper"], o && n["slider__track-wrapper--disabled"]),
|
|
146
|
-
onClick: O,
|
|
147
|
-
onPointerDown: W
|
|
148
|
-
},
|
|
149
|
-
/* @__PURE__ */ a.createElement("div", { className: M(n.slider__track, o && n["slider__track--disabled"]) }, Q()),
|
|
150
|
-
/* @__PURE__ */ a.createElement(
|
|
151
|
-
"div",
|
|
152
|
-
{
|
|
153
|
-
role: o ? void 0 : "slider",
|
|
154
|
-
ref: j,
|
|
155
|
-
className: M(n.slider__marker, {
|
|
156
|
-
[n["slider__marker--disabled"]]: o,
|
|
157
|
-
[n["slider__marker--selected"]]: y
|
|
158
|
-
}),
|
|
159
|
-
style: {
|
|
160
|
-
left: `${q}px`
|
|
161
|
-
},
|
|
162
|
-
onKeyDown: H,
|
|
163
|
-
"aria-valuenow": c,
|
|
164
|
-
"aria-valuetext": F(),
|
|
165
|
-
"aria-valuemin": i,
|
|
166
|
-
"aria-valuemax": d,
|
|
167
|
-
tabIndex: o ? void 0 : 0,
|
|
168
|
-
"aria-disabled": o,
|
|
169
|
-
...G
|
|
170
|
-
}
|
|
171
|
-
)
|
|
172
|
-
), Y()), (f || _) && /* @__PURE__ */ a.createElement("span", { className: n.slider__options }, /* @__PURE__ */ a.createElement("span", { id: N }, f), /* @__PURE__ */ a.createElement("span", { id: b }, _)));
|
|
173
|
-
};
|
|
174
|
-
export {
|
|
175
|
-
fe as Slider,
|
|
176
|
-
fe as default
|
|
177
|
-
};
|
|
178
|
-
//# sourceMappingURL=Slider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\nconst useSafeNumberValue = (initial: number, min: number, max: number): [number, (value: number) => void] => {\n const [value, setValue] = useState(initial);\n\n const setSafeValue = (newValue: number): void => {\n if (newValue > max) {\n setValue(max);\n } else if (newValue < min) {\n setValue(min);\n } else {\n setValue(newValue);\n }\n };\n\n useEffect(() => {\n setSafeValue(initial);\n }, [min, max]);\n\n return [value, setSafeValue];\n};\n\nexport type SliderStep = {\n label?: number | string;\n emojiUniCode?: string;\n};\n\nexport interface SliderProps {\n /**\tSets the title of the slider. */\n title?: string;\n /** Adds the left hand label to the element. */\n labelLeft?: string;\n /** Adds the right hand label to the element. */\n labelRight?: string;\n /**\tSets aria-label of the slider. */\n ariaLabel?: string;\n /** Disables the slider element. */\n disabled?: boolean;\n /** Sets the minimum allowed value on the slider - this overrides the use of steps prop for minValue/maxValue. */\n minValue?: number;\n /** Sets the maximum allowed value on the slider - this overrides the use of steps prop for minValue/maxValue. */\n maxValue?: number;\n /** Function to be called when the value state has changed. */\n onChange?: (value: number) => void;\n /** If set to false will only trigger onChange once a user interaction has been made, updates to this prop will be taken into account - true by default */\n selected?: boolean;\n /** Sets the steps data for the slider */\n steps?: SliderStep[];\n /** Sets the step to move per point in the slider */\n step?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the value of the slider */\n value?: number;\n}\n\nexport const Slider: React.FC<SliderProps> = ({\n title,\n ariaLabel,\n labelLeft,\n labelRight,\n disabled = false,\n onChange,\n steps,\n step = 1,\n minValue = 0,\n maxValue = steps ? steps.length - 1 : 100,\n selected = true,\n testId,\n value,\n}) => {\n const [isMoving, setIsMoving] = useState(false);\n const [selectedState, setSelectedState] = useState(typeof value === 'undefined' ? selected : true);\n const [valueState, setValueState] = useSafeNumberValue(\n typeof value === 'undefined' ? (maxValue - minValue) / 2 + minValue : value,\n minValue,\n maxValue\n );\n\n const titleId = useUuid();\n const labelLeftId = useUuid();\n const labelRightId = useUuid();\n const trackRef = useRef<HTMLDivElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const { width: trackWidth } = useSize(trackRef) || { width: 0 };\n const largeStep = maxValue / 10;\n\n useEffect(() => {\n const handlePointerUp = (): void => {\n setIsMoving(false);\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n };\n }, []);\n\n const getValueBasedOnMarkerPosition = (markerPosition: number): number => {\n const trackPosition = trackRef.current?.getBoundingClientRect().x ?? 0;\n\n // Calculate the normalized position (0 to 1) of the marker along the track\n const normalizedPosition = (markerPosition - trackPosition) / trackWidth;\n const valueRange = maxValue - minValue;\n // Calculate the value without considering the step\n let value = normalizedPosition * valueRange + minValue;\n // Adjust the value to account for the step increment\n const stepCount = Math.round(value / step);\n value = stepCount * step;\n value = Math.max(minValue, Math.min(maxValue, value));\n\n return value;\n };\n\n useEffect(() => {\n const handlePointerMove = (e: PointerEvent): void => {\n if (!disabled && isMoving) {\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValueState(newValue);\n }\n };\n\n document.addEventListener('pointermove', handlePointerMove);\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n };\n }, [isMoving]);\n\n useEffect(() => {\n if (value !== valueState && typeof value !== 'undefined') {\n handleSelected();\n setValueState(value);\n }\n }, [value]);\n\n useEffect(() => {\n if (!disabled && selectedState && onChange) {\n onChange(valueState);\n }\n }, [valueState, selectedState]);\n\n useEffect(() => {\n if (typeof value === 'undefined' && selected !== selectedState) {\n setSelectedState(selected);\n }\n }, [selected]);\n\n const handleSelected = (): void => {\n if (selectedState === false) {\n setSelectedState(true);\n }\n };\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n let flag = false;\n\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n setValueState(valueState - step);\n flag = true;\n break;\n case 'PageDown':\n setValueState(valueState - largeStep);\n flag = true;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n setValueState(valueState + step);\n flag = true;\n break;\n case 'PageUp':\n setValueState(valueState + largeStep);\n flag = true;\n break;\n case 'Home':\n setValueState(minValue);\n flag = true;\n break;\n case 'End':\n setValueState(maxValue);\n flag = true;\n break;\n default:\n break;\n }\n\n if (flag) {\n handleSelected();\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const handleTrackClick: React.MouseEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValueState(newValue);\n markerRef.current?.focus();\n };\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n setIsMoving(true);\n handleSelected();\n\n e.preventDefault();\n e.stopPropagation();\n\n markerRef.current?.focus();\n };\n\n const markerXPos = maxValue !== minValue ? (trackWidth / (maxValue - minValue)) * (valueState - minValue) : 0;\n\n const getAriaValueText = (): string | undefined => {\n const stepIndex = steps ? Math.round((valueState - minValue) / step) : null;\n\n if (steps && stepIndex !== null && stepIndex >= 0 && stepIndex < steps.length) {\n const step = steps[stepIndex];\n const emojiCode = step.emojiUniCode;\n const label = typeof step.label !== 'undefined' ? step.label.toString() : undefined;\n\n return emojiCode && label ? `${emojiCode} ${label}` : emojiCode || label;\n }\n\n return undefined;\n };\n\n const getAriaLabeledById = (): string | undefined => {\n if (title && labelLeft && labelRight) {\n return [titleId, labelLeftId, labelRightId].join(' ');\n }\n if (title && labelLeft) {\n return [titleId, labelLeftId].join(' ');\n }\n if (title && labelRight) {\n return [titleId, labelRightId].join(' ');\n }\n if (title) {\n return titleId;\n }\n };\n\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: ariaLabel,\n id: getAriaLabeledById(),\n prefer: 'label',\n });\n\n const getXPositionStyling = (index: number, stepsLength: number): { left: string } => {\n return { left: `${(index / (stepsLength - 1)) * 100}%` };\n };\n\n const renderEmojies = (): React.ReactNode => {\n return (\n <div className={styles['slider__emoji-container']}>\n {steps?.map((step, index) => {\n return (\n step.emojiUniCode && (\n <div\n aria-hidden={true}\n key={'emoji' + index}\n className={styles['slider__emoji']}\n style={getXPositionStyling(index, steps.length)}\n >\n {step.emojiUniCode}\n </div>\n )\n );\n })}\n </div>\n );\n };\n\n const renderSteps = (): React.ReactNode => {\n return steps?.map((_step, index) => {\n return <div key={'step' + index} className={styles['slider__track__step']} style={getXPositionStyling(index, steps.length)} />;\n });\n };\n\n const renderStepLabels = (): React.ReactNode => {\n return (\n <div className={styles['slider__value-container']}>\n {steps?.map((step, index) => {\n return (\n typeof step.label !== 'undefined' && (\n <div\n aria-hidden={true}\n key={'label' + index}\n className={styles['slider__value']}\n style={getXPositionStyling(index, steps.length)}\n >\n {step.label}\n </div>\n )\n );\n })}\n </div>\n );\n };\n\n return (\n <div className={styles.slider} data-testid={testId} data-analyticsid={AnalyticsId.Slider}>\n {title && (\n <Title className={styles['slider__title']} htmlMarkup={'h3'} margin={0} appearance={'title3'} id={titleId}>\n {title}\n </Title>\n )}\n <div className={styles['slider__content-container']}>\n {renderEmojies()}\n {/* Komponenten er tilgjengelig for mus/keyboard gjennom bruk av slideren */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n ref={trackRef}\n className={classNames(styles['slider__track-wrapper'], disabled && styles['slider__track-wrapper--disabled'])}\n onClick={handleTrackClick}\n onPointerDown={handlePointerDown}\n >\n <div className={classNames(styles.slider__track, disabled && styles['slider__track--disabled'])}>{renderSteps()}</div>\n <div\n role={disabled ? undefined : 'slider'}\n ref={markerRef}\n className={classNames(styles.slider__marker, {\n [styles['slider__marker--disabled']]: disabled,\n [styles['slider__marker--selected']]: selectedState,\n })}\n style={{\n left: `${markerXPos}px`,\n }}\n onKeyDown={handleKeyDown}\n aria-valuenow={valueState}\n aria-valuetext={getAriaValueText()}\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n tabIndex={disabled ? undefined : 0}\n aria-disabled={disabled}\n {...ariaLabelAttributes}\n />\n </div>\n {renderStepLabels()}\n </div>\n {(labelLeft || labelRight) && (\n <span className={styles.slider__options}>\n <span id={labelLeftId}>{labelLeft}</span>\n <span id={labelRightId}>{labelRight}</span>\n </span>\n )}\n </div>\n );\n};\n\nexport default Slider;\n"],"names":["useSafeNumberValue","initial","min","max","value","setValue","useState","setSafeValue","newValue","useEffect","Slider","title","ariaLabel","labelLeft","labelRight","disabled","onChange","steps","step","minValue","maxValue","selected","testId","isMoving","setIsMoving","selectedState","setSelectedState","valueState","setValueState","titleId","useUuid","labelLeftId","labelRightId","trackRef","useRef","markerRef","trackWidth","useSize","largeStep","handlePointerUp","getValueBasedOnMarkerPosition","markerPosition","trackPosition","_a","normalizedPosition","valueRange","handlePointerMove","handleSelected","handleKeyDown","e","flag","handleTrackClick","handlePointerDown","markerXPos","getAriaValueText","stepIndex","emojiCode","label","ariaLabelAttributes","getAriaLabelAttributes","getXPositionStyling","index","stepsLength","renderEmojies","React","styles","renderSteps","_step","renderStepLabels","AnalyticsId","Title","classNames"],"mappings":";;;;;;;;AAYA,MAAMA,KAAqB,CAACC,GAAiBC,GAAaC,MAAmD;AAC3G,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAASL,CAAO,GAEpCM,IAAe,CAACC,MAA2B;AAC/C,IAAIA,IAAWL,IACbE,EAASF,CAAG,IACHK,IAAWN,IACpBG,EAASH,CAAG,IAEZG,EAASG,CAAQ;AAAA,EACnB;AAGF,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAaN,CAAO;AAAA,EAAA,GACnB,CAACC,GAAKC,CAAG,CAAC,GAEN,CAACC,GAAOG,CAAY;AAC7B,GAoCaG,KAAgC,CAAC;AAAA,EAC5C,OAAAC;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C,CAEJ;AAEJ;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Spacer.js","sources":["../../../src/components/Spacer/Spacer.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { SpacerSizes } from './../../theme/spacers';\nimport { AnalyticsId } from '../../constants';\n\nimport spacerStyles from './styles.module.scss';\n\nexport interface SpacerProps {\n /** Sets the size of the spacer. */\n size?: SpacerSizes;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Spacer = React.forwardRef(function SpacerForwardedRef(props: SpacerProps, ref: React.ForwardedRef<HTMLElement>) {\n const { size = 's', className, testId } = props;\n const spacerClasses = classNames(\n spacerStyles.spacer,\n {\n [spacerStyles['spacer--4xs']]: size === '4xs',\n [spacerStyles['spacer--3xs']]: size === '3xs',\n [spacerStyles['spacer--2xs']]: size === '2xs',\n [spacerStyles['spacer--xs']]: size === 'xs',\n [spacerStyles['spacer--s']]: size === 's',\n [spacerStyles['spacer--m']]: size === 'm',\n [spacerStyles['spacer--l']]: size === 'l',\n [spacerStyles['spacer--xl']]: size === 'xl',\n [spacerStyles['spacer--2xl']]: size === '2xl',\n [spacerStyles['spacer--3xl']]: size === '3xl',\n [spacerStyles['spacer--4xl']]: size === '4xl',\n [spacerStyles['spacer--5xl']]: size === '5xl',\n [spacerStyles['spacer--6xl']]: size === '6xl',\n },\n className\n );\n\n return <span className={spacerClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Spacer}></span>;\n});\n\nexport default Spacer;\n"],"names":["Spacer","React","props","ref","size","className","testId","spacerClasses","classNames","spacerStyles","AnalyticsId"],"mappings":";;;;AAkBA,MAAMA,IAASC,EAAM,WAAW,SAA4BC,GAAoBC,GAAsC;AACpH,QAAM,EAAE,MAAAC,IAAO,KAAK,WAAAC,GAAW,QAAAC,MAAWJ,GACpCK,IAAgBC;AAAA,IACpBC,EAAa;AAAA,IACb;AAAA,MACE,CAACA,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,YAAY,CAAC,GAAGL,MAAS;AAAA,MACvC,CAACK,EAAa,WAAW,CAAC,GAAGL,MAAS;AAAA,MACtC,CAACK,EAAa,WAAW,CAAC,GAAGL,MAAS;AAAA,MACtC,CAACK,EAAa,WAAW,CAAC,GAAGL,MAAS;AAAA,MACtC,CAACK,EAAa,YAAY,CAAC,GAAGL,MAAS;AAAA,MACvC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,MACxC,CAACK,EAAa,aAAa,CAAC,GAAGL,MAAS;AAAA,IAC1C;AAAA,IACAC;AAAA,EAAA;AAGK,SAAAJ,gBAAAA,EAAA,cAAC,UAAK,WAAWM,GAAe,KAAAJ,GAAU,eAAaG,GAAQ,oBAAkBI,EAAY,OAAQ,CAAA;AAC9G,CAAC;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import t from "react";
|
|
2
|
-
import l from "classnames";
|
|
3
|
-
import "../../theme/grid.js";
|
|
4
|
-
import "../../hooks/useBreakpoint.js";
|
|
5
|
-
import { FormMode as d, AnalyticsId as k, IconSize as E } from "../../constants.js";
|
|
6
|
-
import { getColor as m } from "../../theme/currys/color.js";
|
|
7
|
-
import { Icon as a } from "../Icon/Icon.js";
|
|
8
|
-
import w from "../Icons/Attachment.js";
|
|
9
|
-
import v from "../Icons/Change.js";
|
|
10
|
-
import C from "../Icons/Group.js";
|
|
11
|
-
import N from "../Icons/NoAccess.js";
|
|
12
|
-
import n from "../StatusDot/styles.module.scss";
|
|
13
|
-
var c = ((e) => (e[e.onwhite = d.onwhite] = "onwhite", e[e.ondark = d.ondark] = "ondark", e))(c || {}), y = /* @__PURE__ */ ((e) => (e.info = "info", e.warning = "warning", e.alert = "alert", e.cancelled = "cancelled", e.active = "active", e.transparent = "transparent", e.recurring = "recurring", e.group = "group", e.noaccess = "noaccess", e.attachment = "attachment", e))(y || {});
|
|
14
|
-
const b = ({ mode: e, variant: o }) => {
|
|
15
|
-
const r = { color: e === c.ondark ? m("white") : m("black"), size: E.XXSmall, mode: e };
|
|
16
|
-
return o === "recurring" ? /* @__PURE__ */ t.createElement(a, { ...r, svgIcon: v }) : o === "group" ? /* @__PURE__ */ t.createElement(a, { ...r, svgIcon: C }) : o === "noaccess" ? /* @__PURE__ */ t.createElement(a, { ...r, svgIcon: N, color: m("cherry", 600) }) : o === "attachment" ? /* @__PURE__ */ t.createElement(a, { ...r, svgIcon: w }) : null;
|
|
17
|
-
}, H = (e) => {
|
|
18
|
-
const { id: o, mode: s = c.onwhite, variant: r = "info", text: i, className: p, testId: f } = e, u = r === "recurring" || r === "group" || r === "noaccess" || r === "attachment", g = r === "cancelled", h = l(n.statusdot, g && n["statusdot--cancelled"], p), I = l(n.statusdot__dot, {
|
|
19
|
-
...u ? {} : { [n[`statusdot__dot--${r}`]]: !0 },
|
|
20
|
-
[n["statusdot__dot--on-dark"]]: s === c.ondark
|
|
21
|
-
}), _ = l(s === c.ondark && n["statusdot__label--on-dark"]);
|
|
22
|
-
return /* @__PURE__ */ t.createElement("span", { id: o, className: h, "data-testid": f, "data-analyticsid": k.StatusDot }, /* @__PURE__ */ t.createElement("span", { className: I }, /* @__PURE__ */ t.createElement(b, { mode: s, variant: r })), /* @__PURE__ */ t.createElement("span", { className: _ }, i));
|
|
23
|
-
};
|
|
24
|
-
export {
|
|
25
|
-
c as StatusDotModes,
|
|
26
|
-
y as StatusDotVariant,
|
|
27
|
-
H as default
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=StatusDot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.js","sources":["../../../src/components/StatusDot/StatusDot.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { IconSize } from '../..';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport { getColor } from '../../theme/currys';\nimport { Icon } from '../Icon';\nimport Attachment from '../Icons/Attachment';\nimport Change from '../Icons/Change';\nimport Group from '../Icons/Group';\nimport NoAccess from '../Icons/NoAccess';\n\nimport styles from './styles.module.scss';\n\nexport enum StatusDotModes {\n onwhite = FormMode.onwhite,\n ondark = FormMode.ondark,\n}\n\nexport enum StatusDotVariant {\n info = 'info',\n warning = 'warning',\n alert = 'alert',\n cancelled = 'cancelled',\n active = 'active',\n transparent = 'transparent',\n recurring = 'recurring',\n group = 'group',\n noaccess = 'noaccess',\n attachment = 'attachment',\n}\n\nexport interface StatusDotIconProps {\n /** Defines the color of the icon */\n mode?: keyof typeof StatusDotModes;\n /** The variant defines style formatting and what icon to use */\n variant?: keyof typeof StatusDotVariant;\n}\n\nconst StatusDotIcon: React.FC<StatusDotIconProps> = ({ mode, variant }) => {\n const color = mode === StatusDotModes.ondark ? getColor('white') : getColor('black');\n const iconProps = { color, size: IconSize.XXSmall, mode };\n\n if (variant === StatusDotVariant.recurring) {\n return <Icon {...iconProps} svgIcon={Change} />;\n } else if (variant === StatusDotVariant.group) {\n return <Icon {...iconProps} svgIcon={Group} />;\n } else if (variant === StatusDotVariant.noaccess) {\n return <Icon {...iconProps} svgIcon={NoAccess} color={getColor('cherry', 600)} />;\n } else if (variant === StatusDotVariant.attachment) {\n return <Icon {...iconProps} svgIcon={Attachment} />;\n }\n\n return null;\n};\n\nexport interface StatusDotProps {\n /** id that is placed on the wrapper */\n id?: string;\n /** Defines the color mode, onwhite, ondark etc. */\n mode?: keyof typeof StatusDotModes;\n /** Visual variants for the statusdot */\n variant?: keyof typeof StatusDotVariant;\n /** Text placed to the right of the statusdot */\n text: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst StatusDot: React.FC<StatusDotProps> = props => {\n const { id, mode = StatusDotModes.onwhite, variant = StatusDotVariant.info, text, className, testId } = props;\n\n const hasIcon =\n variant === StatusDotVariant.recurring ||\n variant === StatusDotVariant.group ||\n variant === StatusDotVariant.noaccess ||\n variant === StatusDotVariant.attachment;\n\n const isCancelled = variant === StatusDotVariant.cancelled;\n\n const statusDotClasses = classNames(styles['statusdot'], isCancelled && styles['statusdot--cancelled'], className);\n const dotClasses = classNames(styles['statusdot__dot'], {\n ...(hasIcon ? {} : { [styles[`statusdot__dot--${variant}`]]: true }),\n [styles['statusdot__dot--on-dark']]: mode === StatusDotModes.ondark,\n });\n const labelClasses = classNames(mode === StatusDotModes.ondark && styles['statusdot__label--on-dark']);\n\n return (\n <span id={id} className={statusDotClasses} data-testid={testId} data-analyticsid={AnalyticsId.StatusDot}>\n <span className={dotClasses}>\n <StatusDotIcon mode={mode} variant={variant} />\n </span>\n <span className={labelClasses}>{text}</span>\n </span>\n );\n};\n\nexport default StatusDot;\n"],"names":["StatusDotModes","FormMode","StatusDotVariant","StatusDotIcon","mode","variant","iconProps","getColor","IconSize","React","Icon","Change","Group","NoAccess","Attachment","StatusDot","props","id","text","className","testId","hasIcon","isCancelled","statusDotClasses","classNames","styles","dotClasses","labelClasses","AnalyticsId"],"mappings":";;;;;;;;;;;;AAeY,IAAAA,KAAL,CAAKA,OACVA,EAAAA,EAAA,UAAUC,EAAS,OAAnB,IAAA,WACAD,EAAAA,EAAA,SAASC,EAAS,MAAlB,IAAA,UAFUD,IAAAA,KAAA,CAAA,CAAA,GAKAE,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,UAAU,WACVA,EAAA,QAAQ,SACRA,EAAA,YAAY,aACZA,EAAA,SAAS,UACTA,EAAA,cAAc,eACdA,EAAA,YAAY,aACZA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,aAAa,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,IAAAQ,GAAQ,WAAWM,GAAkB,eAAaH,GAAQ,oBAAkBQ,EAAY,UAAA,GAC3FnB,gBAAAA,EAAA,cAAA,QAAA,EAAK,WAAWiB,EACf,GAAAjB,gBAAAA,EAAA,cAACN,GAAc,EAAA,MAAAC,GAAY,SAAAC,GAAkB,CAC/C,GACAI,gBAAAA,EAAA,cAAC,QAAK,EAAA,WAAWkB,EAAe,GAAAT,CAAK,CACvC;AAEJ;"}
|
package/components/Step/Step.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import { AnalyticsId as d } from "../../constants.js";
|
|
3
|
-
import { StepButtons as n } from "../StepButtons/StepButtons.js";
|
|
4
|
-
import i from "../Step/styles.module.scss";
|
|
5
|
-
const E = ({
|
|
6
|
-
stepper: t,
|
|
7
|
-
children: c,
|
|
8
|
-
backButton: a,
|
|
9
|
-
forwardButton: s,
|
|
10
|
-
additionalButtons: m,
|
|
11
|
-
cancelButton: r,
|
|
12
|
-
stickyButtons: l = !1,
|
|
13
|
-
testId: p
|
|
14
|
-
}) => {
|
|
15
|
-
const o = a || s || m || r;
|
|
16
|
-
return /* @__PURE__ */ e.createElement("div", { "data-testid": p, "data-analyticsid": d.Step }, t && /* @__PURE__ */ e.createElement("div", { className: i.step__stepper }, t), /* @__PURE__ */ e.createElement("div", { className: i.step__content }, c), o && /* @__PURE__ */ e.createElement(
|
|
17
|
-
n,
|
|
18
|
-
{
|
|
19
|
-
backButton: a,
|
|
20
|
-
forwardButton: s,
|
|
21
|
-
additionalButtons: m,
|
|
22
|
-
cancelButton: r,
|
|
23
|
-
sticky: l
|
|
24
|
-
}
|
|
25
|
-
));
|
|
26
|
-
};
|
|
27
|
-
export {
|
|
28
|
-
E as default
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=Step.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","sources":["../../../src/components/Step/Step.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\nimport { ButtonProps } from '../Button';\nimport StepButtons from '../StepButtons';\nimport { StepperProps } from '../Stepper';\n\nimport styles from './styles.module.scss';\n\nexport interface StepProps {\n /** Stepper viser fremdriften */\n stepper?: React.ReactElement<StepperProps>;\n /** Innhold i steget */\n children: React.ReactNode;\n /** Knapp for å gå tilbake. Vises med \"outline\" variant. */\n backButton?: React.ReactElement<ButtonProps>;\n /** Knapp for å gå videre. Vises med \"fill\" variant. */\n forwardButton?: React.ReactElement<ButtonProps>;\n /** Ekstra knapper. Valgfritt utseende. */\n additionalButtons?: React.ReactElement<ButtonProps>[];\n /** Knapp for å avbryte eller fortsette senere. Vises med \"borderless\" variant. */\n cancelButton?: React.ReactElement<ButtonProps>;\n /** Knappene vil vises sticky nederst på skjermen dersom innholdet i Step tar mer plass enn vinduet. Default: false */\n stickyButtons?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Step: React.FC<StepProps> = ({\n stepper,\n children,\n backButton,\n forwardButton,\n additionalButtons,\n cancelButton,\n stickyButtons = false,\n testId,\n}) => {\n const hasNavigation = backButton || forwardButton || additionalButtons || cancelButton;\n\n return (\n <div data-testid={testId} data-analyticsid={AnalyticsId.Step}>\n {stepper && <div className={styles.step__stepper}>{stepper}</div>}\n <div className={styles.step__content}>{children}</div>\n {hasNavigation && (\n <StepButtons\n backButton={backButton}\n forwardButton={forwardButton}\n additionalButtons={additionalButtons}\n cancelButton={cancelButton}\n sticky={stickyButtons}\n />\n )}\n </div>\n );\n};\n\nexport default Step;\n"],"names":["Step","stepper","children","backButton","forwardButton","additionalButtons","cancelButton","stickyButtons","testId","hasNavigation","React","AnalyticsId","styles","StepButtons"],"mappings":";;;;AA4BA,MAAMA,IAA4B,CAAC;AAAA,EACjC,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,eAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,QAAAC;AACF,MAAM;AACE,QAAAC,IAAgBN,KAAcC,KAAiBC,KAAqBC;AAGxE,SAAAI,gBAAAA,EAAA,cAAC,SAAI,eAAaF,GAAQ,oBAAkBG,EAAY,KAAA,GACrDV,KAAWS,gBAAAA,EAAA,cAAC,OAAI,EAAA,WAAWE,EAAO,cAAgB,GAAAX,CAAQ,GAC1DS,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAWE,EAAO,cAAA,GAAgBV,CAAS,GAC/CO,KACCC,gBAAAA,EAAA;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,YAAAV;AAAA,MACA,eAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,QAAQC;AAAA,IAAA;AAAA,EAAA,CAGd;AAEJ;"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import e from "react";
|
|
2
|
-
import n from "classnames";
|
|
3
|
-
import { AnalyticsId as m } from "../../constants.js";
|
|
4
|
-
import t from "../StepButtons/styles.module.scss";
|
|
5
|
-
const f = (r) => {
|
|
6
|
-
const { backButton: s, forwardButton: a, additionalButtons: o, cancelButton: l, sticky: u = !1, testId: i } = r, c = n(t.stepbuttons, u && t["stepbuttons--has-sticky-buttons"]);
|
|
7
|
-
return s || a || o || l ? /* @__PURE__ */ e.createElement("div", { className: c, "data-testid": i, "data-analyticsid": m.StepButtons }, (s || a) && /* @__PURE__ */ e.createElement("div", { className: t.stepbuttons__buttons }, s && e.cloneElement(s, {
|
|
8
|
-
variant: "outline",
|
|
9
|
-
wrapperClassName: n(t["stepbuttons__button--back"])
|
|
10
|
-
}), a && e.cloneElement(a, {
|
|
11
|
-
variant: "fill",
|
|
12
|
-
wrapperClassName: n(t["stepbuttons__button--forward"])
|
|
13
|
-
})), o && /* @__PURE__ */ e.createElement("div", { className: n(t.stepbuttons__buttons, t["stepbuttons__buttons--additional"]) }, o), l && /* @__PURE__ */ e.createElement("div", { className: t.stepbuttons__buttons }, e.cloneElement(l, {
|
|
14
|
-
variant: "borderless"
|
|
15
|
-
}))) : null;
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
f as StepButtons,
|
|
19
|
-
f as default
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=StepButtons.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StepButtons.js","sources":["../../../src/components/StepButtons/StepButtons.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { ButtonProps } from '../Button';\n\nimport styles from './styles.module.scss';\n\nexport interface StepButtonsProps {\n /** Knapp for å gå tilbake. Vises med \"outline\" variant. */\n backButton?: React.ReactElement<ButtonProps>;\n /** Knapp for å gå videre. Vises med \"fill\" variant. */\n forwardButton?: React.ReactElement<ButtonProps>;\n /** Ekstra knapper. Valgfritt utseende. */\n additionalButtons?: React.ReactElement<ButtonProps>[];\n /** Knapp for å avbryte eller fortsette senere. Vises med \"borderless\" variant. */\n cancelButton?: React.ReactElement<ButtonProps>;\n /** Knappene vil vises sticky nederst på skjermen. Default: false */\n sticky?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const StepButtons: React.FC<StepButtonsProps> = props => {\n const { backButton, forwardButton, additionalButtons, cancelButton, sticky = false, testId } = props;\n\n const navigationClasses = classNames(styles.stepbuttons, sticky && styles['stepbuttons--has-sticky-buttons']);\n\n if (backButton || forwardButton || additionalButtons || cancelButton) {\n return (\n <div className={navigationClasses} data-testid={testId} data-analyticsid={AnalyticsId.StepButtons}>\n {(backButton || forwardButton) && (\n <div className={styles.stepbuttons__buttons}>\n {backButton &&\n React.cloneElement(backButton, {\n variant: 'outline',\n wrapperClassName: classNames(styles['stepbuttons__button--back']),\n })}\n {forwardButton &&\n React.cloneElement(forwardButton, {\n variant: 'fill',\n wrapperClassName: classNames(styles['stepbuttons__button--forward']),\n })}\n </div>\n )}\n {additionalButtons && (\n <div className={classNames(styles.stepbuttons__buttons, styles['stepbuttons__buttons--additional'])}>{additionalButtons}</div>\n )}\n {cancelButton && (\n <div className={styles.stepbuttons__buttons}>\n {React.cloneElement(cancelButton, {\n variant: 'borderless',\n })}\n </div>\n )}\n </div>\n );\n }\n return null;\n};\n\nexport default StepButtons;\n"],"names":["StepButtons","props","backButton","forwardButton","additionalButtons","cancelButton","sticky","testId","navigationClasses","classNames","styles","AnalyticsId","React"],"mappings":";;;;AAwBO,MAAMA,IAA0C,CAASC,MAAA;AACxD,QAAA,EAAE,YAAAC,GAAY,eAAAC,GAAe,mBAAAC,GAAmB,cAAAC,GAAc,QAAAC,IAAS,IAAO,QAAAC,EAAW,IAAAN,GAEzFO,IAAoBC,EAAWC,EAAO,aAAaJ,KAAUI,EAAO,iCAAiC,CAAC;AAExG,SAAAR,KAAcC,KAAiBC,KAAqBC,oCAEnD,OAAI,EAAA,WAAWG,GAAmB,eAAaD,GAAQ,oBAAkBI,EAAY,YAAA,IAClFT,KAAcC,MACdS,gBAAAA,EAAA,cAAC,SAAI,WAAWF,EAAO,wBACpBR,KACCU,EAAM,aAAaV,GAAY;AAAA,IAC7B,SAAS;AAAA,IACT,kBAAkBO,EAAWC,EAAO,2BAA2B,CAAC;AAAA,EACjE,CAAA,GACFP,KACCS,EAAM,aAAaT,GAAe;AAAA,IAChC,SAAS;AAAA,IACT,kBAAkBM,EAAWC,EAAO,8BAA8B,CAAC;AAAA,EACpE,CAAA,CACL,GAEDN,KACCQ,gBAAAA,EAAA,cAAC,SAAI,WAAWH,EAAWC,EAAO,sBAAsBA,EAAO,kCAAkC,CAAC,KAAIN,CAAkB,GAEzHC,KACEO,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAWF,EAAO,qBAAA,GACpBE,EAAM,aAAaP,GAAc;AAAA,IAChC,SAAS;AAAA,EACV,CAAA,CACH,CAEJ,IAGG;AACT;"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import d from "react";
|
|
2
|
-
import l from "classnames";
|
|
3
|
-
import { STEPPER_PADDING_X_PX as m } from "./utils.js";
|
|
4
|
-
import e from "../Stepper/styles.module.scss";
|
|
5
|
-
const y = ({ index: o, completed: p, distanceBetweenDots: s, position: t }) => {
|
|
6
|
-
const r = l(
|
|
7
|
-
e.stepper__dot,
|
|
8
|
-
p && e["stepper__dot--completed"],
|
|
9
|
-
t && e[`stepper__dot--${t}`]
|
|
10
|
-
), a = !t && typeof o < "u" && typeof s < "u" ? { left: `${o * s + m}px` } : void 0;
|
|
11
|
-
return /* @__PURE__ */ d.createElement("span", { className: r, style: a, "data-testid": "dot" });
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
y as default
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=Dot.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dot.js","sources":["../../../src/components/Stepper/Dot.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { STEPPER_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.stepper__dot,\n completed && styles['stepper__dot--completed'],\n position && styles[`stepper__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + STEPPER_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n"],"names":["Dot","index","completed","distanceBetweenDots","position","classes","classNames","styles","style","STEPPER_PADDING_X_PX"],"mappings":";;;;AAeA,MAAMA,IAA0B,CAAC,EAAE,OAAAC,GAAO,WAAAC,GAAW,qBAAAC,GAAqB,UAAAC,QAAe;AACvF,QAAMC,IAAUC;AAAA,IACdC,EAAO;AAAA,IACPL,KAAaK,EAAO,yBAAyB;AAAA,IAC7CH,KAAYG,EAAO,iBAAiBH,CAAQ,EAAE;AAAA,EAAA,GAG1CI,IADoB,CAACJ,KAAY,OAAOH,IAAU,OAAe,OAAOE,IAAwB,MAElG,EAAE,MAAM,GAAGF,IAAQE,IAAsBM,CAAoB,KAC7D,IAAA;AAEJ,yCAAQ,QAAK,EAAA,WAAWJ,GAAS,OAAAG,GAAc,eAAY,MAAM,CAAA;AACnE;"}
|