@helsenorge/designsystem-react 14.9.2 → 15.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AnchorLink.js +11 -7
- package/lib/AnchorLink.js.map +1 -1
- package/lib/AsChildSlot.js +8 -4
- package/lib/AsChildSlot.js.map +1 -1
- package/lib/Avatar.js +16 -10
- package/lib/Avatar.js.map +1 -1
- package/lib/Badge.js +9 -5
- package/lib/Badge.js.map +1 -1
- package/lib/Button.js +14 -10
- package/lib/Button.js.map +1 -1
- package/lib/CHANGELOG.md +10 -0
- package/lib/Checkbox.js +12 -11
- package/lib/Checkbox.js.map +1 -1
- package/lib/Chip.js +17 -10
- package/lib/Chip.js.map +1 -1
- package/lib/Close.js +12 -8
- package/lib/Close.js.map +1 -1
- package/lib/DictionaryTrigger.js +7 -3
- package/lib/DictionaryTrigger.js.map +1 -1
- package/lib/Drawer.js +26 -19
- package/lib/Drawer.js.map +1 -1
- package/lib/DrawerNavigation.js +9 -4
- package/lib/DrawerNavigation.js.map +1 -1
- package/lib/Duolist.js +10 -6
- package/lib/Duolist.js.map +1 -1
- package/lib/ElementHeader.js +15 -12
- package/lib/ElementHeader.js.map +1 -1
- package/lib/ElementHeaderText.js +7 -5
- package/lib/ElementHeaderText.js.map +1 -1
- package/lib/{_rolldown_dynamic_import_helper.js → ErrorBoundary.js} +14 -11
- package/lib/ErrorBoundary.js.map +1 -0
- package/lib/ErrorWrapper.js +7 -3
- package/lib/ErrorWrapper.js.map +1 -1
- package/lib/Expander.js +20 -14
- package/lib/Expander.js.map +1 -1
- package/lib/FilterButton.js +11 -7
- package/lib/FilterButton.js.map +1 -1
- package/lib/FilterButtonAndChipsWrapper.js +6 -2
- package/lib/FilterButtonAndChipsWrapper.js.map +1 -1
- package/lib/FilterDrawer.js +20 -9
- package/lib/FilterDrawer.js.map +1 -1
- package/lib/FilterLinkList.js +9 -8
- package/lib/FilterLinkList.js.map +1 -1
- package/lib/FilterOverviewLinkList.js +9 -5
- package/lib/FilterOverviewLinkList.js.map +1 -1
- package/lib/FilterOverviewSearch.js +8 -4
- package/lib/FilterOverviewSearch.js.map +1 -1
- package/lib/FilterResultCountAndSortWrapper.js +6 -2
- package/lib/FilterResultCountAndSortWrapper.js.map +1 -1
- package/lib/FilterSearch.js +12 -11
- package/lib/FilterSearch.js.map +1 -1
- package/lib/FilterSort.js +9 -5
- package/lib/FilterSort.js.map +1 -1
- package/lib/FilterStateWrapper.js +6 -2
- package/lib/FilterStateWrapper.js.map +1 -1
- package/lib/FormFieldTag.js +12 -5
- package/lib/FormFieldTag.js.map +1 -1
- package/lib/FormGroup.js +14 -13
- package/lib/FormGroup.js.map +1 -1
- package/lib/FormLayout.js +17 -11
- package/lib/FormLayout.js.map +1 -1
- package/lib/HN.Designsystem.Dropdown.nb-NO.js +1 -0
- package/lib/HelpDetails.js +3 -2
- package/lib/HelpDetails.js.map +1 -1
- package/lib/HelpTriggerIcon.js +15 -10
- package/lib/HelpTriggerIcon.js.map +1 -1
- package/lib/HelpTriggerStandalone.js +11 -7
- package/lib/HelpTriggerStandalone.js.map +1 -1
- package/lib/HighlightPanel.js +9 -5
- package/lib/HighlightPanel.js.map +1 -1
- package/lib/Highlighter.js +10 -6
- package/lib/Highlighter.js.map +1 -1
- package/lib/HorizontalScroll.js +10 -6
- package/lib/HorizontalScroll.js.map +1 -1
- package/lib/Icon.js +6 -2
- package/lib/Icon.js.map +1 -1
- package/lib/Illustration.js +8 -4
- package/lib/Illustration.js.map +1 -1
- package/lib/InfoTeaser.js +13 -6
- package/lib/InfoTeaser.js.map +1 -1
- package/lib/Input.js +30 -25
- package/lib/Input.js.map +1 -1
- package/lib/LazyIcon.js +16 -10
- package/lib/LazyIcon.js.map +1 -1
- package/lib/LazyIllustration.js +16 -12
- package/lib/LazyIllustration.js.map +1 -1
- package/lib/LinkList.js +19 -12
- package/lib/LinkList.js.map +1 -1
- package/lib/List.js +7 -3
- package/lib/List.js.map +1 -1
- package/lib/ListEditMode.js +14 -9
- package/lib/ListEditMode.js.map +1 -1
- package/lib/MaxCharacters.js +5 -5
- package/lib/MaxCharacters.js.map +1 -1
- package/lib/NotificationBadge.js +12 -11
- package/lib/NotificationBadge.js.map +1 -1
- package/lib/PanelTitle.js +7 -3
- package/lib/PanelTitle.js.map +1 -1
- package/lib/PopOver.js +15 -9
- package/lib/PopOver.js.map +1 -1
- package/lib/Select.js +13 -9
- package/lib/Select.js.map +1 -1
- package/lib/SingleSelectItem.js +8 -5
- package/lib/SingleSelectItem.js.map +1 -1
- package/lib/Slider.js +30 -26
- package/lib/Slider.js.map +1 -1
- package/lib/Spacer.js +7 -3
- package/lib/Spacer.js.map +1 -1
- package/lib/StatusDot.js +36 -30
- package/lib/StatusDot.js.map +1 -1
- package/lib/StatusDotList.js +7 -3
- package/lib/StatusDotList.js.map +1 -1
- package/lib/StepButtons.js +8 -4
- package/lib/StepButtons.js.map +1 -1
- package/lib/TabList.js +29 -22
- package/lib/TabList.js.map +1 -1
- package/lib/TabPanel.js +6 -2
- package/lib/TabPanel.js.map +1 -1
- package/lib/TableBody.js +10 -6
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +10 -6
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +14 -10
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +13 -11
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +14 -10
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +17 -13
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +19 -14
- package/lib/TableRow.js.map +1 -1
- package/lib/Textarea.js +18 -11
- package/lib/Textarea.js.map +1 -1
- package/lib/Title.js +8 -5
- package/lib/Title.js.map +1 -1
- package/lib/Toast.js +7 -6
- package/lib/Toast.js.map +1 -1
- package/lib/__mocks__/IntersectionObserver.js +3 -2
- package/lib/__mocks__/IntersectionObserver.js.map +1 -1
- package/lib/__mocks__/MutationObserver.js +3 -2
- package/lib/__mocks__/MutationObserver.js.map +1 -1
- package/lib/__mocks__/ResizeObserver.js +3 -2
- package/lib/__mocks__/ResizeObserver.js.map +1 -1
- package/lib/__mocks__/matchMedia.js +3 -1
- package/lib/__mocks__/matchMedia.js.map +1 -1
- package/lib/__mocks__/useLayoutEvent.js +2 -0
- package/lib/__mocks__/useLayoutEvent.js.map +1 -1
- package/lib/__mocks__/useOutsideEvent.js +2 -0
- package/lib/__mocks__/useOutsideEvent.js.map +1 -1
- package/lib/__mocks__/usePseudoClasses.js +2 -0
- package/lib/__mocks__/usePseudoClasses.js.map +1 -1
- package/lib/__mocks__/useSize.js +2 -0
- package/lib/__mocks__/useSize.js.map +1 -1
- package/lib/__mocks__/uuid.js +6 -1
- package/lib/__mocks__/uuid.js.map +1 -1
- package/lib/components/ArticleTeaser/index.js +10 -3
- package/lib/components/ArticleTeaser/index.js.map +1 -1
- package/lib/components/Checkbox/index.js +5 -1
- package/lib/components/Checkbox/index.js.map +1 -0
- package/lib/components/Chip/Chip.d.ts +0 -2
- package/lib/components/Dropdown/SingleSelect/index.js +4 -2
- package/lib/components/Dropdown/SingleSelect/index.js.map +1 -1
- package/lib/components/Dropdown/index.js +27 -19
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/DropdownOld/index.js +25 -17
- package/lib/components/DropdownOld/index.js.map +1 -1
- package/lib/components/ElementHeader/index.js +4 -2
- package/lib/components/ElementHeader/index.js.map +1 -1
- package/lib/components/EmptyState/index.js +23 -17
- package/lib/components/EmptyState/index.js.map +1 -1
- package/lib/components/ExpanderHierarchy/index.js +23 -16
- package/lib/components/ExpanderHierarchy/index.js.map +1 -1
- package/lib/components/ExpanderList/index.js +13 -9
- package/lib/components/ExpanderList/index.js.map +1 -1
- package/lib/components/EyebrowHeader/index.js +6 -2
- package/lib/components/EyebrowHeader/index.js.map +1 -1
- package/lib/components/FavoriteButton/index.js +20 -11
- package/lib/components/FavoriteButton/index.js.map +1 -1
- package/lib/components/Filter/DrawerNavigation/index.js +6 -2
- package/lib/components/Filter/DrawerNavigation/index.js.map +1 -0
- package/lib/components/Filter/FilterLinkList/index.js +6 -2
- package/lib/components/Filter/FilterLinkList/index.js.map +1 -0
- package/lib/components/Filter/FilterSearch/index.js +6 -1
- package/lib/components/Filter/FilterSearch/index.js.map +1 -0
- package/lib/components/Filter/index.js +50 -12
- package/lib/components/Filter/index.js.map +1 -1
- package/lib/components/FormGroup/index.js +4 -2
- package/lib/components/FormGroup/index.js.map +1 -1
- package/lib/components/HelpBubble/index.js +11 -4
- package/lib/components/HelpBubble/index.js.map +1 -1
- package/lib/components/HelpDrawer/index.js +10 -3
- package/lib/components/HelpDrawer/index.js.map +1 -1
- package/lib/components/HelpExpanderInline/index.js +8 -4
- package/lib/components/HelpExpanderInline/index.js.map +1 -1
- package/lib/components/HelpExpanderStandalone/index.js +14 -10
- package/lib/components/HelpExpanderStandalone/index.js.map +1 -1
- package/lib/components/HelpPanel/index.js +6 -2
- package/lib/components/HelpPanel/index.js.map +1 -1
- package/lib/components/HelpTeaser/index.js +6 -2
- package/lib/components/HelpTeaser/index.js.map +1 -1
- package/lib/components/HelpTooltip/index.js +6 -2
- package/lib/components/HelpTooltip/index.js.map +1 -1
- package/lib/components/HelpTriggerInline/index.js +8 -4
- package/lib/components/HelpTriggerInline/index.js.map +1 -1
- package/lib/components/Icon/index.js +1 -1
- package/lib/components/Icons/ActiveMonitoring.js +3 -2
- package/lib/components/Icons/ActiveMonitoring.js.map +1 -1
- package/lib/components/Icons/AcupunctureBack.js +4 -3
- package/lib/components/Icons/AcupunctureBack.js.map +1 -1
- package/lib/components/Icons/AdditionalIconInformation.js +2 -0
- package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/lib/components/Icons/AlarmClock.js +3 -2
- package/lib/components/Icons/AlarmClock.js.map +1 -1
- package/lib/components/Icons/AlertSignFill.js +17 -2
- package/lib/components/Icons/AlertSignFill.js.map +1 -0
- package/lib/components/Icons/AlertSignStroke.js +17 -2
- package/lib/components/Icons/AlertSignStroke.js.map +1 -0
- package/lib/components/Icons/Amputation.js +3 -2
- package/lib/components/Icons/Amputation.js.map +1 -1
- package/lib/components/Icons/Anxiety.js +3 -2
- package/lib/components/Icons/Anxiety.js.map +1 -1
- package/lib/components/Icons/Apple.js +3 -2
- package/lib/components/Icons/Apple.js.map +1 -1
- package/lib/components/Icons/Archive.js +3 -2
- package/lib/components/Icons/Archive.js.map +1 -1
- package/lib/components/Icons/ArmFlexing.js +3 -2
- package/lib/components/Icons/ArmFlexing.js.map +1 -1
- package/lib/components/Icons/ArrowDown.js +29 -2
- package/lib/components/Icons/ArrowDown.js.map +1 -0
- package/lib/components/Icons/ArrowLeft.js +3 -2
- package/lib/components/Icons/ArrowLeft.js.map +1 -1
- package/lib/components/Icons/ArrowRight.js +17 -2
- package/lib/components/Icons/ArrowRight.js.map +1 -0
- package/lib/components/Icons/ArrowUp.js +29 -2
- package/lib/components/Icons/ArrowUp.js.map +1 -0
- package/lib/components/Icons/ArrowUpRight.js +17 -2
- package/lib/components/Icons/ArrowUpRight.js.map +1 -0
- package/lib/components/Icons/Attachment.js +3 -2
- package/lib/components/Icons/Attachment.js.map +1 -1
- package/lib/components/Icons/Atv.js +3 -2
- package/lib/components/Icons/Atv.js.map +1 -1
- package/lib/components/Icons/Avatar.js +3 -2
- package/lib/components/Icons/Avatar.js.map +1 -1
- package/lib/components/Icons/AwakePersonOnPillow.js +3 -2
- package/lib/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/lib/components/Icons/Baby.js +3 -2
- package/lib/components/Icons/Baby.js.map +1 -1
- package/lib/components/Icons/BandAid.js +3 -2
- package/lib/components/Icons/BandAid.js.map +1 -1
- package/lib/components/Icons/BeerAndPills.js +3 -2
- package/lib/components/Icons/BeerAndPills.js.map +1 -1
- package/lib/components/Icons/Bell.js +3 -2
- package/lib/components/Icons/Bell.js.map +1 -1
- package/lib/components/Icons/Bike.js +3 -2
- package/lib/components/Icons/Bike.js.map +1 -1
- package/lib/components/Icons/BirthControl.js +3 -2
- package/lib/components/Icons/BirthControl.js.map +1 -1
- package/lib/components/Icons/BirthdayCake.js +3 -2
- package/lib/components/Icons/BirthdayCake.js.map +1 -1
- package/lib/components/Icons/Boat.js +3 -2
- package/lib/components/Icons/Boat.js.map +1 -1
- package/lib/components/Icons/Body.js +3 -2
- package/lib/components/Icons/Body.js.map +1 -1
- package/lib/components/Icons/Braille.js +3 -2
- package/lib/components/Icons/Braille.js.map +1 -1
- package/lib/components/Icons/Brain.js +3 -2
- package/lib/components/Icons/Brain.js.map +1 -1
- package/lib/components/Icons/BreastReconstruction.js +3 -2
- package/lib/components/Icons/BreastReconstruction.js.map +1 -1
- package/lib/components/Icons/BreastRemoval.js +3 -2
- package/lib/components/Icons/BreastRemoval.js.map +1 -1
- package/lib/components/Icons/Breasts.js +3 -2
- package/lib/components/Icons/Breasts.js.map +1 -1
- package/lib/components/Icons/BrokenHeart.js +3 -2
- package/lib/components/Icons/BrokenHeart.js.map +1 -1
- package/lib/components/Icons/BrokenPuzzle.js +3 -2
- package/lib/components/Icons/BrokenPuzzle.js.map +1 -1
- package/lib/components/Icons/Bus.js +3 -2
- package/lib/components/Icons/Bus.js.map +1 -1
- package/lib/components/Icons/Calendar.js +3 -2
- package/lib/components/Icons/Calendar.js.map +1 -1
- package/lib/components/Icons/CalendarChange.js +3 -2
- package/lib/components/Icons/CalendarChange.js.map +1 -1
- package/lib/components/Icons/CalendarCheck.js +3 -2
- package/lib/components/Icons/CalendarCheck.js.map +1 -1
- package/lib/components/Icons/CalendarEvent.js +3 -2
- package/lib/components/Icons/CalendarEvent.js.map +1 -1
- package/lib/components/Icons/CalendarSave.js +3 -2
- package/lib/components/Icons/CalendarSave.js.map +1 -1
- package/lib/components/Icons/Cancer.js +3 -2
- package/lib/components/Icons/Cancer.js.map +1 -1
- package/lib/components/Icons/Candle.js +3 -2
- package/lib/components/Icons/Candle.js.map +1 -1
- package/lib/components/Icons/Car.js +3 -2
- package/lib/components/Icons/Car.js.map +1 -1
- package/lib/components/Icons/Carton.js +3 -2
- package/lib/components/Icons/Carton.js.map +1 -1
- package/lib/components/Icons/Change.js +3 -2
- package/lib/components/Icons/Change.js.map +1 -1
- package/lib/components/Icons/Check.js +17 -2
- package/lib/components/Icons/Check.js.map +1 -0
- package/lib/components/Icons/CheckFill.js +29 -2
- package/lib/components/Icons/CheckFill.js.map +1 -0
- package/lib/components/Icons/CheckOutline.js +15 -2
- package/lib/components/Icons/CheckOutline.js.map +1 -0
- package/lib/components/Icons/Chest.js +3 -2
- package/lib/components/Icons/Chest.js.map +1 -1
- package/lib/components/Icons/ChevronDown.js +17 -2
- package/lib/components/Icons/ChevronDown.js.map +1 -0
- package/lib/components/Icons/ChevronLeft.js +17 -2
- package/lib/components/Icons/ChevronLeft.js.map +1 -0
- package/lib/components/Icons/ChevronRight.js +17 -2
- package/lib/components/Icons/ChevronRight.js.map +1 -0
- package/lib/components/Icons/ChevronUp.js +17 -2
- package/lib/components/Icons/ChevronUp.js.map +1 -0
- package/lib/components/Icons/ChevronsDown.js +3 -2
- package/lib/components/Icons/ChevronsDown.js.map +1 -1
- package/lib/components/Icons/ChevronsUp.js +3 -2
- package/lib/components/Icons/ChevronsUp.js.map +1 -1
- package/lib/components/Icons/ChildPlaying.js +3 -2
- package/lib/components/Icons/ChildPlaying.js.map +1 -1
- package/lib/components/Icons/Cigarette.js +3 -2
- package/lib/components/Icons/Cigarette.js.map +1 -1
- package/lib/components/Icons/Coins.js +3 -2
- package/lib/components/Icons/Coins.js.map +1 -1
- package/lib/components/Icons/Contacts.js +3 -2
- package/lib/components/Icons/Contacts.js.map +1 -1
- package/lib/components/Icons/Copy.js +3 -2
- package/lib/components/Icons/Copy.js.map +1 -1
- package/lib/components/Icons/CoronaCertificate.js +3 -2
- package/lib/components/Icons/CoronaCertificate.js.map +1 -1
- package/lib/components/Icons/Coronavirus.js +3 -2
- package/lib/components/Icons/Coronavirus.js.map +1 -1
- package/lib/components/Icons/Cough.js +3 -2
- package/lib/components/Icons/Cough.js.map +1 -1
- package/lib/components/Icons/CreditCard.js +3 -2
- package/lib/components/Icons/CreditCard.js.map +1 -1
- package/lib/components/Icons/CriticalHealthInfo.js +3 -2
- package/lib/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/lib/components/Icons/Cross.js +3 -2
- package/lib/components/Icons/Cross.js.map +1 -1
- package/lib/components/Icons/DataExchange.js +3 -2
- package/lib/components/Icons/DataExchange.js.map +1 -1
- package/lib/components/Icons/DataReceived.js +3 -2
- package/lib/components/Icons/DataReceived.js.map +1 -1
- package/lib/components/Icons/DataSent.js +3 -2
- package/lib/components/Icons/DataSent.js.map +1 -1
- package/lib/components/Icons/Depression.js +3 -2
- package/lib/components/Icons/Depression.js.map +1 -1
- package/lib/components/Icons/DigestiveSystem.js +3 -2
- package/lib/components/Icons/DigestiveSystem.js.map +1 -1
- package/lib/components/Icons/Dizzy.js +3 -2
- package/lib/components/Icons/Dizzy.js.map +1 -1
- package/lib/components/Icons/Documents.js +3 -2
- package/lib/components/Icons/Documents.js.map +1 -1
- package/lib/components/Icons/Dog.js +3 -2
- package/lib/components/Icons/Dog.js.map +1 -1
- package/lib/components/Icons/DonorCard.js +3 -2
- package/lib/components/Icons/DonorCard.js.map +1 -1
- package/lib/components/Icons/DotAttachment.js +3 -2
- package/lib/components/Icons/DotAttachment.js.map +1 -1
- package/lib/components/Icons/DotCheckmark.js +3 -2
- package/lib/components/Icons/DotCheckmark.js.map +1 -1
- package/lib/components/Icons/DotCircleArrows.js +3 -2
- package/lib/components/Icons/DotCircleArrows.js.map +1 -1
- package/lib/components/Icons/DotDot.js +3 -2
- package/lib/components/Icons/DotDot.js.map +1 -1
- package/lib/components/Icons/DotExclamationMark.js +3 -2
- package/lib/components/Icons/DotExclamationMark.js.map +1 -1
- package/lib/components/Icons/DotFill.js +3 -2
- package/lib/components/Icons/DotFill.js.map +1 -1
- package/lib/components/Icons/DotGroup.js +3 -2
- package/lib/components/Icons/DotGroup.js.map +1 -1
- package/lib/components/Icons/DotHalfDisc.js +3 -2
- package/lib/components/Icons/DotHalfDisc.js.map +1 -1
- package/lib/components/Icons/DotInfo.js +3 -2
- package/lib/components/Icons/DotInfo.js.map +1 -1
- package/lib/components/Icons/DotLogin.js +3 -2
- package/lib/components/Icons/DotLogin.js.map +1 -1
- package/lib/components/Icons/DotLookingGlass.js +3 -2
- package/lib/components/Icons/DotLookingGlass.js.map +1 -1
- package/lib/components/Icons/DotNoAccess.js +3 -2
- package/lib/components/Icons/DotNoAccess.js.map +1 -1
- package/lib/components/Icons/DotNoEye.js +3 -2
- package/lib/components/Icons/DotNoEye.js.map +1 -1
- package/lib/components/Icons/DotOutline.js +3 -2
- package/lib/components/Icons/DotOutline.js.map +1 -1
- package/lib/components/Icons/DotPencil.js +3 -2
- package/lib/components/Icons/DotPencil.js.map +1 -1
- package/lib/components/Icons/DotQuestionMark.js +3 -2
- package/lib/components/Icons/DotQuestionMark.js.map +1 -1
- package/lib/components/Icons/DotTriangle.js +3 -2
- package/lib/components/Icons/DotTriangle.js.map +1 -1
- package/lib/components/Icons/DotX.js +3 -2
- package/lib/components/Icons/DotX.js.map +1 -1
- package/lib/components/Icons/Download.js +3 -2
- package/lib/components/Icons/Download.js.map +1 -1
- package/lib/components/Icons/Draft.js +3 -2
- package/lib/components/Icons/Draft.js.map +1 -1
- package/lib/components/Icons/Drag.js +3 -2
- package/lib/components/Icons/Drag.js.map +1 -1
- package/lib/components/Icons/EChat.js +3 -2
- package/lib/components/Icons/EChat.js.map +1 -1
- package/lib/components/Icons/Ear.js +3 -2
- package/lib/components/Icons/Ear.js.map +1 -1
- package/lib/components/Icons/EarDeaf.js +3 -2
- package/lib/components/Icons/EarDeaf.js.map +1 -1
- package/lib/components/Icons/EarHearingAid.js +3 -2
- package/lib/components/Icons/EarHearingAid.js.map +1 -1
- package/lib/components/Icons/EarNoseThroat.js +3 -2
- package/lib/components/Icons/EarNoseThroat.js.map +1 -1
- package/lib/components/Icons/EarVolume.js +3 -2
- package/lib/components/Icons/EarVolume.js.map +1 -1
- package/lib/components/Icons/Edit.js +3 -2
- package/lib/components/Icons/Edit.js.map +1 -1
- package/lib/components/Icons/ElderlyPerson.js +3 -2
- package/lib/components/Icons/ElderlyPerson.js.map +1 -1
- package/lib/components/Icons/Embolization.js +3 -2
- package/lib/components/Icons/Embolization.js.map +1 -1
- package/lib/components/Icons/EmergencyCall.js +3 -2
- package/lib/components/Icons/EmergencyCall.js.map +1 -1
- package/lib/components/Icons/EmoticonAnnoyed.js +3 -2
- package/lib/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/lib/components/Icons/EmoticonDelighted.js +3 -2
- package/lib/components/Icons/EmoticonDelighted.js.map +1 -1
- package/lib/components/Icons/EmoticonDisappointed.js +3 -2
- package/lib/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/lib/components/Icons/EmoticonHappy.js +3 -2
- package/lib/components/Icons/EmoticonHappy.js.map +1 -1
- package/lib/components/Icons/EmoticonMeh.js +3 -2
- package/lib/components/Icons/EmoticonMeh.js.map +1 -1
- package/lib/components/Icons/EmptyBox.js +17 -2
- package/lib/components/Icons/EmptyBox.js.map +1 -0
- package/lib/components/Icons/EnterFullScreen.js +3 -2
- package/lib/components/Icons/EnterFullScreen.js.map +1 -1
- package/lib/components/Icons/Envelope.js +3 -2
- package/lib/components/Icons/Envelope.js.map +1 -1
- package/lib/components/Icons/Epilepsy.js +3 -2
- package/lib/components/Icons/Epilepsy.js.map +1 -1
- package/lib/components/Icons/Eraser.js +3 -2
- package/lib/components/Icons/Eraser.js.map +1 -1
- package/lib/components/Icons/ErrorSignFill.js +17 -2
- package/lib/components/Icons/ErrorSignFill.js.map +1 -0
- package/lib/components/Icons/ErrorSignStroke.js +3 -2
- package/lib/components/Icons/ErrorSignStroke.js.map +1 -1
- package/lib/components/Icons/EuropeanHealthCard.js +3 -2
- package/lib/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/lib/components/Icons/ExitFullScreen.js +3 -2
- package/lib/components/Icons/ExitFullScreen.js.map +1 -1
- package/lib/components/Icons/Eye.js +3 -2
- package/lib/components/Icons/Eye.js.map +1 -1
- package/lib/components/Icons/Facebook.js +3 -2
- package/lib/components/Icons/Facebook.js.map +1 -1
- package/lib/components/Icons/FallingLeaf.js +3 -2
- package/lib/components/Icons/FallingLeaf.js.map +1 -1
- package/lib/components/Icons/Feedback.js +3 -2
- package/lib/components/Icons/Feedback.js.map +1 -1
- package/lib/components/Icons/Female.js +3 -2
- package/lib/components/Icons/Female.js.map +1 -1
- package/lib/components/Icons/FemaleDoctor.js +3 -2
- package/lib/components/Icons/FemaleDoctor.js.map +1 -1
- package/lib/components/Icons/Ferry.js +3 -2
- package/lib/components/Icons/Ferry.js.map +1 -1
- package/lib/components/Icons/File.js +3 -2
- package/lib/components/Icons/File.js.map +1 -1
- package/lib/components/Icons/Filter.js +45 -2
- package/lib/components/Icons/Filter.js.map +1 -0
- package/lib/components/Icons/FingerBleed.js +3 -2
- package/lib/components/Icons/FingerBleed.js.map +1 -1
- package/lib/components/Icons/FirstAidKit.js +3 -2
- package/lib/components/Icons/FirstAidKit.js.map +1 -1
- package/lib/components/Icons/Fish.js +3 -2
- package/lib/components/Icons/Fish.js.map +1 -1
- package/lib/components/Icons/FloppyDisk.js +3 -2
- package/lib/components/Icons/FloppyDisk.js.map +1 -1
- package/lib/components/Icons/Football.js +3 -2
- package/lib/components/Icons/Football.js.map +1 -1
- package/lib/components/Icons/Form.js +3 -2
- package/lib/components/Icons/Form.js.map +1 -1
- package/lib/components/Icons/Forward.js +17 -2
- package/lib/components/Icons/Forward.js.map +1 -0
- package/lib/components/Icons/Gallery.js +3 -2
- package/lib/components/Icons/Gallery.js.map +1 -1
- package/lib/components/Icons/Garden.js +3 -2
- package/lib/components/Icons/Garden.js.map +1 -1
- package/lib/components/Icons/GasCan.js +3 -2
- package/lib/components/Icons/GasCan.js.map +1 -1
- package/lib/components/Icons/GenderIdentity.js +3 -2
- package/lib/components/Icons/GenderIdentity.js.map +1 -1
- package/lib/components/Icons/GlassWater.js +3 -2
- package/lib/components/Icons/GlassWater.js.map +1 -1
- package/lib/components/Icons/Glasses.js +3 -2
- package/lib/components/Icons/Glasses.js.map +1 -1
- package/lib/components/Icons/Globe.js +3 -2
- package/lib/components/Icons/Globe.js.map +1 -1
- package/lib/components/Icons/Grain.js +3 -2
- package/lib/components/Icons/Grain.js.map +1 -1
- package/lib/components/Icons/Graph.js +3 -2
- package/lib/components/Icons/Graph.js.map +1 -1
- package/lib/components/Icons/Group.js +3 -2
- package/lib/components/Icons/Group.js.map +1 -1
- package/lib/components/Icons/GroupTwins.js +3 -2
- package/lib/components/Icons/GroupTwins.js.map +1 -1
- package/lib/components/Icons/HTMLFile.js +3 -2
- package/lib/components/Icons/HTMLFile.js.map +1 -1
- package/lib/components/Icons/HandWaving.js +9 -2
- package/lib/components/Icons/HandWaving.js.map +1 -0
- package/lib/components/Icons/HandWithDisease.js +3 -2
- package/lib/components/Icons/HandWithDisease.js.map +1 -1
- package/lib/components/Icons/HandsAndHeart.js +3 -2
- package/lib/components/Icons/HandsAndHeart.js.map +1 -1
- package/lib/components/Icons/HealthClinic.js +3 -2
- package/lib/components/Icons/HealthClinic.js.map +1 -1
- package/lib/components/Icons/HealthMeasurements.js +3 -2
- package/lib/components/Icons/HealthMeasurements.js.map +1 -1
- package/lib/components/Icons/HealthWarning.js +3 -2
- package/lib/components/Icons/HealthWarning.js.map +1 -1
- package/lib/components/Icons/HealthcarePerson.js +3 -2
- package/lib/components/Icons/HealthcarePerson.js.map +1 -1
- package/lib/components/Icons/HealthcarePersonell.js +3 -2
- package/lib/components/Icons/HealthcarePersonell.js.map +1 -1
- package/lib/components/Icons/HearingProtection.js +3 -2
- package/lib/components/Icons/HearingProtection.js.map +1 -1
- package/lib/components/Icons/Heart.js +3 -2
- package/lib/components/Icons/Heart.js.map +1 -1
- package/lib/components/Icons/HeartHands.js +3 -2
- package/lib/components/Icons/HeartHands.js.map +1 -1
- package/lib/components/Icons/HelpSign.js +3 -2
- package/lib/components/Icons/HelpSign.js.map +1 -1
- package/lib/components/Icons/HelpingHand.js +3 -2
- package/lib/components/Icons/HelpingHand.js.map +1 -1
- package/lib/components/Icons/Hemodialysis.js +3 -2
- package/lib/components/Icons/Hemodialysis.js.map +1 -1
- package/lib/components/Icons/Hiker.js +3 -2
- package/lib/components/Icons/Hiker.js.map +1 -1
- package/lib/components/Icons/Hipprosthesis.js +3 -2
- package/lib/components/Icons/Hipprosthesis.js.map +1 -1
- package/lib/components/Icons/History.js +3 -2
- package/lib/components/Icons/History.js.map +1 -1
- package/lib/components/Icons/HivAndAids.js +3 -2
- package/lib/components/Icons/HivAndAids.js.map +1 -1
- package/lib/components/Icons/Home.js +3 -2
- package/lib/components/Icons/Home.js.map +1 -1
- package/lib/components/Icons/HomeFill.js +3 -2
- package/lib/components/Icons/HomeFill.js.map +1 -1
- package/lib/components/Icons/Hormone.js +3 -2
- package/lib/components/Icons/Hormone.js.map +1 -1
- package/lib/components/Icons/Hospital.js +3 -2
- package/lib/components/Icons/Hospital.js.map +1 -1
- package/lib/components/Icons/Hourglass.js +3 -2
- package/lib/components/Icons/Hourglass.js.map +1 -1
- package/lib/components/Icons/IconNames.js +4 -1
- package/lib/components/Icons/IconNames.js.map +1 -1
- package/lib/components/Icons/ImgFile.js +3 -2
- package/lib/components/Icons/ImgFile.js.map +1 -1
- package/lib/components/Icons/Inbox.js +3 -2
- package/lib/components/Icons/Inbox.js.map +1 -1
- package/lib/components/Icons/InfoSignFill.js +17 -2
- package/lib/components/Icons/InfoSignFill.js.map +1 -0
- package/lib/components/Icons/InfoSignStroke.js +3 -2
- package/lib/components/Icons/InfoSignStroke.js.map +1 -1
- package/lib/components/Icons/Instagram.js +3 -2
- package/lib/components/Icons/Instagram.js.map +1 -1
- package/lib/components/Icons/Intravenous.js +3 -2
- package/lib/components/Icons/Intravenous.js.map +1 -1
- package/lib/components/Icons/JointPain.js +3 -2
- package/lib/components/Icons/JointPain.js.map +1 -1
- package/lib/components/Icons/Journal.js +3 -2
- package/lib/components/Icons/Journal.js.map +1 -1
- package/lib/components/Icons/JpgFile.js +3 -2
- package/lib/components/Icons/JpgFile.js.map +1 -1
- package/lib/components/Icons/Kidney.js +3 -2
- package/lib/components/Icons/Kidney.js.map +1 -1
- package/lib/components/Icons/KitchenScale.js +3 -2
- package/lib/components/Icons/KitchenScale.js.map +1 -1
- package/lib/components/Icons/Kjernejournal.js +3 -2
- package/lib/components/Icons/Kjernejournal.js.map +1 -1
- package/lib/components/Icons/Laboratory.js +3 -2
- package/lib/components/Icons/Laboratory.js.map +1 -1
- package/lib/components/Icons/LaptopBlog.js +3 -2
- package/lib/components/Icons/LaptopBlog.js.map +1 -1
- package/lib/components/Icons/LawBook.js +3 -2
- package/lib/components/Icons/LawBook.js.map +1 -1
- package/lib/components/Icons/LegalDocument.js +3 -2
- package/lib/components/Icons/LegalDocument.js.map +1 -1
- package/lib/components/Icons/LightBulb.js +3 -2
- package/lib/components/Icons/LightBulb.js.map +1 -1
- package/lib/components/Icons/List.js +3 -2
- package/lib/components/Icons/List.js.map +1 -1
- package/lib/components/Icons/Location.js +3 -2
- package/lib/components/Icons/Location.js.map +1 -1
- package/lib/components/Icons/LocationFill.js +3 -2
- package/lib/components/Icons/LocationFill.js.map +1 -1
- package/lib/components/Icons/Lock.js +3 -2
- package/lib/components/Icons/Lock.js.map +1 -1
- package/lib/components/Icons/Login.js +3 -2
- package/lib/components/Icons/Login.js.map +1 -1
- package/lib/components/Icons/Logout.js +3 -2
- package/lib/components/Icons/Logout.js.map +1 -1
- package/lib/components/Icons/Lungs.js +3 -2
- package/lib/components/Icons/Lungs.js.map +1 -1
- package/lib/components/Icons/Makeup.js +3 -2
- package/lib/components/Icons/Makeup.js.map +1 -1
- package/lib/components/Icons/MaleDoctor.js +3 -2
- package/lib/components/Icons/MaleDoctor.js.map +1 -1
- package/lib/components/Icons/MaleDoctorAndPerson.js +3 -2
- package/lib/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompact.js +3 -2
- package/lib/components/Icons/MaleDoctorCompact.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompactFill.js +3 -2
- package/lib/components/Icons/MaleDoctorCompactFill.js.map +1 -1
- package/lib/components/Icons/MaleGenitalia.js +3 -2
- package/lib/components/Icons/MaleGenitalia.js.map +1 -1
- package/lib/components/Icons/MeasuringTape.js +3 -2
- package/lib/components/Icons/MeasuringTape.js.map +1 -1
- package/lib/components/Icons/Medicine.js +3 -2
- package/lib/components/Icons/Medicine.js.map +1 -1
- package/lib/components/Icons/MedicineWarning.js +3 -2
- package/lib/components/Icons/MedicineWarning.js.map +1 -1
- package/lib/components/Icons/MentalHealthAdult.js +3 -2
- package/lib/components/Icons/MentalHealthAdult.js.map +1 -1
- package/lib/components/Icons/MentalHealthChild.js +3 -2
- package/lib/components/Icons/MentalHealthChild.js.map +1 -1
- package/lib/components/Icons/Menu.js +3 -2
- package/lib/components/Icons/Menu.js.map +1 -1
- package/lib/components/Icons/Microscope.js +3 -2
- package/lib/components/Icons/Microscope.js.map +1 -1
- package/lib/components/Icons/Minus.js +3 -2
- package/lib/components/Icons/Minus.js.map +1 -1
- package/lib/components/Icons/Mirror.js +3 -2
- package/lib/components/Icons/Mirror.js.map +1 -1
- package/lib/components/Icons/MobilePhone.js +3 -2
- package/lib/components/Icons/MobilePhone.js.map +1 -1
- package/lib/components/Icons/MotherHoldingBaby.js +3 -2
- package/lib/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/lib/components/Icons/MuscleBack.js +3 -2
- package/lib/components/Icons/MuscleBack.js.map +1 -1
- package/lib/components/Icons/MuscleLeg.js +3 -2
- package/lib/components/Icons/MuscleLeg.js.map +1 -1
- package/lib/components/Icons/Mushroom.js +3 -2
- package/lib/components/Icons/Mushroom.js.map +1 -1
- package/lib/components/Icons/Music.js +3 -2
- package/lib/components/Icons/Music.js.map +1 -1
- package/lib/components/Icons/MusselsAndSalt.js +3 -2
- package/lib/components/Icons/MusselsAndSalt.js.map +1 -1
- package/lib/components/Icons/NoAccess.js +3 -2
- package/lib/components/Icons/NoAccess.js.map +1 -1
- package/lib/components/Icons/NoEye.js +3 -2
- package/lib/components/Icons/NoEye.js.map +1 -1
- package/lib/components/Icons/NoFilter.js +3 -2
- package/lib/components/Icons/NoFilter.js.map +1 -1
- package/lib/components/Icons/Notepad.js +3 -2
- package/lib/components/Icons/Notepad.js.map +1 -1
- package/lib/components/Icons/Osteotomy.js +3 -2
- package/lib/components/Icons/Osteotomy.js.map +1 -1
- package/lib/components/Icons/PaintRoller.js +3 -2
- package/lib/components/Icons/PaintRoller.js.map +1 -1
- package/lib/components/Icons/PaperPlane.js +3 -2
- package/lib/components/Icons/PaperPlane.js.map +1 -1
- package/lib/components/Icons/PatientAndPerson.js +3 -2
- package/lib/components/Icons/PatientAndPerson.js.map +1 -1
- package/lib/components/Icons/Pause.js +3 -2
- package/lib/components/Icons/Pause.js.map +1 -1
- package/lib/components/Icons/PdfFile.js +3 -2
- package/lib/components/Icons/PdfFile.js.map +1 -1
- package/lib/components/Icons/Pencil.js +3 -2
- package/lib/components/Icons/Pencil.js.map +1 -1
- package/lib/components/Icons/PeopleTalking.js +3 -2
- package/lib/components/Icons/PeopleTalking.js.map +1 -1
- package/lib/components/Icons/Peritonealdialysis.js +3 -2
- package/lib/components/Icons/Peritonealdialysis.js.map +1 -1
- package/lib/components/Icons/Person.js +3 -2
- package/lib/components/Icons/Person.js.map +1 -1
- package/lib/components/Icons/PersonAndPatient.js +3 -2
- package/lib/components/Icons/PersonAndPatient.js.map +1 -1
- package/lib/components/Icons/PersonCancel.js +3 -2
- package/lib/components/Icons/PersonCancel.js.map +1 -1
- package/lib/components/Icons/PersonInXRayMachine.js +3 -2
- package/lib/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/lib/components/Icons/PersonOverweight.js +3 -2
- package/lib/components/Icons/PersonOverweight.js.map +1 -1
- package/lib/components/Icons/PersonRelaxing.js +3 -2
- package/lib/components/Icons/PersonRelaxing.js.map +1 -1
- package/lib/components/Icons/PersonWithBrain.js +3 -2
- package/lib/components/Icons/PersonWithBrain.js.map +1 -1
- package/lib/components/Icons/PersonWithBrokenArm.js +3 -2
- package/lib/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/lib/components/Icons/PersonWithCrutches.js +3 -2
- package/lib/components/Icons/PersonWithCrutches.js.map +1 -1
- package/lib/components/Icons/PersonWithJaw.js +3 -2
- package/lib/components/Icons/PersonWithJaw.js.map +1 -1
- package/lib/components/Icons/PersonWithMagnifyingGlass.js +3 -2
- package/lib/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/lib/components/Icons/PersonWithSenses.js +3 -2
- package/lib/components/Icons/PersonWithSenses.js.map +1 -1
- package/lib/components/Icons/PersonWorking.js +3 -2
- package/lib/components/Icons/PersonWorking.js.map +1 -1
- package/lib/components/Icons/PersonalPlan.js +3 -2
- package/lib/components/Icons/PersonalPlan.js.map +1 -1
- package/lib/components/Icons/PizzaSlice.js +3 -2
- package/lib/components/Icons/PizzaSlice.js.map +1 -1
- package/lib/components/Icons/Plane.js +3 -2
- package/lib/components/Icons/Plane.js.map +1 -1
- package/lib/components/Icons/Plant.js +3 -2
- package/lib/components/Icons/Plant.js.map +1 -1
- package/lib/components/Icons/PlateKnifeFork.js +3 -2
- package/lib/components/Icons/PlateKnifeFork.js.map +1 -1
- package/lib/components/Icons/Play.js +3 -2
- package/lib/components/Icons/Play.js.map +1 -1
- package/lib/components/Icons/PlusLarge.js +3 -2
- package/lib/components/Icons/PlusLarge.js.map +1 -1
- package/lib/components/Icons/PlusSmall.js +17 -2
- package/lib/components/Icons/PlusSmall.js.map +1 -0
- package/lib/components/Icons/PngFile.js +3 -2
- package/lib/components/Icons/PngFile.js.map +1 -1
- package/lib/components/Icons/Podcast.js +3 -2
- package/lib/components/Icons/Podcast.js.map +1 -1
- package/lib/components/Icons/PoisonInformation.js +3 -2
- package/lib/components/Icons/PoisonInformation.js.map +1 -1
- package/lib/components/Icons/Pregnant.js +3 -2
- package/lib/components/Icons/Pregnant.js.map +1 -1
- package/lib/components/Icons/Printer.js +3 -2
- package/lib/components/Icons/Printer.js.map +1 -1
- package/lib/components/Icons/Psychosis.js +3 -2
- package/lib/components/Icons/Psychosis.js.map +1 -1
- package/lib/components/Icons/Publication.js +3 -2
- package/lib/components/Icons/Publication.js.map +1 -1
- package/lib/components/Icons/Puzzle.js +3 -2
- package/lib/components/Icons/Puzzle.js.map +1 -1
- package/lib/components/Icons/QrCode.js +3 -2
- package/lib/components/Icons/QrCode.js.map +1 -1
- package/lib/components/Icons/Quarrel.js +3 -2
- package/lib/components/Icons/Quarrel.js.map +1 -1
- package/lib/components/Icons/RadioTherapy.js +3 -2
- package/lib/components/Icons/RadioTherapy.js.map +1 -1
- package/lib/components/Icons/RadioactiveTreatment.js +3 -2
- package/lib/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/lib/components/Icons/Radioiodine.js +3 -2
- package/lib/components/Icons/Radioiodine.js.map +1 -1
- package/lib/components/Icons/Receipt.js +3 -2
- package/lib/components/Icons/Receipt.js.map +1 -1
- package/lib/components/Icons/Receptionist.js +3 -2
- package/lib/components/Icons/Receptionist.js.map +1 -1
- package/lib/components/Icons/Recovery.js +3 -2
- package/lib/components/Icons/Recovery.js.map +1 -1
- package/lib/components/Icons/Referral.js +3 -2
- package/lib/components/Icons/Referral.js.map +1 -1
- package/lib/components/Icons/Refresh.js +3 -2
- package/lib/components/Icons/Refresh.js.map +1 -1
- package/lib/components/Icons/Refund.js +3 -2
- package/lib/components/Icons/Refund.js.map +1 -1
- package/lib/components/Icons/Reminder.js +3 -2
- package/lib/components/Icons/Reminder.js.map +1 -1
- package/lib/components/Icons/Reply.js +3 -2
- package/lib/components/Icons/Reply.js.map +1 -1
- package/lib/components/Icons/Rocket.js +3 -2
- package/lib/components/Icons/Rocket.js.map +1 -1
- package/lib/components/Icons/RtfFile.js +3 -2
- package/lib/components/Icons/RtfFile.js.map +1 -1
- package/lib/components/Icons/STDs.js +3 -2
- package/lib/components/Icons/STDs.js.map +1 -1
- package/lib/components/Icons/Save.js +3 -2
- package/lib/components/Icons/Save.js.map +1 -1
- package/lib/components/Icons/Scale.js +3 -2
- package/lib/components/Icons/Scale.js.map +1 -1
- package/lib/components/Icons/ScreenReader.js +3 -2
- package/lib/components/Icons/ScreenReader.js.map +1 -1
- package/lib/components/Icons/Search.js +27 -2
- package/lib/components/Icons/Search.js.map +1 -0
- package/lib/components/Icons/SectionSign.js +3 -2
- package/lib/components/Icons/SectionSign.js.map +1 -1
- package/lib/components/Icons/Settings.js +3 -2
- package/lib/components/Icons/Settings.js.map +1 -1
- package/lib/components/Icons/SettingsFill.js +3 -2
- package/lib/components/Icons/SettingsFill.js.map +1 -1
- package/lib/components/Icons/Sexualorientation.js +3 -2
- package/lib/components/Icons/Sexualorientation.js.map +1 -1
- package/lib/components/Icons/ShakingHand.js +3 -2
- package/lib/components/Icons/ShakingHand.js.map +1 -1
- package/lib/components/Icons/Share.js +3 -2
- package/lib/components/Icons/Share.js.map +1 -1
- package/lib/components/Icons/SharedHealthData.js +3 -2
- package/lib/components/Icons/SharedHealthData.js.map +1 -1
- package/lib/components/Icons/SharedHealthMeasurements.js +3 -2
- package/lib/components/Icons/SharedHealthMeasurements.js.map +1 -1
- package/lib/components/Icons/Shield.js +3 -2
- package/lib/components/Icons/Shield.js.map +1 -1
- package/lib/components/Icons/ShuntOperation.js +3 -2
- package/lib/components/Icons/ShuntOperation.js.map +1 -1
- package/lib/components/Icons/Skeleton.js +3 -2
- package/lib/components/Icons/Skeleton.js.map +1 -1
- package/lib/components/Icons/Skin.js +3 -2
- package/lib/components/Icons/Skin.js.map +1 -1
- package/lib/components/Icons/Snake.js +3 -2
- package/lib/components/Icons/Snake.js.map +1 -1
- package/lib/components/Icons/Snapchat.js +3 -2
- package/lib/components/Icons/Snapchat.js.map +1 -1
- package/lib/components/Icons/Sort.js +3 -2
- package/lib/components/Icons/Sort.js.map +1 -1
- package/lib/components/Icons/SortDown.js +3 -2
- package/lib/components/Icons/SortDown.js.map +1 -1
- package/lib/components/Icons/SortUp.js +3 -2
- package/lib/components/Icons/SortUp.js.map +1 -1
- package/lib/components/Icons/SpeechBubble.js +3 -2
- package/lib/components/Icons/SpeechBubble.js.map +1 -1
- package/lib/components/Icons/Spray.js +3 -2
- package/lib/components/Icons/Spray.js.map +1 -1
- package/lib/components/Icons/StarFill.js +3 -2
- package/lib/components/Icons/StarFill.js.map +1 -1
- package/lib/components/Icons/StarStroke.js +3 -2
- package/lib/components/Icons/StarStroke.js.map +1 -1
- package/lib/components/Icons/StickyNote.js +3 -2
- package/lib/components/Icons/StickyNote.js.map +1 -1
- package/lib/components/Icons/StickyNotes.js +3 -2
- package/lib/components/Icons/StickyNotes.js.map +1 -1
- package/lib/components/Icons/Stopwatch.js +3 -2
- package/lib/components/Icons/Stopwatch.js.map +1 -1
- package/lib/components/Icons/Sun.js +3 -2
- package/lib/components/Icons/Sun.js.map +1 -1
- package/lib/components/Icons/SupportingPerson.js +3 -2
- package/lib/components/Icons/SupportingPerson.js.map +1 -1
- package/lib/components/Icons/Surgery.js +3 -2
- package/lib/components/Icons/Surgery.js.map +1 -1
- package/lib/components/Icons/Sweets.js +3 -2
- package/lib/components/Icons/Sweets.js.map +1 -1
- package/lib/components/Icons/Syringe.js +4 -3
- package/lib/components/Icons/Syringe.js.map +1 -1
- package/lib/components/Icons/Taxi.js +3 -2
- package/lib/components/Icons/Taxi.js.map +1 -1
- package/lib/components/Icons/TeddyBear.js +3 -2
- package/lib/components/Icons/TeddyBear.js.map +1 -1
- package/lib/components/Icons/Teenagers.js +3 -2
- package/lib/components/Icons/Teenagers.js.map +1 -1
- package/lib/components/Icons/ThinkingAboutBaby.js +3 -2
- package/lib/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/lib/components/Icons/Ticket.js +3 -2
- package/lib/components/Icons/Ticket.js.map +1 -1
- package/lib/components/Icons/TimePassing.js +3 -2
- package/lib/components/Icons/TimePassing.js.map +1 -1
- package/lib/components/Icons/Toddler.js +3 -2
- package/lib/components/Icons/Toddler.js.map +1 -1
- package/lib/components/Icons/Tombstone.js +3 -2
- package/lib/components/Icons/Tombstone.js.map +1 -1
- package/lib/components/Icons/Toolbox.js +3 -2
- package/lib/components/Icons/Toolbox.js.map +1 -1
- package/lib/components/Icons/Tooth.js +3 -2
- package/lib/components/Icons/Tooth.js.map +1 -1
- package/lib/components/Icons/TotalKneeProsthesis.js +3 -2
- package/lib/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/lib/components/Icons/Train.js +3 -2
- package/lib/components/Icons/Train.js.map +1 -1
- package/lib/components/Icons/Transplantation.js +3 -2
- package/lib/components/Icons/Transplantation.js.map +1 -1
- package/lib/components/Icons/TrashCan.js +3 -2
- package/lib/components/Icons/TrashCan.js.map +1 -1
- package/lib/components/Icons/TravelRoute.js +3 -2
- package/lib/components/Icons/TravelRoute.js.map +1 -1
- package/lib/components/Icons/TreatmentAids.js +3 -2
- package/lib/components/Icons/TreatmentAids.js.map +1 -1
- package/lib/components/Icons/TriangleX.js +33 -2
- package/lib/components/Icons/TriangleX.js.map +1 -0
- package/lib/components/Icons/Twitter.js +3 -2
- package/lib/components/Icons/Twitter.js.map +1 -1
- package/lib/components/Icons/Undo.js +3 -2
- package/lib/components/Icons/Undo.js.map +1 -1
- package/lib/components/Icons/UniProsthesis.js +3 -2
- package/lib/components/Icons/UniProsthesis.js.map +1 -1
- package/lib/components/Icons/Upload.js +3 -2
- package/lib/components/Icons/Upload.js.map +1 -1
- package/lib/components/Icons/UserOrganization.js +3 -2
- package/lib/components/Icons/UserOrganization.js.map +1 -1
- package/lib/components/Icons/Vaccine.js +3 -2
- package/lib/components/Icons/Vaccine.js.map +1 -1
- package/lib/components/Icons/VerticalDots.js +17 -2
- package/lib/components/Icons/VerticalDots.js.map +1 -0
- package/lib/components/Icons/VideoCamera.js +3 -2
- package/lib/components/Icons/VideoCamera.js.map +1 -1
- package/lib/components/Icons/VideoChat.js +3 -2
- package/lib/components/Icons/VideoChat.js.map +1 -1
- package/lib/components/Icons/Wallet.js +3 -2
- package/lib/components/Icons/Wallet.js.map +1 -1
- package/lib/components/Icons/Watch.js +3 -2
- package/lib/components/Icons/Watch.js.map +1 -1
- package/lib/components/Icons/Website.js +3 -2
- package/lib/components/Icons/Website.js.map +1 -1
- package/lib/components/Icons/Wheelchair.js +3 -2
- package/lib/components/Icons/Wheelchair.js.map +1 -1
- package/lib/components/Icons/WheelchairActive.js +3 -2
- package/lib/components/Icons/WheelchairActive.js.map +1 -1
- package/lib/components/Icons/Window.js +3 -2
- package/lib/components/Icons/Window.js.map +1 -1
- package/lib/components/Icons/WordDocument.js +3 -2
- package/lib/components/Icons/WordDocument.js.map +1 -1
- package/lib/components/Icons/WorkSuitcase.js +3 -2
- package/lib/components/Icons/WorkSuitcase.js.map +1 -1
- package/lib/components/Icons/X.js +19 -2
- package/lib/components/Icons/X.js.map +1 -0
- package/lib/components/Icons/XOutline.js +3 -2
- package/lib/components/Icons/XOutline.js.map +1 -1
- package/lib/components/Icons/XmlFile.js +3 -2
- package/lib/components/Icons/XmlFile.js.map +1 -1
- package/lib/components/Icons/YouTube.js +3 -2
- package/lib/components/Icons/YouTube.js.map +1 -1
- package/lib/components/Icons/Zoom.js +3 -2
- package/lib/components/Icons/Zoom.js.map +1 -1
- package/lib/components/Icons/ZoomInLeft.js +3 -2
- package/lib/components/Icons/ZoomInLeft.js.map +1 -1
- package/lib/components/Icons/ZoomOutLeft.js +3 -2
- package/lib/components/Icons/ZoomOutLeft.js.map +1 -1
- package/lib/components/Illustrations/BabyMobile.js +5 -4
- package/lib/components/Illustrations/BabyMobile.js.map +1 -1
- package/lib/components/Illustrations/BabyMobileMedium.js +264 -2
- package/lib/components/Illustrations/BabyMobileMedium.js.map +1 -0
- package/lib/components/Illustrations/Child.js +5 -4
- package/lib/components/Illustrations/Child.js.map +1 -1
- package/lib/components/Illustrations/ChildMedium.js +127 -2
- package/lib/components/Illustrations/ChildMedium.js.map +1 -0
- package/lib/components/Illustrations/Doctor.js +7 -6
- package/lib/components/Illustrations/Doctor.js.map +1 -1
- package/lib/components/Illustrations/DoctorMedium.js +55 -2
- package/lib/components/Illustrations/DoctorMedium.js.map +1 -0
- package/lib/components/Illustrations/DoctorSmall.js +53 -2
- package/lib/components/Illustrations/DoctorSmall.js.map +1 -0
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +5 -4
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js +200 -2
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js.map +1 -0
- package/lib/components/Illustrations/GiveBabyFood.js +5 -4
- package/lib/components/Illustrations/GiveBabyFood.js.map +1 -1
- package/lib/components/Illustrations/GiveBabyFoodMedium.js +241 -2
- package/lib/components/Illustrations/GiveBabyFoodMedium.js.map +1 -0
- package/lib/components/Illustrations/HealthcarePersonnel.js +7 -6
- package/lib/components/Illustrations/HealthcarePersonnel.js.map +1 -1
- package/lib/components/Illustrations/HealthcarePersonnelMedium.js +149 -2
- package/lib/components/Illustrations/HealthcarePersonnelMedium.js.map +1 -0
- package/lib/components/Illustrations/HealthcarePersonnelSmall.js +150 -2
- package/lib/components/Illustrations/HealthcarePersonnelSmall.js.map +1 -0
- package/lib/components/Illustrations/IllustrationNames.js +37 -1
- package/lib/components/Illustrations/IllustrationNames.js.map +1 -0
- package/lib/components/Illustrations/ReadLetters.js +5 -4
- package/lib/components/Illustrations/ReadLetters.js.map +1 -1
- package/lib/components/Illustrations/ReadLettersMedium.js +79 -2
- package/lib/components/Illustrations/ReadLettersMedium.js.map +1 -0
- package/lib/components/Illustrations/Stork.js +5 -4
- package/lib/components/Illustrations/Stork.js.map +1 -1
- package/lib/components/Illustrations/StorkMedium.js +97 -2
- package/lib/components/Illustrations/StorkMedium.js.map +1 -0
- package/lib/components/Illustrations/Stroller.js +5 -4
- package/lib/components/Illustrations/Stroller.js.map +1 -1
- package/lib/components/Illustrations/StrollerMedium.js +220 -2
- package/lib/components/Illustrations/StrollerMedium.js.map +1 -0
- package/lib/components/Illustrations/Support2.js +5 -4
- package/lib/components/Illustrations/Support2.js.map +1 -1
- package/lib/components/Illustrations/Support2Medium.js +159 -2
- package/lib/components/Illustrations/Support2Medium.js.map +1 -0
- package/lib/components/Illustrations/Thinking.js +5 -4
- package/lib/components/Illustrations/Thinking.js.map +1 -1
- package/lib/components/Illustrations/ThinkingMedium.js +99 -2
- package/lib/components/Illustrations/ThinkingMedium.js.map +1 -0
- package/lib/components/Input/index.js +6 -2
- package/lib/components/Input/index.js.map +1 -0
- package/lib/components/Label/index.js +6 -2
- package/lib/components/Label/index.js.map +1 -0
- package/lib/components/Loader/index.js +11 -5
- package/lib/components/Loader/index.js.map +1 -1
- package/lib/components/Logo/index.js +6 -2
- package/lib/components/Logo/index.js.map +1 -1
- package/lib/components/Modal/index.js +34 -28
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/NotificationPanel/index.js +10 -6
- package/lib/components/NotificationPanel/index.js.map +1 -1
- package/lib/components/Panel/index.js +22 -15
- package/lib/components/Panel/index.js.map +1 -1
- package/lib/components/PanelList/index.js +5 -1
- package/lib/components/PanelList/index.js.map +1 -1
- package/lib/components/PopMenu/index.js +26 -20
- package/lib/components/PopMenu/index.js.map +1 -1
- package/lib/components/Portal/index.js +27 -1
- package/lib/components/Portal/index.js.map +1 -0
- package/lib/components/Progressbar/index.js +21 -15
- package/lib/components/Progressbar/index.js.map +1 -1
- package/lib/components/PromoPanel/index.js +12 -8
- package/lib/components/PromoPanel/index.js.map +1 -1
- package/lib/components/RadioButton/index.js +5 -1
- package/lib/{RadioButton.js.map → components/RadioButton/index.js.map} +1 -1
- package/lib/components/ServiceMessage/index.js +19 -15
- package/lib/components/ServiceMessage/index.js.map +1 -1
- package/lib/components/SharingStatus/index.js +6 -2
- package/lib/components/SharingStatus/index.js.map +1 -1
- package/lib/components/Step/index.js +5 -1
- package/lib/components/Step/index.js.map +1 -1
- package/lib/components/Stepper/index.js +84 -18
- package/lib/components/Stepper/index.js.map +1 -1
- package/lib/components/StickyNote/index.js +17 -11
- package/lib/components/StickyNote/index.js.map +1 -1
- package/lib/components/Table/index.js +13 -9
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Tabs/index.js +13 -6
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Tag/Tag.d.ts +1 -11
- package/lib/components/Tag/constants.d.ts +2 -6
- package/lib/components/Tag/index.d.ts +1 -1
- package/lib/components/Tag/index.js +19 -34
- package/lib/components/Tag/index.js.map +1 -1
- package/lib/components/Tag/styles.module.scss +19 -52
- package/lib/components/Tag/styles.module.scss.d.ts +3 -11
- package/lib/components/TagList/index.js +5 -1
- package/lib/components/TagList/index.js.map +1 -1
- package/lib/components/Tile/index.js +10 -6
- package/lib/components/Tile/index.js.map +1 -1
- package/lib/components/Title/index.js +6 -2
- package/lib/components/Title/index.js.map +1 -0
- package/lib/components/Toast/index.js +4 -2
- package/lib/components/Toast/index.js.map +1 -1
- package/lib/components/ToastList/index.js +7 -3
- package/lib/components/ToastList/index.js.map +1 -1
- package/lib/components/Toggle/index.js +17 -11
- package/lib/components/Toggle/index.js.map +1 -1
- package/lib/components/Validation/index.js +24 -17
- package/lib/components/Validation/index.js.map +1 -1
- package/lib/constants.js +125 -1
- package/lib/constants.js.map +1 -0
- package/lib/constants2.js +45 -117
- package/lib/constants2.js.map +1 -1
- package/lib/floating-ui.react.js +479 -185
- package/lib/floating-ui.react.js.map +1 -1
- package/lib/getFilterChips.js +6 -2
- package/lib/getFilterChips.js.map +1 -1
- package/lib/hoc/withBreakpoint/index.js +4 -2
- package/lib/hoc/withBreakpoint/index.js.map +1 -1
- package/lib/hoc/withBreakpoint/withBreakpoint.js +17 -2
- package/lib/hoc/withBreakpoint/withBreakpoint.js.map +1 -0
- package/lib/hooks/useBreakpoint.js +42 -1
- package/lib/hooks/useBreakpoint.js.map +1 -0
- package/lib/hooks/useElementList.js +46 -1
- package/lib/hooks/useElementList.js.map +1 -0
- package/lib/hooks/useEventListenerState.js +3 -1
- package/lib/hooks/useEventListenerState.js.map +1 -1
- package/lib/hooks/useExpand.js +19 -1
- package/lib/hooks/useExpand.js.map +1 -0
- package/lib/hooks/useFocusToggle.js +34 -1
- package/lib/hooks/useFocusToggle.js.map +1 -0
- package/lib/hooks/useFocusTrap.js +40 -2
- package/lib/hooks/useFocusTrap.js.map +1 -0
- package/lib/hooks/useFocusableElements.js +33 -1
- package/lib/hooks/useFocusableElements.js.map +1 -0
- package/lib/hooks/useIcons.js +27 -1
- package/lib/hooks/useIcons.js.map +1 -0
- package/lib/hooks/useIdWithFallback.js +14 -1
- package/lib/hooks/useIdWithFallback.js.map +1 -0
- package/lib/hooks/useIntersectionObserver.js +23 -1
- package/lib/hooks/useIntersectionObserver.js.map +1 -0
- package/lib/hooks/useInterval.js +10 -1
- package/lib/hooks/useInterval.js.map +1 -1
- package/lib/hooks/useIsMobileBreakpoint.js +9 -1
- package/lib/hooks/useIsMobileBreakpoint.js.map +1 -0
- package/lib/hooks/useIsServerSide.js +16 -1
- package/lib/hooks/useIsServerSide.js.map +1 -0
- package/lib/hooks/useIsVisible.js +26 -1
- package/lib/hooks/useIsVisible.js.map +1 -0
- package/lib/hooks/useKeyboardEvent.js +30 -1
- package/lib/hooks/useKeyboardEvent.js.map +1 -0
- package/lib/hooks/useLanguage.js +16 -1
- package/lib/hooks/useLanguage.js.map +1 -0
- package/lib/hooks/useLayoutEvent.js +29 -1
- package/lib/hooks/useLayoutEvent.js.map +1 -0
- package/lib/hooks/useOutsideEvent.js +27 -1
- package/lib/hooks/useOutsideEvent.js.map +1 -0
- package/lib/hooks/usePrevious.js +17 -1
- package/lib/hooks/usePrevious.js.map +1 -0
- package/lib/hooks/usePseudoClasses.js +52 -1
- package/lib/hooks/usePseudoClasses.js.map +1 -0
- package/lib/hooks/useResizeObserver.js +30 -1
- package/lib/hooks/useResizeObserver.js.map +1 -0
- package/lib/hooks/useReturnFocusOnUnmount.js +21 -1
- package/lib/hooks/useReturnFocusOnUnmount.js.map +1 -0
- package/lib/hooks/useRovingFocus.js +45 -1
- package/lib/hooks/useRovingFocus.js.map +1 -0
- package/lib/hooks/useSize.js +31 -1
- package/lib/hooks/useSize.js.map +1 -0
- package/lib/hooks/useToggle.js +32 -1
- package/lib/hooks/useToggle.js.map +1 -0
- package/lib/hooks/usestopPropagation.js +17 -1
- package/lib/hooks/usestopPropagation.js.map +1 -0
- package/lib/index.js +18 -18
- package/lib/resourceHelper.js +5 -2
- package/lib/resourceHelper.js.map +1 -1
- package/lib/theme/currys/color.js +11 -1
- package/lib/theme/currys/color.js.map +1 -0
- package/lib/theme/currys/index.js +2 -2
- package/lib/theme/currys/spacing.js +26 -1
- package/lib/theme/currys/spacing.js.map +1 -0
- package/lib/theme/grid.js +25 -1
- package/lib/theme/grid.js.map +1 -0
- package/lib/theme/index.js +14 -1
- package/lib/theme/index.js.map +1 -0
- package/lib/theme/palette.js +86 -1
- package/lib/theme/palette.js.map +1 -0
- package/lib/theme/spacers.js +21 -1
- package/lib/theme/spacers.js.map +1 -0
- package/lib/utils/accessibility.js +24 -1
- package/lib/utils/accessibility.js.map +1 -0
- package/lib/utils/component.js +11 -1
- package/lib/utils/component.js.map +1 -0
- package/lib/utils/debounce.js +22 -1
- package/lib/utils/debounce.js.map +1 -0
- package/lib/utils/deepContains.js +22 -1
- package/lib/utils/deepContains.js.map +1 -0
- package/lib/utils/device.js +7 -1
- package/lib/utils/device.js.map +1 -0
- package/lib/utils/environment.js +6 -1
- package/lib/utils/environment.js.map +1 -0
- package/lib/utils/focus.js +17 -1
- package/lib/utils/focus.js.map +1 -0
- package/lib/utils/language.js +4 -3
- package/lib/utils/language.js.map +1 -1
- package/lib/utils/loremtext.js +6 -5
- package/lib/utils/loremtext.js.map +1 -1
- package/lib/utils/mobile.js +18 -1
- package/lib/utils/mobile.js.map +1 -0
- package/lib/utils/refs.js +26 -1
- package/lib/utils/refs.js.map +1 -0
- package/lib/utils/resource.js +10 -1
- package/lib/utils/resource.js.map +1 -0
- package/lib/utils/scroll.js +10 -1
- package/lib/utils/scroll.js.map +1 -0
- package/lib/utils/uuid.js +2 -2
- package/lib/utils/viewport.js +8 -1
- package/lib/utils/viewport.js.map +1 -0
- package/lib/utils.js +4 -2
- package/lib/utils.js.map +1 -1
- package/lib/utils2.js +18 -13
- package/lib/utils2.js.map +1 -1
- package/lib/utils3.js +12 -9
- package/lib/utils3.js.map +1 -1
- package/lib/utils4.js +7 -5
- package/lib/utils4.js.map +1 -1
- package/lib/utils5.js +26 -22
- package/lib/utils5.js.map +1 -1
- package/lib/utils6.js +65 -10
- package/lib/utils6.js.map +1 -1
- package/lib/uuid.js +12 -9
- package/lib/uuid.js.map +1 -1
- package/package.json +26 -38
- package/lib/AlertSignFill.js +0 -16
- package/lib/AlertSignFill.js.map +0 -1
- package/lib/AlertSignStroke.js +0 -16
- package/lib/AlertSignStroke.js.map +0 -1
- package/lib/ArrowDown.js +0 -28
- package/lib/ArrowDown.js.map +0 -1
- package/lib/ArrowRight.js +0 -16
- package/lib/ArrowRight.js.map +0 -1
- package/lib/ArrowUp.js +0 -28
- package/lib/ArrowUp.js.map +0 -1
- package/lib/ArrowUpRight.js +0 -16
- package/lib/ArrowUpRight.js.map +0 -1
- package/lib/BabyMobileMedium.js +0 -263
- package/lib/BabyMobileMedium.js.map +0 -1
- package/lib/Check.js +0 -16
- package/lib/Check.js.map +0 -1
- package/lib/CheckFill.js +0 -28
- package/lib/CheckFill.js.map +0 -1
- package/lib/CheckOutline.js +0 -14
- package/lib/CheckOutline.js.map +0 -1
- package/lib/Checkbox2.js +0 -5
- package/lib/Checkbox2.js.map +0 -1
- package/lib/ChevronDown.js +0 -16
- package/lib/ChevronDown.js.map +0 -1
- package/lib/ChevronLeft.js +0 -16
- package/lib/ChevronLeft.js.map +0 -1
- package/lib/ChevronRight.js +0 -16
- package/lib/ChevronRight.js.map +0 -1
- package/lib/ChevronUp.js +0 -16
- package/lib/ChevronUp.js.map +0 -1
- package/lib/ChildMedium.js +0 -126
- package/lib/ChildMedium.js.map +0 -1
- package/lib/DoctorMedium.js +0 -54
- package/lib/DoctorMedium.js.map +0 -1
- package/lib/DoctorSmall.js +0 -52
- package/lib/DoctorSmall.js.map +0 -1
- package/lib/DrawerNavigation2.js +0 -5
- package/lib/DrawerNavigation2.js.map +0 -1
- package/lib/EmptyBox.js +0 -16
- package/lib/EmptyBox.js.map +0 -1
- package/lib/ErrorSignFill.js +0 -16
- package/lib/ErrorSignFill.js.map +0 -1
- package/lib/FacialRecognitionFingerprintMedium.js +0 -199
- package/lib/FacialRecognitionFingerprintMedium.js.map +0 -1
- package/lib/Filter.js +0 -44
- package/lib/Filter.js.map +0 -1
- package/lib/FilterLinkList2.js +0 -5
- package/lib/FilterLinkList2.js.map +0 -1
- package/lib/FilterSearch2.js +0 -5
- package/lib/FilterSearch2.js.map +0 -1
- package/lib/Forward.js +0 -16
- package/lib/Forward.js.map +0 -1
- package/lib/GiveBabyFoodMedium.js +0 -240
- package/lib/GiveBabyFoodMedium.js.map +0 -1
- package/lib/HandWaving.js +0 -8
- package/lib/HandWaving.js.map +0 -1
- package/lib/HealthcarePersonnelMedium.js +0 -148
- package/lib/HealthcarePersonnelMedium.js.map +0 -1
- package/lib/HealthcarePersonnelSmall.js +0 -149
- package/lib/HealthcarePersonnelSmall.js.map +0 -1
- package/lib/IllustrationNames.js +0 -35
- package/lib/IllustrationNames.js.map +0 -1
- package/lib/InfoSignFill.js +0 -16
- package/lib/InfoSignFill.js.map +0 -1
- package/lib/Input2.js +0 -5
- package/lib/Input2.js.map +0 -1
- package/lib/Label.js +0 -5
- package/lib/Label.js.map +0 -1
- package/lib/PlusSmall.js +0 -16
- package/lib/PlusSmall.js.map +0 -1
- package/lib/Portal.js +0 -26
- package/lib/Portal.js.map +0 -1
- package/lib/RadioButton.js +0 -5
- package/lib/ReadLettersMedium.js +0 -78
- package/lib/ReadLettersMedium.js.map +0 -1
- package/lib/Search.js +0 -26
- package/lib/Search.js.map +0 -1
- package/lib/StorkMedium.js +0 -96
- package/lib/StorkMedium.js.map +0 -1
- package/lib/StrollerMedium.js +0 -219
- package/lib/StrollerMedium.js.map +0 -1
- package/lib/Support2Medium.js +0 -158
- package/lib/Support2Medium.js.map +0 -1
- package/lib/ThinkingMedium.js +0 -98
- package/lib/ThinkingMedium.js.map +0 -1
- package/lib/Title2.js +0 -5
- package/lib/Title2.js.map +0 -1
- package/lib/TriangleX.js +0 -32
- package/lib/TriangleX.js.map +0 -1
- package/lib/VerticalDots.js +0 -16
- package/lib/VerticalDots.js.map +0 -1
- package/lib/X.js +0 -18
- package/lib/X.js.map +0 -1
- package/lib/_rolldown_dynamic_import_helper.js.map +0 -1
- package/lib/accessibility.js +0 -17
- package/lib/accessibility.js.map +0 -1
- package/lib/color.js +0 -10
- package/lib/color.js.map +0 -1
- package/lib/component.js +0 -10
- package/lib/component.js.map +0 -1
- package/lib/constants3.js +0 -46
- package/lib/constants3.js.map +0 -1
- package/lib/currys.js +0 -0
- package/lib/debounce.js +0 -16
- package/lib/debounce.js.map +0 -1
- package/lib/deepContains.js +0 -13
- package/lib/deepContains.js.map +0 -1
- package/lib/device.js +0 -6
- package/lib/device.js.map +0 -1
- package/lib/environment.js +0 -5
- package/lib/environment.js.map +0 -1
- package/lib/focus.js +0 -11
- package/lib/focus.js.map +0 -1
- package/lib/grid.js +0 -24
- package/lib/grid.js.map +0 -1
- package/lib/mobile.js +0 -14
- package/lib/mobile.js.map +0 -1
- package/lib/palette.js +0 -85
- package/lib/palette.js.map +0 -1
- package/lib/refs.js +0 -14
- package/lib/refs.js.map +0 -1
- package/lib/resource.js +0 -4
- package/lib/resource.js.map +0 -1
- package/lib/scroll.js +0 -9
- package/lib/scroll.js.map +0 -1
- package/lib/spacers.js +0 -20
- package/lib/spacers.js.map +0 -1
- package/lib/spacing.js +0 -25
- package/lib/spacing.js.map +0 -1
- package/lib/src.js +0 -0
- package/lib/theme.js +0 -13
- package/lib/theme.js.map +0 -1
- package/lib/useBreakpoint.js +0 -38
- package/lib/useBreakpoint.js.map +0 -1
- package/lib/useElementList.js +0 -38
- package/lib/useElementList.js.map +0 -1
- package/lib/useExpand.js +0 -18
- package/lib/useExpand.js.map +0 -1
- package/lib/useFocusToggle.js +0 -26
- package/lib/useFocusToggle.js.map +0 -1
- package/lib/useFocusTrap.js +0 -34
- package/lib/useFocusTrap.js.map +0 -1
- package/lib/useFocusableElements.js +0 -26
- package/lib/useFocusableElements.js.map +0 -1
- package/lib/useIcons.js +0 -26
- package/lib/useIcons.js.map +0 -1
- package/lib/useIdWithFallback.js +0 -8
- package/lib/useIdWithFallback.js.map +0 -1
- package/lib/useIntersectionObserver.js +0 -14
- package/lib/useIntersectionObserver.js.map +0 -1
- package/lib/useIsMobileBreakpoint.js +0 -8
- package/lib/useIsMobileBreakpoint.js.map +0 -1
- package/lib/useIsServerSide.js +0 -10
- package/lib/useIsServerSide.js.map +0 -1
- package/lib/useIsVisible.js +0 -16
- package/lib/useIsVisible.js.map +0 -1
- package/lib/useKeyboardEvent.js +0 -22
- package/lib/useKeyboardEvent.js.map +0 -1
- package/lib/useLanguage.js +0 -10
- package/lib/useLanguage.js.map +0 -1
- package/lib/useLayoutEvent.js +0 -21
- package/lib/useLayoutEvent.js.map +0 -1
- package/lib/useOutsideEvent.js +0 -20
- package/lib/useOutsideEvent.js.map +0 -1
- package/lib/usePrevious.js +0 -11
- package/lib/usePrevious.js.map +0 -1
- package/lib/usePseudoClasses.js +0 -46
- package/lib/usePseudoClasses.js.map +0 -1
- package/lib/useResizeObserver.js +0 -23
- package/lib/useResizeObserver.js.map +0 -1
- package/lib/useReturnFocusOnUnmount.js +0 -16
- package/lib/useReturnFocusOnUnmount.js.map +0 -1
- package/lib/useRovingFocus.js +0 -44
- package/lib/useRovingFocus.js.map +0 -1
- package/lib/useSize.js +0 -23
- package/lib/useSize.js.map +0 -1
- package/lib/useToggle.js +0 -24
- package/lib/useToggle.js.map +0 -1
- package/lib/usestopPropagation.js +0 -11
- package/lib/usestopPropagation.js.map +0 -1
- package/lib/viewport.js +0 -7
- package/lib/viewport.js.map +0 -1
- package/lib/withBreakpoint.js +0 -16
- package/lib/withBreakpoint.js.map +0 -1
package/lib/getFilterChips.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { t as Chip_default } from "./Chip.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/Filter/getFilterChips/getFilterChips.tsx
|
|
3
4
|
function getFilterChips({ filter, getLabel, onChipClick, onChipRemove, onOverflowChipClick, willShowCloseButton }) {
|
|
4
5
|
const maxVisible = 5;
|
|
5
6
|
const allChips = Object.entries(filter.filters).flatMap(([key, raw]) => {
|
|
@@ -24,7 +25,10 @@ function getFilterChips({ filter, getLabel, onChipClick, onChipRemove, onOverflo
|
|
|
24
25
|
children: `+${overflowCount}`
|
|
25
26
|
}, "overflow")];
|
|
26
27
|
}
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/components/Filter/getFilterChips/index.ts
|
|
30
|
+
var getFilterChips_default = getFilterChips;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { getFilterChips_default as t };
|
|
29
33
|
|
|
30
34
|
//# sourceMappingURL=getFilterChips.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFilterChips.js","names":[],"sources":["../src/components/Filter/getFilterChips/getFilterChips.tsx","../src/components/Filter/getFilterChips/index.ts"],"sourcesContent":["import type { FilterValues, UseFilterReturn } from '../useFilter';\n\nimport Chip from '../../Chip';\n\nexport interface GetFilterChipsArgs<T extends FilterValues> {\n /** The filter instance from useFilter */\n filter: UseFilterReturn<T>;\n /** Look up the display label for a filter key + value */\n getLabel: (key: keyof T, value: unknown) => string;\n /** Called when a chip is clicked (f.ex. to open the drawer at that filter category) */\n onChipClick: (key: keyof T, value: unknown) => void;\n /** Called when a chip's close button is clicked. If not provided, defaults to filter.removeFilter */\n onChipRemove?: (key: keyof T, value: unknown) => void;\n /** Called when the overflow chip is clicked */\n onOverflowChipClick: () => void;\n /** Function for mapping if close button is shown on chip or not */\n willShowCloseButton?: (key: keyof T, value?: unknown) => boolean;\n}\n\nfunction getFilterChips<T extends FilterValues>({\n filter,\n getLabel,\n onChipClick,\n onChipRemove,\n onOverflowChipClick,\n willShowCloseButton,\n}: GetFilterChipsArgs<T>): React.ReactNode[] {\n const maxVisible = 5;\n\n const allChips = Object.entries(filter.filters).flatMap(([key, raw]) => {\n const values = [raw ?? []].flat();\n return values.map(v => ({ key, value: v }));\n });\n\n const visibleChips = allChips.slice(0, maxVisible);\n const overflowCount = allChips.length - maxVisible;\n\n return [\n visibleChips.map(({ key, value: v }) => (\n <Chip\n key={`${key}-${v}`}\n onChipClick={() => onChipClick(key as keyof T, v)}\n onCloseClick={() => {\n if (onChipRemove) {\n onChipRemove(key as keyof T, v);\n } else {\n filter.removeFilter(key, v);\n }\n }}\n withCloseButton={willShowCloseButton?.(key, v)}\n >\n {getLabel(key as keyof T, v)}\n </Chip>\n )),\n overflowCount > 0 && <Chip key=\"overflow\" onChipClick={onOverflowChipClick} withCloseButton={false}>{`+${overflowCount}`}</Chip>,\n ];\n}\n\nexport default getFilterChips;\n","import getFilterChips from './getFilterChips';\nexport * from './getFilterChips';\nexport default getFilterChips;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getFilterChips.js","names":[],"sources":["../src/components/Filter/getFilterChips/getFilterChips.tsx","../src/components/Filter/getFilterChips/index.ts"],"sourcesContent":["import type { FilterValues, UseFilterReturn } from '../useFilter';\n\nimport Chip from '../../Chip';\n\nexport interface GetFilterChipsArgs<T extends FilterValues> {\n /** The filter instance from useFilter */\n filter: UseFilterReturn<T>;\n /** Look up the display label for a filter key + value */\n getLabel: (key: keyof T, value: unknown) => string;\n /** Called when a chip is clicked (f.ex. to open the drawer at that filter category) */\n onChipClick: (key: keyof T, value: unknown) => void;\n /** Called when a chip's close button is clicked. If not provided, defaults to filter.removeFilter */\n onChipRemove?: (key: keyof T, value: unknown) => void;\n /** Called when the overflow chip is clicked */\n onOverflowChipClick: () => void;\n /** Function for mapping if close button is shown on chip or not */\n willShowCloseButton?: (key: keyof T, value?: unknown) => boolean;\n}\n\nfunction getFilterChips<T extends FilterValues>({\n filter,\n getLabel,\n onChipClick,\n onChipRemove,\n onOverflowChipClick,\n willShowCloseButton,\n}: GetFilterChipsArgs<T>): React.ReactNode[] {\n const maxVisible = 5;\n\n const allChips = Object.entries(filter.filters).flatMap(([key, raw]) => {\n const values = [raw ?? []].flat();\n return values.map(v => ({ key, value: v }));\n });\n\n const visibleChips = allChips.slice(0, maxVisible);\n const overflowCount = allChips.length - maxVisible;\n\n return [\n visibleChips.map(({ key, value: v }) => (\n <Chip\n key={`${key}-${v}`}\n onChipClick={() => onChipClick(key as keyof T, v)}\n onCloseClick={() => {\n if (onChipRemove) {\n onChipRemove(key as keyof T, v);\n } else {\n filter.removeFilter(key, v);\n }\n }}\n withCloseButton={willShowCloseButton?.(key, v)}\n >\n {getLabel(key as keyof T, v)}\n </Chip>\n )),\n overflowCount > 0 && <Chip key=\"overflow\" onChipClick={onOverflowChipClick} withCloseButton={false}>{`+${overflowCount}`}</Chip>,\n ];\n}\n\nexport default getFilterChips;\n","import getFilterChips from './getFilterChips';\nexport * from './getFilterChips';\nexport default getFilterChips;\n"],"mappings":";;;AAmBA,SAAS,eAAuC,EAC9C,QACA,UACA,aACA,cACA,qBACA,uBAC2C;CAC3C,MAAM,aAAa;CAEnB,MAAM,WAAW,OAAO,QAAQ,OAAO,QAAQ,CAAC,SAAS,CAAC,KAAK,SAAS;EAEtE,OADe,CAAC,OAAO,EAAE,CAAC,CAAC,MACpB,CAAO,KAAI,OAAM;GAAE;GAAK,OAAO;GAAG,EAAE;GAC3C;CAEF,MAAM,eAAe,SAAS,MAAM,GAAG,WAAW;CAClD,MAAM,gBAAgB,SAAS,SAAS;CAExC,OAAO,CACL,aAAa,KAAK,EAAE,KAAK,OAAO,QAC9B,oBAAC,cAAD;EAEE,mBAAmB,YAAY,KAAgB,EAAE;EACjD,oBAAoB;GAClB,IAAI,cACF,aAAa,KAAgB,EAAE;QAE/B,OAAO,aAAa,KAAK,EAAE;;EAG/B,iBAAiB,sBAAsB,KAAK,EAAE;YAE7C,SAAS,KAAgB,EAAE;EACvB,EAZA,GAAG,IAAI,GAAG,IAYV,CACP,EACF,gBAAgB,KAAK,oBAAC,cAAD;EAAqB,aAAa;EAAqB,iBAAiB;YAAQ,IAAI;EAAuB,EAAjG,WAAiG,CACjI;;;;ACrDH,IAAA,yBAAe"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import withBreakpoint from "./withBreakpoint.js";
|
|
2
|
+
//#region src/hoc/withBreakpoint/index.ts
|
|
3
|
+
var withBreakpoint_default = withBreakpoint;
|
|
4
|
+
//#endregion
|
|
3
5
|
export { withBreakpoint_default as default, withBreakpoint };
|
|
4
6
|
|
|
5
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hoc/withBreakpoint/index.ts"],"sourcesContent":["import withBreakpoint from './withBreakpoint';\nexport * from './withBreakpoint';\nexport default withBreakpoint;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/hoc/withBreakpoint/index.ts"],"sourcesContent":["import withBreakpoint from './withBreakpoint';\nexport * from './withBreakpoint';\nexport default withBreakpoint;\n"],"mappings":";;AAEA,IAAA,yBAAe"}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useBreakpoint } from "../../hooks/useBreakpoint.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/hoc/withBreakpoint/withBreakpoint.tsx
|
|
4
|
+
function withBreakpoint(Component) {
|
|
5
|
+
const WithBreakpoint = (props) => {
|
|
6
|
+
const breakpoint = useBreakpoint();
|
|
7
|
+
return /* @__PURE__ */ jsx(Component, {
|
|
8
|
+
...props,
|
|
9
|
+
breakpoint
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
return WithBreakpoint;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
export { withBreakpoint as default, withBreakpoint };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=withBreakpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withBreakpoint.js","names":[],"sources":["../../../src/hoc/withBreakpoint/withBreakpoint.tsx"],"sourcesContent":["import type { Breakpoint } from '../../hooks/useBreakpoint';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\n\nexport interface BreakpointProps {\n breakpoint: Breakpoint;\n}\n\n// Hentet fra https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35834#issuecomment-497605842\nexport function withBreakpoint<P extends BreakpointProps, C extends React.ComponentClass<P>>(\n Component: C & React.ComponentType<P>\n): React.FC<Omit<React.ComponentPropsWithoutRef<C>, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(Component: React.FC<P>): React.FC<Omit<P, keyof BreakpointProps>>;\n\nexport function withBreakpoint<P extends BreakpointProps>(Component: React.ComponentType<P>): React.FC<Omit<P, keyof BreakpointProps>> {\n const WithBreakpoint: React.FC<Omit<P, keyof BreakpointProps>> = props => {\n const breakpoint = useBreakpoint();\n return <Component {...(props as P)} breakpoint={breakpoint} />;\n };\n return WithBreakpoint;\n}\n\nexport default withBreakpoint;\n"],"mappings":";;;AAeA,SAAgB,eAA0C,WAA6E;CACrI,MAAM,kBAA2D,UAAS;EACxE,MAAM,aAAa,eAAe;EAClC,OAAO,oBAAC,WAAD;GAAW,GAAK;GAAyB;GAAc,CAAA;;CAEhE,OAAO"}
|
|
@@ -1,2 +1,43 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { breakpoints, screen } from "../theme/grid.js";
|
|
2
|
+
import { useSyncExternalStore } from "react";
|
|
3
|
+
//#region src/hooks/useBreakpoint.ts
|
|
4
|
+
var Breakpoint = /* @__PURE__ */ function(Breakpoint) {
|
|
5
|
+
Breakpoint[Breakpoint["xxs"] = breakpoints.xxs] = "xxs";
|
|
6
|
+
Breakpoint[Breakpoint["xs"] = breakpoints.xs] = "xs";
|
|
7
|
+
Breakpoint[Breakpoint["sm"] = breakpoints.sm] = "sm";
|
|
8
|
+
Breakpoint[Breakpoint["md"] = breakpoints.md] = "md";
|
|
9
|
+
Breakpoint[Breakpoint["lg"] = breakpoints.lg] = "lg";
|
|
10
|
+
Breakpoint[Breakpoint["xl"] = breakpoints.xl] = "xl";
|
|
11
|
+
return Breakpoint;
|
|
12
|
+
}({});
|
|
13
|
+
/** Sjekker nettleserens media queries fra største til minste; det høyeste treffet gjelder */
|
|
14
|
+
function getCurrentBreakpoint() {
|
|
15
|
+
return Object.entries(screen).reverse().map(([size, mediaQuery]) => {
|
|
16
|
+
return {
|
|
17
|
+
breakpoint: Breakpoint[size],
|
|
18
|
+
mq: window.matchMedia(mediaQuery)
|
|
19
|
+
};
|
|
20
|
+
}).find((entry) => entry.mq.matches)?.breakpoint ?? Breakpoint.xxs;
|
|
21
|
+
}
|
|
22
|
+
/** Event listeners for media queries - dette varslet React ved endringer */
|
|
23
|
+
function subscribeToBreakpointChanges(callback) {
|
|
24
|
+
const mediaQueryList = Object.values(screen).map((mediaQuery) => {
|
|
25
|
+
const mq = window.matchMedia(mediaQuery);
|
|
26
|
+
mq.addEventListener("change", callback);
|
|
27
|
+
return mq;
|
|
28
|
+
});
|
|
29
|
+
return () => {
|
|
30
|
+
mediaQueryList.forEach((mq) => {
|
|
31
|
+
mq.removeEventListener("change", callback);
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
/** Brukes ved server side rendering der window ikke finnes. Returnerer minste breakpoint som default */
|
|
36
|
+
var getServerSnapshot = () => Breakpoint.xxs;
|
|
37
|
+
var useBreakpoint = () => {
|
|
38
|
+
return useSyncExternalStore(subscribeToBreakpointChanges, getCurrentBreakpoint, getServerSnapshot);
|
|
39
|
+
};
|
|
40
|
+
//#endregion
|
|
2
41
|
export { Breakpoint, useBreakpoint };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=useBreakpoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBreakpoint.js","names":[],"sources":["../../src/hooks/useBreakpoint.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nimport { breakpoints, screen } from '../theme/grid';\n\nexport enum Breakpoint {\n xxs = breakpoints.xxs,\n xs = breakpoints.xs,\n sm = breakpoints.sm,\n md = breakpoints.md,\n lg = breakpoints.lg,\n xl = breakpoints.xl,\n}\n\n/** Sjekker nettleserens media queries fra største til minste; det høyeste treffet gjelder */\nfunction getCurrentBreakpoint(): Breakpoint {\n const mediaQueryList = Object.entries(screen)\n .reverse() // Sjekk xl, lg, md, osv. i synkende rekkefølge\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\n/** Event listeners for media queries - dette varslet React ved endringer */\nfunction subscribeToBreakpointChanges(callback: () => void): () => void {\n const mediaQueryList = Object.values(screen).map(mediaQuery => {\n const mq = window.matchMedia(mediaQuery);\n mq.addEventListener('change', callback);\n return mq;\n });\n\n return (): void => {\n mediaQueryList.forEach(mq => {\n mq.removeEventListener('change', callback);\n });\n };\n}\n\n/** Brukes ved server side rendering der window ikke finnes. Returnerer minste breakpoint som default */\nconst getServerSnapshot = (): Breakpoint => Breakpoint.xxs;\n\nexport const useBreakpoint = (): Breakpoint => {\n return useSyncExternalStore(subscribeToBreakpointChanges, getCurrentBreakpoint, getServerSnapshot);\n};\n"],"mappings":";;;AAIA,IAAY,aAAL,yBAAA,YAAA;CACL,WAAA,WAAA,SAAM,YAAY,OAAA;CAClB,WAAA,WAAA,QAAK,YAAY,MAAA;CACjB,WAAA,WAAA,QAAK,YAAY,MAAA;CACjB,WAAA,WAAA,QAAK,YAAY,MAAA;CACjB,WAAA,WAAA,QAAK,YAAY,MAAA;CACjB,WAAA,WAAA,QAAK,YAAY,MAAA;;KAClB;;AAGD,SAAS,uBAAmC;CAW1C,OAVuB,OAAO,QAAQ,OAAO,CAC1C,SAAS,CACT,KAAK,CAAC,MAAM,gBAAgB;EAC3B,OAAO;GACL,YAAY,WAAW;GACvB,IAAI,OAAO,WAAW,WAAW;GAClC;GAGW,CAAe,MAAK,UAAS,MAAM,GAAG,QAC/C,EAAS,cAAc,WAAW;;;AAI3C,SAAS,6BAA6B,UAAkC;CACtE,MAAM,iBAAiB,OAAO,OAAO,OAAO,CAAC,KAAI,eAAc;EAC7D,MAAM,KAAK,OAAO,WAAW,WAAW;EACxC,GAAG,iBAAiB,UAAU,SAAS;EACvC,OAAO;GACP;CAEF,aAAmB;EACjB,eAAe,SAAQ,OAAM;GAC3B,GAAG,oBAAoB,UAAU,SAAS;IAC1C;;;;AAKN,IAAM,0BAAsC,WAAW;AAEvD,IAAa,sBAAkC;CAC7C,OAAO,qBAAqB,8BAA8B,sBAAsB,kBAAkB"}
|
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect, useRef, useState } from "react";
|
|
2
|
+
//#region src/hooks/useElementList.ts
|
|
3
|
+
/**
|
|
4
|
+
* Hent ut en liste med HTML-elementer. Bruker MutationObserver-APIet.
|
|
5
|
+
* @param ref Element som skal observeres
|
|
6
|
+
* @param selectors Selektorer som sendes til querySelectorAll for å hente ut liste med elementer
|
|
7
|
+
* @param options MutationObserver-options. Default er å lytte på endringer på child-elementer og deres attributter.
|
|
8
|
+
* @returns Liste med HTML-elementer
|
|
9
|
+
*/
|
|
10
|
+
var useElementList = (ref, selectors, options) => {
|
|
11
|
+
const [elementList, setElementList] = useState();
|
|
12
|
+
const previousElementsRef = useRef([]);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const handleMutationChange = () => {
|
|
15
|
+
const elements = ref.current?.querySelectorAll(selectors);
|
|
16
|
+
if (!elements) {
|
|
17
|
+
if (previousElementsRef.current.length > 0) {
|
|
18
|
+
previousElementsRef.current = [];
|
|
19
|
+
setElementList(void 0);
|
|
20
|
+
}
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const elementsArray = Array.from(elements);
|
|
24
|
+
const previousElements = previousElementsRef.current;
|
|
25
|
+
if (elementsArray.length !== previousElements.length || elementsArray.some((el, i) => el !== previousElements[i])) {
|
|
26
|
+
previousElementsRef.current = elementsArray;
|
|
27
|
+
setElementList(elements);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const mutationObserver = new MutationObserver(handleMutationChange);
|
|
31
|
+
if (ref?.current) mutationObserver.observe(ref.current, {
|
|
32
|
+
subtree: true,
|
|
33
|
+
childList: true,
|
|
34
|
+
attributes: true,
|
|
35
|
+
...options
|
|
36
|
+
});
|
|
37
|
+
handleMutationChange();
|
|
38
|
+
return () => {
|
|
39
|
+
mutationObserver.disconnect();
|
|
40
|
+
};
|
|
41
|
+
}, [ref, selectors]);
|
|
42
|
+
return elementList;
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
2
45
|
export { useElementList };
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=useElementList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useElementList.js","names":[],"sources":["../../src/hooks/useElementList.ts"],"sourcesContent":["import { useState, useEffect, useRef } 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 | null>,\n selectors: string,\n options?: MutationObserverInit\n): NodeListOf<HTMLElement> | undefined => {\n const [elementList, setElementList] = useState<NodeListOf<HTMLElement>>();\n const previousElementsRef = useRef<HTMLElement[]>([]);\n\n useEffect(() => {\n const handleMutationChange = (): void => {\n const elements = ref.current?.querySelectorAll<HTMLElement>(selectors);\n if (!elements) {\n if (previousElementsRef.current.length > 0) {\n previousElementsRef.current = [];\n setElementList(undefined);\n }\n return;\n }\n\n // We check if an element has been added/removed to avoid extra state updates on other changes.\n const elementsArray = Array.from(elements);\n const previousElements = previousElementsRef.current;\n\n const hasChanged = elementsArray.length !== previousElements.length || elementsArray.some((el, i) => el !== previousElements[i]);\n\n if (hasChanged) {\n previousElementsRef.current = elementsArray;\n setElementList(elements);\n }\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,IAAa,kBACX,KACA,WACA,YACwC;CACxC,MAAM,CAAC,aAAa,kBAAkB,UAAmC;CACzE,MAAM,sBAAsB,OAAsB,EAAE,CAAC;CAErD,gBAAgB;EACd,MAAM,6BAAmC;GACvC,MAAM,WAAW,IAAI,SAAS,iBAA8B,UAAU;GACtE,IAAI,CAAC,UAAU;IACb,IAAI,oBAAoB,QAAQ,SAAS,GAAG;KAC1C,oBAAoB,UAAU,EAAE;KAChC,eAAe,KAAA,EAAU;;IAE3B;;GAIF,MAAM,gBAAgB,MAAM,KAAK,SAAS;GAC1C,MAAM,mBAAmB,oBAAoB;GAI7C,IAFmB,cAAc,WAAW,iBAAiB,UAAU,cAAc,MAAM,IAAI,MAAM,OAAO,iBAAiB,GAAG,EAEhH;IACd,oBAAoB,UAAU;IAC9B,eAAe,SAAS;;;EAI5B,MAAM,mBAAmB,IAAI,iBAAiB,qBAAqB;EACnE,IAAI,KAAK,SACP,iBAAiB,QAAQ,IAAI,SAAS;GAAE,SAAS;GAAM,WAAW;GAAM,YAAY;GAAM,GAAG;GAAS,CAAC;EAGzG,sBAAsB;EAEtB,aAAmB;GACjB,iBAAiB,YAAY;;IAE9B,CAAC,KAAK,UAAU,CAAC;CAEpB,OAAO"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
//#region src/hooks/useEventListenerState.ts
|
|
3
|
+
var useEventListenerState = (initial) => {
|
|
3
4
|
const [value, _setValue] = React.useState(initial);
|
|
4
5
|
const valueRef = React.useRef(value);
|
|
5
6
|
const setValue = (x) => {
|
|
@@ -8,6 +9,7 @@ const useEventListenerState = (initial) => {
|
|
|
8
9
|
};
|
|
9
10
|
return [valueRef, setValue];
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { useEventListenerState };
|
|
12
14
|
|
|
13
15
|
//# sourceMappingURL=useEventListenerState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEventListenerState.js","names":[],"sources":["../../src/hooks/useEventListenerState.ts"],"sourcesContent":["import React from 'react';\n\nexport const useEventListenerState = <T>(initial?: T): [valueRef: React.MutableRefObject<T | undefined>, setValue: (x: T) => void] => {\n const [value, _setValue] = React.useState<T | undefined>(initial);\n\n const valueRef = React.useRef(value);\n\n const setValue = (x: T): void => {\n valueRef.current = x;\n _setValue(x);\n };\n\n return [valueRef, setValue];\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEventListenerState.js","names":[],"sources":["../../src/hooks/useEventListenerState.ts"],"sourcesContent":["import React from 'react';\n\nexport const useEventListenerState = <T>(initial?: T): [valueRef: React.MutableRefObject<T | undefined>, setValue: (x: T) => void] => {\n const [value, _setValue] = React.useState<T | undefined>(initial);\n\n const valueRef = React.useRef(value);\n\n const setValue = (x: T): void => {\n valueRef.current = x;\n _setValue(x);\n };\n\n return [valueRef, setValue];\n};\n"],"mappings":";;AAEA,IAAa,yBAA4B,YAA6F;CACpI,MAAM,CAAC,OAAO,aAAa,MAAM,SAAwB,QAAQ;CAEjE,MAAM,WAAW,MAAM,OAAO,MAAM;CAEpC,MAAM,YAAY,MAAe;EAC/B,SAAS,UAAU;EACnB,UAAU,EAAE;;CAGd,OAAO,CAAC,UAAU,SAAS"}
|
package/lib/hooks/useExpand.js
CHANGED
|
@@ -1,2 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { usePrevious } from "./usePrevious.js";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
//#region src/hooks/useExpand.ts
|
|
4
|
+
var useExpand = (expanded, onExpand) => {
|
|
5
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
6
|
+
const [prevExpanded, setPrevExpanded] = useState(expanded);
|
|
7
|
+
const previousIsExpanded = usePrevious(isExpanded);
|
|
8
|
+
if (expanded !== prevExpanded) {
|
|
9
|
+
setPrevExpanded(expanded);
|
|
10
|
+
setIsExpanded(expanded);
|
|
11
|
+
}
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (onExpand && isExpanded !== !!previousIsExpanded) onExpand(isExpanded);
|
|
14
|
+
}, [isExpanded, onExpand]);
|
|
15
|
+
return [isExpanded, setIsExpanded];
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
2
18
|
export { useExpand };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=useExpand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExpand.js","names":[],"sources":["../../src/hooks/useExpand.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react';\nimport { 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 [prevExpanded, setPrevExpanded] = useState(expanded);\n const previousIsExpanded = usePrevious(isExpanded);\n\n if (expanded !== prevExpanded) {\n setPrevExpanded(expanded);\n setIsExpanded(expanded);\n }\n\n useEffect(() => {\n if (onExpand && isExpanded !== !!previousIsExpanded) {\n onExpand(isExpanded);\n }\n }, [isExpanded, onExpand]);\n\n return [isExpanded, setIsExpanded];\n};\n"],"mappings":";;;AAKA,IAAa,aAAa,UAAmB,aAA2F;CACtI,MAAM,CAAC,YAAY,iBAAiB,SAAS,SAAS;CACtD,MAAM,CAAC,cAAc,mBAAmB,SAAS,SAAS;CAC1D,MAAM,qBAAqB,YAAY,WAAW;CAElD,IAAI,aAAa,cAAc;EAC7B,gBAAgB,SAAS;EACzB,cAAc,SAAS;;CAGzB,gBAAgB;EACd,IAAI,YAAY,eAAe,CAAC,CAAC,oBAC/B,SAAS,WAAW;IAErB,CAAC,YAAY,SAAS,CAAC;CAE1B,OAAO,CAAC,YAAY,cAAc"}
|
|
@@ -1,2 +1,35 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useElementList } from "./useElementList.js";
|
|
2
|
+
import { FOCUSABLE_SELECTORS } from "./useFocusableElements.js";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
//#region src/hooks/useFocusToggle.ts
|
|
5
|
+
/**
|
|
6
|
+
* Skru av og på fokus på fokuserbare elementer slik at de kan være en del av DOMen, men samtidig
|
|
7
|
+
* ikke kunne fokuseres/tabbes til med tastaturet.
|
|
8
|
+
* @param ref Alle barn av dette elementet vil sjekkes for om de er fokuserbare
|
|
9
|
+
* @param allowFocus Om elementene skal være fokuserbare eller ikke
|
|
10
|
+
* @returns void
|
|
11
|
+
*/
|
|
12
|
+
var useFocusToggle = (ref, allowFocus) => {
|
|
13
|
+
const focusableElementList = useElementList(ref, FOCUSABLE_SELECTORS, { attributes: false });
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const TABINDEX_ATTRIBUTE_NAME = "tabindex";
|
|
16
|
+
const PREVIOUS_TABINDEX_ATTRIBUTE_NAME = "data-tabindex";
|
|
17
|
+
if (allowFocus) focusableElementList?.forEach((el) => {
|
|
18
|
+
const prevTabIndex = el.getAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME);
|
|
19
|
+
if (prevTabIndex) el.setAttribute(TABINDEX_ATTRIBUTE_NAME, prevTabIndex);
|
|
20
|
+
else el.removeAttribute(TABINDEX_ATTRIBUTE_NAME);
|
|
21
|
+
});
|
|
22
|
+
else focusableElementList?.forEach((el) => {
|
|
23
|
+
if (el.hasAttribute(TABINDEX_ATTRIBUTE_NAME)) el.setAttribute(PREVIOUS_TABINDEX_ATTRIBUTE_NAME, `${el.tabIndex}`);
|
|
24
|
+
el.tabIndex = -1;
|
|
25
|
+
});
|
|
26
|
+
}, [
|
|
27
|
+
ref,
|
|
28
|
+
allowFocus,
|
|
29
|
+
focusableElementList
|
|
30
|
+
]);
|
|
31
|
+
};
|
|
32
|
+
//#endregion
|
|
2
33
|
export { useFocusToggle };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=useFocusToggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusToggle.js","names":[],"sources":["../../src/hooks/useFocusToggle.ts"],"sourcesContent":["import { 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 | null>, 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,IAAa,kBAAkB,KAA0C,eAA+B;CAEtG,MAAM,uBAAuB,eAAe,KAAK,qBAAqB,EAAE,YAAY,OAAO,CAAC;CAE5F,gBAAgB;EACd,MAAM,0BAA0B;EAChC,MAAM,mCAAmC;EACzC,IAAI,YACF,sBAAsB,SAAQ,OAAM;GAGlC,MAAM,eAAe,GAAG,aAAa,iCAAiC;GACtE,IAAI,cACF,GAAG,aAAa,yBAAyB,aAAa;QAEtD,GAAG,gBAAgB,wBAAwB;IAE7C;OAEF,sBAAsB,SAAQ,OAAM;GAGlC,IAAI,GAAG,aAAa,wBAAwB,EAC1C,GAAG,aAAa,kCAAkC,GAAG,GAAG,WAAW;GAErE,GAAG,WAAW;IACd;IAEH;EAAC;EAAK;EAAY;EAAqB,CAAC"}
|
|
@@ -1,2 +1,40 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useFocusableElements } from "./useFocusableElements.js";
|
|
2
|
+
import { getDocumentActiveElement } from "../utils/focus.js";
|
|
3
|
+
import { useEffect } from "react";
|
|
4
|
+
//#region src/hooks/useFocusTrap.ts
|
|
5
|
+
/**
|
|
6
|
+
* Lås fokus til et bestemt element. Bruker vil bare kunne tabbe mellom fokuserbare elementer innenfor elementet.
|
|
7
|
+
* @param ref Alle barn av dette elementet vil være fokuserbare, elementer utenfor vil ikke det
|
|
8
|
+
* @param trapFocus Om fokus skal "trappes" innenfor elementet eller ikke. Default=true.
|
|
9
|
+
*/
|
|
10
|
+
var useFocusTrap = (ref, trapFocus = true) => {
|
|
11
|
+
const focusableElementList = useFocusableElements(ref);
|
|
12
|
+
const handleKeyboardEvent = (e) => {
|
|
13
|
+
if (trapFocus && ref.current && focusableElementList?.length && e.key === "Tab") {
|
|
14
|
+
const activeElement = getDocumentActiveElement(ref.current);
|
|
15
|
+
const firstElement = focusableElementList[0];
|
|
16
|
+
const lastElement = focusableElementList.length === 1 ? firstElement : focusableElementList[focusableElementList.length - 1];
|
|
17
|
+
if (e.shiftKey && activeElement === firstElement) {
|
|
18
|
+
lastElement.focus();
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
} else if (!e.shiftKey && activeElement === lastElement) {
|
|
21
|
+
firstElement.focus();
|
|
22
|
+
e.preventDefault();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
ref.current?.addEventListener("keydown", handleKeyboardEvent);
|
|
28
|
+
return () => {
|
|
29
|
+
ref.current?.removeEventListener("keydown", handleKeyboardEvent);
|
|
30
|
+
};
|
|
31
|
+
}, [
|
|
32
|
+
ref,
|
|
33
|
+
trapFocus,
|
|
34
|
+
focusableElementList
|
|
35
|
+
]);
|
|
36
|
+
};
|
|
37
|
+
//#endregion
|
|
38
|
+
export { useFocusTrap as default, useFocusTrap };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=useFocusTrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFocusTrap.js","names":[],"sources":["../../src/hooks/useFocusTrap.ts"],"sourcesContent":["import { 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 | null>, 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,IAAa,gBAAgB,KAA0C,YAAY,SAAe;CAChG,MAAM,uBAAuB,qBAAqB,IAAI;CAEtD,MAAM,uBAAuB,MAA2B;EACtD,IAAI,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;GAE1H,IAAI,EAAE,YAAY,kBAAkB,cAAc;IAEhD,YAAY,OAAO;IACnB,EAAE,gBAAgB;UACb,IAAI,CAAC,EAAE,YAAY,kBAAkB,aAAa;IAEvD,aAAa,OAAO;IACpB,EAAE,gBAAgB;;;;CAKxB,gBAAgB;EACd,IAAI,SAAS,iBAAiB,WAAW,oBAAoB;EAE7D,aAAmB;GACjB,IAAI,SAAS,oBAAoB,WAAW,oBAAoB;;IAEjE;EAAC;EAAK;EAAW;EAAqB,CAAC"}
|
|
@@ -1,2 +1,34 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useElementList } from "./useElementList.js";
|
|
2
|
+
//#region src/hooks/useFocusableElements.ts
|
|
3
|
+
var FOCUSABLE_SELECTORS = [
|
|
4
|
+
"a[href]:not([tabindex^=\"-\"])",
|
|
5
|
+
"area[href]:not([tabindex^=\"-\"])",
|
|
6
|
+
"input:not([type=\"hidden\"]):not([type=\"radio\"]):not([disabled]):not([tabindex^=\"-\"])",
|
|
7
|
+
"input[type=\"radio\"]:not([disabled]):not([tabindex^=\"-\"])",
|
|
8
|
+
"select:not([disabled]):not([tabindex^=\"-\"])",
|
|
9
|
+
"textarea:not([disabled]):not([tabindex^=\"-\"])",
|
|
10
|
+
"button:not([disabled]):not([tabindex^=\"-\"])",
|
|
11
|
+
"iframe:not([tabindex^=\"-\"])",
|
|
12
|
+
"audio[controls]:not([tabindex^=\"-\"])",
|
|
13
|
+
"video[controls]:not([tabindex^=\"-\"])",
|
|
14
|
+
"[contenteditable]:not([tabindex^=\"-\"])",
|
|
15
|
+
"[tabindex]:not([tabindex^=\"-\"])"
|
|
16
|
+
].join(",");
|
|
17
|
+
/**
|
|
18
|
+
* Overvåk et element og finn alle fokuserbare elementer inne i elementet. Bruker MutationObserver slik at eventuelle
|
|
19
|
+
* nye elementer som legges til også vil inkluderes i listen.
|
|
20
|
+
* @param ref Element som skal observeres
|
|
21
|
+
* @returns Liste med fokuserbare HTML-elementer
|
|
22
|
+
*/
|
|
23
|
+
var useFocusableElements = (ref) => useElementList(ref, FOCUSABLE_SELECTORS, { attributeFilter: [
|
|
24
|
+
"href",
|
|
25
|
+
"tabindex",
|
|
26
|
+
"type",
|
|
27
|
+
"disabled",
|
|
28
|
+
"controls",
|
|
29
|
+
"contenteditable"
|
|
30
|
+
] });
|
|
31
|
+
//#endregion
|
|
2
32
|
export { FOCUSABLE_SELECTORS, useFocusableElements };
|
|
33
|
+
|
|
34
|
+
//# 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 | null>): NodeListOf<HTMLElement> | undefined =>\n useElementList(ref, FOCUSABLE_SELECTORS, { attributeFilter: ['href', 'tabindex', 'type', 'disabled', 'controls', 'contenteditable'] });\n"],"mappings":";;AAGA,IAAa,sBAAsB;CACjC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,CAAC,KAAK,IAAI;;;;;;;AAQX,IAAa,wBAAwB,QACnC,eAAe,KAAK,qBAAqB,EAAE,iBAAiB;CAAC;CAAQ;CAAY;CAAQ;CAAY;CAAY;CAAkB,EAAE,CAAC"}
|
package/lib/hooks/useIcons.js
CHANGED
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as Icon_default } from "../Icon.js";
|
|
2
|
+
import { t as LazyIcon_default } from "../LazyIcon.js";
|
|
3
|
+
import { isComponent } from "../utils/component.js";
|
|
4
|
+
//#region src/hooks/useIcons.ts
|
|
5
|
+
var useIcons = (children) => {
|
|
6
|
+
let leftIcon = null;
|
|
7
|
+
let rightIcon = null;
|
|
8
|
+
const firstChild = children[0];
|
|
9
|
+
if (isComponent(firstChild, Icon_default) || isComponent(firstChild, LazyIcon_default)) {
|
|
10
|
+
leftIcon = firstChild;
|
|
11
|
+
children.shift();
|
|
12
|
+
}
|
|
13
|
+
const lastChild = children[children.length - 1];
|
|
14
|
+
if (isComponent(lastChild, Icon_default) || isComponent(lastChild, LazyIcon_default)) {
|
|
15
|
+
rightIcon = lastChild;
|
|
16
|
+
children.pop();
|
|
17
|
+
}
|
|
18
|
+
const restChildren = children.filter((child) => child);
|
|
19
|
+
return [
|
|
20
|
+
leftIcon,
|
|
21
|
+
rightIcon,
|
|
22
|
+
restChildren.length > 0 ? restChildren : null
|
|
23
|
+
];
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
2
26
|
export { useIcons };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=useIcons.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIcons.js","names":[],"sources":["../../src/hooks/useIcons.ts"],"sourcesContent":["import type { BaseIconProps, IconProps } from '../components/Icon';\nimport type { LazyIconProps } from '../components/LazyIcon';\n\nimport Icon from '../components/Icon';\nimport LazyIcon 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":";;;;AASA,IAAa,YAAY,aAA4G;CACnI,IAAI,WAAmC;CACvC,IAAI,YAAoC;CAExC,MAAM,aAAa,SAAS;CAC5B,IAAI,YAAuB,YAAY,aAAK,IAAI,YAA2B,YAAY,iBAAS,EAAE;EAChG,WAAW;EACX,SAAS,OAAO;;CAGlB,MAAM,YAAY,SAAS,SAAS,SAAS;CAC7C,IAAI,YAAuB,WAAW,aAAK,IAAI,YAA2B,WAAW,iBAAS,EAAE;EAC9F,YAAY;EACZ,SAAS,KAAK;;CAEhB,MAAM,eAAe,SAAS,QAAO,UAAS,MAAM;CAEpD,OAAO;EAAC;EAAU;EAAW,aAAa,SAAS,IAAI,eAAe;EAAK"}
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useId } from "react";
|
|
2
|
+
//#region src/hooks/useIdWithFallback.ts
|
|
3
|
+
/**
|
|
4
|
+
* Returner unik id som ikke endrer seg for hver render
|
|
5
|
+
* @param initial id som vil overstyre react sin useId
|
|
6
|
+
* @returns stable id-string
|
|
7
|
+
*/
|
|
8
|
+
var useIdWithFallback = (initial) => {
|
|
9
|
+
const fallbackId = useId();
|
|
10
|
+
return initial || fallbackId;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
2
13
|
export { useIdWithFallback };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=useIdWithFallback.js.map
|
|
@@ -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,IAAa,qBAAqB,YAA6B;CAC7D,MAAM,aAAa,OAAO;CAE1B,OAAO,WAAW"}
|
|
@@ -1,2 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
//#region src/hooks/useIntersectionObserver.ts
|
|
3
|
+
/**
|
|
4
|
+
* Lytt på endringer i synligheten (intersection) til et HTML-element. F.eks. kan du bruke denne til å kalle en callback
|
|
5
|
+
* når elementet er i ferd med å forsvinne ut av vinduet.
|
|
6
|
+
*
|
|
7
|
+
* @param ref Element som skal observeres
|
|
8
|
+
* @param callback Kalles når en endring i intersection er observert
|
|
9
|
+
* @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres
|
|
10
|
+
*/
|
|
11
|
+
var useIntersectionObserver = (ref, callback, options) => {
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const intersectionObserver = new IntersectionObserver(callback, options);
|
|
14
|
+
if (ref?.current) intersectionObserver.observe(ref.current);
|
|
15
|
+
return () => {
|
|
16
|
+
if (ref?.current) intersectionObserver.unobserve(ref.current);
|
|
17
|
+
else intersectionObserver.disconnect();
|
|
18
|
+
};
|
|
19
|
+
}, [ref, options]);
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
2
22
|
export { useIntersectionObserver };
|
|
23
|
+
|
|
24
|
+
//# 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 | null>,\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,IAAa,2BACX,KACA,UACA,YACS;CACT,gBAAgB;EACd,MAAM,uBAAuB,IAAI,qBAAqB,UAAU,QAAQ;EAExE,IAAI,KAAK,SACP,qBAAqB,QAAQ,IAAI,QAAQ;EAG3C,aAAmB;GACjB,IAAI,KAAK,SACP,qBAAqB,UAAU,IAAI,QAAQ;QAE3C,qBAAqB,YAAY;;IAGpC,CAAC,KAAK,QAAQ,CAAC"}
|
package/lib/hooks/useInterval.js
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
import { useEffect } from "react";
|
|
2
|
-
|
|
2
|
+
//#region src/hooks/useInterval.ts
|
|
3
|
+
/**
|
|
4
|
+
* Kjør en funksjon ved intervaller basert på ønsket frequency.
|
|
5
|
+
*
|
|
6
|
+
* @param callback Funksjon som skal kjøres
|
|
7
|
+
* @param frequency Hvor ofte vi skal kjøre funksjonen
|
|
8
|
+
* @returns void
|
|
9
|
+
*/
|
|
10
|
+
var useInterval = (callback, frequency = 10) => {
|
|
3
11
|
useEffect(() => {
|
|
4
12
|
const timer = setInterval(callback, frequency);
|
|
5
13
|
return () => {
|
|
@@ -7,6 +15,7 @@ const useInterval = (callback, frequency = 10) => {
|
|
|
7
15
|
};
|
|
8
16
|
}, [callback, frequency]);
|
|
9
17
|
};
|
|
18
|
+
//#endregion
|
|
10
19
|
export { useInterval };
|
|
11
20
|
|
|
12
21
|
//# sourceMappingURL=useInterval.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useInterval.js","names":[],"sources":["../../src/hooks/useInterval.ts"],"sourcesContent":["import { useEffect } from 'react';\n\n/**\n * Kjør en funksjon ved intervaller basert på ønsket frequency.\n *\n * @param callback Funksjon som skal kjøres\n * @param frequency Hvor ofte vi skal kjøre funksjonen\n * @returns void\n */\nexport const useInterval = (callback: () => void, frequency = 10): void => {\n useEffect(() => {\n const timer = setInterval(callback, frequency);\n\n return (): void => {\n clearInterval(timer);\n };\n }, [callback, frequency]);\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useInterval.js","names":[],"sources":["../../src/hooks/useInterval.ts"],"sourcesContent":["import { useEffect } from 'react';\n\n/**\n * Kjør en funksjon ved intervaller basert på ønsket frequency.\n *\n * @param callback Funksjon som skal kjøres\n * @param frequency Hvor ofte vi skal kjøre funksjonen\n * @returns void\n */\nexport const useInterval = (callback: () => void, frequency = 10): void => {\n useEffect(() => {\n const timer = setInterval(callback, frequency);\n\n return (): void => {\n clearInterval(timer);\n };\n }, [callback, frequency]);\n};\n"],"mappings":";;;;;;;;;AASA,IAAa,eAAe,UAAsB,YAAY,OAAa;CACzE,gBAAgB;EACd,MAAM,QAAQ,YAAY,UAAU,UAAU;EAE9C,aAAmB;GACjB,cAAc,MAAM;;IAErB,CAAC,UAAU,UAAU,CAAC"}
|
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { breakpoints } from "../theme/grid.js";
|
|
2
|
+
import { useBreakpoint } from "./useBreakpoint.js";
|
|
3
|
+
//#region src/hooks/useIsMobileBreakpoint.ts
|
|
4
|
+
var useIsMobileBreakpoint = () => {
|
|
5
|
+
return useBreakpoint() < breakpoints.md;
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
2
8
|
export { useIsMobileBreakpoint };
|
|
9
|
+
|
|
10
|
+
//# 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,IAAa,8BAAuC;CAElD,OADmB,eACZ,GAAa,YAAY"}
|
|
@@ -1,2 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
//#region src/hooks/useIsServerSide.ts
|
|
3
|
+
var emptySubscribe = () => () => {};
|
|
4
|
+
var getClientSnapshot = () => false;
|
|
5
|
+
var getServerSnapshot = () => true;
|
|
6
|
+
/**
|
|
7
|
+
* Sjekk om React kjører på server, eller ikke.
|
|
8
|
+
*
|
|
9
|
+
* @returns true dersom koden kjører på server
|
|
10
|
+
*/
|
|
11
|
+
var useIsServerSide = () => {
|
|
12
|
+
return useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
2
15
|
export { useIsServerSide };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=useIsServerSide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsServerSide.js","names":[],"sources":["../../src/hooks/useIsServerSide.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react';\n\nconst emptySubscribe = (): (() => void) => (): void => {};\nconst getClientSnapshot = (): boolean => false;\nconst getServerSnapshot = (): boolean => true;\n\n/**\n * Sjekk om React kjører på server, eller ikke.\n *\n * @returns true dersom koden kjører på server\n */\nexport const useIsServerSide = (): boolean => {\n return useSyncExternalStore(emptySubscribe, getClientSnapshot, getServerSnapshot);\n};\n"],"mappings":";;AAEA,IAAM,6BAAiD;AACvD,IAAM,0BAAmC;AACzC,IAAM,0BAAmC;;;;;;AAOzC,IAAa,wBAAiC;CAC5C,OAAO,qBAAqB,gBAAgB,mBAAmB,kBAAkB"}
|
|
@@ -1,2 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useIntersectionObserver } from "./useIntersectionObserver.js";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
//#region src/hooks/useIsVisible.ts
|
|
4
|
+
/**
|
|
5
|
+
* Sjekk om et HTML-element er synlig i vinduet, eller ikke.
|
|
6
|
+
*
|
|
7
|
+
* @param ref Element som skal observeres
|
|
8
|
+
* @param threshold Hvor synlig må elementet være? Default = 1 (helt synlig)
|
|
9
|
+
* @param options Objekt med options for IntersectionObserver, f.eks. threshold for å bestemme når callbacken skal fyres
|
|
10
|
+
* @param initial Om elementet default skal antas å være synlig eller ikke. Default: ikke synlig
|
|
11
|
+
* @returns true hvis objektet er synlig lik threshold eller mer, false hvis ikke
|
|
12
|
+
*/
|
|
13
|
+
var useIsVisible = (ref, threshold = 1, options, initial = false) => {
|
|
14
|
+
const [isVisible, setIsVisible] = useState(initial);
|
|
15
|
+
const handleIntersectChange = (entries) => {
|
|
16
|
+
setIsVisible(threshold === 0 ? entries[0].intersectionRatio !== threshold : entries[0].intersectionRatio >= threshold);
|
|
17
|
+
};
|
|
18
|
+
useIntersectionObserver(ref, handleIntersectChange, {
|
|
19
|
+
threshold,
|
|
20
|
+
...options
|
|
21
|
+
});
|
|
22
|
+
return isVisible;
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
2
25
|
export { useIsVisible };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=useIsVisible.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsVisible.js","names":[],"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 | null>,\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,IAAa,gBACX,KACA,YAAY,GACZ,SACA,UAAU,UACE;CACZ,MAAM,CAAC,WAAW,gBAAgB,SAAS,QAAQ;CAEnD,MAAM,yBAAsD,YAAW;EACrE,aAAa,cAAc,IAAI,QAAQ,GAAG,sBAAsB,YAAY,QAAQ,GAAG,qBAAqB,UAAU;;CAGxH,wBAAwB,KAAK,uBAAuB;EAAE;EAAW,GAAG;EAAS,CAAC;CAE9E,OAAO"}
|
|
@@ -1,2 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useEffect } from "react";
|
|
2
|
+
//#region src/hooks/useKeyboardEvent.ts
|
|
3
|
+
/**
|
|
4
|
+
* Kjør en callback når bruker skriver på tastaturet.
|
|
5
|
+
* @param ref Element som skal lyttes på.
|
|
6
|
+
* @param callback Callback som kjøres når det skjer en event.
|
|
7
|
+
* @param key Knapp, eller liste med knapper, som skal trigge callback
|
|
8
|
+
* @param events Liste med keyboard-events som skal trigge callback. Default: "keydown"
|
|
9
|
+
*/
|
|
10
|
+
var useKeyboardEvent = (ref, callback, key, events = ["keydown"]) => {
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const element = ref.current;
|
|
13
|
+
if (!element) return;
|
|
14
|
+
const handleKeyboardEvent = (event) => {
|
|
15
|
+
if (event.key === key || Array.isArray(key) && key.includes(event.key)) callback(event);
|
|
16
|
+
};
|
|
17
|
+
events.forEach((eventName) => element.addEventListener(eventName, handleKeyboardEvent));
|
|
18
|
+
return () => {
|
|
19
|
+
events.forEach((eventName) => element.removeEventListener(eventName, handleKeyboardEvent));
|
|
20
|
+
};
|
|
21
|
+
}, [
|
|
22
|
+
ref,
|
|
23
|
+
callback,
|
|
24
|
+
events,
|
|
25
|
+
key
|
|
26
|
+
]);
|
|
27
|
+
};
|
|
28
|
+
//#endregion
|
|
2
29
|
export { useKeyboardEvent };
|
|
30
|
+
|
|
31
|
+
//# 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 = {\n [K in keyof HTMLElementEventMap]: HTMLElementEventMap[K] extends KeyboardEvent ? K : never;\n}[keyof HTMLElementEventMap];\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 | null>,\n callback: (event: KeyboardEvent) => void,\n key: string | string[],\n events: KeyboardEvents[] = ['keydown']\n): void => {\n useEffect(() => {\n const element = ref.current;\n if (!element) {\n return;\n }\n\n const handleKeyboardEvent = (event: KeyboardEvent): void => {\n if (event.key === key || (Array.isArray(key) && key.includes(event.key))) {\n callback(event);\n }\n };\n\n events.forEach(eventName => element.addEventListener(eventName, handleKeyboardEvent));\n\n return (): void => {\n events.forEach(eventName => element.removeEventListener(eventName, handleKeyboardEvent));\n };\n }, [ref, callback, events, key]);\n};\n"],"mappings":";;;;;;;;;AAaA,IAAa,oBACX,KACA,UACA,KACA,SAA2B,CAAC,UAAU,KAC7B;CACT,gBAAgB;EACd,MAAM,UAAU,IAAI;EACpB,IAAI,CAAC,SACH;EAGF,MAAM,uBAAuB,UAA+B;GAC1D,IAAI,MAAM,QAAQ,OAAQ,MAAM,QAAQ,IAAI,IAAI,IAAI,SAAS,MAAM,IAAI,EACrE,SAAS,MAAM;;EAInB,OAAO,SAAQ,cAAa,QAAQ,iBAAiB,WAAW,oBAAoB,CAAC;EAErF,aAAmB;GACjB,OAAO,SAAQ,cAAa,QAAQ,oBAAoB,WAAW,oBAAoB,CAAC;;IAEzF;EAAC;EAAK;EAAU;EAAQ;EAAI,CAAC"}
|