@helsenorge/designsystem-react 15.0.0-beta.1 → 15.1.0
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/lib/AnchorLink.js.map +1 -1
- package/lib/AsChildSlot.js.map +1 -1
- package/lib/Avatar.js.map +1 -1
- package/lib/Badge.js.map +1 -1
- package/lib/Button.js +24 -19
- package/lib/Button.js.map +1 -1
- package/lib/CHANGELOG.md +46 -0
- package/lib/Checkbox.js +25 -48
- package/lib/Checkbox.js.map +1 -1
- package/lib/Checkbox2.js +69 -0
- package/lib/Checkbox2.js.map +1 -0
- package/lib/CheckboxMarker.js +64 -0
- package/lib/CheckboxMarker.js.map +1 -0
- package/lib/Chip.js.map +1 -1
- package/lib/Close.js.map +1 -1
- package/lib/DictionaryTrigger.js.map +1 -1
- package/lib/Drawer.js +46 -18
- package/lib/Drawer.js.map +1 -1
- package/lib/DrawerNavigation.js.map +1 -1
- package/lib/Duolist.js.map +1 -1
- package/lib/ElementHeader.js.map +1 -1
- package/lib/ElementHeaderText.js.map +1 -1
- package/lib/ErrorBoundary.js.map +1 -1
- package/lib/ErrorWrapper.js.map +1 -1
- package/lib/Expander.js.map +1 -1
- package/lib/FilterButton.js.map +1 -1
- package/lib/FilterButtonAndChipsWrapper.js.map +1 -1
- package/lib/FilterDrawer.js +20 -10
- package/lib/FilterDrawer.js.map +1 -1
- package/lib/FilterLinkList.js.map +1 -1
- package/lib/FilterOverviewLinkList.js.map +1 -1
- package/lib/FilterOverviewSearch.js.map +1 -1
- package/lib/FilterResultCountAndSortWrapper.js.map +1 -1
- package/lib/FilterSearch.js.map +1 -1
- package/lib/FilterSort.js.map +1 -1
- package/lib/FilterStateWrapper.js.map +1 -1
- package/lib/FormFieldTag.js.map +1 -1
- package/lib/FormGroup.js +5 -5
- package/lib/FormGroup.js.map +1 -1
- package/lib/FormLayout.js.map +1 -1
- package/lib/HelpDetails.js.map +1 -1
- package/lib/HelpTriggerIcon.js.map +1 -1
- package/lib/HelpTriggerStandalone.js.map +1 -1
- package/lib/HighlightPanel.js.map +1 -1
- package/lib/Highlighter.js.map +1 -1
- package/lib/HorizontalScroll.js.map +1 -1
- package/lib/Icon.js.map +1 -1
- package/lib/Illustration.js +1 -1
- package/lib/Illustration.js.map +1 -1
- package/lib/InfoTeaser.js.map +1 -1
- package/lib/Input.js.map +1 -1
- package/lib/LazyIcon.js +1 -1
- package/lib/LazyIcon.js.map +1 -1
- package/lib/LazyIllustration.js +6 -2
- package/lib/LazyIllustration.js.map +1 -1
- package/lib/LinkList.js.map +1 -1
- package/lib/List.js.map +1 -1
- package/lib/ListEditMode.js.map +1 -1
- package/lib/LoaderSpinner.js +61 -0
- package/lib/LoaderSpinner.js.map +1 -0
- package/lib/MaxCharacters.js.map +1 -1
- package/lib/NotificationBadge.js.map +1 -1
- package/lib/PanelTitle.js.map +1 -1
- package/lib/PopOver.js.map +1 -1
- package/lib/Radio.js +74 -0
- package/lib/Radio.js.map +1 -0
- package/lib/RadioButton.js +84 -0
- package/lib/RadioButton.js.map +1 -0
- package/lib/RadioMarker.js +35 -0
- package/lib/RadioMarker.js.map +1 -0
- package/lib/Select.js.map +1 -1
- package/lib/SingleSelectItem.js.map +1 -1
- package/lib/Slider.js.map +1 -1
- package/lib/Spacer.js.map +1 -1
- package/lib/StatusDot.js.map +1 -1
- package/lib/StatusDotList.js.map +1 -1
- package/lib/StepButtons.js.map +1 -1
- package/lib/TabList.js.map +1 -1
- package/lib/TabPanel.js.map +1 -1
- package/lib/TableBody.js +3 -3
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +2 -2
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +4 -4
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +2 -2
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +7 -7
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +5 -5
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +6 -6
- package/lib/TableRow.js.map +1 -1
- package/lib/Textarea.js.map +1 -1
- package/lib/Title.js.map +1 -1
- package/lib/Toast.js.map +1 -1
- package/lib/VisualCheckbox.js +79 -0
- package/lib/VisualCheckbox.js.map +1 -0
- package/lib/VisualRadio.js +64 -0
- package/lib/VisualRadio.js.map +1 -0
- package/lib/__mocks__/IntersectionObserver.js.map +1 -1
- package/lib/__mocks__/MutationObserver.js.map +1 -1
- package/lib/__mocks__/ResizeObserver.js.map +1 -1
- package/lib/__mocks__/matchMedia.js +3 -2
- package/lib/__mocks__/matchMedia.js.map +1 -1
- package/lib/__mocks__/useLayoutEvent.js.map +1 -1
- package/lib/__mocks__/useOutsideEvent.js.map +1 -1
- package/lib/__mocks__/usePseudoClasses.js.map +1 -1
- package/lib/__mocks__/useSize.js.map +1 -1
- package/lib/__mocks__/uuid.js.map +1 -1
- package/lib/components/ArticleTeaser/index.js.map +1 -1
- package/lib/components/Button/styles.module.scss +39 -16
- package/lib/components/Button/styles.module.scss.d.ts +3 -2
- package/lib/components/Checkbox/CheckboxMarker/CheckboxMarker.d.ts +20 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss +309 -0
- package/lib/components/Checkbox/CheckboxMarker/styles.module.scss.d.ts +25 -0
- package/lib/components/Checkbox/styles.module.scss +9 -269
- package/lib/components/Checkbox/styles.module.scss.d.ts +1 -17
- package/lib/components/Drawer/DrawerBackButton.d.ts +10 -0
- package/lib/components/Drawer/DrawerBackButton.module.scss +52 -0
- package/lib/components/Drawer/DrawerBackButton.module.scss.d.ts +10 -0
- package/lib/components/Drawer/styles.module.scss +0 -9
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/DropdownOld/index.js.map +1 -1
- package/lib/components/EmptyState/index.js.map +1 -1
- package/lib/components/Expander/styles.module.scss.d.ts +3 -2
- package/lib/components/ExpanderHierarchy/index.js.map +1 -1
- package/lib/components/ExpanderList/index.js.map +1 -1
- package/lib/components/EyebrowHeader/index.js.map +1 -1
- package/lib/components/FavoriteButton/index.js.map +1 -1
- package/lib/components/Filter/FilterDrawer/FilterDrawer.d.ts +4 -2
- package/lib/components/Filter/FilterDrawer/styles.module.scss +7 -0
- package/lib/components/Filter/FilterDrawer/styles.module.scss.d.ts +1 -0
- package/lib/components/Filter/LoaderSpinner/LoaderSpinner.d.ts +9 -0
- package/lib/components/Filter/LoaderSpinner/index.d.ts +3 -0
- package/lib/components/Filter/LoaderSpinner/index.js +7 -0
- package/lib/components/Filter/LoaderSpinner/index.js.map +1 -0
- package/lib/components/Filter/LoaderSpinner/styles.module.scss +27 -0
- package/lib/components/Filter/LoaderSpinner/styles.module.scss.d.ts +11 -0
- package/lib/components/Filter/index.d.ts +2 -0
- package/lib/components/Filter/index.js +2 -1
- package/lib/components/Filter/index.js.map +1 -1
- package/lib/components/HelpBubble/index.js.map +1 -1
- package/lib/components/HelpDrawer/index.js.map +1 -1
- package/lib/components/HelpExpanderInline/index.js.map +1 -1
- package/lib/components/HelpExpanderStandalone/index.js.map +1 -1
- package/lib/components/HelpPanel/index.js.map +1 -1
- package/lib/components/HelpTeaser/index.js.map +1 -1
- package/lib/components/HelpTooltip/index.js.map +1 -1
- package/lib/components/HelpTriggerInline/index.js.map +1 -1
- package/lib/components/Icons/ActiveMonitoring.js.map +1 -1
- package/lib/components/Icons/AcupunctureBack.js.map +1 -1
- package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/lib/components/Icons/AlarmClock.js.map +1 -1
- package/lib/components/Icons/AlertSignFill.js.map +1 -1
- package/lib/components/Icons/AlertSignStroke.js.map +1 -1
- package/lib/components/Icons/Amputation.js.map +1 -1
- package/lib/components/Icons/Anxiety.js.map +1 -1
- package/lib/components/Icons/Apple.js.map +1 -1
- package/lib/components/Icons/Archive.js.map +1 -1
- package/lib/components/Icons/ArmFlexing.js.map +1 -1
- package/lib/components/Icons/ArrowDown.js.map +1 -1
- package/lib/components/Icons/ArrowLeft.js.map +1 -1
- package/lib/components/Icons/ArrowRight.js.map +1 -1
- package/lib/components/Icons/ArrowUp.js.map +1 -1
- package/lib/components/Icons/ArrowUpRight.js.map +1 -1
- package/lib/components/Icons/Attachment.js.map +1 -1
- package/lib/components/Icons/Atv.js.map +1 -1
- package/lib/components/Icons/Avatar.js.map +1 -1
- package/lib/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/lib/components/Icons/Baby.js.map +1 -1
- package/lib/components/Icons/BandAid.js.map +1 -1
- package/lib/components/Icons/BeerAndPills.js.map +1 -1
- package/lib/components/Icons/Bell.js.map +1 -1
- package/lib/components/Icons/Bike.js.map +1 -1
- package/lib/components/Icons/BirthControl.js.map +1 -1
- package/lib/components/Icons/BirthdayCake.js.map +1 -1
- package/lib/components/Icons/Boat.js.map +1 -1
- package/lib/components/Icons/Body.js.map +1 -1
- package/lib/components/Icons/Braille.js.map +1 -1
- package/lib/components/Icons/Brain.js.map +1 -1
- package/lib/components/Icons/BreastReconstruction.js.map +1 -1
- package/lib/components/Icons/BreastRemoval.js.map +1 -1
- package/lib/components/Icons/Breasts.js.map +1 -1
- package/lib/components/Icons/BrokenHeart.js.map +1 -1
- package/lib/components/Icons/BrokenPuzzle.js.map +1 -1
- package/lib/components/Icons/Bus.js.map +1 -1
- package/lib/components/Icons/Calendar.js.map +1 -1
- package/lib/components/Icons/CalendarChange.js.map +1 -1
- package/lib/components/Icons/CalendarCheck.js.map +1 -1
- package/lib/components/Icons/CalendarEvent.js.map +1 -1
- package/lib/components/Icons/CalendarSave.js.map +1 -1
- package/lib/components/Icons/Cancer.js.map +1 -1
- package/lib/components/Icons/Candle.js.map +1 -1
- package/lib/components/Icons/Car.js.map +1 -1
- package/lib/components/Icons/Carton.js.map +1 -1
- package/lib/components/Icons/Change.js.map +1 -1
- package/lib/components/Icons/Check.js.map +1 -1
- package/lib/components/Icons/CheckFill.js.map +1 -1
- package/lib/components/Icons/CheckOutline.js.map +1 -1
- package/lib/components/Icons/Chest.js.map +1 -1
- package/lib/components/Icons/ChevronDown.js.map +1 -1
- package/lib/components/Icons/ChevronLeft.js.map +1 -1
- package/lib/components/Icons/ChevronRight.js.map +1 -1
- package/lib/components/Icons/ChevronUp.js.map +1 -1
- package/lib/components/Icons/ChevronsDown.js.map +1 -1
- package/lib/components/Icons/ChevronsUp.js.map +1 -1
- package/lib/components/Icons/ChildPlaying.js.map +1 -1
- package/lib/components/Icons/Cigarette.js.map +1 -1
- package/lib/components/Icons/Coins.js.map +1 -1
- package/lib/components/Icons/Contacts.js.map +1 -1
- package/lib/components/Icons/Copy.js.map +1 -1
- package/lib/components/Icons/CoronaCertificate.js.map +1 -1
- package/lib/components/Icons/Coronavirus.js.map +1 -1
- package/lib/components/Icons/Cough.js.map +1 -1
- package/lib/components/Icons/CreditCard.js.map +1 -1
- package/lib/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/lib/components/Icons/Cross.js.map +1 -1
- package/lib/components/Icons/DataExchange.js.map +1 -1
- package/lib/components/Icons/DataReceived.js.map +1 -1
- package/lib/components/Icons/DataSent.js.map +1 -1
- package/lib/components/Icons/Depression.js.map +1 -1
- package/lib/components/Icons/DigestiveSystem.js.map +1 -1
- package/lib/components/Icons/Dizzy.js.map +1 -1
- package/lib/components/Icons/Documents.js.map +1 -1
- package/lib/components/Icons/Dog.js.map +1 -1
- package/lib/components/Icons/DonorCard.js.map +1 -1
- package/lib/components/Icons/DotAttachment.js.map +1 -1
- package/lib/components/Icons/DotCheckmark.js.map +1 -1
- package/lib/components/Icons/DotCircleArrows.js.map +1 -1
- package/lib/components/Icons/DotDot.js.map +1 -1
- package/lib/components/Icons/DotExclamationMark.js.map +1 -1
- package/lib/components/Icons/DotFill.js.map +1 -1
- package/lib/components/Icons/DotGroup.js.map +1 -1
- package/lib/components/Icons/DotHalfDisc.js.map +1 -1
- package/lib/components/Icons/DotInfo.js.map +1 -1
- package/lib/components/Icons/DotLogin.js.map +1 -1
- package/lib/components/Icons/DotLookingGlass.js.map +1 -1
- package/lib/components/Icons/DotNoAccess.js.map +1 -1
- package/lib/components/Icons/DotNoEye.js.map +1 -1
- package/lib/components/Icons/DotOutline.js.map +1 -1
- package/lib/components/Icons/DotPencil.js.map +1 -1
- package/lib/components/Icons/DotQuestionMark.js.map +1 -1
- package/lib/components/Icons/DotTriangle.js.map +1 -1
- package/lib/components/Icons/DotX.js.map +1 -1
- package/lib/components/Icons/Download.js.map +1 -1
- package/lib/components/Icons/Draft.js.map +1 -1
- package/lib/components/Icons/Drag.js.map +1 -1
- package/lib/components/Icons/EChat.js.map +1 -1
- package/lib/components/Icons/Ear.js.map +1 -1
- package/lib/components/Icons/EarDeaf.js.map +1 -1
- package/lib/components/Icons/EarHearingAid.js.map +1 -1
- package/lib/components/Icons/EarNoseThroat.js.map +1 -1
- package/lib/components/Icons/EarVolume.js.map +1 -1
- package/lib/components/Icons/Edit.js.map +1 -1
- package/lib/components/Icons/ElderlyPerson.js.map +1 -1
- package/lib/components/Icons/Embolization.js.map +1 -1
- package/lib/components/Icons/EmergencyCall.js.map +1 -1
- package/lib/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/lib/components/Icons/EmoticonDelighted.js.map +1 -1
- package/lib/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/lib/components/Icons/EmoticonHappy.js.map +1 -1
- package/lib/components/Icons/EmoticonMeh.js.map +1 -1
- package/lib/components/Icons/EmptyBox.js.map +1 -1
- package/lib/components/Icons/EnterFullScreen.js.map +1 -1
- package/lib/components/Icons/Envelope.js.map +1 -1
- package/lib/components/Icons/Epilepsy.js.map +1 -1
- package/lib/components/Icons/Eraser.js.map +1 -1
- package/lib/components/Icons/ErrorSignFill.js.map +1 -1
- package/lib/components/Icons/ErrorSignStroke.js.map +1 -1
- package/lib/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/lib/components/Icons/ExitFullScreen.js.map +1 -1
- package/lib/components/Icons/Eye.js.map +1 -1
- package/lib/components/Icons/Facebook.js.map +1 -1
- package/lib/components/Icons/FallingLeaf.js.map +1 -1
- package/lib/components/Icons/Feedback.js.map +1 -1
- package/lib/components/Icons/Female.js.map +1 -1
- package/lib/components/Icons/FemaleDoctor.js.map +1 -1
- package/lib/components/Icons/Ferry.js.map +1 -1
- package/lib/components/Icons/File.js.map +1 -1
- package/lib/components/Icons/Filter.js +12 -12
- package/lib/components/Icons/Filter.js.map +1 -1
- package/lib/components/Icons/FingerBleed.js.map +1 -1
- package/lib/components/Icons/FirstAidKit.js.map +1 -1
- package/lib/components/Icons/Fish.js.map +1 -1
- package/lib/components/Icons/FloppyDisk.js.map +1 -1
- package/lib/components/Icons/Football.js.map +1 -1
- package/lib/components/Icons/Form.js.map +1 -1
- package/lib/components/Icons/Forward.js.map +1 -1
- package/lib/components/Icons/Gallery.js.map +1 -1
- package/lib/components/Icons/Garden.js.map +1 -1
- package/lib/components/Icons/GasCan.js.map +1 -1
- package/lib/components/Icons/GenderIdentity.js.map +1 -1
- package/lib/components/Icons/GlassWater.js.map +1 -1
- package/lib/components/Icons/Glasses.js.map +1 -1
- package/lib/components/Icons/Globe.js.map +1 -1
- package/lib/components/Icons/Grain.js.map +1 -1
- package/lib/components/Icons/Graph.js.map +1 -1
- package/lib/components/Icons/Group.js.map +1 -1
- package/lib/components/Icons/GroupTwins.js.map +1 -1
- package/lib/components/Icons/HTMLFile.js.map +1 -1
- package/lib/components/Icons/HandWaving.js.map +1 -1
- package/lib/components/Icons/HandWithDisease.js.map +1 -1
- package/lib/components/Icons/HandsAndHeart.js.map +1 -1
- package/lib/components/Icons/HealthClinic.js.map +1 -1
- package/lib/components/Icons/HealthMeasurements.js.map +1 -1
- package/lib/components/Icons/HealthWarning.js.map +1 -1
- package/lib/components/Icons/HealthcarePerson.js.map +1 -1
- package/lib/components/Icons/HealthcarePersonell.js.map +1 -1
- package/lib/components/Icons/HearingProtection.js.map +1 -1
- package/lib/components/Icons/Heart.js.map +1 -1
- package/lib/components/Icons/HeartHands.js.map +1 -1
- package/lib/components/Icons/HelpSign.js.map +1 -1
- package/lib/components/Icons/HelpingHand.js.map +1 -1
- package/lib/components/Icons/Hemodialysis.js.map +1 -1
- package/lib/components/Icons/Hiker.js.map +1 -1
- package/lib/components/Icons/Hipprosthesis.js.map +1 -1
- package/lib/components/Icons/History.js.map +1 -1
- package/lib/components/Icons/HivAndAids.js.map +1 -1
- package/lib/components/Icons/Home.js.map +1 -1
- package/lib/components/Icons/HomeFill.js.map +1 -1
- package/lib/components/Icons/Hormone.js.map +1 -1
- package/lib/components/Icons/Hospital.js.map +1 -1
- package/lib/components/Icons/Hourglass.js.map +1 -1
- package/lib/components/Icons/IconNames.js.map +1 -1
- package/lib/components/Icons/ImgFile.js.map +1 -1
- package/lib/components/Icons/Inbox.js.map +1 -1
- package/lib/components/Icons/InfoSignFill.js.map +1 -1
- package/lib/components/Icons/InfoSignStroke.js.map +1 -1
- package/lib/components/Icons/Instagram.js.map +1 -1
- package/lib/components/Icons/Intravenous.js.map +1 -1
- package/lib/components/Icons/JointPain.js.map +1 -1
- package/lib/components/Icons/Journal.js.map +1 -1
- package/lib/components/Icons/JpgFile.js.map +1 -1
- package/lib/components/Icons/Kidney.js.map +1 -1
- package/lib/components/Icons/KitchenScale.js.map +1 -1
- package/lib/components/Icons/Kjernejournal.js.map +1 -1
- package/lib/components/Icons/Laboratory.js.map +1 -1
- package/lib/components/Icons/LaptopBlog.js.map +1 -1
- package/lib/components/Icons/LawBook.js.map +1 -1
- package/lib/components/Icons/LegalDocument.js.map +1 -1
- package/lib/components/Icons/LightBulb.js.map +1 -1
- package/lib/components/Icons/List.js.map +1 -1
- package/lib/components/Icons/Location.js.map +1 -1
- package/lib/components/Icons/LocationFill.js.map +1 -1
- package/lib/components/Icons/Lock.js.map +1 -1
- package/lib/components/Icons/Login.js.map +1 -1
- package/lib/components/Icons/Logout.js.map +1 -1
- package/lib/components/Icons/Lungs.js.map +1 -1
- package/lib/components/Icons/Makeup.js.map +1 -1
- package/lib/components/Icons/MaleDoctor.js.map +1 -1
- package/lib/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompact.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompactFill.js.map +1 -1
- package/lib/components/Icons/MaleGenitalia.js.map +1 -1
- package/lib/components/Icons/MeasuringTape.js.map +1 -1
- package/lib/components/Icons/Medicine.js.map +1 -1
- package/lib/components/Icons/MedicineWarning.js.map +1 -1
- package/lib/components/Icons/MentalHealthAdult.js.map +1 -1
- package/lib/components/Icons/MentalHealthChild.js.map +1 -1
- package/lib/components/Icons/Menu.js.map +1 -1
- package/lib/components/Icons/Microscope.js.map +1 -1
- package/lib/components/Icons/Minus.js.map +1 -1
- package/lib/components/Icons/Mirror.js.map +1 -1
- package/lib/components/Icons/MobilePhone.js.map +1 -1
- package/lib/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/lib/components/Icons/MuscleBack.js.map +1 -1
- package/lib/components/Icons/MuscleLeg.js.map +1 -1
- package/lib/components/Icons/Mushroom.js.map +1 -1
- package/lib/components/Icons/Music.js.map +1 -1
- package/lib/components/Icons/MusselsAndSalt.js.map +1 -1
- package/lib/components/Icons/NoAccess.js.map +1 -1
- package/lib/components/Icons/NoEye.js.map +1 -1
- package/lib/components/Icons/NoFilter.js.map +1 -1
- package/lib/components/Icons/Notepad.js.map +1 -1
- package/lib/components/Icons/Osteotomy.js.map +1 -1
- package/lib/components/Icons/PaintRoller.js.map +1 -1
- package/lib/components/Icons/PaperPlane.js.map +1 -1
- package/lib/components/Icons/PatientAndPerson.js.map +1 -1
- package/lib/components/Icons/Pause.js.map +1 -1
- package/lib/components/Icons/PdfFile.js.map +1 -1
- package/lib/components/Icons/Pencil.js.map +1 -1
- package/lib/components/Icons/PeopleTalking.js.map +1 -1
- package/lib/components/Icons/Peritonealdialysis.js.map +1 -1
- package/lib/components/Icons/Person.js.map +1 -1
- package/lib/components/Icons/PersonAndPatient.js.map +1 -1
- package/lib/components/Icons/PersonCancel.js.map +1 -1
- package/lib/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/lib/components/Icons/PersonOverweight.js.map +1 -1
- package/lib/components/Icons/PersonRelaxing.js.map +1 -1
- package/lib/components/Icons/PersonWithBrain.js.map +1 -1
- package/lib/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/lib/components/Icons/PersonWithCrutches.js.map +1 -1
- package/lib/components/Icons/PersonWithJaw.js.map +1 -1
- package/lib/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/lib/components/Icons/PersonWithSenses.js.map +1 -1
- package/lib/components/Icons/PersonWorking.js.map +1 -1
- package/lib/components/Icons/PersonalPlan.js.map +1 -1
- package/lib/components/Icons/PizzaSlice.js.map +1 -1
- package/lib/components/Icons/Plane.js.map +1 -1
- package/lib/components/Icons/Plant.js.map +1 -1
- package/lib/components/Icons/PlateKnifeFork.js.map +1 -1
- package/lib/components/Icons/Play.js.map +1 -1
- package/lib/components/Icons/PlusLarge.js.map +1 -1
- package/lib/components/Icons/PlusSmall.js.map +1 -1
- package/lib/components/Icons/PngFile.js.map +1 -1
- package/lib/components/Icons/Podcast.js.map +1 -1
- package/lib/components/Icons/PoisonInformation.js.map +1 -1
- package/lib/components/Icons/Pregnant.js.map +1 -1
- package/lib/components/Icons/Printer.js.map +1 -1
- package/lib/components/Icons/Psychosis.js.map +1 -1
- package/lib/components/Icons/Publication.js.map +1 -1
- package/lib/components/Icons/Puzzle.js.map +1 -1
- package/lib/components/Icons/QrCode.js.map +1 -1
- package/lib/components/Icons/Quarrel.js.map +1 -1
- package/lib/components/Icons/RadioTherapy.js.map +1 -1
- package/lib/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/lib/components/Icons/Radioiodine.js.map +1 -1
- package/lib/components/Icons/Receipt.js.map +1 -1
- package/lib/components/Icons/Receptionist.js.map +1 -1
- package/lib/components/Icons/Recovery.js.map +1 -1
- package/lib/components/Icons/Referral.js.map +1 -1
- package/lib/components/Icons/Refresh.js.map +1 -1
- package/lib/components/Icons/Refund.js.map +1 -1
- package/lib/components/Icons/Reminder.js.map +1 -1
- package/lib/components/Icons/Reply.js.map +1 -1
- package/lib/components/Icons/Rocket.js.map +1 -1
- package/lib/components/Icons/RtfFile.js.map +1 -1
- package/lib/components/Icons/STDs.js.map +1 -1
- package/lib/components/Icons/Save.js.map +1 -1
- package/lib/components/Icons/Scale.js.map +1 -1
- package/lib/components/Icons/ScreenReader.js.map +1 -1
- package/lib/components/Icons/Search.js +4 -4
- package/lib/components/Icons/Search.js.map +1 -1
- package/lib/components/Icons/SectionSign.js.map +1 -1
- package/lib/components/Icons/Settings.js.map +1 -1
- package/lib/components/Icons/SettingsFill.js.map +1 -1
- package/lib/components/Icons/Sexualorientation.js.map +1 -1
- package/lib/components/Icons/ShakingHand.js.map +1 -1
- package/lib/components/Icons/Share.js.map +1 -1
- package/lib/components/Icons/SharedHealthData.js.map +1 -1
- package/lib/components/Icons/SharedHealthMeasurements.js.map +1 -1
- package/lib/components/Icons/Shield.js.map +1 -1
- package/lib/components/Icons/ShuntOperation.js.map +1 -1
- package/lib/components/Icons/Skeleton.js.map +1 -1
- package/lib/components/Icons/Skin.js.map +1 -1
- package/lib/components/Icons/Snake.js.map +1 -1
- package/lib/components/Icons/Snapchat.js.map +1 -1
- package/lib/components/Icons/Sort.js +12 -12
- package/lib/components/Icons/Sort.js.map +1 -1
- package/lib/components/Icons/SortDown.js.map +1 -1
- package/lib/components/Icons/SortUp.js.map +1 -1
- package/lib/components/Icons/SpeechBubble.js.map +1 -1
- package/lib/components/Icons/Spray.js.map +1 -1
- package/lib/components/Icons/StarFill.js.map +1 -1
- package/lib/components/Icons/StarStroke.js.map +1 -1
- package/lib/components/Icons/StickyNote.js.map +1 -1
- package/lib/components/Icons/StickyNotes.js.map +1 -1
- package/lib/components/Icons/Stopwatch.js.map +1 -1
- package/lib/components/Icons/Sun.js.map +1 -1
- package/lib/components/Icons/SupportingPerson.js.map +1 -1
- package/lib/components/Icons/Surgery.js.map +1 -1
- package/lib/components/Icons/Sweets.js.map +1 -1
- package/lib/components/Icons/Syringe.js.map +1 -1
- package/lib/components/Icons/Taxi.js.map +1 -1
- package/lib/components/Icons/TeddyBear.js.map +1 -1
- package/lib/components/Icons/Teenagers.js.map +1 -1
- package/lib/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/lib/components/Icons/Ticket.js.map +1 -1
- package/lib/components/Icons/TimePassing.js.map +1 -1
- package/lib/components/Icons/Toddler.js.map +1 -1
- package/lib/components/Icons/Tombstone.js.map +1 -1
- package/lib/components/Icons/Toolbox.js.map +1 -1
- package/lib/components/Icons/Tooth.js.map +1 -1
- package/lib/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/lib/components/Icons/Train.js.map +1 -1
- package/lib/components/Icons/Transplantation.js.map +1 -1
- package/lib/components/Icons/TrashCan.js.map +1 -1
- package/lib/components/Icons/TravelRoute.js.map +1 -1
- package/lib/components/Icons/TreatmentAids.js.map +1 -1
- package/lib/components/Icons/TriangleX.js.map +1 -1
- package/lib/components/Icons/Twitter.js.map +1 -1
- package/lib/components/Icons/Undo.js.map +1 -1
- package/lib/components/Icons/UniProsthesis.js.map +1 -1
- package/lib/components/Icons/Upload.js.map +1 -1
- package/lib/components/Icons/UserOrganization.js.map +1 -1
- package/lib/components/Icons/Vaccine.js.map +1 -1
- package/lib/components/Icons/VerticalDots.js.map +1 -1
- package/lib/components/Icons/VideoCamera.js.map +1 -1
- package/lib/components/Icons/VideoChat.js.map +1 -1
- package/lib/components/Icons/Wallet.js.map +1 -1
- package/lib/components/Icons/Watch.js.map +1 -1
- package/lib/components/Icons/Website.js.map +1 -1
- package/lib/components/Icons/Wheelchair.js.map +1 -1
- package/lib/components/Icons/WheelchairActive.js.map +1 -1
- package/lib/components/Icons/Window.js.map +1 -1
- package/lib/components/Icons/WordDocument.js.map +1 -1
- package/lib/components/Icons/WorkSuitcase.js.map +1 -1
- package/lib/components/Icons/X.js.map +1 -1
- package/lib/components/Icons/XOutline.js.map +1 -1
- package/lib/components/Icons/XmlFile.js.map +1 -1
- package/lib/components/Icons/YouTube.js.map +1 -1
- package/lib/components/Icons/Zoom.js.map +1 -1
- package/lib/components/Icons/ZoomInLeft.js.map +1 -1
- package/lib/components/Icons/ZoomOutLeft.js.map +1 -1
- package/lib/components/Illustration/index.js +1 -1
- package/lib/components/Illustrations/BabyMobile.js +1 -1
- package/lib/components/Illustrations/BabyMobile.js.map +1 -1
- package/lib/components/Illustrations/BabyMobileMedium.js +1 -1
- package/lib/components/Illustrations/BabyMobileMedium.js.map +1 -1
- package/lib/components/Illustrations/Child.js +1 -1
- package/lib/components/Illustrations/Child.js.map +1 -1
- package/lib/components/Illustrations/ChildMedium.js +1 -1
- package/lib/components/Illustrations/ChildMedium.js.map +1 -1
- package/lib/components/Illustrations/Doctor.js +1 -1
- package/lib/components/Illustrations/Doctor.js.map +1 -1
- package/lib/components/Illustrations/DoctorMedium.js.map +1 -1
- package/lib/components/Illustrations/DoctorSmall.js.map +1 -1
- package/lib/components/Illustrations/EyeContact.d.ts +8 -0
- package/lib/components/Illustrations/EyeContact.js +17 -0
- package/lib/components/Illustrations/EyeContact.js.map +1 -0
- package/lib/components/Illustrations/EyeContactMedium.d.ts +3 -0
- package/lib/components/Illustrations/EyeContactMedium.js +80 -0
- package/lib/components/Illustrations/EyeContactMedium.js.map +1 -0
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js.map +1 -1
- package/lib/components/Illustrations/GiveBabyFood.js +1 -1
- package/lib/components/Illustrations/GiveBabyFood.js.map +1 -1
- package/lib/components/Illustrations/GiveBabyFoodMedium.js +1 -1
- package/lib/components/Illustrations/GiveBabyFoodMedium.js.map +1 -1
- package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
- package/lib/components/Illustrations/HealthcarePersonnel.js.map +1 -1
- package/lib/components/Illustrations/HealthcarePersonnelMedium.js.map +1 -1
- package/lib/components/Illustrations/HealthcarePersonnelSmall.js.map +1 -1
- package/lib/components/Illustrations/IllustrationNames.d.ts +1 -1
- package/lib/components/Illustrations/IllustrationNames.js +4 -0
- package/lib/components/Illustrations/IllustrationNames.js.map +1 -1
- package/lib/components/Illustrations/ReadLetters.js +1 -1
- package/lib/components/Illustrations/ReadLetters.js.map +1 -1
- package/lib/components/Illustrations/ReadLettersMedium.js +1 -1
- package/lib/components/Illustrations/ReadLettersMedium.js.map +1 -1
- package/lib/components/Illustrations/SkinToSkin.d.ts +8 -0
- package/lib/components/Illustrations/SkinToSkin.js +17 -0
- package/lib/components/Illustrations/SkinToSkin.js.map +1 -0
- package/lib/components/Illustrations/SkinToSkinMedium.d.ts +3 -0
- package/lib/components/Illustrations/SkinToSkinMedium.js +107 -0
- package/lib/components/Illustrations/SkinToSkinMedium.js.map +1 -0
- package/lib/components/Illustrations/Stork.js +1 -1
- package/lib/components/Illustrations/Stork.js.map +1 -1
- package/lib/components/Illustrations/StorkMedium.js +1 -1
- package/lib/components/Illustrations/StorkMedium.js.map +1 -1
- package/lib/components/Illustrations/Stroller.js +1 -1
- package/lib/components/Illustrations/Stroller.js.map +1 -1
- package/lib/components/Illustrations/StrollerMedium.js +1 -1
- package/lib/components/Illustrations/StrollerMedium.js.map +1 -1
- package/lib/components/Illustrations/Support2.js +1 -1
- package/lib/components/Illustrations/Support2.js.map +1 -1
- package/lib/components/Illustrations/Support2Medium.js +1 -1
- package/lib/components/Illustrations/Support2Medium.js.map +1 -1
- package/lib/components/Illustrations/Thinking.js +1 -1
- package/lib/components/Illustrations/Thinking.js.map +1 -1
- package/lib/components/Illustrations/ThinkingMedium.js +1 -1
- package/lib/components/Illustrations/ThinkingMedium.js.map +1 -1
- package/lib/components/Loader/index.js.map +1 -1
- package/lib/components/Logo/index.js.map +1 -1
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/NotificationPanel/index.js.map +1 -1
- package/lib/components/Panel/index.js +1 -1
- package/lib/components/Panel/index.js.map +1 -1
- package/lib/components/Panel/styles.module.scss.d.ts +3 -2
- package/lib/components/PanelList/index.js +1 -1
- package/lib/components/PanelList/index.js.map +1 -1
- package/lib/components/PopMenu/index.js.map +1 -1
- package/lib/components/Portal/index.js.map +1 -1
- package/lib/components/Progressbar/index.js.map +1 -1
- package/lib/components/PromoPanel/index.js.map +1 -1
- package/lib/components/RadioButton/RadioMarker/RadioMarker.d.ts +20 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss +288 -0
- package/lib/components/RadioButton/RadioMarker/styles.module.scss.d.ts +20 -0
- package/lib/components/RadioButton/index.d.ts +0 -1
- package/lib/components/RadioButton/index.js +2 -2
- package/lib/components/RadioButton/index.js.map +1 -1
- package/lib/components/RadioButton/styles.module.scss +13 -275
- package/lib/components/RadioButton/styles.module.scss.d.ts +2 -12
- package/lib/components/ServiceMessage/index.js.map +1 -1
- package/lib/components/SharingStatus/index.js.map +1 -1
- package/lib/components/Step/index.js.map +1 -1
- package/lib/components/Stepper/index.js +1 -5
- package/lib/components/Stepper/index.js.map +1 -1
- package/lib/components/StickyNote/index.js.map +1 -1
- package/lib/components/Table/index.js +3 -3
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Tabs/index.js +5 -0
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Tag/index.js.map +1 -1
- package/lib/components/TagList/index.js.map +1 -1
- package/lib/components/Tile/index.js.map +1 -1
- package/lib/components/ToastList/index.js.map +1 -1
- package/lib/components/Toggle/index.js.map +1 -1
- package/lib/components/Validation/index.js.map +1 -1
- package/lib/components/VisualCheckboxCloud/Checkbox/Checkbox.d.ts +21 -0
- package/lib/components/VisualCheckboxCloud/Checkbox/index.d.ts +3 -0
- package/lib/components/VisualCheckboxCloud/Checkbox/index.js +7 -0
- package/lib/components/VisualCheckboxCloud/Checkbox/index.js.map +1 -0
- package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss +10 -0
- package/lib/components/VisualCheckboxCloud/Checkbox/styles.module.scss.d.ts +15 -0
- package/lib/components/VisualCheckboxCloud/VisualCheckboxCloud.d.ts +29 -0
- package/lib/components/VisualCheckboxCloud/index.d.ts +3 -0
- package/lib/components/VisualCheckboxCloud/index.js +42 -0
- package/lib/components/VisualCheckboxCloud/index.js.map +1 -0
- package/lib/components/VisualCheckboxCloud/styles.module.scss +6 -0
- package/lib/components/VisualCheckboxCloud/styles.module.scss.d.ts +9 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualCheckbox.d.ts +26 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/VisualContent.d.ts +10 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js +7 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss +7 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckbox/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualCheckboxGroup/VisualCheckboxGroup.d.ts +33 -0
- package/lib/components/VisualCheckboxGroup/index.d.ts +3 -0
- package/lib/components/VisualCheckboxGroup/index.js +47 -0
- package/lib/components/VisualCheckboxGroup/index.js.map +1 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss +6 -0
- package/lib/components/VisualCheckboxGroup/styles.module.scss.d.ts +10 -0
- package/lib/components/VisualRadioCloud/Radio/Radio.d.ts +23 -0
- package/lib/components/VisualRadioCloud/Radio/index.d.ts +3 -0
- package/lib/components/VisualRadioCloud/Radio/index.js +7 -0
- package/lib/components/VisualRadioCloud/Radio/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss +7 -0
- package/lib/components/VisualRadioCloud/Radio/styles.module.scss.d.ts +15 -0
- package/lib/components/VisualRadioCloud/VisualRadioCloud.d.ts +39 -0
- package/lib/components/VisualRadioCloud/index.d.ts +3 -0
- package/lib/components/VisualRadioCloud/index.js +62 -0
- package/lib/components/VisualRadioCloud/index.js.map +1 -0
- package/lib/components/VisualRadioCloud/styles.module.scss +6 -0
- package/lib/components/VisualRadioCloud/styles.module.scss.d.ts +9 -0
- package/lib/components/VisualRadioGroup/VisualRadio/VisualContent.d.ts +10 -0
- package/lib/components/VisualRadioGroup/VisualRadio/VisualRadio.d.ts +26 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js +7 -0
- package/lib/components/VisualRadioGroup/VisualRadio/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss +7 -0
- package/lib/components/VisualRadioGroup/VisualRadio/styles.module.scss.d.ts +18 -0
- package/lib/components/VisualRadioGroup/VisualRadioGroup.d.ts +39 -0
- package/lib/components/VisualRadioGroup/index.d.ts +3 -0
- package/lib/components/VisualRadioGroup/index.js +67 -0
- package/lib/components/VisualRadioGroup/index.js.map +1 -0
- package/lib/components/VisualRadioGroup/styles.module.scss +6 -0
- package/lib/components/VisualRadioGroup/styles.module.scss.d.ts +10 -0
- package/lib/constants.js.map +1 -1
- package/lib/constants2.js +6 -6
- package/lib/constants2.js.map +1 -1
- package/lib/floating-ui.react.js +30 -30
- package/lib/floating-ui.react.js.map +1 -1
- package/lib/getFilterChips.js.map +1 -1
- package/lib/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/lib/hooks/useBreakpoint.js.map +1 -1
- package/lib/hooks/useElementList.js.map +1 -1
- package/lib/hooks/useEventListenerState.js.map +1 -1
- package/lib/hooks/useExpand.js.map +1 -1
- package/lib/hooks/useFocusToggle.js.map +1 -1
- package/lib/hooks/useFocusTrap.js.map +1 -1
- package/lib/hooks/useFocusableElements.js.map +1 -1
- package/lib/hooks/useIcons.js.map +1 -1
- package/lib/hooks/useIdWithFallback.js.map +1 -1
- package/lib/hooks/useIntersectionObserver.js.map +1 -1
- package/lib/hooks/useInterval.js.map +1 -1
- package/lib/hooks/useIsMobileBreakpoint.js.map +1 -1
- package/lib/hooks/useIsServerSide.js.map +1 -1
- package/lib/hooks/useIsVisible.js.map +1 -1
- package/lib/hooks/useKeyboardEvent.js.map +1 -1
- package/lib/hooks/useLanguage.js.map +1 -1
- package/lib/hooks/useLayoutEvent.js.map +1 -1
- package/lib/hooks/useOutsideEvent.js.map +1 -1
- package/lib/hooks/usePrevious.js.map +1 -1
- package/lib/hooks/usePseudoClasses.js.map +1 -1
- package/lib/hooks/useResizeObserver.js.map +1 -1
- package/lib/hooks/useReturnFocusOnUnmount.js.map +1 -1
- package/lib/hooks/useRovingFocus.js.map +1 -1
- package/lib/hooks/useSize.js.map +1 -1
- package/lib/hooks/useToggle.js.map +1 -1
- package/lib/hooks/usestopPropagation.js.map +1 -1
- package/lib/resourceHelper.js +42 -8
- package/lib/resourceHelper.js.map +1 -1
- package/lib/resources/HN.Designsystem.Drawer.se-NO.json.d.ts +7 -0
- package/lib/resources/HN.Designsystem.Filter.en-GB.json.d.ts +7 -4
- package/lib/resources/HN.Designsystem.Filter.nb-NO.json.d.ts +7 -4
- package/lib/resources/HN.Designsystem.Filter.nn-NO.json.d.ts +16 -0
- package/lib/resources/HN.Designsystem.Filter.se-NO.json.d.ts +16 -0
- package/lib/resources/HN.Designsystem.Tabs.se-NO.json.d.ts +7 -0
- package/lib/resources/Resources.d.ts +15 -3
- package/lib/scss/_visual-form.scss +357 -0
- package/lib/theme/currys/color.js.map +1 -1
- package/lib/theme/currys/spacing.js.map +1 -1
- package/lib/theme/grid.js.map +1 -1
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/palette.js.map +1 -1
- package/lib/theme/spacers.js.map +1 -1
- package/lib/utils/accessibility.js.map +1 -1
- package/lib/utils/component.js.map +1 -1
- package/lib/utils/debounce.js.map +1 -1
- package/lib/utils/deepContains.js.map +1 -1
- package/lib/utils/device.js.map +1 -1
- package/lib/utils/focus.js.map +1 -1
- package/lib/utils/language.js.map +1 -1
- package/lib/utils/mobile.js.map +1 -1
- package/lib/utils/refs.js.map +1 -1
- package/lib/utils/resource.js.map +1 -1
- package/lib/utils/scroll.js.map +1 -1
- package/lib/utils/viewport.js.map +1 -1
- package/lib/utils.js.map +1 -1
- package/lib/utils2.js.map +1 -1
- package/lib/utils3.js +11 -100
- package/lib/utils3.js.map +1 -1
- package/lib/utils4.js +31 -12
- package/lib/utils4.js.map +1 -1
- package/lib/utils5.js +112 -31
- package/lib/utils5.js.map +1 -1
- package/lib/uuid.js.map +1 -1
- package/package.json +133 -3
- package/scss/_visual-form.scss +357 -0
- package/lib/components/RadioButton/utils.d.ts +0 -2
- package/lib/utils6.js +0 -115
- package/lib/utils6.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/HN.Designsystem.FavoriteButton.nb-NO.json","../../../src/components/FavoriteButton/resourceHelper.ts","../../../src/components/FavoriteButton/StarIcon.tsx","../../../src/components/FavoriteButton/FavoriteButton.tsx","../../../src/components/FavoriteButton/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Favorittmarkering\"\n}\n","import type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.FavoriteButton.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemFavoriteButton => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import styles from './styles.module.scss';\n\nconst normalStroke = 'var(--color-action-graphics-onlight)';\nconst normalFill = 'transparent';\nconst hoverFill = 'var(--color-action-graphics-onlight-hover)';\nconst hoverStroke = 'var(--color-action-graphics-onlight-hover)';\nconst activeStroke = 'var(--core-color-blueberry-800)';\n\nconst fillColor = (isChecked: boolean, isActive: boolean, isHovered: boolean): string => {\n if (isChecked) {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n } else {\n if (isHovered) {\n return hoverFill;\n } else {\n return normalFill;\n }\n }\n};\n\nconst strokeColor = (isActive: boolean, isHovered: boolean): string => {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n};\n\nexport const starIconNormalMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => {\n return (\n <>\n <path\n d=\"M20.1026 31.1787L13.4007 34.7023C10.833 36.0523 7.83185 33.8719 8.32233 31.0126L9.60261 23.5492L4.17653 18.2675C2.09656 16.2428 3.24317 12.712 6.11581 12.2956L13.5982 11.2112L16.9493 4.42107C18.2332 1.81969 21.9426 1.81969 23.2265 4.42107L26.5776 11.2112L34.06 12.2956C36.9326 12.712 38.0792 16.2428 35.9993 18.2675L30.5732 23.5492L31.852 31.0044C32.3428 33.8651 29.3386 36.0456 26.7708 34.6925L20.1026 31.1787Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n display=\"block\"\n />\n <path\n d=\"M20.0961 26.5515L12.6372 30.4731L14.0621 22.1671L8.01953 16.2853L16.3582 15.0768L20.0877 7.52002L23.8171 15.0768L32.1558 16.2853L26.1133 22.1671L27.5381 30.4731L20.0961 26.5515Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n );\n};\n\nexport const starIconHoverMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M22.2128 31.4832L16.2246 36.117C13.9303 37.8924 10.5961 36.2662 10.5826 33.3653L10.5475 25.7929L4.28665 21.5336C1.88672 19.9009 2.40278 16.2246 5.15948 15.3158L12.3399 12.9486L14.461 5.67964C15.2736 2.89484 18.9267 2.2507 20.6428 4.58962L25.1221 10.6947L32.6791 10.4633C35.5804 10.3745 37.3227 13.6526 35.6259 16.0077L31.1994 22.1514L33.7534 29.2712C34.7335 32.0033 32.1536 34.6724 29.3898 33.7857L22.2128 31.4832Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M21.4079 26.8365L14.7433 31.9937L14.7041 23.5664L7.73204 18.8233L15.7342 16.1851L18.0947 8.09555L23.0798 14.8899L31.5016 14.6321L26.5722 21.4738L29.4178 29.4062L21.4079 26.8365Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\nexport const starIconNormalDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M30.1061 44.1854L20.3139 49.3338C17.7461 50.6838 14.745 48.5034 15.2355 45.6441L17.1061 34.7394L9.17653 27.0207C7.09656 24.9961 8.24318 21.4653 11.1158 21.0489L22.053 19.4638L26.9493 9.54278C28.2331 6.9414 31.9426 6.94139 33.2265 9.54278L38.1227 19.4638L49.06 21.0489C51.9326 21.4653 53.0792 24.9961 50.9993 27.0207L43.0697 34.7394L44.9389 45.6359C45.4296 48.4966 42.4254 50.6772 39.8576 49.324L30.1061 44.1854Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M30.0998 39.4723L19.5927 44.9966L21.5998 33.2961L13.0879 25.0106L24.8343 23.3082L30.0879 12.6632L35.3414 23.3082L47.0879 25.0106L38.576 33.2961L40.5831 44.9966L30.0998 39.4723Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n\nexport const starIconHoverDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M33.1609 44.7458L24.4114 51.5164C22.1171 53.2918 18.783 51.6656 18.7695 48.7646L18.7181 37.7007L9.56864 31.4763C7.1687 29.8436 7.68476 26.1672 10.4415 25.2584L20.9373 21.7982L24.0364 11.1776C24.849 8.39281 28.5021 7.74867 30.2182 10.0876L36.7629 19.0077L47.8092 18.6695C50.7105 18.5807 52.4528 21.8588 50.756 24.2138L44.2872 33.1922L48.0201 43.5985C49.0002 46.3306 46.4203 48.9997 43.6565 48.113L33.1609 44.7458Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M32.3991 40.1029L23.0108 47.3678L22.9557 35.4965L13.1343 28.815L24.4067 25.0987L27.732 13.7031L34.7542 23.2741L46.6178 22.9109L39.674 32.5486L43.6823 43.7228L32.3991 40.1029Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n","import type { AriaAttributes } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HTMLButtonProps } from '../../constants';\nimport type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { getResources } from './resourceHelper';\nimport { starIconHoverDesktop, starIconHoverMobile, starIconNormalDesktop, starIconNormalMobile } from './StarIcon';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { isMutableRefObject } from '../../utils/refs';\n\nimport styles from './styles.module.scss';\n\nexport interface FavoriteButtonProps extends Omit<HTMLButtonProps, 'type'>, AriaAttributes {\n /** Determines if the FavoriteButton is checked */\n checked: boolean;\n /** Gives a unique id to the button */\n id?: string;\n /** Function that is called when clicked */\n onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Resources for component */\n resources?: Partial<HNDesignsystemFavoriteButton>;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the button element */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nexport const FavoriteButton: React.FC<FavoriteButtonProps> = (props: FavoriteButtonProps) => {\n const { checked, id, onClick, resources, tabIndex, testId, ref, ...other } = props;\n\n const buttonWrapperClasses = classNames(styles.favoritebutton);\n const { refObject, isHovered, isActive } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n const breakpoint = useBreakpoint();\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemFavoriteButton = {\n ...defaultResources,\n ...resources,\n ariaLabel: other['aria-label'] || resources?.ariaLabel || defaultResources.ariaLabel,\n };\n\n const isMobile = breakpoint <= Breakpoint.sm;\n\n const starIcon = ((): React.JSX.Element => {\n if (isMobile) {\n if (isHovered) {\n return starIconHoverMobile(checked, isActive);\n } else {\n return starIconNormalMobile(checked, isActive);\n }\n } else {\n if (isHovered) {\n return starIconHoverDesktop(checked, isActive);\n } else {\n return starIconNormalDesktop(checked, isActive);\n }\n }\n })();\n\n return (\n <button\n id={id}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.FavoriteButton}\n className={buttonWrapperClasses}\n ref={refObject}\n tabIndex={tabIndex}\n role=\"switch\"\n aria-checked={checked}\n type=\"button\"\n aria-label={mergedResources.ariaLabel}\n {...other}\n >\n <svg focusable={false} overflow=\"visible\" role=\"presentation\" viewBox={isMobile ? '0 0 41 41' : '0 0 61 61'}>\n {starIcon}\n </svg>\n </button>\n );\n};\n\nFavoriteButton.displayName = 'FavoriteButton';\n\nexport default FavoriteButton;\n","export * from './FavoriteButton';\n\nimport { FavoriteButton } from './FavoriteButton';\nexport default FavoriteButton;\n"],"mappings":";;;;;;;;;;;ACKA,IAAa,gBAAgB,aAA4D;CACvF,QAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,SACE,OAAO;;;;;ACPb,IAAM,eAAe;AACrB,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,cAAc;AACpB,IAAM,eAAe;AAErB,IAAM,aAAa,WAAoB,UAAmB,cAA+B;CACvF,IAAI,WACF,IAAI,UACF,OAAO;MAEP,IAAI,WACF,OAAO;MAEP,OAAO;MAIX,IAAI,WACF,OAAO;MAEP,OAAO;;AAKb,IAAM,eAAe,UAAmB,cAA+B;CACrE,IAAI,UACF,OAAO;MAEP,IAAI,WACF,OAAO;MAEP,OAAO;;AAKb,IAAa,wBAAwB,WAAoB,aAAyC;CAChG,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;EACE,GAAE;EACF,QAAO;EACP,MAAK;EACL,aAAY;EACZ,eAAc;EACd,WAAW,OAAO;EAClB,SAAQ;EACR,CAAA,EACF,oBAAC,QAAD;EACE,GAAE;EACF,QAAQ,YAAY,UAAU,MAAM;EACpC,MAAM,UAAU,WAAW,UAAU,MAAM;EAC3C,aAAY;EACZ,eAAc;EACd,gBAAe;EACf,CAAA,CACD,EAAA,CAAA;;AAIP,IAAa,uBAAuB,WAAoB,aACtD,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;CACE,GAAE;CACF,QAAO;CACP,MAAK;CACL,aAAY;CACZ,eAAc;CACd,WAAW,OAAO;CAClB,CAAA,EACF,oBAAC,QAAD;CACE,GAAE;CACF,QAAQ,YAAY,UAAU,KAAK;CACnC,MAAM,UAAU,WAAW,UAAU,KAAK;CAC1C,aAAa,YAAY,MAAM;CAC/B,aAAY;CACZ,eAAc;CACd,gBAAe;CACf,CAAA,CACD,EAAA,CAAA;AAEL,IAAa,yBAAyB,WAAoB,aACxD,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;CACE,GAAE;CACF,QAAO;CACP,MAAK;CACL,aAAY;CACZ,eAAc;CACd,WAAW,OAAO;CAClB,CAAA,EACF,oBAAC,QAAD;CACE,GAAE;CACF,QAAQ,YAAY,UAAU,MAAM;CACpC,MAAM,UAAU,WAAW,UAAU,MAAM;CAC3C,aAAY;CACZ,eAAc;CACd,gBAAe;CACf,CAAA,CACD,EAAA,CAAA;AAGL,IAAa,wBAAwB,WAAoB,aACvD,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;CACE,GAAE;CACF,QAAO;CACP,MAAK;CACL,aAAY;CACZ,eAAc;CACd,WAAW,OAAO;CAClB,CAAA,EACF,oBAAC,QAAD;CACE,GAAE;CACF,QAAQ,YAAY,UAAU,KAAK;CACnC,MAAM,UAAU,WAAW,UAAU,KAAK;CAC1C,aAAa,YAAY,MAAM;CAC/B,aAAY;CACZ,eAAc;CACd,gBAAe;CACf,CAAA,CACD,EAAA,CAAA;;;AC3FL,IAAa,kBAAiD,UAA+B;CAC3F,MAAM,EAAE,SAAS,IAAI,SAAS,WAAW,UAAU,QAAQ,KAAK,GAAG,UAAU;CAE7E,MAAM,uBAAuB,WAAW,OAAO,eAAe;CAC9D,MAAM,EAAE,WAAW,WAAW,aAAa,iBAAoC,mBAAmB,IAAI,GAAG,MAAM,KAAK;CACpH,MAAM,aAAa,eAAe;CAClC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAC5E,MAAM,mBAAmB,aAAa,SAAS;CAE/C,MAAM,kBAAgD;EACpD,GAAG;EACH,GAAG;EACH,WAAW,MAAM,iBAAiB,WAAW,aAAa,iBAAiB;EAC5E;CAED,MAAM,WAAW,cAAc,WAAW;CAE1C,MAAM,kBAAqC;EACzC,IAAI,UACF,IAAI,WACF,OAAO,oBAAoB,SAAS,SAAS;OAE7C,OAAO,qBAAqB,SAAS,SAAS;OAGhD,IAAI,WACF,OAAO,qBAAqB,SAAS,SAAS;OAE9C,OAAO,sBAAsB,SAAS,SAAS;KAGjD;CAEJ,OACE,oBAAC,UAAD;EACM;EACK;EACT,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,KAAK;EACK;EACV,MAAK;EACL,gBAAc;EACd,MAAK;EACL,cAAY,gBAAgB;EAC5B,GAAI;YAEJ,oBAAC,OAAD;GAAK,WAAW;GAAO,UAAS;GAAU,MAAK;GAAe,SAAS,WAAW,cAAc;aAC7F;GACG,CAAA;EACC,CAAA;;AAIb,eAAe,cAAc;;;ACtF7B,IAAA,yBAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/HN.Designsystem.FavoriteButton.nb-NO.json","../../../src/components/FavoriteButton/resourceHelper.ts","../../../src/components/FavoriteButton/StarIcon.tsx","../../../src/components/FavoriteButton/FavoriteButton.tsx","../../../src/components/FavoriteButton/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Favorittmarkering\"\n}\n","import type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.FavoriteButton.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemFavoriteButton => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import styles from './styles.module.scss';\n\nconst normalStroke = 'var(--color-action-graphics-onlight)';\nconst normalFill = 'transparent';\nconst hoverFill = 'var(--color-action-graphics-onlight-hover)';\nconst hoverStroke = 'var(--color-action-graphics-onlight-hover)';\nconst activeStroke = 'var(--core-color-blueberry-800)';\n\nconst fillColor = (isChecked: boolean, isActive: boolean, isHovered: boolean): string => {\n if (isChecked) {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n } else {\n if (isHovered) {\n return hoverFill;\n } else {\n return normalFill;\n }\n }\n};\n\nconst strokeColor = (isActive: boolean, isHovered: boolean): string => {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n};\n\nexport const starIconNormalMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => {\n return (\n <>\n <path\n d=\"M20.1026 31.1787L13.4007 34.7023C10.833 36.0523 7.83185 33.8719 8.32233 31.0126L9.60261 23.5492L4.17653 18.2675C2.09656 16.2428 3.24317 12.712 6.11581 12.2956L13.5982 11.2112L16.9493 4.42107C18.2332 1.81969 21.9426 1.81969 23.2265 4.42107L26.5776 11.2112L34.06 12.2956C36.9326 12.712 38.0792 16.2428 35.9993 18.2675L30.5732 23.5492L31.852 31.0044C32.3428 33.8651 29.3386 36.0456 26.7708 34.6925L20.1026 31.1787Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n display=\"block\"\n />\n <path\n d=\"M20.0961 26.5515L12.6372 30.4731L14.0621 22.1671L8.01953 16.2853L16.3582 15.0768L20.0877 7.52002L23.8171 15.0768L32.1558 16.2853L26.1133 22.1671L27.5381 30.4731L20.0961 26.5515Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n );\n};\n\nexport const starIconHoverMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M22.2128 31.4832L16.2246 36.117C13.9303 37.8924 10.5961 36.2662 10.5826 33.3653L10.5475 25.7929L4.28665 21.5336C1.88672 19.9009 2.40278 16.2246 5.15948 15.3158L12.3399 12.9486L14.461 5.67964C15.2736 2.89484 18.9267 2.2507 20.6428 4.58962L25.1221 10.6947L32.6791 10.4633C35.5804 10.3745 37.3227 13.6526 35.6259 16.0077L31.1994 22.1514L33.7534 29.2712C34.7335 32.0033 32.1536 34.6724 29.3898 33.7857L22.2128 31.4832Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M21.4079 26.8365L14.7433 31.9937L14.7041 23.5664L7.73204 18.8233L15.7342 16.1851L18.0947 8.09555L23.0798 14.8899L31.5016 14.6321L26.5722 21.4738L29.4178 29.4062L21.4079 26.8365Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\nexport const starIconNormalDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M30.1061 44.1854L20.3139 49.3338C17.7461 50.6838 14.745 48.5034 15.2355 45.6441L17.1061 34.7394L9.17653 27.0207C7.09656 24.9961 8.24318 21.4653 11.1158 21.0489L22.053 19.4638L26.9493 9.54278C28.2331 6.9414 31.9426 6.94139 33.2265 9.54278L38.1227 19.4638L49.06 21.0489C51.9326 21.4653 53.0792 24.9961 50.9993 27.0207L43.0697 34.7394L44.9389 45.6359C45.4296 48.4966 42.4254 50.6772 39.8576 49.324L30.1061 44.1854Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M30.0998 39.4723L19.5927 44.9966L21.5998 33.2961L13.0879 25.0106L24.8343 23.3082L30.0879 12.6632L35.3414 23.3082L47.0879 25.0106L38.576 33.2961L40.5831 44.9966L30.0998 39.4723Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n\nexport const starIconHoverDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M33.1609 44.7458L24.4114 51.5164C22.1171 53.2918 18.783 51.6656 18.7695 48.7646L18.7181 37.7007L9.56864 31.4763C7.1687 29.8436 7.68476 26.1672 10.4415 25.2584L20.9373 21.7982L24.0364 11.1776C24.849 8.39281 28.5021 7.74867 30.2182 10.0876L36.7629 19.0077L47.8092 18.6695C50.7105 18.5807 52.4528 21.8588 50.756 24.2138L44.2872 33.1922L48.0201 43.5985C49.0002 46.3306 46.4203 48.9997 43.6565 48.113L33.1609 44.7458Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M32.3991 40.1029L23.0108 47.3678L22.9557 35.4965L13.1343 28.815L24.4067 25.0987L27.732 13.7031L34.7542 23.2741L46.6178 22.9109L39.674 32.5486L43.6823 43.7228L32.3991 40.1029Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n","import type { AriaAttributes } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HTMLButtonProps } from '../../constants';\nimport type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { getResources } from './resourceHelper';\nimport { starIconHoverDesktop, starIconHoverMobile, starIconNormalDesktop, starIconNormalMobile } from './StarIcon';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { isMutableRefObject } from '../../utils/refs';\n\nimport styles from './styles.module.scss';\n\nexport interface FavoriteButtonProps extends Omit<HTMLButtonProps, 'type'>, AriaAttributes {\n /** Determines if the FavoriteButton is checked */\n checked: boolean;\n /** Gives a unique id to the button */\n id?: string;\n /** Function that is called when clicked */\n onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Resources for component */\n resources?: Partial<HNDesignsystemFavoriteButton>;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the button element */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nexport const FavoriteButton: React.FC<FavoriteButtonProps> = (props: FavoriteButtonProps) => {\n const { checked, id, onClick, resources, tabIndex, testId, ref, ...other } = props;\n\n const buttonWrapperClasses = classNames(styles.favoritebutton);\n const { refObject, isHovered, isActive } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n const breakpoint = useBreakpoint();\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemFavoriteButton = {\n ...defaultResources,\n ...resources,\n ariaLabel: other['aria-label'] || resources?.ariaLabel || defaultResources.ariaLabel,\n };\n\n const isMobile = breakpoint <= Breakpoint.sm;\n\n const starIcon = ((): React.JSX.Element => {\n if (isMobile) {\n if (isHovered) {\n return starIconHoverMobile(checked, isActive);\n } else {\n return starIconNormalMobile(checked, isActive);\n }\n } else {\n if (isHovered) {\n return starIconHoverDesktop(checked, isActive);\n } else {\n return starIconNormalDesktop(checked, isActive);\n }\n }\n })();\n\n return (\n <button\n id={id}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.FavoriteButton}\n className={buttonWrapperClasses}\n ref={refObject}\n tabIndex={tabIndex}\n role=\"switch\"\n aria-checked={checked}\n type=\"button\"\n aria-label={mergedResources.ariaLabel}\n {...other}\n >\n <svg focusable={false} overflow=\"visible\" role=\"presentation\" viewBox={isMobile ? '0 0 41 41' : '0 0 61 61'}>\n {starIcon}\n </svg>\n </button>\n );\n};\n\nFavoriteButton.displayName = 'FavoriteButton';\n\nexport default FavoriteButton;\n","export * from './FavoriteButton';\n\nimport { FavoriteButton } from './FavoriteButton';\nexport default FavoriteButton;\n"],"mappings":"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"}
|
|
@@ -8,9 +8,11 @@ export interface FilterDrawerProps<ViewId extends string = string> {
|
|
|
8
8
|
onClose?: () => void;
|
|
9
9
|
/** Fully custom footer — overrides the default footer built from onReset/resultText */
|
|
10
10
|
footer?: React.ReactNode;
|
|
11
|
+
/** Shows LoaderSpinner in the footer when turned on */
|
|
12
|
+
isLoading?: boolean;
|
|
11
13
|
/** If provided, shows a "Nullstill filter" button in the default footer */
|
|
12
14
|
onReset?: () => void;
|
|
13
|
-
/** If provided, shows a result count
|
|
15
|
+
/** If provided, shows a result count in the footer */
|
|
14
16
|
resultCount?: number;
|
|
15
17
|
/** Resources for the component */
|
|
16
18
|
resources?: Partial<HNDesignsystemFilter>;
|
|
@@ -34,7 +36,7 @@ declare function FilterDrawerOverview(_props: Omit<DrawerViewProps, 'id' | 'home
|
|
|
34
36
|
* Never rendered directly — FilterDrawer reads its props and creates a FilterDrawerView
|
|
35
37
|
*/
|
|
36
38
|
declare function FilterDrawerView(_props: FilterDrawerViewProps): React.ReactNode;
|
|
37
|
-
declare function FilterDrawer<ViewId extends string>({ drawer, onClose, footer, onReset, resultCount, resources, children, }: FilterDrawerProps<ViewId>): React.ReactNode;
|
|
39
|
+
declare function FilterDrawer<ViewId extends string>({ drawer, onClose, footer, isLoading, onReset, resultCount, resources, children, }: FilterDrawerProps<ViewId>): React.ReactNode;
|
|
38
40
|
declare namespace FilterDrawer {
|
|
39
41
|
var Overview: typeof FilterDrawerOverview;
|
|
40
42
|
var View: typeof FilterDrawerView;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HNDesignsystemFilter } from '../../../resources/Resources';
|
|
2
|
+
export interface LoaderSpinnerProps {
|
|
3
|
+
/** Resources for the component */
|
|
4
|
+
resources?: Partial<HNDesignsystemFilter>;
|
|
5
|
+
/** Sets the data-testid attribute. */
|
|
6
|
+
testId?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const LoaderSpinner: React.FC<LoaderSpinnerProps>;
|
|
9
|
+
export default LoaderSpinner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/Filter/LoaderSpinner/index.ts"],"sourcesContent":["import LoaderSpinner from './LoaderSpinner';\nexport * from './LoaderSpinner';\nexport default LoaderSpinner;\n"],"mappings":";;AAEA,IAAA,wBAAe"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '../../../scss/font-settings' as fontSettings;
|
|
3
|
+
@use '../../../scss/breakpoints' as breakpoints;
|
|
4
|
+
@import '../../../scss/supernova/styles/colors.css';
|
|
5
|
+
@import '../../../scss/supernova/styles/spacers.css';
|
|
6
|
+
|
|
7
|
+
.loader-spinner {
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
gap: var(--core-space-2xs);
|
|
11
|
+
|
|
12
|
+
&__svg {
|
|
13
|
+
position: relative;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
stroke: var(--color-action-graphics-onlight);
|
|
17
|
+
top: 6px;
|
|
18
|
+
|
|
19
|
+
@media (min-width: map.get(breakpoints.$grid-breakpoints, md)) {
|
|
20
|
+
top: 5px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__text {
|
|
25
|
+
color: var(--color-base-text-onlight);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -8,6 +8,8 @@ export { default as FilterDrawer } from './FilterDrawer';
|
|
|
8
8
|
export * from './FilterDrawer';
|
|
9
9
|
export { default as FilterLinkList } from './FilterLinkList';
|
|
10
10
|
export * from './FilterLinkList';
|
|
11
|
+
export { default as LoaderSpinner } from './LoaderSpinner';
|
|
12
|
+
export * from './LoaderSpinner';
|
|
11
13
|
export { default as FilterOverviewLinkList } from './FilterOverviewLinkList';
|
|
12
14
|
export * from './FilterOverviewLinkList';
|
|
13
15
|
export { default as FilterOverviewSearch } from './FilterOverviewSearch';
|
|
@@ -12,6 +12,7 @@ import FilterSearch_default from "./FilterSearch/index.js";
|
|
|
12
12
|
import { t as FilterSort_default } from "../../FilterSort.js";
|
|
13
13
|
import { t as FilterStateWrapper_default } from "../../FilterStateWrapper.js";
|
|
14
14
|
import { t as getFilterChips_default } from "../../getFilterChips.js";
|
|
15
|
+
import LoaderSpinner_default from "./LoaderSpinner/index.js";
|
|
15
16
|
import { useCallback, useState } from "react";
|
|
16
17
|
//#region src/components/Filter/useFilter.ts
|
|
17
18
|
var useFilter = (options) => {
|
|
@@ -171,6 +172,6 @@ var toggleArrayFilter = (filter, filterKey, value) => {
|
|
|
171
172
|
filter.setFilter(filterKey, updated.length > 0 ? updated : void 0);
|
|
172
173
|
};
|
|
173
174
|
//#endregion
|
|
174
|
-
export { DrawerNavigation_default as DrawerNavigation, DrawerNavigationContext, FilterButton_default as FilterButton, FilterButtonAndChipsWrapper_default as FilterButtonAndChipsWrapper, FilterDrawer_default as FilterDrawer, FilterLinkList_default as FilterLinkList, FilterOverviewLinkList_default as FilterOverviewLinkList, FilterOverviewSearch_default as FilterOverviewSearch, FilterResultCountAndSortWrapper_default as FilterResultCountAndSortWrapper, FilterSearch_default as FilterSearch, FilterSort_default as FilterSort, FilterStateWrapper_default as FilterStateWrapper, Link, createFilterConfig, filterItems, getFilterChips_default as getFilterChips, matchFilter, toggleArrayFilter, useDrawerNavigation, useFilter, useFilterDrawer };
|
|
175
|
+
export { DrawerNavigation_default as DrawerNavigation, DrawerNavigationContext, FilterButton_default as FilterButton, FilterButtonAndChipsWrapper_default as FilterButtonAndChipsWrapper, FilterDrawer_default as FilterDrawer, FilterLinkList_default as FilterLinkList, FilterOverviewLinkList_default as FilterOverviewLinkList, FilterOverviewSearch_default as FilterOverviewSearch, FilterResultCountAndSortWrapper_default as FilterResultCountAndSortWrapper, FilterSearch_default as FilterSearch, FilterSort_default as FilterSort, FilterStateWrapper_default as FilterStateWrapper, Link, LoaderSpinner_default as LoaderSpinner, createFilterConfig, filterItems, getFilterChips_default as getFilterChips, matchFilter, toggleArrayFilter, useDrawerNavigation, useFilter, useFilterDrawer };
|
|
175
176
|
|
|
176
177
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Filter/useFilter.ts","../../../src/components/Filter/useFilterDrawer.ts","../../../src/components/Filter/utils.ts"],"sourcesContent":["import { useState } from 'react';\n\n// Key er string men value kan være hva som helst og er ukjent for oss internt i useFilter. Den er typesikker for consumer.\n// Dette mønsteret lar oss ha ulike typer i samme objekt.\nexport type FilterValues = Record<string, unknown>;\n\nexport interface UseFilterOptions<T extends FilterValues> {\n /** Initial filter values */\n defaultValues?: Partial<T>;\n}\n\nexport interface UseFilterReturn<T extends FilterValues> {\n /** Current filter state */\n filters: Partial<T>;\n /** Update a single filter. Pass undefined to remove it. */\n setFilter: <K extends keyof T>(name: K, value: T[K] | undefined) => void;\n /** Replace all filters at once (useful for applying draft/delayed filters) */\n setFilters: (filters: Partial<T>) => void;\n /** Remove a filter entirely, or a specific value from an array filter */\n removeFilter: (filterKey: keyof T | string, optionValue?: unknown) => void;\n /** Reset filters to default values */\n resetFilters: () => void;\n /** Resets to empty filter */\n resetFiltersToEmpty: () => void;\n}\n\nexport const useFilter = <T extends FilterValues>(options?: UseFilterOptions<T>): UseFilterReturn<T> => {\n const [filters, setFiltersState] = useState<Partial<T>>(() => ({ ...options?.defaultValues }) as Partial<T>);\n\n // Fjern et filter helt, eller fjern en spesifikk verdi fra et array-filter.\n const removeFilter = (filterKey: keyof T, optionValue?: unknown): void => {\n setFiltersState(prev => {\n const current = prev[filterKey];\n if (current === undefined) return prev;\n if (optionValue !== undefined && Array.isArray(current)) {\n const updated = current.filter(v => v !== optionValue);\n if (updated.length === 0) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [filterKey as string]: _removed, ...rest } = prev;\n return rest as Partial<T>;\n }\n return { ...prev, [filterKey]: updated };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [filterKey as string]: _removed, ...rest } = prev;\n return rest as Partial<T>;\n });\n };\n\n // Sett en filtervalue. Send inn undefined for å fjerne filteret.\n const setFilter = <K extends keyof T>(name: K, value: T[K] | undefined): void => {\n if (value === undefined) {\n removeFilter(name);\n return;\n }\n setFiltersState(prev => ({ ...prev, [name]: value }));\n };\n\n // Erstatt alle filtre på en gang (f.eks. ved \"Bruk filter\" i delayed filtrering).\n const setFilters = (newFilters: Partial<T>): void => {\n setFiltersState(newFilters);\n };\n\n const resetFilters = (): void => {\n setFiltersState({ ...options?.defaultValues } as Partial<T>);\n };\n\n const resetFiltersToEmpty = (): void => {\n setFiltersState({});\n };\n\n return { filters, setFilter, setFilters, removeFilter, resetFilters, resetFiltersToEmpty };\n};\n","import { useState, useCallback } from 'react';\n\nexport interface UseFilterDrawerReturn<ViewId extends string = string> {\n /** Whether the drawer is currently open */\n isOpen: boolean;\n /** The view to navigate to when the drawer opens */\n initialView: ViewId | undefined;\n /** Open the drawer, optionally navigating directly to a specific view */\n open: (view?: ViewId) => void;\n /** Close the drawer */\n close: () => void;\n}\n\nexport const useFilterDrawer = <ViewId extends string = string>(): UseFilterDrawerReturn<ViewId> => {\n const [isOpen, setIsOpen] = useState(false);\n const [initialView, setInitialView] = useState<ViewId | undefined>(undefined);\n\n const open = useCallback((view?: ViewId): void => {\n setInitialView(view);\n setIsOpen(true);\n }, []);\n\n const close = useCallback((): void => {\n setIsOpen(false);\n }, []);\n\n return { isOpen, initialView, open, close };\n};\n","import type { FilterValues, UseFilterOptions, UseFilterReturn } from './useFilter';\n\n/** Et filtervalg med verdi og visningstekst */\nexport interface FilterOption<V = string> {\n value: V;\n label: string;\n}\n\n// Hvis V er et array (f.eks. string[]), hent ut typen inni arrayet (string).\n// Hvis V ikke er et array (f.eks. boolean), bruk V som den er.\n// Brukes for å sikre at options-listen matcher elementene, ikke hele arrayet.\n// Eksempel: FilterCategoryConfig<string[]> → options er FilterOption<string>[], ikke FilterOption<string[]>[]\ntype OptionValue<V> = V extends (infer U)[] ? U : V;\n\n/** Konfigurasjon for en filterkategori. */\nexport interface FilterCategoryConfig<V = unknown> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options?: ({ value: OptionValue<V> } & { [key: string]: any })[];\n defaultValue?: V;\n /** Hent visningstekst fra et option-objekt. Hvis ikke satt, brukes String(value). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getLabel?: (option: any) => string;\n}\n\nexport interface FilterConfigResult<T extends FilterValues> {\n /** Options for useFilter (defaultValues) */\n filterOptions: UseFilterOptions<T>;\n /** Look up the display label for a filter value */\n getLabel: (key: keyof T, value: unknown) => string;\n}\n\n/**\n * Lager UseFilterOptions fra et oppsett av filterkategorier.\n * Samler defaultValues og label-oppslag automatisk fra config.\n *\n * Eksempel:\n * const { filterOptions, getLabel } = createFilterConfig<MyFilters>({\n * sykehus: { options: sykehusOptions, defaultValue: ['haukeland'], getLabel: o => o.label },\n * status: { options: statusOptions, getLabel: o => o.displayText },\n * });\n * const filter = useFilter(filterOptions);\n * getLabel('sykehus', 'haukeland') // → 'Haukeland universitetssjukehus'\n */\nexport const createFilterConfig = <T extends FilterValues>(categories: {\n [K in keyof T]?: FilterCategoryConfig<T[K]>;\n}): FilterConfigResult<T> => {\n const defaultValues = {} as Partial<T>;\n const labelMaps = new Map<string, Map<unknown, string>>();\n\n for (const key in categories) {\n const category = categories[key];\n if (category?.defaultValue !== undefined) {\n defaultValues[key] = category.defaultValue as T[typeof key];\n }\n if (category?.options) {\n const resolve = category.getLabel ?? ((o: { value: unknown }): string => String(o.value));\n const map = new Map<unknown, string>();\n for (const opt of category.options) {\n map.set(opt.value, resolve(opt));\n }\n labelMaps.set(key, map);\n }\n }\n\n const getLabel = (key: keyof T, value: unknown): string => {\n return labelMaps.get(key as string)?.get(value) ?? String(value); // todo: fallback til .displaytext om det ikke er sendt inn noe, og String(value) om .label ikke finnes\n };\n\n return { filterOptions: { defaultValues }, getLabel };\n};\n\n/**\n * Ferdige matcher-funksjoner for typiske filter mønster.\n * Brukes som deler i matcher objektet til filterItems.\n *\n * Eksempel:\n * const filterMatchers = {\n * categories: matchFilter.arrayIncludes<Medisin>(m => m.sykehus),\n * status: matchFilter.exactMatch<Medisin>(m => m.status),\n * eResept: matchFilter.booleanToggle<Medisin>(m => m.eResept),\n * };\n */\nexport const matchFilter = {\n /** Array-filter: matcher hvis det er overlapp mellom filterverdier og item-verdier (OR-logikk). */\n arrayIncludes:\n <TItem>(accessor: (item: TItem) => unknown) =>\n (item: TItem, value: unknown): boolean => {\n const filterValues = Array.isArray(value) ? value : [value];\n const itemValue = accessor(item);\n if (Array.isArray(itemValue)) {\n return itemValue.some(v => filterValues.includes(v));\n }\n return filterValues.includes(itemValue);\n },\n\n /** Eksakt match: matcher hvis item-verdien er lik én av filterverdiene */\n exactMatch:\n <TItem>(accessor: (item: TItem) => unknown) =>\n (item: TItem, value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.includes(accessor(item));\n }\n return accessor(item) === value;\n },\n\n /** Boolean toggle: når filterverdien er true, inkluder kun items der accessor returnerer true */\n booleanToggle:\n <TItem>(accessor: (item: TItem) => boolean) =>\n (item: TItem, value: unknown): boolean => {\n const active = Array.isArray(value) ? value.includes(true) : value === true;\n return !active || accessor(item);\n },\n\n /** Fritekstsøk: matcher hvis søketeksten finnes i ett eller flere felt (case-insensitive) */\n textSearch:\n <TItem>(...accessors: ((item: TItem) => string | undefined)[]) =>\n (item: TItem, value: unknown): boolean => {\n const search = String(value).toLowerCase();\n return accessors.some(accessor => accessor(item)?.toLowerCase().includes(search));\n },\n};\n\n/**\n * Filtrerer en liste med items basert på aktive filterverdier.\n * Hvert filter som er satt må matche for at et item skal inkluderes (AND-logikk).\n *\n * Eksempel:\n * const filtered = filterItems(medisiner, filter.filters, {\n * sykehus: matchFilter.arrayIncludes<Medisin>(m => m.sykehus),\n * reseptstatus: matchFilter.exactMatch<Medisin>(m => m.reseptstatus),\n * eResept: matchFilter.booleanToggle<Medisin>(m => m.eResept),\n * });\n */\n\n/** Type for matcher-objektet som sendes til filterItems. Sikrer at keys matcher filtertypen. */\nexport type FilterMatchers<TItem, T extends FilterValues> = { [K in keyof T]?: (item: TItem, value: NonNullable<T[K]>) => boolean };\n\nexport const filterItems = <TItem, T extends FilterValues>(\n items: TItem[],\n filters: Partial<T>,\n matchers: FilterMatchers<TItem, T>\n): TItem[] => {\n return items.filter(item => {\n for (const key in matchers) {\n const value = filters[key];\n if (value === undefined) {\n continue;\n }\n const matcher = matchers[key];\n if (matcher && !matcher(item, value as NonNullable<T[typeof key]>)) {\n return false;\n }\n }\n return true;\n });\n};\n\n/**\n * Toggler en verdi i et array-basert filter.\n * Legger til verdien hvis den ikke finnes, fjerner den hvis den finnes.\n * Setter filteret til undefined hvis arrayet blir tomt.\n */\nexport const toggleArrayFilter = <T extends FilterValues, K extends keyof T>(\n filter: UseFilterReturn<T>,\n filterKey: K,\n value: T[K] extends (infer U)[] | undefined ? U : never\n): void => {\n const current = (filter.filters[filterKey] ?? []) as unknown[];\n const updated = current.includes(value) ? current.filter(v => v !== value) : [...current, value];\n filter.setFilter(filterKey, (updated.length > 0 ? updated : undefined) as T[K] | undefined);\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Filter/useFilter.ts","../../../src/components/Filter/useFilterDrawer.ts","../../../src/components/Filter/utils.ts"],"sourcesContent":["import { useState } from 'react';\n\n// Key er string men value kan være hva som helst og er ukjent for oss internt i useFilter. Den er typesikker for consumer.\n// Dette mønsteret lar oss ha ulike typer i samme objekt.\nexport type FilterValues = Record<string, unknown>;\n\nexport interface UseFilterOptions<T extends FilterValues> {\n /** Initial filter values */\n defaultValues?: Partial<T>;\n}\n\nexport interface UseFilterReturn<T extends FilterValues> {\n /** Current filter state */\n filters: Partial<T>;\n /** Update a single filter. Pass undefined to remove it. */\n setFilter: <K extends keyof T>(name: K, value: T[K] | undefined) => void;\n /** Replace all filters at once (useful for applying draft/delayed filters) */\n setFilters: (filters: Partial<T>) => void;\n /** Remove a filter entirely, or a specific value from an array filter */\n removeFilter: (filterKey: keyof T | string, optionValue?: unknown) => void;\n /** Reset filters to default values */\n resetFilters: () => void;\n /** Resets to empty filter */\n resetFiltersToEmpty: () => void;\n}\n\nexport const useFilter = <T extends FilterValues>(options?: UseFilterOptions<T>): UseFilterReturn<T> => {\n const [filters, setFiltersState] = useState<Partial<T>>(() => ({ ...options?.defaultValues }) as Partial<T>);\n\n // Fjern et filter helt, eller fjern en spesifikk verdi fra et array-filter.\n const removeFilter = (filterKey: keyof T, optionValue?: unknown): void => {\n setFiltersState(prev => {\n const current = prev[filterKey];\n if (current === undefined) return prev;\n if (optionValue !== undefined && Array.isArray(current)) {\n const updated = current.filter(v => v !== optionValue);\n if (updated.length === 0) {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [filterKey as string]: _removed, ...rest } = prev;\n return rest as Partial<T>;\n }\n return { ...prev, [filterKey]: updated };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { [filterKey as string]: _removed, ...rest } = prev;\n return rest as Partial<T>;\n });\n };\n\n // Sett en filtervalue. Send inn undefined for å fjerne filteret.\n const setFilter = <K extends keyof T>(name: K, value: T[K] | undefined): void => {\n if (value === undefined) {\n removeFilter(name);\n return;\n }\n setFiltersState(prev => ({ ...prev, [name]: value }));\n };\n\n // Erstatt alle filtre på en gang (f.eks. ved \"Bruk filter\" i delayed filtrering).\n const setFilters = (newFilters: Partial<T>): void => {\n setFiltersState(newFilters);\n };\n\n const resetFilters = (): void => {\n setFiltersState({ ...options?.defaultValues } as Partial<T>);\n };\n\n const resetFiltersToEmpty = (): void => {\n setFiltersState({});\n };\n\n return { filters, setFilter, setFilters, removeFilter, resetFilters, resetFiltersToEmpty };\n};\n","import { useState, useCallback } from 'react';\n\nexport interface UseFilterDrawerReturn<ViewId extends string = string> {\n /** Whether the drawer is currently open */\n isOpen: boolean;\n /** The view to navigate to when the drawer opens */\n initialView: ViewId | undefined;\n /** Open the drawer, optionally navigating directly to a specific view */\n open: (view?: ViewId) => void;\n /** Close the drawer */\n close: () => void;\n}\n\nexport const useFilterDrawer = <ViewId extends string = string>(): UseFilterDrawerReturn<ViewId> => {\n const [isOpen, setIsOpen] = useState(false);\n const [initialView, setInitialView] = useState<ViewId | undefined>(undefined);\n\n const open = useCallback((view?: ViewId): void => {\n setInitialView(view);\n setIsOpen(true);\n }, []);\n\n const close = useCallback((): void => {\n setIsOpen(false);\n }, []);\n\n return { isOpen, initialView, open, close };\n};\n","import type { FilterValues, UseFilterOptions, UseFilterReturn } from './useFilter';\n\n/** Et filtervalg med verdi og visningstekst */\nexport interface FilterOption<V = string> {\n value: V;\n label: string;\n}\n\n// Hvis V er et array (f.eks. string[]), hent ut typen inni arrayet (string).\n// Hvis V ikke er et array (f.eks. boolean), bruk V som den er.\n// Brukes for å sikre at options-listen matcher elementene, ikke hele arrayet.\n// Eksempel: FilterCategoryConfig<string[]> → options er FilterOption<string>[], ikke FilterOption<string[]>[]\ntype OptionValue<V> = V extends (infer U)[] ? U : V;\n\n/** Konfigurasjon for en filterkategori. */\nexport interface FilterCategoryConfig<V = unknown> {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n options?: ({ value: OptionValue<V> } & { [key: string]: any })[];\n defaultValue?: V;\n /** Hent visningstekst fra et option-objekt. Hvis ikke satt, brukes String(value). */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getLabel?: (option: any) => string;\n}\n\nexport interface FilterConfigResult<T extends FilterValues> {\n /** Options for useFilter (defaultValues) */\n filterOptions: UseFilterOptions<T>;\n /** Look up the display label for a filter value */\n getLabel: (key: keyof T, value: unknown) => string;\n}\n\n/**\n * Lager UseFilterOptions fra et oppsett av filterkategorier.\n * Samler defaultValues og label-oppslag automatisk fra config.\n *\n * Eksempel:\n * const { filterOptions, getLabel } = createFilterConfig<MyFilters>({\n * sykehus: { options: sykehusOptions, defaultValue: ['haukeland'], getLabel: o => o.label },\n * status: { options: statusOptions, getLabel: o => o.displayText },\n * });\n * const filter = useFilter(filterOptions);\n * getLabel('sykehus', 'haukeland') // → 'Haukeland universitetssjukehus'\n */\nexport const createFilterConfig = <T extends FilterValues>(categories: {\n [K in keyof T]?: FilterCategoryConfig<T[K]>;\n}): FilterConfigResult<T> => {\n const defaultValues = {} as Partial<T>;\n const labelMaps = new Map<string, Map<unknown, string>>();\n\n for (const key in categories) {\n const category = categories[key];\n if (category?.defaultValue !== undefined) {\n defaultValues[key] = category.defaultValue as T[typeof key];\n }\n if (category?.options) {\n const resolve = category.getLabel ?? ((o: { value: unknown }): string => String(o.value));\n const map = new Map<unknown, string>();\n for (const opt of category.options) {\n map.set(opt.value, resolve(opt));\n }\n labelMaps.set(key, map);\n }\n }\n\n const getLabel = (key: keyof T, value: unknown): string => {\n return labelMaps.get(key as string)?.get(value) ?? String(value); // todo: fallback til .displaytext om det ikke er sendt inn noe, og String(value) om .label ikke finnes\n };\n\n return { filterOptions: { defaultValues }, getLabel };\n};\n\n/**\n * Ferdige matcher-funksjoner for typiske filter mønster.\n * Brukes som deler i matcher objektet til filterItems.\n *\n * Eksempel:\n * const filterMatchers = {\n * categories: matchFilter.arrayIncludes<Medisin>(m => m.sykehus),\n * status: matchFilter.exactMatch<Medisin>(m => m.status),\n * eResept: matchFilter.booleanToggle<Medisin>(m => m.eResept),\n * };\n */\nexport const matchFilter = {\n /** Array-filter: matcher hvis det er overlapp mellom filterverdier og item-verdier (OR-logikk). */\n arrayIncludes:\n <TItem>(accessor: (item: TItem) => unknown) =>\n (item: TItem, value: unknown): boolean => {\n const filterValues = Array.isArray(value) ? value : [value];\n const itemValue = accessor(item);\n if (Array.isArray(itemValue)) {\n return itemValue.some(v => filterValues.includes(v));\n }\n return filterValues.includes(itemValue);\n },\n\n /** Eksakt match: matcher hvis item-verdien er lik én av filterverdiene */\n exactMatch:\n <TItem>(accessor: (item: TItem) => unknown) =>\n (item: TItem, value: unknown): boolean => {\n if (Array.isArray(value)) {\n return value.includes(accessor(item));\n }\n return accessor(item) === value;\n },\n\n /** Boolean toggle: når filterverdien er true, inkluder kun items der accessor returnerer true */\n booleanToggle:\n <TItem>(accessor: (item: TItem) => boolean) =>\n (item: TItem, value: unknown): boolean => {\n const active = Array.isArray(value) ? value.includes(true) : value === true;\n return !active || accessor(item);\n },\n\n /** Fritekstsøk: matcher hvis søketeksten finnes i ett eller flere felt (case-insensitive) */\n textSearch:\n <TItem>(...accessors: ((item: TItem) => string | undefined)[]) =>\n (item: TItem, value: unknown): boolean => {\n const search = String(value).toLowerCase();\n return accessors.some(accessor => accessor(item)?.toLowerCase().includes(search));\n },\n};\n\n/**\n * Filtrerer en liste med items basert på aktive filterverdier.\n * Hvert filter som er satt må matche for at et item skal inkluderes (AND-logikk).\n *\n * Eksempel:\n * const filtered = filterItems(medisiner, filter.filters, {\n * sykehus: matchFilter.arrayIncludes<Medisin>(m => m.sykehus),\n * reseptstatus: matchFilter.exactMatch<Medisin>(m => m.reseptstatus),\n * eResept: matchFilter.booleanToggle<Medisin>(m => m.eResept),\n * });\n */\n\n/** Type for matcher-objektet som sendes til filterItems. Sikrer at keys matcher filtertypen. */\nexport type FilterMatchers<TItem, T extends FilterValues> = { [K in keyof T]?: (item: TItem, value: NonNullable<T[K]>) => boolean };\n\nexport const filterItems = <TItem, T extends FilterValues>(\n items: TItem[],\n filters: Partial<T>,\n matchers: FilterMatchers<TItem, T>\n): TItem[] => {\n return items.filter(item => {\n for (const key in matchers) {\n const value = filters[key];\n if (value === undefined) {\n continue;\n }\n const matcher = matchers[key];\n if (matcher && !matcher(item, value as NonNullable<T[typeof key]>)) {\n return false;\n }\n }\n return true;\n });\n};\n\n/**\n * Toggler en verdi i et array-basert filter.\n * Legger til verdien hvis den ikke finnes, fjerner den hvis den finnes.\n * Setter filteret til undefined hvis arrayet blir tomt.\n */\nexport const toggleArrayFilter = <T extends FilterValues, K extends keyof T>(\n filter: UseFilterReturn<T>,\n filterKey: K,\n value: T[K] extends (infer U)[] | undefined ? U : never\n): void => {\n const current = (filter.filters[filterKey] ?? []) as unknown[];\n const updated = current.includes(value) ? current.filter(v => v !== value) : [...current, value];\n filter.setFilter(filterKey, (updated.length > 0 ? updated : undefined) as T[K] | undefined);\n};\n"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/HN.Designsystem.HelpBubble.nb-NO.json","../../../src/components/HelpBubble/resourceHelper.ts","../../../src/components/HelpBubble/HelpBubble.tsx","../../../src/components/HelpBubble/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Hjelpetekst\"\n}\n","import type { HNDesignsystemHelpBubble } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.HelpBubble.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemHelpBubble => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import classNames from 'classnames';\n\nimport type { HNDesignsystemHelpBubble } from '../../resources/Resources';\nimport type { AnchorLinkTargets } from '../AnchorLink';\nimport type { PopOverProps } from '../PopOver';\n\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport AnchorLink from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverVariant } from '../PopOver';\nimport { getResources } from './resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Sets aria-labelledby of the bubble. */\n ariaLabelledById?: string;\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement | null>;\n /** Adds custom classes to the element. */\n className?: string;\n /** Determines the placement of the helpbubble. Default: automatic positioning. */\n variant?: keyof typeof HelpBubbleVariant;\n /** Show the bubble. Default: false. */\n showBubble?: boolean;\n /** Hide the close button in the bubble. */\n noCloseButton?: boolean;\n /** Visible text on the link. */\n linkText?: string;\n /** Url the link leads to */\n linkUrl?: string;\n /** Sets the target type of the link. _blank adds an arrow icon at the end of the link */\n linkTarget?: AnchorLinkTargets;\n /** Function is called when link is clicked */\n onLinkClick?: () => void;\n /** Function is called when user clicks the button */\n onClose?: () => void;\n /** aria-label to be passed onto Close */\n closeAriaLabel?: string;\n /** Resources for the component */\n resources?: Partial<HNDesignsystemHelpBubble>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLDivElement | SVGSVGElement | null>;\n}\n\nconst HelpBubble: React.FC<HelpBubbleProps> = props => {\n const {\n ariaLabelledById,\n children,\n className = '',\n noCloseButton,\n linkText = 'Mer hjelp',\n linkUrl,\n linkTarget,\n onLinkClick,\n onClose,\n closeAriaLabel,\n // Props passed on to PopOver\n showBubble,\n helpBubbleId,\n variant,\n controllerRef,\n resources,\n testId,\n ref,\n } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n\n if (!showBubble) {\n return null;\n }\n\n const defaultResources = getResources(language);\n const mergedResources: HNDesignsystemHelpBubble = {\n ...defaultResources,\n ...resources,\n };\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n const contentClasses = classNames(styles.helpbubble__content);\n\n const renderLink = (): React.ReactNode | undefined => {\n if (onLinkClick && linkText) {\n return (\n <button className={styles.helpbubble__link} onClick={onLinkClick} type=\"button\">\n {linkText}\n </button>\n );\n } else if (linkUrl && linkText) {\n return (\n <AnchorLink href={linkUrl} target={linkTarget}>\n {linkText}\n </AnchorLink>\n );\n }\n };\n\n const renderCloseButton = (): React.ReactNode | undefined => {\n if (noCloseButton) {\n return;\n }\n return <Close small color=\"plum\" onClick={onClose} ariaLabel={closeAriaLabel} className={styles.helpbubble__close} />;\n };\n\n return (\n <PopOver\n ariaLabel={mergedResources.ariaLabel}\n ariaLabelledById={ariaLabelledById}\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role=\"group\"\n ref={ref}\n show={showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n {renderCloseButton()}\n </div>\n </PopOver>\n );\n};\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n","import HelpBubble from './HelpBubble';\nexport * from './HelpBubble';\nexport default HelpBubble;\n"],"mappings":";;;;;;;;;;;ACKA,IAAa,gBAAgB,aAAwD;CACnF,QAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,SACE,OAAO
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/HN.Designsystem.HelpBubble.nb-NO.json","../../../src/components/HelpBubble/resourceHelper.ts","../../../src/components/HelpBubble/HelpBubble.tsx","../../../src/components/HelpBubble/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Hjelpetekst\"\n}\n","import type { HNDesignsystemHelpBubble } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.HelpBubble.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemHelpBubble => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import classNames from 'classnames';\n\nimport type { HNDesignsystemHelpBubble } from '../../resources/Resources';\nimport type { AnchorLinkTargets } from '../AnchorLink';\nimport type { PopOverProps } from '../PopOver';\n\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport AnchorLink from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverVariant } from '../PopOver';\nimport { getResources } from './resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Sets aria-labelledby of the bubble. */\n ariaLabelledById?: string;\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement | null>;\n /** Adds custom classes to the element. */\n className?: string;\n /** Determines the placement of the helpbubble. Default: automatic positioning. */\n variant?: keyof typeof HelpBubbleVariant;\n /** Show the bubble. Default: false. */\n showBubble?: boolean;\n /** Hide the close button in the bubble. */\n noCloseButton?: boolean;\n /** Visible text on the link. */\n linkText?: string;\n /** Url the link leads to */\n linkUrl?: string;\n /** Sets the target type of the link. _blank adds an arrow icon at the end of the link */\n linkTarget?: AnchorLinkTargets;\n /** Function is called when link is clicked */\n onLinkClick?: () => void;\n /** Function is called when user clicks the button */\n onClose?: () => void;\n /** aria-label to be passed onto Close */\n closeAriaLabel?: string;\n /** Resources for the component */\n resources?: Partial<HNDesignsystemHelpBubble>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLDivElement | SVGSVGElement | null>;\n}\n\nconst HelpBubble: React.FC<HelpBubbleProps> = props => {\n const {\n ariaLabelledById,\n children,\n className = '',\n noCloseButton,\n linkText = 'Mer hjelp',\n linkUrl,\n linkTarget,\n onLinkClick,\n onClose,\n closeAriaLabel,\n // Props passed on to PopOver\n showBubble,\n helpBubbleId,\n variant,\n controllerRef,\n resources,\n testId,\n ref,\n } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n\n if (!showBubble) {\n return null;\n }\n\n const defaultResources = getResources(language);\n const mergedResources: HNDesignsystemHelpBubble = {\n ...defaultResources,\n ...resources,\n };\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n const contentClasses = classNames(styles.helpbubble__content);\n\n const renderLink = (): React.ReactNode | undefined => {\n if (onLinkClick && linkText) {\n return (\n <button className={styles.helpbubble__link} onClick={onLinkClick} type=\"button\">\n {linkText}\n </button>\n );\n } else if (linkUrl && linkText) {\n return (\n <AnchorLink href={linkUrl} target={linkTarget}>\n {linkText}\n </AnchorLink>\n );\n }\n };\n\n const renderCloseButton = (): React.ReactNode | undefined => {\n if (noCloseButton) {\n return;\n }\n return <Close small color=\"plum\" onClick={onClose} ariaLabel={closeAriaLabel} className={styles.helpbubble__close} />;\n };\n\n return (\n <PopOver\n ariaLabel={mergedResources.ariaLabel}\n ariaLabelledById={ariaLabelledById}\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role=\"group\"\n ref={ref}\n show={showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n {renderCloseButton()}\n </div>\n </PopOver>\n );\n};\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n","import HelpBubble from './HelpBubble';\nexport * from './HelpBubble';\nexport default HelpBubble;\n"],"mappings":";;;;;;;;;;;ACKA,IAAa,gBAAgB,aAAwD;CACnF,QAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,SACE,OAAO;CACX;AACF;;;ACIA,IAAa,oBAAoB;AAuCjC,IAAM,cAAwC,UAAS;CACrD,MAAM,EACJ,kBACA,UACA,YAAY,IACZ,eACA,WAAW,aACX,SACA,YACA,aACA,SACA,gBAEA,YACA,cACA,SACA,eACA,WACA,QACA,QACE;CAEJ,MAAM,EAAE,aAAa,YAA6B,gBAAgB,SAAS;CAE3E,IAAI,CAAC,YACH,OAAO;CAIT,MAAM,kBAA4C;EAChD,GAFuB,aAAa,QAEjC;EACH,GAAG;CACL;CAEA,MAAM,oBAAoB,WAAW,OAAO,YAAY,SAAS;CACjE,MAAM,iBAAiB,WAAW,OAAO,mBAAmB;CAE5D,MAAM,mBAAgD;EACpD,IAAI,eAAe,UACjB,OACE,oBAAC,UAAD;GAAQ,WAAW,OAAO;GAAkB,SAAS;GAAa,MAAK;aACpE;EACK,CAAA;OAEL,IAAI,WAAW,UACpB,OACE,oBAAC,oBAAD;GAAY,MAAM;GAAS,QAAQ;aAChC;EACS,CAAA;CAGlB;CAEA,MAAM,0BAAuD;EAC3D,IAAI,eACF;EAEF,OAAO,oBAAC,eAAD;GAAO,OAAA;GAAM,OAAM;GAAO,SAAS;GAAS,WAAW;GAAgB,WAAW,OAAO;EAAoB,CAAA;CACtH;CAEA,OACE,oBAAC,iBAAD;EACE,WAAW,gBAAgB;EACT;EAClB,IAAI;EACK;EACM;EACf,MAAK;EACA;EACL,MAAM;EACE;YAER,qBAAC,OAAD;GAAK,WAAW;GAAmB,oBAAkB,YAAY;aAAjE,CACE,qBAAC,OAAD;IAAK,WAAW;cAAhB,CACG,UACA,WAAW,CACT;OACJ,kBAAkB,CAChB;;CACE,CAAA;AAEb;AAEA,WAAW,cAAc;;;ACvIzB,IAAA,qBAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/HN.Designsystem.HelpDrawer.nb-NO.json","../../../src/components/HelpDrawer/resourceHelper.ts","../../../src/components/HelpDrawer/HelpDrawer.tsx","../../../src/components/HelpDrawer/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Hjelpetekst\"\n}\n","import type { HNDesignsystemHelpDrawer } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.HelpDrawer.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemHelpDrawer => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import type { HNDesignsystemHelpDrawer } from '../../resources/Resources';\nimport type { DrawerProps } from '../Drawer';\n\nimport { getResources } from './resourceHelper';\nimport { LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport Drawer from '../Drawer';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpDrawerProps extends Pick<\n DrawerProps,\n 'ariaLabelledBy' | 'children' | 'isOpen' | 'onRequestClose' | 'title' | 'titleHtmlMarkup' | 'titleId' | 'zIndex'\n> {\n /** Resources for the component */\n resources?: Partial<HNDesignsystemHelpDrawer>;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst HelpDrawer: React.FC<HelpDrawerProps> = props => {\n const { resources, ...drawerProps } = props;\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const mergedResources: HNDesignsystemHelpDrawer = {\n ...defaultResources,\n ...resources,\n ariaLabel: props.resources?.ariaLabel ?? defaultResources.ariaLabel,\n };\n\n return (\n <Drawer\n {...drawerProps}\n closeColor={'plum'}\n headerClasses={styles['help-drawer']}\n desktopDirection={'left'}\n ariaLabel={mergedResources.ariaLabel}\n />\n );\n};\n\nexport default HelpDrawer;\n","import HelpDrawer from './HelpDrawer';\nexport * from './HelpDrawer';\nexport default HelpDrawer;\n"],"mappings":";;;;;;;;ACKA,IAAa,gBAAgB,aAAwD;CACnF,QAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,SACE,OAAO
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/resources/HN.Designsystem.HelpDrawer.nb-NO.json","../../../src/components/HelpDrawer/resourceHelper.ts","../../../src/components/HelpDrawer/HelpDrawer.tsx","../../../src/components/HelpDrawer/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Hjelpetekst\"\n}\n","import type { HNDesignsystemHelpDrawer } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.HelpDrawer.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemHelpDrawer => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import type { HNDesignsystemHelpDrawer } from '../../resources/Resources';\nimport type { DrawerProps } from '../Drawer';\n\nimport { getResources } from './resourceHelper';\nimport { LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport Drawer from '../Drawer';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpDrawerProps extends Pick<\n DrawerProps,\n 'ariaLabelledBy' | 'children' | 'isOpen' | 'onRequestClose' | 'title' | 'titleHtmlMarkup' | 'titleId' | 'zIndex'\n> {\n /** Resources for the component */\n resources?: Partial<HNDesignsystemHelpDrawer>;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst HelpDrawer: React.FC<HelpDrawerProps> = props => {\n const { resources, ...drawerProps } = props;\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n const mergedResources: HNDesignsystemHelpDrawer = {\n ...defaultResources,\n ...resources,\n ariaLabel: props.resources?.ariaLabel ?? defaultResources.ariaLabel,\n };\n\n return (\n <Drawer\n {...drawerProps}\n closeColor={'plum'}\n headerClasses={styles['help-drawer']}\n desktopDirection={'left'}\n ariaLabel={mergedResources.ariaLabel}\n />\n );\n};\n\nexport default HelpDrawer;\n","import HelpDrawer from './HelpDrawer';\nexport * from './HelpDrawer';\nexport default HelpDrawer;\n"],"mappings":";;;;;;;;ACKA,IAAa,gBAAgB,aAAwD;CACnF,QAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,SACE,OAAO;CACX;AACF;;;ACSA,IAAM,cAAwC,UAAS;CACrD,MAAM,EAAE,WAAW,GAAG,gBAAgB;CACtC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,SAAS;CAC3E,MAAM,mBAAmB,aAAa,QAAQ;CAC9C,MAAM,kBAA4C;EAChD,GAAG;EACH,GAAG;EACH,WAAW,MAAM,WAAW,aAAa,iBAAiB;CAC5D;CAEA,OACE,oBAAC,gBAAD;EACE,GAAI;EACJ,YAAY;EACZ,eAAe,OAAO;EACtB,kBAAkB;EAClB,WAAW,gBAAgB;CAC5B,CAAA;AAEL;;;ACrCA,IAAA,qBAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpExpanderInline/HelpExpanderInline.tsx","../../../src/components/HelpExpanderInline/index.ts"],"sourcesContent":["import { AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport HelpDetails from '../HelpDetails/HelpDetails';\n\nexport interface HelpExpanderInlineProps {\n /** Sets the text content of the help text that appears when expanded. */\n children: React.ReactNode;\n /** Ref for the element that triggers the HelpExpanderInline */\n controllerRef?: React.RefObject<HTMLButtonElement | null>;\n /** Expands the component */\n expanded?: boolean;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Classname will be applied to the button element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the container element */\n ref?: React.Ref<HTMLDivElement | null>;\n}\n\nconst HelpExpanderInline: React.FC<HelpExpanderInlineProps> = props => {\n const { children, className, controllerRef, expanded = false, onExpand, testId, ref } = props;\n const [isExpanded] = useExpand(expanded, onExpand);\n\n return (\n isExpanded && (\n <div className={className} data-testid={testId} data-analyticsid={AnalyticsId.HelpExpanderInline} ref={ref}>\n <HelpDetails controllerRef={controllerRef}>{children}</HelpDetails>\n </div>\n )\n );\n};\n\nHelpExpanderInline.displayName = 'HelpExpanderInline';\n\nexport default HelpExpanderInline;\n","import HelpExpanderInline from './HelpExpanderInline';\nexport * from './HelpExpanderInline';\nexport default HelpExpanderInline;\n"],"mappings":";;;;;AAqBA,IAAM,sBAAwD,UAAS;CACrE,MAAM,EAAE,UAAU,WAAW,eAAe,WAAW,OAAO,UAAU,QAAQ,QAAQ;CACxF,MAAM,CAAC,cAAc,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpExpanderInline/HelpExpanderInline.tsx","../../../src/components/HelpExpanderInline/index.ts"],"sourcesContent":["import { AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport HelpDetails from '../HelpDetails/HelpDetails';\n\nexport interface HelpExpanderInlineProps {\n /** Sets the text content of the help text that appears when expanded. */\n children: React.ReactNode;\n /** Ref for the element that triggers the HelpExpanderInline */\n controllerRef?: React.RefObject<HTMLButtonElement | null>;\n /** Expands the component */\n expanded?: boolean;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Classname will be applied to the button element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the container element */\n ref?: React.Ref<HTMLDivElement | null>;\n}\n\nconst HelpExpanderInline: React.FC<HelpExpanderInlineProps> = props => {\n const { children, className, controllerRef, expanded = false, onExpand, testId, ref } = props;\n const [isExpanded] = useExpand(expanded, onExpand);\n\n return (\n isExpanded && (\n <div className={className} data-testid={testId} data-analyticsid={AnalyticsId.HelpExpanderInline} ref={ref}>\n <HelpDetails controllerRef={controllerRef}>{children}</HelpDetails>\n </div>\n )\n );\n};\n\nHelpExpanderInline.displayName = 'HelpExpanderInline';\n\nexport default HelpExpanderInline;\n","import HelpExpanderInline from './HelpExpanderInline';\nexport * from './HelpExpanderInline';\nexport default HelpExpanderInline;\n"],"mappings":";;;;;AAqBA,IAAM,sBAAwD,UAAS;CACrE,MAAM,EAAE,UAAU,WAAW,eAAe,WAAW,OAAO,UAAU,QAAQ,QAAQ;CACxF,MAAM,CAAC,cAAc,UAAU,UAAU,QAAQ;CAEjD,OACE,cACE,oBAAC,OAAD;EAAgB;EAAW,eAAa;EAAQ,oBAAkB,YAAY;EAAyB;YACrG,oBAAC,aAAD;GAA4B;GAAgB;EAAsB,CAAA;CAC/D,CAAA;AAGX;AAEA,mBAAmB,cAAc;;;AChCjC,IAAA,6BAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpExpanderStandalone/HelpExpanderStandalone.tsx","../../../src/components/HelpExpanderStandalone/index.ts"],"sourcesContent":["import type { HelpTriggerWeights } from '../HelpTriggerIcon/HelpTriggerIcon';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport HelpDetails from '../HelpDetails/HelpDetails';\nimport HelpTriggerStandalone from '../HelpTriggerStandalone';\nimport Icon from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpExpanderStandaloneProps {\n /** Sets aria-label of the trigger. */\n ariaLabel?: string;\n /** Sets aria-labelledby of the trigger. */\n ariaLabelledById?: string;\n /** Sets the text content of the help text that appears when expanded. */\n children: React.ReactNode;\n /** Expands the component */\n expanded?: boolean;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /**\n * Sets the colors of the help trigger. Default: normal.\n */\n weight?: HelpTriggerWeights;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** The text that will be displayed in the trigger. */\n triggerText: string;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst HelpExpanderStandalone: React.FC<HelpExpanderStandaloneProps> = props => {\n const {\n ariaLabel,\n ariaLabelledById,\n children,\n className,\n expanded = false,\n onExpand,\n testId,\n triggerText,\n weight = 'normal',\n ref,\n } = props;\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n\n return (\n <div className={className} data-testid={testId} data-analyticsid={AnalyticsId.HelpExpanderStandalone}>\n <HelpTriggerStandalone\n className={styles['help-expander-standalone-trigger']}\n aria-expanded={isExpanded}\n onClick={(): void => setIsExpanded(!isExpanded)}\n ref={mergeRefs([ref, refObject])}\n weight={weight}\n {...ariaLabelAttributes}\n >\n {triggerText}\n <Icon\n color={`var(--core-color-plum-${isHovered ? '900' : '700'})`}\n svgIcon={isExpanded ? ChevronUp : ChevronDown}\n size={IconSize.XXSmall}\n />\n </HelpTriggerStandalone>\n {isExpanded && <HelpDetails>{children}</HelpDetails>}\n </div>\n );\n};\n\nHelpExpanderStandalone.displayName = 'HelpExpanderStandalone';\n\nexport default HelpExpanderStandalone;\n","import HelpExpanderStandalone from './HelpExpanderStandalone';\nexport * from './HelpExpanderStandalone';\nexport default HelpExpanderStandalone;\n"],"mappings":";;;;;;;;;;;;;AA0CA,IAAM,0BAAgE,UAAS;CAC7E,MAAM,EACJ,WACA,kBACA,UACA,WACA,WAAW,OACX,UACA,QACA,aACA,SAAS,UACT,QACE;CACJ,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpExpanderStandalone/HelpExpanderStandalone.tsx","../../../src/components/HelpExpanderStandalone/index.ts"],"sourcesContent":["import type { HelpTriggerWeights } from '../HelpTriggerIcon/HelpTriggerIcon';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport HelpDetails from '../HelpDetails/HelpDetails';\nimport HelpTriggerStandalone from '../HelpTriggerStandalone';\nimport Icon from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpExpanderStandaloneProps {\n /** Sets aria-label of the trigger. */\n ariaLabel?: string;\n /** Sets aria-labelledby of the trigger. */\n ariaLabelledById?: string;\n /** Sets the text content of the help text that appears when expanded. */\n children: React.ReactNode;\n /** Expands the component */\n expanded?: boolean;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /**\n * Sets the colors of the help trigger. Default: normal.\n */\n weight?: HelpTriggerWeights;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** The text that will be displayed in the trigger. */\n triggerText: string;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst HelpExpanderStandalone: React.FC<HelpExpanderStandaloneProps> = props => {\n const {\n ariaLabel,\n ariaLabelledById,\n children,\n className,\n expanded = false,\n onExpand,\n testId,\n triggerText,\n weight = 'normal',\n ref,\n } = props;\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n\n return (\n <div className={className} data-testid={testId} data-analyticsid={AnalyticsId.HelpExpanderStandalone}>\n <HelpTriggerStandalone\n className={styles['help-expander-standalone-trigger']}\n aria-expanded={isExpanded}\n onClick={(): void => setIsExpanded(!isExpanded)}\n ref={mergeRefs([ref, refObject])}\n weight={weight}\n {...ariaLabelAttributes}\n >\n {triggerText}\n <Icon\n color={`var(--core-color-plum-${isHovered ? '900' : '700'})`}\n svgIcon={isExpanded ? ChevronUp : ChevronDown}\n size={IconSize.XXSmall}\n />\n </HelpTriggerStandalone>\n {isExpanded && <HelpDetails>{children}</HelpDetails>}\n </div>\n );\n};\n\nHelpExpanderStandalone.displayName = 'HelpExpanderStandalone';\n\nexport default HelpExpanderStandalone;\n","import HelpExpanderStandalone from './HelpExpanderStandalone';\nexport * from './HelpExpanderStandalone';\nexport default HelpExpanderStandalone;\n"],"mappings":";;;;;;;;;;;;;AA0CA,IAAM,0BAAgE,UAAS;CAC7E,MAAM,EACJ,WACA,kBACA,UACA,WACA,WAAW,OACX,UACA,QACA,aACA,SAAS,UACT,QACE;CACJ,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;CAAiB,CAAC;CAC7F,MAAM,CAAC,YAAY,iBAAiB,UAAU,UAAU,QAAQ;CAChE,MAAM,EAAE,WAAW,cAAc,iBAAoC,mBAAmB,GAAG,IAAI,MAAM,IAAI;CAEzG,OACE,qBAAC,OAAD;EAAgB;EAAW,eAAa;EAAQ,oBAAkB,YAAY;YAA9E,CACE,qBAAC,+BAAD;GACE,WAAW,OAAO;GAClB,iBAAe;GACf,eAAqB,cAAc,CAAC,UAAU;GAC9C,KAAK,UAAU,CAAC,KAAK,SAAS,CAAC;GACvB;GACR,GAAI;aANN,CAQG,aACD,oBAAC,cAAD;IACE,OAAO,yBAAyB,YAAY,QAAQ,MAAM;IAC1D,SAAS,aAAa,YAAY;IAClC,MAAM,SAAS;GAChB,CAAA,CACoB;MACtB,cAAc,oBAAC,aAAD,EAAc,SAAsB,CAAA,CAChD;;AAET;AAEA,uBAAuB,cAAc;;;AC/ErC,IAAA,iCAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpPanel/HelpPanel.tsx","../../../src/components/HelpPanel/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport HighlightPanel from '../HighlightPanel';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\nexport type HelpPanelVariants = 'normal' | 'compact';\n\nexport interface HelpPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** If set the compact styling will be used */\n variant?: HelpPanelVariants;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets title if needed */\n title?: string;\n}\n\nconst HelpPanel: React.FC<HelpPanelProps> = ({ className, variant = 'normal', testId, children, title }) => {\n return (\n <HighlightPanel\n className={classNames([styles['help-panel']], className)}\n testId={testId}\n svgIcon={HandWaving}\n title={title}\n variant={variant}\n >\n {children}\n </HighlightPanel>\n );\n};\n\nexport default HelpPanel;\n","import HelpPanel from './HelpPanel';\nexport * from './HelpPanel';\nexport default HelpPanel;\n"],"mappings":";;;;;;AAsBA,IAAM,aAAuC,EAAE,WAAW,UAAU,UAAU,QAAQ,UAAU,YAAY;CAC1G,OACE,oBAAC,wBAAD;EACE,WAAW,WAAW,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpPanel/HelpPanel.tsx","../../../src/components/HelpPanel/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport HighlightPanel from '../HighlightPanel';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\nexport type HelpPanelVariants = 'normal' | 'compact';\n\nexport interface HelpPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** If set the compact styling will be used */\n variant?: HelpPanelVariants;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets title if needed */\n title?: string;\n}\n\nconst HelpPanel: React.FC<HelpPanelProps> = ({ className, variant = 'normal', testId, children, title }) => {\n return (\n <HighlightPanel\n className={classNames([styles['help-panel']], className)}\n testId={testId}\n svgIcon={HandWaving}\n title={title}\n variant={variant}\n >\n {children}\n </HighlightPanel>\n );\n};\n\nexport default HelpPanel;\n","import HelpPanel from './HelpPanel';\nexport * from './HelpPanel';\nexport default HelpPanel;\n"],"mappings":";;;;;;AAsBA,IAAM,aAAuC,EAAE,WAAW,UAAU,UAAU,QAAQ,UAAU,YAAY;CAC1G,OACE,oBAAC,wBAAD;EACE,WAAW,WAAW,CAAC,OAAO,aAAa,GAAG,SAAS;EAC/C;EACR,SAAS;EACF;EACE;EAER;CACa,CAAA;AAEpB;;;AChCA,IAAA,oBAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTeaser/HelpTeaser.tsx","../../../src/components/HelpTeaser/index.ts"],"sourcesContent":["import type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\nimport type { InfoTeaserTags } from '../InfoTeaser';\nimport type { TitleTags } from '../Title';\n\nimport HandWaving from '../Icons/HandWaving';\nimport InfoTeaser from '../InfoTeaser';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpTeaserProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Override the default max height for collapsed teaser. Default is 12.25rem */\n collapsedMaxHeight?: string;\n /** Changes the underlying element of the wrapper */\n htmlMarkup?: InfoTeaserTags;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInfoTeaser>;\n /** Sets the data-testid attribute */\n testId?: string;\n /** Title on top of the component */\n title: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\nconst HelpTeaser: React.FC<HelpTeaserProps> = props => {\n const { children, htmlMarkup, resources, testId, title, titleHtmlMarkup, collapsedMaxHeight } = props;\n return (\n <InfoTeaser\n testId={testId}\n htmlMarkup={htmlMarkup}\n className={styles.helpteaser}\n title={title}\n titleHtmlMarkup={titleHtmlMarkup}\n resources={resources}\n svgIcon={HandWaving}\n buttonClassName={styles['helpteaser__button']}\n collapsedMaxHeight={collapsedMaxHeight}\n >\n {children}\n </InfoTeaser>\n );\n};\n\nexport default HelpTeaser;\n","import HelpTeaser from './HelpTeaser';\nexport * from './HelpTeaser';\nexport default HelpTeaser;\n"],"mappings":";;;;;AA0BA,IAAM,cAAwC,UAAS;CACrD,MAAM,EAAE,UAAU,YAAY,WAAW,QAAQ,OAAO,iBAAiB,uBAAuB;CAChG,OACE,oBAAC,oBAAD;EACU;EACI;EACZ,WAAW,OAAO;EACX;EACU;EACN;EACX,SAAS;EACT,iBAAiB,OAAO;EACJ;EAEnB;
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTeaser/HelpTeaser.tsx","../../../src/components/HelpTeaser/index.ts"],"sourcesContent":["import type { HNDesignsystemInfoTeaser } from '../../resources/Resources';\nimport type { InfoTeaserTags } from '../InfoTeaser';\nimport type { TitleTags } from '../Title';\n\nimport HandWaving from '../Icons/HandWaving';\nimport InfoTeaser from '../InfoTeaser';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpTeaserProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Override the default max height for collapsed teaser. Default is 12.25rem */\n collapsedMaxHeight?: string;\n /** Changes the underlying element of the wrapper */\n htmlMarkup?: InfoTeaserTags;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInfoTeaser>;\n /** Sets the data-testid attribute */\n testId?: string;\n /** Title on top of the component */\n title: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\nconst HelpTeaser: React.FC<HelpTeaserProps> = props => {\n const { children, htmlMarkup, resources, testId, title, titleHtmlMarkup, collapsedMaxHeight } = props;\n return (\n <InfoTeaser\n testId={testId}\n htmlMarkup={htmlMarkup}\n className={styles.helpteaser}\n title={title}\n titleHtmlMarkup={titleHtmlMarkup}\n resources={resources}\n svgIcon={HandWaving}\n buttonClassName={styles['helpteaser__button']}\n collapsedMaxHeight={collapsedMaxHeight}\n >\n {children}\n </InfoTeaser>\n );\n};\n\nexport default HelpTeaser;\n","import HelpTeaser from './HelpTeaser';\nexport * from './HelpTeaser';\nexport default HelpTeaser;\n"],"mappings":";;;;;AA0BA,IAAM,cAAwC,UAAS;CACrD,MAAM,EAAE,UAAU,YAAY,WAAW,QAAQ,OAAO,iBAAiB,uBAAuB;CAChG,OACE,oBAAC,oBAAD;EACU;EACI;EACZ,WAAW,OAAO;EACX;EACU;EACN;EACX,SAAS;EACT,iBAAiB,OAAO;EACJ;EAEnB;CACS,CAAA;AAEhB;;;ACzCA,IAAA,qBAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTooltip/HelpTooltip.tsx","../../../src/components/HelpTooltip/index.ts"],"sourcesContent":["import { useState, useRef, useId } from 'react';\n\nimport { useFloating, useHover, useFocus, useDismiss, useInteractions, FloatingDelayGroup } from '@floating-ui/react';\n\nimport DictionaryTrigger from '../DictionaryTrigger';\nimport PopOver from '../PopOver';\n\nexport interface HelpTooltipProps {\n /** Ordet som skal ha en tilhørende tooltip. Det skal bare sendes inn string som children. Er satt til ReactNode for å kunne brukes i CMSet. */\n children: React.ReactNode;\n /** Teksten som skal vises i boblen som åpnes */\n description: React.ReactNode;\n /** Valgfri test-id */\n testId?: string;\n}\n\nexport const HelpTooltip: React.FC<HelpTooltipProps> = ({ children, description, testId }) => {\n const popoverId = useId();\n const [showTooltip, setShowTooltip] = useState(false);\n\n const wordRef = useRef<HTMLButtonElement>(null);\n const { refs, context } = useFloating({\n open: showTooltip,\n elements: {\n reference: wordRef.current,\n },\n onOpenChange: setShowTooltip,\n });\n\n const hover = useHover(context, { move: false });\n const focus = useFocus(context);\n const dismiss = useDismiss(context);\n\n const { getReferenceProps } = useInteractions([hover, focus, dismiss]);\n\n return (\n <>\n <DictionaryTrigger ref={wordRef} {...getReferenceProps()} selected={showTooltip} aria-describedby={popoverId} data-testid={testId}>\n {children}\n </DictionaryTrigger>\n <PopOver role=\"tooltip\" ref={refs.setFloating} id={popoverId} show={showTooltip} testId={testId} controllerRef={wordRef}>\n {description}\n </PopOver>\n </>\n );\n};\n\nexport const HelpTooltipDelayGroup = FloatingDelayGroup;\n\nexport default HelpTooltip;\n","import HelpTooltip from './HelpTooltip';\nexport * from './HelpTooltip';\nexport default HelpTooltip;\n"],"mappings":";;;;;;AAgBA,IAAa,eAA2C,EAAE,UAAU,aAAa,aAAa;CAC5F,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTooltip/HelpTooltip.tsx","../../../src/components/HelpTooltip/index.ts"],"sourcesContent":["import { useState, useRef, useId } from 'react';\n\nimport { useFloating, useHover, useFocus, useDismiss, useInteractions, FloatingDelayGroup } from '@floating-ui/react';\n\nimport DictionaryTrigger from '../DictionaryTrigger';\nimport PopOver from '../PopOver';\n\nexport interface HelpTooltipProps {\n /** Ordet som skal ha en tilhørende tooltip. Det skal bare sendes inn string som children. Er satt til ReactNode for å kunne brukes i CMSet. */\n children: React.ReactNode;\n /** Teksten som skal vises i boblen som åpnes */\n description: React.ReactNode;\n /** Valgfri test-id */\n testId?: string;\n}\n\nexport const HelpTooltip: React.FC<HelpTooltipProps> = ({ children, description, testId }) => {\n const popoverId = useId();\n const [showTooltip, setShowTooltip] = useState(false);\n\n const wordRef = useRef<HTMLButtonElement>(null);\n const { refs, context } = useFloating({\n open: showTooltip,\n elements: {\n reference: wordRef.current,\n },\n onOpenChange: setShowTooltip,\n });\n\n const hover = useHover(context, { move: false });\n const focus = useFocus(context);\n const dismiss = useDismiss(context);\n\n const { getReferenceProps } = useInteractions([hover, focus, dismiss]);\n\n return (\n <>\n <DictionaryTrigger ref={wordRef} {...getReferenceProps()} selected={showTooltip} aria-describedby={popoverId} data-testid={testId}>\n {children}\n </DictionaryTrigger>\n <PopOver role=\"tooltip\" ref={refs.setFloating} id={popoverId} show={showTooltip} testId={testId} controllerRef={wordRef}>\n {description}\n </PopOver>\n </>\n );\n};\n\nexport const HelpTooltipDelayGroup = FloatingDelayGroup;\n\nexport default HelpTooltip;\n","import HelpTooltip from './HelpTooltip';\nexport * from './HelpTooltip';\nexport default HelpTooltip;\n"],"mappings":";;;;;;AAgBA,IAAa,eAA2C,EAAE,UAAU,aAAa,aAAa;CAC5F,MAAM,YAAY,MAAM;CACxB,MAAM,CAAC,aAAa,kBAAkB,SAAS,KAAK;CAEpD,MAAM,UAAU,OAA0B,IAAI;CAC9C,MAAM,EAAE,MAAM,YAAY,YAAY;EACpC,MAAM;EACN,UAAU,EACR,WAAW,QAAQ,QACrB;EACA,cAAc;CAChB,CAAC;CAMD,MAAM,EAAE,sBAAsB,gBAAgB;EAJhC,SAAS,SAAS,EAAE,MAAM,MAAM,CAIC;EAHjC,SAAS,OAG+B;EAFtC,WAAW,OAEkC;CAAO,CAAC;CAErE,OACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,2BAAD;EAAmB,KAAK;EAAS,GAAI,kBAAkB;EAAG,UAAU;EAAa,oBAAkB;EAAW,eAAa;EACxH;CACgB,CAAA,GACnB,oBAAC,iBAAD;EAAS,MAAK;EAAU,KAAK,KAAK;EAAa,IAAI;EAAW,MAAM;EAAqB;EAAQ,eAAe;YAC7G;CACM,CAAA,CACT,EAAA,CAAA;AAEN;AAEA,IAAa,wBAAwB;;;AC7CrC,IAAA,sBAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTriggerInline/HelpTriggerInline.tsx","../../../src/components/HelpTriggerInline/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { HelpTriggerWeights } from '../HelpTriggerIcon';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { HelpTriggerIconInternal } from '../HelpTriggerIcon';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpTriggerInlineProps extends Pick<\n React.InputHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'aria-haspopup' | 'aria-controls' | 'aria-expanded'\n> {\n /**\n * Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /** Sets the text content of the HelpTriggerInline. */\n children: string;\n /**\n * Sets the colors of the help trigger. Default: normal.\n */\n weight?: HelpTriggerWeights;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Optional test id.\n */\n testId?: string;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst HelpTriggerInline: React.FC<HelpTriggerInlineProps> = props => {\n const { ariaLabel, ariaLabelledById, children, className, testId, weight = 'normal', ref, ...rest } = props;\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n const helpTriggerInlineStyles = classNames(styles['help-trigger-inline'], className);\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n\n return (\n <button\n aria-label={ariaLabel}\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.HelpTriggerInline}\n className={helpTriggerInlineStyles}\n ref={mergeRefs([refObject, ref])}\n {...ariaLabelAttributes}\n {...rest}\n >\n <span className={styles['help-trigger-inline__text']}>{children}</span>\n <HelpTriggerIconInternal weight={weight} size={'inherit'} htmlMarkup={'span'} isHovered={isHovered} />\n </button>\n );\n};\n\nHelpTriggerInline.displayName = 'HelpTriggerInline';\n\nexport default HelpTriggerInline;\n","import HelpTriggerInline from './HelpTriggerInline';\nexport * from './HelpTriggerInline';\nexport default HelpTriggerInline;\n"],"mappings":";;;;;;;;;AA0CA,IAAM,qBAAsD,UAAS;CACnE,MAAM,EAAE,WAAW,kBAAkB,UAAU,WAAW,QAAQ,SAAS,UAAU,KAAK,GAAG,SAAS;CACtG,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/HelpTriggerInline/HelpTriggerInline.tsx","../../../src/components/HelpTriggerInline/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { HelpTriggerWeights } from '../HelpTriggerIcon';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { HelpTriggerIconInternal } from '../HelpTriggerIcon';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpTriggerInlineProps extends Pick<\n React.InputHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'aria-haspopup' | 'aria-controls' | 'aria-expanded'\n> {\n /**\n * Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /** Sets the text content of the HelpTriggerInline. */\n children: string;\n /**\n * Sets the colors of the help trigger. Default: normal.\n */\n weight?: HelpTriggerWeights;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Optional test id.\n */\n testId?: string;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst HelpTriggerInline: React.FC<HelpTriggerInlineProps> = props => {\n const { ariaLabel, ariaLabelledById, children, className, testId, weight = 'normal', ref, ...rest } = props;\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n const helpTriggerInlineStyles = classNames(styles['help-trigger-inline'], className);\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n\n return (\n <button\n aria-label={ariaLabel}\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.HelpTriggerInline}\n className={helpTriggerInlineStyles}\n ref={mergeRefs([refObject, ref])}\n {...ariaLabelAttributes}\n {...rest}\n >\n <span className={styles['help-trigger-inline__text']}>{children}</span>\n <HelpTriggerIconInternal weight={weight} size={'inherit'} htmlMarkup={'span'} isHovered={isHovered} />\n </button>\n );\n};\n\nHelpTriggerInline.displayName = 'HelpTriggerInline';\n\nexport default HelpTriggerInline;\n","import HelpTriggerInline from './HelpTriggerInline';\nexport * from './HelpTriggerInline';\nexport default HelpTriggerInline;\n"],"mappings":";;;;;;;;;AA0CA,IAAM,qBAAsD,UAAS;CACnE,MAAM,EAAE,WAAW,kBAAkB,UAAU,WAAW,QAAQ,SAAS,UAAU,KAAK,GAAG,SAAS;CACtG,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;CAAiB,CAAC;CAC7F,MAAM,0BAA0B,WAAW,OAAO,wBAAwB,SAAS;CACnF,MAAM,EAAE,WAAW,cAAc,iBAAoC,mBAAmB,GAAG,IAAI,MAAM,IAAI;CAEzG,OACE,qBAAC,UAAD;EACE,cAAY;EACZ,MAAK;EACL,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,KAAK,UAAU,CAAC,WAAW,GAAG,CAAC;EAC/B,GAAI;EACJ,GAAI;YARN,CAUE,oBAAC,QAAD;GAAM,WAAW,OAAO;GAA+B;EAAe,CAAA,GACtE,oBAAC,yBAAD;GAAiC;GAAQ,MAAM;GAAW,YAAY;GAAmB;EAAY,CAAA,CAC/F;;AAEZ;AAEA,kBAAkB,cAAc;;;AC/DhC,IAAA,4BAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveMonitoring.js","names":[],"sources":["../../../src/components/Icons/ActiveMonitoring.tsx"],"sourcesContent":["import type { SvgPathProps } from '../Icon';\n\nconst ActiveMonitoring: React.FC<SvgPathProps> = ({ isHovered }: SvgPathProps): React.ReactElement => {\n const normal = (\n <path\n fillRule={'evenodd'}\n d=\"M30.3 36.201h1v-3.288h3.288v-1H31.3v-3.288h-1v3.288h-3.288v1H30.3v3.288zm9.84 3.896l-3.31-3.31a7.472 7.472 0 01-1.432 1.486l3.282 3.283a1.033 1.033 0 001.46-1.459zm-10.11 1.761v-2.026a7.394 7.394 0 01-3.224-1.13v3.156h3.224zm-21.272 0h3.224v-6.947h.9v6.947h13.024v-3.83a7.438 7.438 0 01-2.564-5.615 7.45 7.45 0 013.141-6.07 8.865 8.865 0 00-2.564-1.334c-2.797 1.392-6.253 1.392-9.05 0-3.61 1.163-6.11 4.576-6.11 8.388v8.461zM30.8 26.255a6.164 6.164 0 00-6.158 6.158 6.165 6.165 0 006.158 6.158 6.165 6.165 0 006.158-6.158 6.164 6.164 0 00-6.158-6.158zm10.26 16.22a2.323 2.323 0 01-1.65.682 2.327 2.327 0 01-1.649-.68l-3.474-3.475a7.441 7.441 0 01-2.957.844v3.313H7.458v-9.762c0-4.472 3-8.467 7.293-9.712l.253-.074.233.125c2.544 1.356 5.77 1.356 8.313 0l.234-.125.253.074a10.164 10.164 0 013.651 1.958c.948-.438 2-.689 3.112-.689 4.113 0 7.458 3.347 7.458 7.46a7.395 7.395 0 01-.742 3.221l3.543 3.543c.908.91.908 2.388 0 3.297zm-30.304-28.17c0 .437.356.794.795.794h.262v-1.59h-.262a.796.796 0 00-.795.795zm2.357-2.082v.285h.728c1.67 0 3.03-1.36 3.03-3.03V9.21h1v.213c0 1.7 1.384 3.084 3.084 3.084h4.72v-.285a6.09 6.09 0 00-6.082-6.082h-.398a6.09 6.09 0 00-6.082 6.082zm13.862 1.285V15.1h.262a.797.797 0 00.796-.795.797.797 0 00-.796-.796h-.262zm-1.3 2.02v-2.02h-4.72a4.087 4.087 0 01-3.573-2.108 4.033 4.033 0 01-3.54 2.108h-.729v2.02a6.09 6.09 0 006.082 6.081h.398a6.088 6.088 0 006.082-6.082zM9.756 14.303c0-.99.805-1.796 1.795-1.796h.262v-.285c0-4.07 3.311-7.382 7.382-7.382h.398c4.071 0 7.382 3.312 7.382 7.382v.285h.262c.99 0 1.796.805 1.796 1.796 0 .99-.806 1.795-1.796 1.795h-.29c-.294 3.803-3.477 6.811-7.354 6.811h-.398c-3.877 0-7.06-3.008-7.353-6.81h-.29c-.99 0-1.796-.806-1.796-1.796zm12.32 1.024a.503.503 0 10.001 1.007.503.503 0 000-1.007zm-4.79.503a.502.502 0 11-1.005 0 .502.502 0 011.004 0z\"\n />\n );\n\n const normalHover = (\n <path\n fillRule={'evenodd'}\n d=\"M22.579 15.831a.502.502 0 11-1.005 0 .502.502 0 011.005 0zm-5.293 0a.503.503 0 11-1.007-.002.503.503 0 011.007.002zM30.3 32.913h-4.416v-1H30.3v-4.416h1v4.416h4.415v1H31.3v4.416h-1v-4.416zm9.84 8.644a1.034 1.034 0 01-1.46 0l-2.416-2.416a8.765 8.765 0 001.43-1.489l2.445 2.445c.402.403.402 1.057 0 1.46zm-13.334.301v-1.755a8.58 8.58 0 003.224.944v.811h-3.224zm-18.05-8.46c0-3.813 2.5-7.226 6.113-8.389 2.796 1.392 6.252 1.392 9.049 0 .509.164.993.39 1.463.643a8.655 8.655 0 00-3.254 6.761 8.666 8.666 0 003.778 7.153v2.292H12.883v-6.947h-.901v6.947H8.758v-8.46zm29.416-.985c0 4.065-3.307 7.372-7.372 7.372-4.066 0-7.373-3.307-7.373-7.372 0-4.065 3.307-7.372 7.373-7.372 4.065 0 7.372 3.307 7.372 7.372zm2.886 6.765l-2.634-2.635a8.623 8.623 0 001.048-4.13c0-4.782-3.891-8.673-8.672-8.673a8.6 8.6 0 00-4.221 1.104 10.086 10.086 0 00-2.542-1.159l-.254-.074-.233.125c-2.544 1.356-5.77 1.356-8.313 0l-.233-.125-.254.074c-4.294 1.246-7.293 5.24-7.293 9.712v9.762H31.33v-2.1a8.61 8.61 0 003.844-1.169l2.587 2.587c.455.454 1.05.68 1.649.68a2.32 2.32 0 001.648-.68 2.335 2.335 0 000-3.299zm-29.507-25.67h.26V15.1h-.26a.797.797 0 010-1.592zm7.644-7.366h.397a6.09 6.09 0 016.083 6.082v.284h-4.721a3.088 3.088 0 01-3.084-3.084v-.213h-1v.266a3.034 3.034 0 01-3.03 3.031h-.728v-.284a6.09 6.09 0 016.083-6.082zm8.04 7.366a.797.797 0 010 1.592h-.261v-1.592h.262zm-7.643 8.101h-.397a6.09 6.09 0 01-6.083-6.082v-2.019h.728a4.033 4.033 0 003.54-2.108 4.088 4.088 0 003.574 2.108h4.72v2.02a6.09 6.09 0 01-6.082 6.081zM11.552 16.1h.29c.294 3.802 3.476 6.81 7.354 6.81h.397c3.878 0 7.06-3.008 7.354-6.81h.29c.99 0 1.796-.806 1.796-1.796s-.806-1.796-1.796-1.796h-.262v-.284c0-4.07-3.311-7.383-7.382-7.383h-.397c-4.071 0-7.383 3.312-7.383 7.383v.284h-.261a1.797 1.797 0 000 3.592z\"\n />\n );\n\n return isHovered ? normalHover : normal;\n};\n\nexport default ActiveMonitoring;\n"],"mappings":";;AAEA,IAAM,oBAA4C,EAAE,gBAAkD;CAepG,OAAO,YANL,oBAAC,QAAD;EACE,UAAU;EACV,GAAE;
|
|
1
|
+
{"version":3,"file":"ActiveMonitoring.js","names":[],"sources":["../../../src/components/Icons/ActiveMonitoring.tsx"],"sourcesContent":["import type { SvgPathProps } from '../Icon';\n\nconst ActiveMonitoring: React.FC<SvgPathProps> = ({ isHovered }: SvgPathProps): React.ReactElement => {\n const normal = (\n <path\n fillRule={'evenodd'}\n d=\"M30.3 36.201h1v-3.288h3.288v-1H31.3v-3.288h-1v3.288h-3.288v1H30.3v3.288zm9.84 3.896l-3.31-3.31a7.472 7.472 0 01-1.432 1.486l3.282 3.283a1.033 1.033 0 001.46-1.459zm-10.11 1.761v-2.026a7.394 7.394 0 01-3.224-1.13v3.156h3.224zm-21.272 0h3.224v-6.947h.9v6.947h13.024v-3.83a7.438 7.438 0 01-2.564-5.615 7.45 7.45 0 013.141-6.07 8.865 8.865 0 00-2.564-1.334c-2.797 1.392-6.253 1.392-9.05 0-3.61 1.163-6.11 4.576-6.11 8.388v8.461zM30.8 26.255a6.164 6.164 0 00-6.158 6.158 6.165 6.165 0 006.158 6.158 6.165 6.165 0 006.158-6.158 6.164 6.164 0 00-6.158-6.158zm10.26 16.22a2.323 2.323 0 01-1.65.682 2.327 2.327 0 01-1.649-.68l-3.474-3.475a7.441 7.441 0 01-2.957.844v3.313H7.458v-9.762c0-4.472 3-8.467 7.293-9.712l.253-.074.233.125c2.544 1.356 5.77 1.356 8.313 0l.234-.125.253.074a10.164 10.164 0 013.651 1.958c.948-.438 2-.689 3.112-.689 4.113 0 7.458 3.347 7.458 7.46a7.395 7.395 0 01-.742 3.221l3.543 3.543c.908.91.908 2.388 0 3.297zm-30.304-28.17c0 .437.356.794.795.794h.262v-1.59h-.262a.796.796 0 00-.795.795zm2.357-2.082v.285h.728c1.67 0 3.03-1.36 3.03-3.03V9.21h1v.213c0 1.7 1.384 3.084 3.084 3.084h4.72v-.285a6.09 6.09 0 00-6.082-6.082h-.398a6.09 6.09 0 00-6.082 6.082zm13.862 1.285V15.1h.262a.797.797 0 00.796-.795.797.797 0 00-.796-.796h-.262zm-1.3 2.02v-2.02h-4.72a4.087 4.087 0 01-3.573-2.108 4.033 4.033 0 01-3.54 2.108h-.729v2.02a6.09 6.09 0 006.082 6.081h.398a6.088 6.088 0 006.082-6.082zM9.756 14.303c0-.99.805-1.796 1.795-1.796h.262v-.285c0-4.07 3.311-7.382 7.382-7.382h.398c4.071 0 7.382 3.312 7.382 7.382v.285h.262c.99 0 1.796.805 1.796 1.796 0 .99-.806 1.795-1.796 1.795h-.29c-.294 3.803-3.477 6.811-7.354 6.811h-.398c-3.877 0-7.06-3.008-7.353-6.81h-.29c-.99 0-1.796-.806-1.796-1.796zm12.32 1.024a.503.503 0 10.001 1.007.503.503 0 000-1.007zm-4.79.503a.502.502 0 11-1.005 0 .502.502 0 011.004 0z\"\n />\n );\n\n const normalHover = (\n <path\n fillRule={'evenodd'}\n d=\"M22.579 15.831a.502.502 0 11-1.005 0 .502.502 0 011.005 0zm-5.293 0a.503.503 0 11-1.007-.002.503.503 0 011.007.002zM30.3 32.913h-4.416v-1H30.3v-4.416h1v4.416h4.415v1H31.3v4.416h-1v-4.416zm9.84 8.644a1.034 1.034 0 01-1.46 0l-2.416-2.416a8.765 8.765 0 001.43-1.489l2.445 2.445c.402.403.402 1.057 0 1.46zm-13.334.301v-1.755a8.58 8.58 0 003.224.944v.811h-3.224zm-18.05-8.46c0-3.813 2.5-7.226 6.113-8.389 2.796 1.392 6.252 1.392 9.049 0 .509.164.993.39 1.463.643a8.655 8.655 0 00-3.254 6.761 8.666 8.666 0 003.778 7.153v2.292H12.883v-6.947h-.901v6.947H8.758v-8.46zm29.416-.985c0 4.065-3.307 7.372-7.372 7.372-4.066 0-7.373-3.307-7.373-7.372 0-4.065 3.307-7.372 7.373-7.372 4.065 0 7.372 3.307 7.372 7.372zm2.886 6.765l-2.634-2.635a8.623 8.623 0 001.048-4.13c0-4.782-3.891-8.673-8.672-8.673a8.6 8.6 0 00-4.221 1.104 10.086 10.086 0 00-2.542-1.159l-.254-.074-.233.125c-2.544 1.356-5.77 1.356-8.313 0l-.233-.125-.254.074c-4.294 1.246-7.293 5.24-7.293 9.712v9.762H31.33v-2.1a8.61 8.61 0 003.844-1.169l2.587 2.587c.455.454 1.05.68 1.649.68a2.32 2.32 0 001.648-.68 2.335 2.335 0 000-3.299zm-29.507-25.67h.26V15.1h-.26a.797.797 0 010-1.592zm7.644-7.366h.397a6.09 6.09 0 016.083 6.082v.284h-4.721a3.088 3.088 0 01-3.084-3.084v-.213h-1v.266a3.034 3.034 0 01-3.03 3.031h-.728v-.284a6.09 6.09 0 016.083-6.082zm8.04 7.366a.797.797 0 010 1.592h-.261v-1.592h.262zm-7.643 8.101h-.397a6.09 6.09 0 01-6.083-6.082v-2.019h.728a4.033 4.033 0 003.54-2.108 4.088 4.088 0 003.574 2.108h4.72v2.02a6.09 6.09 0 01-6.082 6.081zM11.552 16.1h.29c.294 3.802 3.476 6.81 7.354 6.81h.397c3.878 0 7.06-3.008 7.354-6.81h.29c.99 0 1.796-.806 1.796-1.796s-.806-1.796-1.796-1.796h-.262v-.284c0-4.07-3.311-7.383-7.382-7.383h-.397c-4.071 0-7.383 3.312-7.383 7.383v.284h-.261a1.797 1.797 0 000 3.592z\"\n />\n );\n\n return isHovered ? normalHover : normal;\n};\n\nexport default ActiveMonitoring;\n"],"mappings":";;AAEA,IAAM,oBAA4C,EAAE,gBAAkD;CAepG,OAAO,YANL,oBAAC,QAAD;EACE,UAAU;EACV,GAAE;CACH,CAGgB,IAbjB,oBAAC,QAAD;EACE,UAAU;EACV,GAAE;CACH,CAU8B;AACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AcupunctureBack.js","names":[],"sources":["../../../src/components/Icons/AcupunctureBack.tsx"],"sourcesContent":["import type { SvgPathProps } from '../Icon';\n\nimport { IconSize } from '../Icon';\nimport { getIcon } from '../Icon/utils';\n\nconst AcupunctureBack: React.FC<SvgPathProps> = ({ isHovered }: SvgPathProps): React.JSX.Element => {\n const normal = (\n <path\n d=\"m27.102 20.225-.65-.035-.648-.038c-.076 1.296.525 4.04 3.344 5.14l.473-1.212c-2.631-1.027-2.525-3.74-2.52-3.855Zm-9.046.062c.018.123.419 3.035-1.931 4.197l.576 1.166c3.21-1.589 2.665-5.398 2.64-5.559l-1.285.196Zm5.187-6.273-1.292-.143c-.032.285-.765 7.027.006 11.311.798 4.434.75 6.08.706 7.67-.012.39-.022.778-.022 1.203 0 2.117-.53 4.801-.535 4.827l1.275.254c.023-.114.559-2.834.559-5.08 0-.412.01-.789.022-1.167.047-1.657.096-3.37-.726-7.937-.737-4.097-.001-10.87.007-10.938Zm9.796 17.308c-.714-3.144 1.866-11.586 1.892-11.67l-1.242-.384c-.111.36-2.71 8.861-1.918 12.342.249 1.094.602 2.195.976 3.36.786 2.451 1.599 4.986 1.568 7.842l1.3.014c.032-3.067-.851-5.822-1.631-8.253-.364-1.137-.71-2.21-.945-3.25Zm5.792 3.227a12.168 12.168 0 0 1-.208-4.413c.642-4.714 1.623-12.97.973-15.302-1.144-4.102-3.798-4.643-6.364-5.166-.866-.176-1.761-.359-2.623-.677-2.974-1.1-2.816-3.649-2.807-3.757l-.648-.053-.648-.057c-.11 1.251.51 3.924 3.652 5.085.955.354 1.9.546 2.815.733 2.48.506 4.44.905 5.37 4.242.424 1.516.046 7.04-1.01 14.776a13.492 13.492 0 0 0 .243 4.923l2.435 8.122 1.245-.373-2.425-8.083Zm-26.295-2.113.36.626c.033-.092.064-.183.094-.273.362-1.064.674-1.983.757-2.462.127-.736-.48-3.117-1.211-5.528v7.637Zm-.038-11.928c.479 1.356 2.847 8.213 2.53 10.041-.101.58-.413 1.496-.807 2.658-.861 2.54-2.163 6.373-2.216 9.622l-1.3-.02c.007-.442.042-.893.087-1.346-1.263-1.264-2.512-2.77-3.715-4.5a10.752 10.752 0 0 1-1.928-5.84c-.087-3.004.227-7.25.457-10.348.12-1.62.224-3.02.238-3.788.07-3.992 2.909-6.589 8.436-7.719 3.426-.7 3.07-3.977 3.053-4.115l1.29-.157c.194 1.59-.412 4.795-4.083 5.545-4.917 1.005-7.337 3.122-7.396 6.47-.015.804-.115 2.152-.241 3.86-.228 3.071-.54 7.277-.454 10.214a9.456 9.456 0 0 0 1.695 5.135 33.597 33.597 0 0 0 2.875 3.61c.318-1.785.832-3.566 1.33-5.117l-1.026-1.778a.651.651 0 0 1-.087-.325V20.724c0-.316.228-.587.54-.64a.646.646 0 0 1 .722.424Zm7.633 16.87a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm4.797 0a.65.65 0 1 0 .703 1.093.65.65 0 0 0-.703-1.093Zm-4.476-2.512a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm7.067 0a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm0-2.727a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm2.2 0a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm-13.68 0a.65.65 0 1 0 .703 1.092.65.65 0 0 0-.703-1.092Zm2.2 2.727a.65.65 0 1 0 .703 1.092.65.65 0 0 0-.703-1.092Zm0-2.727a.65.65 0 1 0 .703 1.092.65.65 0 0 0-.703-1.092Zm2.213.06a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm4.806 2.667a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm.96-2.533a.65.65 0 1 1-1.092.704.65.65 0 0 1 1.092-.704Z\"\n fillRule=\"evenodd\"\n />\n );\n\n const normalHover = (\n <path\n d=\"m27.102 20.225-.649-.035-.649-.038c-.076 1.296.525 4.04 3.344 5.14l.473-1.212c-2.63-1.027-2.525-3.74-2.519-3.855Zm-9.046.062c.018.124.42 3.035-1.932 4.197l.577 1.166c3.21-1.589 2.665-5.398 2.64-5.559l-1.285.196Zm5.186-6.273-1.292-.143c-.032.285-.764 7.027.006 11.311.798 4.434.751 6.08.706 7.67-.01.39-.022.778-.022 1.203 0 2.117-.529 4.801-.535 4.827l1.276.254c.022-.114.56-2.834.56-5.08 0-.412.01-.789.02-1.167.048-1.657.097-3.37-.725-7.937-.737-4.097 0-10.87.006-10.938Zm9.797 17.308c-.715-3.144 1.866-11.586 1.892-11.67l-1.243-.384c-.11.36-2.708 8.861-1.917 12.343.248 1.093.602 2.193.975 3.357.786 2.452 1.6 4.987 1.57 7.844l1.3.014c.031-3.067-.853-5.823-1.633-8.254-.364-1.137-.708-2.21-.944-3.25Zm5.792 3.227a12.149 12.149 0 0 1-.208-4.413c.784-5.76 1.59-13.089.973-15.302-1.144-4.102-3.798-4.643-6.364-5.166-.866-.176-1.762-.359-2.624-.677-2.973-1.1-2.815-3.649-2.807-3.757l-.648-.053-.647-.057c-.11 1.251.511 3.924 3.652 5.085.955.354 1.9.546 2.814.733 2.481.506 4.441.905 5.372 4.242.422 1.514.045 7.038-1.01 14.776a13.495 13.495 0 0 0 .241 4.923l2.436 8.122 1.245-.373-2.425-8.083Zm-26.296-2.113.362.626.093-.273c.361-1.064.673-1.983.756-2.462.128-.736-.478-3.117-1.21-5.528v7.637Zm-.037-11.928c.478 1.356 2.847 8.213 2.53 10.041-.102.58-.413 1.496-.807 2.658-.862 2.54-2.163 6.373-2.217 9.622l-1.299-.02c.007-.442.041-.893.087-1.346-1.263-1.264-2.513-2.77-3.715-4.5a10.747 10.747 0 0 1-1.928-5.84c-.088-3.004.227-7.25.457-10.35.12-1.619.224-3.018.237-3.786.072-3.992 2.91-6.589 8.436-7.719 3.427-.7 3.071-3.977 3.054-4.115l1.291-.157c.192 1.59-.414 4.795-4.085 5.545-4.917 1.006-7.336 3.122-7.396 6.47-.014.804-.114 2.152-.24 3.858-.228 3.072-.54 7.28-.454 10.216a9.448 9.448 0 0 0 1.695 5.135 33.474 33.474 0 0 0 2.875 3.61c.318-1.785.831-3.566 1.33-5.117l-1.027-1.778a.651.651 0 0 1-.087-.325V20.724a.651.651 0 0 1 1.263-.216Zm7.633 17.67a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm4.796 0a.65.65 0 1 0 .704 1.092.65.65 0 0 0-.704-1.092Zm-4.476-3.312a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm7.068 0a.649.649 0 1 0 .704 1.092.65.65 0 1 0-.704-1.092Zm0-3.327a.649.649 0 1 0 .704 1.092.65.65 0 1 0-.704-1.092Zm2.2 0a.649.649 0 1 0 .704 1.092.65.65 0 1 0-.704-1.092Zm-13.68 0a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm2.2 3.327a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm0-3.327a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm2.212.06a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm4.807 3.267a.65.65 0 1 0 .703 1.093.65.65 0 0 0-.703-1.093Zm.96-3.133a.649.649 0 1 1-1.093.704.649.649 0 1 1 1.092-.704Z\"\n fillRule=\"evenodd\"\n />\n );\n\n return getIcon({ size: IconSize.Medium, isHovered, normal, normalHover });\n};\n\nexport default AcupunctureBack;\n"],"mappings":";;;;AAKA,IAAM,mBAA2C,EAAE,gBAAiD;CAClG,MAAM,SACJ,oBAAC,QAAD;EACE,GAAE;EACF,UAAS;
|
|
1
|
+
{"version":3,"file":"AcupunctureBack.js","names":[],"sources":["../../../src/components/Icons/AcupunctureBack.tsx"],"sourcesContent":["import type { SvgPathProps } from '../Icon';\n\nimport { IconSize } from '../Icon';\nimport { getIcon } from '../Icon/utils';\n\nconst AcupunctureBack: React.FC<SvgPathProps> = ({ isHovered }: SvgPathProps): React.JSX.Element => {\n const normal = (\n <path\n d=\"m27.102 20.225-.65-.035-.648-.038c-.076 1.296.525 4.04 3.344 5.14l.473-1.212c-2.631-1.027-2.525-3.74-2.52-3.855Zm-9.046.062c.018.123.419 3.035-1.931 4.197l.576 1.166c3.21-1.589 2.665-5.398 2.64-5.559l-1.285.196Zm5.187-6.273-1.292-.143c-.032.285-.765 7.027.006 11.311.798 4.434.75 6.08.706 7.67-.012.39-.022.778-.022 1.203 0 2.117-.53 4.801-.535 4.827l1.275.254c.023-.114.559-2.834.559-5.08 0-.412.01-.789.022-1.167.047-1.657.096-3.37-.726-7.937-.737-4.097-.001-10.87.007-10.938Zm9.796 17.308c-.714-3.144 1.866-11.586 1.892-11.67l-1.242-.384c-.111.36-2.71 8.861-1.918 12.342.249 1.094.602 2.195.976 3.36.786 2.451 1.599 4.986 1.568 7.842l1.3.014c.032-3.067-.851-5.822-1.631-8.253-.364-1.137-.71-2.21-.945-3.25Zm5.792 3.227a12.168 12.168 0 0 1-.208-4.413c.642-4.714 1.623-12.97.973-15.302-1.144-4.102-3.798-4.643-6.364-5.166-.866-.176-1.761-.359-2.623-.677-2.974-1.1-2.816-3.649-2.807-3.757l-.648-.053-.648-.057c-.11 1.251.51 3.924 3.652 5.085.955.354 1.9.546 2.815.733 2.48.506 4.44.905 5.37 4.242.424 1.516.046 7.04-1.01 14.776a13.492 13.492 0 0 0 .243 4.923l2.435 8.122 1.245-.373-2.425-8.083Zm-26.295-2.113.36.626c.033-.092.064-.183.094-.273.362-1.064.674-1.983.757-2.462.127-.736-.48-3.117-1.211-5.528v7.637Zm-.038-11.928c.479 1.356 2.847 8.213 2.53 10.041-.101.58-.413 1.496-.807 2.658-.861 2.54-2.163 6.373-2.216 9.622l-1.3-.02c.007-.442.042-.893.087-1.346-1.263-1.264-2.512-2.77-3.715-4.5a10.752 10.752 0 0 1-1.928-5.84c-.087-3.004.227-7.25.457-10.348.12-1.62.224-3.02.238-3.788.07-3.992 2.909-6.589 8.436-7.719 3.426-.7 3.07-3.977 3.053-4.115l1.29-.157c.194 1.59-.412 4.795-4.083 5.545-4.917 1.005-7.337 3.122-7.396 6.47-.015.804-.115 2.152-.241 3.86-.228 3.071-.54 7.277-.454 10.214a9.456 9.456 0 0 0 1.695 5.135 33.597 33.597 0 0 0 2.875 3.61c.318-1.785.832-3.566 1.33-5.117l-1.026-1.778a.651.651 0 0 1-.087-.325V20.724c0-.316.228-.587.54-.64a.646.646 0 0 1 .722.424Zm7.633 16.87a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm4.797 0a.65.65 0 1 0 .703 1.093.65.65 0 0 0-.703-1.093Zm-4.476-2.512a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm7.067 0a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm0-2.727a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm2.2 0a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm-13.68 0a.65.65 0 1 0 .703 1.092.65.65 0 0 0-.703-1.092Zm2.2 2.727a.65.65 0 1 0 .703 1.092.65.65 0 0 0-.703-1.092Zm0-2.727a.65.65 0 1 0 .703 1.092.65.65 0 0 0-.703-1.092Zm2.213.06a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm4.806 2.667a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm.96-2.533a.65.65 0 1 1-1.092.704.65.65 0 0 1 1.092-.704Z\"\n fillRule=\"evenodd\"\n />\n );\n\n const normalHover = (\n <path\n d=\"m27.102 20.225-.649-.035-.649-.038c-.076 1.296.525 4.04 3.344 5.14l.473-1.212c-2.63-1.027-2.525-3.74-2.519-3.855Zm-9.046.062c.018.124.42 3.035-1.932 4.197l.577 1.166c3.21-1.589 2.665-5.398 2.64-5.559l-1.285.196Zm5.186-6.273-1.292-.143c-.032.285-.764 7.027.006 11.311.798 4.434.751 6.08.706 7.67-.01.39-.022.778-.022 1.203 0 2.117-.529 4.801-.535 4.827l1.276.254c.022-.114.56-2.834.56-5.08 0-.412.01-.789.02-1.167.048-1.657.097-3.37-.725-7.937-.737-4.097 0-10.87.006-10.938Zm9.797 17.308c-.715-3.144 1.866-11.586 1.892-11.67l-1.243-.384c-.11.36-2.708 8.861-1.917 12.343.248 1.093.602 2.193.975 3.357.786 2.452 1.6 4.987 1.57 7.844l1.3.014c.031-3.067-.853-5.823-1.633-8.254-.364-1.137-.708-2.21-.944-3.25Zm5.792 3.227a12.149 12.149 0 0 1-.208-4.413c.784-5.76 1.59-13.089.973-15.302-1.144-4.102-3.798-4.643-6.364-5.166-.866-.176-1.762-.359-2.624-.677-2.973-1.1-2.815-3.649-2.807-3.757l-.648-.053-.647-.057c-.11 1.251.511 3.924 3.652 5.085.955.354 1.9.546 2.814.733 2.481.506 4.441.905 5.372 4.242.422 1.514.045 7.038-1.01 14.776a13.495 13.495 0 0 0 .241 4.923l2.436 8.122 1.245-.373-2.425-8.083Zm-26.296-2.113.362.626.093-.273c.361-1.064.673-1.983.756-2.462.128-.736-.478-3.117-1.21-5.528v7.637Zm-.037-11.928c.478 1.356 2.847 8.213 2.53 10.041-.102.58-.413 1.496-.807 2.658-.862 2.54-2.163 6.373-2.217 9.622l-1.299-.02c.007-.442.041-.893.087-1.346-1.263-1.264-2.513-2.77-3.715-4.5a10.747 10.747 0 0 1-1.928-5.84c-.088-3.004.227-7.25.457-10.35.12-1.619.224-3.018.237-3.786.072-3.992 2.91-6.589 8.436-7.719 3.427-.7 3.071-3.977 3.054-4.115l1.291-.157c.192 1.59-.414 4.795-4.085 5.545-4.917 1.006-7.336 3.122-7.396 6.47-.014.804-.114 2.152-.24 3.858-.228 3.072-.54 7.28-.454 10.216a9.448 9.448 0 0 0 1.695 5.135 33.474 33.474 0 0 0 2.875 3.61c.318-1.785.831-3.566 1.33-5.117l-1.027-1.778a.651.651 0 0 1-.087-.325V20.724a.651.651 0 0 1 1.263-.216Zm7.633 17.67a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm4.796 0a.65.65 0 1 0 .704 1.092.65.65 0 0 0-.704-1.092Zm-4.476-3.312a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm7.068 0a.649.649 0 1 0 .704 1.092.65.65 0 1 0-.704-1.092Zm0-3.327a.649.649 0 1 0 .704 1.092.65.65 0 1 0-.704-1.092Zm2.2 0a.649.649 0 1 0 .704 1.092.65.65 0 1 0-.704-1.092Zm-13.68 0a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm2.2 3.327a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm0-3.327a.649.649 0 1 0 .704 1.092.649.649 0 1 0-.704-1.092Zm2.212.06a.65.65 0 1 0 .706 1.093.65.65 0 0 0-.706-1.093Zm4.807 3.267a.65.65 0 1 0 .703 1.093.65.65 0 0 0-.703-1.093Zm.96-3.133a.649.649 0 1 1-1.093.704.649.649 0 1 1 1.092-.704Z\"\n fillRule=\"evenodd\"\n />\n );\n\n return getIcon({ size: IconSize.Medium, isHovered, normal, normalHover });\n};\n\nexport default AcupunctureBack;\n"],"mappings":";;;;AAKA,IAAM,mBAA2C,EAAE,gBAAiD;CAClG,MAAM,SACJ,oBAAC,QAAD;EACE,GAAE;EACF,UAAS;CACV,CAAA;CAGH,MAAM,cACJ,oBAAC,QAAD;EACE,GAAE;EACF,UAAS;CACV,CAAA;CAGH,OAAO,QAAQ;EAAE,MAAM,SAAS;EAAQ;EAAW;EAAQ;CAAY,CAAC;AAC1E"}
|