@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":"HelpQuestion.js","sources":["../../../src/components/HelpQuestion/HelpQuestion.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Trigger from '../Trigger';\n\nimport styles from './styles.module.scss';\n\
|
|
1
|
+
{"version":3,"file":"HelpQuestion.js","sources":["../../../src/components/HelpQuestion/HelpQuestion.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Trigger from '../Trigger';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpQuestionProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-controls'> {\n /**\n * Help question contents\n */\n children: string;\n /**\n * Indicates that the help question is in use.\n */\n selected?: boolean;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Sets the data-testid attribute.\n */\n testId?: string;\n}\n\nconst HelpQuestion = React.forwardRef<HTMLButtonElement, HelpQuestionProps>(\n ({ children, selected = false, className, onClick, testId }, ref) => {\n const { isHovered, refObject } = usePseudoClasses<HTMLButtonElement>();\n\n const classes = classNames(styles.helpquestion, selected && styles['helpquestion--selected'], className);\n\n return (\n <button\n type=\"button\"\n data-testid={testId}\n className={classes}\n onClick={onClick}\n ref={mergeRefs([ref, refObject])}\n aria-expanded={selected}\n data-analyticsid={AnalyticsId.HelpQuestion}\n >\n <Trigger variant=\"help\" htmlMarkup=\"span\" selected={selected} isHovered={isHovered} />\n {children}\n </button>\n );\n }\n);\n\nHelpQuestion.displayName = 'HelpQuestion';\n\nexport default HelpQuestion;\n"],"names":["HelpQuestion","React","children","selected","className","onClick","testId","ref","isHovered","refObject","usePseudoClasses","classes","classNames","styles","mergeRefs","AnalyticsId","Trigger","HelpQuestion$1"],"mappings":";;;;;;;AA8BA,MAAMA,IAAeC,EAAM;AAAA,EACzB,CAAC,EAAE,UAAAC,GAAU,UAAAC,IAAW,IAAO,WAAAC,GAAW,SAAAC,GAAS,QAAAC,EAAO,GAAGC,MAAQ;AACnE,UAAM,EAAE,WAAAC,GAAW,WAAAC,EAAU,IAAIC,EAAoC,GAE/DC,IAAUC,EAAWC,EAAO,cAAcV,KAAYU,EAAO,wBAAwB,GAAGT,CAAS;AAGrG,WAAAH,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,eAAaK;AAAA,QACb,WAAWK;AAAA,QACX,SAAAN;AAAA,QACA,KAAKS,EAAU,CAACP,GAAKE,CAAS,CAAC;AAAA,QAC/B,iBAAeN;AAAA,QACf,oBAAkBY,EAAY;AAAA,MAAA;AAAA,sCAE7BC,GAAQ,EAAA,SAAQ,QAAO,YAAW,QAAO,UAAAb,GAAoB,WAAAK,GAAsB;AAAA,MACnFN;AAAA,IAAA;AAAA,EAGP;AACF;AAEAF,EAAa,cAAc;AAE3B,MAAAiB,IAAejB;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./HelpQuestion").HelpQuestionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
children: string;
|
|
15
|
+
selected: false;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
children: {
|
|
19
|
+
control: string;
|
|
20
|
+
};
|
|
21
|
+
selected: {
|
|
22
|
+
control: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Default: Story;
|
|
29
|
+
//# sourceMappingURL=HelpQuestion.stories.d.ts.map
|
|
@@ -10,7 +10,7 @@ export declare enum HighlightBoxSize {
|
|
|
10
10
|
fluid = "fluid"
|
|
11
11
|
}
|
|
12
12
|
export type HighlightBoxTags = Exclude<keyof HTMLElementTagNameMap, 'dir' | 'font' | 'frame' | 'frameset' | 'marquee' | 'applet' | 'basefont'>;
|
|
13
|
-
interface HighlightBoxProps {
|
|
13
|
+
export interface HighlightBoxProps {
|
|
14
14
|
/** What's in the box? */
|
|
15
15
|
children: React.ReactNode;
|
|
16
16
|
/** Changes the background color. Default: white */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighlightBox.js","sources":["../../../src/components/HighlightBox/HighlightBox.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint, Breakpoint } from '../..';\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\nimport Icon, { SvgIcon, IconSize } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport LazyIcon from '../LazyIcon';\nimport Title, { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type HighlightBoxColors = Extract<PaletteNames, 'white' | 'neutral' | 'blueberry' | 'cherry'>;\n\nexport enum HighlightBoxSize {\n medium = 'medium',\n large = 'large',\n fluid = 'fluid',\n}\n\nexport type HighlightBoxTags = Exclude<\n keyof HTMLElementTagNameMap,\n 'dir' | 'font' | 'frame' | 'frameset' | 'marquee' | 'applet' | 'basefont'\n>;\n\
|
|
1
|
+
{"version":3,"file":"HighlightBox.js","sources":["../../../src/components/HighlightBox/HighlightBox.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint, Breakpoint } from '../..';\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\nimport Icon, { SvgIcon, IconSize } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\nimport LazyIcon from '../LazyIcon';\nimport Title, { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type HighlightBoxColors = Extract<PaletteNames, 'white' | 'neutral' | 'blueberry' | 'cherry'>;\n\nexport enum HighlightBoxSize {\n medium = 'medium',\n large = 'large',\n fluid = 'fluid',\n}\n\nexport type HighlightBoxTags = Exclude<\n keyof HTMLElementTagNameMap,\n 'dir' | 'font' | 'frame' | 'frameset' | 'marquee' | 'applet' | 'basefont'\n>;\n\nexport interface HighlightBoxProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Changes the background color. Default: white */\n color?: HighlightBoxColors;\n /** Changes the size. Default: medium */\n size?: keyof typeof HighlightBoxSize;\n /** Adds an icon to the highlightbox. */\n svgIcon?: SvgIcon | IconName;\n /** Changes the underlying element. Default: div */\n htmlMarkup?: HighlightBoxTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the content-wrapper */\n contentWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Element that is set after the icon-element in the DOM, often a title-element */\n title?: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\ninterface WrapperProps {\n className: string;\n size?: keyof typeof HighlightBoxSize;\n}\n\nconst Wrapper: React.FC<WrapperProps> = ({ className, size, children }) => (\n <div className={className} data-testid={'highlightbox-wrapper'}>\n <div className={styles.highlightbox__row}>\n <div className={classNames(styles.highlightbox__col, size === HighlightBoxSize.medium && styles['highlightbox__col--offset'])}>\n {children}\n </div>\n </div>\n </div>\n);\n\ninterface ContentWrapperProps {\n children: React.ReactNode;\n className?: string;\n}\n\nconst ContentWrapper: React.FC<ContentWrapperProps> = props => {\n const { children, className } = props;\n const contentWrapperClasses = classNames(styles['highlightbox__content-wrapper'], className);\n\n return (\n <div className={contentWrapperClasses}>\n <div className={classNames(styles.highlightbox__row)}>{children}</div>\n </div>\n );\n};\n\nconst HighlightBox: React.FC<HighlightBoxProps> = props => {\n const {\n children,\n color = 'white',\n size = HighlightBoxSize.medium,\n testId,\n svgIcon,\n htmlMarkup = 'div',\n className,\n contentWrapperClassName,\n title,\n titleHtmlMarkup = 'h2',\n } = props;\n const breakpoint = useBreakpoint();\n\n const containerClassName = classNames(\n styles['highlightbox'],\n styles[`highlightbox--${color}`],\n styles[`highlightbox--${size}`],\n svgIcon && styles['highlightbox--has-icon'],\n { container: size === 'medium' || size === 'large' },\n className\n );\n\n const renderContent = () => {\n if (svgIcon) {\n const iconSize = size === HighlightBoxSize.large && breakpoint && breakpoint >= Breakpoint.md ? IconSize.Medium : IconSize.Small;\n\n const titleElement = (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup} appearance=\"title4\">\n {title}\n </Title>\n );\n\n return (\n <>\n <div className={styles.highlightbox__icon}>\n {typeof svgIcon === 'string' ? <LazyIcon iconName={svgIcon} size={iconSize} /> : <Icon svgIcon={svgIcon} size={iconSize} />}\n {title && <div className={styles['mobile']}>{titleElement}</div>}\n </div>\n <div className={styles.highlightbox__content}>\n {title && (\n <div className={styles['desktop']} aria-hidden=\"true\">\n {titleElement}\n </div>\n )}\n {children}\n </div>\n </>\n );\n }\n\n return children;\n };\n\n const CustomTag = htmlMarkup;\n\n const contentWrapperClasses = classNames(styles['highlightbox__content-wrapper'], contentWrapperClassName);\n\n if (size === HighlightBoxSize.medium) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <CustomTag className={contentWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.HighlightBox}>\n {renderContent()}\n </CustomTag>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.large && svgIcon) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <ContentWrapper className={contentWrapperClasses}>\n <CustomTag\n className={classNames(styles.highlightbox__col, styles['highlightbox__col--large-with-icon'])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.HighlightBox}\n >\n {renderContent()}\n </CustomTag>\n </ContentWrapper>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.large) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <ContentWrapper className={contentWrapperClasses}>\n <CustomTag\n className={classNames(styles.highlightbox__col, styles['highlightbox__col--offset'])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.HighlightBox}\n >\n {renderContent()}\n </CustomTag>\n </ContentWrapper>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.fluid) {\n return (\n <CustomTag className={containerClassName} data-testid={testId}>\n {renderContent()}\n </CustomTag>\n );\n }\n\n return null;\n};\n\nexport default HighlightBox;\n"],"names":["HighlightBoxSize","Wrapper","className","size","children","React","styles","classNames","ContentWrapper","props","contentWrapperClasses","HighlightBox","color","testId","svgIcon","htmlMarkup","contentWrapperClassName","title","titleHtmlMarkup","breakpoint","useBreakpoint","containerClassName","renderContent","iconSize","Breakpoint","IconSize","titleElement","Title","LazyIcon","Icon","CustomTag","An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BA,EAAO,oCAAoC,CAAC;AAAA,MAC5F,eAAaO;AAAA,MACb,oBAAkBkB,EAAY;AAAA,IAAA;AAAA,IAE7BT,EAAc;AAAA,EAEnB,CAAA,CACF,IAIAnB,MAAS,UAETE,gBAAAA,EAAA,cAACJ,KAAQ,WAAWoB,GAAoB,MAAAlB,KACrCE,gBAAAA,EAAA,cAAAG,GAAA,EAAe,WAAWE,EACzB,GAAAL,gBAAAA,EAAA;AAAA,IAACyB;AAAA,IAAA;AAAA,MACC,WAAWvB,EAAWD,EAAO,mBAAmBA,EAAO,2BAA2B,CAAC;AAAA,MACnF,eAAaO;AAAA,MACb,oBAAkBkB,EAAY;AAAA,IAAA;AAAA,IAE7BT,EAAc;AAAA,EAEnB,CAAA,CACF,IAIAnB,MAAS,0CAER2B,GAAU,EAAA,WAAWT,GAAoB,eAAaR,EAAA,GACpDS,GACH,IAIG;AACT,GAEAU,IAAerB;"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { HighlightBoxSize } from './HighlightBox';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("./HighlightBox").HighlightBoxProps>;
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
children: string;
|
|
16
|
+
color: "white";
|
|
17
|
+
size: HighlightBoxSize.medium;
|
|
18
|
+
htmlMarkup: "div";
|
|
19
|
+
};
|
|
20
|
+
argTypes: {
|
|
21
|
+
children: {
|
|
22
|
+
control: string;
|
|
23
|
+
};
|
|
24
|
+
color: {
|
|
25
|
+
control: string;
|
|
26
|
+
options: string[];
|
|
27
|
+
};
|
|
28
|
+
size: {
|
|
29
|
+
control: string;
|
|
30
|
+
options: typeof HighlightBoxSize;
|
|
31
|
+
};
|
|
32
|
+
htmlMarkup: {
|
|
33
|
+
control: string;
|
|
34
|
+
options: string[];
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
type Story = StoryObj<typeof meta>;
|
|
40
|
+
export declare const Default: Story;
|
|
41
|
+
export declare const WithIcon: Story;
|
|
42
|
+
//# sourceMappingURL=HighlightBox.stories.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import LazyIcon from '../LazyIcon';
|
|
4
|
+
import Icon from '.';
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: React.ForwardRefExoticComponent<import("./Icon").IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
args: {
|
|
16
|
+
color: string;
|
|
17
|
+
hoverColor: string;
|
|
18
|
+
isHovered: false;
|
|
19
|
+
};
|
|
20
|
+
argTypes: {
|
|
21
|
+
color: {
|
|
22
|
+
control: string;
|
|
23
|
+
};
|
|
24
|
+
hoverColor: {
|
|
25
|
+
control: string;
|
|
26
|
+
};
|
|
27
|
+
isHovered: {
|
|
28
|
+
control: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof Icon>;
|
|
34
|
+
export declare const Default: Story;
|
|
35
|
+
export declare const Accessibility: Story;
|
|
36
|
+
type LazyIconStory = StoryObj<typeof LazyIcon>;
|
|
37
|
+
export declare const IconWall: LazyIconStory;
|
|
38
|
+
//# sourceMappingURL=Icon.stories.d.ts.map
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./Illustration").IllustrationProps & React.RefAttributes<SVGSVGElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
size: number;
|
|
15
|
+
color: "neutral";
|
|
16
|
+
ariaLabel: string;
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
size: {
|
|
20
|
+
control: string;
|
|
21
|
+
};
|
|
22
|
+
color: {
|
|
23
|
+
control: string;
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
ariaLabel: {
|
|
27
|
+
control: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default meta;
|
|
32
|
+
type Story = StoryObj<typeof meta>;
|
|
33
|
+
export declare const Default: Story;
|
|
34
|
+
//# sourceMappingURL=Illustration.stories.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import LazyIllustration from '../LazyIllustration';
|
|
4
|
+
type IllustrationWallWithAndCustomArgs = React.ComponentProps<typeof LazyIllustration> & {
|
|
5
|
+
query: string;
|
|
6
|
+
};
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: React.FC<import("../LazyIllustration").LazyIllustrationProps>;
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
args: {
|
|
18
|
+
size: number;
|
|
19
|
+
color: "neutral";
|
|
20
|
+
ariaLabel: string;
|
|
21
|
+
};
|
|
22
|
+
argTypes: {
|
|
23
|
+
query: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
control: string;
|
|
28
|
+
};
|
|
29
|
+
color: {
|
|
30
|
+
control: string;
|
|
31
|
+
options: string[];
|
|
32
|
+
};
|
|
33
|
+
ariaLabel: {
|
|
34
|
+
control: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
export default meta;
|
|
39
|
+
type Story = StoryObj<IllustrationWallWithAndCustomArgs>;
|
|
40
|
+
export declare const IllustrationWall: Story;
|
|
41
|
+
//# sourceMappingURL=Illustrations.stories.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Input, { InputProps, InputTypes } from './Input';
|
|
4
|
+
import { FormMode, FormSize } from '../../constants';
|
|
5
|
+
type InputWithAndCustomArgs = React.ComponentProps<typeof Input> & {
|
|
6
|
+
showIcon: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const meta: {
|
|
9
|
+
title: string;
|
|
10
|
+
component: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
+
parameters: {
|
|
12
|
+
docs: {
|
|
13
|
+
description: {
|
|
14
|
+
component: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
args: {
|
|
19
|
+
width: undefined;
|
|
20
|
+
size: FormSize.medium;
|
|
21
|
+
transparent: false;
|
|
22
|
+
type: InputTypes.text;
|
|
23
|
+
disabled: false;
|
|
24
|
+
mode: FormMode.onwhite;
|
|
25
|
+
showIcon: true;
|
|
26
|
+
iconRight: false;
|
|
27
|
+
readOnly: false;
|
|
28
|
+
autoComplete: string;
|
|
29
|
+
name: string;
|
|
30
|
+
required: false;
|
|
31
|
+
maxText: string;
|
|
32
|
+
};
|
|
33
|
+
argTypes: {
|
|
34
|
+
defaultValue: {
|
|
35
|
+
control: string;
|
|
36
|
+
};
|
|
37
|
+
placeholder: {
|
|
38
|
+
control: string;
|
|
39
|
+
};
|
|
40
|
+
width: {
|
|
41
|
+
control: string;
|
|
42
|
+
};
|
|
43
|
+
size: {
|
|
44
|
+
control: string;
|
|
45
|
+
options: typeof FormSize;
|
|
46
|
+
};
|
|
47
|
+
transparent: {
|
|
48
|
+
control: string;
|
|
49
|
+
};
|
|
50
|
+
type: {
|
|
51
|
+
control: string;
|
|
52
|
+
options: typeof InputTypes;
|
|
53
|
+
};
|
|
54
|
+
disabled: {
|
|
55
|
+
control: string;
|
|
56
|
+
};
|
|
57
|
+
mode: {
|
|
58
|
+
control: string;
|
|
59
|
+
options: typeof FormMode;
|
|
60
|
+
};
|
|
61
|
+
showIcon: {
|
|
62
|
+
control: string;
|
|
63
|
+
};
|
|
64
|
+
iconRight: {
|
|
65
|
+
control: string;
|
|
66
|
+
};
|
|
67
|
+
readOnly: {
|
|
68
|
+
control: string;
|
|
69
|
+
};
|
|
70
|
+
autoComplete: {
|
|
71
|
+
control: string;
|
|
72
|
+
};
|
|
73
|
+
name: {
|
|
74
|
+
control: string;
|
|
75
|
+
};
|
|
76
|
+
required: {
|
|
77
|
+
control: string;
|
|
78
|
+
};
|
|
79
|
+
maxCharacters: {
|
|
80
|
+
control: string;
|
|
81
|
+
};
|
|
82
|
+
maxText: {
|
|
83
|
+
control: string;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
export default meta;
|
|
88
|
+
type Story = StoryObj<InputWithAndCustomArgs>;
|
|
89
|
+
export declare const Default: Story;
|
|
90
|
+
export declare const MultipleExamples: Story;
|
|
91
|
+
export declare const MaxCharacters: Story;
|
|
92
|
+
export declare const AfterInputChildren: Story;
|
|
93
|
+
export declare const BaseIncrementValue: Story;
|
|
94
|
+
//# sourceMappingURL=Input.stories.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Label, { LabelProps } from './Label';
|
|
4
|
+
type LabelWithAndCustomArgs = React.ComponentProps<typeof Label> & {
|
|
5
|
+
showIcon: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare const meta: {
|
|
8
|
+
title: string;
|
|
9
|
+
component: React.FunctionComponent<LabelProps>;
|
|
10
|
+
parameters: {
|
|
11
|
+
docs: {
|
|
12
|
+
description: {
|
|
13
|
+
component: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
argTypes: {};
|
|
18
|
+
};
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<LabelWithAndCustomArgs>;
|
|
21
|
+
export declare const Default: Story;
|
|
22
|
+
export declare const OnDark: Story;
|
|
23
|
+
export declare const ChildrenAfterLabel: Story;
|
|
24
|
+
export declare const LabelAsString: Story;
|
|
25
|
+
//# sourceMappingURL=Label.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyIcon.js","sources":["../../../src/components/LazyIcon/LazyIcon.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { isServerSide } from './utils';\nimport Icon, { BaseIconProps, IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> =>\n lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n"],"names":["lazyLoadIcon","iconName","lazy","__variableDynamicImportRuntimeHelper","LazyIcon","size","IconSize","rest","icon","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Icon","LazyIcon$1"],"mappings":";;;;;;AAYa,MAAAA,IAAe,CAACC,MAC3BC,EAAc,MAAMC,EAAkC,uBAAA,OAAA,EAAA,iCAAA,MAAA,OAAA,8BAAA,GAAA,gCAAA,MAAA,OAAA,6BAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,8BAAA,MAAA,OAAA,2BAAA,GAAA,gCAAA,MAAA,OAAA,6BAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,sBAAA,MAAA,OAAA,mBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,0BAAA,MAAA,OAAA,uBAAA,GAAA,0BAAA,MAAA,OAAA,uBAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,oBAAA,MAAA,OAAA,iBAAA,GAAA,uBAAA,MAAA,OAAA,oBAAA,GAAA,oCAAA,MAAA,OAAA,iCAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,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AA,OAAA,qBAAA,GAAA,2BAAA,MAAA,OAAA,wBAAA,GAAA,iCAAA,MAAA,OAAA,8BAAA,GAAA,uBAAA,MAAA,OAAA,oBAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,6BAAA,MAAA,OAAA,0BAAA,GAAA,kBAAA,MAAA,OAAA,eAAA,GAAA,yBAAA,MAAA,OAAA,sBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,wBAAA,MAAA,OAAA,qBAAA,GAAA,qBAAA,MAAA,OAAA,kBAAA,EAAA,CAAA,GAAA,YAAAF,CAAA,MAAA,CAAA,GAE3CG,IAAoC,CAAC,EAAE,UAAAH,GAAU,MAAAI,IAAOC,EAAS,OAAO,GAAGC,QAAW;AAC3F,QAAAC,IAAOC,EAAQ,MAAMT,EAAaC,CAAQ,GAAG,CAACA,CAAQ,CAAC;AAE7D,MAAIS;AACK,WAAA;AAGT,QAAMC,IACJC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUP,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,IAAA;AAAA,EAAA;AAIZ,yCACGQ,GAAc,EAAA,UAAAF,GAAoB,OAAOV,qCACvCa,GAAS,EAAA,UAAAH,EAAA,GACPC,gBAAAA,EAAA,cAAAG,GAAA,EAAK,SAASP,GAAM,MAAAH,GAAa,GAAGE,GAAM,CAC7C,CACF;AAEJ,GAEAS,IAAeZ;"}
|
|
1
|
+
{"version":3,"file":"LazyIcon.js","sources":["../../../src/components/LazyIcon/LazyIcon.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { isServerSide } from './utils';\nimport Icon, { BaseIconProps, IconSize, SvgIcon } from '../Icon';\nimport { IconName } from '../Icons/IconNames';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> =>\n lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n"],"names":["lazyLoadIcon","iconName","lazy","__variableDynamicImportRuntimeHelper","LazyIcon","size","IconSize","rest","icon","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Icon","LazyIcon$1"],"mappings":";;;;;;AAYa,MAAAA,IAAe,CAACC,MAC3BC,EAAc,MAAMC,2/mBAAkC,YAAAF,CAAA,MAAA,CAAA,GAE3CG,IAAoC,CAAC,EAAE,UAAAH,GAAU,MAAAI,IAAOC,EAAS,OAAO,GAAGC,QAAW;AAC3F,QAAAC,IAAOC,EAAQ,MAAMT,EAAaC,CAAQ,GAAG,CAACA,CAAQ,CAAC;AAE7D,MAAIS;AACK,WAAA;AAGT,QAAMC,IACJC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUP,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,IAAA;AAAA,EAAA;AAIZ,yCACGQ,GAAc,EAAA,UAAAF,GAAoB,OAAOV,qCACvCa,GAAS,EAAA,UAAAH,EAAA,GACPC,gBAAAA,EAAA,cAAAG,GAAA,EAAK,SAASP,GAAM,MAAAH,GAAa,GAAGE,GAAM,CAC7C,CACF;AAEJ,GAEAS,IAAeZ;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./LazyIcon").LazyIconProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
iconName: "Hospital";
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
iconName: {
|
|
18
|
+
control: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
//# sourceMappingURL=LazyIcon.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyIllustration.js","sources":["../../../src/components/LazyIllustration/LazyIllustration.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport Illustration, { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationName, IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\nimport { isServerSide } from '../LazyIcon/utils';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n};\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n"],"names":["lazyLoadIllustration","illustrationName","size","sizes","IllustrationSizeList","illustrationFileName","getIllustration","lazy","__variableDynamicImportRuntimeHelper","LazyIllustration","rest","illustration","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Illustration","LazyIllustration$1"],"mappings":";;;;;;;AAaa,MAAAA,IAAuB,CAACC,GAAoCC,MAA6D;AAC9H,QAAAC,IAAQC,EAAqBH,CAAgB,GAC7CI,IAAuBC,EAAgB,EAAE,MAAAJ,GAAM,GAAGC,EAAO,CAAA;AAE/D,SAAOI,EAAsB,MAAMC,
|
|
1
|
+
{"version":3,"file":"LazyIllustration.js","sources":["../../../src/components/LazyIllustration/LazyIllustration.tsx"],"sourcesContent":["import React, { lazy, Suspense, useMemo } from 'react';\n\nimport Illustration, { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationName, IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\nimport { isServerSide } from '../LazyIcon/utils';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n};\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n\n if (isServerSide()) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n"],"names":["lazyLoadIllustration","illustrationName","size","sizes","IllustrationSizeList","illustrationFileName","getIllustration","lazy","__variableDynamicImportRuntimeHelper","LazyIllustration","rest","illustration","useMemo","isServerSide","fallback","React","ErrorBoundary","Suspense","Illustration","LazyIllustration$1"],"mappings":";;;;;;;AAaa,MAAAA,IAAuB,CAACC,GAAoCC,MAA6D;AAC9H,QAAAC,IAAQC,EAAqBH,CAAgB,GAC7CI,IAAuBC,EAAgB,EAAE,MAAAJ,GAAM,GAAGC,EAAO,CAAA;AAE/D,SAAOI,EAAsB,MAAMC,EAAA,uBAAA,OAAA,EAAA,+BAAA,MAAA,OAAA,4BAAA,GAAA,qCAAA,MAAA,OAAA,kCAAA,GAAA,oCAAA,MAAA,OAAA,iCAAA,GAAA,4CAAA,MAAA,OAAA,yCAAA,GAAA,kDAAA,MAAA,OAAA,+CAAA,GAAA,iDAAA,MAAA,OAAA,8CAAA,EAAA,CAAA,GAAA,oBAAAH,CAAA,MAAA,CAAsD;AAC3F,GAEaI,IAAoD,CAAC,EAAE,kBAAAR,GAAkB,MAAAC,IAAO,KAAK,GAAGQ,QAAW;AACxG,QAAAC,IAAeC,EAAQ,MAAMZ,EAAqBC,GAAkBC,CAAI,GAAG,CAACD,GAAkBC,CAAI,CAAC;AAEzG,MAAIW;AACK,WAAA;AAGT,QAAMC,IACJC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAa;AAAA,MACb,MAAM;AAAA,MACN,WAAW;AAAA,MACX,eAAa;AAAA,MACb,SAAQ;AAAA,MACR,OAAO,EAAE,UAAUb,GAAM,WAAWA,EAAK;AAAA,MACzC,OAAOA;AAAA,MACP,QAAQA;AAAA,IAAA;AAAA,EAAA;AAIZ,SACGa,gBAAAA,EAAA,cAAAC,GAAA,EAAc,UAAAF,GAAoB,OAAOb,KACvCc,gBAAAA,EAAA,cAAAE,GAAA,EAAS,UAAAH,KACRC,gBAAAA,EAAA,cAACG,KAAa,cAAAP,GAA4B,MAAAT,GAAa,GAAGQ,GAAM,CAClE,CACF;AAEJ,GAEAS,IAAeV;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./LazyIllustration").LazyIllustrationProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
illustrationName: "Doctor";
|
|
15
|
+
size: number;
|
|
16
|
+
color: "neutral";
|
|
17
|
+
ariaLabel: string;
|
|
18
|
+
};
|
|
19
|
+
argTypes: {
|
|
20
|
+
illustrationName: {
|
|
21
|
+
control: string;
|
|
22
|
+
};
|
|
23
|
+
size: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
color: {
|
|
27
|
+
control: string;
|
|
28
|
+
options: string[];
|
|
29
|
+
};
|
|
30
|
+
ariaLabel: {
|
|
31
|
+
control: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export default meta;
|
|
36
|
+
type Story = StoryObj<typeof meta>;
|
|
37
|
+
export declare const Default: Story;
|
|
38
|
+
//# sourceMappingURL=LazyIllustration.stories.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("./LinkList").CompoundComponent;
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
args: {
|
|
13
|
+
children: string;
|
|
14
|
+
chevron: false;
|
|
15
|
+
size: "medium";
|
|
16
|
+
color: "blueberry";
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
chevron: {
|
|
20
|
+
control: string;
|
|
21
|
+
};
|
|
22
|
+
variant: {
|
|
23
|
+
control: string;
|
|
24
|
+
options: string[];
|
|
25
|
+
};
|
|
26
|
+
size: {
|
|
27
|
+
control: string;
|
|
28
|
+
options: import("./LinkList").LinkListSize[];
|
|
29
|
+
};
|
|
30
|
+
color: {
|
|
31
|
+
control: string;
|
|
32
|
+
options: import("../../theme/palette").PaletteNames[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export default meta;
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
export declare const Default: Story;
|
|
39
|
+
export declare const WithIconAndChevron: Story;
|
|
40
|
+
export declare const WithListHeaderComp: Story;
|
|
41
|
+
export declare const WithAvatarAndBadge: Story;
|
|
42
|
+
export declare const VariantLine: Story;
|
|
43
|
+
export declare const VariantOutline: Story;
|
|
44
|
+
export declare const VariantFill: Story;
|
|
45
|
+
export declare const WithRef: Story;
|
|
46
|
+
export declare const AsButton: Story;
|
|
47
|
+
//# sourceMappingURL=LinkList.stories.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("./List").ListCompound;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
page: () => React.JSX.Element;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
children: string;
|
|
16
|
+
variant: "bullet";
|
|
17
|
+
margin: false;
|
|
18
|
+
};
|
|
19
|
+
argTypes: {
|
|
20
|
+
variant: {
|
|
21
|
+
control: string;
|
|
22
|
+
options: string[];
|
|
23
|
+
};
|
|
24
|
+
margin: {
|
|
25
|
+
control: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
export declare const Default: Story;
|
|
32
|
+
export declare const Bullet: Story;
|
|
33
|
+
export declare const Dashed: Story;
|
|
34
|
+
export declare const Numbered: Story;
|
|
35
|
+
export declare const Nested: Story;
|
|
36
|
+
//# sourceMappingURL=List.stories.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./Loader").LoaderProps & React.RefAttributes<HTMLElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
color: "blueberry";
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
color: {
|
|
18
|
+
control: string;
|
|
19
|
+
options: import("../../theme/palette").PaletteNames[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export default meta;
|
|
24
|
+
type Story = StoryObj<typeof meta>;
|
|
25
|
+
export declare const Default: Story;
|
|
26
|
+
export declare const AllSizes: Story;
|
|
27
|
+
export declare const LoaderIsCentered: Story;
|
|
28
|
+
export declare const Inline: Story;
|
|
29
|
+
export declare const OverlayScreen: Story;
|
|
30
|
+
export declare const OverlayParent: Story;
|
|
31
|
+
//# sourceMappingURL=Loader.stories.d.ts.map
|