@helsenorge/designsystem-react 6.5.0 → 7.0.0-beta.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 +16 -0
- package/__mocks__/IntersectionObserver.d.ts +0 -1
- package/__mocks__/MutationObserver.d.ts +0 -1
- package/__mocks__/ResizeObserver.d.ts +0 -1
- package/__mocks__/matchMedia.d.ts +1 -3
- package/__mocks__/matchMedia.js +6 -5
- package/__mocks__/matchMedia.js.map +1 -1
- package/__mocks__/useHover.d.ts +0 -1
- package/__mocks__/useHover.js +3 -2
- package/__mocks__/useHover.js.map +1 -1
- package/__mocks__/useLayoutEvent.d.ts +0 -1
- package/__mocks__/useLayoutEvent.js +3 -2
- package/__mocks__/useLayoutEvent.js.map +1 -1
- package/__mocks__/useOutsideEvent.d.ts +0 -1
- package/__mocks__/useOutsideEvent.js +3 -2
- package/__mocks__/useOutsideEvent.js.map +1 -1
- package/__mocks__/useSize.d.ts +0 -1
- package/__mocks__/useSize.js +10 -2
- package/__mocks__/useSize.js.map +1 -1
- package/__mocks__/uuid.d.ts +0 -1
- package/__mocks__/uuid.js +4 -3
- package/__mocks__/uuid.js.map +1 -1
- package/components/AnchorLink/AnchorLink.d.ts +1 -2
- package/components/AnchorLink/AnchorLink.js.map +1 -1
- package/components/AnchorLink/AnchorLink.stories.d.ts +30 -0
- package/components/AnchorLink/index.d.ts +0 -1
- package/components/Avatar/Avatar.d.ts +0 -1
- package/components/Avatar/Avatar.stories.d.ts +34 -0
- package/components/Avatar/index.d.ts +0 -1
- package/components/Badge/Badge.d.ts +0 -1
- package/components/Badge/Badge.js +5 -6
- package/components/Badge/Badge.js.map +1 -1
- package/components/Badge/Badge.stories.d.ts +28 -0
- package/components/Badge/index.d.ts +0 -1
- package/components/Button/Button.d.ts +0 -1
- package/components/Button/Button.stories.d.ts +54 -0
- package/components/Button/index.d.ts +0 -1
- package/components/Button/styles.module.scss +2 -1
- package/components/ButtonWithModal/ButtonWithModal.d.ts +1 -2
- package/components/ButtonWithModal/ButtonWithModal.js +8 -8
- package/components/ButtonWithModal/ButtonWithModal.js.map +1 -1
- package/components/ButtonWithModal/index.d.ts +0 -1
- package/components/Checkbox/Checkbox.d.ts +0 -1
- package/components/Checkbox/Checkbox.js +18 -19
- package/components/Checkbox/Checkbox.js.map +1 -1
- package/components/Checkbox/Checkbox.stories.d.ts +53 -0
- package/components/Checkbox/index.d.ts +0 -1
- package/components/Close/Close.d.ts +0 -1
- package/components/Close/Close.stories.d.ts +28 -0
- package/components/Close/index.d.ts +0 -1
- package/components/DictionaryTrigger/DictionaryTrigger.d.ts +1 -2
- package/components/DictionaryTrigger/DictionaryTrigger.js.map +1 -1
- package/components/DictionaryTrigger/DictionaryTrigger.stories.d.ts +29 -0
- package/components/DictionaryTrigger/index.d.ts +0 -1
- package/components/Dropdown/Dropdown.d.ts +0 -1
- package/components/Dropdown/Dropdown.stories.d.ts +62 -0
- package/components/Dropdown/index.d.ts +0 -1
- package/components/Duolist/Duolist.d.ts +3 -4
- package/components/Duolist/Duolist.js +10 -11
- package/components/Duolist/Duolist.js.map +1 -1
- package/components/Duolist/Duolist.stories.d.ts +31 -0
- package/components/Duolist/index.d.ts +0 -1
- package/components/EmptyState/EmptyState.d.ts +1 -2
- package/components/EmptyState/EmptyState.js.map +1 -1
- package/components/EmptyState/EmptyState.stories.d.ts +25 -0
- package/components/EmptyState/NobodyHome.d.ts +0 -1
- package/components/EmptyState/index.d.ts +0 -1
- package/components/ErrorWrapper/ErrorWrapper.d.ts +0 -1
- package/components/ErrorWrapper/index.d.ts +0 -1
- package/components/Expander/Expander.d.ts +1 -2
- package/components/Expander/Expander.js +21 -21
- package/components/Expander/Expander.js.map +1 -1
- package/components/Expander/Expander.stories.d.ts +59 -0
- package/components/Expander/index.d.ts +0 -1
- package/components/Expander/styles.module.scss +10 -3
- package/components/ExpanderHierarchy/Expander.d.ts +0 -1
- package/components/ExpanderHierarchy/Expander.js +5 -5
- package/components/ExpanderHierarchy/Expander.js.map +1 -1
- package/components/ExpanderHierarchy/ExpanderButton.d.ts +0 -1
- package/components/ExpanderHierarchy/ExpanderButton.js +3 -3
- package/components/ExpanderHierarchy/ExpanderButton.js.map +1 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.d.ts +0 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.js +3 -3
- package/components/ExpanderHierarchy/ExpanderHierarchy.js.map +1 -1
- package/components/ExpanderHierarchy/ExpanderHierarchy.stories.d.ts +42 -0
- package/components/ExpanderHierarchy/index.d.ts +0 -1
- package/components/ExpanderHierarchy/utils.d.ts +0 -1
- package/components/ExpanderList/ExpanderList.d.ts +0 -1
- package/components/ExpanderList/ExpanderList.js +84 -81
- package/components/ExpanderList/ExpanderList.js.map +1 -1
- package/components/ExpanderList/ExpanderList.stories.d.ts +57 -0
- package/components/ExpanderList/index.d.ts +0 -1
- package/components/FormExample/FormExample.d.ts +1 -2
- package/components/FormExample/FormExample.js +50 -58
- package/components/FormExample/FormExample.js.map +1 -1
- package/components/FormExample/index.d.ts +0 -1
- package/components/FormGroup/FormGroup.d.ts +0 -1
- package/components/FormGroup/FormGroup.js +62 -71
- package/components/FormGroup/FormGroup.js.map +1 -1
- package/components/FormGroup/FormGroup.stories.d.ts +48 -0
- package/components/FormGroup/index.d.ts +0 -1
- package/components/FormLayout/FormLayout.d.ts +0 -1
- package/components/FormLayout/FormLayout.stories.d.ts +31 -0
- package/components/FormLayout/index.d.ts +0 -1
- package/components/GridExample/GridExample.d.ts +0 -1
- package/components/GridExample/index.d.ts +0 -1
- package/components/HelpBubble/HelpBubble.d.ts +0 -1
- package/components/HelpBubble/HelpBubble.stories.d.ts +41 -0
- package/components/HelpBubble/index.d.ts +0 -1
- package/components/HelpBubbleExample/HelpBubbleExample.d.ts +0 -1
- package/components/HelpBubbleExample/index.d.ts +0 -1
- package/components/HelpPanel/HelpPanel.d.ts +1 -2
- package/components/HelpPanel/HelpPanel.js.map +1 -1
- package/components/HelpPanel/HelpPanel.stories.d.ts +30 -0
- package/components/HelpPanel/index.d.ts +0 -1
- package/components/HelpQuestion/HelpQuestion.d.ts +1 -2
- package/components/HelpQuestion/HelpQuestion.js.map +1 -1
- package/components/HelpQuestion/HelpQuestion.stories.d.ts +28 -0
- package/components/HelpQuestion/index.d.ts +0 -1
- package/components/HighlightBox/HighlightBox.d.ts +2 -3
- package/components/HighlightBox/HighlightBox.js +14 -15
- package/components/HighlightBox/HighlightBox.js.map +1 -1
- package/components/HighlightBox/HighlightBox.stories.d.ts +41 -0
- package/components/HighlightBox/index.d.ts +0 -1
- package/components/HorizontalScroll/HorizontalScroll.d.ts +0 -1
- package/components/HorizontalScroll/index.d.ts +0 -1
- package/components/HorizontalScroll/styles.module.scss +4 -1
- package/components/Icon/Icon.d.ts +0 -1
- package/components/Icon/Icon.stories.d.ts +34 -0
- package/components/Icon/index.d.ts +0 -1
- package/components/Icons/ActiveMonitoring.d.ts +0 -1
- package/components/Icons/ActiveMonitoring.js +1 -1
- package/components/Icons/ActiveMonitoring.js.map +1 -1
- package/components/Icons/AcupunctureBack.d.ts +0 -1
- package/components/Icons/AcupunctureBack.js +2 -2
- package/components/Icons/AcupunctureBack.js.map +1 -1
- package/components/Icons/AdditionalIconInformation.d.ts +0 -1
- package/components/Icons/AlarmClock.d.ts +0 -1
- package/components/Icons/AlertSignFill.d.ts +0 -1
- package/components/Icons/AlertSignStroke.d.ts +0 -1
- package/components/Icons/Amputation.d.ts +0 -1
- package/components/Icons/Amputation.js +2 -2
- package/components/Icons/Amputation.js.map +1 -1
- package/components/Icons/Anxiety.d.ts +0 -1
- package/components/Icons/Anxiety.js +1 -1
- package/components/Icons/Anxiety.js.map +1 -1
- package/components/Icons/Apple.d.ts +0 -1
- package/components/Icons/Apple.js +2 -2
- package/components/Icons/Apple.js.map +1 -1
- package/components/Icons/Archive.d.ts +0 -1
- package/components/Icons/ArmFlexing.d.ts +0 -1
- package/components/Icons/ArmFlexing.js +2 -2
- package/components/Icons/ArmFlexing.js.map +1 -1
- package/components/Icons/ArrowDown.d.ts +0 -1
- package/components/Icons/ArrowLeft.d.ts +0 -1
- package/components/Icons/ArrowRight.d.ts +0 -1
- package/components/Icons/ArrowUp.d.ts +0 -1
- package/components/Icons/ArrowUpRight.d.ts +0 -1
- package/components/Icons/Attachment.d.ts +0 -1
- package/components/Icons/Atv.d.ts +0 -1
- package/components/Icons/Atv.js +1 -1
- package/components/Icons/Atv.js.map +1 -1
- package/components/Icons/Avatar.d.ts +0 -1
- package/components/Icons/AwakePersonOnPillow.d.ts +0 -1
- package/components/Icons/AwakePersonOnPillow.js +2 -2
- package/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/components/Icons/Baby.d.ts +0 -1
- package/components/Icons/Baby.js +2 -2
- package/components/Icons/Baby.js.map +1 -1
- package/components/Icons/BandAid.d.ts +0 -1
- package/components/Icons/BandAid.js +2 -2
- package/components/Icons/BandAid.js.map +1 -1
- package/components/Icons/BeerAndPills.d.ts +0 -1
- package/components/Icons/BeerAndPills.js +2 -2
- package/components/Icons/BeerAndPills.js.map +1 -1
- package/components/Icons/Bell.d.ts +0 -1
- package/components/Icons/Bell.js +2 -2
- package/components/Icons/Bell.js.map +1 -1
- package/components/Icons/Bike.d.ts +0 -1
- package/components/Icons/Bike.js +2 -2
- package/components/Icons/Bike.js.map +1 -1
- package/components/Icons/BirthControl.d.ts +0 -1
- package/components/Icons/BirthdayCake.d.ts +0 -1
- package/components/Icons/BirthdayCake.js +2 -2
- package/components/Icons/BirthdayCake.js.map +1 -1
- package/components/Icons/Boat.d.ts +0 -1
- package/components/Icons/Boat.js +2 -2
- package/components/Icons/Boat.js.map +1 -1
- package/components/Icons/Body.d.ts +0 -1
- package/components/Icons/Braille.d.ts +0 -1
- package/components/Icons/Brain.d.ts +0 -1
- package/components/Icons/Brain.js +1 -1
- package/components/Icons/Brain.js.map +1 -1
- package/components/Icons/BreastReconstruction.d.ts +0 -1
- package/components/Icons/BreastReconstruction.js +2 -2
- package/components/Icons/BreastReconstruction.js.map +1 -1
- package/components/Icons/BreastRemoval.d.ts +0 -1
- package/components/Icons/BreastRemoval.js +2 -2
- package/components/Icons/BreastRemoval.js.map +1 -1
- package/components/Icons/Breasts.d.ts +0 -1
- package/components/Icons/Breasts.js +1 -1
- package/components/Icons/Breasts.js.map +1 -1
- package/components/Icons/BrokenHeart.d.ts +0 -1
- package/components/Icons/BrokenHeart.js +2 -2
- package/components/Icons/BrokenHeart.js.map +1 -1
- package/components/Icons/BrokenPuzzle.d.ts +0 -1
- package/components/Icons/BrokenPuzzle.js +2 -2
- package/components/Icons/BrokenPuzzle.js.map +1 -1
- package/components/Icons/Bus.d.ts +0 -1
- package/components/Icons/Calendar.d.ts +0 -1
- package/components/Icons/CalendarChange.d.ts +0 -1
- package/components/Icons/CalendarCheck.d.ts +0 -1
- package/components/Icons/CalendarEvent.d.ts +0 -1
- package/components/Icons/CalendarEvent.js +2 -2
- package/components/Icons/CalendarEvent.js.map +1 -1
- package/components/Icons/CalendarSave.d.ts +0 -1
- package/components/Icons/Cancer.d.ts +0 -1
- package/components/Icons/Cancer.js +2 -2
- package/components/Icons/Cancer.js.map +1 -1
- package/components/Icons/Candle.d.ts +0 -1
- package/components/Icons/Car.d.ts +0 -1
- package/components/Icons/Car.js +2 -2
- package/components/Icons/Car.js.map +1 -1
- package/components/Icons/Change.d.ts +0 -1
- package/components/Icons/Check.d.ts +0 -1
- package/components/Icons/CheckFill.d.ts +0 -1
- package/components/Icons/CheckOutline.d.ts +0 -1
- package/components/Icons/CheckOutline.js +2 -2
- package/components/Icons/CheckOutline.js.map +1 -1
- package/components/Icons/Chest.d.ts +0 -1
- package/components/Icons/Chest.js +2 -2
- package/components/Icons/Chest.js.map +1 -1
- package/components/Icons/ChevronDown.d.ts +0 -1
- package/components/Icons/ChevronLeft.d.ts +0 -1
- package/components/Icons/ChevronRight.d.ts +0 -1
- package/components/Icons/ChevronUp.d.ts +0 -1
- package/components/Icons/ChevronsDown.d.ts +0 -1
- package/components/Icons/ChevronsUp.d.ts +0 -1
- package/components/Icons/ChildPlaying.d.ts +0 -1
- package/components/Icons/ChildPlaying.js +2 -2
- package/components/Icons/ChildPlaying.js.map +1 -1
- package/components/Icons/Cigarette.d.ts +0 -1
- package/components/Icons/Cigarette.js +2 -2
- package/components/Icons/Cigarette.js.map +1 -1
- package/components/Icons/Coins.d.ts +0 -1
- package/components/Icons/Coins.js +2 -2
- package/components/Icons/Coins.js.map +1 -1
- package/components/Icons/Contacts.d.ts +0 -1
- package/components/Icons/Copy.d.ts +0 -1
- package/components/Icons/CoronaCertificate.d.ts +0 -1
- package/components/Icons/CoronaCertificate.js +2 -2
- package/components/Icons/CoronaCertificate.js.map +1 -1
- package/components/Icons/Coronavirus.d.ts +0 -1
- package/components/Icons/Coronavirus.js +2 -2
- package/components/Icons/Coronavirus.js.map +1 -1
- package/components/Icons/Cough.d.ts +0 -1
- package/components/Icons/Cough.js +2 -2
- package/components/Icons/Cough.js.map +1 -1
- package/components/Icons/CriticalHealthInfo.d.ts +0 -1
- package/components/Icons/CriticalHealthInfo.js +2 -2
- package/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/components/Icons/Cross.d.ts +0 -1
- package/components/Icons/Cross.js +2 -2
- package/components/Icons/Cross.js.map +1 -1
- package/components/Icons/DataExchange.d.ts +0 -1
- package/components/Icons/DataReceived.d.ts +0 -1
- package/components/Icons/DataSent.d.ts +0 -1
- package/components/Icons/Depression.d.ts +0 -1
- package/components/Icons/Depression.js +2 -2
- package/components/Icons/Depression.js.map +1 -1
- package/components/Icons/DigestiveSystem.d.ts +0 -1
- package/components/Icons/DigestiveSystem.js +2 -2
- package/components/Icons/DigestiveSystem.js.map +1 -1
- package/components/Icons/Dizzy.d.ts +0 -1
- package/components/Icons/Dizzy.js +2 -2
- package/components/Icons/Dizzy.js.map +1 -1
- package/components/Icons/Documents.d.ts +0 -1
- package/components/Icons/Documents.js +2 -2
- package/components/Icons/Documents.js.map +1 -1
- package/components/Icons/Dog.d.ts +0 -1
- package/components/Icons/Dog.js +2 -2
- package/components/Icons/Dog.js.map +1 -1
- package/components/Icons/DonorCard.d.ts +0 -1
- package/components/Icons/DonorCard.js +2 -2
- package/components/Icons/DonorCard.js.map +1 -1
- package/components/Icons/Download.d.ts +0 -1
- package/components/Icons/Draft.d.ts +0 -1
- package/components/Icons/Draft.js +2 -2
- package/components/Icons/Draft.js.map +1 -1
- package/components/Icons/EChat.d.ts +0 -1
- package/components/Icons/Ear.d.ts +0 -1
- package/components/Icons/EarDeaf.d.ts +0 -1
- package/components/Icons/EarHearingAid.d.ts +0 -1
- package/components/Icons/EarNoseThroat.d.ts +0 -1
- package/components/Icons/EarNoseThroat.js +2 -2
- package/components/Icons/EarNoseThroat.js.map +1 -1
- package/components/Icons/EarVolume.d.ts +0 -1
- package/components/Icons/ElderlyPerson.d.ts +0 -1
- package/components/Icons/ElderlyPerson.js +2 -2
- package/components/Icons/ElderlyPerson.js.map +1 -1
- package/components/Icons/Embolization.d.ts +0 -1
- package/components/Icons/Embolization.js +2 -2
- package/components/Icons/Embolization.js.map +1 -1
- package/components/Icons/EmergencyCall.d.ts +0 -1
- package/components/Icons/EmoticonAnnoyed.d.ts +0 -1
- package/components/Icons/EmoticonDelighted.d.ts +0 -1
- package/components/Icons/EmoticonDisappointed.d.ts +0 -1
- package/components/Icons/EmoticonHappy.d.ts +0 -1
- package/components/Icons/EmoticonMeh.d.ts +0 -1
- package/components/Icons/EnterFullScreen.d.ts +0 -1
- package/components/Icons/Envelope.d.ts +0 -1
- package/components/Icons/Epilepsy.d.ts +0 -1
- package/components/Icons/Epilepsy.js +2 -2
- package/components/Icons/Epilepsy.js.map +1 -1
- package/components/Icons/Eraser.d.ts +0 -1
- package/components/Icons/ErrorSignFill.d.ts +0 -1
- package/components/Icons/ErrorSignStroke.d.ts +0 -1
- package/components/Icons/EuropeanHealthCard.d.ts +0 -1
- package/components/Icons/EuropeanHealthCard.js +2 -2
- package/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/components/Icons/ExitFullScreen.d.ts +0 -1
- package/components/Icons/Eye.d.ts +0 -1
- package/components/Icons/Facebook.d.ts +0 -1
- package/components/Icons/Facebook.js +2 -2
- package/components/Icons/Facebook.js.map +1 -1
- package/components/Icons/FallingLeaf.d.ts +0 -1
- package/components/Icons/Female.d.ts +0 -1
- package/components/Icons/Female.js +2 -2
- package/components/Icons/Female.js.map +1 -1
- package/components/Icons/FemaleDoctor.d.ts +0 -1
- package/components/Icons/FemaleDoctor.js +2 -2
- package/components/Icons/FemaleDoctor.js.map +1 -1
- package/components/Icons/Ferry.d.ts +0 -1
- package/components/Icons/Ferry.js +2 -2
- package/components/Icons/Ferry.js.map +1 -1
- package/components/Icons/File.d.ts +0 -1
- package/components/Icons/Filter.d.ts +0 -1
- package/components/Icons/FingerBleed.d.ts +0 -1
- package/components/Icons/FingerBleed.js +2 -2
- package/components/Icons/FingerBleed.js.map +1 -1
- package/components/Icons/FirstAidKit.d.ts +0 -1
- package/components/Icons/FirstAidKit.js +2 -2
- package/components/Icons/FirstAidKit.js.map +1 -1
- package/components/Icons/FloppyDisk.d.ts +0 -1
- package/components/Icons/Football.d.ts +0 -1
- package/components/Icons/Football.js +2 -2
- package/components/Icons/Football.js.map +1 -1
- package/components/Icons/Form.d.ts +0 -1
- package/components/Icons/Forward.d.ts +0 -1
- package/components/Icons/Gallery.d.ts +0 -1
- package/components/Icons/Garden.d.ts +0 -1
- package/components/Icons/Garden.js +2 -2
- package/components/Icons/Garden.js.map +1 -1
- package/components/Icons/GasCan.d.ts +0 -1
- package/components/Icons/GasCan.js +2 -2
- package/components/Icons/GasCan.js.map +1 -1
- package/components/Icons/GenderIdentity.d.ts +0 -1
- package/components/Icons/Glasses.d.ts +0 -1
- package/components/Icons/Globe.d.ts +0 -1
- package/components/Icons/Graph.d.ts +0 -1
- package/components/Icons/Group.d.ts +0 -1
- package/components/Icons/GroupTwins.d.ts +0 -1
- package/components/Icons/HTMLFile.d.ts +0 -1
- package/components/Icons/HandWaving.d.ts +0 -1
- package/components/Icons/HandWaving.js +2 -2
- package/components/Icons/HandWaving.js.map +1 -1
- package/components/Icons/HandWithDisease.d.ts +0 -1
- package/components/Icons/HandWithDisease.js +2 -2
- package/components/Icons/HandWithDisease.js.map +1 -1
- package/components/Icons/HandsAndHeart.d.ts +0 -1
- package/components/Icons/HealthClinic.d.ts +0 -1
- package/components/Icons/HealthClinic.js +2 -2
- package/components/Icons/HealthClinic.js.map +1 -1
- package/components/Icons/HealthWarning.d.ts +0 -1
- package/components/Icons/HealthWarning.js +2 -2
- package/components/Icons/HealthWarning.js.map +1 -1
- package/components/Icons/HealthcarePerson.d.ts +0 -1
- package/components/Icons/HealthcarePersonell.d.ts +0 -1
- package/components/Icons/HearingProtection.d.ts +0 -1
- package/components/Icons/Heart.d.ts +0 -1
- package/components/Icons/HeartHands.d.ts +0 -1
- package/components/Icons/HelpSign.d.ts +0 -1
- package/components/Icons/HelpingHand.d.ts +0 -1
- package/components/Icons/HelpingHand.js +2 -2
- package/components/Icons/HelpingHand.js.map +1 -1
- package/components/Icons/Hemodialysis.d.ts +0 -1
- package/components/Icons/Hemodialysis.js +2 -2
- package/components/Icons/Hemodialysis.js.map +1 -1
- package/components/Icons/Hiker.d.ts +0 -1
- package/components/Icons/Hiker.js +2 -2
- package/components/Icons/Hiker.js.map +1 -1
- package/components/Icons/Hipprosthesis.d.ts +0 -1
- package/components/Icons/Hipprosthesis.js +2 -2
- package/components/Icons/Hipprosthesis.js.map +1 -1
- package/components/Icons/History.d.ts +0 -1
- package/components/Icons/HivAndAids.d.ts +0 -1
- package/components/Icons/HivAndAids.js +2 -2
- package/components/Icons/HivAndAids.js.map +1 -1
- package/components/Icons/Home.d.ts +0 -1
- package/components/Icons/Hormone.d.ts +0 -1
- package/components/Icons/Hormone.js +2 -2
- package/components/Icons/Hormone.js.map +1 -1
- package/components/Icons/Hospital.d.ts +0 -1
- package/components/Icons/Hourglass.d.ts +0 -1
- package/components/Icons/IconNames.d.ts +0 -1
- package/components/Icons/ImgFile.d.ts +0 -1
- package/components/Icons/ImgFile.js +1 -1
- package/components/Icons/ImgFile.js.map +1 -1
- package/components/Icons/Inbox.d.ts +0 -1
- package/components/Icons/Inbox.js +2 -2
- package/components/Icons/Inbox.js.map +1 -1
- package/components/Icons/InfoSignFill.d.ts +0 -1
- package/components/Icons/InfoSignStroke.d.ts +0 -1
- package/components/Icons/Instagram.d.ts +0 -1
- package/components/Icons/Instagram.js +2 -2
- package/components/Icons/Instagram.js.map +1 -1
- package/components/Icons/Intravenous.d.ts +0 -1
- package/components/Icons/Intravenous.js +2 -2
- package/components/Icons/Intravenous.js.map +1 -1
- package/components/Icons/JointPain.d.ts +0 -1
- package/components/Icons/JointPain.js +2 -2
- package/components/Icons/JointPain.js.map +1 -1
- package/components/Icons/Journal.d.ts +0 -1
- package/components/Icons/JpgFile.d.ts +0 -1
- package/components/Icons/JpgFile.js +2 -2
- package/components/Icons/JpgFile.js.map +1 -1
- package/components/Icons/Kidney.d.ts +0 -1
- package/components/Icons/Kidney.js +2 -2
- package/components/Icons/Kidney.js.map +1 -1
- package/components/Icons/KitchenScale.d.ts +0 -1
- package/components/Icons/KitchenScale.js +4 -4
- package/components/Icons/KitchenScale.js.map +1 -1
- package/components/Icons/Kjernejournal.d.ts +0 -1
- package/components/Icons/Kjernejournal.js +2 -2
- package/components/Icons/Kjernejournal.js.map +1 -1
- package/components/Icons/Laboratory.d.ts +0 -1
- package/components/Icons/Laboratory.js +2 -2
- package/components/Icons/Laboratory.js.map +1 -1
- package/components/Icons/LaptopBlog.d.ts +0 -1
- package/components/Icons/LaptopBlog.js +1 -1
- package/components/Icons/LaptopBlog.js.map +1 -1
- package/components/Icons/LawBook.d.ts +0 -1
- package/components/Icons/LawBook.js +2 -2
- package/components/Icons/LawBook.js.map +1 -1
- package/components/Icons/LegalDocument.d.ts +0 -1
- package/components/Icons/LightBulb.d.ts +0 -1
- package/components/Icons/LightBulb.js +2 -2
- package/components/Icons/LightBulb.js.map +1 -1
- package/components/Icons/List.d.ts +0 -1
- package/components/Icons/Location.d.ts +0 -1
- package/components/Icons/Lock.d.ts +0 -1
- package/components/Icons/Login.d.ts +0 -1
- package/components/Icons/Logout.d.ts +0 -1
- package/components/Icons/Lungs.d.ts +0 -1
- package/components/Icons/Lungs.js +2 -2
- package/components/Icons/Lungs.js.map +1 -1
- package/components/Icons/Makeup.d.ts +0 -1
- package/components/Icons/Makeup.js +2 -2
- package/components/Icons/Makeup.js.map +1 -1
- package/components/Icons/MaleDoctor.d.ts +0 -1
- package/components/Icons/MaleDoctor.js +2 -2
- package/components/Icons/MaleDoctor.js.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.d.ts +0 -1
- package/components/Icons/MaleDoctorAndPerson.js +2 -2
- package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/components/Icons/MaleGenitalia.d.ts +0 -1
- package/components/Icons/MaleGenitalia.js +2 -2
- package/components/Icons/MaleGenitalia.js.map +1 -1
- package/components/Icons/Medicine.d.ts +0 -1
- package/components/Icons/MedicineWarning.d.ts +0 -1
- package/components/Icons/MedicineWarning.js +2 -2
- package/components/Icons/MedicineWarning.js.map +1 -1
- package/components/Icons/MentalHealthAdult.d.ts +0 -1
- package/components/Icons/MentalHealthAdult.js +2 -2
- package/components/Icons/MentalHealthAdult.js.map +1 -1
- package/components/Icons/MentalHealthChild.d.ts +0 -1
- package/components/Icons/MentalHealthChild.js +2 -2
- package/components/Icons/MentalHealthChild.js.map +1 -1
- package/components/Icons/Menu.d.ts +0 -1
- package/components/Icons/Microscope.d.ts +0 -1
- package/components/Icons/Microscope.js +2 -2
- package/components/Icons/Microscope.js.map +1 -1
- package/components/Icons/Minus.d.ts +0 -1
- package/components/Icons/Mirror.d.ts +0 -1
- package/components/Icons/Mirror.js +2 -2
- package/components/Icons/Mirror.js.map +1 -1
- package/components/Icons/MobilePhone.d.ts +0 -1
- package/components/Icons/MotherHoldingBaby.d.ts +0 -1
- package/components/Icons/MotherHoldingBaby.js +2 -2
- package/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/components/Icons/MuscleBack.d.ts +0 -1
- package/components/Icons/MuscleBack.js +2 -2
- package/components/Icons/MuscleBack.js.map +1 -1
- package/components/Icons/MuscleLeg.d.ts +0 -1
- package/components/Icons/MuscleLeg.js +2 -2
- package/components/Icons/MuscleLeg.js.map +1 -1
- package/components/Icons/Mushroom.d.ts +0 -1
- package/components/Icons/Mushroom.js +2 -2
- package/components/Icons/Mushroom.js.map +1 -1
- package/components/Icons/Music.d.ts +0 -1
- package/components/Icons/Music.js +2 -2
- package/components/Icons/Music.js.map +1 -1
- package/components/Icons/MusselsAndSalt.d.ts +0 -1
- package/components/Icons/MusselsAndSalt.js +2 -2
- package/components/Icons/MusselsAndSalt.js.map +1 -1
- package/components/Icons/NoAccess.d.ts +0 -1
- package/components/Icons/NoEye.d.ts +0 -1
- package/components/Icons/NoFilter.d.ts +0 -1
- package/components/Icons/Notepad.d.ts +0 -1
- package/components/Icons/Notepad.js +2 -2
- package/components/Icons/Notepad.js.map +1 -1
- package/components/Icons/Osteotomy.d.ts +0 -1
- package/components/Icons/Osteotomy.js +2 -2
- package/components/Icons/Osteotomy.js.map +1 -1
- package/components/Icons/PaintRoller.d.ts +0 -1
- package/components/Icons/PaintRoller.js +2 -2
- package/components/Icons/PaintRoller.js.map +1 -1
- package/components/Icons/PaperPlane.d.ts +0 -1
- package/components/Icons/PatientAndPerson.d.ts +0 -1
- package/components/Icons/PatientAndPerson.js +2 -2
- package/components/Icons/PatientAndPerson.js.map +1 -1
- package/components/Icons/Pause.d.ts +0 -1
- package/components/Icons/PdfFile.d.ts +0 -1
- package/components/Icons/PdfFile.js +1 -1
- package/components/Icons/PdfFile.js.map +1 -1
- package/components/Icons/Pencil.d.ts +0 -1
- package/components/Icons/PeopleTalking.d.ts +0 -1
- package/components/Icons/PeopleTalking.js +2 -2
- package/components/Icons/PeopleTalking.js.map +1 -1
- package/components/Icons/Peritonealdialysis.d.ts +0 -1
- package/components/Icons/Peritonealdialysis.js +2 -2
- package/components/Icons/Peritonealdialysis.js.map +1 -1
- package/components/Icons/Person.d.ts +0 -1
- package/components/Icons/Person.js +2 -2
- package/components/Icons/Person.js.map +1 -1
- package/components/Icons/PersonAndPatient.d.ts +0 -1
- package/components/Icons/PersonAndPatient.js +2 -2
- package/components/Icons/PersonAndPatient.js.map +1 -1
- package/components/Icons/PersonCancel.d.ts +0 -1
- package/components/Icons/PersonInXRayMachine.d.ts +0 -1
- package/components/Icons/PersonInXRayMachine.js +2 -2
- package/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/components/Icons/PersonOverweight.d.ts +0 -1
- package/components/Icons/PersonOverweight.js +2 -2
- package/components/Icons/PersonOverweight.js.map +1 -1
- package/components/Icons/PersonRelaxing.d.ts +0 -1
- package/components/Icons/PersonRelaxing.js +2 -2
- package/components/Icons/PersonRelaxing.js.map +1 -1
- package/components/Icons/PersonWithBrain.d.ts +0 -1
- package/components/Icons/PersonWithBrain.js +2 -2
- package/components/Icons/PersonWithBrain.js.map +1 -1
- package/components/Icons/PersonWithBrokenArm.d.ts +0 -1
- package/components/Icons/PersonWithBrokenArm.js +2 -2
- package/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/components/Icons/PersonWithCrutches.d.ts +0 -1
- package/components/Icons/PersonWithCrutches.js +2 -2
- package/components/Icons/PersonWithCrutches.js.map +1 -1
- package/components/Icons/PersonWithJaw.d.ts +0 -1
- package/components/Icons/PersonWithJaw.js +2 -2
- package/components/Icons/PersonWithJaw.js.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.d.ts +0 -1
- package/components/Icons/PersonWithMagnifyingGlass.js +2 -2
- package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/components/Icons/PersonWithSenses.d.ts +0 -1
- package/components/Icons/PersonWithSenses.js +2 -2
- package/components/Icons/PersonWithSenses.js.map +1 -1
- package/components/Icons/PersonWorking.d.ts +0 -1
- package/components/Icons/PersonWorking.js +2 -2
- package/components/Icons/PersonWorking.js.map +1 -1
- package/components/Icons/PersonalPlan.d.ts +0 -1
- package/components/Icons/PizzaSlice.d.ts +0 -1
- package/components/Icons/PizzaSlice.js +2 -2
- package/components/Icons/PizzaSlice.js.map +1 -1
- package/components/Icons/Plane.d.ts +0 -1
- package/components/Icons/Plane.js +2 -2
- package/components/Icons/Plane.js.map +1 -1
- package/components/Icons/Plant.d.ts +0 -1
- package/components/Icons/Plant.js +2 -2
- package/components/Icons/Plant.js.map +1 -1
- package/components/Icons/Play.d.ts +0 -1
- package/components/Icons/PlusLarge.d.ts +0 -1
- package/components/Icons/PlusSmall.d.ts +0 -1
- package/components/Icons/PngFile.d.ts +0 -1
- package/components/Icons/PngFile.js +2 -2
- package/components/Icons/PngFile.js.map +1 -1
- package/components/Icons/Podcast.d.ts +0 -1
- package/components/Icons/PoisonInformation.d.ts +0 -1
- package/components/Icons/PoisonInformation.js +2 -2
- package/components/Icons/PoisonInformation.js.map +1 -1
- package/components/Icons/Pregnant.d.ts +0 -1
- package/components/Icons/Pregnant.js +2 -2
- package/components/Icons/Pregnant.js.map +1 -1
- package/components/Icons/Printer.d.ts +0 -1
- package/components/Icons/Psychosis.d.ts +0 -1
- package/components/Icons/Psychosis.js +2 -2
- package/components/Icons/Psychosis.js.map +1 -1
- package/components/Icons/Publication.d.ts +0 -1
- package/components/Icons/Publication.js +1 -1
- package/components/Icons/Publication.js.map +1 -1
- package/components/Icons/Puzzle.d.ts +0 -1
- package/components/Icons/Puzzle.js +2 -2
- package/components/Icons/Puzzle.js.map +1 -1
- package/components/Icons/QrCode.d.ts +0 -1
- package/components/Icons/Quarrel.d.ts +0 -1
- package/components/Icons/RadioTherapy.d.ts +0 -1
- package/components/Icons/RadioTherapy.js +2 -2
- package/components/Icons/RadioTherapy.js.map +1 -1
- package/components/Icons/RadioactiveTreatment.d.ts +0 -1
- package/components/Icons/RadioactiveTreatment.js +2 -2
- package/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/components/Icons/Radioiodine.d.ts +0 -1
- package/components/Icons/Radioiodine.js +2 -2
- package/components/Icons/Radioiodine.js.map +1 -1
- package/components/Icons/Receipt.d.ts +0 -1
- package/components/Icons/Receipt.js +2 -2
- package/components/Icons/Receipt.js.map +1 -1
- package/components/Icons/Receptionist.d.ts +0 -1
- package/components/Icons/Recovery.d.ts +0 -1
- package/components/Icons/Recovery.js +2 -2
- package/components/Icons/Recovery.js.map +1 -1
- package/components/Icons/Referral.d.ts +0 -1
- package/components/Icons/Refresh.d.ts +0 -1
- package/components/Icons/Refund.d.ts +0 -1
- package/components/Icons/Refund.js +2 -2
- package/components/Icons/Refund.js.map +1 -1
- package/components/Icons/Reply.d.ts +0 -1
- package/components/Icons/Rocket.d.ts +0 -1
- package/components/Icons/Rocket.js +2 -2
- package/components/Icons/Rocket.js.map +1 -1
- package/components/Icons/RtfFile.d.ts +0 -1
- package/components/Icons/RtfFile.js +2 -2
- package/components/Icons/RtfFile.js.map +1 -1
- package/components/Icons/STDs.d.ts +0 -1
- package/components/Icons/Save.d.ts +0 -1
- package/components/Icons/Scale.d.ts +0 -1
- package/components/Icons/Scale.js +2 -2
- package/components/Icons/Scale.js.map +1 -1
- package/components/Icons/ScreenReader.d.ts +0 -1
- package/components/Icons/Search.d.ts +0 -1
- package/components/Icons/SectionSign.d.ts +0 -1
- package/components/Icons/Settings.d.ts +0 -1
- package/components/Icons/Sexualorientation.d.ts +0 -1
- package/components/Icons/ShakingHand.d.ts +0 -1
- package/components/Icons/ShakingHand.js +2 -2
- package/components/Icons/ShakingHand.js.map +1 -1
- package/components/Icons/Share.d.ts +0 -1
- package/components/Icons/Shield.d.ts +0 -1
- package/components/Icons/Shield.js +4 -4
- package/components/Icons/Shield.js.map +1 -1
- package/components/Icons/ShuntOperation.d.ts +0 -1
- package/components/Icons/ShuntOperation.js +2 -2
- package/components/Icons/ShuntOperation.js.map +1 -1
- package/components/Icons/Skeleton.d.ts +0 -1
- package/components/Icons/Skeleton.js +2 -2
- package/components/Icons/Skeleton.js.map +1 -1
- package/components/Icons/Skin.d.ts +0 -1
- package/components/Icons/Skin.js +2 -2
- package/components/Icons/Skin.js.map +1 -1
- package/components/Icons/Snake.d.ts +0 -1
- package/components/Icons/Snake.js +2 -2
- package/components/Icons/Snake.js.map +1 -1
- package/components/Icons/Snapchat.d.ts +0 -1
- package/components/Icons/Snapchat.js +2 -2
- package/components/Icons/Snapchat.js.map +1 -1
- package/components/Icons/SortDown.d.ts +0 -1
- package/components/Icons/SortUp.d.ts +0 -1
- package/components/Icons/SpeechBubble.d.ts +0 -1
- package/components/Icons/Spray.d.ts +0 -1
- package/components/Icons/Spray.js +2 -2
- package/components/Icons/Spray.js.map +1 -1
- package/components/Icons/Stopwatch.d.ts +0 -1
- package/components/Icons/Sun.d.ts +0 -1
- package/components/Icons/SupportingPerson.d.ts +0 -1
- package/components/Icons/Surgery.d.ts +0 -1
- package/components/Icons/Surgery.js +2 -2
- package/components/Icons/Surgery.js.map +1 -1
- package/components/Icons/Syringe.d.ts +0 -1
- package/components/Icons/Syringe.js +3 -3
- package/components/Icons/Syringe.js.map +1 -1
- package/components/Icons/Taxi.d.ts +0 -1
- package/components/Icons/Taxi.js +2 -2
- package/components/Icons/Taxi.js.map +1 -1
- package/components/Icons/TeddyBear.d.ts +0 -1
- package/components/Icons/TeddyBear.js +2 -2
- package/components/Icons/TeddyBear.js.map +1 -1
- package/components/Icons/Teenagers.d.ts +0 -1
- package/components/Icons/Teenagers.js +2 -2
- package/components/Icons/Teenagers.js.map +1 -1
- package/components/Icons/ThinkingAboutBaby.d.ts +0 -1
- package/components/Icons/ThinkingAboutBaby.js +2 -2
- package/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/components/Icons/Ticket.d.ts +0 -1
- package/components/Icons/Ticket.js +2 -2
- package/components/Icons/Ticket.js.map +1 -1
- package/components/Icons/TimePassing.d.ts +0 -1
- package/components/Icons/Tombstone.d.ts +0 -1
- package/components/Icons/Toolbox.d.ts +0 -1
- package/components/Icons/Tooth.d.ts +0 -1
- package/components/Icons/Tooth.js +2 -2
- package/components/Icons/Tooth.js.map +1 -1
- package/components/Icons/TotalKneeProsthesis.d.ts +0 -1
- package/components/Icons/TotalKneeProsthesis.js +2 -2
- package/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/components/Icons/Train.d.ts +0 -1
- package/components/Icons/Train.js +2 -2
- package/components/Icons/Train.js.map +1 -1
- package/components/Icons/Transplantation.d.ts +0 -1
- package/components/Icons/Transplantation.js +2 -2
- package/components/Icons/Transplantation.js.map +1 -1
- package/components/Icons/TrashCan.d.ts +0 -1
- package/components/Icons/TravelRoute.d.ts +0 -1
- package/components/Icons/TravelRoute.js +2 -2
- package/components/Icons/TravelRoute.js.map +1 -1
- package/components/Icons/TriangleX.d.ts +0 -1
- package/components/Icons/Twitter.d.ts +0 -1
- package/components/Icons/Twitter.js +2 -2
- package/components/Icons/Twitter.js.map +1 -1
- package/components/Icons/Undo.d.ts +0 -1
- package/components/Icons/UniProsthesis.d.ts +0 -1
- package/components/Icons/UniProsthesis.js +1 -1
- package/components/Icons/UniProsthesis.js.map +1 -1
- package/components/Icons/Upload.d.ts +0 -1
- package/components/Icons/UserOrganization.d.ts +0 -1
- package/components/Icons/UserOrganization.js +2 -2
- package/components/Icons/UserOrganization.js.map +1 -1
- package/components/Icons/Vaccine.d.ts +0 -1
- package/components/Icons/VerticalDots.d.ts +0 -1
- package/components/Icons/VideoCamera.d.ts +0 -1
- package/components/Icons/VideoChat.d.ts +0 -1
- package/components/Icons/Wallet.d.ts +0 -1
- package/components/Icons/Watch.d.ts +0 -1
- package/components/Icons/Website.d.ts +0 -1
- package/components/Icons/Website.js +2 -2
- package/components/Icons/Website.js.map +1 -1
- package/components/Icons/Wheelchair.d.ts +0 -1
- package/components/Icons/Wheelchair.js +2 -2
- package/components/Icons/Wheelchair.js.map +1 -1
- package/components/Icons/WheelchairActive.d.ts +0 -1
- package/components/Icons/WheelchairActive.js +2 -2
- package/components/Icons/WheelchairActive.js.map +1 -1
- package/components/Icons/Window.d.ts +0 -1
- package/components/Icons/Window.js +2 -2
- package/components/Icons/Window.js.map +1 -1
- package/components/Icons/WordDocument.d.ts +0 -1
- package/components/Icons/WordDocument.js +2 -2
- package/components/Icons/WordDocument.js.map +1 -1
- package/components/Icons/WorkSuitcase.d.ts +0 -1
- package/components/Icons/WorkSuitcase.js +2 -2
- package/components/Icons/WorkSuitcase.js.map +1 -1
- package/components/Icons/X.d.ts +0 -1
- package/components/Icons/XOutline.d.ts +0 -1
- package/components/Icons/XOutline.js +2 -2
- package/components/Icons/XOutline.js.map +1 -1
- package/components/Icons/XmlFile.d.ts +0 -1
- package/components/Icons/XmlFile.js +2 -2
- package/components/Icons/XmlFile.js.map +1 -1
- package/components/Icons/YouTube.d.ts +0 -1
- package/components/Icons/YouTube.js +2 -2
- package/components/Icons/YouTube.js.map +1 -1
- package/components/Icons/Zoom.d.ts +0 -1
- package/components/Illustration/Illustration.d.ts +0 -1
- package/components/Illustration/Illustration.stories.d.ts +33 -0
- package/components/Illustration/Illustrations.stories.d.ts +40 -0
- package/components/Illustration/index.d.ts +0 -1
- package/components/Illustration/utils.d.ts +0 -1
- package/components/Illustrations/Doctor.d.ts +0 -1
- package/components/Illustrations/DoctorMedium.d.ts +0 -1
- package/components/Illustrations/DoctorSmall.d.ts +0 -1
- package/components/Illustrations/HealthcarePersonnel.d.ts +0 -1
- package/components/Illustrations/HealthcarePersonnelMedium.d.ts +0 -1
- package/components/Illustrations/HealthcarePersonnelSmall.d.ts +0 -1
- package/components/Illustrations/IllustrationNames.d.ts +0 -1
- package/components/Input/Input.d.ts +0 -1
- package/components/Input/Input.js +30 -30
- package/components/Input/Input.js.map +1 -1
- package/components/Input/Input.stories.d.ts +93 -0
- package/components/Input/index.d.ts +0 -1
- package/components/Label/Label.d.ts +3 -4
- package/components/Label/Label.js +56 -61
- package/components/Label/Label.js.map +1 -1
- package/components/Label/Label.stories.d.ts +24 -0
- package/components/Label/SubLabel.d.ts +0 -1
- package/components/Label/index.d.ts +0 -1
- package/components/LazyIcon/ErrorBoundary.d.ts +0 -1
- package/components/LazyIcon/LazyIcon.d.ts +0 -1
- package/components/LazyIcon/LazyIcon.js.map +1 -1
- package/components/LazyIcon/LazyIcon.stories.d.ts +24 -0
- package/components/LazyIcon/index.d.ts +0 -1
- package/components/LazyIcon/utils.d.ts +0 -1
- package/components/LazyIllustration/LazyIllustration.d.ts +0 -1
- package/components/LazyIllustration/LazyIllustration.js.map +1 -1
- package/components/LazyIllustration/LazyIllustration.stories.d.ts +37 -0
- package/components/LazyIllustration/index.d.ts +0 -1
- package/components/LinkList/LinkList.d.ts +0 -1
- package/components/LinkList/LinkList.js +19 -19
- package/components/LinkList/LinkList.js.map +1 -1
- package/components/LinkList/LinkList.stories.d.ts +46 -0
- package/components/LinkList/index.d.ts +0 -1
- package/components/List/List.d.ts +0 -1
- package/components/List/List.stories.d.ts +35 -0
- package/components/List/index.d.ts +0 -1
- package/components/ListHeader/ListHeader.d.ts +1 -2
- package/components/ListHeader/ListHeader.js +67 -60
- package/components/ListHeader/ListHeader.js.map +1 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts +1 -2
- package/components/ListHeader/ListHeaderText/ListHeaderText.js +8 -8
- package/components/ListHeader/ListHeaderText/ListHeaderText.js.map +1 -1
- package/components/ListHeader/ListHeaderText/index.d.ts +0 -1
- package/components/ListHeader/index.d.ts +0 -1
- package/components/Loader/Loader.d.ts +1 -2
- package/components/Loader/Loader.js +35 -35
- package/components/Loader/Loader.js.map +1 -1
- package/components/Loader/Loader.stories.d.ts +30 -0
- package/components/Loader/index.d.ts +0 -1
- package/components/Logo/Logo.d.ts +1 -2
- package/components/Logo/Logo.js.map +1 -1
- package/components/Logo/Logo.stories.d.ts +36 -0
- package/components/Logo/index.d.ts +0 -1
- package/components/MaxCharacters/MaxCharacters.d.ts +0 -1
- package/components/Modal/Modal.d.ts +0 -1
- package/components/Modal/Modal.js +16 -16
- package/components/Modal/Modal.js.map +1 -1
- package/components/Modal/Modal.stories.d.ts +72 -0
- package/components/Modal/index.d.ts +0 -1
- package/components/NotificationPanel/DetailButton/DetailButton.d.ts +0 -1
- package/components/NotificationPanel/NotificationPanel.d.ts +0 -1
- package/components/NotificationPanel/NotificationPanel.js +54 -55
- package/components/NotificationPanel/NotificationPanel.js.map +1 -1
- package/components/NotificationPanel/NotificationPanel.stories.d.ts +53 -0
- package/components/NotificationPanel/index.d.ts +0 -1
- package/components/Panel/Panel.d.ts +0 -1
- package/components/Panel/Panel.js +31 -31
- package/components/Panel/Panel.js.map +1 -1
- package/components/Panel/Panel.stories.d.ts +88 -0
- package/components/Panel/index.d.ts +0 -1
- package/components/PanelList/PanelList.d.ts +1 -2
- package/components/PanelList/PanelList.js +10 -10
- package/components/PanelList/PanelList.js.map +1 -1
- package/components/PanelList/PanelList.stories.d.ts +26 -0
- package/components/PanelList/index.d.ts +0 -1
- package/components/PopMenu/PopMenu.d.ts +0 -1
- package/components/PopMenu/PopMenu.stories.d.ts +28 -0
- package/components/PopMenu/index.d.ts +0 -1
- package/components/PopOver/PopOver.d.ts +0 -1
- package/components/PopOver/PopOver.stories.d.ts +33 -0
- package/components/PopOver/index.d.ts +0 -1
- package/components/PopOver/utils.d.ts +0 -1
- package/components/Portal/index.d.ts +0 -1
- package/components/PromoPanel/PromoPanel.d.ts +1 -2
- package/components/PromoPanel/PromoPanel.js +1 -1
- package/components/PromoPanel/PromoPanel.js.map +1 -1
- package/components/PromoPanel/PromoPanel.stories.d.ts +43 -0
- package/components/PromoPanel/index.d.ts +0 -1
- package/components/PromoPanel/styles.module.scss +3 -1
- package/components/RadioButton/RadioButton.d.ts +0 -1
- package/components/RadioButton/RadioButton.js +21 -22
- package/components/RadioButton/RadioButton.js.map +1 -1
- package/components/RadioButton/RadioButton.stories.d.ts +56 -0
- package/components/RadioButton/index.d.ts +0 -1
- package/components/Select/Select.d.ts +0 -3
- package/components/Select/Select.js +28 -32
- package/components/Select/Select.js.map +1 -1
- package/components/Select/Select.stories.d.ts +37 -0
- package/components/Select/index.d.ts +0 -1
- package/components/ServiceMessage/ServiceMessage.d.ts +0 -1
- package/components/ServiceMessage/ServiceMessage.js +26 -31
- package/components/ServiceMessage/ServiceMessage.js.map +1 -1
- package/components/ServiceMessage/ServiceMessage.stories.d.ts +70 -0
- package/components/ServiceMessage/index.d.ts +0 -1
- package/components/SharingStatus/SharingStatus.d.ts +0 -1
- package/components/SharingStatus/SharingStatus.stories.d.ts +30 -0
- package/components/SharingStatus/index.d.ts +0 -1
- package/components/Slider/Slider.d.ts +1 -2
- package/components/Slider/Slider.js.map +1 -1
- package/components/Slider/Slider.stories.d.ts +51 -0
- package/components/Slider/index.d.ts +0 -1
- package/components/Spacer/Spacer.d.ts +1 -2
- package/components/Spacer/Spacer.js.map +1 -1
- package/components/Spacer/Spacer.stories.d.ts +16 -0
- package/components/Spacer/index.d.ts +0 -1
- package/components/StatusDot/StatusDot.d.ts +0 -1
- package/components/StatusDot/StatusDot.js +8 -9
- package/components/StatusDot/StatusDot.js.map +1 -1
- package/components/StatusDot/StatusDot.stories.d.ts +30 -0
- package/components/StatusDot/index.d.ts +0 -1
- package/components/Step/Step.d.ts +0 -1
- package/components/Step/Step.js.map +1 -1
- package/components/Step/Step.stories.d.ts +31 -0
- package/components/Step/index.d.ts +0 -1
- package/components/StepButtons/StepButtons.d.ts +0 -1
- package/components/StepButtons/StepButtons.js +8 -8
- package/components/StepButtons/StepButtons.js.map +1 -1
- package/components/StepButtons/StepButtons.stories.d.ts +18 -0
- package/components/StepButtons/index.d.ts +0 -1
- package/components/Stepper/Dot.d.ts +0 -1
- package/components/Stepper/DotList.d.ts +0 -1
- package/components/Stepper/Stepper.d.ts +0 -1
- package/components/Stepper/Stepper.js +2 -2
- package/components/Stepper/Stepper.stories.d.ts +37 -0
- package/components/Stepper/index.d.ts +0 -1
- package/components/Stepper/utils.d.ts +0 -1
- package/components/Table/Table.d.ts +0 -1
- package/components/Table/Table.stories.d.ts +89 -0
- package/components/Table/TableBody/TableBody.d.ts +0 -1
- package/components/Table/TableBody/index.d.ts +0 -1
- package/components/Table/TableCell/TableCell.d.ts +0 -1
- package/components/Table/TableCell/index.d.ts +0 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.d.ts +0 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.js +11 -13
- package/components/Table/TableExpandedRow/TableExpandedRow.js.map +1 -1
- package/components/Table/TableExpandedRow/index.d.ts +0 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.d.ts +0 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts +0 -1
- package/components/Table/TableExpanderCell/index.d.ts +0 -1
- package/components/Table/TableHead/TableHead.d.ts +0 -1
- package/components/Table/TableHead/index.d.ts +0 -1
- package/components/Table/TableHeadCell/TableHeadCell.d.ts +0 -1
- package/components/Table/TableHeadCell/index.d.ts +0 -1
- package/components/Table/TableRow/TableRow.d.ts +0 -1
- package/components/Table/TableRow/TableRow.js +24 -25
- package/components/Table/TableRow/TableRow.js.map +1 -1
- package/components/Table/TableRow/index.d.ts +0 -1
- package/components/Table/index.d.ts +0 -1
- package/components/Table/utils.d.ts +0 -1
- package/components/Table/utils.js +11 -16
- package/components/Table/utils.js.map +1 -1
- package/components/Tag/Tag.d.ts +1 -2
- package/components/Tag/Tag.js +11 -11
- package/components/Tag/Tag.js.map +1 -1
- package/components/Tag/Tag.stories.d.ts +47 -0
- package/components/Tag/index.d.ts +0 -1
- package/components/TagList/TagList.d.ts +1 -2
- package/components/TagList/TagList.js.map +1 -1
- package/components/TagList/TagList.stories.d.ts +16 -0
- package/components/TagList/index.d.ts +0 -1
- package/components/Textarea/Textarea.d.ts +1 -2
- package/components/Textarea/Textarea.js +47 -50
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.stories.d.ts +93 -0
- package/components/Textarea/index.d.ts +0 -1
- package/components/Tile/Tile.d.ts +0 -1
- package/components/Tile/Tile.stories.d.ts +39 -0
- package/components/Tile/index.d.ts +0 -1
- package/components/Title/Title.d.ts +0 -1
- package/components/Title/Title.stories.d.ts +39 -0
- package/components/Title/index.d.ts +0 -1
- package/components/Tooltip/Tooltip.d.ts +0 -1
- package/components/Tooltip/Tooltip.stories.d.ts +29 -0
- package/components/Tooltip/TooltipWord/TooltipWord.d.ts +0 -1
- package/components/Tooltip/TooltipWord/index.d.ts +0 -1
- package/components/Tooltip/index.d.ts +0 -1
- package/components/TooltipExample/TooltipExample.d.ts +0 -1
- package/components/TooltipExample/index.d.ts +0 -1
- package/components/Trigger/HelpSign.d.ts +0 -1
- package/components/Trigger/InfoSignStroke.d.ts +0 -1
- package/components/Trigger/Trigger.d.ts +0 -1
- package/components/Trigger/Trigger.js +6 -6
- package/components/Trigger/Trigger.js.map +1 -1
- package/components/Trigger/Trigger.stories.d.ts +51 -0
- package/components/Trigger/index.d.ts +0 -1
- package/components/Validation/Validation.d.ts +0 -1
- package/components/Validation/Validation.js +9 -9
- package/components/Validation/Validation.js.map +1 -1
- package/components/Validation/Validation.stories.d.ts +36 -0
- package/components/Validation/index.d.ts +0 -1
- package/constants.d.ts +0 -1
- package/hoc/withBreakpoint/index.d.ts +0 -1
- package/hoc/withBreakpoint/withBreakpoint.d.ts +0 -1
- package/hoc/withBreakpoint/withBreakpoint.stories.d.ts +17 -0
- package/hooks/useBreakpoint.d.ts +0 -1
- package/hooks/useBreakpoint.stories.d.ts +16 -0
- package/hooks/useDelayedState.d.ts +0 -1
- package/hooks/useDelayedState.stories.d.ts +27 -0
- package/hooks/useElementList.d.ts +0 -1
- package/hooks/useElementList.stories.d.ts +16 -0
- package/hooks/useEventListenerState.d.ts +1 -2
- package/hooks/useExpand.d.ts +0 -1
- package/hooks/useFocusToggle.d.ts +0 -1
- package/hooks/useFocusToggle.stories.d.ts +16 -0
- package/hooks/useFocusTrap.d.ts +0 -1
- package/hooks/useFocusTrap.stories.d.ts +16 -0
- package/hooks/useFocusableElements.d.ts +0 -1
- package/hooks/useFocusableElements.stories.d.ts +16 -0
- package/hooks/useHover.d.ts +1 -2
- package/hooks/useHover.stories.d.ts +16 -0
- package/hooks/useIcons.d.ts +0 -1
- package/hooks/useIntersectionObserver.d.ts +0 -1
- package/hooks/useIntersectionObserver.stories.d.ts +16 -0
- package/hooks/useInterval.d.ts +0 -1
- package/hooks/useInterval.stories.d.ts +16 -0
- package/hooks/useIsVisible.d.ts +0 -1
- package/hooks/useIsVisible.stories.d.ts +27 -0
- package/hooks/useKeyboardEvent.d.ts +0 -1
- package/hooks/useKeyboardEvent.stories.d.ts +16 -0
- package/hooks/useLayoutEvent.d.ts +0 -1
- package/hooks/useLayoutEvent.stories.d.ts +16 -0
- package/hooks/useOutsideEvent.d.ts +0 -1
- package/hooks/useOutsideEvent.stories.d.ts +16 -0
- package/hooks/usePrevious.d.ts +0 -1
- package/hooks/usePseudoClasses.d.ts +1 -2
- package/hooks/usePseudoClasses.stories.d.ts +16 -0
- package/hooks/useResizeObserver.d.ts +0 -1
- package/hooks/useResizeObserver.stories.d.ts +16 -0
- package/hooks/useSize.d.ts +0 -1
- package/hooks/useSize.stories.d.ts +16 -0
- package/hooks/useSticky.d.ts +0 -1
- package/hooks/useSticky.stories.d.ts +16 -0
- package/hooks/useToggle.d.ts +0 -1
- package/hooks/useUuid.d.ts +0 -1
- package/hooks/useUuid.stories.d.ts +16 -0
- package/index.d.ts +0 -1
- package/package.json +3 -3
- package/scss/_fonts.scss +43 -13
- package/theme/currys/color.d.ts +1 -2
- package/theme/currys/color.js +3 -3
- package/theme/currys/color.js.map +1 -1
- package/theme/currys/index.d.ts +0 -1
- package/theme/currys/spacing.d.ts +0 -1
- package/theme/grid.d.ts +0 -1
- package/theme/index.d.ts +0 -1
- package/theme/palette.d.ts +0 -1
- package/theme/spacers.d.ts +0 -1
- package/utils/accessibility.d.ts +0 -1
- package/utils/component.d.ts +0 -1
- package/utils/debounce.d.ts +0 -1
- package/utils/device.d.ts +0 -1
- package/utils/environment.d.ts +0 -1
- package/utils/focus.d.ts +0 -1
- package/utils/loremtext.d.ts +0 -1
- package/utils/mobile.d.ts +0 -1
- package/utils/refs.d.ts +2 -3
- package/utils/tests/accessibility.test.d.ts +1 -0
- package/utils/tests/setup-test.d.ts +7 -0
- package/utils/tests/uuid.test.d.ts +1 -0
- package/utils/tests/viewport.test.d.ts +1 -0
- package/utils/uuid.d.ts +0 -1
- package/utils/viewport.d.ts +0 -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,23 +1,19 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "react";
|
|
2
2
|
import b from "classnames";
|
|
3
3
|
import { FormMode as T, AnalyticsId as $, IconSize as q, AVERAGE_CHARACTER_WIDTH_PX as z } from "../../constants.js";
|
|
4
4
|
import { useUuid as D } from "../../hooks/useUuid.js";
|
|
5
5
|
import { getColor as v } from "../../theme/currys/color.js";
|
|
6
6
|
import F from "../ErrorWrapper/ErrorWrapper.js";
|
|
7
7
|
import { Icon as H } from "../Icon/Icon.js";
|
|
8
|
-
import
|
|
9
|
-
import { renderLabel as
|
|
8
|
+
import M from "../Icons/ChevronDown.js";
|
|
9
|
+
import { renderLabel as V } from "../Label/Label.js";
|
|
10
10
|
import e from "./styles.module.scss";
|
|
11
|
-
const
|
|
12
|
-
const r = "2rem";
|
|
13
|
-
return `calc(${o * z}px + ${r})`;
|
|
14
|
-
}, X = (o, r) => r ? v("neutral", 500) : v(o ? "cherry" : "blueberry", 600), B = t.forwardRef(function(r, c) {
|
|
11
|
+
const X = (o) => `calc(${o * z}px + 2rem)`, B = (o, t) => t ? v("neutral", 500) : v(o ? "cherry" : "blueberry", 600), G = r.forwardRef(function(t, c) {
|
|
15
12
|
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
disabled: a,
|
|
13
|
+
className: w,
|
|
14
|
+
children: y,
|
|
15
|
+
concept: C = "normal",
|
|
16
|
+
disabled: l,
|
|
21
17
|
error: h,
|
|
22
18
|
errorText: s,
|
|
23
19
|
label: E,
|
|
@@ -27,45 +23,45 @@ const V = (o) => {
|
|
|
27
23
|
testId: S,
|
|
28
24
|
width: d,
|
|
29
25
|
required: m,
|
|
30
|
-
value:
|
|
31
|
-
defaultValue:
|
|
26
|
+
value: W,
|
|
27
|
+
defaultValue: g,
|
|
32
28
|
autoComplete: p = "off",
|
|
33
|
-
...
|
|
34
|
-
} =
|
|
29
|
+
...N
|
|
30
|
+
} = t, u = D(i), f = n === "onblueberry", a = n === "oninvalid" || !!s || !!h, R = B(a, !!l), x = d ? X(d) : void 0, A = b(
|
|
35
31
|
e["select-inner-wrapper"],
|
|
36
32
|
{
|
|
37
|
-
[e["select-inner-wrapper--transparent"]]:
|
|
33
|
+
[e["select-inner-wrapper--transparent"]]: C === "transparent",
|
|
38
34
|
[e["select-inner-wrapper--on-blueberry"]]: f,
|
|
39
|
-
[e["select-inner-wrapper--invalid"]]:
|
|
40
|
-
[e["select-inner-wrapper--disabled"]]:
|
|
35
|
+
[e["select-inner-wrapper--invalid"]]: a,
|
|
36
|
+
[e["select-inner-wrapper--disabled"]]: l
|
|
41
37
|
},
|
|
42
|
-
|
|
38
|
+
w
|
|
43
39
|
), _ = b(e.select, {
|
|
44
40
|
[e["select--on-blueberry"]]: f,
|
|
45
|
-
[e["select--invalid"]]:
|
|
41
|
+
[e["select--invalid"]]: a
|
|
46
42
|
});
|
|
47
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ r.createElement(F, { errorText: s }, /* @__PURE__ */ r.createElement("div", { "data-testid": S, "data-analyticsid": $.Select, className: e["select-wrapper"], style: { maxWidth: x } }, V(E, u, n), /* @__PURE__ */ r.createElement("div", { className: A }, /* @__PURE__ */ r.createElement(H, { className: e["select-arrow"], svgIcon: M, color: R, size: q.XSmall }), /* @__PURE__ */ r.createElement(
|
|
48
44
|
"select",
|
|
49
45
|
{
|
|
50
|
-
"aria-invalid": !!
|
|
46
|
+
"aria-invalid": !!a,
|
|
51
47
|
id: u,
|
|
52
48
|
name: I,
|
|
53
49
|
className: _,
|
|
54
|
-
disabled:
|
|
50
|
+
disabled: l,
|
|
55
51
|
ref: c,
|
|
56
52
|
required: m,
|
|
57
|
-
"aria-describedby":
|
|
53
|
+
"aria-describedby": t["aria-describedby"] ?? void 0,
|
|
58
54
|
"aria-required": !!m,
|
|
59
|
-
value:
|
|
60
|
-
defaultValue:
|
|
55
|
+
value: W,
|
|
56
|
+
defaultValue: g,
|
|
61
57
|
autoComplete: p || void 0,
|
|
62
|
-
...
|
|
58
|
+
...N
|
|
63
59
|
},
|
|
64
|
-
|
|
60
|
+
y
|
|
65
61
|
))));
|
|
66
|
-
}),
|
|
62
|
+
}), Z = G;
|
|
67
63
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
G as Select,
|
|
65
|
+
Z as default
|
|
70
66
|
};
|
|
71
67
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX, FormMode, IconSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport { renderLabel } from '../Label';\n\nimport selectStyles from './styles.module.scss';\n\ntype SelectConcept = 'normal' | 'transparent';\n\nexport interface SelectProps\n extends Pick<\n React.SelectHTMLAttributes<HTMLSelectElement>,\n 'aria-describedby' | 'name' | 'disabled' | 'required' | 'value' | 'onChange' | 'autoComplete'\n > {\n /**
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../src/components/Select/Select.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX, FormMode, IconSize } from '../../constants';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport { renderLabel } from '../Label';\n\nimport selectStyles from './styles.module.scss';\n\ntype SelectConcept = 'normal' | 'transparent';\n\nexport interface SelectProps\n extends Pick<\n React.SelectHTMLAttributes<HTMLSelectElement>,\n 'aria-describedby' | 'name' | 'disabled' | 'required' | 'value' | 'onChange' | 'autoComplete'\n > {\n /** Sets the content of the select element. */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the visuals of the component */\n concept?: SelectConcept;\n /** The label text above the select */\n label?: React.ReactNode;\n /** Changes the visuals of the component */\n mode?: keyof typeof FormMode;\n /** Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** select id of the select element */\n selectId?: string;\n /** Width of select in characters (approximate) */\n width?: number;\n /** Gives defaultvalue to the comp. Preferred over selected prop on option by react */\n defaultValue?: string | number;\n}\n\nconst getSelectMaxWidth = (characters: number): string => {\n const paddingWidth = '2rem';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth})`;\n};\n\nconst getIconColor = (invalid: boolean, disabled: boolean) => {\n const iconColor = invalid ? 'cherry' : 'blueberry';\n return disabled ? getColor('neutral', 500) : getColor(iconColor, 600);\n};\n\nexport const Select = React.forwardRef(function SelectForwardedRef(props: SelectProps, ref: React.Ref<HTMLSelectElement>) {\n const {\n className,\n children,\n concept = 'normal',\n disabled,\n error,\n errorText,\n label,\n selectId,\n name = selectId,\n mode = FormMode.onwhite,\n testId,\n width,\n required,\n value,\n defaultValue,\n autoComplete = 'off',\n ...rest\n } = props;\n\n const uuid = useUuid(selectId);\n const onBlueberry = mode === 'onblueberry';\n const invalid = mode === 'oninvalid' || !!errorText || !!error;\n const iconColor = getIconColor(invalid, !!disabled);\n const maxWidth = width ? getSelectMaxWidth(width) : undefined;\n\n const selectInnerWrapperClasses = classNames(\n selectStyles['select-inner-wrapper'],\n {\n [selectStyles['select-inner-wrapper--transparent']]: concept === 'transparent',\n [selectStyles['select-inner-wrapper--on-blueberry']]: onBlueberry,\n [selectStyles['select-inner-wrapper--invalid']]: invalid,\n [selectStyles['select-inner-wrapper--disabled']]: disabled,\n },\n className\n );\n\n const selectClasses = classNames(selectStyles.select, {\n [selectStyles['select--on-blueberry']]: onBlueberry,\n [selectStyles['select--invalid']]: invalid,\n });\n\n return (\n <ErrorWrapper errorText={errorText}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Select} className={selectStyles['select-wrapper']} style={{ maxWidth }}>\n {renderLabel(label, uuid, mode as FormMode)}\n <div className={selectInnerWrapperClasses}>\n <Icon className={selectStyles['select-arrow']} svgIcon={ChevronDown} color={iconColor} size={IconSize.XSmall} />\n <select\n aria-invalid={!!invalid}\n id={uuid}\n name={name}\n className={selectClasses}\n disabled={disabled}\n ref={ref}\n required={required}\n aria-describedby={props['aria-describedby'] ?? undefined}\n aria-required={!!required}\n value={value}\n defaultValue={defaultValue}\n autoComplete={autoComplete ? autoComplete : undefined}\n {...rest}\n >\n {children}\n </select>\n </div>\n </div>\n </ErrorWrapper>\n );\n});\n\nexport default Select;\n"],"names":["getSelectMaxWidth","characters","AVERAGE_CHARACTER_WIDTH_PX","getIconColor","invalid","disabled","getColor","Select","React","props","ref","className","children","concept","error","errorText","label","selectId","name","mode","FormMode","testId","width","required","value","defaultValue","autoComplete","rest","uuid","useUuid","onBlueberry","iconColor","maxWidth","selectInnerWrapperClasses","classNames","selectStyles","selectClasses","ErrorWrapper","AnalyticsId","renderLabel","Icon","ChevronDown","IconSize","Select$1"],"mappings":";;;;;;;;;;AA6CA,MAAMA,IAAoB,CAACC,MAGlB,QAAQA,IAAaC,CAA0B,cAGlDC,IAAe,CAACC,GAAkBC,MAE/BA,IAAWC,EAAS,WAAW,GAAG,IAAIA,EAD3BF,IAAU,WAAW,aAC0B,GAAG,GAGzD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AAMT,CAAgB,GACzCX,gBAAAA,EAAA,cAAA,OAAA,EAAI,WAAWyB,EACd,GAAAzB,gBAAAA,EAAA,cAACgC,KAAK,WAAWL,EAAa,cAAc,GAAG,SAASM,GAAa,OAAOV,GAAW,MAAMW,EAAS,QAAQ,GAC9GlC,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,gBAAc,CAAC,CAACJ;AAAA,MAChB,IAAIwB;AAAA,MACJ,MAAAV;AAAA,MACA,WAAWkB;AAAA,MACX,UAAA/B;AAAA,MACA,KAAAK;AAAA,MACA,UAAAa;AAAA,MACA,oBAAkBd,EAAM,kBAAkB,KAAK;AAAA,MAC/C,iBAAe,CAAC,CAACc;AAAA,MACjB,OAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAcC,KAA8B;AAAA,MAC3C,GAAGC;AAAA,IAAA;AAAA,IAEHf;AAAA,EAEL,CAAA,CACF,CACF;AAEJ,CAAC,GAED+B,IAAepC;"}
|
|
@@ -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.ForwardRefExoticComponent<import("./Select").SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
children: React.JSX.Element;
|
|
15
|
+
label: React.JSX.Element;
|
|
16
|
+
name: string;
|
|
17
|
+
onChange: import("@storybook/addon-actions").HandlerFunction;
|
|
18
|
+
disabled: false;
|
|
19
|
+
autoComplete: string;
|
|
20
|
+
};
|
|
21
|
+
argTypes: {
|
|
22
|
+
disabled: {
|
|
23
|
+
control: string;
|
|
24
|
+
};
|
|
25
|
+
autoComplete: {
|
|
26
|
+
control: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default meta;
|
|
31
|
+
type Story = StoryObj<typeof meta>;
|
|
32
|
+
export declare const Default: Story;
|
|
33
|
+
export declare const DefaultValue: Story;
|
|
34
|
+
export declare const Disabled: Story;
|
|
35
|
+
export declare const Concepts: Story;
|
|
36
|
+
export declare const Modes: Story;
|
|
37
|
+
export declare const Width: Story;
|
|
@@ -5,7 +5,7 @@ import { useHover as h } from "../../hooks/useHover.js";
|
|
|
5
5
|
import { useUuid as y } from "../../hooks/useUuid.js";
|
|
6
6
|
import { getColor as I } from "../../theme/currys/color.js";
|
|
7
7
|
import { breakpoints as M } from "../../theme/grid.js";
|
|
8
|
-
import { palette as
|
|
8
|
+
import { palette as t } from "../../theme/palette.js";
|
|
9
9
|
import { getAriaLabelAttributes as X } from "../../utils/accessibility.js";
|
|
10
10
|
import F from "../Close/Close.js";
|
|
11
11
|
import { Icon as n } from "../Icon/Icon.js";
|
|
@@ -19,32 +19,31 @@ import B from "../Icons/InfoSignFill.js";
|
|
|
19
19
|
import q from "../Icons/TriangleX.js";
|
|
20
20
|
import D from "../Icons/X.js";
|
|
21
21
|
import r from "./styles.module.scss";
|
|
22
|
-
const G = ({ label:
|
|
23
|
-
const d = w(), { isHovered:
|
|
24
|
-
info: /* @__PURE__ */ e.createElement(n, { svgIcon: B, color:
|
|
25
|
-
warn: /* @__PURE__ */ e.createElement(n, { svgIcon: $, color:
|
|
26
|
-
alert: /* @__PURE__ */ e.createElement(n, { svgIcon: q, color:
|
|
27
|
-
success: /* @__PURE__ */ e.createElement(n, { svgIcon: L, color:
|
|
22
|
+
const G = ({ label: c, variant: l, id: m, hasExpander: s, isExpanded: i, dismissable: g, onExpand: v, onDismiss: f, closeBtnText: _ }) => {
|
|
23
|
+
const d = w(), { isHovered: o, hoverRef: p } = h(), a = d < M.lg ? N.XSmall : N.Small, C = {
|
|
24
|
+
info: /* @__PURE__ */ e.createElement(n, { svgIcon: B, color: t.blueberry700, hoverColor: t.blueberry700, size: a, isHovered: o }),
|
|
25
|
+
warn: /* @__PURE__ */ e.createElement(n, { svgIcon: $, color: t.banana700, hoverColor: t.banana700, size: a, isHovered: o }),
|
|
26
|
+
alert: /* @__PURE__ */ e.createElement(n, { svgIcon: q, color: t.cherry700, hoverColor: t.cherry700, size: a, isHovered: o }),
|
|
27
|
+
success: /* @__PURE__ */ e.createElement(n, { svgIcon: L, color: t.kiwi900, hoverColor: t.kiwi900, size: a, isHovered: o })
|
|
28
28
|
}, b = s ? "button" : "span", E = u(
|
|
29
29
|
r["service-message__label-container"],
|
|
30
|
-
r[`service-message__label-container--${t}`],
|
|
31
30
|
s && r["service-message__label-container--has-expander"]
|
|
32
31
|
);
|
|
33
|
-
return /* @__PURE__ */ e.createElement("div", { className: E, ref: p }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__container"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__row"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__col"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__label"] }, C[
|
|
32
|
+
return /* @__PURE__ */ e.createElement("div", { className: E, ref: p }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__container"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__row"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__col"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__label"] }, C[l], /* @__PURE__ */ e.createElement("h1", { className: r["service-message__title"], id: m }, /* @__PURE__ */ e.createElement(
|
|
34
33
|
b,
|
|
35
34
|
{
|
|
36
35
|
className: r["service-message__toggle"],
|
|
37
36
|
onClick: s ? v : void 0,
|
|
38
37
|
"aria-expanded": s ? i : void 0
|
|
39
38
|
},
|
|
40
|
-
|
|
41
|
-
)), s && /* @__PURE__ */ e.createElement(n, { size:
|
|
42
|
-
}, J = ({ info:
|
|
43
|
-
const { hoverRef: _, isHovered: d } = h(), { hoverRef:
|
|
44
|
-
return /* @__PURE__ */ e.createElement("div", { className: r["service-message__container"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__row"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__col"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__content"] },
|
|
39
|
+
c
|
|
40
|
+
)), s && /* @__PURE__ */ e.createElement(n, { size: a, svgIcon: i ? U : A, isHovered: o }), !s && g && /* @__PURE__ */ e.createElement(F, { onClick: f, ariaLabel: _, className: r["service-message__close"] }))))));
|
|
41
|
+
}, J = ({ info: c, extraInfo: l, urlTitle: m, url: s, target: i, dismissable: g, closeBtnText: v, onDismiss: f }) => {
|
|
42
|
+
const { hoverRef: _, isHovered: d } = h(), { hoverRef: o, isHovered: p } = h(), a = s && m;
|
|
43
|
+
return /* @__PURE__ */ e.createElement("div", { className: r["service-message__container"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__row"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__col"] }, /* @__PURE__ */ e.createElement("div", { className: r["service-message__content"] }, c && /* @__PURE__ */ e.createElement("p", { className: r["service-message__info"] }, c), l && /* @__PURE__ */ e.createElement("p", { className: u(r["service-message__info"], r["service-message__info--extra"]) }, l), /* @__PURE__ */ e.createElement("div", { className: r["service-message__actions"] }, a && /* @__PURE__ */ e.createElement("a", { className: r["service-message__action"], href: s, ref: _, target: i }, m, /* @__PURE__ */ e.createElement(n, { size: N.XSmall, svgIcon: j, color: I("blueberry", 700), isHovered: d })), g && /* @__PURE__ */ e.createElement(
|
|
45
44
|
"button",
|
|
46
45
|
{
|
|
47
|
-
ref:
|
|
46
|
+
ref: o,
|
|
48
47
|
className: u(r["service-message__action"], r["service-message__action--close"]),
|
|
49
48
|
"aria-label": v,
|
|
50
49
|
onClick: f
|
|
@@ -53,8 +52,8 @@ const G = ({ label: l, variant: t, id: m, hasExpander: s, isExpanded: i, dismiss
|
|
|
53
52
|
/* @__PURE__ */ e.createElement(n, { size: N.XSmall, svgIcon: D, color: I("blueberry", 700), isHovered: p })
|
|
54
53
|
))))));
|
|
55
54
|
}, K = ({
|
|
56
|
-
label:
|
|
57
|
-
dismissable:
|
|
55
|
+
label: c,
|
|
56
|
+
dismissable: l = !0,
|
|
58
57
|
onDismiss: m,
|
|
59
58
|
info: s,
|
|
60
59
|
extraInfo: i,
|
|
@@ -63,30 +62,26 @@ const G = ({ label: l, variant: t, id: m, hasExpander: s, isExpanded: i, dismiss
|
|
|
63
62
|
target: f = "_self",
|
|
64
63
|
closeBtnText: _ = "fjern melding",
|
|
65
64
|
expanderOpenFromStart: d = !1,
|
|
66
|
-
variant:
|
|
65
|
+
variant: o = "alert",
|
|
67
66
|
testId: p
|
|
68
67
|
}) => {
|
|
69
|
-
const [
|
|
70
|
-
E && C(!
|
|
71
|
-
}, H = u(
|
|
72
|
-
r["service-message"],
|
|
73
|
-
r[`service-message--${a}`],
|
|
74
|
-
o && r["service-message--expanded"]
|
|
75
|
-
);
|
|
68
|
+
const [a, C] = R(d), b = y(), E = !!s || !!i, S = o === "alert" ? "alert" : "region", k = X({ label: c, id: b }), z = () => {
|
|
69
|
+
E && C(!a);
|
|
70
|
+
}, H = u(r["service-message"], r[`service-message--${o}`]);
|
|
76
71
|
return /* @__PURE__ */ e.createElement("div", { className: H, role: S, ...k, "data-testid": p }, /* @__PURE__ */ e.createElement(
|
|
77
72
|
G,
|
|
78
73
|
{
|
|
79
|
-
label:
|
|
80
|
-
variant:
|
|
74
|
+
label: c,
|
|
75
|
+
variant: o,
|
|
81
76
|
id: b,
|
|
82
77
|
hasExpander: E,
|
|
83
|
-
isExpanded:
|
|
84
|
-
dismissable:
|
|
78
|
+
isExpanded: a,
|
|
79
|
+
dismissable: l,
|
|
85
80
|
onExpand: z,
|
|
86
81
|
onDismiss: m,
|
|
87
82
|
closeBtnText: _
|
|
88
83
|
}
|
|
89
|
-
), E &&
|
|
84
|
+
), E && a && /* @__PURE__ */ e.createElement(
|
|
90
85
|
J,
|
|
91
86
|
{
|
|
92
87
|
info: s,
|
|
@@ -94,7 +89,7 @@ const G = ({ label: l, variant: t, id: m, hasExpander: s, isExpanded: i, dismiss
|
|
|
94
89
|
urlTitle: g,
|
|
95
90
|
url: v,
|
|
96
91
|
target: f,
|
|
97
|
-
dismissable:
|
|
92
|
+
dismissable: l,
|
|
98
93
|
onDismiss: m,
|
|
99
94
|
closeBtnText: _
|
|
100
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceMessage.js","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"sourcesContent":["import React, { useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { palette } from '../../theme/palette';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnchorLinkTargets } from '../AnchorLink';\nimport Close from '../Close';\nimport Icon, { IconSize } from '../Icon';\nimport CheckFill from '../Icons/CheckFill';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport ErrorSignFill from '../Icons/ErrorSignFill';\nimport Forward from '../Icons/Forward';\nimport InfoSignFill from '../Icons/InfoSignFill';\nimport TriangleX from '../Icons/TriangleX';\nimport X from '../Icons/X';\nimport { NotificationPanelVariants } from '../NotificationPanel';\n\nimport styles from './styles.module.scss';\n\ninterface LabelProps {\n label: string;\n variant: NotificationPanelVariants;\n id: string;\n hasExpander: boolean;\n isExpanded: boolean;\n dismissable: boolean;\n onExpand: () => void;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Label: React.FC<LabelProps> = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {\n const breakpoint = useBreakpoint();\n const { isHovered, hoverRef } = useHover<HTMLDivElement>();\n\n const iconSize = breakpoint < breakpoints.lg ? IconSize.XSmall : IconSize.Small;\n const variantToIconMap = {\n info: (\n <Icon svgIcon={InfoSignFill} color={palette.blueberry700} hoverColor={palette.blueberry700} size={iconSize} isHovered={isHovered} />\n ),\n warn: <Icon svgIcon={ErrorSignFill} color={palette.banana700} hoverColor={palette.banana700} size={iconSize} isHovered={isHovered} />,\n alert: <Icon svgIcon={TriangleX} color={palette.cherry700} hoverColor={palette.cherry700} size={iconSize} isHovered={isHovered} />,\n success: <Icon svgIcon={CheckFill} color={palette.kiwi900} hoverColor={palette.kiwi900} size={iconSize} isHovered={isHovered} />,\n };\n const CustomTag = hasExpander ? 'button' : 'span';\n\n const labelContainerClasses = classNames(\n styles['service-message__label-container'],\n styles[`service-message__label-container--${variant}`],\n hasExpander && styles[`service-message__label-container--has-expander`]\n );\n\n return (\n <div className={labelContainerClasses} ref={hoverRef}>\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__label']}>\n {variantToIconMap[variant]}\n <h1 className={styles['service-message__title']} id={id}>\n <CustomTag\n className={styles['service-message__toggle']}\n onClick={hasExpander ? onExpand : undefined}\n aria-expanded={hasExpander ? isExpanded : undefined}\n >\n {label}\n </CustomTag>\n </h1>\n {hasExpander && <Icon size={iconSize} svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} />}\n {!hasExpander && dismissable && (\n <Close onClick={onDismiss} ariaLabel={closeBtnText} className={styles['service-message__close']} />\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface ContentProps {\n info?: string;\n extraInfo?: string;\n urlTitle?: string;\n url?: string;\n target?: AnchorLinkTargets;\n dismissable: boolean;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Content: React.FC<ContentProps> = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnText, onDismiss }) => {\n const { hoverRef: readMoreRef, isHovered: readMoreHoverRefIsHovered } = useHover<HTMLAnchorElement>();\n const { hoverRef: closeButtonRef, isHovered: closeButtonIsHovered } = useHover<HTMLButtonElement>();\n\n const hasUrl = url && urlTitle;\n\n return (\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__content']}>\n {info && <p className={styles['service-message__info']}>{info}</p>}\n {extraInfo && (\n <p className={classNames(styles['service-message__info'], styles['service-message__info--extra'])}>{extraInfo}</p>\n )}\n <div className={styles['service-message__actions']}>\n {hasUrl && (\n <a className={styles['service-message__action']} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button\n ref={closeButtonRef}\n className={classNames(styles['service-message__action'], styles['service-message__action--close'])}\n aria-label={closeBtnText}\n onClick={onDismiss}\n >\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={closeButtonIsHovered} />\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expanded */\n info?: string;\n /** String displayed in service-message when expanded, with a smaller font */\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n expanderOpenFromStart = false,\n variant = 'alert',\n testId,\n}) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const labelId = useUuid();\n const hasExpander = !!info || !!extraInfo;\n\n const ariaRole = variant === 'alert' ? 'alert' : 'region';\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: labelId });\n\n const handleClick = (): void => {\n hasExpander && setIsExpanded(!isExpanded);\n };\n\n const classes = classNames(\n styles['service-message'],\n styles[`service-message--${variant}`],\n isExpanded && styles[`service-message--expanded`]\n );\n\n return (\n <div className={classes} role={ariaRole} {...ariaLabelAttributes} data-testid={testId}>\n <Label\n label={label}\n variant={variant}\n id={labelId}\n hasExpander={hasExpander}\n isExpanded={isExpanded}\n dismissable={dismissable}\n onExpand={handleClick}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n {hasExpander && isExpanded && (\n <Content\n info={info}\n extraInfo={extraInfo}\n urlTitle={urlTitle}\n url={url}\n target={target}\n dismissable={dismissable}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n )}\n </div>\n );\n};\n\nexport default ServiceMessage;\n"],"names":["Label","label","variant","id","hasExpander","isExpanded","dismissable","onExpand","onDismiss","closeBtnText","breakpoint","useBreakpoint","isHovered","hoverRef","useHover","iconSize","breakpoints","IconSize","variantToIconMap","React","Icon","InfoSignFill","palette","ErrorSignFill","TriangleX","CheckFill","CustomTag","labelContainerClasses","classNames","styles","ChevronUp","ChevronDown","Close","Content","info","extraInfo","urlTitle","url","target","readMoreRef","readMoreHoverRefIsHovered","closeButtonRef","closeButtonIsHovered","hasUrl","Forward","getColor","X","ServiceMessage","expanderOpenFromStart","testId","setIsExpanded","useState","labelId","useUuid","ariaRole","ariaLabelAttributes","getAriaLabelAttributes","handleClick","classes","ServiceMessage$1"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,MAAMA,IAA8B,CAAC,EAAE,OAAAC,GAAO,SAAAC,GAAS,IAAAC,GAAI,aAAAC,GAAa,YAAAC,GAAY,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AAA,EAAA,GAGpCqD,IAAU9B;AAAA,IACdC,EAAO,iBAAiB;AAAA,IACxBA,EAAO,oBAAoB3B,CAAO,EAAE;AAAA,IACpCG,KAAcwB,EAAO,2BAA2B;AAAA,EAAA;AAIhD,SAAAV,gBAAAA,EAAA,cAAC,SAAI,WAAWuC,GAAS,MAAMJ,GAAW,GAAGC,GAAqB,eAAaN,EAC7E,GAAA9B,gBAAAA,EAAA;AAAA,IAACnB;AAAA,IAAA;AAAA,MACC,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,IAAIkD;AAAA,MACJ,aAAAhD;AAAA,MACA,YAAAC;AAAA,MACA,aAAAC;AAAA,MACA,UAAUmD;AAAA,MACV,WAAAjD;AAAA,MACA,cAAAC;AAAA,IAAA;AAAA,EAAA,GAEDL,KAAeC,KACdc,gBAAAA,EAAA;AAAA,IAACc;AAAA,IAAA;AAAA,MACC,MAAAC;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,MACA,KAAAC;AAAA,MACA,QAAAC;AAAA,MACA,aAAAhC;AAAA,MACA,WAAAE;AAAA,MACA,cAAAC;AAAA,IAAA;AAAA,EAAA,CAGN;AAEJ,GAEAkD,KAAeZ;"}
|
|
1
|
+
{"version":3,"file":"ServiceMessage.js","sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { palette } from '../../theme/palette';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { AnchorLinkTargets } from '../AnchorLink';\nimport Close from '../Close';\nimport Icon, { IconSize } from '../Icon';\nimport CheckFill from '../Icons/CheckFill';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport ErrorSignFill from '../Icons/ErrorSignFill';\nimport Forward from '../Icons/Forward';\nimport InfoSignFill from '../Icons/InfoSignFill';\nimport TriangleX from '../Icons/TriangleX';\nimport X from '../Icons/X';\nimport { NotificationPanelVariants } from '../NotificationPanel';\n\nimport styles from './styles.module.scss';\n\ninterface LabelProps {\n label: string;\n variant: NotificationPanelVariants;\n id: string;\n hasExpander: boolean;\n isExpanded: boolean;\n dismissable: boolean;\n onExpand: () => void;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Label: React.FC<LabelProps> = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {\n const breakpoint = useBreakpoint();\n const { isHovered, hoverRef } = useHover<HTMLDivElement>();\n\n const iconSize = breakpoint < breakpoints.lg ? IconSize.XSmall : IconSize.Small;\n const variantToIconMap = {\n info: (\n <Icon svgIcon={InfoSignFill} color={palette.blueberry700} hoverColor={palette.blueberry700} size={iconSize} isHovered={isHovered} />\n ),\n warn: <Icon svgIcon={ErrorSignFill} color={palette.banana700} hoverColor={palette.banana700} size={iconSize} isHovered={isHovered} />,\n alert: <Icon svgIcon={TriangleX} color={palette.cherry700} hoverColor={palette.cherry700} size={iconSize} isHovered={isHovered} />,\n success: <Icon svgIcon={CheckFill} color={palette.kiwi900} hoverColor={palette.kiwi900} size={iconSize} isHovered={isHovered} />,\n };\n const CustomTag = hasExpander ? 'button' : 'span';\n\n const labelContainerClasses = classNames(\n styles['service-message__label-container'],\n hasExpander && styles[`service-message__label-container--has-expander`]\n );\n\n return (\n <div className={labelContainerClasses} ref={hoverRef}>\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__label']}>\n {variantToIconMap[variant]}\n <h1 className={styles['service-message__title']} id={id}>\n <CustomTag\n className={styles['service-message__toggle']}\n onClick={hasExpander ? onExpand : undefined}\n aria-expanded={hasExpander ? isExpanded : undefined}\n >\n {label}\n </CustomTag>\n </h1>\n {hasExpander && <Icon size={iconSize} svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} />}\n {!hasExpander && dismissable && (\n <Close onClick={onDismiss} ariaLabel={closeBtnText} className={styles['service-message__close']} />\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface ContentProps {\n info?: string;\n extraInfo?: string;\n urlTitle?: string;\n url?: string;\n target?: AnchorLinkTargets;\n dismissable: boolean;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Content: React.FC<ContentProps> = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnText, onDismiss }) => {\n const { hoverRef: readMoreRef, isHovered: readMoreHoverRefIsHovered } = useHover<HTMLAnchorElement>();\n const { hoverRef: closeButtonRef, isHovered: closeButtonIsHovered } = useHover<HTMLButtonElement>();\n\n const hasUrl = url && urlTitle;\n\n return (\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__content']}>\n {info && <p className={styles['service-message__info']}>{info}</p>}\n {extraInfo && (\n <p className={classNames(styles['service-message__info'], styles['service-message__info--extra'])}>{extraInfo}</p>\n )}\n <div className={styles['service-message__actions']}>\n {hasUrl && (\n <a className={styles['service-message__action']} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button\n ref={closeButtonRef}\n className={classNames(styles['service-message__action'], styles['service-message__action--close'])}\n aria-label={closeBtnText}\n onClick={onDismiss}\n >\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={closeButtonIsHovered} />\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expanded */\n info?: string;\n /** String displayed in service-message when expanded, with a smaller font */\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n expanderOpenFromStart = false,\n variant = 'alert',\n testId,\n}) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const labelId = useUuid();\n const hasExpander = !!info || !!extraInfo;\n\n const ariaRole = variant === 'alert' ? 'alert' : 'region';\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: labelId });\n\n const handleClick = (): void => {\n hasExpander && setIsExpanded(!isExpanded);\n };\n\n const classes = classNames(styles['service-message'], styles[`service-message--${variant}`]);\n\n return (\n <div className={classes} role={ariaRole} {...ariaLabelAttributes} data-testid={testId}>\n <Label\n label={label}\n variant={variant}\n id={labelId}\n hasExpander={hasExpander}\n isExpanded={isExpanded}\n dismissable={dismissable}\n onExpand={handleClick}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n {hasExpander && isExpanded && (\n <Content\n info={info}\n extraInfo={extraInfo}\n urlTitle={urlTitle}\n url={url}\n target={target}\n dismissable={dismissable}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n )}\n </div>\n );\n};\n\nexport default ServiceMessage;\n"],"names":["Label","label","variant","id","hasExpander","isExpanded","dismissable","onExpand","onDismiss","closeBtnText","breakpoint","useBreakpoint","isHovered","hoverRef","useHover","iconSize","breakpoints","IconSize","variantToIconMap","React","Icon","InfoSignFill","palette","ErrorSignFill","TriangleX","CheckFill","CustomTag","labelContainerClasses","classNames","styles","ChevronUp","ChevronDown","Close","Content","info","extraInfo","urlTitle","url","target","readMoreRef","readMoreHoverRefIsHovered","closeButtonRef","closeButtonIsHovered","hasUrl","Forward","getColor","X","ServiceMessage","expanderOpenFromStart","testId","setIsExpanded","useState","labelId","useUuid","ariaRole","ariaLabelAttributes","getAriaLabelAttributes","handleClick","classes","ServiceMessage$1"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsCA,MAAMA,IAA8B,CAAC,EAAE,OAAAC,GAAO,SAAAC,GAAS,IAAAC,GAAI,aAAAC,GAAa,YAAAC,GAAY,aAAAC,GAAa,UAAAC,GAAU,WAAAC,GAAW,cAAAC,EAAA,MAAmB;AACvI,QAAMC,IAAaC,KACb,EAAE,WAAAC,GAAW,UAAAC,EAAS,IAAIC,EAAyB,GAEnDC,IAAWL,IAAaM,EAAY,KAAKC,EAAS,SAASA,EAAS,OACpEC,IAAmB;AAAA,IACvB,MACEC,gBAAAA,EAAA,cAACC,GAAK,EAAA,SAASC,GAAc,OAAOC,EAAQ,cAAc,YAAYA,EAAQ,cAAc,MAAMP,GAAU,WAAAH,GAAsB;AAAA,IAEpI,MAAMO,gBAAAA,EAAA,cAACC,GAAK,EAAA,SAASG,GAAe,OAAOD,EAAQ,WAAW,YAAYA,EAAQ,WAAW,MAAMP,GAAU,WAAAH,GAAsB;AAAA,IACnI,OAAOO,gBAAAA,EAAA,cAACC,GAAK,EAAA,SAASI,GAAW,OAAOF,EAAQ,WAAW,YAAYA,EAAQ,WAAW,MAAMP,GAAU,WAAAH,GAAsB;AAAA,IAChI,SAASO,gBAAAA,EAAA,cAACC,GAAK,EAAA,SAASK,GAAW,OAAOH,EAAQ,SAAS,YAAYA,EAAQ,SAAS,MAAMP,GAAU,WAAAH,GAAsB;AAAA,EAAA,GAE1Hc,IAAYtB,IAAc,WAAW,QAErCuB,IAAw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
+
component: React.FC<import("./ServiceMessage").ServiceMessageProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
label: string;
|
|
15
|
+
info: string;
|
|
16
|
+
extraInfo: string;
|
|
17
|
+
dismissable: true;
|
|
18
|
+
expanderOpenFromStart: true;
|
|
19
|
+
urlTitle: string;
|
|
20
|
+
url: string;
|
|
21
|
+
target: "_self";
|
|
22
|
+
closeBtnText: string;
|
|
23
|
+
variant: "alert";
|
|
24
|
+
testId: string;
|
|
25
|
+
};
|
|
26
|
+
argTypes: {
|
|
27
|
+
label: {
|
|
28
|
+
control: string;
|
|
29
|
+
};
|
|
30
|
+
info: {
|
|
31
|
+
control: string;
|
|
32
|
+
};
|
|
33
|
+
extraInfo: {
|
|
34
|
+
control: string;
|
|
35
|
+
};
|
|
36
|
+
dismissable: {
|
|
37
|
+
control: string;
|
|
38
|
+
};
|
|
39
|
+
expanderOpenFromStart: {
|
|
40
|
+
control: string;
|
|
41
|
+
};
|
|
42
|
+
urlTitle: {
|
|
43
|
+
control: string;
|
|
44
|
+
};
|
|
45
|
+
url: {
|
|
46
|
+
control: string;
|
|
47
|
+
};
|
|
48
|
+
target: {
|
|
49
|
+
control: string;
|
|
50
|
+
options: string[];
|
|
51
|
+
};
|
|
52
|
+
closeBtnText: {
|
|
53
|
+
control: string;
|
|
54
|
+
};
|
|
55
|
+
variant: {
|
|
56
|
+
control: string;
|
|
57
|
+
options: string[];
|
|
58
|
+
};
|
|
59
|
+
testId: {
|
|
60
|
+
control: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export default meta;
|
|
65
|
+
type Story = StoryObj<typeof meta>;
|
|
66
|
+
export declare const Default: Story;
|
|
67
|
+
export declare const ReadMore: Story;
|
|
68
|
+
export declare const DismissableWithContent: Story;
|
|
69
|
+
export declare const DismissableLabelOnly: Story;
|
|
70
|
+
export declare const LabelOnly: Story;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./SharingStatus").SharingStatusProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
children: string;
|
|
15
|
+
};
|
|
16
|
+
argTypes: {
|
|
17
|
+
children: {
|
|
18
|
+
control: string;
|
|
19
|
+
};
|
|
20
|
+
wrapText: {
|
|
21
|
+
control: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export default meta;
|
|
26
|
+
type Story = StoryObj<typeof meta>;
|
|
27
|
+
export declare const Default: Story;
|
|
28
|
+
export declare const WrapText: Story;
|
|
29
|
+
export declare const DifferentIcons: Story;
|
|
30
|
+
export declare const AllColors: Story;
|
|
@@ -3,7 +3,7 @@ export type SliderStep = {
|
|
|
3
3
|
label?: number | string;
|
|
4
4
|
emojiUniCode?: string;
|
|
5
5
|
};
|
|
6
|
-
interface SliderProps {
|
|
6
|
+
export interface SliderProps {
|
|
7
7
|
/** Sets the title of the slider. */
|
|
8
8
|
title?: string;
|
|
9
9
|
/** Adds the left hand label to the element. */
|
|
@@ -33,4 +33,3 @@ interface SliderProps {
|
|
|
33
33
|
}
|
|
34
34
|
export declare const Slider: React.FC<SliderProps>;
|
|
35
35
|
export default Slider;
|
|
36
|
-
//# sourceMappingURL=Slider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\nconst useSafeNumberValue = (initial: number, min: number, max: number): [number, (value: number) => void] => {\n const [value, setValue] = useState(initial);\n\n const setSafeValue = (newValue: number): void => {\n if (newValue > max) {\n setValue(max);\n } else if (newValue < min) {\n setValue(min);\n } else {\n setValue(newValue);\n }\n };\n\n useEffect(() => {\n setSafeValue(initial);\n }, [min, max]);\n\n return [value, setSafeValue];\n};\n\nexport type SliderStep = {\n label?: number | string;\n emojiUniCode?: string;\n};\n\ninterface SliderProps {\n /**\tSets the title of the slider. */\n title?: string;\n /** Adds the left hand label to the element. */\n labelLeft?: string;\n /** Adds the right hand label to the element. */\n labelRight?: string;\n /**\tSets aria-label of the slider. */\n ariaLabel?: string;\n /** Disables the slider element. */\n disabled?: boolean;\n /** Sets the minimum allowed value on the slider - this overrides the use of steps prop for minValue/maxValue. */\n minValue?: number;\n /** Sets the maximum allowed value on the slider - this overrides the use of steps prop for minValue/maxValue. */\n maxValue?: number;\n /** Function to be called when the value state has changed. */\n onChange?: (value: number) => void;\n /** If set to false will only trigger onChange once a user interaction has been made, updates to this prop will be taken into account - true by default */\n selected?: boolean;\n /** Sets the steps data for the slider */\n steps?: SliderStep[];\n /** Sets the step to move per point in the slider */\n step?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the value of the slider */\n value?: number;\n}\n\nexport const Slider: React.FC<SliderProps> = ({\n title,\n ariaLabel,\n labelLeft,\n labelRight,\n disabled = false,\n onChange,\n steps,\n step = 1,\n minValue = 0,\n maxValue = steps ? steps.length - 1 : 100,\n selected = true,\n testId,\n value,\n}) => {\n const [isMoving, setIsMoving] = useState(false);\n const [selectedState, setSelectedState] = useState(typeof value === 'undefined' ? selected : true);\n const [valueState, setValueState] = useSafeNumberValue(\n typeof value === 'undefined' ? (maxValue - minValue) / 2 + minValue : value,\n minValue,\n maxValue\n );\n\n const titleId = useUuid();\n const labelLeftId = useUuid();\n const labelRightId = useUuid();\n const trackRef = useRef<HTMLDivElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const { width: trackWidth } = useSize(trackRef) || { width: 0 };\n const largeStep = maxValue / 10;\n\n useEffect(() => {\n const handlePointerUp = (): void => {\n setIsMoving(false);\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n };\n }, []);\n\n const getValueBasedOnMarkerPosition = (markerPosition: number): number => {\n const trackPosition = trackRef.current?.getBoundingClientRect().x ?? 0;\n\n // Calculate the normalized position (0 to 1) of the marker along the track\n const normalizedPosition = (markerPosition - trackPosition) / trackWidth;\n const valueRange = maxValue - minValue;\n // Calculate the value without considering the step\n let value = normalizedPosition * valueRange + minValue;\n // Adjust the value to account for the step increment\n const stepCount = Math.round(value / step);\n value = stepCount * step;\n value = Math.max(minValue, Math.min(maxValue, value));\n\n return value;\n };\n\n useEffect(() => {\n const handlePointerMove = (e: PointerEvent): void => {\n if (!disabled && isMoving) {\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValueState(newValue);\n }\n };\n\n document.addEventListener('pointermove', handlePointerMove);\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n };\n }, [isMoving]);\n\n useEffect(() => {\n if (value !== valueState && typeof value !== 'undefined') {\n handleSelected();\n setValueState(value);\n }\n }, [value]);\n\n useEffect(() => {\n if (!disabled && selectedState && onChange) {\n onChange(valueState);\n }\n }, [valueState, selectedState]);\n\n useEffect(() => {\n if (typeof value === 'undefined' && selected !== selectedState) {\n setSelectedState(selected);\n }\n }, [selected]);\n\n const handleSelected = (): void => {\n if (selectedState === false) {\n setSelectedState(true);\n }\n };\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n let flag = false;\n\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n setValueState(valueState - step);\n flag = true;\n break;\n case 'PageDown':\n setValueState(valueState - largeStep);\n flag = true;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n setValueState(valueState + step);\n flag = true;\n break;\n case 'PageUp':\n setValueState(valueState + largeStep);\n flag = true;\n break;\n case 'Home':\n setValueState(minValue);\n flag = true;\n break;\n case 'End':\n setValueState(maxValue);\n flag = true;\n break;\n default:\n break;\n }\n\n if (flag) {\n handleSelected();\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const handleTrackClick: React.MouseEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValueState(newValue);\n markerRef.current?.focus();\n };\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n setIsMoving(true);\n handleSelected();\n\n e.preventDefault();\n e.stopPropagation();\n\n markerRef.current?.focus();\n };\n\n const markerXPos = maxValue !== minValue ? (trackWidth / (maxValue - minValue)) * (valueState - minValue) : 0;\n\n const getAriaValueText = (): string | undefined => {\n const stepIndex = steps ? Math.round((valueState - minValue) / step) : null;\n\n if (steps && stepIndex !== null && stepIndex >= 0 && stepIndex < steps.length) {\n const step = steps[stepIndex];\n const emojiCode = step.emojiUniCode;\n const label = typeof step.label !== 'undefined' ? step.label.toString() : undefined;\n\n return emojiCode && label ? `${emojiCode} ${label}` : emojiCode || label;\n }\n\n return undefined;\n };\n\n const getAriaLabeledById = (): string | undefined => {\n if (title && labelLeft && labelRight) {\n return [titleId, labelLeftId, labelRightId].join(' ');\n }\n if (title && labelLeft) {\n return [titleId, labelLeftId].join(' ');\n }\n if (title && labelRight) {\n return [titleId, labelRightId].join(' ');\n }\n if (title) {\n return titleId;\n }\n };\n\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: ariaLabel,\n id: getAriaLabeledById(),\n prefer: 'label',\n });\n\n const getXPositionStyling = (index: number, stepsLength: number): { left: string } => {\n return { left: `${(index / (stepsLength - 1)) * 100}%` };\n };\n\n const renderEmojies = (): React.ReactNode => {\n return (\n <div className={styles['slider__emoji-container']}>\n {steps?.map((step, index) => {\n return (\n step.emojiUniCode && (\n <div\n aria-hidden={true}\n key={'emoji' + index}\n className={styles['slider__emoji']}\n style={getXPositionStyling(index, steps.length)}\n >\n {step.emojiUniCode}\n </div>\n )\n );\n })}\n </div>\n );\n };\n\n const renderSteps = (): React.ReactNode => {\n return steps?.map((_step, index) => {\n return <div key={'step' + index} className={styles['slider__track__step']} style={getXPositionStyling(index, steps.length)} />;\n });\n };\n\n const renderStepLabels = (): React.ReactNode => {\n return (\n <div className={styles['slider__value-container']}>\n {steps?.map((step, index) => {\n return (\n typeof step.label !== 'undefined' && (\n <div\n aria-hidden={true}\n key={'label' + index}\n className={styles['slider__value']}\n style={getXPositionStyling(index, steps.length)}\n >\n {step.label}\n </div>\n )\n );\n })}\n </div>\n );\n };\n\n return (\n <div className={styles.slider} data-testid={testId} data-analyticsid={AnalyticsId.Slider}>\n {title && (\n <Title className={styles['slider__title']} htmlMarkup={'h3'} margin={0} appearance={'title3'} id={titleId}>\n {title}\n </Title>\n )}\n <div className={styles['slider__content-container']}>\n {renderEmojies()}\n {/* Komponenten er tilgjengelig for mus/keyboard gjennom bruk av slideren */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n ref={trackRef}\n className={classNames(styles['slider__track-wrapper'], disabled && styles['slider__track-wrapper--disabled'])}\n onClick={handleTrackClick}\n onPointerDown={handlePointerDown}\n >\n <div className={classNames(styles.slider__track, disabled && styles['slider__track--disabled'])}>{renderSteps()}</div>\n <div\n role={disabled ? undefined : 'slider'}\n ref={markerRef}\n className={classNames(styles.slider__marker, {\n [styles['slider__marker--disabled']]: disabled,\n [styles['slider__marker--selected']]: selectedState,\n })}\n style={{\n left: `${markerXPos}px`,\n }}\n onKeyDown={handleKeyDown}\n aria-valuenow={valueState}\n aria-valuetext={getAriaValueText()}\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n tabIndex={disabled ? undefined : 0}\n aria-disabled={disabled}\n {...ariaLabelAttributes}\n />\n </div>\n {renderStepLabels()}\n </div>\n {(labelLeft || labelRight) && (\n <span className={styles.slider__options}>\n <span id={labelLeftId}>{labelLeft}</span>\n <span id={labelRightId}>{labelRight}</span>\n </span>\n )}\n </div>\n );\n};\n\nexport default Slider;\n"],"names":["useSafeNumberValue","initial","min","max","value","setValue","useState","setSafeValue","newValue","useEffect","Slider","title","ariaLabel","labelLeft","labelRight","disabled","onChange","steps","step","minValue","maxValue","selected","testId","isMoving","setIsMoving","selectedState","setSelectedState","valueState","setValueState","titleId","useUuid","labelLeftId","labelRightId","trackRef","useRef","markerRef","trackWidth","useSize","largeStep","handlePointerUp","getValueBasedOnMarkerPosition","markerPosition","trackPosition","_a","normalizedPosition","valueRange","handlePointerMove","handleSelected","handleKeyDown","e","flag","handleTrackClick","handlePointerDown","markerXPos","getAriaValueText","stepIndex","emojiCode","label","ariaLabelAttributes","getAriaLabelAttributes","getXPositionStyling","index","stepsLength","renderEmojies","React","styles","renderSteps","_step","renderStepLabels","AnalyticsId","Title","classNames","Slider$1"],"mappings":";;;;;;;;AAYA,MAAMA,KAAqB,CAACC,GAAiBC,GAAaC,MAAmD;AAC3G,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAASL,CAAO,GAEpCM,IAAe,CAACC,MAA2B;AAC/C,IAAIA,IAAWL,IACbE,EAASF,CAAG,IACHK,IAAWN,IACpBG,EAASH,CAAG,IAEZG,EAASG,CAAQ;AAAA,EACnB;AAGF,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAaN,CAAO;AAAA,EAAA,GACnB,CAACC,GAAKC,CAAG,CAAC,GAEN,CAACC,GAAOG,CAAY;AAC7B,GAoCaG,KAAgC,CAAC;AAAA,EAC5C,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,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ider/Slider.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\nconst useSafeNumberValue = (initial: number, min: number, max: number): [number, (value: number) => void] => {\n const [value, setValue] = useState(initial);\n\n const setSafeValue = (newValue: number): void => {\n if (newValue > max) {\n setValue(max);\n } else if (newValue < min) {\n setValue(min);\n } else {\n setValue(newValue);\n }\n };\n\n useEffect(() => {\n setSafeValue(initial);\n }, [min, max]);\n\n return [value, setSafeValue];\n};\n\nexport type SliderStep = {\n label?: number | string;\n emojiUniCode?: string;\n};\n\nexport interface SliderProps {\n /**\tSets the title of the slider. */\n title?: string;\n /** Adds the left hand label to the element. */\n labelLeft?: string;\n /** Adds the right hand label to the element. */\n labelRight?: string;\n /**\tSets aria-label of the slider. */\n ariaLabel?: string;\n /** Disables the slider element. */\n disabled?: boolean;\n /** Sets the minimum allowed value on the slider - this overrides the use of steps prop for minValue/maxValue. */\n minValue?: number;\n /** Sets the maximum allowed value on the slider - this overrides the use of steps prop for minValue/maxValue. */\n maxValue?: number;\n /** Function to be called when the value state has changed. */\n onChange?: (value: number) => void;\n /** If set to false will only trigger onChange once a user interaction has been made, updates to this prop will be taken into account - true by default */\n selected?: boolean;\n /** Sets the steps data for the slider */\n steps?: SliderStep[];\n /** Sets the step to move per point in the slider */\n step?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the value of the slider */\n value?: number;\n}\n\nexport const Slider: React.FC<SliderProps> = ({\n title,\n ariaLabel,\n labelLeft,\n labelRight,\n disabled = false,\n onChange,\n steps,\n step = 1,\n minValue = 0,\n maxValue = steps ? steps.length - 1 : 100,\n selected = true,\n testId,\n value,\n}) => {\n const [isMoving, setIsMoving] = useState(false);\n const [selectedState, setSelectedState] = useState(typeof value === 'undefined' ? selected : true);\n const [valueState, setValueState] = useSafeNumberValue(\n typeof value === 'undefined' ? (maxValue - minValue) / 2 + minValue : value,\n minValue,\n maxValue\n );\n\n const titleId = useUuid();\n const labelLeftId = useUuid();\n const labelRightId = useUuid();\n const trackRef = useRef<HTMLDivElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const { width: trackWidth } = useSize(trackRef) || { width: 0 };\n const largeStep = maxValue / 10;\n\n useEffect(() => {\n const handlePointerUp = (): void => {\n setIsMoving(false);\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n };\n }, []);\n\n const getValueBasedOnMarkerPosition = (markerPosition: number): number => {\n const trackPosition = trackRef.current?.getBoundingClientRect().x ?? 0;\n\n // Calculate the normalized position (0 to 1) of the marker along the track\n const normalizedPosition = (markerPosition - trackPosition) / trackWidth;\n const valueRange = maxValue - minValue;\n // Calculate the value without considering the step\n let value = normalizedPosition * valueRange + minValue;\n // Adjust the value to account for the step increment\n const stepCount = Math.round(value / step);\n value = stepCount * step;\n value = Math.max(minValue, Math.min(maxValue, value));\n\n return value;\n };\n\n useEffect(() => {\n const handlePointerMove = (e: PointerEvent): void => {\n if (!disabled && isMoving) {\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValueState(newValue);\n }\n };\n\n document.addEventListener('pointermove', handlePointerMove);\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n };\n }, [isMoving]);\n\n useEffect(() => {\n if (value !== valueState && typeof value !== 'undefined') {\n handleSelected();\n setValueState(value);\n }\n }, [value]);\n\n useEffect(() => {\n if (!disabled && selectedState && onChange) {\n onChange(valueState);\n }\n }, [valueState, selectedState]);\n\n useEffect(() => {\n if (typeof value === 'undefined' && selected !== selectedState) {\n setSelectedState(selected);\n }\n }, [selected]);\n\n const handleSelected = (): void => {\n if (selectedState === false) {\n setSelectedState(true);\n }\n };\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n let flag = false;\n\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n setValueState(valueState - step);\n flag = true;\n break;\n case 'PageDown':\n setValueState(valueState - largeStep);\n flag = true;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n setValueState(valueState + step);\n flag = true;\n break;\n case 'PageUp':\n setValueState(valueState + largeStep);\n flag = true;\n break;\n case 'Home':\n setValueState(minValue);\n flag = true;\n break;\n case 'End':\n setValueState(maxValue);\n flag = true;\n break;\n default:\n break;\n }\n\n if (flag) {\n handleSelected();\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const handleTrackClick: React.MouseEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValueState(newValue);\n markerRef.current?.focus();\n };\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n setIsMoving(true);\n handleSelected();\n\n e.preventDefault();\n e.stopPropagation();\n\n markerRef.current?.focus();\n };\n\n const markerXPos = maxValue !== minValue ? (trackWidth / (maxValue - minValue)) * (valueState - minValue) : 0;\n\n const getAriaValueText = (): string | undefined => {\n const stepIndex = steps ? Math.round((valueState - minValue) / step) : null;\n\n if (steps && stepIndex !== null && stepIndex >= 0 && stepIndex < steps.length) {\n const step = steps[stepIndex];\n const emojiCode = step.emojiUniCode;\n const label = typeof step.label !== 'undefined' ? step.label.toString() : undefined;\n\n return emojiCode && label ? `${emojiCode} ${label}` : emojiCode || label;\n }\n\n return undefined;\n };\n\n const getAriaLabeledById = (): string | undefined => {\n if (title && labelLeft && labelRight) {\n return [titleId, labelLeftId, labelRightId].join(' ');\n }\n if (title && labelLeft) {\n return [titleId, labelLeftId].join(' ');\n }\n if (title && labelRight) {\n return [titleId, labelRightId].join(' ');\n }\n if (title) {\n return titleId;\n }\n };\n\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: ariaLabel,\n id: getAriaLabeledById(),\n prefer: 'label',\n });\n\n const getXPositionStyling = (index: number, stepsLength: number): { left: string } => {\n return { left: `${(index / (stepsLength - 1)) * 100}%` };\n };\n\n const renderEmojies = (): React.ReactNode => {\n return (\n <div className={styles['slider__emoji-container']}>\n {steps?.map((step, index) => {\n return (\n step.emojiUniCode && (\n <div\n aria-hidden={true}\n key={'emoji' + index}\n className={styles['slider__emoji']}\n style={getXPositionStyling(index, steps.length)}\n >\n {step.emojiUniCode}\n </div>\n )\n );\n })}\n </div>\n );\n };\n\n const renderSteps = (): React.ReactNode => {\n return steps?.map((_step, index) => {\n return <div key={'step' + index} className={styles['slider__track__step']} style={getXPositionStyling(index, steps.length)} />;\n });\n };\n\n const renderStepLabels = (): React.ReactNode => {\n return (\n <div className={styles['slider__value-container']}>\n {steps?.map((step, index) => {\n return (\n typeof step.label !== 'undefined' && (\n <div\n aria-hidden={true}\n key={'label' + index}\n className={styles['slider__value']}\n style={getXPositionStyling(index, steps.length)}\n >\n {step.label}\n </div>\n )\n );\n })}\n </div>\n );\n };\n\n return (\n <div className={styles.slider} data-testid={testId} data-analyticsid={AnalyticsId.Slider}>\n {title && (\n <Title className={styles['slider__title']} htmlMarkup={'h3'} margin={0} appearance={'title3'} id={titleId}>\n {title}\n </Title>\n )}\n <div className={styles['slider__content-container']}>\n {renderEmojies()}\n {/* Komponenten er tilgjengelig for mus/keyboard gjennom bruk av slideren */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n ref={trackRef}\n className={classNames(styles['slider__track-wrapper'], disabled && styles['slider__track-wrapper--disabled'])}\n onClick={handleTrackClick}\n onPointerDown={handlePointerDown}\n >\n <div className={classNames(styles.slider__track, disabled && styles['slider__track--disabled'])}>{renderSteps()}</div>\n <div\n role={disabled ? undefined : 'slider'}\n ref={markerRef}\n className={classNames(styles.slider__marker, {\n [styles['slider__marker--disabled']]: disabled,\n [styles['slider__marker--selected']]: selectedState,\n })}\n style={{\n left: `${markerXPos}px`,\n }}\n onKeyDown={handleKeyDown}\n aria-valuenow={valueState}\n aria-valuetext={getAriaValueText()}\n aria-valuemin={minValue}\n aria-valuemax={maxValue}\n tabIndex={disabled ? undefined : 0}\n aria-disabled={disabled}\n {...ariaLabelAttributes}\n />\n </div>\n {renderStepLabels()}\n </div>\n {(labelLeft || labelRight) && (\n <span className={styles.slider__options}>\n <span id={labelLeftId}>{labelLeft}</span>\n <span id={labelRightId}>{labelRight}</span>\n </span>\n )}\n </div>\n );\n};\n\nexport default Slider;\n"],"names":["useSafeNumberValue","initial","min","max","value","setValue","useState","setSafeValue","newValue","useEffect","Slider","title","ariaLabel","labelLeft","labelRight","disabled","onChange","steps","step","minValue","maxValue","selected","testId","isMoving","setIsMoving","selectedState","setSelectedState","valueState","setValueState","titleId","useUuid","labelLeftId","labelRightId","trackRef","useRef","markerRef","trackWidth","useSize","largeStep","handlePointerUp","getValueBasedOnMarkerPosition","markerPosition","trackPosition","_a","normalizedPosition","valueRange","handlePointerMove","handleSelected","handleKeyDown","e","flag","handleTrackClick","handlePointerDown","markerXPos","getAriaValueText","stepIndex","emojiCode","label","ariaLabelAttributes","getAriaLabelAttributes","getXPositionStyling","index","stepsLength","renderEmojies","React","styles","renderSteps","_step","renderStepLabels","AnalyticsId","Title","classNames","Slider$1"],"mappings":";;;;;;;;AAYA,MAAMA,KAAqB,CAACC,GAAiBC,GAAaC,MAAmD;AAC3G,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAASL,CAAO,GAEpCM,IAAe,CAACC,MAA2B;AAC/C,IAAIA,IAAWL,IACbE,EAASF,CAAG,IACHK,IAAWN,IACpBG,EAASH,CAAG,IAEZG,EAASG,CAAQ;AAAA,EACnB;AAGF,SAAAC,EAAU,MAAM;AACd,IAAAF,EAAaN,CAAO;AAAA,EAAA,GACnB,CAACC,GAAKC,CAAG,CAAC,GAEN,CAACC,GAAOG,CAAY;AAC7B,GAoCaG,KAAgC,CAAC;AAAA,EAC5C,OAAAC;A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