@helsenorge/designsystem-react 2.17.0 → 3.0.1
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/AnchorLink.js +1 -1
- package/AnchorLink.js.map +1 -1
- package/Avatar.js +1 -1
- package/Avatar.js.map +1 -1
- package/Badge.js +1 -1
- package/Badge.js.map +1 -1
- package/Button.js +1 -1
- package/Button.js.map +1 -1
- package/CHANGELOG.md +60 -2
- package/Checkbox.js +1 -1
- package/Checkbox.js.map +1 -1
- package/Close.js +1 -1
- package/Close.js.map +1 -1
- package/ErrorWrapper.js +1 -1
- package/ErrorWrapper.js.map +1 -1
- package/FormGroup.js +1 -1
- package/FormGroup.js.map +1 -1
- package/FormLayout.js +1 -1
- package/FormLayout.js.map +1 -1
- package/HelpBubble.js +1 -1
- package/HelpBubble.js.map +1 -1
- package/HorizontalScroll.js +1 -1
- package/HorizontalScroll.js.map +1 -1
- package/Input.js +1 -1
- package/Input.js.map +1 -1
- package/ListHeader.js +1 -1
- package/ListHeader.js.map +1 -1
- package/ListHeaderText.js +1 -1
- package/ListHeaderText.js.map +1 -1
- package/MaxCharacters.js +1 -1
- package/MaxCharacters.js.map +1 -1
- package/Modal.js +1 -1
- package/Modal.js.map +1 -1
- package/Panel.js +1 -1
- package/Panel.js.map +1 -1
- package/PopOver.js +2 -0
- package/PopOver.js.map +1 -0
- package/RadioButton.js +1 -1
- package/RadioButton.js.map +1 -1
- package/Select.js +1 -1
- package/Select.js.map +1 -1
- package/Spacer.js +1 -1
- package/Spacer.js.map +1 -1
- package/StatusDot.js +1 -1
- package/StatusDot.js.map +1 -1
- package/TableBody.js +1 -1
- package/TableBody.js.map +1 -1
- package/TableCell.js +1 -1
- package/TableCell.js.map +1 -1
- package/TableExpandedRow.js +1 -1
- package/TableExpandedRow.js.map +1 -1
- package/TableExpanderCell.js +1 -1
- package/TableExpanderCell.js.map +1 -1
- package/TableHead.js +1 -1
- package/TableHead.js.map +1 -1
- package/TableHeadCell.js +1 -1
- package/TableHeadCell.js.map +1 -1
- package/TableRow.js +1 -1
- package/TableRow.js.map +1 -1
- package/Textarea.js +1 -1
- package/Textarea.js.map +1 -1
- package/Title.js +1 -1
- package/Title.js.map +1 -1
- package/Tooltip.js +1 -1
- package/Tooltip.js.map +1 -1
- package/TooltipWord.js +1 -1
- package/TooltipWord.js.map +1 -1
- package/Validation.js +1 -1
- package/Validation.js.map +1 -1
- package/__mocks__/matchMedia.d.ts +1 -1
- package/__mocks__/matchMedia.d.ts.map +1 -1
- package/components/AnchorLink/AnchorLink.d.ts +2 -2
- package/components/AnchorLink/AnchorLink.d.ts.map +1 -1
- package/components/AnchorLink/index.js +1 -1
- package/components/AnchorLink/styles.module.scss +19 -11
- package/components/Avatar/Avatar.d.ts +1 -1
- package/components/Avatar/Avatar.d.ts.map +1 -1
- package/components/Avatar/index.js +1 -1
- package/components/Avatar/styles.module.scss +2 -2
- package/components/Badge/Badge.d.ts +3 -3
- package/components/Badge/Badge.d.ts.map +1 -1
- package/components/Badge/index.js +1 -1
- package/components/Badge/styles.module.scss +7 -1
- package/components/Button/Button.d.ts +7 -7
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/componentdata.json +1 -1
- package/components/Button/index.js +1 -1
- package/components/Button/styles.module.scss +35 -21
- package/components/ButtonWithModal/ButtonWithModal.d.ts.map +1 -1
- package/components/ButtonWithModal/index.js +1 -1
- package/components/ButtonWithModal/index.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/components/Checkbox/componentdata.json +1 -1
- package/components/Checkbox/index.js +1 -1
- package/components/Checkbox/styles.module.scss +12 -12
- package/components/Close/Close.d.ts +8 -2
- package/components/Close/Close.d.ts.map +1 -1
- package/components/Close/componentdata.json +1 -1
- package/components/Close/index.js +1 -1
- package/components/Close/styles.module.scss +16 -8
- package/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/components/Dropdown/componentdata.json +1 -1
- package/components/Dropdown/index.js +1 -1
- package/components/Dropdown/index.js.map +1 -1
- package/components/Dropdown/styles.module.scss +31 -10
- package/components/Duolist/Duolist.d.ts +4 -4
- package/components/Duolist/Duolist.d.ts.map +1 -1
- package/components/Duolist/index.js +1 -1
- package/components/Duolist/index.js.map +1 -1
- package/components/Duolist/styles.module.scss +5 -3
- package/components/ErrorWrapper/ErrorWrapper.d.ts.map +1 -1
- package/components/ErrorWrapper/componentdata.json +1 -1
- package/components/ErrorWrapper/index.js +1 -1
- package/components/ErrorWrapper/styles.module.scss +8 -6
- package/components/Expander/Expander.d.ts +2 -2
- package/components/Expander/Expander.d.ts.map +1 -1
- package/components/Expander/componentdata.json +1 -1
- package/components/Expander/index.js +1 -1
- package/components/Expander/index.js.map +1 -1
- package/components/Expander/styles.module.scss +46 -15
- package/components/ExpanderHierarchy/Expander.d.ts +18 -0
- package/components/ExpanderHierarchy/Expander.d.ts.map +1 -0
- package/components/ExpanderHierarchy/ExpanderButton.d.ts +11 -0
- package/components/ExpanderHierarchy/ExpanderButton.d.ts.map +1 -0
- package/components/ExpanderHierarchy/ExpanderHierarchy.d.ts +22 -0
- package/components/ExpanderHierarchy/ExpanderHierarchy.d.ts.map +1 -0
- package/components/ExpanderHierarchy/componentdata.json +1 -0
- package/components/ExpanderHierarchy/expander.module.scss +152 -0
- package/components/ExpanderHierarchy/expander.module.scss.d.ts +25 -0
- package/components/ExpanderHierarchy/index.d.ts +4 -0
- package/components/ExpanderHierarchy/index.d.ts.map +1 -0
- package/components/ExpanderHierarchy/index.js +2 -0
- package/components/ExpanderHierarchy/index.js.map +1 -0
- package/components/ExpanderHierarchy/styles.module.scss +17 -0
- package/components/ExpanderHierarchy/styles.module.scss.d.ts +11 -0
- package/components/ExpanderHierarchy/utils.d.ts +3 -0
- package/components/ExpanderHierarchy/utils.d.ts.map +1 -0
- package/components/ExpanderList/ExpanderList.d.ts +4 -4
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/index.js +1 -1
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +17 -6
- package/components/FormExample/FormExample.d.ts.map +1 -1
- package/components/FormExample/index.js +3 -3
- package/components/FormExample/index.js.map +1 -1
- package/components/FormExample/styles.module.scss +6 -6
- package/components/FormGroup/FormGroup.d.ts +1 -1
- package/components/FormGroup/FormGroup.d.ts.map +1 -1
- package/components/FormGroup/index.js +1 -1
- package/components/FormGroup/styles.module.scss +5 -4
- package/components/FormLayout/FormLayout.d.ts.map +1 -1
- package/components/FormLayout/index.js +1 -1
- package/components/FormLayout/styles.module.scss +5 -2
- package/components/GridExample/index.js +1 -1
- package/components/GridExample/index.js.map +1 -1
- package/components/HelpBubble/HelpBubble.d.ts +5 -8
- package/components/HelpBubble/HelpBubble.d.ts.map +1 -1
- package/components/HelpBubble/index.js +1 -1
- package/components/HelpBubble/styles.module.scss +10 -51
- package/components/HelpBubble/styles.module.scss.d.ts +0 -4
- package/components/HelpBubbleExample/componentdata.json +1 -1
- package/components/HelpBubbleExample/index.js +1 -1
- package/components/HelpBubbleExample/index.js.map +1 -1
- package/components/HighlightBox/HighlightBox.d.ts +2 -2
- package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
- package/components/HighlightBox/componentdata.json +1 -1
- package/components/HighlightBox/index.js +1 -1
- package/components/HighlightBox/index.js.map +1 -1
- package/components/HighlightBox/styles.module.scss +38 -29
- package/components/HorizontalScroll/HorizontalScroll.d.ts.map +1 -1
- package/components/HorizontalScroll/index.js +1 -1
- package/components/HorizontalScroll/styles.module.scss +10 -3
- package/components/Icons/ActiveMonitoring.d.ts.map +1 -1
- package/components/Icons/ActiveMonitoring.js.map +1 -1
- package/components/Icons/AcupunctureBack.d.ts.map +1 -1
- package/components/Icons/AcupunctureBack.js.map +1 -1
- package/components/Icons/AlarmClock.d.ts.map +1 -1
- package/components/Icons/AlarmClock.js.map +1 -1
- package/components/Icons/AlertSignFill.d.ts.map +1 -1
- package/components/Icons/AlertSignFill.js.map +1 -1
- package/components/Icons/AlertSignStroke.d.ts.map +1 -1
- package/components/Icons/AlertSignStroke.js.map +1 -1
- package/components/Icons/Amputation.d.ts.map +1 -1
- package/components/Icons/Amputation.js.map +1 -1
- package/components/Icons/Anxiety.d.ts.map +1 -1
- package/components/Icons/Anxiety.js.map +1 -1
- package/components/Icons/Apple.d.ts.map +1 -1
- package/components/Icons/Apple.js.map +1 -1
- package/components/Icons/Archive.d.ts.map +1 -1
- package/components/Icons/Archive.js.map +1 -1
- package/components/Icons/ArmFlexing.d.ts.map +1 -1
- package/components/Icons/ArmFlexing.js.map +1 -1
- package/components/Icons/ArrowDown.d.ts.map +1 -1
- package/components/Icons/ArrowDown.js.map +1 -1
- package/components/Icons/ArrowLeft.d.ts.map +1 -1
- package/components/Icons/ArrowLeft.js.map +1 -1
- package/components/Icons/ArrowRight.d.ts.map +1 -1
- package/components/Icons/ArrowRight.js.map +1 -1
- package/components/Icons/ArrowUp.d.ts.map +1 -1
- package/components/Icons/ArrowUp.js.map +1 -1
- package/components/Icons/ArrowUpRight.d.ts.map +1 -1
- package/components/Icons/ArrowUpRight.js.map +1 -1
- package/components/Icons/Attachment.d.ts.map +1 -1
- package/components/Icons/Attachment.js.map +1 -1
- package/components/Icons/Atv.d.ts.map +1 -1
- package/components/Icons/Atv.js.map +1 -1
- package/components/Icons/Avatar.d.ts.map +1 -1
- package/components/Icons/Avatar.js.map +1 -1
- package/components/Icons/AwakePersonOnPillow.d.ts.map +1 -1
- package/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/components/Icons/Baby.d.ts.map +1 -1
- package/components/Icons/Baby.js.map +1 -1
- package/components/Icons/BandAid.d.ts.map +1 -1
- package/components/Icons/BandAid.js.map +1 -1
- package/components/Icons/BeerAndPills.d.ts.map +1 -1
- package/components/Icons/BeerAndPills.js.map +1 -1
- package/components/Icons/Bell.d.ts.map +1 -1
- package/components/Icons/Bell.js.map +1 -1
- package/components/Icons/Bike.d.ts.map +1 -1
- package/components/Icons/Bike.js.map +1 -1
- package/components/Icons/BirthControl.d.ts.map +1 -1
- package/components/Icons/BirthControl.js.map +1 -1
- package/components/Icons/BirthdayCake.d.ts.map +1 -1
- package/components/Icons/BirthdayCake.js.map +1 -1
- package/components/Icons/Boat.d.ts.map +1 -1
- package/components/Icons/Boat.js.map +1 -1
- package/components/Icons/Body.d.ts.map +1 -1
- package/components/Icons/Body.js.map +1 -1
- package/components/Icons/Brain.d.ts.map +1 -1
- package/components/Icons/Brain.js.map +1 -1
- package/components/Icons/BreastReconstruction.d.ts.map +1 -1
- package/components/Icons/BreastReconstruction.js.map +1 -1
- package/components/Icons/BreastRemoval.d.ts.map +1 -1
- package/components/Icons/BreastRemoval.js.map +1 -1
- package/components/Icons/Breasts.d.ts.map +1 -1
- package/components/Icons/Breasts.js.map +1 -1
- package/components/Icons/BrokenHeart.d.ts.map +1 -1
- package/components/Icons/BrokenHeart.js.map +1 -1
- package/components/Icons/BrokenPuzzle.d.ts.map +1 -1
- package/components/Icons/BrokenPuzzle.js.map +1 -1
- package/components/Icons/Bus.d.ts.map +1 -1
- package/components/Icons/Bus.js.map +1 -1
- package/components/Icons/Calendar.d.ts.map +1 -1
- package/components/Icons/Calendar.js.map +1 -1
- package/components/Icons/CalendarChange.d.ts.map +1 -1
- package/components/Icons/CalendarChange.js.map +1 -1
- package/components/Icons/CalendarCheck.d.ts.map +1 -1
- package/components/Icons/CalendarCheck.js.map +1 -1
- package/components/Icons/CalendarEvent.d.ts.map +1 -1
- package/components/Icons/CalendarEvent.js.map +1 -1
- package/components/Icons/CalendarSave.d.ts.map +1 -1
- package/components/Icons/CalendarSave.js.map +1 -1
- package/components/Icons/Cancer.d.ts.map +1 -1
- package/components/Icons/Cancer.js.map +1 -1
- package/components/Icons/Car.d.ts.map +1 -1
- package/components/Icons/Car.js.map +1 -1
- package/components/Icons/Change.d.ts.map +1 -1
- package/components/Icons/Change.js.map +1 -1
- package/components/Icons/Check.d.ts.map +1 -1
- package/components/Icons/Check.js.map +1 -1
- package/components/Icons/CheckFill.d.ts.map +1 -1
- package/components/Icons/CheckFill.js.map +1 -1
- package/components/Icons/CheckOutline.d.ts.map +1 -1
- package/components/Icons/CheckOutline.js.map +1 -1
- package/components/Icons/Chest.d.ts.map +1 -1
- package/components/Icons/Chest.js.map +1 -1
- package/components/Icons/ChevronDown.d.ts.map +1 -1
- package/components/Icons/ChevronDown.js.map +1 -1
- package/components/Icons/ChevronLeft.d.ts.map +1 -1
- package/components/Icons/ChevronLeft.js.map +1 -1
- package/components/Icons/ChevronRight.d.ts.map +1 -1
- package/components/Icons/ChevronRight.js.map +1 -1
- package/components/Icons/ChevronUp.d.ts.map +1 -1
- package/components/Icons/ChevronUp.js.map +1 -1
- package/components/Icons/ChevronsDown.d.ts.map +1 -1
- package/components/Icons/ChevronsDown.js.map +1 -1
- package/components/Icons/ChevronsUp.d.ts.map +1 -1
- package/components/Icons/ChevronsUp.js.map +1 -1
- package/components/Icons/ChildPlaying.d.ts.map +1 -1
- package/components/Icons/ChildPlaying.js.map +1 -1
- package/components/Icons/Cigarette.d.ts.map +1 -1
- package/components/Icons/Cigarette.js.map +1 -1
- package/components/Icons/Coins.d.ts.map +1 -1
- package/components/Icons/Coins.js.map +1 -1
- package/components/Icons/Contacts.d.ts.map +1 -1
- package/components/Icons/Contacts.js.map +1 -1
- package/components/Icons/Copy.d.ts.map +1 -1
- package/components/Icons/Copy.js.map +1 -1
- package/components/Icons/CoronaCertificate.d.ts.map +1 -1
- package/components/Icons/CoronaCertificate.js.map +1 -1
- package/components/Icons/Coronavirus.d.ts.map +1 -1
- package/components/Icons/Coronavirus.js.map +1 -1
- package/components/Icons/Cough.d.ts.map +1 -1
- package/components/Icons/Cough.js.map +1 -1
- package/components/Icons/CriticalHealthInfo.d.ts.map +1 -1
- package/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/components/Icons/Cross.d.ts.map +1 -1
- package/components/Icons/Cross.js.map +1 -1
- package/components/Icons/DataExchange.d.ts.map +1 -1
- package/components/Icons/DataExchange.js.map +1 -1
- package/components/Icons/DataReceived.d.ts.map +1 -1
- package/components/Icons/DataReceived.js.map +1 -1
- package/components/Icons/DataSent.d.ts.map +1 -1
- package/components/Icons/DataSent.js.map +1 -1
- package/components/Icons/Depression.d.ts.map +1 -1
- package/components/Icons/Depression.js.map +1 -1
- package/components/Icons/DigestiveSystem.d.ts.map +1 -1
- package/components/Icons/DigestiveSystem.js.map +1 -1
- package/components/Icons/Dizzy.d.ts.map +1 -1
- package/components/Icons/Dizzy.js.map +1 -1
- package/components/Icons/Documents.d.ts.map +1 -1
- package/components/Icons/Documents.js.map +1 -1
- package/components/Icons/Dog.d.ts.map +1 -1
- package/components/Icons/Dog.js.map +1 -1
- package/components/Icons/DonorCard.d.ts.map +1 -1
- package/components/Icons/DonorCard.js.map +1 -1
- package/components/Icons/Download.d.ts.map +1 -1
- package/components/Icons/Download.js.map +1 -1
- package/components/Icons/Draft.d.ts.map +1 -1
- package/components/Icons/Draft.js.map +1 -1
- package/components/Icons/EChat.d.ts.map +1 -1
- package/components/Icons/EChat.js.map +1 -1
- package/components/Icons/EarNoseThroat.d.ts.map +1 -1
- package/components/Icons/EarNoseThroat.js.map +1 -1
- package/components/Icons/ElderlyPerson.d.ts.map +1 -1
- package/components/Icons/ElderlyPerson.js.map +1 -1
- package/components/Icons/Embolization.d.ts.map +1 -1
- package/components/Icons/Embolization.js.map +1 -1
- package/components/Icons/EmoticonAnnoyed.d.ts.map +1 -1
- package/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/components/Icons/EmoticonDelighted.d.ts.map +1 -1
- package/components/Icons/EmoticonDelighted.js.map +1 -1
- package/components/Icons/EmoticonDisappointed.d.ts.map +1 -1
- package/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/components/Icons/EmoticonHappy.d.ts.map +1 -1
- package/components/Icons/EmoticonHappy.js.map +1 -1
- package/components/Icons/EmoticonMeh.d.ts.map +1 -1
- package/components/Icons/EmoticonMeh.js.map +1 -1
- package/components/Icons/EnterFullScreen.d.ts.map +1 -1
- package/components/Icons/EnterFullScreen.js.map +1 -1
- package/components/Icons/Envelope.d.ts.map +1 -1
- package/components/Icons/Envelope.js.map +1 -1
- package/components/Icons/Epilepsy.d.ts.map +1 -1
- package/components/Icons/Epilepsy.js.map +1 -1
- package/components/Icons/Eraser.d.ts.map +1 -1
- package/components/Icons/Eraser.js.map +1 -1
- package/components/Icons/ErrorSignFill.d.ts.map +1 -1
- package/components/Icons/ErrorSignFill.js.map +1 -1
- package/components/Icons/ErrorSignStroke.d.ts.map +1 -1
- package/components/Icons/ErrorSignStroke.js.map +1 -1
- package/components/Icons/EuropeanHealthCard.d.ts.map +1 -1
- package/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/components/Icons/ExitFullScreen.d.ts.map +1 -1
- package/components/Icons/ExitFullScreen.js.map +1 -1
- package/components/Icons/Eye.d.ts.map +1 -1
- package/components/Icons/Eye.js.map +1 -1
- package/components/Icons/Facebook.d.ts.map +1 -1
- package/components/Icons/Facebook.js.map +1 -1
- package/components/Icons/Female.d.ts.map +1 -1
- package/components/Icons/Female.js.map +1 -1
- package/components/Icons/FemaleDoctor.d.ts.map +1 -1
- package/components/Icons/FemaleDoctor.js.map +1 -1
- package/components/Icons/Ferry.d.ts.map +1 -1
- package/components/Icons/Ferry.js.map +1 -1
- package/components/Icons/File.d.ts.map +1 -1
- package/components/Icons/File.js.map +1 -1
- package/components/Icons/Filter.d.ts.map +1 -1
- package/components/Icons/Filter.js.map +1 -1
- package/components/Icons/FingerBleed.d.ts.map +1 -1
- package/components/Icons/FingerBleed.js.map +1 -1
- package/components/Icons/FirstAidKit.d.ts.map +1 -1
- package/components/Icons/FirstAidKit.js.map +1 -1
- package/components/Icons/FloppyDisk.d.ts.map +1 -1
- package/components/Icons/FloppyDisk.js.map +1 -1
- package/components/Icons/Football.d.ts.map +1 -1
- package/components/Icons/Football.js.map +1 -1
- package/components/Icons/Form.d.ts.map +1 -1
- package/components/Icons/Form.js.map +1 -1
- package/components/Icons/Forward.d.ts.map +1 -1
- package/components/Icons/Forward.js.map +1 -1
- package/components/Icons/Gallery.d.ts.map +1 -1
- package/components/Icons/Gallery.js.map +1 -1
- package/components/Icons/Garden.d.ts.map +1 -1
- package/components/Icons/Garden.js.map +1 -1
- package/components/Icons/GasCan.d.ts.map +1 -1
- package/components/Icons/GasCan.js.map +1 -1
- package/components/Icons/GenderIdentity.d.ts.map +1 -1
- package/components/Icons/GenderIdentity.js.map +1 -1
- package/components/Icons/Globe.d.ts.map +1 -1
- package/components/Icons/Globe.js.map +1 -1
- package/components/Icons/Group.d.ts.map +1 -1
- package/components/Icons/Group.js.map +1 -1
- package/components/Icons/HandWaving.d.ts.map +1 -1
- package/components/Icons/HandWaving.js.map +1 -1
- package/components/Icons/HandWithDisease.d.ts.map +1 -1
- package/components/Icons/HandWithDisease.js.map +1 -1
- package/components/Icons/HealthClinic.d.ts.map +1 -1
- package/components/Icons/HealthClinic.js.map +1 -1
- package/components/Icons/HealthWarning.d.ts.map +1 -1
- package/components/Icons/HealthWarning.js.map +1 -1
- package/components/Icons/Heart.d.ts.map +1 -1
- package/components/Icons/Heart.js.map +1 -1
- package/components/Icons/HeartHands.d.ts.map +1 -1
- package/components/Icons/HeartHands.js.map +1 -1
- package/components/Icons/HelpSign.d.ts.map +1 -1
- package/components/Icons/HelpSign.js.map +1 -1
- package/components/Icons/HelpingHand.d.ts.map +1 -1
- package/components/Icons/HelpingHand.js.map +1 -1
- package/components/Icons/Hemodialysis.d.ts.map +1 -1
- package/components/Icons/Hemodialysis.js.map +1 -1
- package/components/Icons/Hiker.d.ts.map +1 -1
- package/components/Icons/Hiker.js.map +1 -1
- package/components/Icons/Hipprosthesis.d.ts.map +1 -1
- package/components/Icons/Hipprosthesis.js.map +1 -1
- package/components/Icons/History.d.ts.map +1 -1
- package/components/Icons/History.js.map +1 -1
- package/components/Icons/HivAndAids.d.ts.map +1 -1
- package/components/Icons/HivAndAids.js.map +1 -1
- package/components/Icons/Home.d.ts.map +1 -1
- package/components/Icons/Home.js.map +1 -1
- package/components/Icons/Hormone.d.ts.map +1 -1
- package/components/Icons/Hormone.js.map +1 -1
- package/components/Icons/Hospital.d.ts.map +1 -1
- package/components/Icons/Hospital.js.map +1 -1
- package/components/Icons/Hourglass.d.ts.map +1 -1
- package/components/Icons/Hourglass.js.map +1 -1
- package/components/Icons/Icon.d.ts +1 -1
- package/components/Icons/Icon.d.ts.map +1 -1
- package/components/Icons/Icon.js +1 -1
- package/components/Icons/Icon.js.map +1 -1
- package/components/Icons/ImgFile.d.ts.map +1 -1
- package/components/Icons/ImgFile.js.map +1 -1
- package/components/Icons/Inbox.d.ts.map +1 -1
- package/components/Icons/Inbox.js.map +1 -1
- package/components/Icons/InfoSignFill.d.ts.map +1 -1
- package/components/Icons/InfoSignFill.js.map +1 -1
- package/components/Icons/InfoSignStroke.d.ts.map +1 -1
- package/components/Icons/InfoSignStroke.js.map +1 -1
- package/components/Icons/Instagram.d.ts.map +1 -1
- package/components/Icons/Instagram.js.map +1 -1
- package/components/Icons/Intravenous.d.ts.map +1 -1
- package/components/Icons/Intravenous.js.map +1 -1
- package/components/Icons/JointPain.d.ts.map +1 -1
- package/components/Icons/JointPain.js.map +1 -1
- package/components/Icons/Journal.d.ts.map +1 -1
- package/components/Icons/Journal.js.map +1 -1
- package/components/Icons/JpgFile.d.ts.map +1 -1
- package/components/Icons/JpgFile.js.map +1 -1
- package/components/Icons/Kidney.d.ts.map +1 -1
- package/components/Icons/Kidney.js.map +1 -1
- package/components/Icons/KitchenScale.d.ts.map +1 -1
- package/components/Icons/KitchenScale.js.map +1 -1
- package/components/Icons/Kjernejournal.d.ts.map +1 -1
- package/components/Icons/Kjernejournal.js.map +1 -1
- package/components/Icons/Laboratory.d.ts.map +1 -1
- package/components/Icons/Laboratory.js.map +1 -1
- package/components/Icons/LaptopBlog.d.ts.map +1 -1
- package/components/Icons/LaptopBlog.js.map +1 -1
- package/components/Icons/LawBook.d.ts.map +1 -1
- package/components/Icons/LawBook.js.map +1 -1
- package/components/Icons/LightBulb.d.ts.map +1 -1
- package/components/Icons/LightBulb.js.map +1 -1
- package/components/Icons/List.d.ts.map +1 -1
- package/components/Icons/List.js.map +1 -1
- package/components/Icons/Location.d.ts.map +1 -1
- package/components/Icons/Location.js.map +1 -1
- package/components/Icons/Lock.d.ts.map +1 -1
- package/components/Icons/Lock.js.map +1 -1
- package/components/Icons/Login.d.ts.map +1 -1
- package/components/Icons/Login.js.map +1 -1
- package/components/Icons/Logout.d.ts.map +1 -1
- package/components/Icons/Logout.js.map +1 -1
- package/components/Icons/Lungs.d.ts.map +1 -1
- package/components/Icons/Lungs.js.map +1 -1
- package/components/Icons/Makeup.d.ts.map +1 -1
- package/components/Icons/Makeup.js.map +1 -1
- package/components/Icons/MaleDoctor.d.ts.map +1 -1
- package/components/Icons/MaleDoctor.js.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.d.ts.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/components/Icons/MaleGenitalia.d.ts.map +1 -1
- package/components/Icons/MaleGenitalia.js.map +1 -1
- package/components/Icons/Medicine.d.ts.map +1 -1
- package/components/Icons/Medicine.js.map +1 -1
- package/components/Icons/MedicineWarning.d.ts.map +1 -1
- package/components/Icons/MedicineWarning.js.map +1 -1
- package/components/Icons/MentalHealthAdult.d.ts.map +1 -1
- package/components/Icons/MentalHealthAdult.js.map +1 -1
- package/components/Icons/MentalHealthChild.d.ts.map +1 -1
- package/components/Icons/MentalHealthChild.js.map +1 -1
- package/components/Icons/Menu.d.ts.map +1 -1
- package/components/Icons/Menu.js.map +1 -1
- package/components/Icons/Microscope.d.ts.map +1 -1
- package/components/Icons/Microscope.js.map +1 -1
- package/components/Icons/Minus.d.ts.map +1 -1
- package/components/Icons/Minus.js.map +1 -1
- package/components/Icons/Mirror.d.ts.map +1 -1
- package/components/Icons/Mirror.js.map +1 -1
- package/components/Icons/MobilePhone.d.ts.map +1 -1
- package/components/Icons/MobilePhone.js.map +1 -1
- package/components/Icons/MotherHoldingBaby.d.ts.map +1 -1
- package/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/components/Icons/MuscleBack.d.ts.map +1 -1
- package/components/Icons/MuscleBack.js.map +1 -1
- package/components/Icons/MuscleLeg.d.ts.map +1 -1
- package/components/Icons/MuscleLeg.js.map +1 -1
- package/components/Icons/Mushroom.d.ts.map +1 -1
- package/components/Icons/Mushroom.js.map +1 -1
- package/components/Icons/Music.d.ts.map +1 -1
- package/components/Icons/Music.js.map +1 -1
- package/components/Icons/MusselsAndSalt.d.ts.map +1 -1
- package/components/Icons/MusselsAndSalt.js.map +1 -1
- package/components/Icons/NoAccess.d.ts.map +1 -1
- package/components/Icons/NoAccess.js.map +1 -1
- package/components/Icons/NoEye.d.ts.map +1 -1
- package/components/Icons/NoEye.js.map +1 -1
- package/components/Icons/NoFilter.d.ts.map +1 -1
- package/components/Icons/NoFilter.js.map +1 -1
- package/components/Icons/Notepad.d.ts.map +1 -1
- package/components/Icons/Notepad.js.map +1 -1
- package/components/Icons/Osteotomy.d.ts.map +1 -1
- package/components/Icons/Osteotomy.js.map +1 -1
- package/components/Icons/PaintRoller.d.ts.map +1 -1
- package/components/Icons/PaintRoller.js.map +1 -1
- package/components/Icons/PaperPlane.d.ts.map +1 -1
- package/components/Icons/PaperPlane.js.map +1 -1
- package/components/Icons/PatientAndPerson.d.ts.map +1 -1
- package/components/Icons/PatientAndPerson.js.map +1 -1
- package/components/Icons/Pause.d.ts.map +1 -1
- package/components/Icons/Pause.js.map +1 -1
- package/components/Icons/PdfFile.d.ts.map +1 -1
- package/components/Icons/PdfFile.js.map +1 -1
- package/components/Icons/Pencil.d.ts.map +1 -1
- package/components/Icons/Pencil.js.map +1 -1
- package/components/Icons/PeopleTalking.d.ts.map +1 -1
- package/components/Icons/PeopleTalking.js.map +1 -1
- package/components/Icons/Peritonealdialysis.d.ts.map +1 -1
- package/components/Icons/Peritonealdialysis.js.map +1 -1
- package/components/Icons/Person.d.ts.map +1 -1
- package/components/Icons/Person.js.map +1 -1
- package/components/Icons/PersonAndPatient.d.ts.map +1 -1
- package/components/Icons/PersonAndPatient.js.map +1 -1
- package/components/Icons/PersonCancel.d.ts.map +1 -1
- package/components/Icons/PersonCancel.js.map +1 -1
- package/components/Icons/PersonInXRayMachine.d.ts.map +1 -1
- package/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/components/Icons/PersonOverweight.d.ts.map +1 -1
- package/components/Icons/PersonOverweight.js.map +1 -1
- package/components/Icons/PersonRelaxing.d.ts.map +1 -1
- package/components/Icons/PersonRelaxing.js.map +1 -1
- package/components/Icons/PersonWithBrain.d.ts.map +1 -1
- package/components/Icons/PersonWithBrain.js.map +1 -1
- package/components/Icons/PersonWithBrokenArm.d.ts.map +1 -1
- package/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/components/Icons/PersonWithCrutches.d.ts.map +1 -1
- package/components/Icons/PersonWithCrutches.js.map +1 -1
- package/components/Icons/PersonWithJaw.d.ts.map +1 -1
- package/components/Icons/PersonWithJaw.js.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.d.ts.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/components/Icons/PersonWithSenses.d.ts.map +1 -1
- package/components/Icons/PersonWithSenses.js.map +1 -1
- package/components/Icons/PersonWorking.d.ts.map +1 -1
- package/components/Icons/PersonWorking.js.map +1 -1
- package/components/Icons/PersonalPlan.d.ts.map +1 -1
- package/components/Icons/PersonalPlan.js.map +1 -1
- package/components/Icons/PizzaSlice.d.ts.map +1 -1
- package/components/Icons/PizzaSlice.js.map +1 -1
- package/components/Icons/Plane.d.ts.map +1 -1
- package/components/Icons/Plane.js.map +1 -1
- package/components/Icons/Plant.d.ts.map +1 -1
- package/components/Icons/Plant.js.map +1 -1
- package/components/Icons/Play.d.ts.map +1 -1
- package/components/Icons/Play.js.map +1 -1
- package/components/Icons/PlusLarge.d.ts.map +1 -1
- package/components/Icons/PlusLarge.js.map +1 -1
- package/components/Icons/PlusSmall.d.ts.map +1 -1
- package/components/Icons/PlusSmall.js.map +1 -1
- package/components/Icons/PngFile.d.ts.map +1 -1
- package/components/Icons/PngFile.js.map +1 -1
- package/components/Icons/Podcast.d.ts.map +1 -1
- package/components/Icons/Podcast.js.map +1 -1
- package/components/Icons/PoisonInformation.d.ts.map +1 -1
- package/components/Icons/PoisonInformation.js.map +1 -1
- package/components/Icons/Pregnant.d.ts.map +1 -1
- package/components/Icons/Pregnant.js.map +1 -1
- package/components/Icons/Printer.d.ts.map +1 -1
- package/components/Icons/Printer.js.map +1 -1
- package/components/Icons/Psychosis.d.ts.map +1 -1
- package/components/Icons/Psychosis.js.map +1 -1
- package/components/Icons/Publication.d.ts.map +1 -1
- package/components/Icons/Publication.js.map +1 -1
- package/components/Icons/Puzzle.d.ts.map +1 -1
- package/components/Icons/Puzzle.js.map +1 -1
- package/components/Icons/QrCode.d.ts.map +1 -1
- package/components/Icons/QrCode.js.map +1 -1
- package/components/Icons/Quarrel.d.ts.map +1 -1
- package/components/Icons/Quarrel.js.map +1 -1
- package/components/Icons/RadioTherapy.d.ts.map +1 -1
- package/components/Icons/RadioTherapy.js.map +1 -1
- package/components/Icons/RadioactiveTreatment.d.ts.map +1 -1
- package/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/components/Icons/Radioiodine.d.ts.map +1 -1
- package/components/Icons/Radioiodine.js.map +1 -1
- package/components/Icons/Receipt.d.ts.map +1 -1
- package/components/Icons/Receipt.js.map +1 -1
- package/components/Icons/Receptionist.d.ts.map +1 -1
- package/components/Icons/Receptionist.js.map +1 -1
- package/components/Icons/Recovery.d.ts.map +1 -1
- package/components/Icons/Recovery.js.map +1 -1
- package/components/Icons/Referral.d.ts.map +1 -1
- package/components/Icons/Referral.js.map +1 -1
- package/components/Icons/Refresh.d.ts.map +1 -1
- package/components/Icons/Refresh.js.map +1 -1
- package/components/Icons/Refund.d.ts.map +1 -1
- package/components/Icons/Refund.js.map +1 -1
- package/components/Icons/Reply.d.ts.map +1 -1
- package/components/Icons/Reply.js.map +1 -1
- package/components/Icons/Rocket.d.ts.map +1 -1
- package/components/Icons/Rocket.js.map +1 -1
- package/components/Icons/RtfFile.d.ts.map +1 -1
- package/components/Icons/RtfFile.js.map +1 -1
- package/components/Icons/STDs.d.ts.map +1 -1
- package/components/Icons/STDs.js.map +1 -1
- package/components/Icons/Save.d.ts.map +1 -1
- package/components/Icons/Save.js.map +1 -1
- package/components/Icons/Scale.d.ts.map +1 -1
- package/components/Icons/Scale.js.map +1 -1
- package/components/Icons/Search.d.ts.map +1 -1
- package/components/Icons/Search.js.map +1 -1
- package/components/Icons/SectionSign.d.ts.map +1 -1
- package/components/Icons/SectionSign.js.map +1 -1
- package/components/Icons/Settings.d.ts.map +1 -1
- package/components/Icons/Settings.js.map +1 -1
- package/components/Icons/Sexualorientation.d.ts.map +1 -1
- package/components/Icons/Sexualorientation.js.map +1 -1
- package/components/Icons/ShakingHand.d.ts.map +1 -1
- package/components/Icons/ShakingHand.js.map +1 -1
- package/components/Icons/Share.d.ts.map +1 -1
- package/components/Icons/Share.js.map +1 -1
- package/components/Icons/Shield.d.ts.map +1 -1
- package/components/Icons/Shield.js.map +1 -1
- package/components/Icons/ShuntOperation.d.ts.map +1 -1
- package/components/Icons/ShuntOperation.js.map +1 -1
- package/components/Icons/Skeleton.d.ts.map +1 -1
- package/components/Icons/Skeleton.js.map +1 -1
- package/components/Icons/Skin.d.ts.map +1 -1
- package/components/Icons/Skin.js.map +1 -1
- package/components/Icons/Snake.d.ts.map +1 -1
- package/components/Icons/Snake.js.map +1 -1
- package/components/Icons/Snapchat.d.ts.map +1 -1
- package/components/Icons/Snapchat.js.map +1 -1
- package/components/Icons/SortDown.d.ts.map +1 -1
- package/components/Icons/SortDown.js.map +1 -1
- package/components/Icons/SortUp.d.ts.map +1 -1
- package/components/Icons/SortUp.js +1 -1
- package/components/Icons/SortUp.js.map +1 -1
- package/components/Icons/SpeechBubble.d.ts.map +1 -1
- package/components/Icons/SpeechBubble.js.map +1 -1
- package/components/Icons/Spray.d.ts.map +1 -1
- package/components/Icons/Spray.js.map +1 -1
- package/components/Icons/Stopwatch.d.ts.map +1 -1
- package/components/Icons/Stopwatch.js.map +1 -1
- package/components/Icons/SupportingPerson.js +1 -1
- package/components/Icons/SupportingPerson.js.map +1 -1
- package/components/Icons/Surgery.d.ts.map +1 -1
- package/components/Icons/Surgery.js.map +1 -1
- package/components/Icons/Syringe.d.ts.map +1 -1
- package/components/Icons/Syringe.js.map +1 -1
- package/components/Icons/Taxi.d.ts.map +1 -1
- package/components/Icons/Taxi.js.map +1 -1
- package/components/Icons/TeddyBear.d.ts.map +1 -1
- package/components/Icons/TeddyBear.js.map +1 -1
- package/components/Icons/Teenagers.d.ts.map +1 -1
- package/components/Icons/Teenagers.js.map +1 -1
- package/components/Icons/ThinkingAboutBaby.d.ts.map +1 -1
- package/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/components/Icons/Ticket.d.ts.map +1 -1
- package/components/Icons/Ticket.js.map +1 -1
- package/components/Icons/TimePassing.d.ts.map +1 -1
- package/components/Icons/TimePassing.js.map +1 -1
- package/components/Icons/Toolbox.d.ts.map +1 -1
- package/components/Icons/Toolbox.js.map +1 -1
- package/components/Icons/Tooth.d.ts.map +1 -1
- package/components/Icons/Tooth.js.map +1 -1
- package/components/Icons/TotalKneeProsthesis.d.ts.map +1 -1
- package/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/components/Icons/Train.d.ts.map +1 -1
- package/components/Icons/Train.js.map +1 -1
- package/components/Icons/Transplantation.d.ts.map +1 -1
- package/components/Icons/Transplantation.js.map +1 -1
- package/components/Icons/TrashCan.d.ts.map +1 -1
- package/components/Icons/TrashCan.js.map +1 -1
- package/components/Icons/TravelRoute.d.ts.map +1 -1
- package/components/Icons/TravelRoute.js.map +1 -1
- package/components/Icons/TriangleX.d.ts.map +1 -1
- package/components/Icons/TriangleX.js.map +1 -1
- package/components/Icons/Twitter.d.ts.map +1 -1
- package/components/Icons/Twitter.js.map +1 -1
- package/components/Icons/Undo.d.ts.map +1 -1
- package/components/Icons/Undo.js.map +1 -1
- package/components/Icons/UniProsthesis.d.ts.map +1 -1
- package/components/Icons/UniProsthesis.js.map +1 -1
- package/components/Icons/Upload.d.ts.map +1 -1
- package/components/Icons/Upload.js.map +1 -1
- package/components/Icons/UserOrganization.d.ts.map +1 -1
- package/components/Icons/UserOrganization.js.map +1 -1
- package/components/Icons/Vaccine.d.ts.map +1 -1
- package/components/Icons/Vaccine.js.map +1 -1
- package/components/Icons/VerticalDots.d.ts.map +1 -1
- package/components/Icons/VerticalDots.js.map +1 -1
- package/components/Icons/VideoCamera.d.ts.map +1 -1
- package/components/Icons/VideoCamera.js.map +1 -1
- package/components/Icons/VideoChat.d.ts.map +1 -1
- package/components/Icons/VideoChat.js.map +1 -1
- package/components/Icons/Wallet.d.ts.map +1 -1
- package/components/Icons/Wallet.js.map +1 -1
- package/components/Icons/Watch.d.ts.map +1 -1
- package/components/Icons/Watch.js.map +1 -1
- package/components/Icons/Website.d.ts.map +1 -1
- package/components/Icons/Website.js.map +1 -1
- package/components/Icons/Wheelchair.d.ts.map +1 -1
- package/components/Icons/Wheelchair.js.map +1 -1
- package/components/Icons/WheelchairActive.d.ts.map +1 -1
- package/components/Icons/WheelchairActive.js.map +1 -1
- package/components/Icons/Window.d.ts.map +1 -1
- package/components/Icons/Window.js.map +1 -1
- package/components/Icons/WordDocument.d.ts.map +1 -1
- package/components/Icons/WordDocument.js.map +1 -1
- package/components/Icons/WorkSuitcase.d.ts.map +1 -1
- package/components/Icons/WorkSuitcase.js.map +1 -1
- package/components/Icons/X.d.ts.map +1 -1
- package/components/Icons/X.js.map +1 -1
- package/components/Icons/XOutline.d.ts.map +1 -1
- package/components/Icons/XOutline.js.map +1 -1
- package/components/Icons/XmlFile.d.ts.map +1 -1
- package/components/Icons/XmlFile.js.map +1 -1
- package/components/Icons/YouTube.d.ts.map +1 -1
- package/components/Icons/YouTube.js.map +1 -1
- package/components/Icons/Zoom.d.ts.map +1 -1
- package/components/Icons/Zoom.js.map +1 -1
- package/components/Icons/index.js +1 -1
- package/components/Input/Input.d.ts.map +1 -1
- package/components/Input/componentdata.json +1 -1
- package/components/Input/index.js +1 -1
- package/components/Input/styles.module.scss +8 -7
- package/components/LinkList/LinkList.d.ts +8 -8
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/index.js +1 -1
- package/components/LinkList/index.js.map +1 -1
- package/components/LinkList/styles.module.scss +23 -5
- package/components/List/List.d.ts +17 -3
- package/components/List/List.d.ts.map +1 -1
- package/components/List/componentdata.json +1 -1
- package/components/List/index.js +1 -1
- package/components/List/index.js.map +1 -1
- package/components/List/styles.module.scss +55 -5
- package/components/List/styles.module.scss.d.ts +5 -0
- package/components/ListHeader/ListHeader.d.ts +12 -10
- package/components/ListHeader/ListHeader.d.ts.map +1 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts +1 -1
- package/components/ListHeader/ListHeaderText/ListHeaderText.d.ts.map +1 -1
- package/components/ListHeader/ListHeaderText/index.js +1 -1
- package/components/ListHeader/index.js +1 -1
- package/components/ListHeader/styles.module.scss +36 -11
- package/components/Loader/Loader.d.ts +2 -2
- package/components/Loader/Loader.d.ts.map +1 -1
- package/components/Loader/index.js +1 -1
- package/components/Loader/index.js.map +1 -1
- package/components/Loader/styles.module.scss +40 -18
- package/components/Logo/Logo.d.ts +1 -1
- package/components/Logo/Logo.d.ts.map +1 -1
- package/components/Logo/index.js +1 -1
- package/components/Logo/index.js.map +1 -1
- package/components/MaxCharacters/MaxCharacters.d.ts.map +1 -1
- package/components/MaxCharacters/styles.module.scss +7 -5
- package/components/Modal/Modal.d.ts.map +1 -1
- package/components/Modal/index.js +1 -1
- package/components/Modal/styles.module.scss +39 -23
- package/components/NotificationPanel/DetailButton/DetailButton.d.ts +10 -0
- package/components/NotificationPanel/DetailButton/DetailButton.d.ts.map +1 -0
- package/components/NotificationPanel/DetailButton/componentdata.json +1 -0
- package/components/NotificationPanel/DetailButton/styles.module.scss +38 -0
- package/components/NotificationPanel/DetailButton/styles.module.scss.d.ts +13 -0
- package/components/NotificationPanel/NotificationPanel.d.ts +16 -7
- package/components/NotificationPanel/NotificationPanel.d.ts.map +1 -1
- package/components/NotificationPanel/componentdata.json +1 -1
- package/components/NotificationPanel/index.js +1 -1
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +131 -97
- package/components/NotificationPanel/styles.module.scss.d.ts +10 -10
- package/components/Panel/Panel.d.ts +2 -2
- package/components/Panel/Panel.d.ts.map +1 -1
- package/components/Panel/index.js +1 -1
- package/components/Panel/styles.module.scss +53 -29
- package/components/PanelList/PanelList.d.ts.map +1 -1
- package/components/PanelList/index.js +1 -1
- package/components/PanelList/index.js.map +1 -1
- package/components/PanelList/styles.module.scss +6 -5
- package/components/PopMenu/PopMenu.d.ts +30 -0
- package/components/PopMenu/PopMenu.d.ts.map +1 -0
- package/components/PopMenu/componentdata.json +1 -0
- package/components/PopMenu/story.module.scss +5 -0
- package/components/PopMenu/story.module.scss.d.ts +9 -0
- package/components/PopMenu/styles.module.scss +138 -0
- package/components/PopMenu/styles.module.scss.d.ts +14 -0
- package/components/PopOver/PopOver.d.ts +34 -0
- package/components/PopOver/PopOver.d.ts.map +1 -0
- package/components/PopOver/componentdata.json +1 -0
- package/components/PopOver/index.d.ts +4 -0
- package/components/PopOver/index.d.ts.map +1 -0
- package/components/PopOver/index.js +2 -0
- package/components/PopOver/index.js.map +1 -0
- package/components/PopOver/styles.module.scss +66 -0
- package/components/PopOver/styles.module.scss.d.ts +16 -0
- package/components/{HelpBubble → PopOver}/utils.d.ts +4 -4
- package/components/PopOver/utils.d.ts.map +1 -0
- package/components/Portal/index.d.ts.map +1 -1
- package/components/Portal/index.js +1 -1
- package/components/Portal/index.js.map +1 -1
- package/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/components/RadioButton/componentdata.json +1 -1
- package/components/RadioButton/index.js +1 -1
- package/components/RadioButton/styles.module.scss +12 -14
- package/components/Select/Select.d.ts +1 -1
- package/components/Select/Select.d.ts.map +1 -1
- package/components/Select/componentdata.json +1 -1
- package/components/Select/index.js +1 -1
- package/components/Select/styles.module.scss +14 -8
- package/components/Slider/Slider.d.ts.map +1 -1
- package/components/Slider/index.js +1 -1
- package/components/Slider/index.js.map +1 -1
- package/components/Slider/styles.module.scss +2 -1
- package/components/Spacer/Spacer.d.ts.map +1 -1
- package/components/Spacer/index.js +1 -1
- package/components/Spacer/styles.module.scss +13 -1
- package/components/StatusDot/index.js +1 -1
- package/components/StatusDot/styles.module.scss +2 -2
- package/components/Stepper/Dot.d.ts.map +1 -0
- package/components/Stepper/DotList.d.ts.map +1 -0
- package/components/{Progressbar/Progressbar.d.ts → Stepper/Stepper.d.ts} +6 -6
- package/components/Stepper/Stepper.d.ts.map +1 -0
- package/components/Stepper/componentdata.json +1 -0
- package/components/Stepper/index.d.ts +4 -0
- package/components/Stepper/index.d.ts.map +1 -0
- package/components/Stepper/index.js +2 -0
- package/components/Stepper/index.js.map +1 -0
- package/components/Stepper/styles.module.scss +105 -0
- package/components/Stepper/styles.module.scss.d.ts +16 -0
- package/components/{Progressbar → Stepper}/utils.d.ts +7 -7
- package/components/Stepper/utils.d.ts.map +1 -0
- package/components/Table/Table.d.ts +7 -6
- package/components/Table/Table.d.ts.map +1 -1
- package/components/Table/TableBody/index.js +1 -1
- package/components/Table/TableCell/TableCell.d.ts.map +1 -1
- package/components/Table/TableCell/index.js +1 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.d.ts.map +1 -1
- package/components/Table/TableExpandedRow/index.js +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.d.ts.map +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts +2 -2
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.d.ts.map +1 -1
- package/components/Table/TableExpanderCell/index.js +1 -1
- package/components/Table/TableHead/TableHead.d.ts.map +1 -1
- package/components/Table/TableHead/index.js +1 -1
- package/components/Table/TableHeadCell/TableHeadCell.d.ts.map +1 -1
- package/components/Table/TableHeadCell/index.js +1 -1
- package/components/Table/TableRow/TableRow.d.ts.map +1 -1
- package/components/Table/TableRow/componentdata.json +1 -1
- package/components/Table/TableRow/index.js +1 -1
- package/components/Table/index.js +1 -1
- package/components/Table/index.js.map +1 -1
- package/components/Table/styles.module.scss +32 -20
- package/components/Table/utils.d.ts +3 -7
- package/components/Table/utils.d.ts.map +1 -1
- package/components/Tag/Tag.d.ts +2 -2
- package/components/Tag/Tag.d.ts.map +1 -1
- package/components/Tag/componentdata.json +1 -1
- package/components/Tag/index.js +1 -1
- package/components/Tag/index.js.map +1 -1
- package/components/Tag/styles.module.scss +39 -27
- package/components/TagList/index.js +1 -1
- package/components/TagList/index.js.map +1 -1
- package/components/TagList/styles.module.scss +3 -3
- package/components/Textarea/Textarea.d.ts.map +1 -1
- package/components/Textarea/componentdata.json +1 -1
- package/components/Textarea/index.js +1 -1
- package/components/Textarea/styles.module.scss +6 -5
- package/components/Tile/Tile.d.ts +2 -2
- package/components/Tile/Tile.d.ts.map +1 -1
- package/components/Tile/index.js +1 -1
- package/components/Tile/index.js.map +1 -1
- package/components/Tile/styles.module.scss +11 -6
- package/components/Title/Title.d.ts +3 -3
- package/components/Title/Title.d.ts.map +1 -1
- package/components/Title/index.js +1 -1
- package/components/Title/styles.module.scss +5 -0
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/components/Tooltip/TooltipWord/TooltipWord.d.ts +1 -1
- package/components/Tooltip/TooltipWord/TooltipWord.d.ts.map +1 -1
- package/components/Tooltip/TooltipWord/index.js +1 -1
- package/components/Tooltip/TooltipWord/styles.module.scss +3 -3
- package/components/Tooltip/componentdata.json +1 -1
- package/components/Tooltip/index.js +1 -1
- package/components/TooltipExample/TooltipExample.d.ts.map +1 -1
- package/components/TooltipExample/componentdata.json +1 -1
- package/components/TooltipExample/index.js +1 -1
- package/components/TooltipExample/index.js.map +1 -1
- package/components/Validation/Validation.d.ts.map +1 -1
- package/components/Validation/index.js +1 -1
- package/components/Validation/styles.module.scss +3 -3
- package/constants.d.ts +7 -3
- package/constants.d.ts.map +1 -1
- package/constants.js +1 -1
- package/constants.js.map +1 -1
- package/hoc/withBreakpoint/index.js +1 -1
- package/hoc/withBreakpoint/withBreakpoint.d.ts +1 -1
- package/hoc/withBreakpoint/withBreakpoint.d.ts.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/hooks/useBreakpoint.d.ts.map +1 -1
- package/hooks/useBreakpoint.js +1 -1
- package/hooks/useBreakpoint.js.map +1 -1
- package/hooks/useExpand.d.ts +3 -0
- package/hooks/useExpand.d.ts.map +1 -0
- package/hooks/useExpand.js +2 -0
- package/hooks/useExpand.js.map +1 -0
- package/hooks/useFocusToggle.d.ts.map +1 -1
- package/hooks/useFocusToggle.js.map +1 -1
- package/hooks/useFocusTrap.d.ts.map +1 -1
- package/hooks/useFocusTrap.js +1 -1
- package/hooks/useFocusTrap.js.map +1 -1
- package/hooks/useIcons.js.map +1 -1
- package/hooks/useIsVisible.d.ts.map +1 -1
- package/hooks/useIsVisible.js.map +1 -1
- package/hooks/useKeyboardEvent.d.ts +1 -1
- package/hooks/useKeyboardEvent.d.ts.map +1 -1
- package/hooks/useOutsideEvent.d.ts +1 -1
- package/hooks/useOutsideEvent.d.ts.map +1 -1
- package/hooks/useResizeObserver.js.map +1 -1
- package/hooks/useSize.d.ts.map +1 -1
- package/hooks/useSize.js.map +1 -1
- package/hooks/useSticky.d.ts.map +1 -1
- package/hooks/useSticky.js +1 -1
- package/hooks/useSticky.js.map +1 -1
- package/hooks/useToggle.d.ts.map +1 -1
- package/hooks/useToggle.js.map +1 -1
- package/hooks/useUuid.d.ts.map +1 -1
- package/hooks/useUuid.js.map +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/scss/_body.scss +3 -1
- package/scss/_breakpoints.scss +5 -8
- package/scss/_figma-tokens.scss +2 -2
- package/scss/_fonts.scss +36 -21
- package/scss/_grid.scss +5 -4
- package/scss/_input.scss +20 -11
- package/scss/_palette.scss +7 -15
- package/scss/_print.scss +58 -18
- package/scss/_screen-reader.scss +0 -2
- package/scss/_spacers.scss +17 -15
- package/scss/_title.scss +11 -5
- package/scss/helsenorge.scss +1 -1
- package/scss/typography.module.scss +20 -13
- package/theme/currys/color.d.ts.map +1 -1
- package/theme/currys/color.js +1 -1
- package/theme/currys/color.js.map +1 -1
- package/theme/currys/index.js +1 -1
- package/theme/currys/spacing.js.map +1 -1
- package/theme/index.js +1 -1
- package/theme/index.js.map +1 -1
- package/theme/palette.d.ts +3 -3
- package/theme/palette.d.ts.map +1 -1
- package/theme/palette.js +1 -1
- package/theme/palette.js.map +1 -1
- package/theme/spacers.d.ts +1 -1
- package/theme/spacers.d.ts.map +1 -1
- package/utils/accessibility.d.ts +1 -1
- package/utils/accessibility.d.ts.map +1 -1
- package/utils/component.d.ts +2 -1
- package/utils/component.d.ts.map +1 -1
- package/utils/component.js +1 -1
- package/utils/component.js.map +1 -1
- package/utils/debounce.d.ts +1 -2
- package/utils/debounce.d.ts.map +1 -1
- package/utils/debounce.js +1 -1
- package/utils/debounce.js.map +1 -1
- package/utils/environment.js.map +1 -1
- package/utils/focus.js +1 -1
- package/utils/focus.js.map +1 -1
- package/utils/viewport.js +1 -1
- package/utils/viewport.js.map +1 -1
- package/uuid.js +1 -1
- package/components/HelpBubble/utils.d.ts.map +0 -1
- package/components/Progressbar/Dot.d.ts.map +0 -1
- package/components/Progressbar/DotList.d.ts.map +0 -1
- package/components/Progressbar/Progressbar.d.ts.map +0 -1
- package/components/Progressbar/componentdata.json +0 -1
- package/components/Progressbar/index.d.ts +0 -4
- package/components/Progressbar/index.d.ts.map +0 -1
- package/components/Progressbar/index.js +0 -2
- package/components/Progressbar/index.js.map +0 -1
- package/components/Progressbar/styles.module.scss +0 -91
- package/components/Progressbar/styles.module.scss.d.ts +0 -16
- package/components/Progressbar/utils.d.ts.map +0 -1
- /package/components/{Progressbar → Stepper}/Dot.d.ts +0 -0
- /package/components/{Progressbar → Stepper}/DotList.d.ts +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import t from"react";import{
|
|
1
|
+
import t from"react";import{longLoremText as m}from"../../utils/loremtext.js";import{b as i,T as r}from"../../Tooltip.js";import"../../TooltipWord.js";import"../../constants.js";import"../Tooltip/TooltipWord/styles.module.scss";import"../../hooks/useDelayedState.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../HelpBubble.js";import"classnames";import"../../AnchorLink.js";import"../../hooks/useHover.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../Icons/Icon.js";import"../Icons/ArrowUpRight.js";import"../AnchorLink/styles.module.scss";import"../../Close.js";import"../../hooks/useBreakpoint.js";import"../Icons/X.js";import"../Close/styles.module.scss";import"../../PopOver.js";import"../../hooks/useInterval.js";import"../../hooks/useIsVisible.js";import"../../hooks/useIntersectionObserver.js";import"../../hooks/useLayoutEvent.js";import"../../utils/debounce.js";import"../../hooks/useSize.js";import"../../utils/refs.js";import"../PopOver/styles.module.scss";import"../HelpBubble/styles.module.scss";const e=o=>t.createElement(i,null,t.createElement(t.Fragment,null,t.createElement(r,{...o},"Et tooltip her.")," "+m,t.createElement("button",null,"Knapp"),"Dette er ",t.createElement(r,{...o},o.children)," som skal ha nærmere forklaring.",m,t.createElement(r,{...o},"Enda et tooltip her."))),J=e;export{J as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/TooltipExample/TooltipExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport Tooltip, { TooltipProps, TooltipOpenProvider } from '../Tooltip';\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/TooltipExample/TooltipExample.tsx"],"sourcesContent":["import React from 'react';\n\nimport longLoremText from '../../utils/loremtext';\nimport Tooltip, { TooltipProps, TooltipOpenProvider } from '../Tooltip';\n\nconst TooltipExample: React.FC<TooltipProps> = props => {\n return (\n <TooltipOpenProvider>\n <>\n <Tooltip {...props}>{'Et tooltip her.'}</Tooltip>\n {' ' + longLoremText}\n <button>{'Knapp'}</button>\n {'Dette er '}\n <Tooltip {...props}>{props.children}</Tooltip>\n {' som skal ha nærmere forklaring.'}\n {longLoremText}\n <Tooltip {...props}>{'Enda et tooltip her.'}</Tooltip>\n </>\n </TooltipOpenProvider>\n );\n};\n\nexport default TooltipExample;\n"],"names":["TooltipExample","props","React","TooltipOpenProvider","Tooltip","longLoremText","TooltipExample$1"],"mappings":"iqCAKA,MAAMA,EAAkDC,GAEnDC,EAAA,cAAAC,EAAA,KAEGD,EAAA,cAAAA,EAAA,SAAA,KAAAA,EAAA,cAACE,EAAS,CAAA,GAAGH,GAAQ,iBAAkB,EACtC,IAAMI,EACPH,EAAA,cAAC,cAAQ,OAAQ,EAChB,YACDA,EAAA,cAACE,EAAS,CAAA,GAAGH,CAAQ,EAAAA,EAAM,QAAS,EACnC,mCACAI,EACDH,EAAA,cAACE,EAAS,CAAA,GAAGH,CAAQ,EAAA,sBAAuB,CAC9C,CACF,EAIJK,EAAeN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Validation.d.ts","sourceRoot":"","sources":["../../../src/components/Validation/Validation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAe,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAK3D,UAAU,eAAe;IACvB,oDAAoD;IACpD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2CAA2C;IAC3C,OAAO,CAAC,EAAE,MAAM,OAAO,WAAW,CAAC;IACnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,UAAU,qFAmBrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../Validation.js";import{
|
|
1
|
+
import{V as t}from"../../Validation.js";import{a as M}from"../../Validation.js";import"react";import"classnames";import"../../constants.js";import"../../FormGroup.js";import"../../utils/component.js";import"../../Checkbox.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../Icons/Check.js";import"../Checkbox/styles.module.scss";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../../FormLayout.js";import"../FormLayout/styles.module.scss";import"../../Input.js";import"../../hooks/useBreakpoint.js";import"../../MaxCharacters.js";import"../MaxCharacters/styles.module.scss";import"../Input/styles.module.scss";import"../../RadioButton.js";import"../RadioButton/styles.module.scss";import"../../Select.js";import"../Icons/ChevronDown.js";import"../Select/styles.module.scss";import"../../Title.js";import"../Title/styles.module.scss";import"../FormGroup/styles.module.scss";import"./styles.module.scss";export{M as Validation,t as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/constants.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface HTMLButtonProps {
|
|
|
25
25
|
value?: string | string[] | number;
|
|
26
26
|
id?: string;
|
|
27
27
|
}
|
|
28
|
-
export
|
|
28
|
+
export type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';
|
|
29
29
|
export interface HTMLAnchorProps {
|
|
30
30
|
download?: string;
|
|
31
31
|
href?: string;
|
|
@@ -36,7 +36,7 @@ export interface HTMLAnchorProps {
|
|
|
36
36
|
target?: string;
|
|
37
37
|
referrerPolicy?: '' | 'same-origin' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
38
38
|
}
|
|
39
|
-
export
|
|
39
|
+
export type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;
|
|
40
40
|
export declare enum FormMode {
|
|
41
41
|
onwhite = "onwhite",
|
|
42
42
|
ongrey = "ongrey",
|
|
@@ -60,6 +60,8 @@ export declare enum AnalyticsId {
|
|
|
60
60
|
Expander = "expander",
|
|
61
61
|
ExpanderList = "expander-list",
|
|
62
62
|
ExpanderListExpander = "expander-list-expander",
|
|
63
|
+
ExpanderHierarchy = "expander-hierarchy",
|
|
64
|
+
ExpanderHierarchyExpander = "expander-hierarchy-expander",
|
|
63
65
|
FormGroup = "form-group",
|
|
64
66
|
FormLayout = "form-layout",
|
|
65
67
|
HelpBubble = "help-bubble",
|
|
@@ -75,8 +77,10 @@ export declare enum AnalyticsId {
|
|
|
75
77
|
NotificationPanel = "notification-panel",
|
|
76
78
|
Panel = "panel",
|
|
77
79
|
PanelList = "panel-list",
|
|
80
|
+
PopMenu = "pop-menu",
|
|
81
|
+
PopOver = "pop-over",
|
|
78
82
|
Portal = "portal",
|
|
79
|
-
|
|
83
|
+
Stepper = "stepper",
|
|
80
84
|
RadioButton = "radio-button",
|
|
81
85
|
Select = "select",
|
|
82
86
|
Slider = "slider",
|
package/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,OAAO,KAAK;IACZ,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,MAAM;CACb;AAED,oBAAY,MAAM;IAChB,KAAK,UAAU;IACf,eAAe,QAAQ;CACxB;AAED,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAE7C,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,CAAC;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,YAAY,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EACX,EAAE,GACF,aAAa,GACb,aAAa,GACb,4BAA4B,GAC5B,QAAQ,GACR,0BAA0B,GAC1B,eAAe,GACf,iCAAiC,GACjC,YAAY,CAAC;CAClB;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;AAEjF,oBAAY,QAAQ;IAClB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;IACjB,SAAS,cAAc;CACxB;AAED,oBAAY,WAAW;IACrB,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,oBAAY,WAAW;IACrB,UAAU,gBAAgB;IAC1B,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,oBAAoB,2BAA2B;IAC/C,iBAAiB,uBAAuB;IACxC,yBAAyB,gCAAgC;IACzD,SAAS,eAAe;IACxB,UAAU,gBAAgB;IAC1B,UAAU,gBAAgB;IAC1B,YAAY,kBAAkB;IAC9B,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;IACb,QAAQ,cAAc;IACtB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,iBAAiB,uBAAuB;IACxC,KAAK,UAAU;IACf,SAAS,eAAe;IACxB,OAAO,aAAa;IACpB,OAAO,aAAa;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,SAAS,eAAe;IACxB,KAAK,UAAU;IACf,GAAG,QAAQ;IACX,OAAO,aAAa;IACpB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,UAAU,eAAe;CAC1B;AAED,oBAAY,gBAAgB;IAC1B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ"}
|
package/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var
|
|
1
|
+
var e=(r=>(r[r.XXSmall=24]="XXSmall",r[r.XSmall=38]="XSmall",r[r.Small=48]="Small",r[r.Medium=64]="Medium",r[r.Large=80]="Large",r[r.XLarge=130]="XLarge",r))(e||{}),o=(r=>(r[r.Modal=13e5]="Modal",r[r.ExpanderTrigger=1e4]="ExpanderTrigger",r))(o||{});const t=12;var p=(r=>(r.onwhite="onwhite",r.ongrey="ongrey",r.onblueberry="onblueberry",r.ondark="ondark",r.oninvalid="oninvalid",r))(p||{}),a=(r=>(r.normal="normal",r.bigform="bigform",r))(a||{}),u=(r=>(r.AnchorLink="anchor-link",r.Avatar="avatar",r.Badge="badge",r.Button="button",r.Checkbox="checkbox",r.Close="close",r.Dropdown="dropdown",r.Duolist="duolist",r.Expander="expander",r.ExpanderList="expander-list",r.ExpanderListExpander="expander-list-expander",r.ExpanderHierarchy="expander-hierarchy",r.ExpanderHierarchyExpander="expander-hierarchy-expander",r.FormGroup="form-group",r.FormLayout="form-layout",r.HelpBubble="help-bubble",r.HighlightBox="highlight-box",r.Icon="icon",r.Input="input",r.Link="link",r.LinkList="link-list",r.List="list",r.Loader="loader",r.Logo="logo",r.Modal="modal",r.NotificationPanel="notification-panel",r.Panel="panel",r.PanelList="panel-list",r.PopMenu="pop-menu",r.PopOver="pop-over",r.Portal="portal",r.Stepper="stepper",r.RadioButton="radio-button",r.Select="select",r.Slider="slider",r.Spacer="spacer",r.StatusDot="status-dot",r.Table="table",r.Tag="tag",r.TagList="tag-list",r.Textarea="textarea",r.Tile="tile",r.Title="title",r.Tooltip="tooltip",r.Validation="validation",r))(u||{}),g=(r=>(r.Enter="Enter",r.Escape="Escape",r.ArrowDown="ArrowDown",r.ArrowUp="ArrowUp",r.Home="Home",r.End="End",r))(g||{});export{t as AVERAGE_CHARACTER_WIDTH_PX,u as AnalyticsId,p as FormMode,a as FormVariant,e as IconSize,g as KeyboardEventKey,o as ZIndex};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
package/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n Portal = 'portal',\n
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../src/constants.ts"],"sourcesContent":["export enum IconSize {\n XXSmall = 24,\n XSmall = 38,\n Small = 48,\n Medium = 64,\n Large = 80,\n XLarge = 130,\n}\n\nexport enum ZIndex {\n Modal = 1300000,\n ExpanderTrigger = 10000,\n}\n\nexport const AVERAGE_CHARACTER_WIDTH_PX = 12;\n\nexport interface HTMLButtonProps {\n autoFocus?: boolean;\n disabled?: boolean;\n form?: string;\n formAction?: string;\n formEncType?: string;\n formMethod?: string;\n formNoValidate?: boolean;\n formTarget?: string;\n name?: string;\n type?: 'submit' | 'reset' | 'button' | string;\n value?: string | string[] | number;\n id?: string;\n}\n\nexport type AnchorTarget = '_self' | '_blank' | '_parent' | '_top';\n\nexport interface HTMLAnchorProps {\n download?: string;\n href?: string;\n hrefLang?: string;\n media?: string;\n ping?: string;\n rel?: AnchorTarget;\n target?: string;\n referrerPolicy?:\n | ''\n | 'same-origin'\n | 'no-referrer'\n | 'no-referrer-when-downgrade'\n | 'origin'\n | 'origin-when-cross-origin'\n | 'strict-origin'\n | 'strict-origin-when-cross-origin'\n | 'unsafe-url';\n}\n\nexport type ButtonVariant = 'secondary' | 'tertiary' | string | undefined | null;\n\nexport enum FormMode {\n onwhite = 'onwhite',\n ongrey = 'ongrey',\n onblueberry = 'onblueberry',\n ondark = 'ondark',\n oninvalid = 'oninvalid',\n}\n\nexport enum FormVariant {\n normal = 'normal',\n bigform = 'bigform',\n}\n\nexport enum AnalyticsId {\n AnchorLink = 'anchor-link',\n Avatar = 'avatar',\n Badge = 'badge',\n Button = 'button',\n Checkbox = 'checkbox',\n Close = 'close',\n Dropdown = 'dropdown',\n Duolist = 'duolist',\n Expander = 'expander',\n ExpanderList = 'expander-list',\n ExpanderListExpander = 'expander-list-expander',\n ExpanderHierarchy = 'expander-hierarchy',\n ExpanderHierarchyExpander = 'expander-hierarchy-expander',\n FormGroup = 'form-group',\n FormLayout = 'form-layout',\n HelpBubble = 'help-bubble',\n HighlightBox = 'highlight-box',\n Icon = 'icon',\n Input = 'input',\n Link = 'link',\n LinkList = 'link-list',\n List = 'list',\n Loader = 'loader',\n Logo = 'logo',\n Modal = 'modal',\n NotificationPanel = 'notification-panel',\n Panel = 'panel',\n PanelList = 'panel-list',\n PopMenu = 'pop-menu',\n PopOver = 'pop-over',\n Portal = 'portal',\n Stepper = 'stepper',\n RadioButton = 'radio-button',\n Select = 'select',\n Slider = 'slider',\n Spacer = 'spacer',\n StatusDot = 'status-dot',\n Table = 'table',\n Tag = 'tag',\n TagList = 'tag-list',\n Textarea = 'textarea',\n Tile = 'tile',\n Title = 'title',\n Tooltip = 'tooltip',\n Validation = 'validation',\n}\n\nexport enum KeyboardEventKey {\n Enter = 'Enter',\n Escape = 'Escape',\n ArrowDown = 'ArrowDown',\n ArrowUp = 'ArrowUp',\n Home = 'Home',\n End = 'End',\n}\n"],"names":["IconSize","ZIndex","AVERAGE_CHARACTER_WIDTH_PX","FormMode","FormVariant","AnalyticsId","KeyboardEventKey"],"mappings":"AAAY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,QAAU,EAAV,EAAA,UACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,EAAT,EAAA,SACAA,EAAAA,EAAA,MAAQ,EAAR,EAAA,QACAA,EAAAA,EAAA,OAAS,GAAT,EAAA,SANUA,IAAAA,GAAA,CAAA,CAAA,EASAC,GAAAA,IACVA,EAAAA,EAAA,MAAQ,IAAR,EAAA,QACAA,EAAAA,EAAA,gBAAkB,GAAlB,EAAA,kBAFUA,IAAAA,GAAA,CAAA,CAAA,EAKL,MAAMC,EAA6B,GAyC9B,IAAAC,GAAAA,IACVA,EAAA,QAAU,UACVA,EAAA,OAAS,SACTA,EAAA,YAAc,cACdA,EAAA,OAAS,SACTA,EAAA,UAAY,YALFA,IAAAA,GAAA,CAAA,CAAA,EAQAC,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UAFAA,IAAAA,GAAA,CAAA,CAAA,EAKAC,GAAAA,IACVA,EAAA,WAAa,cACbA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,SAAW,WACXA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,QAAU,UACVA,EAAA,SAAW,WACXA,EAAA,aAAe,gBACfA,EAAA,qBAAuB,yBACvBA,EAAA,kBAAoB,qBACpBA,EAAA,0BAA4B,8BAC5BA,EAAA,UAAY,aACZA,EAAA,WAAa,cACbA,EAAA,WAAa,cACbA,EAAA,aAAe,gBACfA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,SAAW,YACXA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,kBAAoB,qBACpBA,EAAA,MAAQ,QACRA,EAAA,UAAY,aACZA,EAAA,QAAU,WACVA,EAAA,QAAU,WACVA,EAAA,OAAS,SACTA,EAAA,QAAU,UACVA,EAAA,YAAc,eACdA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,OAAS,SACTA,EAAA,UAAY,aACZA,EAAA,MAAQ,QACRA,EAAA,IAAM,MACNA,EAAA,QAAU,WACVA,EAAA,SAAW,WACXA,EAAA,KAAO,OACPA,EAAA,MAAQ,QACRA,EAAA,QAAU,UACVA,EAAA,WAAa,aA7CHA,IAAAA,GAAA,CAAA,CAAA,EAgDAC,GAAAA,IACVA,EAAA,MAAQ,QACRA,EAAA,OAAS,SACTA,EAAA,UAAY,YACZA,EAAA,QAAU,UACVA,EAAA,KAAO,OACPA,EAAA,IAAM,MANIA,IAAAA,GAAA,CAAA,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{withBreakpoint as o}from"./withBreakpoint.js";import"react";import"../../hooks/useBreakpoint.js";import"../../theme/grid.js";export{o as default,o as withBreakpoint};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -7,7 +7,7 @@ export declare function withBreakpoint<P extends BreakpointProps, C extends Reac
|
|
|
7
7
|
ref?: React.Ref<InstanceType<C>>;
|
|
8
8
|
}, keyof BreakpointProps>>;
|
|
9
9
|
export declare function withBreakpoint<P extends BreakpointProps & {
|
|
10
|
-
ref?: React.Ref<
|
|
10
|
+
ref?: React.Ref<unknown>;
|
|
11
11
|
}>(Component: React.ForwardRefExoticComponent<P>): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;
|
|
12
12
|
export declare function withBreakpoint<P extends BreakpointProps>(Component: React.FunctionComponent<P>): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;
|
|
13
13
|
export default withBreakpoint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAiB,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC;CACxB;AAGD,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EACzF,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAE1I,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"withBreakpoint.d.ts","sourceRoot":"","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAiB,MAAM,2BAA2B,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,UAAU,CAAC;CACxB;AAGD,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EACzF,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAE1I,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;CAAE,EACrF,SAAS,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC,CAAC,GAC5C,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AAEnE,wBAAgB,cAAc,CAAC,CAAC,SAAS,eAAe,EACtD,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,GACpC,KAAK,CAAC,yBAAyB,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,eAAe,CAAC,CAAC,CAAC;AASnE,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withBreakpoint.js","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\n\nexport interface BreakpointProps {\n breakpoint: Breakpoint;\n}\n\n// Hentet fra https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35834#issuecomment-497605842\nexport function withBreakpoint<P extends BreakpointProps, C extends React.ComponentClass<P>>(\n Component: C & React.ComponentType<P>\n): React.ForwardRefExoticComponent<Omit<React.ComponentPropsWithoutRef<C> & { ref?: React.Ref<InstanceType<C>> }, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps & { ref?: React.Ref<
|
|
1
|
+
{"version":3,"file":"withBreakpoint.js","sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\n\nexport interface BreakpointProps {\n breakpoint: Breakpoint;\n}\n\n// Hentet fra https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35834#issuecomment-497605842\nexport function withBreakpoint<P extends BreakpointProps, C extends React.ComponentClass<P>>(\n Component: C & React.ComponentType<P>\n): React.ForwardRefExoticComponent<Omit<React.ComponentPropsWithoutRef<C> & { ref?: React.Ref<InstanceType<C>> }, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps & { ref?: React.Ref<unknown> }>(\n Component: React.ForwardRefExoticComponent<P>\n): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(\n Component: React.FunctionComponent<P>\n): React.ForwardRefExoticComponent<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(Component: React.ComponentType<P>) {\n return React.forwardRef((props, ref) => {\n const breakpoint = useBreakpoint();\n return <Component ref={ref} {...(props as P)} breakpoint={breakpoint} />;\n });\n}\n\nexport default withBreakpoint;\n"],"names":["withBreakpoint","Component","React","props","ref","breakpoint","useBreakpoint"],"mappings":"8GAqBO,SAASA,EAA0CC,EAAmC,CAC3F,OAAOC,EAAM,WAAW,CAACC,EAAOC,IAAQ,CACtC,MAAMC,EAAaC,IACnB,OAAQJ,EAAA,cAAAD,EAAA,CAAU,IAAAG,EAAW,GAAID,EAAa,WAAAE,CAAwB,CAAA,CAAA,CACvE,CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useBreakpoint.d.ts","sourceRoot":"","sources":["../../src/hooks/useBreakpoint.ts"],"names":[],"mappings":"AAIA,oBAAY,UAAU;IACpB,GAAqB;IACrB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;IACnB,EAAmB;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,UA2DhC,CAAC"}
|
package/hooks/useBreakpoint.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as
|
|
1
|
+
import{useState as x,useEffect as l}from"react";import{breakpoints as t,screen as a}from"../theme/grid.js";var r=(s=>(s[s.xxs=t.xxs]="xxs",s[s.xs=t.xs]="xs",s[s.sm=t.sm]="sm",s[s.md=t.md]="md",s[s.lg=t.lg]="lg",s[s.xl=t.xl]="xl",s))(r||{});const f=()=>{const[s,m]=x(r.xxs);return l(()=>{var n;const d=e=>{switch(e.media){case a.xl:m(e.matches?r.xl:r.lg);return;case a.lg:m(e.matches?r.lg:r.md);return;case a.md:m(e.matches?r.md:r.sm);return;case a.sm:m(e.matches?r.sm:r.xs);return;case a.xs:m(e.matches?r.xs:r.xxs);return;default:m(r.xxs);return}},i=Object.entries(a).reverse().map(([e,c])=>({breakpoint:r[e],mediaQuery:window.matchMedia(c)}));i.forEach(e=>{e.mediaQuery.addEventListener?e.mediaQuery.addEventListener("change",d):e.mediaQuery.addListener&&e.mediaQuery.addListener(d)});const u=((n=i.find(e=>e.mediaQuery.matches))==null?void 0:n.breakpoint)??s;return m(u),()=>{i.forEach(e=>{e.mediaQuery.removeEventListener?e.mediaQuery.removeEventListener("change",d):e.mediaQuery.removeListener&&e.mediaQuery.removeListener(d)})}},[]),s};export{r as Breakpoint,f as useBreakpoint};
|
|
2
2
|
//# sourceMappingURL=useBreakpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBreakpoint.js","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { breakpoints, screen } from '../theme/grid';\n\nexport enum Breakpoint {\n xxs = breakpoints.xxs,\n xs = breakpoints.xs,\n sm = breakpoints.sm,\n md = breakpoints.md,\n lg = breakpoints.lg,\n xl = breakpoints.xl,\n}\n\n/**\n * Lytt på endringer i breakpoint basert på media queries. Trigger re-render bare når breakpoint er endret.\n * @returns Gjeldende breakpoint\n */\nexport const useBreakpoint = (): Breakpoint => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>(Breakpoint.xxs);\n\n useEffect(() => {\n const handleMediaQueryEvent = (event: MediaQueryListEvent): void => {\n switch (event.media) {\n case screen.xl:\n setBreakpoint(event.matches ? Breakpoint.xl : Breakpoint.lg);\n return;\n case screen.lg:\n setBreakpoint(event.matches ? Breakpoint.lg : Breakpoint.md);\n return;\n case screen.md:\n setBreakpoint(event.matches ? Breakpoint.md : Breakpoint.sm);\n return;\n case screen.sm:\n setBreakpoint(event.matches ? Breakpoint.sm : Breakpoint.xs);\n return;\n case screen.xs:\n setBreakpoint(event.matches ? Breakpoint.xs : Breakpoint.xxs);\n return;\n default:\n setBreakpoint(Breakpoint.xxs);\n return;\n }\n };\n\n // Lytt etter endringer for hvert breakpoint\n const mediaQueryList = Object.entries(screen)\n .reverse()\n .map(([size, mediaQuery]) => {\n return { breakpoint: Breakpoint[size as keyof typeof Breakpoint], mediaQuery: window.matchMedia(mediaQuery) };\n });\n mediaQueryList.forEach(x => {\n // iOS <=13 har ikke støtte for addEventListener/removeEventListener på MediaQueryList,\n // men har støtte for addListener\n if (x.mediaQuery.addEventListener) {\n x.mediaQuery.addEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.addListener) {\n x.mediaQuery.addListener(handleMediaQueryEvent);\n }\n });\n\n // Finn breakpoint ved første render\n const initialBreakpoint = mediaQueryList.find(x => x.mediaQuery.matches)?.breakpoint ?? breakpoint;\n setBreakpoint(initialBreakpoint);\n\n return (): void => {\n mediaQueryList.forEach(x => {\n if (x.mediaQuery.removeEventListener) {\n x.mediaQuery.removeEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.removeListener) {\n x.mediaQuery.removeListener(handleMediaQueryEvent);\n }\n });\n };\n }, []);\n\n return breakpoint;\n};\n"],"names":["Breakpoint","breakpoints","useBreakpoint","breakpoint","setBreakpoint","useState","useEffect","handleMediaQueryEvent","event","screen","mediaQueryList","size","mediaQuery","x","initialBreakpoint","
|
|
1
|
+
{"version":3,"file":"useBreakpoint.js","sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { breakpoints, screen } from '../theme/grid';\n\nexport enum Breakpoint {\n xxs = breakpoints.xxs,\n xs = breakpoints.xs,\n sm = breakpoints.sm,\n md = breakpoints.md,\n lg = breakpoints.lg,\n xl = breakpoints.xl,\n}\n\n/**\n * Lytt på endringer i breakpoint basert på media queries. Trigger re-render bare når breakpoint er endret.\n * @returns Gjeldende breakpoint\n */\nexport const useBreakpoint = (): Breakpoint => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>(Breakpoint.xxs);\n\n useEffect(() => {\n const handleMediaQueryEvent = (event: MediaQueryListEvent): void => {\n switch (event.media) {\n case screen.xl:\n setBreakpoint(event.matches ? Breakpoint.xl : Breakpoint.lg);\n return;\n case screen.lg:\n setBreakpoint(event.matches ? Breakpoint.lg : Breakpoint.md);\n return;\n case screen.md:\n setBreakpoint(event.matches ? Breakpoint.md : Breakpoint.sm);\n return;\n case screen.sm:\n setBreakpoint(event.matches ? Breakpoint.sm : Breakpoint.xs);\n return;\n case screen.xs:\n setBreakpoint(event.matches ? Breakpoint.xs : Breakpoint.xxs);\n return;\n default:\n setBreakpoint(Breakpoint.xxs);\n return;\n }\n };\n\n // Lytt etter endringer for hvert breakpoint\n const mediaQueryList = Object.entries(screen)\n .reverse()\n .map(([size, mediaQuery]) => {\n return { breakpoint: Breakpoint[size as keyof typeof Breakpoint], mediaQuery: window.matchMedia(mediaQuery) };\n });\n mediaQueryList.forEach(x => {\n // iOS <=13 har ikke støtte for addEventListener/removeEventListener på MediaQueryList,\n // men har støtte for addListener\n if (x.mediaQuery.addEventListener) {\n x.mediaQuery.addEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.addListener) {\n x.mediaQuery.addListener(handleMediaQueryEvent);\n }\n });\n\n // Finn breakpoint ved første render\n const initialBreakpoint = mediaQueryList.find(x => x.mediaQuery.matches)?.breakpoint ?? breakpoint;\n setBreakpoint(initialBreakpoint);\n\n return (): void => {\n mediaQueryList.forEach(x => {\n if (x.mediaQuery.removeEventListener) {\n x.mediaQuery.removeEventListener('change', handleMediaQueryEvent);\n } else if (x.mediaQuery.removeListener) {\n x.mediaQuery.removeListener(handleMediaQueryEvent);\n }\n });\n };\n }, []);\n\n return breakpoint;\n};\n"],"names":["Breakpoint","breakpoints","useBreakpoint","breakpoint","setBreakpoint","useState","useEffect","handleMediaQueryEvent","event","screen","mediaQueryList","size","mediaQuery","x","initialBreakpoint","_a"],"mappings":"2GAIY,IAAAA,GAAAA,IACVA,EAAAA,EAAA,IAAMC,EAAY,GAAlB,EAAA,MACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KACAD,EAAAA,EAAA,GAAKC,EAAY,EAAjB,EAAA,KANUD,IAAAA,GAAA,CAAA,CAAA,EAaL,MAAME,EAAgB,IAAkB,CAC7C,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAqBL,EAAW,GAAG,EAEvE,OAAAM,EAAU,IAAM,OACR,MAAAC,EAAyBC,GAAqC,CAClE,OAAQA,EAAM,MAAO,CACnB,KAAKC,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,EAAE,EAC3D,OACF,KAAKS,EAAO,GACVL,EAAcI,EAAM,QAAUR,EAAW,GAAKA,EAAW,GAAG,EAC5D,OACF,QACEI,EAAcJ,EAAW,GAAG,EAC5B,MACJ,CAAA,EAIIU,EAAiB,OAAO,QAAQD,CAAM,EACzC,QACA,EAAA,IAAI,CAAC,CAACE,EAAMC,CAAU,KACd,CAAE,WAAYZ,EAAWW,CAA+B,EAAG,WAAY,OAAO,WAAWC,CAAU,GAC3G,EACHF,EAAe,QAAaG,GAAA,CAGtBA,EAAE,WAAW,iBACbA,EAAA,WAAW,iBAAiB,SAAUN,CAAqB,EACpDM,EAAE,WAAW,aACpBA,EAAA,WAAW,YAAYN,CAAqB,CAChD,CACD,EAGK,MAAAO,IAAoBC,EAAAL,EAAe,KAAKG,GAAKA,EAAE,WAAW,OAAO,IAA7C,YAAAE,EAAgD,aAAcZ,EACxF,OAAAC,EAAcU,CAAiB,EAExB,IAAY,CACjBJ,EAAe,QAAaG,GAAA,CACtBA,EAAE,WAAW,oBACbA,EAAA,WAAW,oBAAoB,SAAUN,CAAqB,EACvDM,EAAE,WAAW,gBACpBA,EAAA,WAAW,eAAeN,CAAqB,CACnD,CACD,CAAA,CAEL,EAAG,CAAE,CAAA,EAEEJ,CACT"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpand.d.ts","sourceRoot":"","sources":["../../src/hooks/useExpand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAItE,eAAO,MAAM,SAAS,aAAc,OAAO,2BAA0B,OAAO,KAAK,IAAI,kBAAG,CAAC,OAAO,EAAE,SAAS,eAAe,OAAO,CAAC,CAAC,CAiBlI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpand.js","sources":["../../src/hooks/useExpand.ts"],"sourcesContent":["import { Dispatch, SetStateAction, useEffect, useState } from 'react';\n\nimport { usePrevious } from './usePrevious';\n\nexport const useExpand = (expanded: boolean, onExpand?: (isExpanded: boolean) => void): [boolean, Dispatch<SetStateAction<boolean>>] => {\n const [isExpanded, setIsExpanded] = useState(expanded);\n const previousIsExpanded = usePrevious(isExpanded);\n\n useEffect(() => {\n if (expanded !== isExpanded) {\n setIsExpanded(expanded);\n }\n }, [expanded]);\n\n useEffect(() => {\n if (onExpand && isExpanded !== !!previousIsExpanded) {\n onExpand(isExpanded);\n }\n }, [isExpanded, onExpand]);\n\n return [isExpanded, setIsExpanded];\n};\n"],"names":["useExpand","expanded","onExpand","isExpanded","setIsExpanded","useState","previousIsExpanded","usePrevious","useEffect"],"mappings":"+FAIa,MAAAA,EAAY,CAACC,EAAmBC,IAA2F,CACtI,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAASJ,CAAQ,EAC/CK,EAAqBC,EAAYJ,CAAU,EAEjD,OAAAK,EAAU,IAAM,CACVP,IAAaE,GACfC,EAAcH,CAAQ,CACxB,EACC,CAACA,CAAQ,CAAC,EAEbO,EAAU,IAAM,CACVN,GAAYC,IAAe,CAAC,CAACG,GAC/BJ,EAASC,CAAU,CACrB,EACC,CAACA,EAAYD,CAAQ,CAAC,EAElB,CAACC,EAAYC,CAAa,CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusToggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useFocusToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusToggle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,eAAe,OAAO,KAAG,IA6BxF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusToggle.js","sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { useElementList } from './useElementList';\nimport { FOCUSABLE_SELECTORS } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n // Kan ikke lytte på endringer i attributter, fordi det vil føre til en loop når vi endrer dem etterpå\n const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"names":["useFocusToggle","ref","allowFocus","focusableElementList","useElementList","FOCUSABLE_SELECTORS","useEffect","TABINDEX_ATTRIBUTE_NAME","PREVIOUS_TABINDEX_ATTRIBUTE_NAME","el","prevTabIndex"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFocusToggle.js","sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useElementList } from './useElementList';\nimport { FOCUSABLE_SELECTORS } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n // Kan ikke lytte på endringer i attributter, fordi det vil føre til en loop når vi endrer dem etterpå\n const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"names":["useFocusToggle","ref","allowFocus","focusableElementList","useElementList","FOCUSABLE_SELECTORS","useEffect","TABINDEX_ATTRIBUTE_NAME","PREVIOUS_TABINDEX_ATTRIBUTE_NAME","el","prevTabIndex"],"mappings":"uJAYa,MAAAA,EAAiB,CAACC,EAAmCC,IAA+B,CAE/F,MAAMC,EAAuBC,EAAeH,EAAKI,EAAqB,CAAE,WAAY,GAAO,EAE3FC,EAAU,IAAM,CACd,MAAMC,EAA0B,WAC1BC,EAAmC,gBACrCN,EACFC,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG5B,MAAAC,EAAeD,EAAG,aAAaD,CAAgC,EACjEE,EACCD,EAAA,aAAaF,EAAyBG,CAAY,EAErDD,EAAG,gBAAgBF,CAAuB,CAC5C,GAGFJ,GAAA,MAAAA,EAAsB,QAAcM,GAAA,CAG9BA,EAAG,aAAaF,CAAuB,GACzCE,EAAG,aAAaD,EAAkC,GAAGC,EAAG,UAAU,EAEpEA,EAAG,SAAW,EAAA,EAGjB,EAAA,CAACR,EAAKC,EAAYC,CAAoB,CAAC,CAC5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useFocusTrap.d.ts","sourceRoot":"","sources":["../../src/hooks/useFocusTrap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAKzC;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,SAAS,CAAC,WAAW,CAAC,0BAAqB,IA4BlF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
package/hooks/useFocusTrap.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useEffect as i}from"react";import{
|
|
1
|
+
import{useEffect as i}from"react";import{useFocusableElements as l}from"./useFocusableElements.js";import{getDocumentActiveElement as m}from"../utils/focus.js";import"./useElementList.js";const d=(n,s=!0)=>{const e=l(n),c=t=>{if(s&&n.current&&(e!=null&&e.length)&&t.key==="Tab"){const o=m(n.current),r=e[0],u=e.length===1?r:e[e.length-1];t.shiftKey&&o===r?(u.focus(),t.preventDefault()):!t.shiftKey&&o===u&&(r.focus(),t.preventDefault())}};i(()=>{var t;return(t=n.current)==null||t.addEventListener("keydown",c),()=>{var o;(o=n.current)==null||o.removeEventListener("keydown",c)}},[n,s,e])};export{d as default,d as useFocusTrap};
|
|
2
2
|
//# sourceMappingURL=useFocusTrap.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFocusTrap.js","sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\nimport {
|
|
1
|
+
{"version":3,"file":"useFocusTrap.js","sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useFocusableElements } from './useFocusableElements';\nimport { getDocumentActiveElement } from '../utils/focus';\n\n/**\n * Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.\n * @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det\n * @param trapFocus Om fokus skal \"trappes\" innenfor elementet eller ikke. Default=true.\n */\nexport const useFocusTrap = (ref: React.RefObject<HTMLElement>, trapFocus = true): void => {\n const focusableElementList = useFocusableElements(ref);\n\n const handleKeyboardEvent = (e: KeyboardEvent): void => {\n if (trapFocus && ref.current && focusableElementList?.length && e.key === 'Tab') {\n const activeElement = getDocumentActiveElement(ref.current);\n const firstElement = focusableElementList[0];\n const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];\n\n if (e.shiftKey && activeElement === firstElement) {\n /* shift + tab */\n lastElement.focus();\n e.preventDefault();\n } else if (!e.shiftKey && activeElement === lastElement) {\n /* tab */\n firstElement.focus();\n e.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n ref.current?.addEventListener('keydown', handleKeyboardEvent);\n\n return (): void => {\n ref.current?.removeEventListener('keydown', handleKeyboardEvent);\n };\n }, [ref, trapFocus, focusableElementList]); // focusableElementList må være med som dependency for at handleKeyboardEvent skal få oppdatert state\n};\n\nexport default useFocusTrap;\n"],"names":["useFocusTrap","ref","trapFocus","focusableElementList","useFocusableElements","handleKeyboardEvent","e","activeElement","getDocumentActiveElement","firstElement","lastElement","useEffect","_a"],"mappings":"4LAUO,MAAMA,EAAe,CAACC,EAAmCC,EAAY,KAAe,CACnF,MAAAC,EAAuBC,EAAqBH,CAAG,EAE/CI,EAAuBC,GAA2B,CACtD,GAAIJ,GAAaD,EAAI,UAAWE,GAAA,MAAAA,EAAsB,SAAUG,EAAE,MAAQ,MAAO,CACzE,MAAAC,EAAgBC,EAAyBP,EAAI,OAAO,EACpDQ,EAAeN,EAAqB,CAAC,EACrCO,EAAcP,EAAqB,SAAW,EAAIM,EAAeN,EAAqBA,EAAqB,OAAS,CAAC,EAEvHG,EAAE,UAAYC,IAAkBE,GAElCC,EAAY,MAAM,EAClBJ,EAAE,eAAe,GACR,CAACA,EAAE,UAAYC,IAAkBG,IAE1CD,EAAa,MAAM,EACnBH,EAAE,eAAe,GAErB,EAGFK,EAAU,IAAM,OACV,OAAAC,EAAAX,EAAA,UAAA,MAAAW,EAAS,iBAAiB,UAAWP,GAElC,IAAY,QACbO,EAAAX,EAAA,UAAA,MAAAW,EAAS,oBAAoB,UAAWP,EAAmB,CAEhE,EAAA,CAACJ,EAAKC,EAAWC,CAAoB,CAAC,CAC3C"}
|
package/hooks/useIcons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIcons.js","sources":["../../src/hooks/useIcons.ts"],"sourcesContent":["import { IconProps } from '../components/Icons';\n\nexport const useIcons = (children: React.ReactNode[]): Array<React.ReactElement<IconProps> | React.ReactNode | {} | undefined | null> => {\n let leftIcon: React.ReactElement<IconProps> | undefined | null = null;\n let rightIcon: React.ReactElement<IconProps> | undefined | null = null;\n\n if ((children[0] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n leftIcon = children.shift() as React.ReactElement<IconProps>;\n }\n if ((children[children.length - 1] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n rightIcon = children.pop() as React.ReactElement<IconProps>;\n }\n const restChildren = children.filter(child => child);\n\n return [leftIcon, rightIcon, restChildren.length > 0 ? restChildren : null];\n};\n"],"names":["useIcons","children","_a","_b","_c","_d","leftIcon","rightIcon","restChildren","child"],"mappings":"AAEa,MAAAA,EAAYC,GAAgH,CAA5H,IAAAC,EAAAC,EAAAC,EAAAC,EACX,IAAIC,EAA6D,KAC7DC,EAA8D,OAE7DJ,GAAAD,EAAAD,EAAS,
|
|
1
|
+
{"version":3,"file":"useIcons.js","sources":["../../src/hooks/useIcons.ts"],"sourcesContent":["import { IconProps } from '../components/Icons';\n\nexport const useIcons = (children: React.ReactNode[]): Array<React.ReactElement<IconProps> | React.ReactNode | {} | undefined | null> => {\n let leftIcon: React.ReactElement<IconProps> | undefined | null = null;\n let rightIcon: React.ReactElement<IconProps> | undefined | null = null;\n\n if ((children[0] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n leftIcon = children.shift() as React.ReactElement<IconProps>;\n }\n if ((children[children.length - 1] as React.ReactElement<IconProps>)?.props?.svgIcon !== undefined) {\n rightIcon = children.pop() as React.ReactElement<IconProps>;\n }\n const restChildren = children.filter(child => child);\n\n return [leftIcon, rightIcon, restChildren.length > 0 ? restChildren : null];\n};\n"],"names":["useIcons","children","_a","_b","_c","_d","leftIcon","rightIcon","restChildren","child"],"mappings":"AAEa,MAAAA,EAAYC,GAAgH,CAA5H,IAAAC,EAAAC,EAAAC,EAAAC,EACX,IAAIC,EAA6D,KAC7DC,EAA8D,OAE7DJ,GAAAD,EAAAD,EAAS,CAAC,IAAV,YAAAC,EAA+C,QAA/C,YAAAC,EAAsD,WAAY,SACrEG,EAAWL,EAAS,WAEjBI,GAAAD,EAAAH,EAASA,EAAS,OAAS,CAAC,IAA5B,YAAAG,EAAiE,QAAjE,YAAAC,EAAwE,WAAY,SACvFE,EAAYN,EAAS,OAEvB,MAAMO,EAAeP,EAAS,OAAOQ,GAASA,CAAK,EAEnD,MAAO,CAACH,EAAUC,EAAWC,EAAa,OAAS,EAAIA,EAAe,IAAI,CAC5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIsVisible.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsVisible.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,eAAO,MAAM,YAAY,QAClB,MAAM,SAAS,CAAC,OAAO,CAAC,gCAEnB,wBAAwB,wBAEjC,OAUF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsVisible.js","sources":["../../src/hooks/useIsVisible.ts"],"sourcesContent":["import { useState } from 'react';\nimport { useIntersectionObserver } from './useIntersectionObserver';\n\n/**\n * Sjekk om et HTML-element er synlig i vinduet, eller ikke.\n *\n * @param ref Element som skal observeres\n * @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)\n * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres\n * @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig\n * @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke\n */\nexport const useIsVisible = (\n ref: React.RefObject<Element>,\n threshold = 1,\n options?: IntersectionObserverInit,\n initial = false\n): boolean => {\n const [isVisible, setIsVisible] = useState(initial);\n\n const handleIntersectChange: IntersectionObserverCallback = entries => {\n setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);\n };\n\n useIntersectionObserver(ref, handleIntersectChange, { threshold, ...options });\n\n return isVisible;\n};\n"],"names":["useIsVisible","ref","threshold","options","initial","isVisible","setIsVisible","useState","useIntersectionObserver","entries"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIsVisible.js","sources":["../../src/hooks/useIsVisible.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIntersectionObserver } from './useIntersectionObserver';\n\n/**\n * Sjekk om et HTML-element er synlig i vinduet, eller ikke.\n *\n * @param ref Element som skal observeres\n * @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)\n * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres\n * @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig\n * @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke\n */\nexport const useIsVisible = (\n ref: React.RefObject<Element>,\n threshold = 1,\n options?: IntersectionObserverInit,\n initial = false\n): boolean => {\n const [isVisible, setIsVisible] = useState(initial);\n\n const handleIntersectChange: IntersectionObserverCallback = entries => {\n setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);\n };\n\n useIntersectionObserver(ref, handleIntersectChange, { threshold, ...options });\n\n return isVisible;\n};\n"],"names":["useIsVisible","ref","threshold","options","initial","isVisible","setIsVisible","useState","useIntersectionObserver","entries"],"mappings":"wGAaO,MAAMA,EAAe,CAC1BC,EACAC,EAAY,EACZC,EACAC,EAAU,KACE,CACZ,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAASH,CAAO,EAMlD,OAAAI,EAAwBP,EAJ+CQ,GAAA,CACxDH,EAAAJ,IAAc,EAAIO,EAAQ,CAAC,EAAE,oBAAsBP,EAAYO,EAAQ,CAAC,EAAE,mBAAqBP,CAAS,CAAA,EAGnE,CAAE,UAAAA,EAAW,GAAGC,EAAS,EAEtEE,CACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"useKeyboardEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useKeyboardEvent.ts"],"names":[],"mappings":"AAEA,KAAK,cAAc,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;AAE5E;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QACtB,MAAM,SAAS,CAAC,WAAW,CAAC,oBACf,mBAAmB,CAAC,cAAc,CAAC,KAAK,IAAI,OACzD,MAAM,GAAG,MAAM,EAAE,WACd,cAAc,EAAE,SAezB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type OutsideEvents = keyof PickByValue<HTMLElementEventMap, MouseEvent | FocusEvent>;
|
|
2
2
|
/**
|
|
3
3
|
* Custom hook for klikk eller fokus utenfor et gitt element
|
|
4
4
|
* @param ref Sjekker om det klikkes utenfor dette elementet
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"useOutsideEvent.d.ts","sourceRoot":"","sources":["../../src/hooks/useOutsideEvent.ts"],"names":[],"mappings":"AAEA,KAAK,aAAa,GAAG,MAAM,WAAW,CAAC,mBAAmB,EAAE,UAAU,GAAG,UAAU,CAAC,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QACrB,MAAM,SAAS,CAAC,WAAW,CAAC,uBACZ,mBAAmB,CAAC,aAAa,CAAC,KAAK,IAAI,WACxD,aAAa,EAAE,KACtB,IAcF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeObserver.js","sources":["../../src/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\n/**\n * Lytt på endringer i størrelse på et element. Bruker ResizeObserver-APIet.\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet\n */\nexport const useResizeObserver = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n }, [ref]);\n\n return size;\n};\n"],"names":["useResizeObserver","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries"],"mappings":"4DAQa,MAAAA,EAAqBC,GAA4D,CACtF,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACR,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,
|
|
1
|
+
{"version":3,"file":"useResizeObserver.js","sources":["../../src/hooks/useResizeObserver.ts"],"sourcesContent":["import { useEffect, useState, useRef } from 'react';\n\n/**\n * Lytt på endringer i størrelse på et element. Bruker ResizeObserver-APIet.\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet\n */\nexport const useResizeObserver = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n }, [ref]);\n\n return size;\n};\n"],"names":["useResizeObserver","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries"],"mappings":"4DAQa,MAAAA,EAAqBC,GAA4D,CACtF,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACR,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,CAAC,EAAE,OAAO,sBAAuB,CAAA,EACjDP,EAAQ,QAAU,EAAA,CACnB,EAEHA,EAAQ,QAAU,EAAA,CACnB,EACD,OAAID,GAAA,MAAAA,EAAK,SACQO,EAAA,QAAQP,GAAA,YAAAA,EAAK,OAAO,EAG9B,IAAY,CACbA,GAAA,MAAAA,EAAK,QACQO,EAAA,UAAUP,EAAI,OAAO,EAEpCO,EAAe,WAAW,CAC5B,CACF,EACC,CAACP,CAAG,CAAC,EAEDG,CACT"}
|
package/hooks/useSize.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useSize.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSize.d.ts","sourceRoot":"","sources":["../../src/hooks/useSize.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,OAAO,SAAU,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,OAAO,GAAG,SA+CtE,CAAC"}
|
package/hooks/useSize.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSize.js","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\nimport { debounce } from '../utils/debounce';\n\n/**\n * Lytt på endringer i størrelse på et element\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet. Merk at objektet bare oppdates når høyde eller bredde endres, ikke når\n * posisjonen (x og y) endres.\n */\nexport const useSize = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n if (typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n } else if (typeof window === 'object') {\n // For nettlesere som ikke støtter ResizeObserver (iOS 13 og lavere)\n const handleLayoutEvent = () => {\n ref?.current && setSize(ref.current.getBoundingClientRect());\n };\n\n const events = ['layoutchange', 'resize', 'orientationchange'];\n const debounceMs = 10;\n\n const [debouncedCallback, teardown] = debounce(handleLayoutEvent, debounceMs);\n\n events.forEach(eventName => window.addEventListener(eventName, debouncedCallback));\n\n debouncedCallback();\n\n return () => {\n teardown();\n events.forEach(eventName => window.removeEventListener(eventName, debouncedCallback));\n };\n }\n }, [ref?.current]);\n\n return size;\n};\n"],"names":["useSize","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries","handleLayoutEvent","events","debouncedCallback","teardown","debounce","eventName"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useSize.js","sources":["../../src/hooks/useSize.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react';\n\nimport { debounce } from '../utils/debounce';\n\n/**\n * Lytt på endringer i størrelse på et element\n *\n * @param ref Element som skal observeres.\n * @returns Object med høyde, bredde, x og y til elementet. Merk at objektet bare oppdates når høyde eller bredde endres, ikke når\n * posisjonen (x og y) endres.\n */\nexport const useSize = (ref?: React.RefObject<HTMLElement>): DOMRect | undefined => {\n const ticking = useRef(false);\n const [size, setSize] = useState<DOMRect>();\n useEffect(() => {\n if (typeof ResizeObserver !== 'undefined') {\n const resizeObserver = new ResizeObserver(entries => {\n if (!ticking.current) {\n window.requestAnimationFrame(() => {\n setSize(entries[0].target.getBoundingClientRect());\n ticking.current = false;\n });\n }\n ticking.current = true;\n });\n if (ref?.current) {\n resizeObserver.observe(ref?.current);\n }\n return (): void => {\n if (ref?.current) {\n resizeObserver.unobserve(ref.current);\n } else {\n resizeObserver.disconnect();\n }\n };\n } else if (typeof window === 'object') {\n // For nettlesere som ikke støtter ResizeObserver (iOS 13 og lavere)\n const handleLayoutEvent = () => {\n ref?.current && setSize(ref.current.getBoundingClientRect());\n };\n\n const events = ['layoutchange', 'resize', 'orientationchange'];\n const debounceMs = 10;\n\n const [debouncedCallback, teardown] = debounce(handleLayoutEvent, debounceMs);\n\n events.forEach(eventName => window.addEventListener(eventName, debouncedCallback));\n\n debouncedCallback();\n\n return () => {\n teardown();\n events.forEach(eventName => window.removeEventListener(eventName, debouncedCallback));\n };\n }\n }, [ref?.current]);\n\n return size;\n};\n"],"names":["useSize","ref","ticking","useRef","size","setSize","useState","useEffect","resizeObserver","entries","handleLayoutEvent","events","debouncedCallback","teardown","debounce","eventName"],"mappings":"4GAWa,MAAAA,EAAWC,GAA4D,CAC5E,MAAAC,EAAUC,EAAO,EAAK,EACtB,CAACC,EAAMC,CAAO,EAAIC,EAAkB,EAC1C,OAAAC,EAAU,IAAM,CACV,GAAA,OAAO,eAAmB,IAAa,CACnC,MAAAC,EAAiB,IAAI,eAA0BC,GAAA,CAC9CP,EAAQ,SACX,OAAO,sBAAsB,IAAM,CACjCG,EAAQI,EAAQ,CAAC,EAAE,OAAO,sBAAuB,CAAA,EACjDP,EAAQ,QAAU,EAAA,CACnB,EAEHA,EAAQ,QAAU,EAAA,CACnB,EACD,OAAID,GAAA,MAAAA,EAAK,SACQO,EAAA,QAAQP,GAAA,YAAAA,EAAK,OAAO,EAE9B,IAAY,CACbA,GAAA,MAAAA,EAAK,QACQO,EAAA,UAAUP,EAAI,OAAO,EAEpCO,EAAe,WAAW,CAC5B,UAEO,OAAO,QAAW,SAAU,CAErC,MAAME,EAAoB,IAAM,CAC9BT,GAAA,MAAAA,EAAK,SAAWI,EAAQJ,EAAI,QAAQ,uBAAuB,CAAA,EAGvDU,EAAS,CAAC,eAAgB,SAAU,mBAAmB,EAGvD,CAACC,EAAmBC,CAAQ,EAAIC,EAASJ,EAAmB,EAAU,EAE5E,OAAAC,EAAO,QAAqBI,GAAA,OAAO,iBAAiBA,EAAWH,CAAiB,CAAC,EAE/DA,IAEX,IAAM,CACFC,IACTF,EAAO,QAAqBI,GAAA,OAAO,oBAAoBA,EAAWH,CAAiB,CAAC,CAAA,EAExF,EACC,CAACX,GAAA,YAAAA,EAAK,OAAO,CAAC,EAEVG,CACT"}
|
package/hooks/useSticky.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSticky.d.ts","sourceRoot":"","sources":["../../src/hooks/useSticky.ts"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useSticky.d.ts","sourceRoot":"","sources":["../../src/hooks/useSticky.ts"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,UAAU,oBAAoB;IAC5B,6CAA6C;IAC7C,eAAe,EAAE,OAAO,CAAC;IACzB,+CAA+C;IAC/C,eAAe,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,qCAAqC;IACrC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC;AACD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAgB,MAAM,SAAS,CAAC,WAAW,CAAC,aAAa,MAAM,SAAS,CAAC,WAAW,CAAC,KAAG,oBAsB7G,CAAC"}
|
package/hooks/useSticky.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as t}from"react";import{useLayoutEvent as
|
|
1
|
+
import{useState as t}from"react";import{useLayoutEvent as O}from"./useLayoutEvent.js";import"../utils/debounce.js";const E=(i,s)=>{const[c,d]=t(!1),[h,r]=t(!1),[u,a]=t(),[f,g]=t();return O(()=>{var n,o;const{top:l=0,width:m=0,bottom:C=0}=((n=i.current)==null?void 0:n.getBoundingClientRect())||{},e=((o=s.current)==null?void 0:o.getBoundingClientRect().height)??0;d(l<=0),r(C<=e),g(m),a(e)},["resize","scroll"]),{isOutsideWindow:c,isLeavingWindow:h,offsetHeight:u,contentWidth:f}};export{E as useSticky};
|
|
2
2
|
//# sourceMappingURL=useSticky.js.map
|
package/hooks/useSticky.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSticky.js","sources":["../../src/hooks/useSticky.ts"],"sourcesContent":["import React, { useState } from 'react';\nimport { useLayoutEvent } from './useLayoutEvent';\n\ninterface UseStickReturnValues {\n /** Toppen av elementet er utenfor vinduet */\n isOutsideWindow: boolean;\n /** Innholdet er på vei helt ut av vinduet */\n isLeavingWindow: boolean;\n /** Høyde på det sticky elementet i pixler */\n offsetHeight: number | undefined;\n /** Bredden til innholdet i pixler */\n contentWidth: number | undefined;\n}\n/**\n * Sett et element til sticky hvis et annet element er delvis utenfor vinduet\n *\n * @param contentRef Element som sjekkes om det er utenfor eller innenfor vinduet\n * @param stickyRef Element som skal bli sticky\n * @returns Properties som kan brukes til å sette elementet sticky eller absolute\n */\nexport const useSticky = (contentRef: React.RefObject<HTMLElement>, stickyRef: React.RefObject<HTMLElement>): UseStickReturnValues => {\n const [isOutsideWindow, setIsOutsideWindow] = useState<boolean>(false);\n const [isLeavingWindow, setIsLeavingWindow] = useState<boolean>(false);\n const [offsetHeight, setOffsetHeight] = useState<number>();\n const [contentWidth, setContentWidth] = useState<number>();\n\n const handleLayoutChange = () => {\n const {\n top: topOfContentElement = 0,\n width: widthOfContentElement = 0,\n bottom: bottomOfContentElement = 0,\n } = contentRef.current?.getBoundingClientRect() || {};\n const heightOfStickyElement = stickyRef.current?.getBoundingClientRect().height ?? 0;\n setIsOutsideWindow(topOfContentElement <= 0);\n setIsLeavingWindow(bottomOfContentElement <= heightOfStickyElement);\n setContentWidth(widthOfContentElement);\n setOffsetHeight(heightOfStickyElement);\n };\n\n useLayoutEvent(handleLayoutChange, ['resize', 'scroll']);\n\n return { isOutsideWindow, isLeavingWindow, offsetHeight, contentWidth };\n};\n"],"names":["useSticky","contentRef","stickyRef","isOutsideWindow","setIsOutsideWindow","useState","isLeavingWindow","setIsLeavingWindow","offsetHeight","setOffsetHeight","contentWidth","setContentWidth","useLayoutEvent","topOfContentElement","widthOfContentElement","bottomOfContentElement","_a","heightOfStickyElement","
|
|
1
|
+
{"version":3,"file":"useSticky.js","sources":["../../src/hooks/useSticky.ts"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { useLayoutEvent } from './useLayoutEvent';\n\ninterface UseStickReturnValues {\n /** Toppen av elementet er utenfor vinduet */\n isOutsideWindow: boolean;\n /** Innholdet er på vei helt ut av vinduet */\n isLeavingWindow: boolean;\n /** Høyde på det sticky elementet i pixler */\n offsetHeight: number | undefined;\n /** Bredden til innholdet i pixler */\n contentWidth: number | undefined;\n}\n/**\n * Sett et element til sticky hvis et annet element er delvis utenfor vinduet\n *\n * @param contentRef Element som sjekkes om det er utenfor eller innenfor vinduet\n * @param stickyRef Element som skal bli sticky\n * @returns Properties som kan brukes til å sette elementet sticky eller absolute\n */\nexport const useSticky = (contentRef: React.RefObject<HTMLElement>, stickyRef: React.RefObject<HTMLElement>): UseStickReturnValues => {\n const [isOutsideWindow, setIsOutsideWindow] = useState<boolean>(false);\n const [isLeavingWindow, setIsLeavingWindow] = useState<boolean>(false);\n const [offsetHeight, setOffsetHeight] = useState<number>();\n const [contentWidth, setContentWidth] = useState<number>();\n\n const handleLayoutChange = () => {\n const {\n top: topOfContentElement = 0,\n width: widthOfContentElement = 0,\n bottom: bottomOfContentElement = 0,\n } = contentRef.current?.getBoundingClientRect() || {};\n const heightOfStickyElement = stickyRef.current?.getBoundingClientRect().height ?? 0;\n setIsOutsideWindow(topOfContentElement <= 0);\n setIsLeavingWindow(bottomOfContentElement <= heightOfStickyElement);\n setContentWidth(widthOfContentElement);\n setOffsetHeight(heightOfStickyElement);\n };\n\n useLayoutEvent(handleLayoutChange, ['resize', 'scroll']);\n\n return { isOutsideWindow, isLeavingWindow, offsetHeight, contentWidth };\n};\n"],"names":["useSticky","contentRef","stickyRef","isOutsideWindow","setIsOutsideWindow","useState","isLeavingWindow","setIsLeavingWindow","offsetHeight","setOffsetHeight","contentWidth","setContentWidth","useLayoutEvent","topOfContentElement","widthOfContentElement","bottomOfContentElement","_a","heightOfStickyElement","_b"],"mappings":"mHAqBa,MAAAA,EAAY,CAACC,EAA0CC,IAAkE,CACpI,KAAM,CAACC,EAAiBC,CAAkB,EAAIC,EAAkB,EAAK,EAC/D,CAACC,EAAiBC,CAAkB,EAAIF,EAAkB,EAAK,EAC/D,CAACG,EAAcC,CAAe,EAAIJ,EAAiB,EACnD,CAACK,EAAcC,CAAe,EAAIN,EAAiB,EAezD,OAAAO,EAb2B,IAAM,SACzB,KAAA,CACJ,IAAKC,EAAsB,EAC3B,MAAOC,EAAwB,EAC/B,OAAQC,EAAyB,CAC/B,IAAAC,EAAAf,EAAW,UAAX,YAAAe,EAAoB,0BAA2B,CAAA,EAC7CC,IAAwBC,EAAAhB,EAAU,UAAV,YAAAgB,EAAmB,wBAAwB,SAAU,EACnFd,EAAmBS,GAAuB,CAAC,EAC3CN,EAAmBQ,GAA0BE,CAAqB,EAClEN,EAAgBG,CAAqB,EACrCL,EAAgBQ,CAAqB,CAAA,EAGJ,CAAC,SAAU,QAAQ,CAAC,EAEhD,CAAE,gBAAAd,EAAiB,gBAAAG,EAAiB,aAAAE,EAAc,aAAAE,CAAa,CACxE"}
|
package/hooks/useToggle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useToggle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useToggle.d.ts","sourceRoot":"","sources":["../../src/hooks/useToggle.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,iBAAkB,OAAO,sBAAqB,OAAO,KAAK,IAAI;WAAY,OAAO;iBAAe,MAAM,IAAI;CAqB/H,CAAC"}
|
package/hooks/useToggle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useToggle.js","sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\nimport { usePrevious } from './usePrevious';\n\n/**\n * Hook for å toggle en boolean og kjøre en callback når verdien endres\n *\n * @param initialValue Initiell verdi for boolean\n * @param callback Funksjon som kalles når value endrer verdi (optional)\n * @returns Objekt med nåværende verdi og funksjon som kan kalles for å toggle verdien\n */\nexport const useToggle = (initialValue: boolean, callback?: (value: boolean) => void): { value: boolean; toggleValue: () => void } => {\n const [value, setValue] = useState(initialValue);\n const previousValue = usePrevious(value);\n\n const toggleValue = () => {\n setValue(!value);\n };\n\n useEffect(() => {\n if (initialValue !== value) {\n setValue(initialValue);\n }\n }, [initialValue]);\n\n useEffect(() => {\n if (callback && value !== !!previousValue) {\n callback(value);\n }\n }, [value, callback]);\n\n return { value, toggleValue };\n};\n"],"names":["useToggle","initialValue","callback","value","setValue","useState","previousValue","usePrevious","toggleValue","useEffect"],"mappings":"+
|
|
1
|
+
{"version":3,"file":"useToggle.js","sources":["../../src/hooks/useToggle.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { usePrevious } from './usePrevious';\n\n/**\n * Hook for å toggle en boolean og kjøre en callback når verdien endres\n *\n * @param initialValue Initiell verdi for boolean\n * @param callback Funksjon som kalles når value endrer verdi (optional)\n * @returns Objekt med nåværende verdi og funksjon som kan kalles for å toggle verdien\n */\nexport const useToggle = (initialValue: boolean, callback?: (value: boolean) => void): { value: boolean; toggleValue: () => void } => {\n const [value, setValue] = useState(initialValue);\n const previousValue = usePrevious(value);\n\n const toggleValue = () => {\n setValue(!value);\n };\n\n useEffect(() => {\n if (initialValue !== value) {\n setValue(initialValue);\n }\n }, [initialValue]);\n\n useEffect(() => {\n if (callback && value !== !!previousValue) {\n callback(value);\n }\n }, [value, callback]);\n\n return { value, toggleValue };\n};\n"],"names":["useToggle","initialValue","callback","value","setValue","useState","previousValue","usePrevious","toggleValue","useEffect"],"mappings":"+FAWa,MAAAA,EAAY,CAACC,EAAuBC,IAAqF,CACpI,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAASJ,CAAY,EACzCK,EAAgBC,EAAYJ,CAAK,EAEjCK,EAAc,IAAM,CACxBJ,EAAS,CAACD,CAAK,CAAA,EAGjB,OAAAM,EAAU,IAAM,CACVR,IAAiBE,GACnBC,EAASH,CAAY,CACvB,EACC,CAACA,CAAY,CAAC,EAEjBQ,EAAU,IAAM,CACVP,GAAYC,IAAU,CAAC,CAACG,GAC1BJ,EAASC,CAAK,CAChB,EACC,CAACA,EAAOD,CAAQ,CAAC,EAEb,CAAE,MAAAC,EAAO,YAAAK,EAClB"}
|
package/hooks/useUuid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUuid.d.ts","sourceRoot":"","sources":["../../src/hooks/useUuid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUuid.d.ts","sourceRoot":"","sources":["../../src/hooks/useUuid.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,eAAO,MAAM,OAAO,aAAc,MAAM,KAAG,MAI1C,CAAC"}
|
package/hooks/useUuid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUuid.js","sources":["../../src/hooks/useUuid.ts"],"sourcesContent":["import { useState } from 'react';\nimport { uuid } from '../utils/uuid';\n\n/**\n * Returner unik uuid som ikke endrer seg for hver render\n * @param initial id som vil overstyre id fra uuid-utility\n * @returns uuid-string\n */\nexport const useUuid = (initial?: string): string => {\n const [id] = useState(initial || uuid());\n\n return id;\n};\n"],"names":["useUuid","initial","id","useState","uuid"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useUuid.js","sources":["../../src/hooks/useUuid.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { uuid } from '../utils/uuid';\n\n/**\n * Returner unik uuid som ikke endrer seg for hver render\n * @param initial id som vil overstyre id fra uuid-utility\n * @returns uuid-string\n */\nexport const useUuid = (initial?: string): string => {\n const [id] = useState(initial || uuid());\n\n return id;\n};\n"],"names":["useUuid","initial","id","useState","uuid"],"mappings":"gGASa,MAAAA,EAAWC,GAA6B,CACnD,KAAM,CAACC,CAAE,EAAIC,EAASF,GAAWG,EAAM,CAAA,EAEhC,OAAAF,CACT"}
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{theme as n}from"./theme/index.js";import{Breakpoint as d,useBreakpoint as v}from"./hooks/useBreakpoint.js";import{useFocusToggle as c}from"./hooks/useFocusToggle.js";import{useFocusTrap as I}from"./hooks/useFocusTrap.js";import{useHover as A}from"./hooks/useHover.js";import{useIntersectionObserver as g}from"./hooks/useIntersectionObserver.js";import{useIsVisible as F}from"./hooks/useIsVisible.js";import{useLayoutEvent as k}from"./hooks/useLayoutEvent.js";import{usePrevious as H}from"./hooks/usePrevious.js";import{useSticky as O}from"./hooks/useSticky.js";import{useSize as V}from"./hooks/useSize.js";import{useResizeObserver as B}from"./hooks/useResizeObserver.js";import{useToggle as P}from"./hooks/useToggle.js";import{useKeyboardEvent as D}from"./hooks/useKeyboardEvent.js";import{useOutsideEvent as L}from"./hooks/useOutsideEvent.js";import{useUuid as U}from"./hooks/useUuid.js";import{a as X}from"./uuid.js";import{AVERAGE_CHARACTER_WIDTH_PX as j,AnalyticsId as q,FormMode as w,FormVariant as J,IconSize as N,KeyboardEventKey as Q,ZIndex as Y}from"./constants.js";import"./theme/
|
|
1
|
+
import{theme as n}from"./theme/index.js";import{Breakpoint as d,useBreakpoint as v}from"./hooks/useBreakpoint.js";import{useFocusToggle as c}from"./hooks/useFocusToggle.js";import{useFocusTrap as I}from"./hooks/useFocusTrap.js";import{useHover as A}from"./hooks/useHover.js";import{useIntersectionObserver as g}from"./hooks/useIntersectionObserver.js";import{useIsVisible as F}from"./hooks/useIsVisible.js";import{useLayoutEvent as k}from"./hooks/useLayoutEvent.js";import{usePrevious as H}from"./hooks/usePrevious.js";import{useSticky as O}from"./hooks/useSticky.js";import{useSize as V}from"./hooks/useSize.js";import{useResizeObserver as B}from"./hooks/useResizeObserver.js";import{useToggle as P}from"./hooks/useToggle.js";import{useKeyboardEvent as D}from"./hooks/useKeyboardEvent.js";import{useOutsideEvent as L}from"./hooks/useOutsideEvent.js";import{useUuid as U}from"./hooks/useUuid.js";import{a as X}from"./uuid.js";import{AVERAGE_CHARACTER_WIDTH_PX as j,AnalyticsId as q,FormMode as w,FormVariant as J,IconSize as N,KeyboardEventKey as Q,ZIndex as Y}from"./constants.js";import"./theme/grid.js";import"./theme/palette.js";import"./theme/spacers.js";import"react";import"./hooks/useElementList.js";import"./hooks/useFocusableElements.js";import"./utils/focus.js";import"./utils/debounce.js";import"./utils/environment.js";export{j as AVERAGE_CHARACTER_WIDTH_PX,q as AnalyticsId,d as Breakpoint,w as FormMode,J as FormVariant,N as IconSize,Q as KeyboardEventKey,Y as ZIndex,n as theme,v as useBreakpoint,c as useFocusToggle,I as useFocusTrap,A as useHover,g as useIntersectionObserver,F as useIsVisible,D as useKeyboardEvent,k as useLayoutEvent,L as useOutsideEvent,H as usePrevious,B as useResizeObserver,V as useSize,O as useSticky,P as useToggle,U as useUuid,X as uuid};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
package/scss/_body.scss
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@import './font-settings';
|
|
2
3
|
@import './palette';
|
|
3
4
|
@import './breakpoints';
|
|
@@ -8,7 +9,8 @@ body {
|
|
|
8
9
|
color: $black;
|
|
9
10
|
font-size: $font-size-sm;
|
|
10
11
|
line-height: $lineheight-size-sm;
|
|
11
|
-
|
|
12
|
+
|
|
13
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
12
14
|
font-size: $font-size-md;
|
|
13
15
|
line-height: $lineheight-size-md;
|
|
14
16
|
}
|
package/scss/_breakpoints.scss
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
1
2
|
@import 'spacers';
|
|
2
3
|
|
|
3
|
-
$grid-gutter-width: map
|
|
4
|
-
|
|
4
|
+
$grid-gutter-width: map.get($spacers, 5);
|
|
5
5
|
$grid-columns: 12;
|
|
6
|
-
|
|
7
6
|
$grid-breakpoints: (
|
|
8
7
|
xxs: 0,
|
|
9
8
|
xs: 360px,
|
|
@@ -12,13 +11,11 @@ $grid-breakpoints: (
|
|
|
12
11
|
lg: 1088px,
|
|
13
12
|
xl: 1450px,
|
|
14
13
|
);
|
|
15
|
-
|
|
16
14
|
$grid-max-breakpoints: (
|
|
17
|
-
xs: map
|
|
18
|
-
sm: map
|
|
19
|
-
md: map
|
|
15
|
+
xs: map.get($grid-breakpoints, sm) - 0.02,
|
|
16
|
+
sm: map.get($grid-breakpoints, md) - 0.02,
|
|
17
|
+
md: map.get($grid-breakpoints, lg) - 0.02,
|
|
20
18
|
);
|
|
21
|
-
|
|
22
19
|
$container-max-widths: (
|
|
23
20
|
sm: 528px,
|
|
24
21
|
md: 612px,
|
package/scss/_figma-tokens.scss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// Do not edit directly
|
|
2
2
|
// Generated on Wed, 05 Oct 2022 11:38:01 GMT
|
|
3
3
|
|
|
4
|
-
$palette-white: #
|
|
5
|
-
$palette-black: #
|
|
4
|
+
$palette-white: #fff;
|
|
5
|
+
$palette-black: #000;
|
|
6
6
|
$palette-plum900: #3c1471;
|
|
7
7
|
$palette-plum800: #4c1b8c;
|
|
8
8
|
$palette-plum700: #5b22a6;
|