@helsenorge/designsystem-react 6.5.0 → 6.6.2
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/CHANGELOG.md +24 -0
- package/components/AnchorLink/AnchorLink.d.ts +1 -1
- package/components/AnchorLink/AnchorLink.js.map +1 -1
- package/components/AnchorLink/AnchorLink.stories.d.ts +31 -0
- package/components/Avatar/Avatar.stories.d.ts +35 -0
- package/components/Badge/Badge.stories.d.ts +29 -0
- package/components/Button/Button.stories.d.ts +55 -0
- package/components/Checkbox/Checkbox.stories.d.ts +54 -0
- package/components/Close/Close.stories.d.ts +29 -0
- package/components/DictionaryTrigger/DictionaryTrigger.d.ts +1 -1
- package/components/DictionaryTrigger/DictionaryTrigger.js.map +1 -1
- package/components/DictionaryTrigger/DictionaryTrigger.stories.d.ts +30 -0
- package/components/Dropdown/Dropdown.d.ts +2 -0
- package/components/Dropdown/Dropdown.js +32 -31
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.stories.d.ts +63 -0
- package/components/Duolist/Duolist.d.ts +2 -2
- package/components/Duolist/Duolist.js.map +1 -1
- package/components/Duolist/Duolist.stories.d.ts +32 -0
- package/components/EmptyState/EmptyState.d.ts +1 -1
- package/components/EmptyState/EmptyState.js.map +1 -1
- package/components/EmptyState/EmptyState.stories.d.ts +26 -0
- package/components/Expander/Expander.d.ts +3 -1
- package/components/Expander/Expander.js +30 -29
- package/components/Expander/Expander.js.map +1 -1
- package/components/Expander/Expander.stories.d.ts +60 -0
- package/components/ExpanderHierarchy/ExpanderHierarchy.stories.d.ts +43 -0
- package/components/ExpanderHierarchy/expander.module.scss +0 -20
- package/components/ExpanderHierarchy/expander.module.scss.d.ts +0 -1
- package/components/ExpanderList/ExpanderList.d.ts +4 -0
- package/components/ExpanderList/ExpanderList.js +79 -76
- package/components/ExpanderList/ExpanderList.js.map +1 -1
- package/components/ExpanderList/ExpanderList.stories.d.ts +58 -0
- package/components/FormExample/FormExample.d.ts +1 -1
- package/components/FormExample/FormExample.js.map +1 -1
- package/components/FormGroup/FormGroup.stories.d.ts +49 -0
- package/components/FormLayout/FormLayout.stories.d.ts +32 -0
- package/components/HelpBubble/HelpBubble.stories.d.ts +42 -0
- package/components/HelpPanel/HelpPanel.d.ts +1 -1
- package/components/HelpPanel/HelpPanel.js.map +1 -1
- package/components/HelpPanel/HelpPanel.stories.d.ts +31 -0
- package/components/HelpQuestion/HelpQuestion.d.ts +1 -1
- package/components/HelpQuestion/HelpQuestion.js.map +1 -1
- package/components/HelpQuestion/HelpQuestion.stories.d.ts +29 -0
- package/components/HighlightBox/HighlightBox.d.ts +1 -1
- package/components/HighlightBox/HighlightBox.js.map +1 -1
- package/components/HighlightBox/HighlightBox.stories.d.ts +42 -0
- package/components/Icon/Icon.stories.d.ts +38 -0
- package/components/Illustration/Illustration.stories.d.ts +34 -0
- package/components/Illustration/Illustrations.stories.d.ts +41 -0
- package/components/Input/Input.stories.d.ts +94 -0
- package/components/Label/Label.stories.d.ts +25 -0
- package/components/LazyIcon/LazyIcon.js.map +1 -1
- package/components/LazyIcon/LazyIcon.stories.d.ts +25 -0
- package/components/LazyIllustration/LazyIllustration.js.map +1 -1
- package/components/LazyIllustration/LazyIllustration.stories.d.ts +38 -0
- package/components/LinkList/LinkList.stories.d.ts +47 -0
- package/components/List/List.stories.d.ts +36 -0
- package/components/Loader/Loader.stories.d.ts +31 -0
- package/components/Logo/Logo.d.ts +1 -1
- package/components/Logo/Logo.js.map +1 -1
- package/components/Logo/Logo.stories.d.ts +37 -0
- package/components/Modal/Modal.stories.d.ts +73 -0
- package/components/NotificationPanel/NotificationPanel.stories.d.ts +54 -0
- package/components/Panel/Panel.stories.d.ts +89 -0
- package/components/PanelList/PanelList.d.ts +1 -1
- package/components/PanelList/PanelList.js.map +1 -1
- package/components/PanelList/PanelList.stories.d.ts +27 -0
- package/components/PopMenu/PopMenu.js +73 -61
- package/components/PopMenu/PopMenu.js.map +1 -1
- package/components/PopMenu/PopMenu.stories.d.ts +29 -0
- package/components/PopOver/PopOver.d.ts +2 -0
- package/components/PopOver/PopOver.js +37 -36
- package/components/PopOver/PopOver.js.map +1 -1
- package/components/PopOver/PopOver.stories.d.ts +34 -0
- package/components/PromoPanel/PromoPanel.d.ts +1 -1
- package/components/PromoPanel/PromoPanel.js.map +1 -1
- package/components/PromoPanel/PromoPanel.stories.d.ts +44 -0
- package/components/RadioButton/RadioButton.stories.d.ts +57 -0
- package/components/Select/Select.stories.d.ts +38 -0
- package/components/ServiceMessage/ServiceMessage.stories.d.ts +71 -0
- package/components/SharingStatus/SharingStatus.stories.d.ts +31 -0
- package/components/Slider/Slider.d.ts +1 -1
- package/components/Slider/Slider.js.map +1 -1
- package/components/Slider/Slider.stories.d.ts +52 -0
- package/components/Spacer/Spacer.d.ts +1 -1
- package/components/Spacer/Spacer.js.map +1 -1
- package/components/Spacer/Spacer.stories.d.ts +17 -0
- package/components/StatusDot/StatusDot.stories.d.ts +31 -0
- package/components/Step/Step.stories.d.ts +32 -0
- package/components/StepButtons/StepButtons.stories.d.ts +19 -0
- package/components/Stepper/Stepper.stories.d.ts +38 -0
- package/components/Table/Table.stories.d.ts +90 -0
- package/components/Tag/Tag.d.ts +1 -1
- package/components/Tag/Tag.js.map +1 -1
- package/components/Tag/Tag.stories.d.ts +48 -0
- package/components/TagList/TagList.d.ts +1 -1
- package/components/TagList/TagList.js.map +1 -1
- package/components/TagList/TagList.stories.d.ts +17 -0
- package/components/Textarea/Textarea.d.ts +1 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.stories.d.ts +94 -0
- package/components/Tile/Tile.stories.d.ts +40 -0
- package/components/Title/Title.stories.d.ts +40 -0
- package/components/Tooltip/Tooltip.stories.d.ts +30 -0
- package/components/Trigger/Trigger.stories.d.ts +52 -0
- package/components/Validation/Validation.stories.d.ts +37 -0
- package/constants.d.ts +1 -0
- package/constants.js +1 -1
- package/constants.js.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.stories.d.ts +18 -0
- package/hooks/useBreakpoint.stories.d.ts +17 -0
- package/hooks/useDelayedState.stories.d.ts +28 -0
- package/hooks/useElementList.stories.d.ts +17 -0
- package/hooks/useFocusToggle.stories.d.ts +17 -0
- package/hooks/useFocusTrap.stories.d.ts +17 -0
- package/hooks/useFocusableElements.stories.d.ts +17 -0
- package/hooks/useHover.stories.d.ts +17 -0
- package/hooks/useIntersectionObserver.stories.d.ts +17 -0
- package/hooks/useInterval.stories.d.ts +17 -0
- package/hooks/useIsVisible.stories.d.ts +28 -0
- package/hooks/useKeyboardEvent.stories.d.ts +17 -0
- package/hooks/useLayoutEvent.stories.d.ts +17 -0
- package/hooks/useOutsideEvent.stories.d.ts +17 -0
- package/hooks/usePseudoClasses.stories.d.ts +17 -0
- package/hooks/useResizeObserver.stories.d.ts +17 -0
- package/hooks/useSize.stories.d.ts +17 -0
- package/hooks/useSticky.stories.d.ts +17 -0
- package/hooks/useUuid.stories.d.ts +17 -0
- package/package.json +1 -1
- package/__mocks__/IntersectionObserver.d.ts.map +0 -1
- package/__mocks__/MutationObserver.d.ts.map +0 -1
- package/__mocks__/ResizeObserver.d.ts.map +0 -1
- package/__mocks__/matchMedia.d.ts.map +0 -1
- package/__mocks__/useHover.d.ts.map +0 -1
- package/__mocks__/useLayoutEvent.d.ts.map +0 -1
- package/__mocks__/useOutsideEvent.d.ts.map +0 -1
- package/__mocks__/useSize.d.ts.map +0 -1
- package/__mocks__/uuid.d.ts.map +0 -1
- package/components/AnchorLink/AnchorLink.d.ts.map +0 -1
- package/components/AnchorLink/index.d.ts.map +0 -1
- package/components/Avatar/Avatar.d.ts.map +0 -1
- package/components/Avatar/index.d.ts.map +0 -1
- package/components/Badge/Badge.d.ts.map +0 -1
- package/components/Badge/index.d.ts.map +0 -1
- package/components/Button/Button.d.ts.map +0 -1
- package/components/Button/index.d.ts.map +0 -1
- package/components/ButtonWithModal/ButtonWithModal.d.ts.map +0 -1
- package/components/ButtonWithModal/index.d.ts.map +0 -1
- package/components/Checkbox/Checkbox.d.ts.map +0 -1
- package/components/Checkbox/index.d.ts.map +0 -1
- package/components/Close/Close.d.ts.map +0 -1
- package/components/Close/index.d.ts.map +0 -1
- package/components/DictionaryTrigger/DictionaryTrigger.d.ts.map +0 -1
- package/components/DictionaryTrigger/index.d.ts.map +0 -1
- package/components/Dropdown/Dropdown.d.ts.map +0 -1
- package/components/Dropdown/index.d.ts.map +0 -1
- package/components/Duolist/Duolist.d.ts.map +0 -1
- package/components/Duolist/index.d.ts.map +0 -1
- package/components/EmptyState/EmptyState.d.ts.map +0 -1
- package/components/EmptyState/NobodyHome.d.ts.map +0 -1
- package/components/EmptyState/index.d.ts.map +0 -1
- package/components/ErrorWrapper/ErrorWrapper.d.ts.map +0 -1
- package/components/ErrorWrapper/index.d.ts.map +0 -1
- package/components/Expander/Expander.d.ts.map +0 -1
- package/components/Expander/index.d.ts.map +0 -1
- package/components/ExpanderHierarchy/Expander.d.ts.map +0 -1
- package/components/ExpanderHierarchy/ExpanderButton.d.ts.map +0 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.d.ts.map +0 -1
- package/components/ExpanderHierarchy/index.d.ts.map +0 -1
- package/components/ExpanderHierarchy/utils.d.ts.map +0 -1
- package/components/ExpanderList/ExpanderList.d.ts.map +0 -1
- package/components/ExpanderList/index.d.ts.map +0 -1
- package/components/FormExample/FormExample.d.ts.map +0 -1
- package/components/FormExample/index.d.ts.map +0 -1
- package/components/FormGroup/FormGroup.d.ts.map +0 -1
- package/components/FormGroup/index.d.ts.map +0 -1
- package/components/FormLayout/FormLayout.d.ts.map +0 -1
- package/components/FormLayout/index.d.ts.map +0 -1
- package/components/GridExample/GridExample.d.ts.map +0 -1
- package/components/GridExample/index.d.ts.map +0 -1
- package/components/HelpBubble/HelpBubble.d.ts.map +0 -1
- package/components/HelpBubble/index.d.ts.map +0 -1
- package/components/HelpBubbleExample/HelpBubbleExample.d.ts.map +0 -1
- package/components/HelpBubbleExample/index.d.ts.map +0 -1
- package/components/HelpPanel/HelpPanel.d.ts.map +0 -1
- package/components/HelpPanel/index.d.ts.map +0 -1
- package/components/HelpQuestion/HelpQuestion.d.ts.map +0 -1
- package/components/HelpQuestion/index.d.ts.map +0 -1
- package/components/HighlightBox/HighlightBox.d.ts.map +0 -1
- package/components/HighlightBox/index.d.ts.map +0 -1
- package/components/HorizontalScroll/HorizontalScroll.d.ts.map +0 -1
- package/components/HorizontalScroll/index.d.ts.map +0 -1
- package/components/Icon/Icon.d.ts.map +0 -1
- package/components/Icon/index.d.ts.map +0 -1
- package/components/Icons/ActiveMonitoring.d.ts.map +0 -1
- package/components/Icons/AcupunctureBack.d.ts.map +0 -1
- package/components/Icons/AdditionalIconInformation.d.ts.map +0 -1
- package/components/Icons/AlarmClock.d.ts.map +0 -1
- package/components/Icons/AlertSignFill.d.ts.map +0 -1
- package/components/Icons/AlertSignStroke.d.ts.map +0 -1
- package/components/Icons/Amputation.d.ts.map +0 -1
- package/components/Icons/Anxiety.d.ts.map +0 -1
- package/components/Icons/Apple.d.ts.map +0 -1
- package/components/Icons/Archive.d.ts.map +0 -1
- package/components/Icons/ArmFlexing.d.ts.map +0 -1
- package/components/Icons/ArrowDown.d.ts.map +0 -1
- package/components/Icons/ArrowLeft.d.ts.map +0 -1
- package/components/Icons/ArrowRight.d.ts.map +0 -1
- package/components/Icons/ArrowUp.d.ts.map +0 -1
- package/components/Icons/ArrowUpRight.d.ts.map +0 -1
- package/components/Icons/Attachment.d.ts.map +0 -1
- package/components/Icons/Atv.d.ts.map +0 -1
- package/components/Icons/Avatar.d.ts.map +0 -1
- package/components/Icons/AwakePersonOnPillow.d.ts.map +0 -1
- package/components/Icons/Baby.d.ts.map +0 -1
- package/components/Icons/BandAid.d.ts.map +0 -1
- package/components/Icons/BeerAndPills.d.ts.map +0 -1
- package/components/Icons/Bell.d.ts.map +0 -1
- package/components/Icons/Bike.d.ts.map +0 -1
- package/components/Icons/BirthControl.d.ts.map +0 -1
- package/components/Icons/BirthdayCake.d.ts.map +0 -1
- package/components/Icons/Boat.d.ts.map +0 -1
- package/components/Icons/Body.d.ts.map +0 -1
- package/components/Icons/Braille.d.ts.map +0 -1
- package/components/Icons/Brain.d.ts.map +0 -1
- package/components/Icons/BreastReconstruction.d.ts.map +0 -1
- package/components/Icons/BreastRemoval.d.ts.map +0 -1
- package/components/Icons/Breasts.d.ts.map +0 -1
- package/components/Icons/BrokenHeart.d.ts.map +0 -1
- package/components/Icons/BrokenPuzzle.d.ts.map +0 -1
- package/components/Icons/Bus.d.ts.map +0 -1
- package/components/Icons/Calendar.d.ts.map +0 -1
- package/components/Icons/CalendarChange.d.ts.map +0 -1
- package/components/Icons/CalendarCheck.d.ts.map +0 -1
- package/components/Icons/CalendarEvent.d.ts.map +0 -1
- package/components/Icons/CalendarSave.d.ts.map +0 -1
- package/components/Icons/Cancer.d.ts.map +0 -1
- package/components/Icons/Candle.d.ts.map +0 -1
- package/components/Icons/Car.d.ts.map +0 -1
- package/components/Icons/Change.d.ts.map +0 -1
- package/components/Icons/Check.d.ts.map +0 -1
- package/components/Icons/CheckFill.d.ts.map +0 -1
- package/components/Icons/CheckOutline.d.ts.map +0 -1
- package/components/Icons/Chest.d.ts.map +0 -1
- package/components/Icons/ChevronDown.d.ts.map +0 -1
- package/components/Icons/ChevronLeft.d.ts.map +0 -1
- package/components/Icons/ChevronRight.d.ts.map +0 -1
- package/components/Icons/ChevronUp.d.ts.map +0 -1
- package/components/Icons/ChevronsDown.d.ts.map +0 -1
- package/components/Icons/ChevronsUp.d.ts.map +0 -1
- package/components/Icons/ChildPlaying.d.ts.map +0 -1
- package/components/Icons/Cigarette.d.ts.map +0 -1
- package/components/Icons/Coins.d.ts.map +0 -1
- package/components/Icons/Contacts.d.ts.map +0 -1
- package/components/Icons/Copy.d.ts.map +0 -1
- package/components/Icons/CoronaCertificate.d.ts.map +0 -1
- package/components/Icons/Coronavirus.d.ts.map +0 -1
- package/components/Icons/Cough.d.ts.map +0 -1
- package/components/Icons/CriticalHealthInfo.d.ts.map +0 -1
- package/components/Icons/Cross.d.ts.map +0 -1
- package/components/Icons/DataExchange.d.ts.map +0 -1
- package/components/Icons/DataReceived.d.ts.map +0 -1
- package/components/Icons/DataSent.d.ts.map +0 -1
- package/components/Icons/Depression.d.ts.map +0 -1
- package/components/Icons/DigestiveSystem.d.ts.map +0 -1
- package/components/Icons/Dizzy.d.ts.map +0 -1
- package/components/Icons/Documents.d.ts.map +0 -1
- package/components/Icons/Dog.d.ts.map +0 -1
- package/components/Icons/DonorCard.d.ts.map +0 -1
- package/components/Icons/Download.d.ts.map +0 -1
- package/components/Icons/Draft.d.ts.map +0 -1
- package/components/Icons/EChat.d.ts.map +0 -1
- package/components/Icons/Ear.d.ts.map +0 -1
- package/components/Icons/EarDeaf.d.ts.map +0 -1
- package/components/Icons/EarHearingAid.d.ts.map +0 -1
- package/components/Icons/EarNoseThroat.d.ts.map +0 -1
- package/components/Icons/EarVolume.d.ts.map +0 -1
- package/components/Icons/ElderlyPerson.d.ts.map +0 -1
- package/components/Icons/Embolization.d.ts.map +0 -1
- package/components/Icons/EmergencyCall.d.ts.map +0 -1
- package/components/Icons/EmoticonAnnoyed.d.ts.map +0 -1
- package/components/Icons/EmoticonDelighted.d.ts.map +0 -1
- package/components/Icons/EmoticonDisappointed.d.ts.map +0 -1
- package/components/Icons/EmoticonHappy.d.ts.map +0 -1
- package/components/Icons/EmoticonMeh.d.ts.map +0 -1
- package/components/Icons/EnterFullScreen.d.ts.map +0 -1
- package/components/Icons/Envelope.d.ts.map +0 -1
- package/components/Icons/Epilepsy.d.ts.map +0 -1
- package/components/Icons/Eraser.d.ts.map +0 -1
- package/components/Icons/ErrorSignFill.d.ts.map +0 -1
- package/components/Icons/ErrorSignStroke.d.ts.map +0 -1
- package/components/Icons/EuropeanHealthCard.d.ts.map +0 -1
- package/components/Icons/ExitFullScreen.d.ts.map +0 -1
- package/components/Icons/Eye.d.ts.map +0 -1
- package/components/Icons/Facebook.d.ts.map +0 -1
- package/components/Icons/FallingLeaf.d.ts.map +0 -1
- package/components/Icons/Female.d.ts.map +0 -1
- package/components/Icons/FemaleDoctor.d.ts.map +0 -1
- package/components/Icons/Ferry.d.ts.map +0 -1
- package/components/Icons/File.d.ts.map +0 -1
- package/components/Icons/Filter.d.ts.map +0 -1
- package/components/Icons/FingerBleed.d.ts.map +0 -1
- package/components/Icons/FirstAidKit.d.ts.map +0 -1
- package/components/Icons/FloppyDisk.d.ts.map +0 -1
- package/components/Icons/Football.d.ts.map +0 -1
- package/components/Icons/Form.d.ts.map +0 -1
- package/components/Icons/Forward.d.ts.map +0 -1
- package/components/Icons/Gallery.d.ts.map +0 -1
- package/components/Icons/Garden.d.ts.map +0 -1
- package/components/Icons/GasCan.d.ts.map +0 -1
- package/components/Icons/GenderIdentity.d.ts.map +0 -1
- package/components/Icons/Glasses.d.ts.map +0 -1
- package/components/Icons/Globe.d.ts.map +0 -1
- package/components/Icons/Graph.d.ts.map +0 -1
- package/components/Icons/Group.d.ts.map +0 -1
- package/components/Icons/GroupTwins.d.ts.map +0 -1
- package/components/Icons/HTMLFile.d.ts.map +0 -1
- package/components/Icons/HandWaving.d.ts.map +0 -1
- package/components/Icons/HandWithDisease.d.ts.map +0 -1
- package/components/Icons/HandsAndHeart.d.ts.map +0 -1
- package/components/Icons/HealthClinic.d.ts.map +0 -1
- package/components/Icons/HealthWarning.d.ts.map +0 -1
- package/components/Icons/HealthcarePerson.d.ts.map +0 -1
- package/components/Icons/HealthcarePersonell.d.ts.map +0 -1
- package/components/Icons/HearingProtection.d.ts.map +0 -1
- package/components/Icons/Heart.d.ts.map +0 -1
- package/components/Icons/HeartHands.d.ts.map +0 -1
- package/components/Icons/HelpSign.d.ts.map +0 -1
- package/components/Icons/HelpingHand.d.ts.map +0 -1
- package/components/Icons/Hemodialysis.d.ts.map +0 -1
- package/components/Icons/Hiker.d.ts.map +0 -1
- package/components/Icons/Hipprosthesis.d.ts.map +0 -1
- package/components/Icons/History.d.ts.map +0 -1
- package/components/Icons/HivAndAids.d.ts.map +0 -1
- package/components/Icons/Home.d.ts.map +0 -1
- package/components/Icons/Hormone.d.ts.map +0 -1
- package/components/Icons/Hospital.d.ts.map +0 -1
- package/components/Icons/Hourglass.d.ts.map +0 -1
- package/components/Icons/IconNames.d.ts.map +0 -1
- package/components/Icons/ImgFile.d.ts.map +0 -1
- package/components/Icons/Inbox.d.ts.map +0 -1
- package/components/Icons/InfoSignFill.d.ts.map +0 -1
- package/components/Icons/InfoSignStroke.d.ts.map +0 -1
- package/components/Icons/Instagram.d.ts.map +0 -1
- package/components/Icons/Intravenous.d.ts.map +0 -1
- package/components/Icons/JointPain.d.ts.map +0 -1
- package/components/Icons/Journal.d.ts.map +0 -1
- package/components/Icons/JpgFile.d.ts.map +0 -1
- package/components/Icons/Kidney.d.ts.map +0 -1
- package/components/Icons/KitchenScale.d.ts.map +0 -1
- package/components/Icons/Kjernejournal.d.ts.map +0 -1
- package/components/Icons/Laboratory.d.ts.map +0 -1
- package/components/Icons/LaptopBlog.d.ts.map +0 -1
- package/components/Icons/LawBook.d.ts.map +0 -1
- package/components/Icons/LegalDocument.d.ts.map +0 -1
- package/components/Icons/LightBulb.d.ts.map +0 -1
- package/components/Icons/List.d.ts.map +0 -1
- package/components/Icons/Location.d.ts.map +0 -1
- package/components/Icons/Lock.d.ts.map +0 -1
- package/components/Icons/Login.d.ts.map +0 -1
- package/components/Icons/Logout.d.ts.map +0 -1
- package/components/Icons/Lungs.d.ts.map +0 -1
- package/components/Icons/Makeup.d.ts.map +0 -1
- package/components/Icons/MaleDoctor.d.ts.map +0 -1
- package/components/Icons/MaleDoctorAndPerson.d.ts.map +0 -1
- package/components/Icons/MaleGenitalia.d.ts.map +0 -1
- package/components/Icons/Medicine.d.ts.map +0 -1
- package/components/Icons/MedicineWarning.d.ts.map +0 -1
- package/components/Icons/MentalHealthAdult.d.ts.map +0 -1
- package/components/Icons/MentalHealthChild.d.ts.map +0 -1
- package/components/Icons/Menu.d.ts.map +0 -1
- package/components/Icons/Microscope.d.ts.map +0 -1
- package/components/Icons/Minus.d.ts.map +0 -1
- package/components/Icons/Mirror.d.ts.map +0 -1
- package/components/Icons/MobilePhone.d.ts.map +0 -1
- package/components/Icons/MotherHoldingBaby.d.ts.map +0 -1
- package/components/Icons/MuscleBack.d.ts.map +0 -1
- package/components/Icons/MuscleLeg.d.ts.map +0 -1
- package/components/Icons/Mushroom.d.ts.map +0 -1
- package/components/Icons/Music.d.ts.map +0 -1
- package/components/Icons/MusselsAndSalt.d.ts.map +0 -1
- package/components/Icons/NoAccess.d.ts.map +0 -1
- package/components/Icons/NoEye.d.ts.map +0 -1
- package/components/Icons/NoFilter.d.ts.map +0 -1
- package/components/Icons/Notepad.d.ts.map +0 -1
- package/components/Icons/Osteotomy.d.ts.map +0 -1
- package/components/Icons/PaintRoller.d.ts.map +0 -1
- package/components/Icons/PaperPlane.d.ts.map +0 -1
- package/components/Icons/PatientAndPerson.d.ts.map +0 -1
- package/components/Icons/Pause.d.ts.map +0 -1
- package/components/Icons/PdfFile.d.ts.map +0 -1
- package/components/Icons/Pencil.d.ts.map +0 -1
- package/components/Icons/PeopleTalking.d.ts.map +0 -1
- package/components/Icons/Peritonealdialysis.d.ts.map +0 -1
- package/components/Icons/Person.d.ts.map +0 -1
- package/components/Icons/PersonAndPatient.d.ts.map +0 -1
- package/components/Icons/PersonCancel.d.ts.map +0 -1
- package/components/Icons/PersonInXRayMachine.d.ts.map +0 -1
- package/components/Icons/PersonOverweight.d.ts.map +0 -1
- package/components/Icons/PersonRelaxing.d.ts.map +0 -1
- package/components/Icons/PersonWithBrain.d.ts.map +0 -1
- package/components/Icons/PersonWithBrokenArm.d.ts.map +0 -1
- package/components/Icons/PersonWithCrutches.d.ts.map +0 -1
- package/components/Icons/PersonWithJaw.d.ts.map +0 -1
- package/components/Icons/PersonWithMagnifyingGlass.d.ts.map +0 -1
- package/components/Icons/PersonWithSenses.d.ts.map +0 -1
- package/components/Icons/PersonWorking.d.ts.map +0 -1
- package/components/Icons/PersonalPlan.d.ts.map +0 -1
- package/components/Icons/PizzaSlice.d.ts.map +0 -1
- package/components/Icons/Plane.d.ts.map +0 -1
- package/components/Icons/Plant.d.ts.map +0 -1
- package/components/Icons/Play.d.ts.map +0 -1
- package/components/Icons/PlusLarge.d.ts.map +0 -1
- package/components/Icons/PlusSmall.d.ts.map +0 -1
- package/components/Icons/PngFile.d.ts.map +0 -1
- package/components/Icons/Podcast.d.ts.map +0 -1
- package/components/Icons/PoisonInformation.d.ts.map +0 -1
- package/components/Icons/Pregnant.d.ts.map +0 -1
- package/components/Icons/Printer.d.ts.map +0 -1
- package/components/Icons/Psychosis.d.ts.map +0 -1
- package/components/Icons/Publication.d.ts.map +0 -1
- package/components/Icons/Puzzle.d.ts.map +0 -1
- package/components/Icons/QrCode.d.ts.map +0 -1
- package/components/Icons/Quarrel.d.ts.map +0 -1
- package/components/Icons/RadioTherapy.d.ts.map +0 -1
- package/components/Icons/RadioactiveTreatment.d.ts.map +0 -1
- package/components/Icons/Radioiodine.d.ts.map +0 -1
- package/components/Icons/Receipt.d.ts.map +0 -1
- package/components/Icons/Receptionist.d.ts.map +0 -1
- package/components/Icons/Recovery.d.ts.map +0 -1
- package/components/Icons/Referral.d.ts.map +0 -1
- package/components/Icons/Refresh.d.ts.map +0 -1
- package/components/Icons/Refund.d.ts.map +0 -1
- package/components/Icons/Reply.d.ts.map +0 -1
- package/components/Icons/Rocket.d.ts.map +0 -1
- package/components/Icons/RtfFile.d.ts.map +0 -1
- package/components/Icons/STDs.d.ts.map +0 -1
- package/components/Icons/Save.d.ts.map +0 -1
- package/components/Icons/Scale.d.ts.map +0 -1
- package/components/Icons/ScreenReader.d.ts.map +0 -1
- package/components/Icons/Search.d.ts.map +0 -1
- package/components/Icons/SectionSign.d.ts.map +0 -1
- package/components/Icons/Settings.d.ts.map +0 -1
- package/components/Icons/Sexualorientation.d.ts.map +0 -1
- package/components/Icons/ShakingHand.d.ts.map +0 -1
- package/components/Icons/Share.d.ts.map +0 -1
- package/components/Icons/Shield.d.ts.map +0 -1
- package/components/Icons/ShuntOperation.d.ts.map +0 -1
- package/components/Icons/Skeleton.d.ts.map +0 -1
- package/components/Icons/Skin.d.ts.map +0 -1
- package/components/Icons/Snake.d.ts.map +0 -1
- package/components/Icons/Snapchat.d.ts.map +0 -1
- package/components/Icons/SortDown.d.ts.map +0 -1
- package/components/Icons/SortUp.d.ts.map +0 -1
- package/components/Icons/SpeechBubble.d.ts.map +0 -1
- package/components/Icons/Spray.d.ts.map +0 -1
- package/components/Icons/Stopwatch.d.ts.map +0 -1
- package/components/Icons/Sun.d.ts.map +0 -1
- package/components/Icons/SupportingPerson.d.ts.map +0 -1
- package/components/Icons/Surgery.d.ts.map +0 -1
- package/components/Icons/Syringe.d.ts.map +0 -1
- package/components/Icons/Taxi.d.ts.map +0 -1
- package/components/Icons/TeddyBear.d.ts.map +0 -1
- package/components/Icons/Teenagers.d.ts.map +0 -1
- package/components/Icons/ThinkingAboutBaby.d.ts.map +0 -1
- package/components/Icons/Ticket.d.ts.map +0 -1
- package/components/Icons/TimePassing.d.ts.map +0 -1
- package/components/Icons/Tombstone.d.ts.map +0 -1
- package/components/Icons/Toolbox.d.ts.map +0 -1
- package/components/Icons/Tooth.d.ts.map +0 -1
- package/components/Icons/TotalKneeProsthesis.d.ts.map +0 -1
- package/components/Icons/Train.d.ts.map +0 -1
- package/components/Icons/Transplantation.d.ts.map +0 -1
- package/components/Icons/TrashCan.d.ts.map +0 -1
- package/components/Icons/TravelRoute.d.ts.map +0 -1
- package/components/Icons/TriangleX.d.ts.map +0 -1
- package/components/Icons/Twitter.d.ts.map +0 -1
- package/components/Icons/Undo.d.ts.map +0 -1
- package/components/Icons/UniProsthesis.d.ts.map +0 -1
- package/components/Icons/Upload.d.ts.map +0 -1
- package/components/Icons/UserOrganization.d.ts.map +0 -1
- package/components/Icons/Vaccine.d.ts.map +0 -1
- package/components/Icons/VerticalDots.d.ts.map +0 -1
- package/components/Icons/VideoCamera.d.ts.map +0 -1
- package/components/Icons/VideoChat.d.ts.map +0 -1
- package/components/Icons/Wallet.d.ts.map +0 -1
- package/components/Icons/Watch.d.ts.map +0 -1
- package/components/Icons/Website.d.ts.map +0 -1
- package/components/Icons/Wheelchair.d.ts.map +0 -1
- package/components/Icons/WheelchairActive.d.ts.map +0 -1
- package/components/Icons/Window.d.ts.map +0 -1
- package/components/Icons/WordDocument.d.ts.map +0 -1
- package/components/Icons/WorkSuitcase.d.ts.map +0 -1
- package/components/Icons/X.d.ts.map +0 -1
- package/components/Icons/XOutline.d.ts.map +0 -1
- package/components/Icons/XmlFile.d.ts.map +0 -1
- package/components/Icons/YouTube.d.ts.map +0 -1
- package/components/Icons/Zoom.d.ts.map +0 -1
- package/components/Illustration/Illustration.d.ts.map +0 -1
- package/components/Illustration/index.d.ts.map +0 -1
- package/components/Illustration/utils.d.ts.map +0 -1
- package/components/Illustrations/Doctor.d.ts.map +0 -1
- package/components/Illustrations/DoctorMedium.d.ts.map +0 -1
- package/components/Illustrations/DoctorSmall.d.ts.map +0 -1
- package/components/Illustrations/HealthcarePersonnel.d.ts.map +0 -1
- package/components/Illustrations/HealthcarePersonnelMedium.d.ts.map +0 -1
- package/components/Illustrations/HealthcarePersonnelSmall.d.ts.map +0 -1
- package/components/Illustrations/IllustrationNames.d.ts.map +0 -1
- package/components/Input/Input.d.ts.map +0 -1
- package/components/Input/index.d.ts.map +0 -1
- package/components/Label/Label.d.ts.map +0 -1
- package/components/Label/SubLabel.d.ts.map +0 -1
- package/components/Label/index.d.ts.map +0 -1
- package/components/LazyIcon/ErrorBoundary.d.ts.map +0 -1
- package/components/LazyIcon/LazyIcon.d.ts.map +0 -1
- package/components/LazyIcon/index.d.ts.map +0 -1
- package/components/LazyIcon/utils.d.ts.map +0 -1
- package/components/LazyIllustration/LazyIllustration.d.ts.map +0 -1
- package/components/LazyIllustration/index.d.ts.map +0 -1
- package/components/LinkList/LinkList.d.ts.map +0 -1
- package/components/LinkList/index.d.ts.map +0 -1
- package/components/List/List.d.ts.map +0 -1
- package/components/List/index.d.ts.map +0 -1
- package/components/ListHeader/ListHeader.d.ts.map +0 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts.map +0 -1
- package/components/ListHeader/ListHeaderText/index.d.ts.map +0 -1
- package/components/ListHeader/index.d.ts.map +0 -1
- package/components/Loader/Loader.d.ts.map +0 -1
- package/components/Loader/index.d.ts.map +0 -1
- package/components/Logo/Logo.d.ts.map +0 -1
- package/components/Logo/index.d.ts.map +0 -1
- package/components/MaxCharacters/MaxCharacters.d.ts.map +0 -1
- package/components/Modal/Modal.d.ts.map +0 -1
- package/components/Modal/index.d.ts.map +0 -1
- package/components/NotificationPanel/DetailButton/DetailButton.d.ts.map +0 -1
- package/components/NotificationPanel/NotificationPanel.d.ts.map +0 -1
- package/components/NotificationPanel/index.d.ts.map +0 -1
- package/components/Panel/Panel.d.ts.map +0 -1
- package/components/Panel/index.d.ts.map +0 -1
- package/components/PanelList/PanelList.d.ts.map +0 -1
- package/components/PanelList/index.d.ts.map +0 -1
- package/components/PopMenu/PopMenu.d.ts.map +0 -1
- package/components/PopMenu/index.d.ts.map +0 -1
- package/components/PopOver/PopOver.d.ts.map +0 -1
- package/components/PopOver/index.d.ts.map +0 -1
- package/components/PopOver/utils.d.ts.map +0 -1
- package/components/Portal/index.d.ts.map +0 -1
- package/components/PromoPanel/PromoPanel.d.ts.map +0 -1
- package/components/PromoPanel/index.d.ts.map +0 -1
- package/components/RadioButton/RadioButton.d.ts.map +0 -1
- package/components/RadioButton/index.d.ts.map +0 -1
- package/components/Select/Select.d.ts.map +0 -1
- package/components/Select/index.d.ts.map +0 -1
- package/components/ServiceMessage/ServiceMessage.d.ts.map +0 -1
- package/components/ServiceMessage/index.d.ts.map +0 -1
- package/components/SharingStatus/SharingStatus.d.ts.map +0 -1
- package/components/SharingStatus/index.d.ts.map +0 -1
- package/components/Slider/Slider.d.ts.map +0 -1
- package/components/Slider/index.d.ts.map +0 -1
- package/components/Spacer/Spacer.d.ts.map +0 -1
- package/components/Spacer/index.d.ts.map +0 -1
- package/components/StatusDot/StatusDot.d.ts.map +0 -1
- package/components/StatusDot/index.d.ts.map +0 -1
- package/components/Step/Step.d.ts.map +0 -1
- package/components/Step/index.d.ts.map +0 -1
- package/components/StepButtons/StepButtons.d.ts.map +0 -1
- package/components/StepButtons/index.d.ts.map +0 -1
- package/components/Stepper/Dot.d.ts.map +0 -1
- package/components/Stepper/DotList.d.ts.map +0 -1
- package/components/Stepper/Stepper.d.ts.map +0 -1
- package/components/Stepper/index.d.ts.map +0 -1
- package/components/Stepper/utils.d.ts.map +0 -1
- package/components/Table/Table.d.ts.map +0 -1
- package/components/Table/TableBody/TableBody.d.ts.map +0 -1
- package/components/Table/TableBody/index.d.ts.map +0 -1
- package/components/Table/TableCell/TableCell.d.ts.map +0 -1
- package/components/Table/TableCell/index.d.ts.map +0 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.d.ts.map +0 -1
- package/components/Table/TableExpandedRow/index.d.ts.map +0 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.d.ts.map +0 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts.map +0 -1
- package/components/Table/TableExpanderCell/index.d.ts.map +0 -1
- package/components/Table/TableHead/TableHead.d.ts.map +0 -1
- package/components/Table/TableHead/index.d.ts.map +0 -1
- package/components/Table/TableHeadCell/TableHeadCell.d.ts.map +0 -1
- package/components/Table/TableHeadCell/index.d.ts.map +0 -1
- package/components/Table/TableRow/TableRow.d.ts.map +0 -1
- package/components/Table/TableRow/index.d.ts.map +0 -1
- package/components/Table/index.d.ts.map +0 -1
- package/components/Table/utils.d.ts.map +0 -1
- package/components/Tag/Tag.d.ts.map +0 -1
- package/components/Tag/index.d.ts.map +0 -1
- package/components/TagList/TagList.d.ts.map +0 -1
- package/components/TagList/index.d.ts.map +0 -1
- package/components/Textarea/Textarea.d.ts.map +0 -1
- package/components/Textarea/index.d.ts.map +0 -1
- package/components/Tile/Tile.d.ts.map +0 -1
- package/components/Tile/index.d.ts.map +0 -1
- package/components/Title/Title.d.ts.map +0 -1
- package/components/Title/index.d.ts.map +0 -1
- package/components/Tooltip/Tooltip.d.ts.map +0 -1
- package/components/Tooltip/TooltipWord/TooltipWord.d.ts.map +0 -1
- package/components/Tooltip/TooltipWord/index.d.ts.map +0 -1
- package/components/Tooltip/index.d.ts.map +0 -1
- package/components/TooltipExample/TooltipExample.d.ts.map +0 -1
- package/components/TooltipExample/index.d.ts.map +0 -1
- package/components/Trigger/HelpSign.d.ts.map +0 -1
- package/components/Trigger/InfoSignStroke.d.ts.map +0 -1
- package/components/Trigger/Trigger.d.ts.map +0 -1
- package/components/Trigger/index.d.ts.map +0 -1
- package/components/Validation/Validation.d.ts.map +0 -1
- package/components/Validation/index.d.ts.map +0 -1
- package/constants.d.ts.map +0 -1
- package/hoc/withBreakpoint/index.d.ts.map +0 -1
- package/hoc/withBreakpoint/withBreakpoint.d.ts.map +0 -1
- package/hooks/useBreakpoint.d.ts.map +0 -1
- package/hooks/useDelayedState.d.ts.map +0 -1
- package/hooks/useElementList.d.ts.map +0 -1
- package/hooks/useEventListenerState.d.ts.map +0 -1
- package/hooks/useExpand.d.ts.map +0 -1
- package/hooks/useFocusToggle.d.ts.map +0 -1
- package/hooks/useFocusTrap.d.ts.map +0 -1
- package/hooks/useFocusableElements.d.ts.map +0 -1
- package/hooks/useHover.d.ts.map +0 -1
- package/hooks/useIcons.d.ts.map +0 -1
- package/hooks/useIntersectionObserver.d.ts.map +0 -1
- package/hooks/useInterval.d.ts.map +0 -1
- package/hooks/useIsVisible.d.ts.map +0 -1
- package/hooks/useKeyboardEvent.d.ts.map +0 -1
- package/hooks/useLayoutEvent.d.ts.map +0 -1
- package/hooks/useOutsideEvent.d.ts.map +0 -1
- package/hooks/usePrevious.d.ts.map +0 -1
- package/hooks/usePseudoClasses.d.ts.map +0 -1
- package/hooks/useResizeObserver.d.ts.map +0 -1
- package/hooks/useSize.d.ts.map +0 -1
- package/hooks/useSticky.d.ts.map +0 -1
- package/hooks/useToggle.d.ts.map +0 -1
- package/hooks/useUuid.d.ts.map +0 -1
- package/index.d.ts.map +0 -1
- package/theme/currys/color.d.ts.map +0 -1
- package/theme/currys/index.d.ts.map +0 -1
- package/theme/currys/spacing.d.ts.map +0 -1
- package/theme/grid.d.ts.map +0 -1
- package/theme/index.d.ts.map +0 -1
- package/theme/palette.d.ts.map +0 -1
- package/theme/spacers.d.ts.map +0 -1
- package/utils/accessibility.d.ts.map +0 -1
- package/utils/component.d.ts.map +0 -1
- package/utils/debounce.d.ts.map +0 -1
- package/utils/device.d.ts.map +0 -1
- package/utils/environment.d.ts.map +0 -1
- package/utils/focus.d.ts.map +0 -1
- package/utils/loremtext.d.ts.map +0 -1
- package/utils/mobile.d.ts.map +0 -1
- package/utils/refs.d.ts.map +0 -1
- package/utils/uuid.d.ts.map +0 -1
- package/utils/viewport.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys/color';\n\ntype LogoColor = 'black' | 'white';\n\
|
|
1
|
+
{"version":3,"file":"Logo.js","sources":["../../../src/components/Logo/Logo.tsx"],"sourcesContent":["import React from 'react';\n\nimport { AnalyticsId } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys/color';\n\ntype LogoColor = 'black' | 'white';\n\nexport interface LogoProps {\n /** Changes the size of the logo. */\n size?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /**\tChanges the color of the logo. */\n color?: LogoColor;\n /** Changes to the byline variant of the logo. */\n byline?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Logo: React.FC<LogoProps> = ({ size = 300, color = 'black', byline = false, className, testId }) => {\n const uuid = useUuid();\n\n if (byline) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n role={'img'}\n aria-labelledby={uuid}\n viewBox=\"0 0 87 12\"\n className={className}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Logo}\n >\n <title id={uuid}>{'Helsenorge'}</title>\n <g fill={getColor(color)}>\n <path d=\"M5 .8v2.8H2.6V.8H1V8h1.6V5.1H5V8h1.6V.8zM20.9 6.6V.8h-1.6V8h4.5V6.6zM57.9 1.4c-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.8 3.4 2.8-1.4 2.8-3.4-1.1-3.4-2.8-3.4zm2 3.4c0 1.2-.5 2.7-2 2.7-1.4 0-2-1.4-2-2.7s.5-2.7 2-2.7 2 1.5 2 2.7zM86 4.7c0-2-1.1-3.3-2.8-3.3-1.7 0-2.8 1.4-2.8 3.4s1.2 3.4 2.9 3.4c1.2 0 2.2-.6 2.5-1.7l.1-.2H85v.1c-.3.6-.9 1-1.7 1-1.3 0-1.9-1.2-2-2.3H86v-.4zm-.9-.3h-3.9c.1-1.1.7-2.3 1.9-2.3 1.5 0 2 1.3 2 2.3zM49.2 1.4c-1.1 0-1.7.7-2 1.2v-1h-.8V8h.8V4.8c0-.9.5-2.6 1.9-2.6s1.6 1.2 1.6 2.6V8h.8V4.7c0-1.6-.2-3.3-2.3-3.3zM12.1 6.6V5h2.4V3.7h-2.4V2.2h3.2V.8h-4.8V8h4.9V6.6zM38.3 6.6V5h2.3V3.7h-2.3V2.2h3.2V.8h-4.8V8h4.9V6.6zM65.5 3.3V1.6h-.8V8h.8V4.1l2.8-2v-.9zM77.6 1.2l-1.5 1.1c-.5-.6-1.1-.9-1.9-.9-1.4 0-2.4 1-2.4 2.4 0 1.1.6 2 1.6 2.3l-1.6 1.8c-.4.5-.6.9-.6 1.3 0 1.3 1.1 2.1 2.9 2.1 1.7 0 2.9-.9 2.9-2.1 0-1.3-1.1-2.1-2.9-2.1h-.6l.8-.9c1.3-.1 2.3-1.1 2.3-2.4 0-.3 0-.6-.1-.8l1.2-.8v-1zM74 7.8c1.2 0 2.1.5 2.1 1.4 0 .8-.8 1.4-2.1 1.4-1.2 0-2-.5-2-1.4 0-.8.8-1.4 2-1.4zm.1-2.4c-.9 0-1.6-.7-1.6-1.7s.7-1.6 1.6-1.6c.9 0 1.6.7 1.6 1.6 0 1-.7 1.7-1.6 1.7zM30.4 3.7c-.7-.2-1.4-.5-1.4-1s.4-.7 1-.7.9.5.9.9V3h1.7v-.1c0-1.3-1.1-2.2-2.6-2.2-1.6 0-2.6.8-2.6 2.1 0 1.5 1.3 1.9 2.4 2.3.7.2 1.4.4 1.4.9s-.3.8-1.1.8c-.7 0-1.1-.4-1.1-1v-.1h-1.7v.1c0 1.5 1.1 2.4 2.8 2.4 1.7 0 2.7-.8 2.7-2.2-.1-1.5-1.4-2-2.4-2.3z\" />\n </g>\n </svg>\n );\n }\n\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n role={'img'}\n aria-labelledby={uuid}\n viewBox=\"0 0 502 220\"\n className={className}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Logo}\n >\n <title id={uuid}>{'Helsenorge'}</title>\n <g fill={getColor(color)}>\n <path d=\"M39.8 2.5v26.9H17V2.5H1v69.9h16V43.6h22.8v28.8h16.1V2.5zM250.3 58.6V2.5h-16v69.9h43.5V58.6zM142.9 122.5c-16.1 0-27.4 13.6-27.4 33.1s11.2 33.1 27.4 33.1 27.4-13.6 27.4-33.1-11.3-33.1-27.4-33.1zm19 33.1c0 11.9-5 25.9-19 25.9s-19-13.9-19-25.9c0-11.9 5-25.9 19-25.9s19 14 19 25.9zM501 40c0-19.1-11.1-32.4-27-32.4-16.4 0-27.4 13.3-27.4 33.1 0 19.5 11.5 33.1 28 33.1 12.2 0 21.4-6 24.7-16.2l.5-1.6h-8.3l-.3.7c-2.8 6.2-8.8 9.8-16.6 9.8-12.9 0-18.5-11.5-19.5-22.7H501V40zm-8.3-3.2h-37.6c1-10.8 6.5-21.9 18.9-21.9 13.2 0 18.3 12.6 18.7 21.9zM30.4 122.4c-10.8 0-16.6 6.7-19.5 11.8v-9.9H3.3v62.6h8.1v-31.4c0-8.4 4.4-25.7 18.1-25.7 14 0 15.9 12 15.9 25v32.1h8.1v-32.1c.1-16.1-2.7-32.4-23.1-32.4zM134.3 59V43H157V30h-22.7V15.9H165V2.5h-46.4v69.9h47.3V59zM466.7 173.4v-16h22.7v-13h-22.7v-14.1h30.7v-13.4H451v69.9h47.3v-13.4zM246.7 140.5v-16.3h-7.6v62.6h8.1v-37.6l27.3-19.6v-9zM393.5 120.6l-14.7 10.5c-4.4-5.6-11.2-8.7-18.8-8.7-13.6 0-23.6 9.8-23.6 23.3 0 10.6 6.2 19.1 16 22.2l-16 17.5c-4 4.6-5.7 8.3-5.7 12.7 0 12.6 11.1 20.7 28.2 20.7 16.9 0 28.3-8.3 28.3-20.7 0-12.5-11.1-20.6-28.3-20.6-1.7 0-3.9.2-5.6.5l8-9c12.9-.7 22.2-10.4 22.2-23.3 0-2.8-.4-5.5-1.2-7.8 0-.1-.1-.2-.1-.3l11.2-8.1v-8.9zm-34.4 64.2c12.1 0 20 5.2 20 13.4s-7.8 13.5-20 13.5c-12.1 0-19.9-5.3-19.9-13.5 0-7.8 8.3-13.4 19.9-13.4zm.9-23c-8.8 0-15.2-6.8-15.2-16 0-9.3 6.4-16 15.2-16s15.2 6.7 15.2 16c0 9.2-6.4 16-15.2 16zM366.7 30.3c-6.6-2.3-13.5-4.7-13.5-9.2 0-4.8 4.2-7 9.3-7 5.4 0 9 4.5 9 8.5v.8h16.2v-.6c0-13-10.2-21.7-25.4-21.7-15.3 0-24.9 7.8-24.9 20.4 0 14.7 13.1 18.4 22.9 21.9 6.5 2.4 13.6 4.3 13.6 8.7 0 4.6-3.4 8-10.6 8-6.5 0-10.9-3.8-10.9-9.4v-.8h-16.7v.8c0 14.5 10.3 23.1 27.5 23.1 16.5 0 26-7.6 26-21.5 0-14.4-12.5-18.5-22.5-22z\" />\n </g>\n </svg>\n );\n};\n\nexport default Logo;\n"],"names":["Logo","size","color","byline","className","testId","uuid","useUuid","React","AnalyticsId","getColor","Logo$1"],"mappings":";;;;AAqBA,MAAMA,IAA4B,CAAC,EAAE,MAAAC,IAAO,KAAK,OAAAC,IAAQ,SAAS,QAAAC,IAAS,IAAO,WAAAC,GAAW,QAAAC,QAAa;AACxG,QAAMC,IAAOC;AAEb,SAAIJ,IAEAK,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAOP;AAAA,MACP,MAAM;AAAA,MACN,mBAAiBK;AAAA,MACjB,SAAQ;AAAA,MACR,WAAAF;AAAA,MACA,eAAaC;AAAA,MACb,oBAAkBI,EAAY;AAAA,IAAA;AAAA,IAE7BD,gBAAAA,EAAA,cAAA,SAAA,EAAM,IAAIF,EAAA,GAAO,YAAa;AAAA,IAC/BE,gBAAAA,EAAA,cAAC,KAAE,EAAA,MAAME,EAASR,CAAK,KACpBM,gBAAAA,EAAA,cAAA,QAAA,EAAK,GAAE,wxCAAwxC,CAAA,CAClyC;AAAA,EAAA,IAMJA,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,OAAOP;AAAA,MACP,MAAM;AAAA,MACN,mBAAiBK;AAAA,MACjB,SAAQ;AAAA,MACR,WAAAF;AAAA,MACA,eAAaC;AAAA,MACb,oBAAkBI,EAAY;AAAA,IAAA;AAAA,IAE7BD,gBAAAA,EAAA,cAAA,SAAA,EAAM,IAAIF,EAAA,GAAO,YAAa;AAAA,IAC/BE,gBAAAA,EAAA,cAAC,KAAE,EAAA,MAAME,EAASR,CAAK,KACpBM,gBAAAA,EAAA,cAAA,QAAA,EAAK,GAAE,gqDAAgqD,CAAA,CAC1qD;AAAA,EAAA;AAGN,GAEAG,IAAeX;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./Logo").LogoProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
color: "black";
|
|
15
|
+
size: number;
|
|
16
|
+
byline: false;
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
color: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: import("../../theme/palette").PaletteNames[];
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
byline: {
|
|
27
|
+
control: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
export declare const Default: Story;
|
|
34
|
+
export declare const Sizes: Story;
|
|
35
|
+
export declare const Colors: Story;
|
|
36
|
+
export declare const Byline: Story;
|
|
37
|
+
//# sourceMappingURL=Logo.stories.d.ts.map
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { ModalSize } from './Modal';
|
|
4
|
+
import { ModalVariants } from './Modal';
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: {
|
|
8
|
+
(props: import("./Modal").ModalProps): JSX.Element;
|
|
9
|
+
defaultProps: {
|
|
10
|
+
variant: ModalVariants;
|
|
11
|
+
primaryButtonText: string;
|
|
12
|
+
titleId: string;
|
|
13
|
+
className: string;
|
|
14
|
+
size: ModalSize;
|
|
15
|
+
zIndex: import("../../constants").ZIndex;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
parameters: {
|
|
19
|
+
docs: {
|
|
20
|
+
description: {
|
|
21
|
+
component: string;
|
|
22
|
+
};
|
|
23
|
+
page: () => React.JSX.Element;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
args: {
|
|
27
|
+
variant: ModalVariants.normal;
|
|
28
|
+
size: ModalSize.large;
|
|
29
|
+
title: string;
|
|
30
|
+
description: string;
|
|
31
|
+
primaryButtonText: string;
|
|
32
|
+
secondaryButtonText: string;
|
|
33
|
+
};
|
|
34
|
+
argTypes: {
|
|
35
|
+
variant: {
|
|
36
|
+
control: string;
|
|
37
|
+
options: typeof ModalVariants;
|
|
38
|
+
};
|
|
39
|
+
size: {
|
|
40
|
+
control: string;
|
|
41
|
+
options: typeof ModalSize;
|
|
42
|
+
};
|
|
43
|
+
title: {
|
|
44
|
+
control: string;
|
|
45
|
+
};
|
|
46
|
+
description: {
|
|
47
|
+
control: string;
|
|
48
|
+
};
|
|
49
|
+
primaryButtonText: {
|
|
50
|
+
control: string;
|
|
51
|
+
};
|
|
52
|
+
secondaryButtonText: {
|
|
53
|
+
control: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
export default meta;
|
|
58
|
+
type Story = StoryObj<typeof meta>;
|
|
59
|
+
export declare const Default: Story;
|
|
60
|
+
export declare const ModalWithIcon: Story;
|
|
61
|
+
export declare const ModalWithChildrenAfterTitle: Story;
|
|
62
|
+
export declare const Scroll: Story;
|
|
63
|
+
export declare const WithHorizontalImage4By3: Story;
|
|
64
|
+
export declare const WithHorizontalImage16By9: Story;
|
|
65
|
+
export declare const WithVerticalImage: Story;
|
|
66
|
+
export declare const ModalWithoutCloseButton: Story;
|
|
67
|
+
export declare const ModalWithDisabledButton: Story;
|
|
68
|
+
export declare const ModalWithOnlyTitle: Story;
|
|
69
|
+
export declare const ModalWithOnlyTitleAndNoCloseEvent: Story;
|
|
70
|
+
export declare const ModalInBottomOfPage: Story;
|
|
71
|
+
export declare const ModalWithCustomContent: Story;
|
|
72
|
+
export declare const PrintModal: Story;
|
|
73
|
+
//# sourceMappingURL=Modal.stories.d.ts.map
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./NotificationPanel").NotificationPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
dismissable: false;
|
|
15
|
+
size: "large";
|
|
16
|
+
fluid: false;
|
|
17
|
+
label: string;
|
|
18
|
+
variant: "alert";
|
|
19
|
+
role: undefined;
|
|
20
|
+
};
|
|
21
|
+
argTypes: {
|
|
22
|
+
dismissable: {
|
|
23
|
+
control: string;
|
|
24
|
+
};
|
|
25
|
+
size: {
|
|
26
|
+
control: string;
|
|
27
|
+
options: string[];
|
|
28
|
+
};
|
|
29
|
+
fluid: {
|
|
30
|
+
control: string;
|
|
31
|
+
};
|
|
32
|
+
label: {
|
|
33
|
+
control: string;
|
|
34
|
+
};
|
|
35
|
+
variant: {
|
|
36
|
+
control: string;
|
|
37
|
+
options: string[];
|
|
38
|
+
};
|
|
39
|
+
role: {
|
|
40
|
+
control: string;
|
|
41
|
+
options: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
export default meta;
|
|
46
|
+
type Story = StoryObj<typeof meta>;
|
|
47
|
+
export declare const Default: Story;
|
|
48
|
+
export declare const WithoutLabel: Story;
|
|
49
|
+
export declare const AllVariants: Story;
|
|
50
|
+
export declare const Expander: Story;
|
|
51
|
+
export declare const Dismissable: Story;
|
|
52
|
+
export declare const Compact: Story;
|
|
53
|
+
export declare const WithSetWidth: Story;
|
|
54
|
+
//# sourceMappingURL=NotificationPanel.stories.d.ts.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Panel, { PanelStatus, PanelVariant } from './Panel';
|
|
4
|
+
type PanelWithAndCustomArgs = React.ComponentProps<typeof Panel> & {
|
|
5
|
+
useIcon: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: React.ForwardRefExoticComponent<import("./Panel").PanelProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
args: {
|
|
18
|
+
variant: PanelVariant.fill;
|
|
19
|
+
title: string;
|
|
20
|
+
status: PanelStatus.normal;
|
|
21
|
+
statusMessage: string;
|
|
22
|
+
buttonText: string;
|
|
23
|
+
buttonTextClose: string;
|
|
24
|
+
useIcon: false;
|
|
25
|
+
containerAsButton: false;
|
|
26
|
+
date: string;
|
|
27
|
+
time: string;
|
|
28
|
+
expanded: false;
|
|
29
|
+
renderChildrenWhenClosed: false;
|
|
30
|
+
focusable: false;
|
|
31
|
+
};
|
|
32
|
+
argTypes: {
|
|
33
|
+
variant: {
|
|
34
|
+
control: string;
|
|
35
|
+
options: typeof PanelVariant;
|
|
36
|
+
};
|
|
37
|
+
title: {
|
|
38
|
+
control: string;
|
|
39
|
+
};
|
|
40
|
+
status: {
|
|
41
|
+
control: string;
|
|
42
|
+
options: typeof PanelStatus;
|
|
43
|
+
};
|
|
44
|
+
statusMessage: {
|
|
45
|
+
control: string;
|
|
46
|
+
};
|
|
47
|
+
buttonText: {
|
|
48
|
+
control: string;
|
|
49
|
+
};
|
|
50
|
+
buttonTextClose: {
|
|
51
|
+
control: string;
|
|
52
|
+
};
|
|
53
|
+
useIcon: {
|
|
54
|
+
control: string;
|
|
55
|
+
};
|
|
56
|
+
containerAsButton: {
|
|
57
|
+
control: string;
|
|
58
|
+
};
|
|
59
|
+
date: {
|
|
60
|
+
control: string;
|
|
61
|
+
};
|
|
62
|
+
time: {
|
|
63
|
+
control: string;
|
|
64
|
+
};
|
|
65
|
+
expanded: {
|
|
66
|
+
control: string;
|
|
67
|
+
};
|
|
68
|
+
renderChildrenWhenClosed: {
|
|
69
|
+
control: string;
|
|
70
|
+
};
|
|
71
|
+
focusable: {
|
|
72
|
+
control: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export default meta;
|
|
77
|
+
type Story = StoryObj<PanelWithAndCustomArgs>;
|
|
78
|
+
export declare const Default: Story;
|
|
79
|
+
export declare const ContentA: Story;
|
|
80
|
+
export declare const ContentAAndB: Story;
|
|
81
|
+
export declare const ContentAAndBWithIconAndUrl: Story;
|
|
82
|
+
export declare const ContentHeader: Story;
|
|
83
|
+
export declare const IconAndDetails: Story;
|
|
84
|
+
export declare const AvatarAndDetails: Story;
|
|
85
|
+
export declare const Status: Story;
|
|
86
|
+
export declare const AsButton: Story;
|
|
87
|
+
export declare const WithCallback: Story;
|
|
88
|
+
export declare const NotClickable: Story;
|
|
89
|
+
//# sourceMappingURL=Panel.stories.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PanelVariant } from '../Panel';
|
|
3
|
-
interface PanelListProps {
|
|
3
|
+
export interface PanelListProps {
|
|
4
4
|
/** Panels to render inside the PanelList */
|
|
5
5
|
children?: React.ReactNode;
|
|
6
6
|
/** Changes the visual representation of the panel. Default: fill */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelList.js","sources":["../../../src/components/PanelList/PanelList.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport Panel, { PanelProps, PanelVariant } from '../Panel';\n\nimport styles from './styles.module.scss';\n\
|
|
1
|
+
{"version":3,"file":"PanelList.js","sources":["../../../src/components/PanelList/PanelList.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport Panel, { PanelProps, PanelVariant } from '../Panel';\n\nimport styles from './styles.module.scss';\n\nexport interface PanelListProps {\n /** Panels to render inside the PanelList */\n children?: React.ReactNode;\n /** Changes the visual representation of the panel. Default: fill */\n variant?: keyof typeof PanelVariant;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst isPanelComponent = (element: {} | null | undefined): element is React.ReactElement<PanelProps> =>\n React.isValidElement<PanelProps>(element) && (element as React.ReactElement).type === Panel;\n\nconst PanelList = React.forwardRef(function BadgeForwardedRef(props: PanelListProps, ref: React.ForwardedRef<HTMLDivElement>) {\n const { testId, children, variant = PanelVariant.fill } = props;\n\n const renderPanel = (panel: React.ReactElement<PanelProps>, firstChild: boolean) =>\n React.cloneElement(panel, {\n variant: variant,\n noTopBorder: variant === PanelVariant.line && !firstChild,\n className: classNames(panel.props.className, variant !== PanelVariant.line && styles['panel-list__panel']),\n });\n\n return (\n <div ref={ref} data-testid={testId} className={styles['panel-list']} data-analyticsid={AnalyticsId.PanelList}>\n {React.Children.map(children, (child, index) => (isPanelComponent(child) ? renderPanel(child, index === 0) : child))}\n </div>\n );\n});\n\nexport default PanelList;\n"],"names":["isPanelComponent","element","React","Panel","PanelList","props","ref","testId","children","variant","PanelVariant","renderPanel","panel","firstChild","classNames","styles","AnalyticsId","child","index","PanelList$1"],"mappings":";;;;;AAkBA,MAAMA,IAAmB,CAACC,MACxBC,EAAM,eAA2BD,CAAO,KAAMA,EAA+B,SAASE,GAElFC,IAAYF,EAAM,WAAW,SAA2BG,GAAuBC,GAAyC;AAC5H,QAAM,EAAE,QAAAC,GAAQ,UAAAC,GAAU,SAAAC,IAAUC,EAAa,KAAS,IAAAL,GAEpDM,IAAc,CAACC,GAAuCC,MAC1DX,EAAM,aAAaU,GAAO;AAAA,IACxB,SAAAH;AAAA,IACA,aAAaA,MAAYC,EAAa,QAAQ,CAACG;AAAA,IAC/C,WAAWC,EAAWF,EAAM,MAAM,WAAWH,MAAYC,EAAa,QAAQK,EAAO,mBAAmB,CAAC;AAAA,EAAA,CAC1G;AAEH,SACGb,gBAAAA,EAAA,cAAA,OAAA,EAAI,KAAAI,GAAU,eAAaC,GAAQ,WAAWQ,EAAO,YAAY,GAAG,oBAAkBC,EAAY,UAAA,GAChGd,EAAM,SAAS,IAAIM,GAAU,CAACS,GAAOC,MAAWlB,EAAiBiB,CAAK,IAAIN,EAAYM,GAAOC,MAAU,CAAC,IAAID,CAAM,CACrH;AAEJ,CAAC,GAEDE,IAAef;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { PanelVariant } from '../Panel';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./PanelList").PanelListProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
variant: PanelVariant.fill;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
variant: {
|
|
19
|
+
control: string;
|
|
20
|
+
options: typeof PanelVariant;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const Default: Story;
|
|
27
|
+
//# sourceMappingURL=PanelList.stories.d.ts.map
|
|
@@ -1,77 +1,89 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { IconSize as
|
|
4
|
-
import { useBreakpoint as
|
|
5
|
-
import { useHover as
|
|
6
|
-
import { useOutsideEvent as
|
|
7
|
-
import { getColor as
|
|
8
|
-
import { breakpoints as
|
|
9
|
-
import { isComponent as
|
|
10
|
-
import
|
|
11
|
-
import { Icon as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
1
|
+
import o, { useRef as a, useState as A } from "react";
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import { IconSize as k, AnalyticsId as M } from "../../constants.js";
|
|
4
|
+
import { useBreakpoint as P } from "../../hooks/useBreakpoint.js";
|
|
5
|
+
import { useHover as T } from "../../hooks/useHover.js";
|
|
6
|
+
import { useOutsideEvent as $ } from "../../hooks/useOutsideEvent.js";
|
|
7
|
+
import { getColor as x } from "../../theme/currys/color.js";
|
|
8
|
+
import { breakpoints as D } from "../../theme/grid.js";
|
|
9
|
+
import { isComponent as v } from "../../utils/component.js";
|
|
10
|
+
import G from "../Close/Close.js";
|
|
11
|
+
import { Icon as W } from "../Icon/Icon.js";
|
|
12
|
+
import X from "../Icons/VerticalDots.js";
|
|
13
|
+
import I from "../LinkList/LinkList.js";
|
|
14
|
+
import j from "../PopOver/PopOver.js";
|
|
15
15
|
import r from "./styles.module.scss";
|
|
16
|
-
var
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
children:
|
|
20
|
-
popOverClassName:
|
|
21
|
-
popMenuClassName:
|
|
22
|
-
openButtonTestId:
|
|
23
|
-
closeButtonTestId:
|
|
24
|
-
popOverTestId:
|
|
25
|
-
popMenuVariant:
|
|
26
|
-
openButtonAriaLabel:
|
|
27
|
-
closeButtonAriaLabel:
|
|
28
|
-
} =
|
|
29
|
-
[r[`pop-menu-button--${
|
|
30
|
-
}),
|
|
31
|
-
|
|
32
|
-
const { isHovered:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
16
|
+
var q = /* @__PURE__ */ ((n) => (n.onWhite = "on-white", n.onGray = "on-gray", n.onBlueberry = "on-blueberry", n))(q || {});
|
|
17
|
+
const F = (n) => {
|
|
18
|
+
const m = a(null), i = a(null), c = a(null), [s, l] = A(!1), {
|
|
19
|
+
children: u,
|
|
20
|
+
popOverClassName: B,
|
|
21
|
+
popMenuClassName: N,
|
|
22
|
+
openButtonTestId: y,
|
|
23
|
+
closeButtonTestId: E,
|
|
24
|
+
popOverTestId: O,
|
|
25
|
+
popMenuVariant: f = "on-white",
|
|
26
|
+
openButtonAriaLabel: h,
|
|
27
|
+
closeButtonAriaLabel: L
|
|
28
|
+
} = n, d = p(r["pop-menu-button"], {
|
|
29
|
+
[r[`pop-menu-button--${f}`]]: f
|
|
30
|
+
}), b = P() < D.md;
|
|
31
|
+
$(c, () => l(!s));
|
|
32
|
+
const { isHovered: R } = T(i), S = b ? k.XSmall : k.Small, _ = (e) => {
|
|
33
|
+
l(!1), e && e();
|
|
34
|
+
}, g = () => {
|
|
35
|
+
if (v(u, I))
|
|
36
|
+
return /* @__PURE__ */ o.createElement(
|
|
37
|
+
j,
|
|
36
38
|
{
|
|
37
|
-
testId:
|
|
38
|
-
className:
|
|
39
|
+
testId: O,
|
|
40
|
+
className: p(r["pop-menu__pop-over"], B),
|
|
39
41
|
arrowClassName: r["pop-menu__pop-over-arrow"],
|
|
40
|
-
controllerRef:
|
|
41
|
-
popOverRef:
|
|
42
|
+
controllerRef: m,
|
|
43
|
+
popOverRef: c
|
|
42
44
|
},
|
|
43
|
-
|
|
45
|
+
o.Children.map(
|
|
46
|
+
u,
|
|
47
|
+
(e) => o.cloneElement(e, {
|
|
48
|
+
children: o.Children.map(
|
|
49
|
+
e.props.children,
|
|
50
|
+
(t) => v(t, I.Link) ? o.cloneElement(t, {
|
|
51
|
+
onClick: (z) => _(() => t.props.onClick && t.props.onClick(z))
|
|
52
|
+
}) : t
|
|
53
|
+
)
|
|
54
|
+
})
|
|
55
|
+
)
|
|
44
56
|
);
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
},
|
|
57
|
+
}, C = (e, t) => {
|
|
58
|
+
t && t.stopPropagation(), l(e);
|
|
59
|
+
}, w = /* @__PURE__ */ o.createElement(
|
|
48
60
|
"button",
|
|
49
61
|
{
|
|
50
|
-
ref:
|
|
51
|
-
"data-testid":
|
|
52
|
-
className:
|
|
53
|
-
"aria-label":
|
|
54
|
-
onClick: (
|
|
62
|
+
ref: i,
|
|
63
|
+
"data-testid": y,
|
|
64
|
+
className: d,
|
|
65
|
+
"aria-label": h || "Se mer",
|
|
66
|
+
onClick: (e) => C(!0, e),
|
|
55
67
|
type: "button"
|
|
56
68
|
},
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
),
|
|
59
|
-
|
|
69
|
+
/* @__PURE__ */ o.createElement(W, { svgIcon: X, className: "test", color: x("black"), size: S, isHovered: R })
|
|
70
|
+
), H = /* @__PURE__ */ o.createElement(
|
|
71
|
+
G,
|
|
60
72
|
{
|
|
61
|
-
ariaLabel:
|
|
73
|
+
ariaLabel: L,
|
|
62
74
|
color: "black",
|
|
63
|
-
className:
|
|
64
|
-
testId:
|
|
65
|
-
ref:
|
|
66
|
-
onClick: (
|
|
67
|
-
small:
|
|
75
|
+
className: d,
|
|
76
|
+
testId: E,
|
|
77
|
+
ref: m,
|
|
78
|
+
onClick: (e) => C(!1, e),
|
|
79
|
+
small: b
|
|
68
80
|
}
|
|
69
81
|
);
|
|
70
|
-
return /* @__PURE__ */
|
|
71
|
-
},
|
|
82
|
+
return /* @__PURE__ */ o.createElement("div", { className: p(r["pop-menu-button"], N), "data-analyticsid": M.PopMenu }, s ? H : w, s && g());
|
|
83
|
+
}, me = F;
|
|
72
84
|
export {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
85
|
+
F as PopMenu,
|
|
86
|
+
q as PopMenuVariant,
|
|
87
|
+
me as default
|
|
76
88
|
};
|
|
77
89
|
//# sourceMappingURL=PopMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopMenu.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Close from '../Close';\nimport Icon from '../Icon';\nimport VerticalDots from '../Icons/VerticalDots';\nimport LinkList, { LinkListProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const closeRef = useRef<HTMLButtonElement>(null);\n const openRef = useRef<HTMLButtonElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n useOutsideEvent(popOverRef, () => setIsOpen(!isOpen));\n const { isHovered: openButtonIsHovered } = useHover(openRef);\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={closeRef}\n popOverRef={popOverRef}\n >\n {children}\n </PopOver>\n );\n }\n };\n\n const handleOnClick = (isOpen: boolean, e?: React.MouseEvent<HTMLElement, MouseEvent>): void => {\n e && e.stopPropagation();\n setIsOpen(isOpen);\n };\n\n const openButton = (\n <button\n ref={openRef}\n data-testid={openButtonTestId}\n className={buttonClasses}\n aria-label={openButtonAriaLabel || 'Se mer'}\n onClick={(e
|
|
1
|
+
{"version":3,"file":"PopMenu.js","sources":["../../../src/components/PopMenu/PopMenu.tsx"],"sourcesContent":["import React, { useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useOutsideEvent } from '../../hooks/useOutsideEvent';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { isComponent } from '../../utils/component';\nimport Close from '../Close';\nimport Icon from '../Icon';\nimport VerticalDots from '../Icons/VerticalDots';\nimport LinkList, { LinkListProps, LinkProps } from '../LinkList';\nimport PopOver from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport enum PopMenuVariant {\n onWhite = 'on-white',\n onGray = 'on-gray',\n onBlueberry = 'on-blueberry',\n}\n\nexport interface PopMenuProps {\n /** Content shown inside PopOver. Can only be a LinkList */\n children: React.ReactElement<LinkListProps>;\n /** Adds custom classes to the popover element. */\n popOverClassName?: string;\n /** Adds custom classes to the element. */\n popMenuClassName?: string;\n /** Changes responsive design for the trigger buttons. */\n popMenuVariant?: PopMenuVariant;\n /** Sets the data-testid attribute for the button that opens. */\n openButtonTestId?: string;\n /** Sets the data-testid attribute for the button that closes. */\n closeButtonTestId?: string;\n /** Sets the data-testid attribute for the popover. */\n popOverTestId?: string;\n /** Sets the arial-label attribute for the openButton. */\n openButtonAriaLabel?: string;\n /** Sets the arial-label attribute for the closeButton. */\n closeButtonAriaLabel?: string;\n}\n\nexport const PopMenu: React.FC<PopMenuProps> = (props: PopMenuProps) => {\n const closeRef = useRef<HTMLButtonElement>(null);\n const openRef = useRef<HTMLButtonElement>(null);\n const popOverRef = useRef<HTMLDivElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const {\n children,\n popOverClassName,\n popMenuClassName,\n openButtonTestId,\n closeButtonTestId,\n popOverTestId,\n popMenuVariant = PopMenuVariant.onWhite,\n openButtonAriaLabel,\n closeButtonAriaLabel,\n } = props;\n const buttonClasses = classNames(styles['pop-menu-button'], {\n [styles[`pop-menu-button--${popMenuVariant}`]]: popMenuVariant,\n });\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n useOutsideEvent(popOverRef, () => setIsOpen(!isOpen));\n const { isHovered: openButtonIsHovered } = useHover(openRef);\n const mobileIconSize = mobile ? IconSize.XSmall : IconSize.Small;\n\n const handleClick = (cb?: () => void): void => {\n setIsOpen(false);\n cb && cb();\n };\n\n const renderChildren = () => {\n if (isComponent<LinkListProps>(children, LinkList)) {\n return (\n <PopOver\n testId={popOverTestId}\n className={classNames(styles['pop-menu__pop-over'], popOverClassName)}\n arrowClassName={styles['pop-menu__pop-over-arrow']}\n controllerRef={closeRef}\n popOverRef={popOverRef}\n >\n {React.Children.map(children, child =>\n React.cloneElement(child, {\n children: React.Children.map(child.props.children, child =>\n isComponent<LinkProps>(child, LinkList.Link)\n ? React.cloneElement(child, {\n onClick: (event: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>) =>\n handleClick(() => child.props.onClick && child.props.onClick(event)),\n })\n : child\n ),\n })\n )}\n </PopOver>\n );\n }\n };\n\n const handleOnClick = (isOpen: boolean, e?: React.MouseEvent<HTMLElement, MouseEvent>): void => {\n e && e.stopPropagation();\n setIsOpen(isOpen);\n };\n\n const openButton = (\n <button\n ref={openRef}\n data-testid={openButtonTestId}\n className={buttonClasses}\n aria-label={openButtonAriaLabel || 'Se mer'}\n onClick={(e): void => handleOnClick(true, e)}\n type=\"button\"\n >\n <Icon svgIcon={VerticalDots} className=\"test\" color={getColor('black')} size={mobileIconSize} isHovered={openButtonIsHovered} />\n </button>\n );\n\n const closeButton = (\n <Close\n ariaLabel={closeButtonAriaLabel}\n color=\"black\"\n className={buttonClasses}\n testId={closeButtonTestId}\n ref={closeRef}\n onClick={(e): void => handleOnClick(false, e)}\n small={mobile}\n />\n );\n\n return (\n <div className={classNames(styles['pop-menu-button'], popMenuClassName)} data-analyticsid={AnalyticsId.PopMenu}>\n {!isOpen ? openButton : closeButton}\n {isOpen && renderChildren()}\n </div>\n );\n};\n\nexport default PopMenu;\n"],"names":["PopMenuVariant","PopMenu","props","closeRef","useRef","openRef","popOverRef","isOpen","setIsOpen","useState","children","popOverClassName","popMenuClassName","openButtonTestId","closeButtonTestId","popOverTestId","popMenuVariant","openButtonAriaLabel","closeButtonAriaLabel","buttonClasses","classNames","styles","mobile","useBreakpoint","breakpoints","useOutsideEvent","openButtonIsHovered","useHover","mobileIconSize","IconSize","handleClick","cb","renderChildren","isComponent","LinkList","React","PopOver","child","event","handleOnClick","e","openButton","Icon","VerticalDots","getColor","closeButton","Close","AnalyticsId","PopMenu$1"],"mappings":";;;;;;;;;;;;;;;AAmBY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,YACVA,EAAA,SAAS,WACTA,EAAA,cAAc,gBAHJA,IAAAA,KAAA,CAAA,CAAA;AA2BC,MAAAC,IAAkC,CAACC,MAAwB;AAChE,QAAAC,IAAWC,EAA0B,IAAI,GACzCC,IAAUD,EAA0B,IAAI,GACxCE,IAAaF,EAAuB,IAAI,GACxC,CAACG,GAAQC,CAAS,IAAIC,EAAS,EAAK,GACpC;AAAA,IACJ,UAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,gBAAAC,IAAiB;AAAA,IACjB,qBAAAC;AAAA,IACA,sBAAAC;AAAA,EACE,IAAAhB,GACEiB,IAAgBC,EAAWC,EAAO,iBAAiB,GAAG;AAAA,IAC1D,CAACA,EAAO,oBAAoBL,CAAc,EAAE,CAAC,GAAGA;AAAA,EAAA,CACjD,GAEKM,IADaC,MACSC,EAAY;AACxC,EAAAC,EAAgBnB,GAAY,MAAME,EAAU,CAACD,CAAM,CAAC;AACpD,QAAM,EAAE,WAAWmB,EAAoB,IAAIC,EAAStB,CAAO,GACrDuB,IAAiBN,IAASO,EAAS,SAASA,EAAS,OAErDC,IAAc,CAACC,MAA0B;AAC7C,IAAAvB,EAAU,EAAK,GACfuB,KAAMA,EAAG;AAAA,EAAA,GAGLC,IAAiB,MAAM;AACvB,QAAAC,EAA2BvB,GAAUwB,CAAQ;AAE7C,aAAAC,gBAAAA,EAAA;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,QAAQrB;AAAA,UACR,WAAWK,EAAWC,EAAO,oBAAoB,GAAGV,CAAgB;AAAA,UACpE,gBAAgBU,EAAO,0BAA0B;AAAA,UACjD,eAAelB;AAAA,UACf,YAAAG;AAAA,QAAA;AAAA,QAEC6B,EAAM,SAAS;AAAA,UAAIzB;AAAA,UAAU,CAAA2B,MAC5BF,EAAM,aAAaE,GAAO;AAAA,YACxB,UAAUF,EAAM,SAAS;AAAA,cAAIE,EAAM,MAAM;AAAA,cAAU,CAAAA,MACjDJ,EAAuBI,GAAOH,EAAS,IAAI,IACvCC,EAAM,aAAaE,GAAO;AAAA,gBACxB,SAAS,CAACC,MACRR,EAAY,MAAMO,EAAM,MAAM,WAAWA,EAAM,MAAM,QAAQC,CAAK,CAAC;AAAA,cACtE,CAAA,IACDD;AAAAA,YACN;AAAA,UAAA,CACD;AAAA,QACH;AAAA,MAAA;AAAA,EAGN,GAGIE,IAAgB,CAAChC,GAAiBiC,MAAwD;AAC9F,IAAAA,KAAKA,EAAE,mBACPhC,EAAUD,CAAM;AAAA,EAAA,GAGZkC,IACJN,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK9B;AAAA,MACL,eAAaQ;AAAA,MACb,WAAWM;AAAA,MACX,cAAYF,KAAuB;AAAA,MACnC,SAAS,CAAC,MAAYsB,EAAc,IAAM,CAAC;AAAA,MAC3C,MAAK;AAAA,IAAA;AAAA,IAEJJ,gBAAAA,EAAA,cAAAO,GAAA,EAAK,SAASC,GAAc,WAAU,QAAO,OAAOC,EAAS,OAAO,GAAG,MAAMhB,GAAgB,WAAWF,GAAqB;AAAA,EAAA,GAI5HmB,IACJV,gBAAAA,EAAA;AAAA,IAACW;AAAA,IAAA;AAAA,MACC,WAAW5B;AAAA,MACX,OAAM;AAAA,MACN,WAAWC;AAAA,MACX,QAAQL;AAAA,MACR,KAAKX;AAAA,MACL,SAAS,CAAC,MAAYoC,EAAc,IAAO,CAAC;AAAA,MAC5C,OAAOjB;AAAA,IAAA;AAAA,EAAA;AAIX,yCACG,OAAI,EAAA,WAAWF,EAAWC,EAAO,iBAAiB,GAAGT,CAAgB,GAAG,oBAAkBmC,EAAY,WACnGxC,IAAsBsC,IAAbJ,GACVlC,KAAUyB,GACb;AAEJ,GAEAgB,KAAe/C;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { PopMenuVariant } from './PopMenu';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("./PopMenu").PopMenuProps>;
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
popMenuVariant: PopMenuVariant.onWhite;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
popMenuVariant: {
|
|
19
|
+
control: string;
|
|
20
|
+
options: typeof PopMenuVariant;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const Default: Story;
|
|
27
|
+
export declare const HorizontalScroll: Story;
|
|
28
|
+
export declare const CenteredOverflow: Story;
|
|
29
|
+
//# sourceMappingURL=PopMenu.stories.d.ts.map
|
|
@@ -26,6 +26,8 @@ export interface PopOverProps {
|
|
|
26
26
|
role?: PopOverRole;
|
|
27
27
|
/** Sets the data-testid attribute. */
|
|
28
28
|
testId?: string;
|
|
29
|
+
/** Overrides the default z-index of PopOver */
|
|
30
|
+
zIndex?: number;
|
|
29
31
|
}
|
|
30
32
|
declare const PopOver: React.ForwardRefExoticComponent<PopOverProps & React.RefAttributes<HTMLDivElement | SVGSVGElement>>;
|
|
31
33
|
export default PopOver;
|