@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormExample.js","sources":["../../../src/components/FormExample/FormExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useForm } from 'react-hook-form';\n\nimport { FormSize } from '../../constants';\nimport { isTest } from '../../utils/environment';\nimport Button from '../Button';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport FormLayout, { FormLayoutColumns } from '../FormLayout';\nimport Hospital from '../Icons/Hospital';\nimport Input from '../Input';\nimport Label from '../Label';\nimport RadioButton from '../RadioButton';\nimport Select from '../Select';\nimport Spacer from '../Spacer';\nimport Textarea from '../Textarea';\nimport Validation from '../Validation';\n\ninterface FormExampleProps {\n exampleType: FormExampleVariants;\n size?: keyof typeof FormSize;\n}\n\nexport enum FormExampleVariants {\n formgroup = 'formgroup',\n checkbox = 'checkbox',\n radiobutton = 'radiobutton',\n textarea = 'textarea',\n input = 'input',\n select = 'select',\n}\n\nexport const FormExample = (props: FormExampleProps): JSX.Element => {\n const { exampleType = FormExampleVariants.formgroup } = props;\n const {\n register,\n handleSubmit,\n formState: { errors },\n } = useForm();\n\n const defaultDate = new Date();\n defaultDate.setHours(0);\n defaultDate.setMinutes(0);\n defaultDate.setSeconds(0);\n const minDate = new Date();\n minDate.setDate(defaultDate.getDate() - 5);\n minDate.setHours(6);\n minDate.setMinutes(10);\n minDate.setSeconds(0);\n const maxDate = new Date();\n maxDate.setDate(defaultDate.getDate() + 5);\n maxDate.setHours(22);\n maxDate.setMinutes(0);\n maxDate.setSeconds(0);\n\n const field1 = 'field1';\n const field2 = 'field2';\n const field3 = 'field3';\n const field4 = 'field4';\n const field5 = 'field5';\n const field6 = 'field6';\n const allErrors =\n errors.field1 ||\n errors.field2 ||\n errors.field3 ||\n errors.field4 ||\n errors.field5 ||\n errors.field6 ||\n errors.field7 ||\n errors.field8 ||\n errors.field9;\n const errorMessage = 'Du må velge et alternativ';\n const errorMessage2 = 'Du må velge to alternativ';\n const errorMessage3 = 'Det kan ikke legges inn mer enn 40 tegn';\n const errorMessage4 = 'Du må skrive noe her';\n const errorMessage5 = 'Du må velge \"Option 2\"';\n const errorMessage6 = `Du må velge dato mellom ${minDate.toLocaleDateString('nb')} og ${maxDate.toLocaleDateString('nb')}`;\n const errorMessage7 = `Du må skrive inn tidspunkt mellom ${minDate.toLocaleTimeString('nb', {\n hour: '2-digit',\n minute: '2-digit',\n })} og ${maxDate.toLocaleTimeString('nb', {\n hour: '2-digit',\n minute: '2-digit',\n })}`;\n\n const requireTwo = (value: Array<string>): true | string => {\n return value.length >= 2 || errorMessage2;\n };\n const requireSelect = (value: Array<string>): true | string => {\n return value.toString() === 'Option 2' || errorMessage5;\n };\n\n const getFormExample = () => {\n if (exampleType === FormExampleVariants.formgroup) {\n const allCheckBoxes = [\n <Checkbox\n key={0}\n inputId=\"checkbox1\"\n label={<Label labelTexts={[{ text: 'Checkbox 1' }]} />}\n {...register(field1, { required: errorMessage })}\n />,\n <Checkbox\n key={1}\n inputId=\"checkbox2\"\n label={<Label labelTexts={[{ text: 'Checkbox 2' }]} />}\n {...register(field1, { required: errorMessage })}\n />,\n <Checkbox\n key={2}\n inputId=\"checkbox3\"\n label={<Label labelTexts={[{ text: 'Checkbox 3' }]} />}\n {...register(field1, { required: errorMessage })}\n />,\n ];\n\n return [\n <FormGroup\n key={0}\n title={'Gruppe tittel'}\n legend={'Velg minst en'}\n error={errors.field1 ? (errors.field1.message as string) : undefined}\n size={props.size}\n >\n <FormLayout maxColumns={FormLayoutColumns.two}>\n {allCheckBoxes.map(check => {\n return check;\n })}\n </FormLayout>\n </FormGroup>,\n <FormGroup key={1} legend={'Velg minst to'} error={errors.field2 ? (errors.field2.message as string) : undefined} size={props.size}>\n <Checkbox\n inputId=\"checkbox4\"\n label={<Label labelTexts={[{ text: 'Checkbox 4' }]} />}\n {...register(field2, { validate: requireTwo })}\n />\n <Checkbox\n inputId=\"checkbox5\"\n label={<Label labelTexts={[{ text: 'Checkbox 5' }]} />}\n {...register(field2, { validate: requireTwo })}\n />\n <Checkbox\n inputId=\"checkbox6\"\n label={<Label labelTexts={[{ text: 'Checkbox 6' }]} />}\n {...register(field2, { validate: requireTwo })}\n />\n </FormGroup>,\n <FormGroup key={2} legend={'Velg en'} error={errors.field3 ? (errors.field3.message as string) : undefined} size={props.size}>\n <RadioButton\n inputId=\"radiobutton1\"\n label={<Label labelTexts={[{ text: 'Radiobutton 1' }]} />}\n {...register(field3, { required: errorMessage })}\n />\n <RadioButton\n inputId=\"radiobutton2\"\n label={<Label labelTexts={[{ text: 'Radiobutton 2' }]} />}\n {...register(field3, { required: errorMessage })}\n />\n <RadioButton\n inputId=\"radiobutton3\"\n label={<Label labelTexts={[{ text: 'Radiobutton 3' }]} />}\n {...register(field3, { required: errorMessage })}\n />\n </FormGroup>,\n <FormGroup key={3} error={errors.field4 ? (errors.field4.message as string) : undefined}>\n <Textarea\n defaultValue={`Dette er en test \\n\\n Hello \\n\\n test \\n\\n test test`}\n grow\n maxCharacters={40}\n minRows={5}\n label={<Label labelTexts={[{ text: 'Skriv din historie her', type: 'semibold' }]} />}\n textareaId=\"textarea1\"\n {...register(field4, { maxLength: { value: 40, message: errorMessage3 } })}\n />\n </FormGroup>,\n <FormGroup key={4} size={props.size} error={errors.field5 ? (errors.field5.message as string) : undefined}>\n <Input\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n placeholder={'Skriv noe!'}\n icon={Hospital}\n {...register(field5, { required: errorMessage4 })}\n />\n </FormGroup>,\n <FormGroup key={5} size={props.size} error={errors.field6 ? (errors.field6.message as string) : undefined}>\n <Select\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n {...register(field6, { validate: requireSelect })}\n >\n <option value={'Option 1'}>{'Option 1'}</option>\n <option value={'Option 2'}>{'Option 2'}</option>\n <option value={'Option 3'}>{'Option 3'}</option>\n </Select>\n </FormGroup>,\n ];\n } else if (exampleType === FormExampleVariants.checkbox) {\n return (\n <Checkbox\n inputId=\"checkbox1\"\n label={<Label labelTexts={[{ text: 'Checkbox 1' }]} />}\n errorText={errors.field1 ? (errors.field1.message as string) : undefined}\n size={props.size}\n {...register(field1, { required: errorMessage })}\n />\n );\n } else if (exampleType === FormExampleVariants.radiobutton) {\n return (\n <RadioButton\n inputId=\"radiobutton1\"\n label={<Label labelTexts={[{ text: 'Radiobutton 1' }]} />}\n errorText={errors.field3 ? (errors.field3.message as string) : undefined}\n size={props.size}\n {...register(field3, { required: errorMessage })}\n />\n );\n } else if (exampleType === FormExampleVariants.textarea) {\n return (\n <Textarea\n defaultValue={`Dette er min historie \\n\\n Hello \\n\\n test`}\n grow\n maxCharacters={40}\n minRows={5}\n errorText={errors.field4 ? (errors.field4.message as string) : undefined}\n label={<Label labelTexts={[{ text: 'Skriv din historie her', type: 'semibold' }]} />}\n textareaId=\"textarea1\"\n {...register(field4, { maxLength: { value: 40, message: errorMessage3 } })}\n />\n );\n } else if (exampleType === FormExampleVariants.input) {\n return (\n <Input\n inputId={'input1'}\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n placeholder={'Skriv noe!'}\n errorText={errors.field5 ? (errors.field5.message as string) : undefined}\n icon={Hospital}\n {...register(field5, { required: errorMessage4 })}\n />\n );\n } else if (exampleType === FormExampleVariants.select) {\n return (\n <Select\n errorText={errors.field6 ? (errors.field6.message as string) : undefined}\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n {...register(field6, { validate: requireSelect })}\n >\n <option value={'Option 1'}>{'Option 1'}</option>\n <option value={'Option 2'}>{'Option 2'}</option>\n <option value={'Option 3'}>{'Option 3'}</option>\n </Select>\n );\n }\n };\n\n return (\n <form\n noValidate\n onSubmit={handleSubmit(data => {\n // eslint-disable-next-line no-console\n !isTest() && console.log(data);\n })}\n >\n <Validation size={props.size} errorSummary={allErrors ? 'Sjekk at alt er riktig utfylt' : undefined}>\n {getFormExample()}\n </Validation>\n <Spacer />\n <Button type=\"submit\">{'Send inn'}</Button>\n </form>\n );\n};\n\nexport default FormExample;\n"],"names":["FormExampleVariants","FormExample","props","exampleType","register","handleSubmit","errors","useForm","defaultDate","minDate","maxDate","field1","field2","field3","field4","field5","field6","allErrors","errorMessage","errorMessage2","errorMessage3","errorMessage4","errorMessage5","requireTwo","value","requireSelect","getFormExample","allCheckBoxes","React","Checkbox","Label","FormGroup","FormLayout","FormLayoutColumns","check","RadioButton","Textarea","Input","Hospital","Select","data","isTest","Validation","Spacer","Button","FormExample$1"],"mappings":";;;;;;;;;;;;;;;AAwBY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,cAAc,eACdA,EAAA,WAAW,YACXA,EAAA,QAAQ,SACRA,EAAA,SAAS,UANCA,IAAAA,KAAA,CAAA,CAAA;AASC,MAAAC,IAAc,CAACC,MAAyC;AAC7D,QAAA;AAAA,IAAE,aAAAC,IAAc;AAAA;AAAA,EAAkC,IAAAD,GAClD;AAAA,IACJ,UAAAE;AAAA,IACA,cAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,EAAO;AAAA,MAClBC,EAAQ,GAENC,wBAAkB;AACxB,EAAAA,EAAY,SAAS,CAAC,GACtBA,EAAY,WAAW,CAAC,GACxBA,EAAY,WAAW,CAAC;AAClB,QAAAC,wBAAc;AACpB,EAAAA,EAAQ,QAAQD,EAAY,QAAQ,IAAI,CAAC,GACzCC,EAAQ,SAAS,CAAC,GAClBA,EAAQ,WAAW,EAAE,GACrBA,EAAQ,WAAW,CAAC;AACd,QAAAC,wBAAc;AACpB,EAAAA,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,KAAe5C;"}
|
|
1
|
+
{"version":3,"file":"FormExample.js","sources":["../../../src/components/FormExample/FormExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useForm } from 'react-hook-form';\n\nimport { FormSize } from '../../constants';\nimport { isTest } from '../../utils/environment';\nimport Button from '../Button';\nimport Checkbox from '../Checkbox';\nimport FormGroup from '../FormGroup/FormGroup';\nimport FormLayout, { FormLayoutColumns } from '../FormLayout';\nimport Hospital from '../Icons/Hospital';\nimport Input from '../Input';\nimport Label from '../Label';\nimport RadioButton from '../RadioButton';\nimport Select from '../Select';\nimport Spacer from '../Spacer';\nimport Textarea from '../Textarea';\nimport Validation from '../Validation';\n\nexport interface FormExampleProps {\n exampleType: FormExampleVariants;\n size?: keyof typeof FormSize;\n}\n\nexport enum FormExampleVariants {\n formgroup = 'formgroup',\n checkbox = 'checkbox',\n radiobutton = 'radiobutton',\n textarea = 'textarea',\n input = 'input',\n select = 'select',\n}\n\nexport const FormExample = (props: FormExampleProps): JSX.Element => {\n const { exampleType = FormExampleVariants.formgroup } = props;\n const {\n register,\n handleSubmit,\n formState: { errors },\n } = useForm();\n\n const defaultDate = new Date();\n defaultDate.setHours(0);\n defaultDate.setMinutes(0);\n defaultDate.setSeconds(0);\n const minDate = new Date();\n minDate.setDate(defaultDate.getDate() - 5);\n minDate.setHours(6);\n minDate.setMinutes(10);\n minDate.setSeconds(0);\n const maxDate = new Date();\n maxDate.setDate(defaultDate.getDate() + 5);\n maxDate.setHours(22);\n maxDate.setMinutes(0);\n maxDate.setSeconds(0);\n\n const field1 = 'field1';\n const field2 = 'field2';\n const field3 = 'field3';\n const field4 = 'field4';\n const field5 = 'field5';\n const field6 = 'field6';\n const allErrors =\n errors.field1 ||\n errors.field2 ||\n errors.field3 ||\n errors.field4 ||\n errors.field5 ||\n errors.field6 ||\n errors.field7 ||\n errors.field8 ||\n errors.field9;\n const errorMessage = 'Du må velge et alternativ';\n const errorMessage2 = 'Du må velge to alternativ';\n const errorMessage3 = 'Det kan ikke legges inn mer enn 40 tegn';\n const errorMessage4 = 'Du må skrive noe her';\n const errorMessage5 = 'Du må velge \"Option 2\"';\n\n const requireTwo = (value: Array<string>): true | string => {\n return value.length >= 2 || errorMessage2;\n };\n const requireSelect = (value: Array<string>): true | string => {\n return value.toString() === 'Option 2' || errorMessage5;\n };\n\n const getFormExample = () => {\n if (exampleType === FormExampleVariants.formgroup) {\n const allCheckBoxes = [\n <Checkbox\n key={0}\n inputId=\"checkbox1\"\n label={<Label labelTexts={[{ text: 'Checkbox 1' }]} />}\n {...register(field1, { required: errorMessage })}\n />,\n <Checkbox\n key={1}\n inputId=\"checkbox2\"\n label={<Label labelTexts={[{ text: 'Checkbox 2' }]} />}\n {...register(field1, { required: errorMessage })}\n />,\n <Checkbox\n key={2}\n inputId=\"checkbox3\"\n label={<Label labelTexts={[{ text: 'Checkbox 3' }]} />}\n {...register(field1, { required: errorMessage })}\n />,\n ];\n\n return [\n <FormGroup\n key={0}\n title={'Gruppe tittel'}\n legend={'Velg minst en'}\n error={errors.field1 ? (errors.field1.message as string) : undefined}\n size={props.size}\n >\n <FormLayout maxColumns={FormLayoutColumns.two}>\n {allCheckBoxes.map(check => {\n return check;\n })}\n </FormLayout>\n </FormGroup>,\n <FormGroup key={1} legend={'Velg minst to'} error={errors.field2 ? (errors.field2.message as string) : undefined} size={props.size}>\n <Checkbox\n inputId=\"checkbox4\"\n label={<Label labelTexts={[{ text: 'Checkbox 4' }]} />}\n {...register(field2, { validate: requireTwo })}\n />\n <Checkbox\n inputId=\"checkbox5\"\n label={<Label labelTexts={[{ text: 'Checkbox 5' }]} />}\n {...register(field2, { validate: requireTwo })}\n />\n <Checkbox\n inputId=\"checkbox6\"\n label={<Label labelTexts={[{ text: 'Checkbox 6' }]} />}\n {...register(field2, { validate: requireTwo })}\n />\n </FormGroup>,\n <FormGroup key={2} legend={'Velg en'} error={errors.field3 ? (errors.field3.message as string) : undefined} size={props.size}>\n <RadioButton\n inputId=\"radiobutton1\"\n label={<Label labelTexts={[{ text: 'Radiobutton 1' }]} />}\n {...register(field3, { required: errorMessage })}\n />\n <RadioButton\n inputId=\"radiobutton2\"\n label={<Label labelTexts={[{ text: 'Radiobutton 2' }]} />}\n {...register(field3, { required: errorMessage })}\n />\n <RadioButton\n inputId=\"radiobutton3\"\n label={<Label labelTexts={[{ text: 'Radiobutton 3' }]} />}\n {...register(field3, { required: errorMessage })}\n />\n </FormGroup>,\n <FormGroup key={3} error={errors.field4 ? (errors.field4.message as string) : undefined}>\n <Textarea\n defaultValue={`Dette er en test \\n\\n Hello \\n\\n test \\n\\n test test`}\n grow\n maxCharacters={40}\n minRows={5}\n label={<Label labelTexts={[{ text: 'Skriv din historie her', type: 'semibold' }]} />}\n textareaId=\"textarea1\"\n {...register(field4, { maxLength: { value: 40, message: errorMessage3 } })}\n />\n </FormGroup>,\n <FormGroup key={4} size={props.size} error={errors.field5 ? (errors.field5.message as string) : undefined}>\n <Input\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n placeholder={'Skriv noe!'}\n icon={Hospital}\n {...register(field5, { required: errorMessage4 })}\n />\n </FormGroup>,\n <FormGroup key={5} size={props.size} error={errors.field6 ? (errors.field6.message as string) : undefined}>\n <Select\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n {...register(field6, { validate: requireSelect })}\n >\n <option value={'Option 1'}>{'Option 1'}</option>\n <option value={'Option 2'}>{'Option 2'}</option>\n <option value={'Option 3'}>{'Option 3'}</option>\n </Select>\n </FormGroup>,\n ];\n } else if (exampleType === FormExampleVariants.checkbox) {\n return (\n <Checkbox\n inputId=\"checkbox1\"\n label={<Label labelTexts={[{ text: 'Checkbox 1' }]} />}\n errorText={errors.field1 ? (errors.field1.message as string) : undefined}\n size={props.size}\n {...register(field1, { required: errorMessage })}\n />\n );\n } else if (exampleType === FormExampleVariants.radiobutton) {\n return (\n <RadioButton\n inputId=\"radiobutton1\"\n label={<Label labelTexts={[{ text: 'Radiobutton 1' }]} />}\n errorText={errors.field3 ? (errors.field3.message as string) : undefined}\n size={props.size}\n {...register(field3, { required: errorMessage })}\n />\n );\n } else if (exampleType === FormExampleVariants.textarea) {\n return (\n <Textarea\n defaultValue={`Dette er min historie \\n\\n Hello \\n\\n test`}\n grow\n maxCharacters={40}\n minRows={5}\n errorText={errors.field4 ? (errors.field4.message as string) : undefined}\n label={<Label labelTexts={[{ text: 'Skriv din historie her', type: 'semibold' }]} />}\n textareaId=\"textarea1\"\n {...register(field4, { maxLength: { value: 40, message: errorMessage3 } })}\n />\n );\n } else if (exampleType === FormExampleVariants.input) {\n return (\n <Input\n inputId={'input1'}\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n placeholder={'Skriv noe!'}\n errorText={errors.field5 ? (errors.field5.message as string) : undefined}\n icon={Hospital}\n {...register(field5, { required: errorMessage4 })}\n />\n );\n } else if (exampleType === FormExampleVariants.select) {\n return (\n <Select\n errorText={errors.field6 ? (errors.field6.message as string) : undefined}\n label={<Label labelTexts={[{ text: 'Skriv inn din tekst', type: 'semibold' }]} />}\n {...register(field6, { validate: requireSelect })}\n >\n <option value={'Option 1'}>{'Option 1'}</option>\n <option value={'Option 2'}>{'Option 2'}</option>\n <option value={'Option 3'}>{'Option 3'}</option>\n </Select>\n );\n }\n };\n\n return (\n <form\n noValidate\n onSubmit={handleSubmit(data => {\n // eslint-disable-next-line no-console\n !isTest() && console.log(data);\n })}\n >\n <Validation size={props.size} errorSummary={allErrors ? 'Sjekk at alt er riktig utfylt' : undefined}>\n {getFormExample()}\n </Validation>\n <Spacer />\n <Button type=\"submit\">{'Send inn'}</Button>\n </form>\n );\n};\n\nexport default FormExample;\n"],"names":["FormExampleVariants","FormExample","props","exampleType","register","handleSubmit","errors","useForm","defaultDate","minDate","maxDate","field1","field2","field3","field4","field5","field6","allErrors","errorMessage","errorMessage2","errorMessage3","errorMessage4","errorMessage5","requireTwo","value","requireSelect","getFormExample","allCheckBoxes","React","Checkbox","Label","FormGroup","FormLayout","FormLayoutColumns","check","RadioButton","Textarea","Input","Hospital","Select","data","isTest","Validation","Spacer","Button","FormExample$1"],"mappings":";;;;;;;;;;;;;;;AAwBY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,WAAW,YACXA,EAAA,cAAc,eACdA,EAAA,WAAW,YACXA,EAAA,QAAQ,SACRA,EAAA,SAAS,UANCA,IAAAA,KAAA,CAAA,CAAA;AASC,MAAAC,IAAc,CAACC,MAAyC;AAC7D,QAAA;AAAA,IAAE,aAAAC,IAAc;AAAA;AAAA,EAAkC,IAAAD,GAClD;AAAA,IACJ,UAAAE;AAAA,IACA,cAAAC;AAAA,IACA,WAAW,EAAE,QAAAC,EAAO;AAAA,MAClBC,EAAQ,GAENC,wBAAkB;AACxB,EAAAA,EAAY,SAAS,CAAC,GACtBA,EAAY,WAAW,CAAC,GACxBA,EAAY,WAAW,CAAC;AAClB,QAAAC,wBAAc;AACpB,EAAAA,EAAQ,QAAQD,EAAY,QAAQ,IAAI,CAAC,GACzCC,EAAQ,SAAS,CAAC,GAClBA,EAAQ,WAAW,EAAE,GACrBA,EAAQ,WAAW,CAAC;AACd,QAAAC,wBAAc;AACpB,EAAAA,EAAQ,QAAQF,EAAY,QAAQ,IAAI,CAAC,GACzCE,EAAQ,SAAS,EAAE,GACnBA,EAAQ,WAAW,CAAC,GACpBA,EAAQ,WAAW,CAAC;AAEpB,QAAMC,IAAS,UACTC,IAAS,UACTC,IAAS,UACTC,IAAS,UACTC,IAAS,UACTC,IAAS,UACTC,IACJX,EAAO,UACPA,EAAO,UACPA,EAAO,UACPA,EAAO,UACPA,EAAO,UACPA,EAAO,UACPA,EAAO,UACPA,EAAO,UACPA,EAAO,QACHY,IAAe,6BACfC,IAAgB,6BAChBC,IAAgB,2CAChBC,IAAgB,wBAChBC,IAAgB,0BAEhBC,IAAa,CAACC,MACXA,EAAM,UAAU,KAAKL,GAExBM,IAAgB,CAACD,MACdA,EA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AW;AAAA,UACtCA,gBAAAA,EAAA,cAAA,UAAA,EAAO,OAAO,WAAA,GAAa,UAAW;AAAA,QAAA;AAAA;AAAA,EAG7C;AAIA,SAAAA,gBAAAA,EAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,YAAU;AAAA,MACV,UAAUvB,EAAa,CAAQmC,MAAA;AAE7B,SAACC,EAAO,KAAK,QAAQ,IAAID,CAAI;AAAA,MAAA,CAC9B;AAAA,IAAA;AAAA,IAEDZ,gBAAAA,EAAA,cAACc,GAAW,EAAA,MAAMxC,EAAM,MAAM,cAAce,IAAY,kCAAkC,OACvF,GAAAS,EAAA,CACH;AAAA,oCACCiB,GAAO,IAAA;AAAA,IACPf,gBAAAA,EAAA,cAAAgB,GAAA,EAAO,MAAK,SAAA,GAAU,UAAW;AAAA,EAAA;AAGxC,GAEAC,KAAe5C;"}
|
|
@@ -1,97 +1,88 @@
|
|
|
1
1
|
import r, { useState as I } from "react";
|
|
2
|
-
import
|
|
3
|
-
import { FormMode as k, FormSize as
|
|
4
|
-
import { isComponent as
|
|
5
|
-
import { uuid as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
const
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import { FormMode as k, FormSize as F, AnalyticsId as z } from "../../constants.js";
|
|
4
|
+
import { isComponent as m } from "../../utils/component.js";
|
|
5
|
+
import { uuid as B } from "../../utils/uuid.js";
|
|
6
|
+
import A from "../Checkbox/Checkbox.js";
|
|
7
|
+
import D from "../ErrorWrapper/ErrorWrapper.js";
|
|
8
|
+
import H from "../FormLayout/FormLayout.js";
|
|
9
|
+
import $ from "../Input/Input.js";
|
|
10
|
+
import j, { getRadioLabelClasses as q } from "../RadioButton/RadioButton.js";
|
|
11
|
+
import J from "../Select/Select.js";
|
|
12
|
+
import K from "../Title/Title.js";
|
|
13
|
+
import s from "./styles.module.scss";
|
|
14
|
+
const d = r.forwardRef((t, G) => {
|
|
15
15
|
const {
|
|
16
|
-
className:
|
|
16
|
+
className: _,
|
|
17
17
|
fieldsetClassName: y,
|
|
18
|
-
mode:
|
|
19
|
-
size:
|
|
20
|
-
error:
|
|
21
|
-
name:
|
|
22
|
-
htmlMarkup:
|
|
18
|
+
mode: a = k.onwhite,
|
|
19
|
+
size: n = F.medium,
|
|
20
|
+
error: o,
|
|
21
|
+
name: l,
|
|
22
|
+
htmlMarkup: f = "fieldset",
|
|
23
23
|
renderError: R = !0,
|
|
24
24
|
errorWrapperClassName: b,
|
|
25
|
-
errorWrapperTestId:
|
|
26
|
-
} = t, [x, S] = I(), [T] = I(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
F
|
|
33
|
-
), L = l(o["form-group-wrapper__title"], {
|
|
34
|
-
[o["form-group-wrapper__title--on-dark"]]: i && !a,
|
|
35
|
-
[o["form-group-wrapper__title--large"]]: d
|
|
36
|
-
}), M = l(o["form-group"]), g = l(o["field-set__legend"], {
|
|
37
|
-
[o["field-set__legend--on-dark"]]: i && !a,
|
|
38
|
-
[o["field-set__legend--large"]]: d
|
|
39
|
-
}), C = l(o["field-set"], y), f = (e, z) => {
|
|
40
|
-
if (s(e, $))
|
|
25
|
+
errorWrapperTestId: w
|
|
26
|
+
} = t, [x, S] = I(), [T] = I(B()), u = a === k.ondark, W = n === F.large, v = p(s["form-group-wrapper"], _), L = p({
|
|
27
|
+
[s["form-group-wrapper__title--on-dark"]]: u && !o
|
|
28
|
+
}), c = p(s["field-set__legend"], {
|
|
29
|
+
[s["field-set__legend--on-dark"]]: u && !o
|
|
30
|
+
}), g = p(s["field-set"], y), i = (e, M) => {
|
|
31
|
+
if (m(e, H))
|
|
41
32
|
return r.cloneElement(e, {
|
|
42
|
-
size:
|
|
43
|
-
mapHelper:
|
|
33
|
+
size: n,
|
|
34
|
+
mapHelper: i
|
|
44
35
|
});
|
|
45
|
-
if (
|
|
36
|
+
if (m(e, d))
|
|
46
37
|
return r.cloneElement(e, {
|
|
47
|
-
mode:
|
|
48
|
-
size:
|
|
49
|
-
error:
|
|
38
|
+
mode: a,
|
|
39
|
+
size: n,
|
|
40
|
+
error: o,
|
|
50
41
|
renderError: !1
|
|
51
42
|
});
|
|
52
|
-
if (
|
|
43
|
+
if (m(e, A))
|
|
53
44
|
return r.cloneElement(e, {
|
|
54
|
-
name:
|
|
55
|
-
mode:
|
|
56
|
-
size:
|
|
57
|
-
error: !!
|
|
45
|
+
name: l ?? e.props.name,
|
|
46
|
+
mode: a,
|
|
47
|
+
size: n,
|
|
48
|
+
error: !!o
|
|
58
49
|
});
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
50
|
+
if (m(e, j)) {
|
|
51
|
+
const E = typeof e.props.inputId > "u" ? T + M : e.props.inputId;
|
|
61
52
|
return r.cloneElement(e, {
|
|
62
|
-
inputId:
|
|
63
|
-
name:
|
|
64
|
-
mode:
|
|
65
|
-
size:
|
|
66
|
-
onChange: (
|
|
67
|
-
S(
|
|
53
|
+
inputId: E,
|
|
54
|
+
name: l ?? e.props.name,
|
|
55
|
+
mode: a,
|
|
56
|
+
size: n,
|
|
57
|
+
onChange: (N) => {
|
|
58
|
+
S(N.target.id), e.props.onChange && e.props.onChange(N);
|
|
68
59
|
},
|
|
69
|
-
error: !!
|
|
70
|
-
labelClassNames:
|
|
60
|
+
error: !!o,
|
|
61
|
+
labelClassNames: q(E, a, W, x)
|
|
71
62
|
});
|
|
72
63
|
} else {
|
|
73
|
-
if (
|
|
64
|
+
if (m(e, $))
|
|
74
65
|
return r.cloneElement(e, {
|
|
75
|
-
name:
|
|
76
|
-
mode:
|
|
77
|
-
size:
|
|
78
|
-
error: !!
|
|
66
|
+
name: l ?? e.props.name,
|
|
67
|
+
mode: a,
|
|
68
|
+
size: n,
|
|
69
|
+
error: !!o
|
|
79
70
|
});
|
|
80
|
-
if (
|
|
71
|
+
if (m(e, J))
|
|
81
72
|
return r.cloneElement(e, {
|
|
82
|
-
name:
|
|
83
|
-
mode:
|
|
84
|
-
error: !!
|
|
73
|
+
name: l ?? e.props.name,
|
|
74
|
+
mode: a,
|
|
75
|
+
error: !!o
|
|
85
76
|
});
|
|
86
77
|
}
|
|
87
78
|
return e;
|
|
88
|
-
},
|
|
89
|
-
return /* @__PURE__ */ r.createElement("div", { "data-testid": t.testId, "data-analyticsid":
|
|
79
|
+
}, C = () => /* @__PURE__ */ r.createElement("div", null, f === "div" && /* @__PURE__ */ r.createElement("div", { className: g }, t.legend && /* @__PURE__ */ r.createElement("h5", { className: c }, t.legend), r.Children.map(t.children, i)), f === "fieldset" && /* @__PURE__ */ r.createElement("fieldset", { name: t.fieldsetName, className: g }, t.legend && /* @__PURE__ */ r.createElement("legend", { className: c }, t.legend), r.Children.map(t.children, i)));
|
|
80
|
+
return /* @__PURE__ */ r.createElement("div", { "data-testid": t.testId, "data-analyticsid": z.FormGroup, className: v, ref: G, tabIndex: -1 }, t.title && /* @__PURE__ */ r.createElement(K, { className: L, htmlMarkup: "h4", appearance: "title4", margin: { marginTop: 0, marginBottom: o ? 1 : 2 } }, t.title), R ? /* @__PURE__ */ r.createElement(D, { className: b, errorText: o, testId: w }, C()) : C());
|
|
90
81
|
});
|
|
91
|
-
|
|
92
|
-
const
|
|
82
|
+
d.displayName = "FormGroup";
|
|
83
|
+
const ae = d;
|
|
93
84
|
export {
|
|
94
|
-
|
|
95
|
-
|
|
85
|
+
d as FormGroup,
|
|
86
|
+
ae as default
|
|
96
87
|
};
|
|
97
88
|
//# sourceMappingURL=FormGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup.js","sources":["../../../src/components/FormGroup/FormGroup.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, FormSize } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport uuid from '../../utils/uuid';\nimport Checkbox, { CheckboxProps } from '../Checkbox/Checkbox';\nimport ErrorWrapper from '../ErrorWrapper';\nimport FormLayout, { FormLayoutProps } from '../FormLayout';\nimport Input, { InputProps } from '../Input/Input';\nimport RadioButton, { RadioButtonProps, getRadioLabelClasses } from '../RadioButton/RadioButton';\nimport Select, { SelectProps } from '../Select';\nimport Title from '../Title';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport type FormGroupTags = 'fieldset' | 'div';\n\nexport interface FormGroupProps {\n /** title for the the fieldset */\n title?: string;\n /** text placed in the legend tag of the fieldset */\n legend?: string;\n /** Items in the FormGroup component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the errorWrapper. */\n errorWrapperClassName?: string;\n /** Adds custom classes to the fieldset element. */\n fieldsetClassName?: string;\n /** Changes the visuals of the formgroup */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Error message */\n error?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error-wrapper. */\n errorWrapperTestId?: string;\n /** Unique name for the child input element */\n name?: string;\n /** Unique name for the fieldset */\n fieldsetName?: string;\n /** Sets div instead of fieldset tag */\n htmlMarkup?: FormGroupTags;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n}\n\nexport const FormGroup = React.forwardRef((props: FormGroupProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {\n className,\n fieldsetClassName,\n mode = FormMode.onwhite,\n size = FormSize.medium,\n error,\n name,\n htmlMarkup = 'fieldset',\n renderError = true,\n errorWrapperClassName,\n errorWrapperTestId,\n } = props;\n const [checkedRadioId, setCheckedRadioId] = useState<string>();\n const [radioGroupId] = useState<string>(uuid());\n const onDark = mode === FormMode.ondark;\n const isLarge = size === FormSize.large;\n const formGroupWrapperClasses = classNames(\n formGroupStyles['form-group-wrapper'],\n {\n [formGroupStyles['form-group-wrapper--on-dark']]: onDark,\n [formGroupStyles['form-group-wrapper--invalid']]: error,\n },\n className\n );\n const titleClasses = classNames(formGroupStyles['form-group-wrapper__title'], {\n [formGroupStyles['form-group-wrapper__title--on-dark']]: onDark && !error,\n [formGroupStyles['form-group-wrapper__title--large']]: isLarge,\n });\n const formGroupClasses = classNames(formGroupStyles['form-group']);\n\n const legendClasses = classNames(formGroupStyles['field-set__legend'], {\n [formGroupStyles['field-set__legend--on-dark']]: onDark && !error,\n [formGroupStyles['field-set__legend--large']]: isLarge,\n });\n\n const fieldsetClasses = classNames(formGroupStyles['field-set'], fieldsetClassName);\n\n const mapFormComponent = (child: React.ReactNode, index: number): React.ReactNode => {\n if (isComponent<FormGroupProps>(child, FormLayout)) {\n return React.cloneElement(child as React.ReactElement<FormLayoutProps>, {\n size,\n mapHelper: mapFormComponent,\n });\n } else if (isComponent<FormGroupProps>(child, FormGroup)) {\n return React.cloneElement(child, {\n mode,\n size,\n error,\n renderError: false,\n });\n } else if (isComponent<CheckboxProps>(child, Checkbox)) {\n return React.cloneElement(child as React.ReactElement<CheckboxProps>, {\n name: name ?? child.props.name,\n mode,\n size,\n error: !!error,\n });\n } else if (isComponent<RadioButtonProps>(child, RadioButton)) {\n const radioId = typeof child.props.inputId === 'undefined' ? radioGroupId + index : child.props.inputId;\n return React.cloneElement(child as React.ReactElement<RadioButtonProps>, {\n inputId: radioId,\n name: name ?? child.props.name,\n mode,\n size,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => {\n setCheckedRadioId(event.target.id);\n child.props.onChange && child.props.onChange(event);\n },\n error: !!error,\n labelClassNames: getRadioLabelClasses(radioId, mode as FormMode, isLarge, checkedRadioId),\n });\n } else if (isComponent<InputProps>(child, Input)) {\n return React.cloneElement(child as React.ReactElement<InputProps>, {\n name: name ?? child.props.name,\n mode,\n size,\n error: !!error,\n });\n } else if (isComponent<SelectProps>(child, Select)) {\n return React.cloneElement(child as React.ReactElement<SelectProps>, {\n name: name ?? child.props.name,\n mode,\n error: !!error,\n });\n }\n return child;\n };\n\n const formGroupContent = (): React.ReactNode => {\n return (\n <div className={formGroupClasses}>\n {htmlMarkup === 'div' && (\n <div className={fieldsetClasses}>\n {props.legend && <h5 className={legendClasses}>{props.legend}</h5>}\n {React.Children.map(props.children, mapFormComponent)}\n </div>\n )}\n {htmlMarkup === 'fieldset' && (\n <fieldset name={props.fieldsetName} className={fieldsetClasses}>\n {props.legend && <legend className={legendClasses}>{props.legend}</legend>}\n {React.Children.map(props.children, mapFormComponent)}\n </fieldset>\n )}\n </div>\n );\n };\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormGroup} className={formGroupWrapperClasses} ref={ref} tabIndex={-1}>\n {props.title && (\n <Title className={titleClasses} htmlMarkup={'h4'} appearance={'title4'} margin={{ marginTop: 0, marginBottom: error ? 1 : 2 }}>\n {props.title}\n </Title>\n )}\n {renderError ? (\n <ErrorWrapper className={errorWrapperClassName} errorText={error} testId={errorWrapperTestId}>\n {formGroupContent()}\n </ErrorWrapper>\n ) : (\n formGroupContent()\n )}\n </div>\n );\n});\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"names":["FormGroup","React","props","ref","className","fieldsetClassName","mode","FormMode","size","FormSize","error","name","htmlMarkup","renderError","errorWrapperClassName","errorWrapperTestId","checkedRadioId","setCheckedRadioId","useState","radioGroupId","uuid","onDark","isLarge","formGroupWrapperClasses","classNames","formGroupStyles","titleClasses","formGroupClasses","legendClasses","fieldsetClasses","mapFormComponent","child","index","isComponent","FormLayout","Checkbox","RadioButton","radioId","event","getRadioLabelClasses","Input","Select","formGroupContent","AnalyticsId","Title","ErrorWrapper","FormGroup$1"],"mappings":";;;;;;;;;;;;;AAoDO,MAAMA,IAAYC,EAAM,WAAW,CAACC,GAAuBC,MAA4C;AACtG,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,MAAAC,IAAOC,EAAS;AAAA,IAChB,MAAAC,IAAOC,EAAS;AAAA,IAChB,OAAAC;AAAA,IACA,MAA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A,GACb3B,EAAM,0CAAW,MAAG,EAAA,WAAW0B,EAAgB,GAAA1B,EAAM,MAAO,GAC5DD,EAAM,SAAS,IAAIC,EAAM,UAAU4B,CAAgB,CACtD,GAEDlB,MAAe,cACbX,gBAAAA,EAAA,cAAA,YAAA,EAAS,MAAMC,EAAM,cAAc,WAAW2B,EAAA,GAC5C3B,EAAM,UAAWD,gBAAAA,EAAA,cAAA,UAAA,EAAO,WAAW2B,EAAgB,GAAA1B,EAAM,MAAO,GAChED,EAAM,SAAS,IAAIC,EAAM,UAAU4B,CAAgB,CACtD,CAEJ;AAKF,SAAA7B,gBAAAA,EAAA,cAAC,SAAI,eAAaC,EAAM,QAAQ,oBAAkByC,EAAY,WAAW,WAAWpB,GAAyB,KAAApB,GAAU,UAAU,GAC9H,GAAAD,EAAM,SACJD,gBAAAA,EAAA,cAAA2C,GAAA,EAAM,WAAWlB,GAAc,YAAY,MAAM,YAAY,UAAU,QAAQ,EAAE,WAAW,GAAG,cAAchB,IAAQ,IAAI,EACvH,EAAA,GAAAR,EAAM,KACT,GAEDW,IACCZ,gBAAAA,EAAA,cAAC4C,KAAa,WAAW/B,GAAuB,WAAWJ,GAAO,QAAQK,KACvE2B,EAAiB,CACpB,IAEAA,EAEJ,CAAA;AAEJ,CAAC;AAED1C,EAAU,cAAc;AAExB,MAAA8C,KAAe9C;"}
|
|
1
|
+
{"version":3,"file":"FormGroup.js","sources":["../../../src/components/FormGroup/FormGroup.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, FormSize } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport uuid from '../../utils/uuid';\nimport Checkbox, { CheckboxProps } from '../Checkbox/Checkbox';\nimport ErrorWrapper from '../ErrorWrapper';\nimport FormLayout, { FormLayoutProps } from '../FormLayout';\nimport Input, { InputProps } from '../Input/Input';\nimport RadioButton, { RadioButtonProps, getRadioLabelClasses } from '../RadioButton/RadioButton';\nimport Select, { SelectProps } from '../Select';\nimport Title from '../Title';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport type FormGroupTags = 'fieldset' | 'div';\n\nexport interface FormGroupProps {\n /** title for the the fieldset */\n title?: string;\n /** text placed in the legend tag of the fieldset */\n legend?: string;\n /** Items in the FormGroup component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the errorWrapper. */\n errorWrapperClassName?: string;\n /** Adds custom classes to the fieldset element. */\n fieldsetClassName?: string;\n /** Changes the visuals of the formgroup */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the formgroup */\n size?: keyof typeof FormSize;\n /** Error message */\n error?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error-wrapper. */\n errorWrapperTestId?: string;\n /** Unique name for the child input element */\n name?: string;\n /** Unique name for the fieldset */\n fieldsetName?: string;\n /** Sets div instead of fieldset tag */\n htmlMarkup?: FormGroupTags;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n}\n\nexport const FormGroup = React.forwardRef((props: FormGroupProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {\n className,\n fieldsetClassName,\n mode = FormMode.onwhite,\n size = FormSize.medium,\n error,\n name,\n htmlMarkup = 'fieldset',\n renderError = true,\n errorWrapperClassName,\n errorWrapperTestId,\n } = props;\n const [checkedRadioId, setCheckedRadioId] = useState<string>();\n const [radioGroupId] = useState<string>(uuid());\n const onDark = mode === FormMode.ondark;\n const isLarge = size === FormSize.large;\n const formGroupWrapperClasses = classNames(formGroupStyles['form-group-wrapper'], className);\n const titleClasses = classNames({\n [formGroupStyles['form-group-wrapper__title--on-dark']]: onDark && !error,\n });\n\n const legendClasses = classNames(formGroupStyles['field-set__legend'], {\n [formGroupStyles['field-set__legend--on-dark']]: onDark && !error,\n });\n\n const fieldsetClasses = classNames(formGroupStyles['field-set'], fieldsetClassName);\n\n const mapFormComponent = (child: React.ReactNode, index: number): React.ReactNode => {\n if (isComponent<FormGroupProps>(child, FormLayout)) {\n return React.cloneElement(child as React.ReactElement<FormLayoutProps>, {\n size,\n mapHelper: mapFormComponent,\n });\n } else if (isComponent<FormGroupProps>(child, FormGroup)) {\n return React.cloneElement(child, {\n mode,\n size,\n error,\n renderError: false,\n });\n } else if (isComponent<CheckboxProps>(child, Checkbox)) {\n return React.cloneElement(child as React.ReactElement<CheckboxProps>, {\n name: name ?? child.props.name,\n mode,\n size,\n error: !!error,\n });\n } else if (isComponent<RadioButtonProps>(child, RadioButton)) {\n const radioId = typeof child.props.inputId === 'undefined' ? radioGroupId + index : child.props.inputId;\n return React.cloneElement(child as React.ReactElement<RadioButtonProps>, {\n inputId: radioId,\n name: name ?? child.props.name,\n mode,\n size,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => {\n setCheckedRadioId(event.target.id);\n child.props.onChange && child.props.onChange(event);\n },\n error: !!error,\n labelClassNames: getRadioLabelClasses(radioId, mode as FormMode, isLarge, checkedRadioId),\n });\n } else if (isComponent<InputProps>(child, Input)) {\n return React.cloneElement(child as React.ReactElement<InputProps>, {\n name: name ?? child.props.name,\n mode,\n size,\n error: !!error,\n });\n } else if (isComponent<SelectProps>(child, Select)) {\n return React.cloneElement(child as React.ReactElement<SelectProps>, {\n name: name ?? child.props.name,\n mode,\n error: !!error,\n });\n }\n return child;\n };\n\n const formGroupContent = (): React.ReactNode => {\n return (\n <div>\n {htmlMarkup === 'div' && (\n <div className={fieldsetClasses}>\n {props.legend && <h5 className={legendClasses}>{props.legend}</h5>}\n {React.Children.map(props.children, mapFormComponent)}\n </div>\n )}\n {htmlMarkup === 'fieldset' && (\n <fieldset name={props.fieldsetName} className={fieldsetClasses}>\n {props.legend && <legend className={legendClasses}>{props.legend}</legend>}\n {React.Children.map(props.children, mapFormComponent)}\n </fieldset>\n )}\n </div>\n );\n };\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormGroup} className={formGroupWrapperClasses} ref={ref} tabIndex={-1}>\n {props.title && (\n <Title className={titleClasses} htmlMarkup={'h4'} appearance={'title4'} margin={{ marginTop: 0, marginBottom: error ? 1 : 2 }}>\n {props.title}\n </Title>\n )}\n {renderError ? (\n <ErrorWrapper className={errorWrapperClassName} errorText={error} testId={errorWrapperTestId}>\n {formGroupContent()}\n </ErrorWrapper>\n ) : (\n formGroupContent()\n )}\n </div>\n );\n});\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"names":["FormGroup","React","props","ref","className","fieldsetClassName","mode","FormMode","size","FormSize","error","name","htmlMarkup","renderError","errorWrapperClassName","errorWrapperTestId","checkedRadioId","setCheckedRadioId","useState","radioGroupId","uuid","onDark","isLarge","formGroupWrapperClasses","classNames","formGroupStyles","titleClasses","legendClasses","fieldsetClasses","mapFormComponent","child","index","isComponent","FormLayout","Checkbox","RadioButton","radioId","event","getRadioLabelClasses","Input","Select","formGroupContent","AnalyticsId","Title","ErrorWrapper","FormGroup$1"],"mappings":";;;;;;;;;;;;;AAoDO,MAAMA,IAAYC,EAAM,WAAW,CAACC,GAAuBC,MAA4C;AACtG,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,MAAAC,IAAOC,EAAS;AAAA,IAChB,MAAAC,IAAOC,EAAS;AAAA,IAChB,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,YAAAC,IAAa;AAAA,IACb,aAAAC,IAAc;AAAA,IACd,uBAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAb,GACE,CAACc,GAAgBC,CAAiB,IAAIC,EAAiB,GACvD,CAACC,CAAY,IAAID,EAAiBE,EAAM,CAAA,GACxCC,IAASf,MAASC,EAAS,QAC3Be,IAAUd,MAASC,EAAS,OAC5Bc,IAA0BC,EAAWC,EAAgB,oBAAoB,GAAGrB,CAAS,GACrFsB,IAAeF,EAAW;AAAA,IAC9B,CAACC,EAAgB,oCAAoC,CAAC,GAAGJ,KAAU,CAACX;AAAA,EAAA,CACrE,GAEKiB,IAAgBH,EAAWC,EAA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,IAEAA,EAEJ,CAAA;AAEJ,CAAC;AAEDzC,EAAU,cAAc;AAExB,MAAA6C,KAAe7C;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { FormMode, FormSize } from '../../constants';
|
|
4
|
+
import './formGroup.stories.scss';
|
|
5
|
+
declare const meta: {
|
|
6
|
+
title: string;
|
|
7
|
+
component: React.ForwardRefExoticComponent<import("./FormGroup").FormGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
parameters: {
|
|
9
|
+
docs: {
|
|
10
|
+
description: {
|
|
11
|
+
component: string;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
args: {
|
|
16
|
+
title: string;
|
|
17
|
+
legend: string;
|
|
18
|
+
mode: FormMode.onwhite;
|
|
19
|
+
size: FormSize.medium;
|
|
20
|
+
name: string;
|
|
21
|
+
};
|
|
22
|
+
argTypes: {
|
|
23
|
+
title: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
legend: {
|
|
27
|
+
control: string;
|
|
28
|
+
};
|
|
29
|
+
mode: {
|
|
30
|
+
control: string;
|
|
31
|
+
options: typeof FormMode;
|
|
32
|
+
};
|
|
33
|
+
size: {
|
|
34
|
+
control: string;
|
|
35
|
+
options: typeof FormSize;
|
|
36
|
+
};
|
|
37
|
+
name: {
|
|
38
|
+
control: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
type Story = StoryObj<typeof meta>;
|
|
44
|
+
export declare const CheckboxChildren: Story;
|
|
45
|
+
export declare const RadioButtonChildren: Story;
|
|
46
|
+
export declare const InputChildren: Story;
|
|
47
|
+
export declare const DivTagTrue: Story;
|
|
48
|
+
export declare const CustomErrorWrapperClass: Story;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import { FormLayoutColumns } from './FormLayout';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("./FormLayout").FormLayoutProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
args: {
|
|
15
|
+
maxColumns: FormLayoutColumns.three;
|
|
16
|
+
colMinWidth: number;
|
|
17
|
+
};
|
|
18
|
+
argTypes: {
|
|
19
|
+
maxColumns: {
|
|
20
|
+
control: string;
|
|
21
|
+
options: typeof FormLayoutColumns;
|
|
22
|
+
};
|
|
23
|
+
colMinWidth: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
export declare const CheckboxChildren: Story;
|
|
31
|
+
export declare const RadioButtonChildren: Story;
|
|
@@ -37,4 +37,3 @@ export interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'varian
|
|
|
37
37
|
}
|
|
38
38
|
declare const HelpBubble: React.ForwardRefExoticComponent<HelpBubbleProps & React.RefAttributes<HTMLDivElement | SVGSVGElement>>;
|
|
39
39
|
export default HelpBubble;
|
|
40
|
-
//# sourceMappingURL=HelpBubble.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./HelpBubble").HelpBubbleProps & React.RefAttributes<HTMLDivElement | SVGSVGElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
controllerRef: undefined;
|
|
15
|
+
children: string;
|
|
16
|
+
showBubble: true;
|
|
17
|
+
variant: import("../PopOver").PopOverVariant.positionautomatic;
|
|
18
|
+
};
|
|
19
|
+
argTypes: {
|
|
20
|
+
children: {
|
|
21
|
+
control: string;
|
|
22
|
+
};
|
|
23
|
+
showBubble: {
|
|
24
|
+
control: string;
|
|
25
|
+
};
|
|
26
|
+
variant: {
|
|
27
|
+
control: string;
|
|
28
|
+
options: typeof import("../PopOver").PopOverVariant;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export default meta;
|
|
33
|
+
type Story = StoryObj<typeof meta>;
|
|
34
|
+
export declare const Default: Story;
|
|
35
|
+
export declare const Link: Story;
|
|
36
|
+
export declare const Toggle: Story;
|
|
37
|
+
export declare const OnText: Story;
|
|
38
|
+
export declare const AsTooltip: Story;
|
|
39
|
+
export declare const WithHelpQuestion: Story;
|
|
40
|
+
export declare const HorizontalScroll: Story;
|
|
41
|
+
export declare const CenteredOverflow: Story;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HighlightBoxSize } from '../HighlightBox';
|
|
3
|
-
interface HelpPanelProps {
|
|
3
|
+
export interface HelpPanelProps {
|
|
4
4
|
/** What's in the box? */
|
|
5
5
|
children: React.ReactNode;
|
|
6
6
|
/** Changes the size. Default: medium */
|
|
@@ -14,4 +14,3 @@ interface HelpPanelProps {
|
|
|
14
14
|
}
|
|
15
15
|
declare const HelpPanel: React.FC<HelpPanelProps>;
|
|
16
16
|
export default HelpPanel;
|
|
17
|
-
//# sourceMappingURL=HelpPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPanel.js","sources":["../../../src/components/HelpPanel/HelpPanel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport HighlightBox, { HighlightBoxSize } from '../HighlightBox';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\
|
|
1
|
+
{"version":3,"file":"HelpPanel.js","sources":["../../../src/components/HelpPanel/HelpPanel.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport HighlightBox, { HighlightBoxSize } from '../HighlightBox';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Changes the size. Default: medium */\n size?: keyof typeof HighlightBoxSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets title if needed */\n title?: string;\n}\n\nconst HelpPanel: React.FC<HelpPanelProps> = ({ className, testId, size, children, title }) => {\n const helpPanelClassName = classNames(styles['help-panel'], className);\n\n return (\n <HighlightBox\n className={helpPanelClassName}\n contentWrapperClassName={styles['help-panel']}\n testId={testId}\n size={size}\n svgIcon={HandWaving}\n title={title}\n >\n {children}\n </HighlightBox>\n );\n};\n\nexport default HelpPanel;\n"],"names":["HelpPanel","className","testId","size","children","title","helpPanelClassName","classNames","styles","React","HighlightBox","HandWaving","HelpPanel$1"],"mappings":";;;;;AAsBA,MAAMA,IAAsC,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,MAAAC,GAAM,UAAAC,GAAU,OAAAC,QAAY;AAC5F,QAAMC,IAAqBC,EAAWC,EAAO,YAAY,GAAGP,CAAS;AAGnE,SAAAQ,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWJ;AAAA,MACX,yBAAyBE,EAAO,YAAY;AAAA,MAC5C,QAAAN;AAAA,MACA,MAAAC;AAAA,MACA,SAASQ;AAAA,MACT,OAAAN;AAAA,IAAA;AAAA,IAECD;AAAA,EAAA;AAGP,GAEAQ,IAAeZ;"}
|
|
@@ -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("./HelpPanel").HelpPanelProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
children: string;
|
|
15
|
+
size: "medium";
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
children: {
|
|
19
|
+
control: string;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
control: string;
|
|
23
|
+
options: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export default meta;
|
|
28
|
+
type Story = StoryObj<typeof meta>;
|
|
29
|
+
export declare const Default: Story;
|
|
30
|
+
export declare const WithoutTitle: Story;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface HelpQuestionProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-controls'> {
|
|
2
|
+
export interface HelpQuestionProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-controls'> {
|
|
3
3
|
/**
|
|
4
4
|
* Help question contents
|
|
5
5
|
*/
|
|
@@ -19,4 +19,3 @@ interface HelpQuestionProps extends Pick<React.InputHTMLAttributes<HTMLButtonEle
|
|
|
19
19
|
}
|
|
20
20
|
declare const HelpQuestion: React.ForwardRefExoticComponent<HelpQuestionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
21
|
export default HelpQuestion;
|
|
22
|
-
//# sourceMappingURL=HelpQuestion.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpQuestion.js","sources":["../../../src/components/HelpQuestion/HelpQuestion.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Trigger from '../Trigger';\n\nimport styles from './styles.module.scss';\n\
|
|
1
|
+
{"version":3,"file":"HelpQuestion.js","sources":["../../../src/components/HelpQuestion/HelpQuestion.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Trigger from '../Trigger';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpQuestionProps extends Pick<React.InputHTMLAttributes<HTMLButtonElement>, 'onClick' | 'aria-controls'> {\n /**\n * Help question contents\n */\n children: string;\n /**\n * Indicates that the help question is in use.\n */\n selected?: boolean;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Sets the data-testid attribute.\n */\n testId?: string;\n}\n\nconst HelpQuestion = React.forwardRef<HTMLButtonElement, HelpQuestionProps>(\n ({ children, selected = false, className, onClick, testId }, ref) => {\n const { isHovered, refObject } = usePseudoClasses<HTMLButtonElement>();\n\n const classes = classNames(styles.helpquestion, selected && styles['helpquestion--selected'], className);\n\n return (\n <button\n type=\"button\"\n data-testid={testId}\n className={classes}\n onClick={onClick}\n ref={mergeRefs([ref, refObject])}\n aria-expanded={selected}\n data-analyticsid={AnalyticsId.HelpQuestion}\n >\n <Trigger variant=\"help\" htmlMarkup=\"span\" selected={selected} isHovered={isHovered} />\n {children}\n </button>\n );\n }\n);\n\nHelpQuestion.displayName = 'HelpQuestion';\n\nexport default HelpQuestion;\n"],"names":["HelpQuestion","React","children","selected","className","onClick","testId","ref","isHovered","refObject","usePseudoClasses","classes","classNames","styles","mergeRefs","AnalyticsId","Trigger","HelpQuestion$1"],"mappings":";;;;;;;AA8BA,MAAMA,IAAeC,EAAM;AAAA,EACzB,CAAC,EAAE,UAAAC,GAAU,UAAAC,IAAW,IAAO,WAAAC,GAAW,SAAAC,GAAS,QAAAC,EAAO,GAAGC,MAAQ;AACnE,UAAM,EAAE,WAAAC,GAAW,WAAAC,EAAU,IAAIC,EAAoC,GAE/DC,IAAUC,EAAWC,EAAO,cAAcV,KAAYU,EAAO,wBAAwB,GAAGT,CAAS;AAGrG,WAAAH,gBAAAA,EAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,eAAaK;AAAA,QACb,WAAWK;AAAA,QACX,SAAAN;AAAA,QACA,KAAKS,EAAU,CAACP,GAAKE,CAAS,CAAC;AAAA,QAC/B,iBAAeN;AAAA,QACf,oBAAkBY,EAAY;AAAA,MAAA;AAAA,sCAE7BC,GAAQ,EAAA,SAAQ,QAAO,YAAW,QAAO,UAAAb,GAAoB,WAAAK,GAAsB;AAAA,MACnFN;AAAA,IAAA;AAAA,EAGP;AACF;AAEAF,EAAa,cAAc;AAE3B,MAAAiB,IAAejB;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.ForwardRefExoticComponent<import("./HelpQuestion").HelpQuestionProps & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
parameters: {
|
|
7
|
+
docs: {
|
|
8
|
+
description: {
|
|
9
|
+
component: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
args: {
|
|
14
|
+
children: string;
|
|
15
|
+
selected: false;
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
children: {
|
|
19
|
+
control: string;
|
|
20
|
+
};
|
|
21
|
+
selected: {
|
|
22
|
+
control: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const Default: Story;
|