@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 +1 @@
|
|
|
1
|
-
{"props":{"afterLabelChildren":{"defaultValue":null,"description":"Component shown after label","name":"afterLabelChildren","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"ReactNode"}},"children":{"defaultValue":null,"description":"Sets the content of the select element.","name":"children","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":true,"type":{"name":"ReactNode"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"concept":{"defaultValue":null,"description":"Changes the visuals of the component","name":"concept","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"enum","raw":"SelectConcept","value":[{"value":"\"normal\""},{"value":"\"transparent\""}]}},"label":{"defaultValue":null,"description":"The label text above the select","name":"label","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the component","name":"mode","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"ondark\" | \"oninvalid\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"ondark\""},{"value":"\"oninvalid\""}]}},"error":{"defaultValue":null,"description":"Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup","name":"error","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"boolean"}},"errorText":{"defaultValue":null,"description":"Error text to show above the component","name":"errorText","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"selectId":{"defaultValue":null,"description":"select id of the select element","name":"selectId","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"width":{"defaultValue":null,"description":"Width of select in characters (approximate)","name":"width","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"number"}},"defaultValue":{"defaultValue":null,"description":"Gives defaultvalue to the comp. Preferred over selected prop on option by react","name":"defaultValue","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string | number"}},"name":{"defaultValue":null,"description":"","name":"name","parent":{"fileName":"
|
|
1
|
+
{"props":{"afterLabelChildren":{"defaultValue":null,"description":"Component shown after label","name":"afterLabelChildren","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"ReactNode"}},"children":{"defaultValue":null,"description":"Sets the content of the select element.","name":"children","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":true,"type":{"name":"ReactNode"}},"className":{"defaultValue":null,"description":"Adds custom classes to the element.","name":"className","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"concept":{"defaultValue":null,"description":"Changes the visuals of the component","name":"concept","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"enum","raw":"SelectConcept","value":[{"value":"\"normal\""},{"value":"\"transparent\""}]}},"label":{"defaultValue":null,"description":"The label text above the select","name":"label","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"mode":{"defaultValue":null,"description":"Changes the visuals of the component","name":"mode","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"enum","raw":"\"onwhite\" | \"ongrey\" | \"onblueberry\" | \"ondark\" | \"oninvalid\"","value":[{"value":"\"onwhite\""},{"value":"\"ongrey\""},{"value":"\"onblueberry\""},{"value":"\"ondark\""},{"value":"\"oninvalid\""}]}},"error":{"defaultValue":null,"description":"Activates Error style for the select component - This is can be true while errorText is empty, when in a FormGroup","name":"error","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"boolean"}},"errorText":{"defaultValue":null,"description":"Error text to show above the component","name":"errorText","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"selectId":{"defaultValue":null,"description":"select id of the select element","name":"selectId","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string"}},"width":{"defaultValue":null,"description":"Width of select in characters (approximate)","name":"width","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"number"}},"defaultValue":{"defaultValue":null,"description":"Gives defaultvalue to the comp. Preferred over selected prop on option by react","name":"defaultValue","parent":{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"},"declarations":[{"fileName":"src/components/Select/Select.tsx","name":"SelectProps"}],"required":false,"type":{"name":"string | number"}},"name":{"defaultValue":null,"description":"","name":"name","parent":{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"string"}},"disabled":{"defaultValue":null,"description":"","name":"disabled","parent":{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"required":{"defaultValue":null,"description":"","name":"required","parent":{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"boolean"}},"value":{"defaultValue":null,"description":"","name":"value","parent":{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"},"declarations":[{"fileName":"s/node_modules/@types/react/index.d.ts","name":"SelectHTMLAttributes"}],"required":false,"type":{"name":"string | number | readonly string[]"}}}}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../Select.js";import{
|
|
1
|
+
import{S as o}from"../../Select.js";import{a as k}from"../../Select.js";import"react";import"classnames";import"../../constants.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/grid.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../../ErrorWrapper.js";import"../ErrorWrapper/styles.module.scss";import"../Icons/Icon.js";import"../Icons/ChevronDown.js";import"./styles.module.scss";export{k as Select,o as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
@
|
|
2
|
-
@import '../../scss/
|
|
3
|
-
@import '../../scss/
|
|
4
|
-
@import '../../scss/
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import '../../scss/spacers';
|
|
3
|
+
@import '../../scss/breakpoints';
|
|
4
|
+
@import '../../scss/palette';
|
|
5
|
+
@import '../../scss/font-settings';
|
|
5
6
|
|
|
6
7
|
.select-wrapper {
|
|
7
8
|
display: flex;
|
|
@@ -15,7 +16,7 @@
|
|
|
15
16
|
font-weight: 600;
|
|
16
17
|
padding-bottom: getSpacer(xs);
|
|
17
18
|
|
|
18
|
-
@media (min-width: map
|
|
19
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
19
20
|
line-height: getSpacer(l);
|
|
20
21
|
font-size: $font-size-md;
|
|
21
22
|
}
|
|
@@ -35,6 +36,7 @@
|
|
|
35
36
|
display: inline-grid;
|
|
36
37
|
background-color: $white;
|
|
37
38
|
align-items: center;
|
|
39
|
+
|
|
38
40
|
// Andre kolonne her styrer plassering av select ikonet
|
|
39
41
|
grid-template-columns: 1fr 2.8rem;
|
|
40
42
|
|
|
@@ -45,16 +47,19 @@
|
|
|
45
47
|
&:hover {
|
|
46
48
|
background: $neutral50;
|
|
47
49
|
}
|
|
50
|
+
|
|
48
51
|
&--on-blueberry {
|
|
49
52
|
&:hover {
|
|
50
53
|
background-color: $blueberry50;
|
|
51
54
|
}
|
|
52
55
|
}
|
|
56
|
+
|
|
53
57
|
&--invalid {
|
|
54
58
|
&:hover {
|
|
55
59
|
background-color: $cherry50;
|
|
56
60
|
}
|
|
57
61
|
}
|
|
62
|
+
|
|
58
63
|
&--disabled {
|
|
59
64
|
background: $neutral50;
|
|
60
65
|
|
|
@@ -67,7 +72,6 @@
|
|
|
67
72
|
.select {
|
|
68
73
|
/* Pil fjernes for browsere utenom IE */
|
|
69
74
|
appearance: none;
|
|
70
|
-
|
|
71
75
|
height: 2.5rem;
|
|
72
76
|
align-items: center;
|
|
73
77
|
background-color: transparent;
|
|
@@ -82,7 +86,7 @@
|
|
|
82
86
|
line-height: $lineheight-size-sm;
|
|
83
87
|
border-radius: 0;
|
|
84
88
|
|
|
85
|
-
@media (min-width: map
|
|
89
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
86
90
|
height: 3.125rem;
|
|
87
91
|
font-size: $font-size-md;
|
|
88
92
|
}
|
|
@@ -90,6 +94,7 @@
|
|
|
90
94
|
&--on-blueberry {
|
|
91
95
|
outline-color: $blueberry500;
|
|
92
96
|
}
|
|
97
|
+
|
|
93
98
|
&--invalid {
|
|
94
99
|
outline-color: $cherry600;
|
|
95
100
|
}
|
|
@@ -98,6 +103,7 @@
|
|
|
98
103
|
outline-width: 3px;
|
|
99
104
|
outline-offset: -1px;
|
|
100
105
|
}
|
|
106
|
+
|
|
101
107
|
&:focus {
|
|
102
108
|
outline: $black solid 4px;
|
|
103
109
|
outline-offset: -2px;
|
|
@@ -113,7 +119,7 @@
|
|
|
113
119
|
font-family: inherit;
|
|
114
120
|
font-size: $font-size-sm;
|
|
115
121
|
|
|
116
|
-
@media (min-width: map
|
|
122
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
117
123
|
font-size: $font-size-md;
|
|
118
124
|
}
|
|
119
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AA4B3D,UAAU,WAAW;IACnB,oCAAoC;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA8KxC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import s,{useState as
|
|
1
|
+
import s,{useState as b,useRef as D,useEffect as h}from"react";import P from"classnames";import{AnalyticsId as j}from"../../constants.js";import{useSize as M}from"../../hooks/useSize.js";import{useUuid as g}from"../../hooks/useUuid.js";import{getAriaLabelAttributes as C}from"../../utils/accessibility.js";import{T as K}from"../../Title.js";import i from"./styles.module.scss";import"../../utils/debounce.js";import"../../uuid.js";import"../../utils/environment.js";import"../Title/styles.module.scss";const W=(n,k,c)=>{const[u,r]=b(n);return[u,f=>{f>c?r(c):f<k?r(k):r(f)}]},m=100,d=0,N=1,V=10,$=({title:n,ariaLabel:k,labelLeft:c,labelRight:u,disabled:r=!1,onChange:E,testId:f})=>{const[L,S]=b(!1),[a,o]=W((m-d)/2,d,m),p=g(),w=g(),_=g(),A=D(null),v=D(null),{width:y}=M(A)||{width:0},{width:U}=M(v)||{width:0};h(()=>{const e=()=>{S(!1)};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e)}},[]);const I=e=>{var l;const t=((l=A.current)==null?void 0:l.getBoundingClientRect().x)??0;return Math.round((e-t)/y*(m-d))};h(()=>{const e=t=>{if(!r&&L){const l=I(t.clientX);o(l)}};return document.addEventListener("pointermove",e),()=>{document.removeEventListener("pointermove",e)}},[L]),h(()=>{!r&&E&&E(a)},[a]);const R=e=>{if(r)return;let t=!1;switch(e.key){case"ArrowLeft":case"ArrowDown":o(a-N),t=!0;break;case"PageDown":o(a-V),t=!0;break;case"ArrowRight":case"ArrowUp":o(a+N),t=!0;break;case"PageUp":o(a+V),t=!0;break;case"Home":o(d),t=!0;break;case"End":o(m),t=!0;break}t&&(e.preventDefault(),e.stopPropagation())},T=e=>{var l;if(r)return;const t=I(e.clientX);o(t),(l=v.current)==null||l.focus()},x=e=>{var t;r||(S(!0),e.preventDefault(),e.stopPropagation(),(t=v.current)==null||t.focus())},B=(y-U)/(m-d)*a,X=C({label:k,id:(()=>{if(n&&c&&u)return[p,w,_].join(" ");if(n&&c)return[p,w].join(" ");if(n&&u)return[p,_].join(" ");if(n)return p})(),prefer:"label"});return s.createElement("div",{className:i.slider,"data-testid":f,"data-analyticsid":j.Slider},n&&s.createElement(K,{htmlMarkup:"h3",margin:1.5,appearance:"title3",id:p},n),s.createElement("div",{ref:A,className:P(i["slider__track-wrapper"],r&&i["slider__track-wrapper--disabled"]),onClick:T,onPointerDown:x},s.createElement("div",{className:P(i.slider__track,r&&i["slider__track--disabled"])}),s.createElement("div",{role:r?void 0:"slider",ref:v,className:P(i.slider__marker,r&&i["slider__marker--disabled"]),style:{left:`${B}px`},onKeyDown:R,"aria-valuenow":a,"aria-valuemin":d,"aria-valuemax":m,tabIndex:r?void 0:0,"aria-disabled":r,...X})),(c||u)&&s.createElement("span",{className:i.slider__options},s.createElement("span",{id:w},c),s.createElement("span",{id:_},u)))},ne=$;export{$ as Slider,ne as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\nimport classNames from 'classnames';\n\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\n\nconst useSafeNumberValue = (initial: number, min: number, max: number): [number, (value: number) => void] => {\n const [value, setValue] = useState(initial);\n\n const setSafeValue = (newValue: number): void => {\n if (newValue > max) {\n setValue(max);\n } else if (newValue < min) {\n setValue(min);\n } else {\n setValue(newValue);\n }\n };\n\n return [value, setSafeValue];\n};\n\ninterface SliderProps {\n /**\tSets the title of the slider. */\n title?: string;\n /** Adds the left hand label to the element. */\n labelLeft?: string;\n /** Adds the right hand label to the element. */\n labelRight?: string;\n /**\tSets aria-label of the slider. */\n ariaLabel?: string;\n /** Disables the slider element. */\n disabled?: boolean;\n /** Function to be called when the value state has changed. */\n onChange?: (value: number) => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst MAX_VALUE = 100;\nconst MIN_VALUE = 0;\nconst STEP = 1;\nconst LARGE_STEP = 10;\n\nexport const Slider: React.FC<SliderProps> = ({ title, ariaLabel, labelLeft, labelRight, disabled = false, onChange, testId }) => {\n const [isMoving, setIsMoving] = useState(false);\n const [value, setValue] = useSafeNumberValue((MAX_VALUE - MIN_VALUE) / 2, MIN_VALUE, MAX_VALUE);\n const titleId = useUuid();\n const labelLeftId = useUuid();\n const labelRightId = useUuid();\n const trackRef = useRef<HTMLDivElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const { width: trackWidth } = useSize(trackRef) || { width: 0 };\n const { width: markerWidth } = useSize(markerRef) || { width: 0 };\n\n useEffect(() => {\n const handlePointerUp = (): void => {\n setIsMoving(false);\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n };\n }, []);\n\n const getValueBasedOnMarkerPosition = (markerPosition: number): number => {\n const trackPosition = trackRef.current?.getBoundingClientRect().x ?? 0;\n\n return Math.round(((markerPosition - trackPosition) / trackWidth) * (MAX_VALUE - MIN_VALUE));\n };\n\n useEffect(() => {\n const handlePointerMove = (e: PointerEvent): void => {\n if (!disabled && isMoving) {\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValue(newValue);\n }\n };\n\n document.addEventListener('pointermove', handlePointerMove);\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n };\n }, [isMoving]);\n\n useEffect(() => {\n if (!disabled && onChange) {\n onChange(value);\n }\n }, [value]);\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n let flag = false;\n\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n setValue(value - STEP);\n flag = true;\n break;\n case 'PageDown':\n setValue(value - LARGE_STEP);\n flag = true;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n setValue(value + STEP);\n flag = true;\n break;\n case 'PageUp':\n setValue(value + LARGE_STEP);\n flag = true;\n break;\n case 'Home':\n setValue(MIN_VALUE);\n flag = true;\n break;\n case 'End':\n setValue(MAX_VALUE);\n flag = true;\n break;\n default:\n break;\n }\n\n if (flag) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const handleTrackClick: React.MouseEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValue(newValue);\n markerRef.current?.focus();\n };\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n setIsMoving(true);\n\n e.preventDefault();\n e.stopPropagation();\n\n markerRef.current?.focus();\n };\n\n const markerXPos = ((trackWidth - markerWidth) / (MAX_VALUE - MIN_VALUE)) * value;\n\n const getAriaLabeledById = (): string | undefined => {\n if (title && labelLeft && labelRight) {\n return [titleId, labelLeftId, labelRightId].join(' ');\n }\n if (title && labelLeft) {\n return [titleId, labelLeftId].join(' ');\n }\n if (title && labelRight) {\n return [titleId, labelRightId].join(' ');\n }\n if (title) {\n return titleId;\n }\n };\n\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: ariaLabel,\n id: getAriaLabeledById(),\n prefer: 'label',\n });\n\n return (\n <div className={styles.slider} data-testid={testId} data-analyticsid={AnalyticsId.Slider}>\n {title && (\n <Title htmlMarkup={'h3'} margin={1.5} appearance={'title3'} id={titleId}>\n {title}\n </Title>\n )}\n <div\n ref={trackRef}\n className={classNames(styles['slider__track-wrapper'], disabled && styles['slider__track-wrapper--disabled'])}\n onClick={handleTrackClick}\n onPointerDown={handlePointerDown}\n >\n <div className={classNames(styles.slider__track, disabled && styles['slider__track--disabled'])} />\n <div\n role={'slider'}\n ref={markerRef}\n className={classNames(styles.slider__marker, disabled && styles['slider__marker--disabled'])}\n style={{\n left: `${markerXPos}px`,\n }}\n onKeyDown={handleKeyDown}\n aria-valuenow={value}\n aria-valuemin={MIN_VALUE}\n aria-valuemax={MAX_VALUE}\n tabIndex={disabled ? undefined : 0}\n aria-disabled={disabled}\n {...ariaLabelAttributes}\n />\n </div>\n {(labelLeft || labelRight) && (\n <span className={styles.slider__options}>\n <span id={labelLeftId}>{labelLeft}</span>\n <span id={labelRightId}>{labelRight}</span>\n </span>\n )}\n </div>\n );\n};\n\nexport default Slider;\n"],"names":["useSafeNumberValue","initial","min","max","value","setValue","useState","newValue","MAX_VALUE","MIN_VALUE","STEP","LARGE_STEP","Slider","title","ariaLabel","labelLeft","labelRight","disabled","onChange","testId","isMoving","setIsMoving","titleId","useUuid","labelLeftId","labelRightId","trackRef","useRef","markerRef","trackWidth","useSize","markerWidth","useEffect","handlePointerUp","getValueBasedOnMarkerPosition","markerPosition","trackPosition","_b","_a","handlePointerMove","e","handleKeyDown","flag","handleTrackClick","handlePointerDown","markerXPos","ariaLabelAttributes","getAriaLabelAttributes","React","styles","AnalyticsId","Title","classNames"],"mappings":"sfAWA,MAAMA,EAAqB,CAACC,EAAiBC,EAAaC,IAAmD,CAC3G,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAASL,CAAO,EAYnC,MAAA,CAACG,EAVcG,GAA2B,CAC3CA,EAAWJ,EACbE,EAASF,CAAG,EACHI,EAAWL,EACpBG,EAASH,CAAG,EAEZG,EAASE,CAAQ,CACnB,CAGyB,CAC7B,EAmBMC,EAAY,IACZC,EAAY,EACZC,EAAO,EACPC,EAAa,GAENC,GAAgC,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,UAAAC,EAAW,WAAAC,EAAY,SAAAC,EAAW,GAAO,SAAAC,EAAU,OAAAC,KAAa,CAChI,KAAM,CAACC,EAAUC,CAAW,EAAIf,EAAS,EAAK,EACxC,CAACF,EAAOC,CAAQ,EAAIL,GAAoBQ,EAAYC,GAAa,EAAGA,EAAWD,CAAS,EACxFc,EAAUC,IACVC,EAAcD,IACdE,EAAeF,IACfG,EAAWC,EAAuB,IAAI,EACtCC,EAAYD,EAAuB,IAAI,EACvC,CAAE,MAAOE,GAAeC,EAAQJ,CAAQ,GAAK,CAAE,MAAO,GACtD,CAAE,MAAOK,GAAgBD,EAAQF,CAAS,GAAK,CAAE,MAAO,GAE9DI,EAAU,IAAM,CACd,MAAMC,EAAkB,IAAY,CAClCZ,EAAY,EAAK,CAAA,EAGV,gBAAA,iBAAiB,YAAaY,CAAe,EAE/C,IAAM,CACF,SAAA,oBAAoB,YAAaA,CAAe,CAAA,CAE7D,EAAG,CAAE,CAAA,EAEC,MAAAC,EAAiCC,GAAmC,SACxE,MAAMC,GAAgBC,GAAAC,EAAAZ,EAAS,UAAT,YAAAY,EAAk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A,cAAA,OAAA,CAAK,GAAIvB,CAAA,EAAeT,CAAW,CACtC,CAEJ,CAEJ"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Slider/Slider.tsx"],"sourcesContent":["import React, { useEffect, useState, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport Title from '../Title';\n\nimport styles from './styles.module.scss';\n\nconst useSafeNumberValue = (initial: number, min: number, max: number): [number, (value: number) => void] => {\n const [value, setValue] = useState(initial);\n\n const setSafeValue = (newValue: number): void => {\n if (newValue > max) {\n setValue(max);\n } else if (newValue < min) {\n setValue(min);\n } else {\n setValue(newValue);\n }\n };\n\n return [value, setSafeValue];\n};\n\ninterface SliderProps {\n /**\tSets the title of the slider. */\n title?: string;\n /** Adds the left hand label to the element. */\n labelLeft?: string;\n /** Adds the right hand label to the element. */\n labelRight?: string;\n /**\tSets aria-label of the slider. */\n ariaLabel?: string;\n /** Disables the slider element. */\n disabled?: boolean;\n /** Function to be called when the value state has changed. */\n onChange?: (value: number) => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst MAX_VALUE = 100;\nconst MIN_VALUE = 0;\nconst STEP = 1;\nconst LARGE_STEP = 10;\n\nexport const Slider: React.FC<SliderProps> = ({ title, ariaLabel, labelLeft, labelRight, disabled = false, onChange, testId }) => {\n const [isMoving, setIsMoving] = useState(false);\n const [value, setValue] = useSafeNumberValue((MAX_VALUE - MIN_VALUE) / 2, MIN_VALUE, MAX_VALUE);\n const titleId = useUuid();\n const labelLeftId = useUuid();\n const labelRightId = useUuid();\n const trackRef = useRef<HTMLDivElement>(null);\n const markerRef = useRef<HTMLDivElement>(null);\n const { width: trackWidth } = useSize(trackRef) || { width: 0 };\n const { width: markerWidth } = useSize(markerRef) || { width: 0 };\n\n useEffect(() => {\n const handlePointerUp = (): void => {\n setIsMoving(false);\n };\n\n document.addEventListener('pointerup', handlePointerUp);\n\n return () => {\n document.removeEventListener('pointerup', handlePointerUp);\n };\n }, []);\n\n const getValueBasedOnMarkerPosition = (markerPosition: number): number => {\n const trackPosition = trackRef.current?.getBoundingClientRect().x ?? 0;\n\n return Math.round(((markerPosition - trackPosition) / trackWidth) * (MAX_VALUE - MIN_VALUE));\n };\n\n useEffect(() => {\n const handlePointerMove = (e: PointerEvent): void => {\n if (!disabled && isMoving) {\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValue(newValue);\n }\n };\n\n document.addEventListener('pointermove', handlePointerMove);\n\n return () => {\n document.removeEventListener('pointermove', handlePointerMove);\n };\n }, [isMoving]);\n\n useEffect(() => {\n if (!disabled && onChange) {\n onChange(value);\n }\n }, [value]);\n\n const handleKeyDown: React.KeyboardEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n let flag = false;\n\n switch (e.key) {\n case 'ArrowLeft':\n case 'ArrowDown':\n setValue(value - STEP);\n flag = true;\n break;\n case 'PageDown':\n setValue(value - LARGE_STEP);\n flag = true;\n break;\n case 'ArrowRight':\n case 'ArrowUp':\n setValue(value + STEP);\n flag = true;\n break;\n case 'PageUp':\n setValue(value + LARGE_STEP);\n flag = true;\n break;\n case 'Home':\n setValue(MIN_VALUE);\n flag = true;\n break;\n case 'End':\n setValue(MAX_VALUE);\n flag = true;\n break;\n default:\n break;\n }\n\n if (flag) {\n e.preventDefault();\n e.stopPropagation();\n }\n };\n\n const handleTrackClick: React.MouseEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n const newValue = getValueBasedOnMarkerPosition(e.clientX);\n setValue(newValue);\n markerRef.current?.focus();\n };\n\n const handlePointerDown: React.PointerEventHandler<HTMLDivElement> = e => {\n if (disabled) return;\n\n setIsMoving(true);\n\n e.preventDefault();\n e.stopPropagation();\n\n markerRef.current?.focus();\n };\n\n const markerXPos = ((trackWidth - markerWidth) / (MAX_VALUE - MIN_VALUE)) * value;\n\n const getAriaLabeledById = (): string | undefined => {\n if (title && labelLeft && labelRight) {\n return [titleId, labelLeftId, labelRightId].join(' ');\n }\n if (title && labelLeft) {\n return [titleId, labelLeftId].join(' ');\n }\n if (title && labelRight) {\n return [titleId, labelRightId].join(' ');\n }\n if (title) {\n return titleId;\n }\n };\n\n const ariaLabelAttributes = getAriaLabelAttributes({\n label: ariaLabel,\n id: getAriaLabeledById(),\n prefer: 'label',\n });\n\n return (\n <div className={styles.slider} data-testid={testId} data-analyticsid={AnalyticsId.Slider}>\n {title && (\n <Title htmlMarkup={'h3'} margin={1.5} appearance={'title3'} id={titleId}>\n {title}\n </Title>\n )}\n {/* Komponenten er tilgjengelig for mus/keyboard gjennom bruk av slideren */}\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n ref={trackRef}\n className={classNames(styles['slider__track-wrapper'], disabled && styles['slider__track-wrapper--disabled'])}\n onClick={handleTrackClick}\n onPointerDown={handlePointerDown}\n >\n <div className={classNames(styles.slider__track, disabled && styles['slider__track--disabled'])} />\n <div\n role={disabled ? undefined : 'slider'}\n ref={markerRef}\n className={classNames(styles.slider__marker, disabled && styles['slider__marker--disabled'])}\n style={{\n left: `${markerXPos}px`,\n }}\n onKeyDown={handleKeyDown}\n aria-valuenow={value}\n aria-valuemin={MIN_VALUE}\n aria-valuemax={MAX_VALUE}\n tabIndex={disabled ? undefined : 0}\n aria-disabled={disabled}\n {...ariaLabelAttributes}\n />\n </div>\n {(labelLeft || labelRight) && (\n <span className={styles.slider__options}>\n <span id={labelLeftId}>{labelLeft}</span>\n <span id={labelRightId}>{labelRight}</span>\n </span>\n )}\n </div>\n );\n};\n\nexport default Slider;\n"],"names":["useSafeNumberValue","initial","min","max","value","setValue","useState","newValue","MAX_VALUE","MIN_VALUE","STEP","LARGE_STEP","Slider","title","ariaLabel","labelLeft","labelRight","disabled","onChange","testId","isMoving","setIsMoving","titleId","useUuid","labelLeftId","labelRightId","trackRef","useRef","markerRef","trackWidth","useSize","markerWidth","useEffect","handlePointerUp","getValueBasedOnMarkerPosition","markerPosition","trackPosition","_a","handlePointerMove","e","handleKeyDown","flag","handleTrackClick","handlePointerDown","markerXPos","ariaLabelAttributes","getAriaLabelAttributes","React","styles","AnalyticsId","Title","classNames","Slider$1"],"mappings":"sfAYA,MAAMA,EAAqB,CAACC,EAAiBC,EAAaC,IAAmD,CAC3G,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAASL,CAAO,EAYnC,MAAA,CAACG,EAVcG,GAA2B,CAC3CA,EAAWJ,EACbE,EAASF,CAAG,EACHI,EAAWL,EACpBG,EAASH,CAAG,EAEZG,EAASE,CAAQ,CACnB,CAGyB,CAC7B,EAmBMC,EAAY,IACZC,EAAY,EACZC,EAAO,EACPC,EAAa,GAENC,EAAgC,CAAC,CAAE,MAAAC,EAAO,UAAAC,EAAW,UAAAC,EAAW,WAAAC,EAAY,SAAAC,EAAW,GAAO,SAAAC,EAAU,OAAAC,KAAa,CAChI,KAAM,CAACC,EAAUC,CAAW,EAAIf,EAAS,EAAK,EACxC,CAACF,EAAOC,CAAQ,EAAIL,GAAoBQ,EAAYC,GAAa,EAAGA,EAAWD,CAAS,EACxFc,EAAUC,IACVC,EAAcD,IACdE,EAAeF,IACfG,EAAWC,EAAuB,IAAI,EACtCC,EAAYD,EAAuB,IAAI,EACvC,CAAE,MAAOE,GAAeC,EAAQJ,CAAQ,GAAK,CAAE,MAAO,GACtD,CAAE,MAAOK,GAAgBD,EAAQF,CAAS,GAAK,CAAE,MAAO,GAE9DI,EAAU,IAAM,CACd,MAAMC,EAAkB,IAAY,CAClCZ,EAAY,EAAK,CAAA,EAGV,gBAAA,iBAAiB,YAAaY,CAAe,EAE/C,IAAM,CACF,SAAA,oBAAoB,YAAaA,CAAe,CAAA,CAE7D,EAAG,CAAE,CAAA,EAEC,MAAAC,EAAiCC,GAAmC,OACxE,MAAMC,IAAgBC,EAAAX,EAAS,UAAT,YAAAW,E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AA,OAAA,CAAK,GAAItB,CAAe,EAAAT,CAAW,CACtC,CAEJ,CAEJ,EAEAoC,GAAexC"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
&__track-wrapper {
|
|
12
12
|
width: 100%;
|
|
13
13
|
cursor: pointer;
|
|
14
|
+
touch-action: none;
|
|
14
15
|
|
|
15
16
|
&--disabled {
|
|
16
17
|
cursor: default;
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
cursor: pointer;
|
|
45
46
|
|
|
46
47
|
&:focus-within {
|
|
47
|
-
box-shadow:
|
|
48
|
+
box-shadow: 0 0 0 0.1rem $black;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
&::after {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../../src/components/Spacer/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../../src/components/Spacer/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAKpD,UAAU,WAAW;IACnB,mCAAmC;IACnC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,MAAM,iFAuBV,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{S as o}from"../../Spacer.js";import"react";import"classnames";import"../../constants.js";import"./styles.module.scss";export{o as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '../../scss/spacers
|
|
1
|
+
@import '../../scss/spacers';
|
|
2
2
|
|
|
3
3
|
.spacer {
|
|
4
4
|
display: block;
|
|
@@ -8,39 +8,51 @@
|
|
|
8
8
|
&--4xs {
|
|
9
9
|
height: getSpacer(4xs);
|
|
10
10
|
}
|
|
11
|
+
|
|
11
12
|
&--3xs {
|
|
12
13
|
height: getSpacer(3xs);
|
|
13
14
|
}
|
|
15
|
+
|
|
14
16
|
&--2xs {
|
|
15
17
|
height: getSpacer(2xs);
|
|
16
18
|
}
|
|
19
|
+
|
|
17
20
|
&--xs {
|
|
18
21
|
height: getSpacer(xs);
|
|
19
22
|
}
|
|
23
|
+
|
|
20
24
|
&--s {
|
|
21
25
|
height: getSpacer(s);
|
|
22
26
|
}
|
|
27
|
+
|
|
23
28
|
&--m {
|
|
24
29
|
height: getSpacer(m);
|
|
25
30
|
}
|
|
31
|
+
|
|
26
32
|
&--l {
|
|
27
33
|
height: getSpacer(l);
|
|
28
34
|
}
|
|
35
|
+
|
|
29
36
|
&--xl {
|
|
30
37
|
height: getSpacer(xl);
|
|
31
38
|
}
|
|
39
|
+
|
|
32
40
|
&--2xl {
|
|
33
41
|
height: getSpacer(2xl);
|
|
34
42
|
}
|
|
43
|
+
|
|
35
44
|
&--3xl {
|
|
36
45
|
height: getSpacer(3xl);
|
|
37
46
|
}
|
|
47
|
+
|
|
38
48
|
&--4xl {
|
|
39
49
|
height: getSpacer(4xl);
|
|
40
50
|
}
|
|
51
|
+
|
|
41
52
|
&--5xl {
|
|
42
53
|
height: getSpacer(5xl);
|
|
43
54
|
}
|
|
55
|
+
|
|
44
56
|
&--6xl {
|
|
45
57
|
height: getSpacer(6xl);
|
|
46
58
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../../StatusDot.js";import{a as j
|
|
1
|
+
import{S as o}from"../../StatusDot.js";import{a as j}from"../../StatusDot.js";import"react";import"classnames";import"../../theme/grid.js";import"../../hooks/useBreakpoint.js";import"../../constants.js";import"../../theme/currys/color.js";import"../../theme/index.js";import"../../theme/palette.js";import"../../theme/spacers.js";import"../Icons/Attachment.js";import"../Icons/Icon.js";import"../../hooks/useUuid.js";import"../../uuid.js";import"../../utils/environment.js";import"../Icons/Group.js";import"../Icons/NoAccess.js";import"../Icons/Undo.js";import"./styles.module.scss";export{j as StatusDotVariant,o as default};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dot.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,UAAU,QAAQ;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B;AAED,QAAA,MAAM,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,CAY3B,CAAC;AAEF,eAAe,GAAG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DotList.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/DotList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,YAAY;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAMhC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface StepperProps {
|
|
3
3
|
/**
|
|
4
|
-
* Sets aria-label of the
|
|
4
|
+
* Sets aria-label of the stepper. ariaLabel or ariaLabelledById MUST be set!
|
|
5
5
|
*/
|
|
6
6
|
ariaLabel?: string;
|
|
7
7
|
/**
|
|
8
|
-
* Sets aria-labelledby of the
|
|
8
|
+
* Sets aria-labelledby of the stepper. ariaLabel or ariaLabelledById MUST be set!
|
|
9
9
|
*/
|
|
10
10
|
ariaLabelledById?: string;
|
|
11
11
|
/**
|
|
@@ -23,6 +23,6 @@ export interface ProgressbarProps {
|
|
|
23
23
|
/** Sets the data-testid attribute. */
|
|
24
24
|
testId?: string;
|
|
25
25
|
}
|
|
26
|
-
declare const
|
|
27
|
-
export default
|
|
28
|
-
//# sourceMappingURL=
|
|
26
|
+
declare const Stepper: React.FC<StepperProps>;
|
|
27
|
+
export default Stepper;
|
|
28
|
+
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAWtC,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8CnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"props":{"ariaLabel":{"defaultValue":null,"description":"Sets aria-label of the stepper. ariaLabel or ariaLabelledById MUST be set!","name":"ariaLabel","parent":{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"},"declarations":[{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"}],"required":false,"type":{"name":"string"}},"ariaLabelledById":{"defaultValue":null,"description":"Sets aria-labelledby of the stepper. ariaLabel or ariaLabelledById MUST be set!","name":"ariaLabelledById","parent":{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"},"declarations":[{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"}],"required":false,"type":{"name":"string"}},"value":{"defaultValue":null,"description":"Current value. Must be between min and max","name":"value","parent":{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"},"declarations":[{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"}],"required":false,"type":{"name":"number"}},"min":{"defaultValue":{"value":"0"},"description":"Minimum value","name":"min","parent":{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"},"declarations":[{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"}],"required":false,"type":{"name":"number"}},"max":{"defaultValue":{"value":"2"},"description":"Maximum value","name":"max","parent":{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"},"declarations":[{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"}],"required":false,"type":{"name":"number"}},"testId":{"defaultValue":null,"description":"Sets the data-testid attribute.","name":"testId","parent":{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"},"declarations":[{"fileName":"src/components/Stepper/Stepper.tsx","name":"StepperProps"}],"required":false,"type":{"name":"string"}}}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/index.tsx"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import o,{useRef as D}from"react";import b from"classnames";import l from"./styles.module.scss";import{AnalyticsId as v}from"../../constants.js";import{useSize as A}from"../../hooks/useSize.js";import{getAriaLabelAttributes as R}from"../../utils/accessibility.js";import"../../utils/debounce.js";const S=4,M=24,$=8,x=(e,t)=>e<t?e:t-1,k=(e,t)=>t<e?e:t,I=(e,t,s)=>typeof e>"u"||e<t?t:e>s?s:e,W=e=>Math.floor(e/(M+S)),X=(e,t)=>(e-M)/(t-1),T=(e,t)=>e*t,L=(e,t)=>Array.from(Array(t-e+1),(s,a)=>a+e),C=(e,t,s)=>{const a=x(t,s),r=k(a,s);return{validatedValue:I(e,a,r),validatedMin:a,validatedMax:r}},F=({index:e,completed:t,distanceBetweenDots:s,position:a})=>{const r=b(l.stepper__dot,t&&l["stepper__dot--completed"],a&&l[`stepper__dot--${a}`]),i=!a&&typeof e<"u"&&typeof s<"u"?{left:`${e*s+$}px`}:void 0;return o.createElement("span",{className:r,style:i,"data-testid":"dot"})},f=F,K=({allowedValues:e,currentValue:t,distanceBetweenDots:s})=>o.createElement(o.Fragment,null,e.map((a,r)=>o.createElement(f,{index:r,key:a,completed:a<t,distanceBetweenDots:s}))),O=K,z=({ariaLabelledById:e,ariaLabel:t,value:s,min:a=0,max:r=2,testId:p})=>{const i=D(null),_=D(null),{width:h=0}=A(i)||{},{width:g=0}=A(_)||{},{validatedValue:n,validatedMin:m,validatedMax:c}=C(s,a,r),d=L(m,c),V=d.indexOf(n),w=W(h),E=X(g,d.length),y=T(E,V),u=d.length<=w,P=n===c,N=R({label:t,id:e});return o.createElement("div",{className:l["stepper-wrapper"],ref:i},o.createElement("span",{role:"progressbar",...N,"aria-valuenow":n,"aria-valuemin":m,"aria-valuemax":c,className:l.stepper,style:{backgroundPositionX:`${P?g:y}px`},ref:_,"data-testid":p,"data-analyticsid":v.Stepper},u&&o.createElement(O,{allowedValues:d,currentValue:n,distanceBetweenDots:E}),!u&&o.createElement(o.Fragment,null,o.createElement(f,{completed:n>m,position:"left"}),o.createElement(f,{completed:n===c,position:"right"})),o.createElement("span",{className:l.stepper__marker,style:{left:`${y}px`}})),!u&&o.createElement("span",{className:l.stepper__number},`${n}/${c}`))},U=z;export{U as default};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../src/components/Stepper/utils.ts","../../../src/components/Stepper/Dot.tsx","../../../src/components/Stepper/DotList.tsx","../../../src/components/Stepper/Stepper.tsx"],"sourcesContent":["/**\n * Minimum avstand fra markør til prikk\n */\nconst MARKER_DOT_MIN_DISTANCE_PX = 4;\n\n/**\n * Bredde på markør\n */\nconst MARKER_WIDTH_PX = 24;\n\n/**\n * Horisontal padding på stepper\n */\nexport const STEPPER_PADDING_X_PX = 8;\n\n/**\n * Valider at minimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi\n */\nexport const getValidatedMin = (min: number, max: number): number => (min < max ? min : max - 1);\n\n/**\n * Valider at maksimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Maksimum-verdi, ikke mindre enn minimum-verdi\n */\nexport const getValidatedMax = (min: number, max: number): number => (max < min ? min : max);\n\n/**\n * Valider at verdi er innenfor gyldig område\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Verdi, ikke mindre enn 0, ikke mer enn max\n */\nexport const getValidatedValue = (value: number | undefined, min: number, max: number): number => {\n if (typeof value === 'undefined' || value < min) {\n return min;\n }\n\n return value > max ? max : value;\n};\n\n/**\n * Finn antall prikker det er plass til\n * @param stepperWidth Bredde på stepper\n * @returns Antall prikker\n */\nexport const getMaximumDots = (stepperWidth: number): number => Math.floor(stepperWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));\n\n/**\n * Beregn riktig distance mellom prikker\n * @param stepperWidth Bredde på stepper\n * @param dots Antall prikker som skal vises\n * @returns Distanse mellom prikker\n */\nexport const getDistanceBetweenDots = (stepperWidth: number, dots: number): number => (stepperWidth - MARKER_WIDTH_PX) / (dots - 1);\n\n/**\n * Beregn riktig plassering av markør\n * @param distanceBetweenDots Distanse mellom prikker\n * @param index Nåværende verdi i stepper\n * @returns Plassering til markør fra venstre\n */\nexport const getMarkerPosition = (distanceBetweenDots: number, index: number): number => distanceBetweenDots * index;\n\n/**\n * Lag liste med tillate verdier fra min til maks\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Liste med verdier\n */\nexport const getAllowedValues = (min: number, max: number): number[] => Array.from(Array(max - min + 1), (_, index) => index + min);\n\n/**\n * Valider props som skal brukes til beregning av posisjon m.m.\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Objekt med gyldige verdier\n */\nexport const getValidatedProps = (\n value: number | undefined,\n min: number,\n max: number\n): { validatedValue: number; validatedMin: number; validatedMax: number } => {\n const validatedMin = getValidatedMin(min, max);\n const validatedMax = getValidatedMax(validatedMin, max);\n const validatedValue = getValidatedValue(value, validatedMin, validatedMax);\n\n return { validatedValue, validatedMin, validatedMax };\n};\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { STEPPER_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.stepper__dot,\n completed && styles['stepper__dot--completed'],\n position && styles[`stepper__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + STEPPER_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n","import React from 'react';\n\nimport Dot from './Dot';\n\ninterface DotListProps {\n allowedValues: number[];\n currentValue: number;\n distanceBetweenDots: number;\n}\n\nconst Dots: React.FC<DotListProps> = ({ allowedValues, currentValue, distanceBetweenDots }) => (\n <>\n {allowedValues.map((value, index) => (\n <Dot index={index} key={value} completed={value < currentValue} distanceBetweenDots={distanceBetweenDots} />\n ))}\n </>\n);\n\nexport default Dots;\n","import React, { useRef } from 'react';\n\nimport Dot from './Dot';\nimport DotList from './DotList';\nimport { getMaximumDots, getDistanceBetweenDots, getMarkerPosition, getAllowedValues, getValidatedProps } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StepperProps {\n /**\n * Sets aria-label of the stepper. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the stepper. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Current value. Must be between min and max\n */\n value?: number;\n /**\n * Minimum value\n */\n min?: number;\n /**\n * Maximum value\n */\n max?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Stepper: React.FC<StepperProps> = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const ref = useRef<HTMLSpanElement>(null);\n const { width: wrapperWidth = 0 } = useSize(wrapperRef) || {};\n const { width: stepperWidth = 0 } = useSize(ref) || {};\n\n const { validatedValue, validatedMin, validatedMax } = getValidatedProps(value, min, max);\n const allowedValues = getAllowedValues(validatedMin, validatedMax);\n const index = allowedValues.indexOf(validatedValue);\n const maximumDots = getMaximumDots(wrapperWidth);\n const distanceBetweenDots = getDistanceBetweenDots(stepperWidth, allowedValues.length);\n const markerPosition = getMarkerPosition(distanceBetweenDots, index);\n\n const showAllDots = allowedValues.length <= maximumDots;\n const isCompleted = validatedValue === validatedMax;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n return (\n <div className={styles['stepper-wrapper']} ref={wrapperRef}>\n <span\n role=\"progressbar\"\n {...ariaLabelAttributes}\n aria-valuenow={validatedValue}\n aria-valuemin={validatedMin}\n aria-valuemax={validatedMax}\n className={styles.stepper}\n style={{\n backgroundPositionX: `${isCompleted ? stepperWidth : markerPosition}px`,\n }}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Stepper}\n >\n {showAllDots && <DotList allowedValues={allowedValues} currentValue={validatedValue} distanceBetweenDots={distanceBetweenDots} />}\n {!showAllDots && (\n <>\n <Dot completed={validatedValue > validatedMin} position=\"left\" />\n <Dot completed={validatedValue === validatedMax} position=\"right\" />\n </>\n )}\n <span className={styles.stepper__marker} style={{ left: `${markerPosition}px` }} />\n </span>\n {!showAllDots && <span className={styles.stepper__number}>{`${validatedValue}/${validatedMax}`}</span>}\n </div>\n );\n};\n\nexport default Stepper;\n"],"names":["MARKER_DOT_MIN_DISTANCE_PX","MARKER_WIDTH_PX","STEPPER_PADDING_X_PX","getValidatedMin","min","max","getValidatedMax","getValidatedValue","value","getMaximumDots","stepperWidth","getDistanceBetweenDots","dots","getMarkerPosition","distanceBetweenDots","index","getAllowedValues","_","getValidatedProps","validatedMin","validatedMax","Dot","completed","position","classes","classNames","styles","style","Dot$1","Dots","allowedValues","currentValue","React","DotList","Stepper","ariaLabelledById","ariaLabel","testId","wrapperRef","useRef","ref","wrapperWidth","useSize","validatedValue","maximumDots","markerPosition","showAllDots","isCompleted","ariaLabelAttributes","getAriaLabelAttributes","AnalyticsId","Stepper$1"],"mappings":"wSAGA,MAAMA,EAA6B,EAK7BC,EAAkB,GAKXC,EAAuB,EAQvBC,EAAkB,CAACC,EAAaC,IAAyBD,EAAMC,EAAMD,EAAMC,EAAM,EAQjFC,EAAkB,CAACF,EAAaC,IAAyBA,EAAMD,EAAMA,EAAMC,EAS3EE,EAAoB,CAACC,EAA2BJ,EAAaC,IACpE,OAAOG,EAAU,KAAeA,EAAQJ,EACnCA,EAGFI,EAAQH,EAAMA,EAAMG,EAQhBC,EA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M,GAAGmB,KAAsB,CAAA,CAAA,CAAA,EAElF,CAACC,GAAgBd,EAAA,cAAA,OAAA,CAAK,UAAWN,EAAO,eAAkB,EAAA,GAAGiB,KAAkBvB,GAAe,CACjG,CAEJ,EAEA+B,EAAejB"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@import '../../scss/breakpoints';
|
|
3
|
+
@import '../../scss/spacers';
|
|
4
|
+
@import '../../scss/palette';
|
|
5
|
+
@import '../../scss/font-settings';
|
|
6
|
+
|
|
7
|
+
.stepper-wrapper {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
min-height: getSpacer(l);
|
|
11
|
+
|
|
12
|
+
@media (min-width: map.get($grid-breakpoints, md)) {
|
|
13
|
+
min-height: getSpacer(xl);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
$transition: 0.4s linear 0s;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Bredde og høyde på markør
|
|
21
|
+
*/
|
|
22
|
+
$marker-size: 24px;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Bredde og høyde på prikk
|
|
26
|
+
*/
|
|
27
|
+
$dot-size: 8px;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Høyde på stepper
|
|
31
|
+
*/
|
|
32
|
+
$stepper-height: 12px;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Horisontal padding på stepper
|
|
36
|
+
*/
|
|
37
|
+
$stepper-padding-x: 8px;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Avstand fra venstre kant av stepper til midten av første prikk
|
|
41
|
+
*/
|
|
42
|
+
$dot-offset: calc($stepper-padding-x + $dot-size / 2);
|
|
43
|
+
|
|
44
|
+
.stepper {
|
|
45
|
+
flex-grow: 1;
|
|
46
|
+
position: relative;
|
|
47
|
+
display: block;
|
|
48
|
+
height: $stepper-height;
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
background: linear-gradient(to right, $blueberry600, $blueberry600 $dot-offset, $blueberry50 $dot-offset, $blueberry50), $blueberry600;
|
|
51
|
+
background-repeat: no-repeat;
|
|
52
|
+
|
|
53
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
54
|
+
transition: background-position $transition;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&__marker {
|
|
58
|
+
position: absolute;
|
|
59
|
+
width: $marker-size;
|
|
60
|
+
height: $marker-size;
|
|
61
|
+
top: calc(($stepper-height - $marker-size) / 2);
|
|
62
|
+
background-color: $white;
|
|
63
|
+
border: 6px solid $blueberry600;
|
|
64
|
+
border-radius: 50%;
|
|
65
|
+
|
|
66
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
67
|
+
transition: left $transition;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&__number {
|
|
72
|
+
min-width: 2.5rem;
|
|
73
|
+
text-align: right;
|
|
74
|
+
margin-left: getSpacer(xs);
|
|
75
|
+
font-size: $font-size-xs;
|
|
76
|
+
line-height: $lineheight-size-xs;
|
|
77
|
+
font-weight: 700;
|
|
78
|
+
color: $blueberry700;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__dot {
|
|
82
|
+
position: absolute;
|
|
83
|
+
top: calc(($stepper-height - $dot-size) / 2);
|
|
84
|
+
width: $dot-size;
|
|
85
|
+
height: $dot-size;
|
|
86
|
+
background-color: $blueberry600;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
|
|
89
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
90
|
+
transition: background-color $transition;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&--completed {
|
|
94
|
+
background-color: $blueberry50;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&--left {
|
|
98
|
+
left: $dot-offset;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&--right {
|
|
102
|
+
right: $dot-offset;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type Styles = {
|
|
2
|
+
stepper: string;
|
|
3
|
+
stepper__dot: string;
|
|
4
|
+
'stepper__dot--completed': string;
|
|
5
|
+
'stepper__dot--left': string;
|
|
6
|
+
'stepper__dot--right': string;
|
|
7
|
+
stepper__marker: string;
|
|
8
|
+
stepper__number: string;
|
|
9
|
+
'stepper-wrapper': string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type ClassNames = keyof Styles;
|
|
13
|
+
|
|
14
|
+
declare const styles: Styles;
|
|
15
|
+
|
|
16
|
+
export default styles;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Horisontal padding på
|
|
2
|
+
* Horisontal padding på stepper
|
|
3
3
|
*/
|
|
4
|
-
export declare const
|
|
4
|
+
export declare const STEPPER_PADDING_X_PX = 8;
|
|
5
5
|
/**
|
|
6
6
|
* Valider at minimum-verdi er innenfor gyldig område
|
|
7
7
|
* @param min Mimimum-verdi
|
|
@@ -26,21 +26,21 @@ export declare const getValidatedMax: (min: number, max: number) => number;
|
|
|
26
26
|
export declare const getValidatedValue: (value: number | undefined, min: number, max: number) => number;
|
|
27
27
|
/**
|
|
28
28
|
* Finn antall prikker det er plass til
|
|
29
|
-
* @param
|
|
29
|
+
* @param stepperWidth Bredde på stepper
|
|
30
30
|
* @returns Antall prikker
|
|
31
31
|
*/
|
|
32
|
-
export declare const getMaximumDots: (
|
|
32
|
+
export declare const getMaximumDots: (stepperWidth: number) => number;
|
|
33
33
|
/**
|
|
34
34
|
* Beregn riktig distance mellom prikker
|
|
35
|
-
* @param
|
|
35
|
+
* @param stepperWidth Bredde på stepper
|
|
36
36
|
* @param dots Antall prikker som skal vises
|
|
37
37
|
* @returns Distanse mellom prikker
|
|
38
38
|
*/
|
|
39
|
-
export declare const getDistanceBetweenDots: (
|
|
39
|
+
export declare const getDistanceBetweenDots: (stepperWidth: number, dots: number) => number;
|
|
40
40
|
/**
|
|
41
41
|
* Beregn riktig plassering av markør
|
|
42
42
|
* @param distanceBetweenDots Distanse mellom prikker
|
|
43
|
-
* @param index Nåværende verdi i
|
|
43
|
+
* @param index Nåværende verdi i stepper
|
|
44
44
|
* @returns Plassering til markør fra venstre
|
|
45
45
|
*/
|
|
46
46
|
export declare const getMarkerPosition: (distanceBetweenDots: number, index: number) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Stepper/utils.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,OAAO,MAAM,KAAG,MAAqC,CAAC;AAEjG;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,MAAM,OAAO,MAAM,KAAG,MAAiC,CAAC;AAE7F;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UAAW,MAAM,GAAG,SAAS,OAAO,MAAM,OAAO,MAAM,KAAG,MAMvF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,iBAAkB,MAAM,KAAG,MAAmF,CAAC;AAE1I;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,iBAAkB,MAAM,QAAQ,MAAM,KAAG,MAAuD,CAAC;AAEpI;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,wBAAyB,MAAM,SAAS,MAAM,KAAG,MAAqC,CAAC;AAErH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,QAAS,MAAM,OAAO,MAAM,KAAG,MAAM,EAAiE,CAAC;AAEpI;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,UACrB,MAAM,GAAG,SAAS,OACpB,MAAM,OACN,MAAM;oBACQ,MAAM;kBAAgB,MAAM;kBAAgB,MAAM;CAMtE,CAAC"}
|