@helsenorge/designsystem-react 13.0.0-beta.2 → 13.0.0-beta.4
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/AlertSignFill.js +17 -0
- package/AlertSignFill.js.map +1 -0
- package/AlertSignStroke.js +17 -0
- package/AlertSignStroke.js.map +1 -0
- package/AnchorLink.js +49 -63
- package/AnchorLink.js.map +1 -1
- package/ArrowDown.js +29 -0
- package/ArrowDown.js.map +1 -0
- package/ArrowRight.js +17 -0
- package/ArrowRight.js.map +1 -0
- package/ArrowUp.js +29 -0
- package/ArrowUp.js.map +1 -0
- package/ArrowUpRight.js +17 -0
- package/ArrowUpRight.js.map +1 -0
- package/AsChildSlot.js +64 -0
- package/AsChildSlot.js.map +1 -0
- package/Avatar.js +28 -37
- package/Avatar.js.map +1 -1
- package/BabyMobileMedium.js +264 -0
- package/BabyMobileMedium.js.map +1 -0
- package/Badge.js +28 -32
- package/Badge.js.map +1 -1
- package/Button.js +124 -173
- package/Button.js.map +1 -1
- package/CHANGELOG.md +171 -0
- package/Calendar.js +29 -0
- package/Calendar.js.map +1 -0
- package/Check.js +17 -0
- package/Check.js.map +1 -0
- package/CheckFill.js +29 -0
- package/CheckFill.js.map +1 -0
- package/CheckOutline.js +15 -0
- package/CheckOutline.js.map +1 -0
- package/Checkbox.js +114 -131
- package/Checkbox.js.map +1 -1
- package/Checkbox2.js +5 -0
- package/Checkbox2.js.map +1 -0
- package/ChevronDown.js +17 -0
- package/ChevronDown.js.map +1 -0
- package/ChevronLeft.js +17 -0
- package/ChevronLeft.js.map +1 -0
- package/ChevronRight.js +17 -0
- package/ChevronRight.js.map +1 -0
- package/ChevronUp.js +17 -0
- package/ChevronUp.js.map +1 -0
- package/ChildMedium.js +127 -0
- package/ChildMedium.js.map +1 -0
- package/Close.js +41 -47
- package/Close.js.map +1 -1
- package/DictionaryTrigger.js +20 -25
- package/DictionaryTrigger.js.map +1 -1
- package/DoctorMedium.js +55 -0
- package/DoctorMedium.js.map +1 -0
- package/DoctorSmall.js +65 -0
- package/DoctorSmall.js.map +1 -0
- package/Drawer.js +221 -188
- package/Drawer.js.map +1 -1
- package/Duolist.js +69 -87
- package/Duolist.js.map +1 -1
- package/ElementHeader.js +142 -141
- package/ElementHeader.js.map +1 -1
- package/ElementHeaderText.js +29 -31
- package/ElementHeaderText.js.map +1 -1
- package/EmptyBox.js +17 -0
- package/EmptyBox.js.map +1 -0
- package/ErrorSignFill.js +17 -0
- package/ErrorSignFill.js.map +1 -0
- package/ErrorWrapper.js +21 -12
- package/ErrorWrapper.js.map +1 -1
- package/Expander.js +105 -129
- package/Expander.js.map +1 -1
- package/FacialRecognitionFingerprintMedium.js +200 -0
- package/FacialRecognitionFingerprintMedium.js.map +1 -0
- package/FormFieldTag.js +44 -41
- package/FormFieldTag.js.map +1 -1
- package/FormGroup.js +131 -155
- package/FormGroup.js.map +1 -1
- package/FormLayout.js +38 -46
- package/FormLayout.js.map +1 -1
- package/Forward.js +17 -0
- package/Forward.js.map +1 -0
- package/GiveBabyFoodMedium.js +241 -0
- package/GiveBabyFoodMedium.js.map +1 -0
- package/HN.Designsystem.Dropdown.nb-NO.js +5 -0
- package/HN.Designsystem.Dropdown.nb-NO.js.map +1 -0
- package/HandWaving.js +9 -0
- package/HandWaving.js.map +1 -0
- package/HealthcarePersonnelMedium.js +149 -0
- package/HealthcarePersonnelMedium.js.map +1 -0
- package/HealthcarePersonnelSmall.js +150 -0
- package/HealthcarePersonnelSmall.js.map +1 -0
- package/HelpDetails.js +51 -62
- package/HelpDetails.js.map +1 -1
- package/HelpTriggerIcon.js +99 -120
- package/HelpTriggerIcon.js.map +1 -1
- package/HelpTriggerStandalone.js +41 -38
- package/HelpTriggerStandalone.js.map +1 -1
- package/HighlightPanel.js +75 -64
- package/HighlightPanel.js.map +1 -1
- package/Highlighter.js +42 -41
- package/Highlighter.js.map +1 -1
- package/HorizontalScroll.js +45 -56
- package/HorizontalScroll.js.map +1 -1
- package/Icon.js +45 -70
- package/Icon.js.map +1 -1
- package/Illustration.js +48 -45
- package/Illustration.js.map +1 -1
- package/IllustrationNames.js +31 -0
- package/IllustrationNames.js.map +1 -0
- package/InfoSignFill.js +17 -0
- package/InfoSignFill.js.map +1 -0
- package/InfoTeaser.js +74 -68
- package/InfoTeaser.js.map +1 -1
- package/Input.js +169 -201
- package/Input.js.map +1 -1
- package/Input2.js +5 -0
- package/Input2.js.map +1 -0
- package/Label.js +128 -130
- package/Label.js.map +1 -1
- package/LazyIcon.js +377 -31
- package/LazyIcon.js.map +1 -1
- package/LazyIllustration.js +65 -34
- package/LazyIllustration.js.map +1 -1
- package/LinkList.js +121 -144
- package/LinkList.js.map +1 -1
- package/List.js +18 -11
- package/List.js.map +1 -1
- package/ListEditMode.js +38 -37
- package/ListEditMode.js.map +1 -1
- package/MaxCharacters.js +21 -14
- package/MaxCharacters.js.map +1 -1
- package/NotificationBadge.js +51 -66
- package/NotificationBadge.js.map +1 -1
- package/Panel.js +243 -241
- package/Panel.js.map +1 -1
- package/PanelOld.js +322 -0
- package/PanelOld.js.map +1 -0
- package/PanelTitle.js +32 -17
- package/PanelTitle.js.map +1 -1
- package/Pencil.js +27 -0
- package/Pencil.js.map +1 -0
- package/PlusSmall.js +17 -0
- package/PlusSmall.js.map +1 -0
- package/PopOver.js +64 -76
- package/PopOver.js.map +1 -1
- package/Portal.js +26 -0
- package/Portal.js.map +1 -0
- package/RadioButton.js +86 -114
- package/RadioButton.js.map +1 -1
- package/RadioButton2.js +5 -0
- package/RadioButton2.js.map +1 -0
- package/ReadLettersMedium.js +79 -0
- package/ReadLettersMedium.js.map +1 -0
- package/Select.js +74 -96
- package/Select.js.map +1 -1
- package/SingleSelectItem.js +99 -0
- package/SingleSelectItem.js.map +1 -0
- package/Slider.js +265 -301
- package/Slider.js.map +1 -1
- package/Spacer.js +28 -29
- package/Spacer.js.map +1 -1
- package/StatusDot.js +147 -103
- package/StatusDot.js.map +1 -1
- package/StatusDotList.js +30 -24
- package/StatusDotList.js.map +1 -1
- package/StepButtons.js +36 -29
- package/StepButtons.js.map +1 -1
- package/StrollerMedium.js +220 -0
- package/StrollerMedium.js.map +1 -0
- package/Support2Medium.js +159 -0
- package/Support2Medium.js.map +1 -0
- package/TabList.js +185 -185
- package/TabList.js.map +1 -1
- package/TabPanel.js +14 -12
- package/TabPanel.js.map +1 -1
- package/Table.js +117 -156
- package/Table.js.map +1 -1
- package/TableBody.js +13 -10
- package/TableBody.js.map +1 -1
- package/TableCell.js +21 -32
- package/TableCell.js.map +1 -1
- package/TableExpandedRow.js +29 -36
- package/TableExpandedRow.js.map +1 -1
- package/TableExpanderCell.js +24 -32
- package/TableExpanderCell.js.map +1 -1
- package/TableHead.js +24 -26
- package/TableHead.js.map +1 -1
- package/TableHeadCell.js +52 -49
- package/TableHeadCell.js.map +1 -1
- package/TableRow.js +42 -59
- package/TableRow.js.map +1 -1
- package/Textarea.js +107 -142
- package/Textarea.js.map +1 -1
- package/Title.js +33 -27
- package/Title.js.map +1 -1
- package/Title2.js +5 -0
- package/Title2.js.map +1 -0
- package/Toast.js +46 -0
- package/Toast.js.map +1 -0
- package/TriangleX.js +33 -0
- package/TriangleX.js.map +1 -0
- package/Undo.js +37 -0
- package/Undo.js.map +1 -0
- package/VerticalDots.js +17 -0
- package/VerticalDots.js.map +1 -0
- package/Watch.js +29 -0
- package/Watch.js.map +1 -0
- package/X.js +19 -0
- package/X.js.map +1 -0
- package/__mocks__/IntersectionObserver.js +9 -14
- package/__mocks__/IntersectionObserver.js.map +1 -1
- package/__mocks__/MutationObserver.js +8 -12
- package/__mocks__/MutationObserver.js.map +1 -1
- package/__mocks__/ResizeObserver.js +9 -14
- package/__mocks__/ResizeObserver.js.map +1 -1
- package/__mocks__/matchMedia.js +9 -10
- package/__mocks__/matchMedia.js.map +1 -1
- package/__mocks__/useLayoutEvent.js +3 -4
- package/__mocks__/useLayoutEvent.js.map +1 -1
- package/__mocks__/useOutsideEvent.js +3 -4
- package/__mocks__/useOutsideEvent.js.map +1 -1
- package/__mocks__/usePseudoClasses.js +9 -6
- package/__mocks__/usePseudoClasses.js.map +1 -1
- package/__mocks__/useSize.js +10 -11
- package/__mocks__/useSize.js.map +1 -1
- package/__mocks__/uuid.js +8 -8
- package/__mocks__/uuid.js.map +1 -1
- package/_rolldown_dynamic_import_helper.js +28 -0
- package/_rolldown_dynamic_import_helper.js.map +1 -0
- package/accessibility.js +17 -0
- package/accessibility.js.map +1 -0
- package/color.js +10 -0
- package/color.js.map +1 -0
- package/component.js +10 -0
- package/component.js.map +1 -0
- package/components/AnchorLink/index.js +13 -5
- package/components/ArticleTeaser/index.js +45 -61
- package/components/ArticleTeaser/index.js.map +1 -1
- package/components/ArticleTeaser/styles.module.scss +3 -5
- package/components/AsChildSlot/AsChildSlot.d.ts +23 -0
- package/components/AsChildSlot/AsChildSlot.test.d.ts +1 -0
- package/components/AsChildSlot/index.d.ts +3 -0
- package/components/AsChildSlot/index.js +3 -0
- package/components/AsChildSlot/styles.module.scss +13 -0
- package/components/AsChildSlot/styles.module.scss.d.ts +9 -0
- package/components/Avatar/index.js +6 -7
- package/components/Badge/index.js +10 -5
- package/components/Button/index.js +19 -5
- package/components/Button/styles.module.scss +69 -25
- package/components/Checkbox/index.js +47 -6
- package/components/Checkbox/styles.module.scss +11 -0
- package/components/Chip/index.js +53 -49
- package/components/Chip/index.js.map +1 -1
- package/components/Close/index.js +10 -5
- package/components/DictionaryTrigger/index.js +3 -5
- package/components/Drawer/index.js +39 -5
- package/components/Drawer/styles.module.scss +58 -38
- package/components/Drawer/styles.module.scss.d.ts +5 -0
- package/components/Dropdown/Dropdown.d.ts +19 -21
- package/components/Dropdown/Dropdown.test.d.ts +1 -0
- package/components/Dropdown/SingleSelect/SingleSelect.d.ts +18 -0
- package/components/Dropdown/SingleSelect/SingleSelect.test.d.ts +1 -0
- package/components/Dropdown/SingleSelect/SingleSelectItem.d.ts +21 -0
- package/components/Dropdown/SingleSelect/index.d.ts +3 -0
- package/components/Dropdown/SingleSelect/index.js +7 -0
- package/components/Dropdown/SingleSelect/index.js.map +1 -0
- package/components/Dropdown/SingleSelect/styles.module.scss +54 -0
- package/components/Dropdown/SingleSelect/styles.module.scss.d.ts +14 -0
- package/components/Dropdown/index.js +280 -197
- package/components/Dropdown/index.js.map +1 -1
- package/components/Dropdown/styles.module.scss +92 -136
- package/components/Dropdown/styles.module.scss.d.ts +8 -9
- package/components/DropdownOld/DropdownOld.d.ts +42 -0
- package/components/DropdownOld/index.d.ts +3 -0
- package/components/DropdownOld/index.js +204 -0
- package/components/DropdownOld/index.js.map +1 -0
- package/components/DropdownOld/resourceHelper.d.ts +3 -0
- package/components/DropdownOld/styles.module.scss +230 -0
- package/components/DropdownOld/styles.module.scss.d.ts +25 -0
- package/components/Duolist/index.js +6 -8
- package/components/ElementHeader/ElementHeaderText/index.js +13 -6
- package/components/ElementHeader/ElementHeaderText/index.js.map +1 -1
- package/components/ElementHeader/StatusDotList/index.js +36 -6
- package/components/ElementHeader/index.js +53 -9
- package/components/ElementHeader/index.js.map +1 -1
- package/components/EmptyState/index.js +277 -302
- package/components/EmptyState/index.js.map +1 -1
- package/components/ErrorWrapper/index.js +2 -6
- package/components/Expander/index.js +26 -7
- package/components/ExpanderHierarchy/index.js +86 -107
- package/components/ExpanderHierarchy/index.js.map +1 -1
- package/components/ExpanderList/index.js +236 -211
- package/components/ExpanderList/index.js.map +1 -1
- package/components/ExpanderList/styles.module.scss +82 -102
- package/components/EyebrowHeader/index.js +19 -10
- package/components/EyebrowHeader/index.js.map +1 -1
- package/components/FavoriteButton/index.js +137 -200
- package/components/FavoriteButton/index.js.map +1 -1
- package/components/FormFieldTag/FormFieldTag.d.ts +3 -1
- package/components/FormFieldTag/index.js +4 -5
- package/components/FormGroup/FormGroup.d.ts +1 -2
- package/components/FormGroup/index.js +60 -6
- package/components/FormGroup/index.js.map +1 -1
- package/components/FormLayout/index.js +3 -8
- package/components/HelpBubble/index.js +86 -87
- package/components/HelpBubble/index.js.map +1 -1
- package/components/HelpDrawer/index.js +63 -35
- package/components/HelpDrawer/index.js.map +1 -1
- package/components/HelpExpanderInline/index.js +23 -14
- package/components/HelpExpanderInline/index.js.map +1 -1
- package/components/HelpExpanderStandalone/index.js +48 -48
- package/components/HelpExpanderStandalone/index.js.map +1 -1
- package/components/HelpPanel/index.js +49 -19
- package/components/HelpPanel/index.js.map +1 -1
- package/components/HelpTeaser/index.js +28 -22
- package/components/HelpTeaser/index.js.map +1 -1
- package/components/HelpTooltip/index.js +40 -29
- package/components/HelpTooltip/index.js.map +1 -1
- package/components/HelpTriggerIcon/index.js +6 -7
- package/components/HelpTriggerInline/index.js +39 -36
- package/components/HelpTriggerInline/index.js.map +1 -1
- package/components/HelpTriggerStandalone/index.js +10 -5
- package/components/HighlightPanel/index.js +34 -5
- package/components/Highlighter/index.js +9 -6
- package/components/HorizontalScroll/index.js +7 -6
- package/components/Icon/index.js +3 -10
- package/components/Icons/ActiveMonitoring.js +13 -20
- package/components/Icons/ActiveMonitoring.js.map +1 -1
- package/components/Icons/AcupunctureBack.js +22 -22
- package/components/Icons/AcupunctureBack.js.map +1 -1
- package/components/Icons/AdditionalIconInformation.js +1344 -340
- package/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/components/Icons/AlarmClock.js +39 -34
- package/components/Icons/AlarmClock.js.map +1 -1
- package/components/Icons/AlertSignFill.js +4 -13
- package/components/Icons/AlertSignStroke.js +4 -13
- package/components/Icons/Amputation.js +7 -8
- package/components/Icons/Amputation.js.map +1 -1
- package/components/Icons/Anxiety.js +7 -8
- package/components/Icons/Anxiety.js.map +1 -1
- package/components/Icons/Apple.js +7 -8
- package/components/Icons/Apple.js.map +1 -1
- package/components/Icons/Archive.js +28 -35
- package/components/Icons/Archive.js.map +1 -1
- package/components/Icons/ArmFlexing.js +7 -8
- package/components/Icons/ArmFlexing.js.map +1 -1
- package/components/Icons/ArrowDown.js +4 -37
- package/components/Icons/ArrowLeft.js +16 -11
- package/components/Icons/ArrowLeft.js.map +1 -1
- package/components/Icons/ArrowRight.js +4 -13
- package/components/Icons/ArrowUp.js +4 -37
- package/components/Icons/ArrowUpRight.js +4 -13
- package/components/Icons/Attachment.js +26 -27
- package/components/Icons/Attachment.js.map +1 -1
- package/components/Icons/Atv.js +7 -8
- package/components/Icons/Atv.js.map +1 -1
- package/components/Icons/Avatar.js +16 -11
- package/components/Icons/Avatar.js.map +1 -1
- package/components/Icons/AwakePersonOnPillow.js +7 -8
- package/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/components/Icons/Baby.js +7 -8
- package/components/Icons/Baby.js.map +1 -1
- package/components/Icons/BandAid.js +7 -8
- package/components/Icons/BandAid.js.map +1 -1
- package/components/Icons/BeerAndPills.js +13 -20
- package/components/Icons/BeerAndPills.js.map +1 -1
- package/components/Icons/Bell.js +7 -8
- package/components/Icons/Bell.js.map +1 -1
- package/components/Icons/Bike.js +7 -8
- package/components/Icons/Bike.js.map +1 -1
- package/components/Icons/BirthControl.js +13 -20
- package/components/Icons/BirthControl.js.map +1 -1
- package/components/Icons/BirthdayCake.js +7 -8
- package/components/Icons/BirthdayCake.js.map +1 -1
- package/components/Icons/Boat.js +7 -8
- package/components/Icons/Boat.js.map +1 -1
- package/components/Icons/Body.js +13 -20
- package/components/Icons/Body.js.map +1 -1
- package/components/Icons/Braille.js +14 -9
- package/components/Icons/Braille.js.map +1 -1
- package/components/Icons/Brain.js +7 -8
- package/components/Icons/Brain.js.map +1 -1
- package/components/Icons/BreastReconstruction.js +13 -20
- package/components/Icons/BreastReconstruction.js.map +1 -1
- package/components/Icons/BreastRemoval.js +13 -20
- package/components/Icons/BreastRemoval.js.map +1 -1
- package/components/Icons/Breasts.js +7 -8
- package/components/Icons/Breasts.js.map +1 -1
- package/components/Icons/BrokenHeart.js +7 -8
- package/components/Icons/BrokenHeart.js.map +1 -1
- package/components/Icons/BrokenPuzzle.js +7 -8
- package/components/Icons/BrokenPuzzle.js.map +1 -1
- package/components/Icons/Bus.js +32 -30
- package/components/Icons/Bus.js.map +1 -1
- package/components/Icons/Calendar.js +4 -37
- package/components/Icons/CalendarChange.js +28 -35
- package/components/Icons/CalendarChange.js.map +1 -1
- package/components/Icons/CalendarCheck.js +28 -35
- package/components/Icons/CalendarCheck.js.map +1 -1
- package/components/Icons/CalendarEvent.js +7 -8
- package/components/Icons/CalendarEvent.js.map +1 -1
- package/components/Icons/CalendarSave.js +16 -11
- package/components/Icons/CalendarSave.js.map +1 -1
- package/components/Icons/Cancer.js +22 -23
- package/components/Icons/Cancer.js.map +1 -1
- package/components/Icons/Candle.js +20 -21
- package/components/Icons/Candle.js.map +1 -1
- package/components/Icons/Car.js +7 -8
- package/components/Icons/Car.js.map +1 -1
- package/components/Icons/Carton.js +28 -41
- package/components/Icons/Carton.js.map +1 -1
- package/components/Icons/Change.js +34 -44
- package/components/Icons/Change.js.map +1 -1
- package/components/Icons/Check.js +4 -13
- package/components/Icons/CheckFill.js +4 -37
- package/components/Icons/CheckOutline.js +2 -22
- package/components/Icons/Chest.js +7 -8
- package/components/Icons/Chest.js.map +1 -1
- package/components/Icons/ChevronDown.js +4 -13
- package/components/Icons/ChevronLeft.js +4 -13
- package/components/Icons/ChevronRight.js +4 -13
- package/components/Icons/ChevronUp.js +4 -13
- package/components/Icons/ChevronsDown.js +28 -35
- package/components/Icons/ChevronsDown.js.map +1 -1
- package/components/Icons/ChevronsUp.js +28 -35
- package/components/Icons/ChevronsUp.js.map +1 -1
- package/components/Icons/ChildPlaying.js +8 -15
- package/components/Icons/ChildPlaying.js.map +1 -1
- package/components/Icons/Cigarette.js +7 -8
- package/components/Icons/Cigarette.js.map +1 -1
- package/components/Icons/Coins.js +13 -20
- package/components/Icons/Coins.js.map +1 -1
- package/components/Icons/Contacts.js +16 -11
- package/components/Icons/Contacts.js.map +1 -1
- package/components/Icons/Copy.js +28 -23
- package/components/Icons/Copy.js.map +1 -1
- package/components/Icons/CoronaCertificate.js +13 -20
- package/components/Icons/CoronaCertificate.js.map +1 -1
- package/components/Icons/Coronavirus.js +7 -8
- package/components/Icons/Coronavirus.js.map +1 -1
- package/components/Icons/Cough.js +7 -8
- package/components/Icons/Cough.js.map +1 -1
- package/components/Icons/CreditCard.js +146 -47
- package/components/Icons/CreditCard.js.map +1 -1
- package/components/Icons/CriticalHealthInfo.js +7 -8
- package/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/components/Icons/Cross.js +7 -8
- package/components/Icons/Cross.js.map +1 -1
- package/components/Icons/DataExchange.js +13 -20
- package/components/Icons/DataExchange.js.map +1 -1
- package/components/Icons/DataReceived.js +13 -20
- package/components/Icons/DataReceived.js.map +1 -1
- package/components/Icons/DataSent.js +13 -20
- package/components/Icons/DataSent.js.map +1 -1
- package/components/Icons/Depression.js +7 -8
- package/components/Icons/Depression.js.map +1 -1
- package/components/Icons/DigestiveSystem.js +8 -15
- package/components/Icons/DigestiveSystem.js.map +1 -1
- package/components/Icons/Dizzy.js +7 -8
- package/components/Icons/Dizzy.js.map +1 -1
- package/components/Icons/Documents.js +7 -8
- package/components/Icons/Documents.js.map +1 -1
- package/components/Icons/Dog.js +7 -8
- package/components/Icons/Dog.js.map +1 -1
- package/components/Icons/DonorCard.js +7 -8
- package/components/Icons/DonorCard.js.map +1 -1
- package/components/Icons/DotActive.js +22 -14
- package/components/Icons/DotActive.js.map +1 -1
- package/components/Icons/DotAlert.js +22 -28
- package/components/Icons/DotAlert.js.map +1 -1
- package/components/Icons/DotCancelled.js +22 -28
- package/components/Icons/DotCancelled.js.map +1 -1
- package/components/Icons/DotHalfDisc.js +22 -28
- package/components/Icons/DotHalfDisc.js.map +1 -1
- package/components/Icons/DotInactive.js +22 -28
- package/components/Icons/DotInactive.js.map +1 -1
- package/components/Icons/DotInfo.js +39 -37
- package/components/Icons/DotInfo.js.map +1 -1
- package/components/Icons/DotLookingGlass.js +22 -28
- package/components/Icons/DotLookingGlass.js.map +1 -1
- package/components/Icons/DotPending.js +14 -14
- package/components/Icons/DotPending.js.map +1 -1
- package/components/Icons/DotQuestionMark.js +22 -28
- package/components/Icons/DotQuestionMark.js.map +1 -1
- package/components/Icons/DotSuccess.js +22 -28
- package/components/Icons/DotSuccess.js.map +1 -1
- package/components/Icons/DotTransparent.js +22 -28
- package/components/Icons/DotTransparent.js.map +1 -1
- package/components/Icons/DotWarningTriangle.js +22 -28
- package/components/Icons/DotWarningTriangle.js.map +1 -1
- package/components/Icons/Download.js +28 -35
- package/components/Icons/Download.js.map +1 -1
- package/components/Icons/Draft.js +7 -8
- package/components/Icons/Draft.js.map +1 -1
- package/components/Icons/Drag.js +15 -10
- package/components/Icons/Drag.js.map +1 -1
- package/components/Icons/EChat.js +16 -11
- package/components/Icons/EChat.js.map +1 -1
- package/components/Icons/Ear.js +15 -16
- package/components/Icons/Ear.js.map +1 -1
- package/components/Icons/EarDeaf.js +14 -9
- package/components/Icons/EarDeaf.js.map +1 -1
- package/components/Icons/EarHearingAid.js +15 -13
- package/components/Icons/EarHearingAid.js.map +1 -1
- package/components/Icons/EarNoseThroat.js +16 -17
- package/components/Icons/EarNoseThroat.js.map +1 -1
- package/components/Icons/EarVolume.js +24 -25
- package/components/Icons/EarVolume.js.map +1 -1
- package/components/Icons/Edit.js +23 -30
- package/components/Icons/Edit.js.map +1 -1
- package/components/Icons/ElderlyPerson.js +7 -8
- package/components/Icons/ElderlyPerson.js.map +1 -1
- package/components/Icons/Embolization.js +13 -20
- package/components/Icons/Embolization.js.map +1 -1
- package/components/Icons/EmergencyCall.js +22 -23
- package/components/Icons/EmergencyCall.js.map +1 -1
- package/components/Icons/EmoticonAnnoyed.js +25 -23
- package/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/components/Icons/EmoticonDelighted.js +25 -16
- package/components/Icons/EmoticonDelighted.js.map +1 -1
- package/components/Icons/EmoticonDisappointed.js +25 -16
- package/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/components/Icons/EmoticonHappy.js +25 -16
- package/components/Icons/EmoticonHappy.js.map +1 -1
- package/components/Icons/EmoticonMeh.js +25 -16
- package/components/Icons/EmoticonMeh.js.map +1 -1
- package/components/Icons/EmptyBox.js +2 -24
- package/components/Icons/EnterFullScreen.js +26 -21
- package/components/Icons/EnterFullScreen.js.map +1 -1
- package/components/Icons/Envelope.js +16 -11
- package/components/Icons/Envelope.js.map +1 -1
- package/components/Icons/Epilepsy.js +7 -8
- package/components/Icons/Epilepsy.js.map +1 -1
- package/components/Icons/Eraser.js +17 -18
- package/components/Icons/Eraser.js.map +1 -1
- package/components/Icons/ErrorSignFill.js +4 -13
- package/components/Icons/ErrorSignStroke.js +16 -11
- package/components/Icons/ErrorSignStroke.js.map +1 -1
- package/components/Icons/EuropeanHealthCard.js +8 -12
- package/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/components/Icons/ExitFullScreen.js +26 -21
- package/components/Icons/ExitFullScreen.js.map +1 -1
- package/components/Icons/Eye.js +35 -36
- package/components/Icons/Eye.js.map +1 -1
- package/components/Icons/Facebook.js +7 -8
- package/components/Icons/Facebook.js.map +1 -1
- package/components/Icons/FallingLeaf.js +26 -30
- package/components/Icons/FallingLeaf.js.map +1 -1
- package/components/Icons/Feedback.js +20 -24
- package/components/Icons/Feedback.js.map +1 -1
- package/components/Icons/Female.js +7 -8
- package/components/Icons/Female.js.map +1 -1
- package/components/Icons/FemaleDoctor.js +7 -8
- package/components/Icons/FemaleDoctor.js.map +1 -1
- package/components/Icons/Ferry.js +7 -8
- package/components/Icons/Ferry.js.map +1 -1
- package/components/Icons/File.js +28 -35
- package/components/Icons/File.js.map +1 -1
- package/components/Icons/Filter.js +26 -30
- package/components/Icons/Filter.js.map +1 -1
- package/components/Icons/FingerBleed.js +7 -8
- package/components/Icons/FingerBleed.js.map +1 -1
- package/components/Icons/FirstAidKit.js +7 -8
- package/components/Icons/FirstAidKit.js.map +1 -1
- package/components/Icons/Fish.js +30 -43
- package/components/Icons/Fish.js.map +1 -1
- package/components/Icons/FloppyDisk.js +13 -20
- package/components/Icons/FloppyDisk.js.map +1 -1
- package/components/Icons/Football.js +7 -8
- package/components/Icons/Football.js.map +1 -1
- package/components/Icons/Form.js +16 -11
- package/components/Icons/Form.js.map +1 -1
- package/components/Icons/Forward.js +4 -19
- package/components/Icons/Gallery.js +28 -35
- package/components/Icons/Gallery.js.map +1 -1
- package/components/Icons/Garden.js +7 -8
- package/components/Icons/Garden.js.map +1 -1
- package/components/Icons/GasCan.js +7 -8
- package/components/Icons/GasCan.js.map +1 -1
- package/components/Icons/GenderIdentity.js +13 -20
- package/components/Icons/GenderIdentity.js.map +1 -1
- package/components/Icons/GlassWater.js +13 -20
- package/components/Icons/GlassWater.js.map +1 -1
- package/components/Icons/Glasses.js +22 -23
- package/components/Icons/Glasses.js.map +1 -1
- package/components/Icons/Globe.js +16 -11
- package/components/Icons/Globe.js.map +1 -1
- package/components/Icons/Grain.js +13 -20
- package/components/Icons/Grain.js.map +1 -1
- package/components/Icons/Graph.js +21 -28
- package/components/Icons/Graph.js.map +1 -1
- package/components/Icons/Group.js +34 -37
- package/components/Icons/Group.js.map +1 -1
- package/components/Icons/GroupTwins.js +61 -83
- package/components/Icons/GroupTwins.js.map +1 -1
- package/components/Icons/HTMLFile.js +23 -16
- package/components/Icons/HTMLFile.js.map +1 -1
- package/components/Icons/HandWaving.js +2 -10
- package/components/Icons/HandWithDisease.js +7 -8
- package/components/Icons/HandWithDisease.js.map +1 -1
- package/components/Icons/HandsAndHeart.js +20 -21
- package/components/Icons/HandsAndHeart.js.map +1 -1
- package/components/Icons/HealthClinic.js +13 -20
- package/components/Icons/HealthClinic.js.map +1 -1
- package/components/Icons/HealthMeasurements.js +15 -22
- package/components/Icons/HealthMeasurements.js.map +1 -1
- package/components/Icons/HealthWarning.js +13 -20
- package/components/Icons/HealthWarning.js.map +1 -1
- package/components/Icons/HealthcarePerson.js +57 -76
- package/components/Icons/HealthcarePerson.js.map +1 -1
- package/components/Icons/HealthcarePersonell.js +68 -99
- package/components/Icons/HealthcarePersonell.js.map +1 -1
- package/components/Icons/HearingProtection.js +23 -30
- package/components/Icons/HearingProtection.js.map +1 -1
- package/components/Icons/Heart.js +16 -11
- package/components/Icons/Heart.js.map +1 -1
- package/components/Icons/HeartHands.js +50 -75
- package/components/Icons/HeartHands.js.map +1 -1
- package/components/Icons/HelpSign.js +16 -11
- package/components/Icons/HelpSign.js.map +1 -1
- package/components/Icons/HelpingHand.js +13 -20
- package/components/Icons/HelpingHand.js.map +1 -1
- package/components/Icons/Hemodialysis.js +13 -20
- package/components/Icons/Hemodialysis.js.map +1 -1
- package/components/Icons/Hiker.js +7 -8
- package/components/Icons/Hiker.js.map +1 -1
- package/components/Icons/Hipprosthesis.js +13 -20
- package/components/Icons/Hipprosthesis.js.map +1 -1
- package/components/Icons/History.js +16 -11
- package/components/Icons/History.js.map +1 -1
- package/components/Icons/HivAndAids.js +7 -8
- package/components/Icons/HivAndAids.js.map +1 -1
- package/components/Icons/Home.js +28 -35
- package/components/Icons/Home.js.map +1 -1
- package/components/Icons/HomeFill.js +32 -39
- package/components/Icons/HomeFill.js.map +1 -1
- package/components/Icons/Hormone.js +7 -8
- package/components/Icons/Hormone.js.map +1 -1
- package/components/Icons/Hospital.js +28 -35
- package/components/Icons/Hospital.js.map +1 -1
- package/components/Icons/Hourglass.js +28 -35
- package/components/Icons/Hourglass.js.map +1 -1
- package/components/Icons/IconNames.js +341 -342
- package/components/Icons/IconNames.js.map +1 -1
- package/components/Icons/ImgFile.js +13 -20
- package/components/Icons/ImgFile.js.map +1 -1
- package/components/Icons/Inbox.js +11 -18
- package/components/Icons/Inbox.js.map +1 -1
- package/components/Icons/InfoSignFill.js +4 -13
- package/components/Icons/InfoSignStroke.js +16 -11
- package/components/Icons/InfoSignStroke.js.map +1 -1
- package/components/Icons/Instagram.js +12 -16
- package/components/Icons/Instagram.js.map +1 -1
- package/components/Icons/Intravenous.js +13 -20
- package/components/Icons/Intravenous.js.map +1 -1
- package/components/Icons/JointPain.js +7 -8
- package/components/Icons/JointPain.js.map +1 -1
- package/components/Icons/Journal.js +16 -11
- package/components/Icons/Journal.js.map +1 -1
- package/components/Icons/JpgFile.js +13 -20
- package/components/Icons/JpgFile.js.map +1 -1
- package/components/Icons/Kidney.js +7 -8
- package/components/Icons/Kidney.js.map +1 -1
- package/components/Icons/KitchenScale.js +13 -20
- package/components/Icons/KitchenScale.js.map +1 -1
- package/components/Icons/Kjernejournal.js +7 -8
- package/components/Icons/Kjernejournal.js.map +1 -1
- package/components/Icons/Laboratory.js +13 -20
- package/components/Icons/Laboratory.js.map +1 -1
- package/components/Icons/LaptopBlog.js +7 -8
- package/components/Icons/LaptopBlog.js.map +1 -1
- package/components/Icons/LawBook.js +8 -12
- package/components/Icons/LawBook.js.map +1 -1
- package/components/Icons/LegalDocument.js +27 -34
- package/components/Icons/LegalDocument.js.map +1 -1
- package/components/Icons/LightBulb.js +7 -8
- package/components/Icons/LightBulb.js.map +1 -1
- package/components/Icons/List.js +28 -35
- package/components/Icons/List.js.map +1 -1
- package/components/Icons/Location.js +16 -14
- package/components/Icons/Location.js.map +1 -1
- package/components/Icons/LocationFill.js +32 -39
- package/components/Icons/LocationFill.js.map +1 -1
- package/components/Icons/Lock.js +22 -23
- package/components/Icons/Lock.js.map +1 -1
- package/components/Icons/Login.js +35 -60
- package/components/Icons/Login.js.map +1 -1
- package/components/Icons/Logout.js +33 -52
- package/components/Icons/Logout.js.map +1 -1
- package/components/Icons/Lungs.js +7 -8
- package/components/Icons/Lungs.js.map +1 -1
- package/components/Icons/Makeup.js +7 -8
- package/components/Icons/Makeup.js.map +1 -1
- package/components/Icons/MaleDoctor.js +7 -8
- package/components/Icons/MaleDoctor.js.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.js +16 -17
- package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/components/Icons/MaleDoctorCompact.js +41 -54
- package/components/Icons/MaleDoctorCompact.js.map +1 -1
- package/components/Icons/MaleDoctorCompactFill.js +33 -40
- package/components/Icons/MaleDoctorCompactFill.js.map +1 -1
- package/components/Icons/MaleGenitalia.js +7 -8
- package/components/Icons/MaleGenitalia.js.map +1 -1
- package/components/Icons/Medicine.js +28 -35
- package/components/Icons/Medicine.js.map +1 -1
- package/components/Icons/MedicineWarning.js +13 -20
- package/components/Icons/MedicineWarning.js.map +1 -1
- package/components/Icons/MentalHealthAdult.js +8 -15
- package/components/Icons/MentalHealthAdult.js.map +1 -1
- package/components/Icons/MentalHealthChild.js +8 -15
- package/components/Icons/MentalHealthChild.js.map +1 -1
- package/components/Icons/Menu.js +16 -11
- package/components/Icons/Menu.js.map +1 -1
- package/components/Icons/Microscope.js +13 -20
- package/components/Icons/Microscope.js.map +1 -1
- package/components/Icons/Minus.js +16 -11
- package/components/Icons/Minus.js.map +1 -1
- package/components/Icons/Mirror.js +7 -8
- package/components/Icons/Mirror.js.map +1 -1
- package/components/Icons/MobilePhone.js +16 -11
- package/components/Icons/MobilePhone.js.map +1 -1
- package/components/Icons/MotherHoldingBaby.js +7 -8
- package/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/components/Icons/MuscleBack.js +16 -17
- package/components/Icons/MuscleBack.js.map +1 -1
- package/components/Icons/MuscleLeg.js +8 -15
- package/components/Icons/MuscleLeg.js.map +1 -1
- package/components/Icons/Mushroom.js +7 -8
- package/components/Icons/Mushroom.js.map +1 -1
- package/components/Icons/Music.js +13 -20
- package/components/Icons/Music.js.map +1 -1
- package/components/Icons/MusselsAndSalt.js +7 -8
- package/components/Icons/MusselsAndSalt.js.map +1 -1
- package/components/Icons/NoAccess.js +47 -58
- package/components/Icons/NoAccess.js.map +1 -1
- package/components/Icons/NoEye.js +30 -37
- package/components/Icons/NoEye.js.map +1 -1
- package/components/Icons/NoFilter.js +17 -18
- package/components/Icons/NoFilter.js.map +1 -1
- package/components/Icons/Notepad.js +7 -8
- package/components/Icons/Notepad.js.map +1 -1
- package/components/Icons/Osteotomy.js +13 -20
- package/components/Icons/Osteotomy.js.map +1 -1
- package/components/Icons/PaintRoller.js +7 -8
- package/components/Icons/PaintRoller.js.map +1 -1
- package/components/Icons/PaperPlane.js +16 -11
- package/components/Icons/PaperPlane.js.map +1 -1
- package/components/Icons/PatientAndPerson.js +7 -8
- package/components/Icons/PatientAndPerson.js.map +1 -1
- package/components/Icons/Pause.js +16 -11
- package/components/Icons/Pause.js.map +1 -1
- package/components/Icons/PdfFile.js +13 -20
- package/components/Icons/PdfFile.js.map +1 -1
- package/components/Icons/Pencil.js +4 -29
- package/components/Icons/PeopleTalking.js +13 -20
- package/components/Icons/PeopleTalking.js.map +1 -1
- package/components/Icons/Peritonealdialysis.js +13 -20
- package/components/Icons/Peritonealdialysis.js.map +1 -1
- package/components/Icons/Person.js +7 -8
- package/components/Icons/Person.js.map +1 -1
- package/components/Icons/PersonAndPatient.js +7 -8
- package/components/Icons/PersonAndPatient.js.map +1 -1
- package/components/Icons/PersonCancel.js +64 -72
- package/components/Icons/PersonCancel.js.map +1 -1
- package/components/Icons/PersonInXRayMachine.js +13 -20
- package/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/components/Icons/PersonOverweight.js +7 -8
- package/components/Icons/PersonOverweight.js.map +1 -1
- package/components/Icons/PersonRelaxing.js +8 -15
- package/components/Icons/PersonRelaxing.js.map +1 -1
- package/components/Icons/PersonWithBrain.js +8 -12
- package/components/Icons/PersonWithBrain.js.map +1 -1
- package/components/Icons/PersonWithBrokenArm.js +7 -8
- package/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/components/Icons/PersonWithCrutches.js +7 -8
- package/components/Icons/PersonWithCrutches.js.map +1 -1
- package/components/Icons/PersonWithJaw.js +8 -15
- package/components/Icons/PersonWithJaw.js.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.js +8 -15
- package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/components/Icons/PersonWithSenses.js +20 -21
- package/components/Icons/PersonWithSenses.js.map +1 -1
- package/components/Icons/PersonWorking.js +8 -15
- package/components/Icons/PersonWorking.js.map +1 -1
- package/components/Icons/PersonalPlan.js +27 -40
- package/components/Icons/PersonalPlan.js.map +1 -1
- package/components/Icons/PizzaSlice.js +8 -15
- package/components/Icons/PizzaSlice.js.map +1 -1
- package/components/Icons/Plane.js +7 -8
- package/components/Icons/Plane.js.map +1 -1
- package/components/Icons/Plant.js +7 -8
- package/components/Icons/Plant.js.map +1 -1
- package/components/Icons/PlateKnifeFork.js +20 -39
- package/components/Icons/PlateKnifeFork.js.map +1 -1
- package/components/Icons/Play.js +28 -11
- package/components/Icons/Play.js.map +1 -1
- package/components/Icons/PlusLarge.js +16 -11
- package/components/Icons/PlusLarge.js.map +1 -1
- package/components/Icons/PlusSmall.js +4 -13
- package/components/Icons/PngFile.js +13 -20
- package/components/Icons/PngFile.js.map +1 -1
- package/components/Icons/Podcast.js +13 -20
- package/components/Icons/Podcast.js.map +1 -1
- package/components/Icons/PoisonInformation.js +8 -15
- package/components/Icons/PoisonInformation.js.map +1 -1
- package/components/Icons/Pregnant.js +7 -8
- package/components/Icons/Pregnant.js.map +1 -1
- package/components/Icons/Printer.js +28 -35
- package/components/Icons/Printer.js.map +1 -1
- package/components/Icons/Psychosis.js +7 -8
- package/components/Icons/Psychosis.js.map +1 -1
- package/components/Icons/Publication.js +13 -20
- package/components/Icons/Publication.js.map +1 -1
- package/components/Icons/Puzzle.js +8 -12
- package/components/Icons/Puzzle.js.map +1 -1
- package/components/Icons/QrCode.js +28 -35
- package/components/Icons/QrCode.js.map +1 -1
- package/components/Icons/Quarrel.js +13 -20
- package/components/Icons/Quarrel.js.map +1 -1
- package/components/Icons/RadioTherapy.js +13 -20
- package/components/Icons/RadioTherapy.js.map +1 -1
- package/components/Icons/RadioactiveTreatment.js +13 -20
- package/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/components/Icons/Radioiodine.js +13 -20
- package/components/Icons/Radioiodine.js.map +1 -1
- package/components/Icons/Receipt.js +7 -8
- package/components/Icons/Receipt.js.map +1 -1
- package/components/Icons/Receptionist.js +16 -11
- package/components/Icons/Receptionist.js.map +1 -1
- package/components/Icons/Recovery.js +13 -20
- package/components/Icons/Recovery.js.map +1 -1
- package/components/Icons/Referral.js +16 -11
- package/components/Icons/Referral.js.map +1 -1
- package/components/Icons/Refresh.js +16 -11
- package/components/Icons/Refresh.js.map +1 -1
- package/components/Icons/Refund.js +7 -8
- package/components/Icons/Refund.js.map +1 -1
- package/components/Icons/Reminder.js +28 -29
- package/components/Icons/Reminder.js.map +1 -1
- package/components/Icons/Reply.js +17 -18
- package/components/Icons/Reply.js.map +1 -1
- package/components/Icons/Rocket.js +7 -8
- package/components/Icons/Rocket.js.map +1 -1
- package/components/Icons/RtfFile.js +13 -20
- package/components/Icons/RtfFile.js.map +1 -1
- package/components/Icons/STDs.js +13 -20
- package/components/Icons/STDs.js.map +1 -1
- package/components/Icons/Save.js +25 -20
- package/components/Icons/Save.js.map +1 -1
- package/components/Icons/Scale.js +7 -8
- package/components/Icons/Scale.js.map +1 -1
- package/components/Icons/ScreenReader.js +41 -48
- package/components/Icons/ScreenReader.js.map +1 -1
- package/components/Icons/Search.js +16 -11
- package/components/Icons/Search.js.map +1 -1
- package/components/Icons/SectionSign.js +28 -35
- package/components/Icons/SectionSign.js.map +1 -1
- package/components/Icons/Settings.js +32 -39
- package/components/Icons/Settings.js.map +1 -1
- package/components/Icons/SettingsFill.js +32 -39
- package/components/Icons/SettingsFill.js.map +1 -1
- package/components/Icons/Sexualorientation.js +13 -20
- package/components/Icons/Sexualorientation.js.map +1 -1
- package/components/Icons/ShakingHand.js +10 -14
- package/components/Icons/ShakingHand.js.map +1 -1
- package/components/Icons/Share.js +17 -18
- package/components/Icons/Share.js.map +1 -1
- package/components/Icons/SharedHealthData.js +15 -22
- package/components/Icons/SharedHealthData.js.map +1 -1
- package/components/Icons/SharedHealthMeasurements.js +15 -22
- package/components/Icons/SharedHealthMeasurements.js.map +1 -1
- package/components/Icons/Shield.js +13 -20
- package/components/Icons/Shield.js.map +1 -1
- package/components/Icons/ShuntOperation.js +13 -20
- package/components/Icons/ShuntOperation.js.map +1 -1
- package/components/Icons/Skeleton.js +7 -8
- package/components/Icons/Skeleton.js.map +1 -1
- package/components/Icons/Skin.js +7 -8
- package/components/Icons/Skin.js.map +1 -1
- package/components/Icons/Snake.js +7 -8
- package/components/Icons/Snake.js.map +1 -1
- package/components/Icons/Snapchat.js +7 -11
- package/components/Icons/Snapchat.js.map +1 -1
- package/components/Icons/SortDown.js +46 -29
- package/components/Icons/SortDown.js.map +1 -1
- package/components/Icons/SortUp.js +46 -29
- package/components/Icons/SortUp.js.map +1 -1
- package/components/Icons/SpeechBubble.js +28 -35
- package/components/Icons/SpeechBubble.js.map +1 -1
- package/components/Icons/Spray.js +7 -8
- package/components/Icons/Spray.js.map +1 -1
- package/components/Icons/StickyNote.js +15 -22
- package/components/Icons/StickyNote.js.map +1 -1
- package/components/Icons/StickyNotes.js +15 -22
- package/components/Icons/StickyNotes.js.map +1 -1
- package/components/Icons/Stopwatch.js +28 -35
- package/components/Icons/Stopwatch.js.map +1 -1
- package/components/Icons/Sun.js +31 -32
- package/components/Icons/Sun.js.map +1 -1
- package/components/Icons/SupportingPerson.js +34 -50
- package/components/Icons/SupportingPerson.js.map +1 -1
- package/components/Icons/Surgery.js +13 -20
- package/components/Icons/Surgery.js.map +1 -1
- package/components/Icons/Sweets.js +28 -41
- package/components/Icons/Sweets.js.map +1 -1
- package/components/Icons/Syringe.js +22 -22
- package/components/Icons/Syringe.js.map +1 -1
- package/components/Icons/Taxi.js +7 -8
- package/components/Icons/Taxi.js.map +1 -1
- package/components/Icons/TeddyBear.js +7 -8
- package/components/Icons/TeddyBear.js.map +1 -1
- package/components/Icons/Teenagers.js +13 -20
- package/components/Icons/Teenagers.js.map +1 -1
- package/components/Icons/ThinkingAboutBaby.js +7 -8
- package/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/components/Icons/Ticket.js +7 -8
- package/components/Icons/Ticket.js.map +1 -1
- package/components/Icons/TimePassing.js +28 -35
- package/components/Icons/TimePassing.js.map +1 -1
- package/components/Icons/Toddler.js +7 -8
- package/components/Icons/Toddler.js.map +1 -1
- package/components/Icons/Tombstone.js +21 -28
- package/components/Icons/Tombstone.js.map +1 -1
- package/components/Icons/Toolbox.js +34 -53
- package/components/Icons/Toolbox.js.map +1 -1
- package/components/Icons/Tooth.js +7 -8
- package/components/Icons/Tooth.js.map +1 -1
- package/components/Icons/TotalKneeProsthesis.js +13 -20
- package/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/components/Icons/Train.js +7 -8
- package/components/Icons/Train.js.map +1 -1
- package/components/Icons/Transplantation.js +13 -20
- package/components/Icons/Transplantation.js.map +1 -1
- package/components/Icons/TrashCan.js +28 -35
- package/components/Icons/TrashCan.js.map +1 -1
- package/components/Icons/TravelRoute.js +40 -59
- package/components/Icons/TravelRoute.js.map +1 -1
- package/components/Icons/TreatmentAids.js +36 -40
- package/components/Icons/TreatmentAids.js.map +1 -1
- package/components/Icons/TriangleX.js +4 -41
- package/components/Icons/Twitter.js +7 -8
- package/components/Icons/Twitter.js.map +1 -1
- package/components/Icons/Undo.js +4 -51
- package/components/Icons/UniProsthesis.js +13 -20
- package/components/Icons/UniProsthesis.js.map +1 -1
- package/components/Icons/Upload.js +17 -18
- package/components/Icons/Upload.js.map +1 -1
- package/components/Icons/UserOrganization.js +7 -8
- package/components/Icons/UserOrganization.js.map +1 -1
- package/components/Icons/Vaccine.js +28 -35
- package/components/Icons/Vaccine.js.map +1 -1
- package/components/Icons/VerticalDots.js +4 -13
- package/components/Icons/VideoCamera.js +28 -35
- package/components/Icons/VideoCamera.js.map +1 -1
- package/components/Icons/VideoChat.js +16 -11
- package/components/Icons/VideoChat.js.map +1 -1
- package/components/Icons/Wallet.js +16 -11
- package/components/Icons/Wallet.js.map +1 -1
- package/components/Icons/Watch.js +4 -37
- package/components/Icons/Website.js +13 -20
- package/components/Icons/Website.js.map +1 -1
- package/components/Icons/Wheelchair.js +13 -20
- package/components/Icons/Wheelchair.js.map +1 -1
- package/components/Icons/WheelchairActive.js +13 -20
- package/components/Icons/WheelchairActive.js.map +1 -1
- package/components/Icons/Window.js +7 -8
- package/components/Icons/Window.js.map +1 -1
- package/components/Icons/WordDocument.js +10 -14
- package/components/Icons/WordDocument.js.map +1 -1
- package/components/Icons/WorkSuitcase.js +10 -14
- package/components/Icons/WorkSuitcase.js.map +1 -1
- package/components/Icons/X.js +4 -15
- package/components/Icons/XOutline.js +13 -20
- package/components/Icons/XOutline.js.map +1 -1
- package/components/Icons/XmlFile.js +13 -20
- package/components/Icons/XmlFile.js.map +1 -1
- package/components/Icons/YouTube.js +7 -8
- package/components/Icons/YouTube.js.map +1 -1
- package/components/Icons/Zoom.js +28 -35
- package/components/Icons/Zoom.js.map +1 -1
- package/components/Illustration/index.js +4 -8
- package/components/Illustrations/BabyMobile.js +17 -9
- package/components/Illustrations/BabyMobile.js.map +1 -1
- package/components/Illustrations/BabyMobileMedium.js +5 -424
- package/components/Illustrations/Child.js +17 -9
- package/components/Illustrations/Child.js.map +1 -1
- package/components/Illustrations/ChildMedium.js +5 -185
- package/components/Illustrations/Doctor.js +20 -11
- package/components/Illustrations/Doctor.js.map +1 -1
- package/components/Illustrations/DoctorMedium.js +2 -72
- package/components/Illustrations/DoctorSmall.js +2 -70
- package/components/Illustrations/FacialRecognitionFingerprint.js +17 -9
- package/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
- package/components/Illustrations/FacialRecognitionFingerprintMedium.js +5 -318
- package/components/Illustrations/GiveBabyFood.js +17 -9
- package/components/Illustrations/GiveBabyFood.js.map +1 -1
- package/components/Illustrations/GiveBabyFoodMedium.js +5 -377
- package/components/Illustrations/HealthcarePersonnel.js +20 -11
- package/components/Illustrations/HealthcarePersonnel.js.map +1 -1
- package/components/Illustrations/HealthcarePersonnelMedium.js +2 -229
- package/components/Illustrations/HealthcarePersonnelSmall.js +2 -212
- package/components/Illustrations/IllustrationNames.js +2 -27
- package/components/Illustrations/ReadLetters.js +17 -9
- package/components/Illustrations/ReadLetters.js.map +1 -1
- package/components/Illustrations/ReadLettersMedium.js +5 -110
- package/components/Illustrations/Stroller.js +17 -9
- package/components/Illustrations/Stroller.js.map +1 -1
- package/components/Illustrations/StrollerMedium.js +5 -236
- package/components/Illustrations/Support2.js +17 -9
- package/components/Illustrations/Support2.js.map +1 -1
- package/components/Illustrations/Support2Medium.js +5 -232
- package/components/InfoTeaser/index.js +10 -5
- package/components/Input/index.js +47 -7
- package/components/Label/Label.d.ts +1 -2
- package/components/Label/index.js +40 -10
- package/components/LazyIcon/index.js +6 -8
- package/components/LazyIllustration/index.js +8 -8
- package/components/LinkList/index.js +54 -8
- package/components/LinkList/styles.module.scss +47 -61
- package/components/LinkList/styles.module.scss.d.ts +1 -0
- package/components/List/index.js +3 -5
- package/components/ListEditMode/index.js +6 -9
- package/components/ListEditMode/styles.module.scss +1 -0
- package/components/Loader/index.js +83 -94
- package/components/Loader/index.js.map +1 -1
- package/components/Logo/index.js +48 -46
- package/components/Logo/index.js.map +1 -1
- package/components/Modal/Modal.d.ts +1 -2
- package/components/Modal/index.js +233 -204
- package/components/Modal/index.js.map +1 -1
- package/components/Modal/styles.module.scss +0 -34
- package/components/Modal/styles.module.scss.d.ts +0 -5
- package/components/NotificationPanel/index.js +126 -106
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/NotificationPanel/styles.module.scss +10 -5
- package/components/Panel/Panel.d.ts +1 -1
- package/components/Panel/PanelTitle/index.js +12 -5
- package/components/Panel/index.js +36 -15
- package/components/Panel/index.js.map +1 -1
- package/components/PanelList/index.js +52 -26
- package/components/PanelList/index.js.map +1 -1
- package/components/PanelListOld/PanelListOld.d.ts +12 -0
- package/components/PanelListOld/PanelListOld.test.d.ts +1 -0
- package/components/PanelListOld/index.d.ts +3 -0
- package/components/PanelListOld/index.js +58 -0
- package/components/PanelListOld/index.js.map +1 -0
- package/components/PanelListOld/styles.module.scss +14 -0
- package/components/PanelListOld/styles.module.scss.d.ts +9 -0
- package/components/PanelOld/PanelOld.d.ts +89 -0
- package/components/PanelOld/PanelOld.test.d.ts +1 -0
- package/components/PanelOld/index.d.ts +3 -0
- package/components/PanelOld/index.js +37 -0
- package/components/PanelOld/styles.module.scss +433 -0
- package/components/PanelOld/styles.module.scss.d.ts +61 -0
- package/components/PopMenu/index.js +150 -117
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopOver/index.js +5 -7
- package/components/Portal/index.js +3 -25
- package/components/Progressbar/index.js +105 -129
- package/components/Progressbar/index.js.map +1 -1
- package/components/PromoPanel/index.js +85 -75
- package/components/PromoPanel/index.js.map +1 -1
- package/components/RadioButton/index.js +46 -8
- package/components/RadioButton/styles.module.scss +5 -0
- package/components/RadioButton/styles.module.scss.d.ts +1 -0
- package/components/Select/index.js +45 -6
- package/components/ServiceMessage/index.js +169 -122
- package/components/ServiceMessage/index.js.map +1 -1
- package/components/SharingStatus/index.js +31 -20
- package/components/SharingStatus/index.js.map +1 -1
- package/components/Slider/index.js +12 -6
- package/components/Spacer/index.js +3 -5
- package/components/StatusDot/index.js +35 -8
- package/components/StatusDot/styles.module.scss +9 -9
- package/components/Step/index.js +33 -35
- package/components/Step/index.js.map +1 -1
- package/components/StepButtons/index.js +3 -6
- package/components/Stepper/index.js +89 -73
- package/components/Stepper/index.js.map +1 -1
- package/components/StickyNote/index.js +201 -193
- package/components/StickyNote/index.js.map +1 -1
- package/components/Table/TableBody/index.js +15 -6
- package/components/Table/TableCell/index.js +15 -8
- package/components/Table/TableExpandedRow/index.js +31 -6
- package/components/Table/TableExpanderCell/index.js +32 -6
- package/components/Table/TableHead/index.js +15 -8
- package/components/Table/TableHeadCell/index.js +18 -8
- package/components/Table/TableRow/index.js +32 -6
- package/components/Table/index.js +43 -28
- package/components/Table/index.js.map +1 -1
- package/components/Tabs/TabList/index.js +16 -5
- package/components/Tabs/TabPanel/index.js +2 -5
- package/components/Tabs/index.js +84 -98
- package/components/Tabs/index.js.map +1 -1
- package/components/Tag/index.js +45 -34
- package/components/Tag/index.js.map +1 -1
- package/components/TagList/index.js +16 -8
- package/components/TagList/index.js.map +1 -1
- package/components/Textarea/index.js +45 -5
- package/components/Tile/index.js +65 -77
- package/components/Tile/index.js.map +1 -1
- package/components/Title/index.js +4 -8
- package/components/Toast/Toast.d.ts +13 -0
- package/components/Toast/Toast.test.d.ts +1 -0
- package/components/Toast/index.d.ts +3 -0
- package/components/Toast/index.js +15 -0
- package/components/Toast/index.js.map +1 -0
- package/components/Toast/styles.module.scss +70 -0
- package/components/ToastList/ToastList.d.ts +14 -0
- package/components/ToastList/ToastList.test.d.ts +1 -0
- package/components/ToastList/index.d.ts +3 -0
- package/components/ToastList/index.js +106 -0
- package/components/ToastList/index.js.map +1 -0
- package/components/ToastList/styles.module.scss +12 -0
- package/components/ToastList/styles.module.scss.d.ts +9 -0
- package/components/Toggle/index.js +158 -151
- package/components/Toggle/index.js.map +1 -1
- package/components/Toggle/styles.module.scss +9 -0
- package/components/Validation/index.js +140 -80
- package/components/Validation/index.js.map +1 -1
- package/constants.d.ts +1 -0
- package/constants.js +2 -130
- package/constants2.js +123 -0
- package/constants2.js.map +1 -0
- package/currys.js +0 -0
- package/debounce.js +16 -0
- package/debounce.js.map +1 -0
- package/deepContains.js +13 -0
- package/deepContains.js.map +1 -0
- package/designsystem-react.css +11 -0
- package/device.js +6 -0
- package/device.js.map +1 -0
- package/docs/Tokens/TokensExample.d.ts +7 -0
- package/environment.js +5 -0
- package/environment.js.map +1 -0
- package/floating-ui.react.js +3247 -4003
- package/floating-ui.react.js.map +1 -1
- package/focus.js +11 -0
- package/focus.js.map +1 -0
- package/grid.js +24 -0
- package/grid.js.map +1 -0
- package/hoc/withBreakpoint/index.js +7 -6
- package/hoc/withBreakpoint/index.js.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js +4 -14
- package/hooks/useBreakpoint.js +3 -56
- package/hooks/useElementList.js +2 -24
- package/hooks/useEventListenerState.js +11 -12
- package/hooks/useEventListenerState.js.map +1 -1
- package/hooks/useExpand.js +3 -21
- package/hooks/useFocusToggle.js +4 -31
- package/hooks/useFocusTrap.js +5 -33
- package/hooks/useFocusableElements.js +3 -21
- package/hooks/useIcons.js +8 -23
- package/hooks/useIdWithFallback.js +2 -9
- package/hooks/useIntersectionObserver.js +2 -20
- package/hooks/useInterval.js +9 -10
- package/hooks/useInterval.js.map +1 -1
- package/hooks/useIsMobileBreakpoint.js +4 -10
- package/hooks/useIsServerSide.js +2 -12
- package/hooks/useIsVisible.js +3 -14
- package/hooks/useKeyboardEvent.js +2 -24
- package/hooks/useLayoutEvent.js +3 -18
- package/hooks/useOutsideEvent.js +2 -19
- package/hooks/usePrevious.js +2 -12
- package/hooks/usePseudoClasses.js +2 -44
- package/hooks/useResizeObserver.js +2 -31
- package/hooks/useReturnFocusOnUnmount.js +4 -21
- package/hooks/useRovingFocus.js +4 -57
- package/hooks/useSize.js +3 -47
- package/hooks/useToggle.js +3 -24
- package/hooks/usestopPropagation.js +2 -18
- package/index.d.ts +1 -0
- package/index.js +27 -43
- package/language.js +19 -0
- package/language.js.map +1 -0
- package/mobile.js +14 -0
- package/mobile.js.map +1 -0
- package/package.json +1 -1
- package/palette.js +85 -0
- package/palette.js.map +1 -0
- package/refs.js +14 -0
- package/refs.js.map +1 -0
- package/resources/HN.Designsystem.FormFieldTag.nb-NO.json.d.ts +5 -1
- package/scroll.js +9 -0
- package/scroll.js.map +1 -0
- package/scss/supernova/styles/colors.css +10 -0
- package/spacers.js +20 -0
- package/spacers.js.map +1 -0
- package/spacing.js +25 -0
- package/spacing.js.map +1 -0
- package/src.js +0 -0
- package/theme/currys/color.js +6 -16
- package/theme/currys/index.js +8 -9
- package/theme/currys/spacing.js +3 -42
- package/theme/grid.js +2 -27
- package/theme/index.js +5 -14
- package/theme/palette.js +2 -86
- package/theme/spacers.js +2 -22
- package/theme.js +13 -0
- package/theme.js.map +1 -0
- package/useBreakpoint.js +49 -0
- package/useBreakpoint.js.map +1 -0
- package/useElementList.js +25 -0
- package/useElementList.js.map +1 -0
- package/useExpand.js +16 -0
- package/useExpand.js.map +1 -0
- package/useFocusToggle.js +26 -0
- package/useFocusToggle.js.map +1 -0
- package/useFocusTrap.js +34 -0
- package/useFocusTrap.js.map +1 -0
- package/useFocusableElements.js +26 -0
- package/useFocusableElements.js.map +1 -0
- package/useIcons.js +26 -0
- package/useIcons.js.map +1 -0
- package/useIdWithFallback.js +8 -0
- package/useIdWithFallback.js.map +1 -0
- package/useIntersectionObserver.js +14 -0
- package/useIntersectionObserver.js.map +1 -0
- package/useIsMobileBreakpoint.js +8 -0
- package/useIsMobileBreakpoint.js.map +1 -0
- package/useIsServerSide.js +11 -0
- package/useIsServerSide.js.map +1 -0
- package/useIsVisible.js +16 -0
- package/useIsVisible.js.map +1 -0
- package/useKeyboardEvent.js +20 -0
- package/useKeyboardEvent.js.map +1 -0
- package/useLayoutEvent.js +21 -0
- package/useLayoutEvent.js.map +1 -0
- package/useOutsideEvent.js +20 -0
- package/useOutsideEvent.js.map +1 -0
- package/usePrevious.js +11 -0
- package/usePrevious.js.map +1 -0
- package/usePseudoClasses.js +46 -0
- package/usePseudoClasses.js.map +1 -0
- package/useResizeObserver.js +23 -0
- package/useResizeObserver.js.map +1 -0
- package/useReturnFocusOnUnmount.js +16 -0
- package/useReturnFocusOnUnmount.js.map +1 -0
- package/useRovingFocus.js +44 -0
- package/useRovingFocus.js.map +1 -0
- package/useSize.js +42 -0
- package/useSize.js.map +1 -0
- package/useToggle.js +22 -0
- package/useToggle.js.map +1 -0
- package/usestopPropagation.js +11 -0
- package/usestopPropagation.js.map +1 -0
- package/utils/accessibility.js +2 -40
- package/utils/component.js +2 -16
- package/utils/debounce.js +2 -19
- package/utils/deepContains.js +2 -19
- package/utils/device.js +2 -7
- package/utils/environment.js +2 -13
- package/utils/focus.js +2 -14
- package/utils/language.js +2 -25
- package/utils/loremtext.js +4 -7
- package/utils/loremtext.js.map +1 -1
- package/utils/mobile.js +2 -17
- package/utils/refs.js +2 -19
- package/utils/scroll.js +2 -11
- package/utils/uuid.js +3 -7
- package/utils/viewport.js +2 -8
- package/utils.js +6 -11
- package/utils.js.map +1 -1
- package/uuid.js +23 -18
- package/uuid.js.map +1 -1
- package/viewport.js +7 -0
- package/viewport.js.map +1 -0
- package/withBreakpoint.js +17 -0
- package/withBreakpoint.js.map +1 -0
- package/ErrorBoundary.js +0 -41
- package/ErrorBoundary.js.map +0 -1
- package/components/AnchorLink/index.js.map +0 -1
- package/components/Avatar/index.js.map +0 -1
- package/components/Badge/index.js.map +0 -1
- package/components/Button/index.js.map +0 -1
- package/components/Checkbox/index.js.map +0 -1
- package/components/Close/index.js.map +0 -1
- package/components/DictionaryTrigger/index.js.map +0 -1
- package/components/Drawer/index.js.map +0 -1
- package/components/Duolist/index.js.map +0 -1
- package/components/ElementHeader/StatusDotList/index.js.map +0 -1
- package/components/ErrorWrapper/index.js.map +0 -1
- package/components/Expander/index.js.map +0 -1
- package/components/FormFieldTag/index.js.map +0 -1
- package/components/FormLayout/index.js.map +0 -1
- package/components/HelpTriggerIcon/index.js.map +0 -1
- package/components/HelpTriggerStandalone/index.js.map +0 -1
- package/components/HighlightPanel/index.js.map +0 -1
- package/components/Highlighter/index.js.map +0 -1
- package/components/HorizontalScroll/index.js.map +0 -1
- package/components/Icon/index.js.map +0 -1
- package/components/Icons/AlertSignFill.js.map +0 -1
- package/components/Icons/AlertSignStroke.js.map +0 -1
- package/components/Icons/ArrowDown.js.map +0 -1
- package/components/Icons/ArrowRight.js.map +0 -1
- package/components/Icons/ArrowUp.js.map +0 -1
- package/components/Icons/ArrowUpRight.js.map +0 -1
- package/components/Icons/Calendar.js.map +0 -1
- package/components/Icons/Check.js.map +0 -1
- package/components/Icons/CheckFill.js.map +0 -1
- package/components/Icons/CheckOutline.js.map +0 -1
- package/components/Icons/ChevronDown.js.map +0 -1
- package/components/Icons/ChevronLeft.js.map +0 -1
- package/components/Icons/ChevronRight.js.map +0 -1
- package/components/Icons/ChevronUp.js.map +0 -1
- package/components/Icons/EmptyBox.js.map +0 -1
- package/components/Icons/ErrorSignFill.js.map +0 -1
- package/components/Icons/Forward.js.map +0 -1
- package/components/Icons/HandWaving.js.map +0 -1
- package/components/Icons/InfoSignFill.js.map +0 -1
- package/components/Icons/Pencil.js.map +0 -1
- package/components/Icons/PlusSmall.js.map +0 -1
- package/components/Icons/TriangleX.js.map +0 -1
- package/components/Icons/Undo.js.map +0 -1
- package/components/Icons/VerticalDots.js.map +0 -1
- package/components/Icons/Watch.js.map +0 -1
- package/components/Icons/X.js.map +0 -1
- package/components/Illustration/index.js.map +0 -1
- package/components/Illustrations/BabyMobileMedium.js.map +0 -1
- package/components/Illustrations/ChildMedium.js.map +0 -1
- package/components/Illustrations/DoctorMedium.js.map +0 -1
- package/components/Illustrations/DoctorSmall.js.map +0 -1
- package/components/Illustrations/FacialRecognitionFingerprintMedium.js.map +0 -1
- package/components/Illustrations/GiveBabyFoodMedium.js.map +0 -1
- package/components/Illustrations/HealthcarePersonnelMedium.js.map +0 -1
- package/components/Illustrations/HealthcarePersonnelSmall.js.map +0 -1
- package/components/Illustrations/IllustrationNames.js.map +0 -1
- package/components/Illustrations/ReadLettersMedium.js.map +0 -1
- package/components/Illustrations/StrollerMedium.js.map +0 -1
- package/components/Illustrations/Support2Medium.js.map +0 -1
- package/components/InfoTeaser/index.js.map +0 -1
- package/components/Input/index.js.map +0 -1
- package/components/Label/index.js.map +0 -1
- package/components/LazyIcon/index.js.map +0 -1
- package/components/LazyIllustration/index.js.map +0 -1
- package/components/LinkList/index.js.map +0 -1
- package/components/List/index.js.map +0 -1
- package/components/ListEditMode/index.js.map +0 -1
- package/components/Panel/PanelTitle/index.js.map +0 -1
- package/components/PopOver/index.js.map +0 -1
- package/components/Portal/index.js.map +0 -1
- package/components/RadioButton/index.js.map +0 -1
- package/components/Select/index.js.map +0 -1
- package/components/Slider/index.js.map +0 -1
- package/components/Spacer/index.js.map +0 -1
- package/components/StatusDot/index.js.map +0 -1
- package/components/StepButtons/index.js.map +0 -1
- package/components/Table/TableBody/index.js.map +0 -1
- package/components/Table/TableCell/index.js.map +0 -1
- package/components/Table/TableExpandedRow/index.js.map +0 -1
- package/components/Table/TableExpanderCell/index.js.map +0 -1
- package/components/Table/TableHead/index.js.map +0 -1
- package/components/Table/TableHeadCell/index.js.map +0 -1
- package/components/Table/TableRow/index.js.map +0 -1
- package/components/Tabs/TabList/index.js.map +0 -1
- package/components/Tabs/TabPanel/index.js.map +0 -1
- package/components/Textarea/index.js.map +0 -1
- package/components/Title/index.js.map +0 -1
- package/constants.js.map +0 -1
- package/hoc/withBreakpoint/withBreakpoint.js.map +0 -1
- package/hooks/useBreakpoint.js.map +0 -1
- package/hooks/useElementList.js.map +0 -1
- package/hooks/useExpand.js.map +0 -1
- package/hooks/useFocusToggle.js.map +0 -1
- package/hooks/useFocusTrap.js.map +0 -1
- package/hooks/useFocusableElements.js.map +0 -1
- package/hooks/useIcons.js.map +0 -1
- package/hooks/useIdWithFallback.js.map +0 -1
- package/hooks/useIntersectionObserver.js.map +0 -1
- package/hooks/useIsMobileBreakpoint.js.map +0 -1
- package/hooks/useIsServerSide.js.map +0 -1
- package/hooks/useIsVisible.js.map +0 -1
- package/hooks/useKeyboardEvent.js.map +0 -1
- package/hooks/useLayoutEvent.js.map +0 -1
- package/hooks/useOutsideEvent.js.map +0 -1
- package/hooks/usePrevious.js.map +0 -1
- package/hooks/usePseudoClasses.js.map +0 -1
- package/hooks/useResizeObserver.js.map +0 -1
- package/hooks/useReturnFocusOnUnmount.js.map +0 -1
- package/hooks/useRovingFocus.js.map +0 -1
- package/hooks/useSize.js.map +0 -1
- package/hooks/useToggle.js.map +0 -1
- package/hooks/usestopPropagation.js.map +0 -1
- package/index.js.map +0 -1
- package/theme/currys/color.js.map +0 -1
- package/theme/currys/index.js.map +0 -1
- package/theme/currys/spacing.js.map +0 -1
- package/theme/grid.js.map +0 -1
- package/theme/index.js.map +0 -1
- package/theme/palette.js.map +0 -1
- package/theme/spacers.js.map +0 -1
- package/utils/accessibility.js.map +0 -1
- package/utils/component.js.map +0 -1
- package/utils/debounce.js.map +0 -1
- package/utils/deepContains.js.map +0 -1
- package/utils/device.js.map +0 -1
- package/utils/environment.js.map +0 -1
- package/utils/focus.js.map +0 -1
- package/utils/language.js.map +0 -1
- package/utils/mobile.js.map +0 -1
- package/utils/refs.js.map +0 -1
- package/utils/scroll.js.map +0 -1
- package/utils/uuid.js.map +0 -1
- package/utils/viewport.js.map +0 -1
- /package/{resources/index.d.ts → components/DropdownOld/DropdownOld.test.d.ts} +0 -0
package/theme/currys/spacing.js
CHANGED
|
@@ -1,42 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
case "4xs":
|
|
5
|
-
return spacers[1];
|
|
6
|
-
case "3xs":
|
|
7
|
-
return spacers[2];
|
|
8
|
-
case "2xs":
|
|
9
|
-
return spacers[3];
|
|
10
|
-
case "xs":
|
|
11
|
-
return spacers[4];
|
|
12
|
-
case "s":
|
|
13
|
-
return spacers[5];
|
|
14
|
-
case "m":
|
|
15
|
-
return spacers[6];
|
|
16
|
-
case "l":
|
|
17
|
-
return spacers[7];
|
|
18
|
-
case "xl":
|
|
19
|
-
return spacers[8];
|
|
20
|
-
case "2xl":
|
|
21
|
-
return spacers[9];
|
|
22
|
-
case "3xl":
|
|
23
|
-
return spacers[10];
|
|
24
|
-
case "4xl":
|
|
25
|
-
return spacers[11];
|
|
26
|
-
case "5xl":
|
|
27
|
-
return spacers[12];
|
|
28
|
-
case "6xl":
|
|
29
|
-
return spacers[13];
|
|
30
|
-
default:
|
|
31
|
-
return spacers[5];
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const getSpacer = (spacerSize) => {
|
|
35
|
-
const spacerValue = mapSpacerValue(spacerSize);
|
|
36
|
-
return `${spacerValue}rem`;
|
|
37
|
-
};
|
|
38
|
-
export {
|
|
39
|
-
getSpacer,
|
|
40
|
-
mapSpacerValue
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=spacing.js.map
|
|
1
|
+
import "../../spacers.js";
|
|
2
|
+
import { n as mapSpacerValue, t as getSpacer } from "../../spacing.js";
|
|
3
|
+
export { getSpacer, mapSpacerValue };
|
package/theme/grid.js
CHANGED
|
@@ -1,27 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
xs: 360,
|
|
4
|
-
sm: 564,
|
|
5
|
-
md: 768,
|
|
6
|
-
lg: 1088,
|
|
7
|
-
xl: 1450
|
|
8
|
-
};
|
|
9
|
-
const containerMaxWidths = {
|
|
10
|
-
sm: 528,
|
|
11
|
-
md: 612,
|
|
12
|
-
lg: 1056
|
|
13
|
-
};
|
|
14
|
-
const screen = {
|
|
15
|
-
xxs: `(min-width: ${breakpoints.xxs}px)`,
|
|
16
|
-
xs: `(min-width: ${breakpoints.xs}px)`,
|
|
17
|
-
sm: `(min-width: ${breakpoints.sm}px)`,
|
|
18
|
-
md: `(min-width: ${breakpoints.md}px)`,
|
|
19
|
-
lg: `(min-width: ${breakpoints.lg}px)`,
|
|
20
|
-
xl: `(min-width: ${breakpoints.xl}px)`
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
breakpoints,
|
|
24
|
-
containerMaxWidths,
|
|
25
|
-
screen
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=grid.js.map
|
|
1
|
+
import { n as containerMaxWidths, r as screen, t as breakpoints } from "../grid.js";
|
|
2
|
+
export { breakpoints, containerMaxWidths, screen };
|
package/theme/index.js
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
spacers,
|
|
7
|
-
palette,
|
|
8
|
-
screen,
|
|
9
|
-
breakpoints
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
theme
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
import "../grid.js";
|
|
2
|
+
import "../palette.js";
|
|
3
|
+
import "../spacers.js";
|
|
4
|
+
import { t as theme } from "../theme.js";
|
|
5
|
+
export { theme };
|
package/theme/palette.js
CHANGED
|
@@ -1,86 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
banana100: "#FCF2BF",
|
|
4
|
-
banana200: "#F9EA9F",
|
|
5
|
-
banana300: "#F5E080",
|
|
6
|
-
banana400: "#EBC840",
|
|
7
|
-
banana500: "#DDAB06",
|
|
8
|
-
banana600: "#C59302",
|
|
9
|
-
banana700: "#AB7C00",
|
|
10
|
-
banana800: "#916500",
|
|
11
|
-
banana900: "#764F00"
|
|
12
|
-
};
|
|
13
|
-
const blueberry = {
|
|
14
|
-
blueberry50: "#E4F7F9",
|
|
15
|
-
blueberry100: "#CAE7ED",
|
|
16
|
-
blueberry200: "#AFDAE3",
|
|
17
|
-
blueberry300: "#7ABECC",
|
|
18
|
-
blueberry400: "#58AABB",
|
|
19
|
-
blueberry500: "#188097",
|
|
20
|
-
blueberry600: "#126F87",
|
|
21
|
-
blueberry700: "#08667C",
|
|
22
|
-
blueberry800: "#06596C",
|
|
23
|
-
blueberry900: "#084350"
|
|
24
|
-
};
|
|
25
|
-
const cherry = {
|
|
26
|
-
cherry50: "#FFF2EA",
|
|
27
|
-
cherry100: "#F7E1D2",
|
|
28
|
-
cherry200: "#EEC0A5",
|
|
29
|
-
cherry300: "#E39376",
|
|
30
|
-
cherry400: "#D56147",
|
|
31
|
-
cherry500: "#C83521",
|
|
32
|
-
cherry600: "#B62E1C",
|
|
33
|
-
cherry700: "#A31F0E",
|
|
34
|
-
cherry800: "#912112",
|
|
35
|
-
cherry900: "#7E1C0E"
|
|
36
|
-
};
|
|
37
|
-
const kiwi = {
|
|
38
|
-
kiwi50: "#E6F8EE",
|
|
39
|
-
kiwi100: "#C2EDD6",
|
|
40
|
-
kiwi200: "#9DE2BF",
|
|
41
|
-
kiwi300: "#79D6AA",
|
|
42
|
-
kiwi400: "#56CA96",
|
|
43
|
-
kiwi500: "#33BE84",
|
|
44
|
-
kiwi600: "#10B172",
|
|
45
|
-
kiwi700: "#0CA161",
|
|
46
|
-
kiwi800: "#099150",
|
|
47
|
-
kiwi900: "#078141"
|
|
48
|
-
};
|
|
49
|
-
const neutral = {
|
|
50
|
-
neutral50: "#F5F3F3",
|
|
51
|
-
neutral100: "#EAE7E7",
|
|
52
|
-
neutral200: "#D6D4D3",
|
|
53
|
-
neutral300: "#BDBAB9",
|
|
54
|
-
neutral400: "#AAA8A6",
|
|
55
|
-
neutral500: "#989693",
|
|
56
|
-
neutral600: "#7D7C79",
|
|
57
|
-
neutral700: "#62625F",
|
|
58
|
-
neutral800: "#474745",
|
|
59
|
-
neutral900: "#2B2C2B"
|
|
60
|
-
};
|
|
61
|
-
const plum = {
|
|
62
|
-
plum50: "#EFE4FD",
|
|
63
|
-
plum100: "#D7BDF9",
|
|
64
|
-
plum200: "#BF98F3",
|
|
65
|
-
plum300: "#A875EB",
|
|
66
|
-
plum400: "#9153E2",
|
|
67
|
-
plum500: "#7A33D7",
|
|
68
|
-
plum600: "#6A2ABF",
|
|
69
|
-
plum700: "#5B22A6",
|
|
70
|
-
plum800: "#4C1B8C",
|
|
71
|
-
plum900: "#3C1471"
|
|
72
|
-
};
|
|
73
|
-
const palette = {
|
|
74
|
-
...banana,
|
|
75
|
-
...blueberry,
|
|
76
|
-
...cherry,
|
|
77
|
-
...kiwi,
|
|
78
|
-
...neutral,
|
|
79
|
-
...plum,
|
|
80
|
-
black: "#000000",
|
|
81
|
-
white: "#ffffff"
|
|
82
|
-
};
|
|
83
|
-
export {
|
|
84
|
-
palette
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=palette.js.map
|
|
1
|
+
import { t as palette } from "../palette.js";
|
|
2
|
+
export { palette };
|
package/theme/spacers.js
CHANGED
|
@@ -1,22 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
0: 0,
|
|
4
|
-
1: spacer / 8,
|
|
5
|
-
2: spacer / 4,
|
|
6
|
-
3: spacer / 2,
|
|
7
|
-
4: spacer * 0.75,
|
|
8
|
-
5: spacer * 1,
|
|
9
|
-
6: spacer * 1.5,
|
|
10
|
-
7: spacer * 2,
|
|
11
|
-
8: spacer * 3,
|
|
12
|
-
9: spacer * 4,
|
|
13
|
-
10: spacer * 5,
|
|
14
|
-
11: spacer * 6,
|
|
15
|
-
12: spacer * 7,
|
|
16
|
-
13: spacer * 8
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
spacer,
|
|
20
|
-
spacers
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=spacers.js.map
|
|
1
|
+
import { n as spacers, t as spacer } from "../spacers.js";
|
|
2
|
+
export { spacer, spacers };
|
package/theme.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { r as screen, t as breakpoints } from "./grid.js";
|
|
2
|
+
import { t as palette } from "./palette.js";
|
|
3
|
+
import { n as spacers, t as spacer } from "./spacers.js";
|
|
4
|
+
const theme = {
|
|
5
|
+
spacer: 1,
|
|
6
|
+
spacers,
|
|
7
|
+
palette,
|
|
8
|
+
screen,
|
|
9
|
+
breakpoints
|
|
10
|
+
};
|
|
11
|
+
export { theme as t };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=theme.js.map
|
package/theme.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","names":[],"sources":["../src/theme/index.ts"],"sourcesContent":["import { screen, breakpoints } from './grid';\nimport { palette } from './palette';\nimport { spacer, spacers } from './spacers';\n\nexport const theme = {\n spacer,\n spacers,\n palette,\n screen,\n breakpoints,\n};\n"],"mappings":";;;AAIA,MAAa,QAAQ;CACnB,QAAA;CACA;CACA;CACA;CACA;CACD"}
|
package/useBreakpoint.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { r as screen, t as breakpoints } from "./grid.js";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
let Breakpoint = /* @__PURE__ */ function(Breakpoint$1) {
|
|
4
|
+
Breakpoint$1[Breakpoint$1["xxs"] = breakpoints.xxs] = "xxs";
|
|
5
|
+
Breakpoint$1[Breakpoint$1["xs"] = breakpoints.xs] = "xs";
|
|
6
|
+
Breakpoint$1[Breakpoint$1["sm"] = breakpoints.sm] = "sm";
|
|
7
|
+
Breakpoint$1[Breakpoint$1["md"] = breakpoints.md] = "md";
|
|
8
|
+
Breakpoint$1[Breakpoint$1["lg"] = breakpoints.lg] = "lg";
|
|
9
|
+
Breakpoint$1[Breakpoint$1["xl"] = breakpoints.xl] = "xl";
|
|
10
|
+
return Breakpoint$1;
|
|
11
|
+
}({});
|
|
12
|
+
function getCurrentBreakpoint() {
|
|
13
|
+
return Object.entries(screen).reverse().map(([size, mediaQuery]) => {
|
|
14
|
+
return {
|
|
15
|
+
breakpoint: Breakpoint[size],
|
|
16
|
+
mq: window.matchMedia(mediaQuery)
|
|
17
|
+
};
|
|
18
|
+
}).find((entry) => entry.mq.matches)?.breakpoint ?? Breakpoint.xxs;
|
|
19
|
+
}
|
|
20
|
+
const useBreakpoint = () => {
|
|
21
|
+
const [breakpoint, setBreakpoint] = useState(Breakpoint.xxs);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
setBreakpoint(getCurrentBreakpoint());
|
|
24
|
+
}, []);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
const mediaQueryList = Object.values(screen).map((mediaQuery) => {
|
|
27
|
+
const mq = window.matchMedia(mediaQuery);
|
|
28
|
+
const handler = () => {
|
|
29
|
+
setBreakpoint(getCurrentBreakpoint());
|
|
30
|
+
};
|
|
31
|
+
if (mq.addEventListener) mq.addEventListener("change", handler);
|
|
32
|
+
else if (mq.addListener) mq.addListener(handler);
|
|
33
|
+
return {
|
|
34
|
+
mq,
|
|
35
|
+
handler
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
return () => {
|
|
39
|
+
mediaQueryList.forEach(({ mq, handler }) => {
|
|
40
|
+
if (mq.removeEventListener) mq.removeEventListener("change", handler);
|
|
41
|
+
else if (mq.removeListener) mq.removeListener(handler);
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
}, []);
|
|
45
|
+
return breakpoint;
|
|
46
|
+
};
|
|
47
|
+
export { useBreakpoint as n, Breakpoint as t };
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=useBreakpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint.js","names":[],"sources":["../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\nimport { breakpoints, screen } from '../theme/grid';\n\nexport enum Breakpoint {\n xxs = breakpoints.xxs,\n xs = breakpoints.xs,\n sm = breakpoints.sm,\n md = breakpoints.md,\n lg = breakpoints.lg,\n xl = breakpoints.xl,\n}\n\nfunction getCurrentBreakpoint(): Breakpoint {\n // We read from largest -> smallest or vice versa\n // so that the first match is the \"highest\" one that applies\n const mediaQueryList = Object.entries(screen)\n .reverse() // e.g. check xl, lg, md, etc. in descending order\n .map(([size, mediaQuery]) => {\n return {\n breakpoint: Breakpoint[size as keyof typeof Breakpoint],\n mq: window.matchMedia(mediaQuery),\n };\n });\n\n const matched = mediaQueryList.find(entry => entry.mq.matches);\n return matched?.breakpoint ?? Breakpoint.xxs;\n}\n\nexport const useBreakpoint = (): Breakpoint => {\n const [breakpoint, setBreakpoint] = useState<Breakpoint>(Breakpoint.xxs);\n\n useEffect(() => {\n // Oppdater breakpoint i useEffect for å støtte server side rendering\n setBreakpoint(getCurrentBreakpoint());\n }, []);\n\n useEffect(() => {\n const mediaQueryList = Object.values(screen).map(mediaQuery => {\n const mq = window.matchMedia(mediaQuery);\n // iOS <=13 har ikke støtte for addEventListener/removeEventListener på MediaQueryList,\n // men har støtte for addListener\n const handler = (): void => {\n setBreakpoint(getCurrentBreakpoint());\n };\n\n if (mq.addEventListener) {\n mq.addEventListener('change', handler);\n } else if (mq.addListener) {\n mq.addListener(handler);\n }\n return { mq, handler };\n });\n\n return (): void => {\n mediaQueryList.forEach(({ mq, handler }) => {\n if (mq.removeEventListener) {\n mq.removeEventListener('change', handler);\n } else if (mq.removeListener) {\n mq.removeListener(handler);\n }\n });\n };\n }, []);\n\n return breakpoint;\n};\n"],"mappings":";;AAIA,IAAY,aAAA,yBAAA,cAAL;AACL,cAAA,aAAA,SAAM,YAAY,OAAA;AAClB,cAAA,aAAA,QAAK,YAAY,MAAA;AACjB,cAAA,aAAA,QAAK,YAAY,MAAA;AACjB,cAAA,aAAA,QAAK,YAAY,MAAA;AACjB,cAAA,aAAA,QAAK,YAAY,MAAA;AACjB,cAAA,aAAA,QAAK,YAAY,MAAA;;;AAGnB,SAAS,uBAAmC;AAa1C,QAVuB,OAAO,QAAQ,OAAO,CAC1C,SAAS,CACT,KAAK,CAAC,MAAM,gBAAgB;AAC3B,SAAO;GACL,YAAY,WAAW;GACvB,IAAI,OAAO,WAAW,WAAW;GAClC;GACD,CAE2B,MAAK,UAAS,MAAM,GAAG,QAAQ,EAC9C,cAAc,WAAW;;AAG3C,MAAa,sBAAkC;CAC7C,MAAM,CAAC,YAAY,iBAAiB,SAAqB,WAAW,IAAI;AAExE,iBAAgB;AAEd,gBAAc,sBAAsB,CAAC;IACpC,EAAE,CAAC;AAEN,iBAAgB;EACd,MAAM,iBAAiB,OAAO,OAAO,OAAO,CAAC,KAAI,eAAc;GAC7D,MAAM,KAAK,OAAO,WAAW,WAAW;GAGxC,MAAM,gBAAsB;AAC1B,kBAAc,sBAAsB,CAAC;;AAGvC,OAAI,GAAG,iBACL,IAAG,iBAAiB,UAAU,QAAQ;YAC7B,GAAG,YACZ,IAAG,YAAY,QAAQ;AAEzB,UAAO;IAAE;IAAI;IAAS;IACtB;AAEF,eAAmB;AACjB,kBAAe,SAAS,EAAE,IAAI,cAAc;AAC1C,QAAI,GAAG,oBACL,IAAG,oBAAoB,UAAU,QAAQ;aAChC,GAAG,eACZ,IAAG,eAAe,QAAQ;KAE5B;;IAEH,EAAE,CAAC;AAEN,QAAO"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
const useElementList = (ref, selectors, options) => {
|
|
3
|
+
const [elementList, setElementList] = useState();
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
const handleMutationChange = () => {
|
|
6
|
+
const elements = ref.current?.querySelectorAll(selectors);
|
|
7
|
+
setElementList(elements);
|
|
8
|
+
};
|
|
9
|
+
const mutationObserver = new MutationObserver(handleMutationChange);
|
|
10
|
+
if (ref?.current) mutationObserver.observe(ref.current, {
|
|
11
|
+
subtree: true,
|
|
12
|
+
childList: true,
|
|
13
|
+
attributes: true,
|
|
14
|
+
...options
|
|
15
|
+
});
|
|
16
|
+
handleMutationChange();
|
|
17
|
+
return () => {
|
|
18
|
+
mutationObserver.disconnect();
|
|
19
|
+
};
|
|
20
|
+
}, [ref, selectors]);
|
|
21
|
+
return elementList;
|
|
22
|
+
};
|
|
23
|
+
export { useElementList as t };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=useElementList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useElementList.js","names":[],"sources":["../src/hooks/useElementList.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\n/**\n * Hent ut en liste med HTML-elementer. Bruker MutationObserver-APIet.\n * @param ref Element som skal observeres\n * @param selectors Selektorer som sendes til querySelectorAll for å hente ut liste med elementer\n * @param options MutationObserver-options. Default er å lytte på endringer på child-elementer og deres attributter.\n * @returns Liste med HTML-elementer\n */\nexport const useElementList = (\n ref: React.RefObject<HTMLElement>,\n selectors: string,\n options?: MutationObserverInit\n): NodeListOf<HTMLElement> | undefined => {\n const [elementList, setElementList] = useState<NodeListOf<HTMLElement>>();\n\n useEffect(() => {\n const handleMutationChange = (): void => {\n const elements = ref.current?.querySelectorAll<HTMLElement>(selectors);\n setElementList(elements);\n };\n\n const mutationObserver = new MutationObserver(handleMutationChange);\n if (ref?.current) {\n mutationObserver.observe(ref.current, { subtree: true, childList: true, attributes: true, ...options });\n }\n\n handleMutationChange();\n\n return (): void => {\n mutationObserver.disconnect();\n };\n }, [ref, selectors]);\n\n return elementList;\n};\n"],"mappings":";AASA,MAAa,kBACX,KACA,WACA,YACwC;CACxC,MAAM,CAAC,aAAa,kBAAkB,UAAmC;AAEzE,iBAAgB;EACd,MAAM,6BAAmC;GACvC,MAAM,WAAW,IAAI,SAAS,iBAA8B,UAAU;AACtE,kBAAe,SAAS;;EAG1B,MAAM,mBAAmB,IAAI,iBAAiB,qBAAqB;AACnE,MAAI,KAAK,QACP,kBAAiB,QAAQ,IAAI,SAAS;GAAE,SAAS;GAAM,WAAW;GAAM,YAAY;GAAM,GAAG;GAAS,CAAC;AAGzG,wBAAsB;AAEtB,eAAmB;AACjB,oBAAiB,YAAY;;IAE9B,CAAC,KAAK,UAAU,CAAC;AAEpB,QAAO"}
|
package/useExpand.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as usePrevious } from "./usePrevious.js";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
const useExpand = (expanded, onExpand) => {
|
|
4
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
5
|
+
const previousIsExpanded = usePrevious(isExpanded);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (expanded !== isExpanded) setIsExpanded(expanded);
|
|
8
|
+
}, [expanded]);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (onExpand && isExpanded !== !!previousIsExpanded) onExpand(isExpanded);
|
|
11
|
+
}, [isExpanded, onExpand]);
|
|
12
|
+
return [isExpanded, setIsExpanded];
|
|
13
|
+
};
|
|
14
|
+
export { useExpand as t };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=useExpand.js.map
|
package/useExpand.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpand.js","names":[],"sources":["../src/hooks/useExpand.ts"],"sourcesContent":["import { Dispatch, SetStateAction, useEffect, useState } from 'react';\n\nimport { usePrevious } from './usePrevious';\n\nexport const useExpand = (expanded: boolean, onExpand?: (isExpanded: boolean) => void): [boolean, Dispatch<SetStateAction<boolean>>] => {\n const [isExpanded, setIsExpanded] = useState(expanded);\n const previousIsExpanded = usePrevious(isExpanded);\n\n useEffect(() => {\n if (expanded !== isExpanded) {\n setIsExpanded(expanded);\n }\n }, [expanded]);\n\n useEffect(() => {\n if (onExpand && isExpanded !== !!previousIsExpanded) {\n onExpand(isExpanded);\n }\n }, [isExpanded, onExpand]);\n\n return [isExpanded, setIsExpanded];\n};\n"],"mappings":";;AAIA,MAAa,aAAa,UAAmB,aAA2F;CACtI,MAAM,CAAC,YAAY,iBAAiB,SAAS,SAAS;CACtD,MAAM,qBAAqB,YAAY,WAAW;AAElD,iBAAgB;AACd,MAAI,aAAa,WACf,eAAc,SAAS;IAExB,CAAC,SAAS,CAAC;AAEd,iBAAgB;AACd,MAAI,YAAY,eAAe,CAAC,CAAC,mBAC/B,UAAS,WAAW;IAErB,CAAC,YAAY,SAAS,CAAC;AAE1B,QAAO,CAAC,YAAY,cAAc"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as useElementList } from "./useElementList.js";
|
|
2
|
+
import { t as FOCUSABLE_SELECTORS } from "./useFocusableElements.js";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
const useFocusToggle = (ref, allowFocus) => {
|
|
5
|
+
const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
const TABINDEX_ATTRIBUTE_NAME = "tabindex";
|
|
8
|
+
const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = "data-tabindex";
|
|
9
|
+
if (allowFocus) focusableElementList?.forEach((el) => {
|
|
10
|
+
const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);
|
|
11
|
+
if (prevTabIndex) el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);
|
|
12
|
+
else el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);
|
|
13
|
+
});
|
|
14
|
+
else focusableElementList?.forEach((el) => {
|
|
15
|
+
if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);
|
|
16
|
+
el.tabIndex = -1;
|
|
17
|
+
});
|
|
18
|
+
}, [
|
|
19
|
+
ref,
|
|
20
|
+
allowFocus,
|
|
21
|
+
focusableElementList
|
|
22
|
+
]);
|
|
23
|
+
};
|
|
24
|
+
export { useFocusToggle as t };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=useFocusToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusToggle.js","names":[],"sources":["../src/hooks/useFocusToggle.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useElementList } from './useElementList';\nimport { FOCUSABLE_SELECTORS } from './useFocusableElements';\n\n/**\n * Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig\n * ikke kunne fokuseres/tabbes til med tastaturet.\n * @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare\n * @param allowFocus Om elementene skal være fokuserbare eller ikke\n * @returns void\n */\nexport const useFocusToggle = (ref: React.RefObject<HTMLElement>, allowFocus?: boolean): void => {\n // Kan ikke lytte på endringer i attributter, fordi det vil føre til en loop når vi endrer dem etterpå\n const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });\n\n useEffect(() => {\n const TABINDEX_ATTRIBUTE_NAME = 'tabindex';\n const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = 'data-tabindex';\n if (allowFocus) {\n focusableElementList?.forEach(el => {\n // Sett tabIndex tilbake til verdien den hadde før, eller fjern tabIndex\n // slik at elementet kan tabbes til igjen.\n const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);\n if (prevTabIndex) {\n el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);\n } else {\n el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);\n }\n });\n } else {\n focusableElementList?.forEach(el => {\n // Hvis elementet allerede har tabIndex, ta vare på den før vi gjør det umulig å\n // tabbe til det.\n if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) {\n el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);\n }\n el.tabIndex = -1;\n });\n }\n }, [ref, allowFocus, focusableElementList]);\n};\n"],"mappings":";;;AAYA,MAAa,kBAAkB,KAAmC,eAA+B;CAE/F,MAAM,uBAAuB,eAAe,KAAK,qBAAqB,EAAE,YAAY,OAAO,CAAC;AAE5F,iBAAgB;EACd,MAAM,0BAA0B;EAChC,MAAM,mCAAmC;AACzC,MAAI,WACF,uBAAsB,SAAQ,OAAM;GAGlC,MAAM,eAAe,GAAG,aAAa,iCAAiC;AACtE,OAAI,aACF,IAAG,aAAa,yBAAyB,aAAa;OAEtD,IAAG,gBAAgB,wBAAwB;IAE7C;MAEF,uBAAsB,SAAQ,OAAM;AAGlC,OAAI,GAAG,aAAa,wBAAwB,CAC1C,IAAG,aAAa,kCAAkC,GAAG,GAAG,WAAW;AAErE,MAAG,WAAW;IACd;IAEH;EAAC;EAAK;EAAY;EAAqB,CAAC"}
|
package/useFocusTrap.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { n as useFocusableElements } from "./useFocusableElements.js";
|
|
2
|
+
import { t as getDocumentActiveElement } from "./focus.js";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
const useFocusTrap = (ref, trapFocus = true) => {
|
|
5
|
+
const focusableElementList = useFocusableElements(ref);
|
|
6
|
+
const handleKeyboardEvent = (e) => {
|
|
7
|
+
if (trapFocus && ref.current && focusableElementList?.length && e.key === "Tab") {
|
|
8
|
+
const activeElement = getDocumentActiveElement(ref.current);
|
|
9
|
+
const firstElement = focusableElementList[0];
|
|
10
|
+
const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];
|
|
11
|
+
if (e.shiftKey && activeElement === firstElement) {
|
|
12
|
+
lastElement.focus();
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
} else if (!e.shiftKey && activeElement === lastElement) {
|
|
15
|
+
firstElement.focus();
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
ref.current?.addEventListener("keydown", handleKeyboardEvent);
|
|
22
|
+
return () => {
|
|
23
|
+
ref.current?.removeEventListener("keydown", handleKeyboardEvent);
|
|
24
|
+
};
|
|
25
|
+
}, [
|
|
26
|
+
ref,
|
|
27
|
+
trapFocus,
|
|
28
|
+
focusableElementList
|
|
29
|
+
]);
|
|
30
|
+
};
|
|
31
|
+
var useFocusTrap_default = useFocusTrap;
|
|
32
|
+
export { useFocusTrap_default as n, useFocusTrap as t };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=useFocusTrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusTrap.js","names":[],"sources":["../src/hooks/useFocusTrap.ts"],"sourcesContent":["import React, { useEffect } from 'react';\n\nimport { useFocusableElements } from './useFocusableElements';\nimport { getDocumentActiveElement } from '../utils/focus';\n\n/**\n * Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.\n * @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det\n * @param trapFocus Om fokus skal \"trappes\" innenfor elementet eller ikke. Default=true.\n */\nexport const useFocusTrap = (ref: React.RefObject<HTMLElement>, trapFocus = true): void => {\n const focusableElementList = useFocusableElements(ref);\n\n const handleKeyboardEvent = (e: KeyboardEvent): void => {\n if (trapFocus && ref.current && focusableElementList?.length && e.key === 'Tab') {\n const activeElement = getDocumentActiveElement(ref.current);\n const firstElement = focusableElementList[0];\n const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];\n\n if (e.shiftKey && activeElement === firstElement) {\n /* shift + tab */\n lastElement.focus();\n e.preventDefault();\n } else if (!e.shiftKey && activeElement === lastElement) {\n /* tab */\n firstElement.focus();\n e.preventDefault();\n }\n }\n };\n\n useEffect(() => {\n ref.current?.addEventListener('keydown', handleKeyboardEvent);\n\n return (): void => {\n ref.current?.removeEventListener('keydown', handleKeyboardEvent);\n };\n }, [ref, trapFocus, focusableElementList]); // focusableElementList må være med som dependency for at handleKeyboardEvent skal få oppdatert state\n};\n\nexport default useFocusTrap;\n"],"mappings":";;;AAUA,MAAa,gBAAgB,KAAmC,YAAY,SAAe;CACzF,MAAM,uBAAuB,qBAAqB,IAAI;CAEtD,MAAM,uBAAuB,MAA2B;AACtD,MAAI,aAAa,IAAI,WAAW,sBAAsB,UAAU,EAAE,QAAQ,OAAO;GAC/E,MAAM,gBAAgB,yBAAyB,IAAI,QAAQ;GAC3D,MAAM,eAAe,qBAAqB;GAC1C,MAAM,cAAc,qBAAqB,WAAW,IAAI,eAAe,qBAAqB,qBAAqB,SAAS;AAE1H,OAAI,EAAE,YAAY,kBAAkB,cAAc;AAEhD,gBAAY,OAAO;AACnB,MAAE,gBAAgB;cACT,CAAC,EAAE,YAAY,kBAAkB,aAAa;AAEvD,iBAAa,OAAO;AACpB,MAAE,gBAAgB;;;;AAKxB,iBAAgB;AACd,MAAI,SAAS,iBAAiB,WAAW,oBAAoB;AAE7D,eAAmB;AACjB,OAAI,SAAS,oBAAoB,WAAW,oBAAoB;;IAEjE;EAAC;EAAK;EAAW;EAAqB,CAAC;;AAG5C,IAAA,uBAAe"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as useElementList } from "./useElementList.js";
|
|
2
|
+
const FOCUSABLE_SELECTORS = [
|
|
3
|
+
"a[href]:not([tabindex^=\"-\"])",
|
|
4
|
+
"area[href]:not([tabindex^=\"-\"])",
|
|
5
|
+
"input:not([type=\"hidden\"]):not([type=\"radio\"]):not([disabled]):not([tabindex^=\"-\"])",
|
|
6
|
+
"input[type=\"radio\"]:not([disabled]):not([tabindex^=\"-\"])",
|
|
7
|
+
"select:not([disabled]):not([tabindex^=\"-\"])",
|
|
8
|
+
"textarea:not([disabled]):not([tabindex^=\"-\"])",
|
|
9
|
+
"button:not([disabled]):not([tabindex^=\"-\"])",
|
|
10
|
+
"iframe:not([tabindex^=\"-\"])",
|
|
11
|
+
"audio[controls]:not([tabindex^=\"-\"])",
|
|
12
|
+
"video[controls]:not([tabindex^=\"-\"])",
|
|
13
|
+
"[contenteditable]:not([tabindex^=\"-\"])",
|
|
14
|
+
"[tabindex]:not([tabindex^=\"-\"])"
|
|
15
|
+
].join(",");
|
|
16
|
+
const useFocusableElements = (ref) => useElementList(ref, FOCUSABLE_SELECTORS, { attributeFilter: [
|
|
17
|
+
"href",
|
|
18
|
+
"tabindex",
|
|
19
|
+
"type",
|
|
20
|
+
"disabled",
|
|
21
|
+
"controls",
|
|
22
|
+
"contenteditable"
|
|
23
|
+
] });
|
|
24
|
+
export { useFocusableElements as n, FOCUSABLE_SELECTORS as t };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=useFocusableElements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusableElements.js","names":[],"sources":["../src/hooks/useFocusableElements.ts"],"sourcesContent":["import { useElementList } from './useElementList';\n\n// Fra https://github.com/KittyGiraudel/focusable-selectors\nexport const FOCUSABLE_SELECTORS = [\n 'a[href]:not([tabindex^=\"-\"])',\n 'area[href]:not([tabindex^=\"-\"])',\n 'input:not([type=\"hidden\"]):not([type=\"radio\"]):not([disabled]):not([tabindex^=\"-\"])',\n 'input[type=\"radio\"]:not([disabled]):not([tabindex^=\"-\"])',\n 'select:not([disabled]):not([tabindex^=\"-\"])',\n 'textarea:not([disabled]):not([tabindex^=\"-\"])',\n 'button:not([disabled]):not([tabindex^=\"-\"])',\n 'iframe:not([tabindex^=\"-\"])',\n 'audio[controls]:not([tabindex^=\"-\"])',\n 'video[controls]:not([tabindex^=\"-\"])',\n '[contenteditable]:not([tabindex^=\"-\"])',\n '[tabindex]:not([tabindex^=\"-\"])',\n].join(',');\n\n/**\n * Overvåk et element og finn alle fokuserbare elementer inne i elementet. Bruker MutationObserver slik at eventuelle\n * nye elementer som legges til også vil inkluderes i listen.\n * @param ref Element som skal observeres\n * @returns Liste med fokuserbare HTML-elementer\n */\nexport const useFocusableElements = (ref: React.RefObject<HTMLElement>): NodeListOf<HTMLElement> | undefined =>\n useElementList(ref, FOCUSABLE_SELECTORS, { attributeFilter: ['href', 'tabindex', 'type', 'disabled', 'controls', 'contenteditable'] });\n"],"mappings":";AAGA,MAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,KAAK,IAAI;AAQX,MAAa,wBAAwB,QACnC,eAAe,KAAK,qBAAqB,EAAE,iBAAiB;CAAC;CAAQ;CAAY;CAAQ;CAAY;CAAY;CAAkB,EAAE,CAAC"}
|
package/useIcons.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { t as Icon_default } from "./Icon.js";
|
|
2
|
+
import { t as LazyIcon_default } from "./LazyIcon.js";
|
|
3
|
+
import { t as isComponent } from "./component.js";
|
|
4
|
+
const useIcons = (children) => {
|
|
5
|
+
let leftIcon = null;
|
|
6
|
+
let rightIcon = null;
|
|
7
|
+
const firstChild = children[0];
|
|
8
|
+
if (isComponent(firstChild, Icon_default) || isComponent(firstChild, LazyIcon_default)) {
|
|
9
|
+
leftIcon = firstChild;
|
|
10
|
+
children.shift();
|
|
11
|
+
}
|
|
12
|
+
const lastChild = children[children.length - 1];
|
|
13
|
+
if (isComponent(lastChild, Icon_default) || isComponent(lastChild, LazyIcon_default)) {
|
|
14
|
+
rightIcon = lastChild;
|
|
15
|
+
children.pop();
|
|
16
|
+
}
|
|
17
|
+
const restChildren = children.filter((child) => child);
|
|
18
|
+
return [
|
|
19
|
+
leftIcon,
|
|
20
|
+
rightIcon,
|
|
21
|
+
restChildren.length > 0 ? restChildren : null
|
|
22
|
+
];
|
|
23
|
+
};
|
|
24
|
+
export { useIcons as t };
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=useIcons.js.map
|
package/useIcons.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIcons.js","names":["leftIcon: BaseIconElement | null","rightIcon: BaseIconElement | null"],"sources":["../src/hooks/useIcons.ts"],"sourcesContent":["import Icon, { BaseIconProps, IconProps } from '../components/Icon';\nimport LazyIcon, { LazyIconProps } from '../components/LazyIcon';\nimport { isComponent } from '../utils/component';\n\nexport type BaseIconElement = React.ReactElement<BaseIconProps>;\n\nexport const useIcons = (children: React.ReactNode[]): [BaseIconElement | null, BaseIconElement | null, React.ReactNode[] | null] => {\n let leftIcon: BaseIconElement | null = null;\n let rightIcon: BaseIconElement | null = null;\n\n const firstChild = children[0];\n if (isComponent<IconProps>(firstChild, Icon) || isComponent<LazyIconProps>(firstChild, LazyIcon)) {\n leftIcon = firstChild;\n children.shift();\n }\n\n const lastChild = children[children.length - 1];\n if (isComponent<IconProps>(lastChild, Icon) || isComponent<LazyIconProps>(lastChild, LazyIcon)) {\n rightIcon = lastChild;\n children.pop();\n }\n const restChildren = children.filter(child => child);\n\n return [leftIcon, rightIcon, restChildren.length > 0 ? restChildren : null];\n};\n"],"mappings":";;;AAMA,MAAa,YAAY,aAA4G;CACnI,IAAIA,WAAmC;CACvC,IAAIC,YAAoC;CAExC,MAAM,aAAa,SAAS;AAC5B,KAAI,YAAuB,YAAY,aAAK,IAAI,YAA2B,YAAY,iBAAS,EAAE;AAChG,aAAW;AACX,WAAS,OAAO;;CAGlB,MAAM,YAAY,SAAS,SAAS,SAAS;AAC7C,KAAI,YAAuB,WAAW,aAAK,IAAI,YAA2B,WAAW,iBAAS,EAAE;AAC9F,cAAY;AACZ,WAAS,KAAK;;CAEhB,MAAM,eAAe,SAAS,QAAO,UAAS,MAAM;AAEpD,QAAO;EAAC;EAAU;EAAW,aAAa,SAAS,IAAI,eAAe;EAAK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIdWithFallback.js","names":[],"sources":["../src/hooks/useIdWithFallback.ts"],"sourcesContent":["import { useId } from 'react';\n\n/**\n * Returner unik id som ikke endrer seg for hver render\n * @param initial id som vil overstyre react sin useId\n * @returns stable id-string\n */\nexport const useIdWithFallback = (initial?: string): string => {\n const fallbackId = useId();\n\n return initial || fallbackId;\n};\n"],"mappings":";AAOA,MAAa,qBAAqB,YAA6B;CAC7D,MAAM,aAAa,OAAO;AAE1B,QAAO,WAAW"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
const useIntersectionObserver = (ref, callback, options) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
const intersectionObserver = new IntersectionObserver(callback, options);
|
|
5
|
+
if (ref?.current) intersectionObserver.observe(ref.current);
|
|
6
|
+
return () => {
|
|
7
|
+
if (ref?.current) intersectionObserver.unobserve(ref.current);
|
|
8
|
+
else intersectionObserver.disconnect();
|
|
9
|
+
};
|
|
10
|
+
}, [ref, options]);
|
|
11
|
+
};
|
|
12
|
+
export { useIntersectionObserver as t };
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=useIntersectionObserver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIntersectionObserver.js","names":[],"sources":["../src/hooks/useIntersectionObserver.ts"],"sourcesContent":["import { useEffect } from 'react';\n\n/**\n * Lytt på endringer i synligheten (intersection) til et HTML-element. F.eks. kan du bruke denne til å kalle en callback\n * når elementet er i ferd med å forsvinne ut av vinduet.\n *\n * @param ref Element som skal observeres\n * @param callback Kalles når en endring i intersection er observert\n * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres\n */\n\nexport const useIntersectionObserver = (\n ref: React.RefObject<Element>,\n callback: IntersectionObserverCallback,\n options?: IntersectionObserverInit\n): void => {\n useEffect(() => {\n const intersectionObserver = new IntersectionObserver(callback, options);\n\n if (ref?.current) {\n intersectionObserver.observe(ref.current);\n }\n\n return (): void => {\n if (ref?.current) {\n intersectionObserver.unobserve(ref.current);\n } else {\n intersectionObserver.disconnect();\n }\n };\n }, [ref, options]);\n};\n"],"mappings":";AAWA,MAAa,2BACX,KACA,UACA,YACS;AACT,iBAAgB;EACd,MAAM,uBAAuB,IAAI,qBAAqB,UAAU,QAAQ;AAExE,MAAI,KAAK,QACP,sBAAqB,QAAQ,IAAI,QAAQ;AAG3C,eAAmB;AACjB,OAAI,KAAK,QACP,sBAAqB,UAAU,IAAI,QAAQ;OAE3C,sBAAqB,YAAY;;IAGpC,CAAC,KAAK,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { t as breakpoints } from "./grid.js";
|
|
2
|
+
import { n as useBreakpoint } from "./useBreakpoint.js";
|
|
3
|
+
const useIsMobileBreakpoint = () => {
|
|
4
|
+
return useBreakpoint() < breakpoints.md;
|
|
5
|
+
};
|
|
6
|
+
export { useIsMobileBreakpoint as t };
|
|
7
|
+
|
|
8
|
+
//# sourceMappingURL=useIsMobileBreakpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsMobileBreakpoint.js","names":[],"sources":["../src/hooks/useIsMobileBreakpoint.ts"],"sourcesContent":["import { useBreakpoint } from './useBreakpoint';\nimport { breakpoints } from '../theme/grid';\n\nexport const useIsMobileBreakpoint = (): boolean => {\n const breakpoint = useBreakpoint();\n return breakpoint < breakpoints.md;\n};\n"],"mappings":";;AAGA,MAAa,8BAAuC;AAElD,QADmB,eAAe,GACd,YAAY"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
const useIsServerSide = () => {
|
|
3
|
+
const [isServerSide, setIsServerSide] = useState(true);
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
setIsServerSide(false);
|
|
6
|
+
}, []);
|
|
7
|
+
return isServerSide;
|
|
8
|
+
};
|
|
9
|
+
export { useIsServerSide as t };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=useIsServerSide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsServerSide.js","names":[],"sources":["../src/hooks/useIsServerSide.ts"],"sourcesContent":["import { useState, useEffect } from 'react';\n\n/**\n * Sjekk om React kjører på server, eller ikke. (useEffect kjører ikke på server)\n *\n * @returns true dersom koden kjører på server\n */\nexport const useIsServerSide = (): boolean => {\n const [isServerSide, setIsServerSide] = useState(true);\n\n useEffect(() => {\n setIsServerSide(false);\n }, []);\n\n return isServerSide;\n};\n"],"mappings":";AAOA,MAAa,wBAAiC;CAC5C,MAAM,CAAC,cAAc,mBAAmB,SAAS,KAAK;AAEtD,iBAAgB;AACd,kBAAgB,MAAM;IACrB,EAAE,CAAC;AAEN,QAAO"}
|
package/useIsVisible.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { t as useIntersectionObserver } from "./useIntersectionObserver.js";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
const useIsVisible = (ref, threshold = 1, options, initial = false) => {
|
|
4
|
+
const [isVisible, setIsVisible] = useState(initial);
|
|
5
|
+
const handleIntersectChange = (entries) => {
|
|
6
|
+
setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);
|
|
7
|
+
};
|
|
8
|
+
useIntersectionObserver(ref, handleIntersectChange, {
|
|
9
|
+
threshold,
|
|
10
|
+
...options
|
|
11
|
+
});
|
|
12
|
+
return isVisible;
|
|
13
|
+
};
|
|
14
|
+
export { useIsVisible as t };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=useIsVisible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsVisible.js","names":["handleIntersectChange: IntersectionObserverCallback"],"sources":["../src/hooks/useIsVisible.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIntersectionObserver } from './useIntersectionObserver';\n\n/**\n * Sjekk om et HTML-element er synlig i vinduet, eller ikke.\n *\n * @param ref Element som skal observeres\n * @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)\n * @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres\n * @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig\n * @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke\n */\nexport const useIsVisible = (\n ref: React.RefObject<Element>,\n threshold = 1,\n options?: IntersectionObserverInit,\n initial = false\n): boolean => {\n const [isVisible, setIsVisible] = useState(initial);\n\n const handleIntersectChange: IntersectionObserverCallback = entries => {\n setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);\n };\n\n useIntersectionObserver(ref, handleIntersectChange, { threshold, ...options });\n\n return isVisible;\n};\n"],"mappings":";;AAaA,MAAa,gBACX,KACA,YAAY,GACZ,SACA,UAAU,UACE;CACZ,MAAM,CAAC,WAAW,gBAAgB,SAAS,QAAQ;CAEnD,MAAMA,yBAAsD,YAAW;AACrE,eAAa,cAAc,IAAI,QAAQ,GAAG,sBAAsB,YAAY,QAAQ,GAAG,qBAAqB,UAAU;;AAGxH,yBAAwB,KAAK,uBAAuB;EAAE;EAAW,GAAG;EAAS,CAAC;AAE9E,QAAO"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
const useKeyboardEvent = (ref, callback, key, events = ["keydown"]) => {
|
|
3
|
+
useEffect(() => {
|
|
4
|
+
const handleKeyboardEvent = (event) => {
|
|
5
|
+
if (event.key === key || Array.isArray(key) && key.includes(event.key)) callback(event);
|
|
6
|
+
};
|
|
7
|
+
events.forEach((eventName) => ref.current?.addEventListener(eventName, handleKeyboardEvent));
|
|
8
|
+
return () => {
|
|
9
|
+
events.forEach((eventName) => ref.current?.removeEventListener(eventName, handleKeyboardEvent));
|
|
10
|
+
};
|
|
11
|
+
}, [
|
|
12
|
+
ref,
|
|
13
|
+
callback,
|
|
14
|
+
events,
|
|
15
|
+
key
|
|
16
|
+
]);
|
|
17
|
+
};
|
|
18
|
+
export { useKeyboardEvent as t };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=useKeyboardEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardEvent.js","names":[],"sources":["../src/hooks/useKeyboardEvent.ts"],"sourcesContent":["import { useEffect } from 'react';\n\ntype KeyboardEvents = keyof PickByValue<HTMLElementEventMap, KeyboardEvent>;\n\n/**\n * Kjør en callback når bruker skriver på tastaturet.\n * @param ref Element som skal lyttes på.\n * @param callback Callback som kjøres når det skjer en event.\n * @param key Knapp, eller liste med knapper, som skal trigge callback\n * @param events Liste med keyboard-events som skal trigge callback. Default: \"keydown\"\n */\nexport const useKeyboardEvent = (\n ref: React.RefObject<HTMLElement>,\n callback: (event: HTMLElementEventMap[KeyboardEvents]) => void,\n key: string | string[],\n events: KeyboardEvents[] = ['keydown']\n): void => {\n useEffect(() => {\n const handleKeyboardEvent = (event: HTMLElementEventMap[KeyboardEvents]): void => {\n if (event.key === key || (Array.isArray(key) && key.includes(event.key))) {\n callback(event);\n }\n };\n\n events.forEach(eventName => ref.current?.addEventListener(eventName, handleKeyboardEvent));\n\n return (): void => {\n events.forEach(eventName => ref.current?.removeEventListener(eventName, handleKeyboardEvent));\n };\n }, [ref, callback, events, key]);\n};\n"],"mappings":";AAWA,MAAa,oBACX,KACA,UACA,KACA,SAA2B,CAAC,UAAU,KAC7B;AACT,iBAAgB;EACd,MAAM,uBAAuB,UAAqD;AAChF,OAAI,MAAM,QAAQ,OAAQ,MAAM,QAAQ,IAAI,IAAI,IAAI,SAAS,MAAM,IAAI,CACrE,UAAS,MAAM;;AAInB,SAAO,SAAQ,cAAa,IAAI,SAAS,iBAAiB,WAAW,oBAAoB,CAAC;AAE1F,eAAmB;AACjB,UAAO,SAAQ,cAAa,IAAI,SAAS,oBAAoB,WAAW,oBAAoB,CAAC;;IAE9F;EAAC;EAAK;EAAU;EAAQ;EAAI,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { t as debounce } from "./debounce.js";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
const useLayoutEvent = (callback, events = [
|
|
4
|
+
"layoutchange",
|
|
5
|
+
"resize",
|
|
6
|
+
"orientationchange"
|
|
7
|
+
], debounceMs = 10) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
if (typeof window !== "object") return;
|
|
10
|
+
const [debouncedCallback, teardown] = debounce(callback, debounceMs);
|
|
11
|
+
events.forEach((eventName) => window.addEventListener(eventName, debouncedCallback));
|
|
12
|
+
debouncedCallback();
|
|
13
|
+
return () => {
|
|
14
|
+
teardown();
|
|
15
|
+
events.forEach((eventName) => window.removeEventListener(eventName, debouncedCallback));
|
|
16
|
+
};
|
|
17
|
+
}, []);
|
|
18
|
+
};
|
|
19
|
+
export { useLayoutEvent as t };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=useLayoutEvent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLayoutEvent.js","names":[],"sources":["../src/hooks/useLayoutEvent.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nimport { debounce } from '../utils/debounce';\n\n/**\n * Lytt på ulike layout-events som har betydning for rendring og størrelse på elementer.\n *\n * @param callback Kalles for hver event\n * @param events Liste med events som skal lyttes på\n * @param debounceMs Begrens kall til callback til x antall ms\n */\nexport const useLayoutEvent = (callback: () => void, events = ['layoutchange', 'resize', 'orientationchange'], debounceMs = 10): void => {\n useEffect(() => {\n if (typeof window !== 'object') return;\n const [debouncedCallback, teardown] = debounce(callback, debounceMs);\n\n events.forEach(eventName => window.addEventListener(eventName, debouncedCallback));\n\n debouncedCallback();\n\n return (): void => {\n teardown();\n events.forEach(eventName => window.removeEventListener(eventName, debouncedCallback));\n };\n }, []);\n};\n"],"mappings":";;AAWA,MAAa,kBAAkB,UAAsB,SAAS;CAAC;CAAgB;CAAU;CAAoB,EAAE,aAAa,OAAa;AACvI,iBAAgB;AACd,MAAI,OAAO,WAAW,SAAU;EAChC,MAAM,CAAC,mBAAmB,YAAY,SAAS,UAAU,WAAW;AAEpE,SAAO,SAAQ,cAAa,OAAO,iBAAiB,WAAW,kBAAkB,CAAC;AAElF,qBAAmB;AAEnB,eAAmB;AACjB,aAAU;AACV,UAAO,SAAQ,cAAa,OAAO,oBAAoB,WAAW,kBAAkB,CAAC;;IAEtF,EAAE,CAAC"}
|