@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/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":["Input: React.FC<InputProps>","mergedResources: HNDesignsystemInput"],"sources":["../src/components/Input/constants.ts","../src/resources/HN.Designsystem.Input.en-GB.json","../src/resources/HN.Designsystem.Input.nb-NO.json","../src/resources/HN.Designsystem.Input.nn-NO.json","../src/components/Input/resourceHelper.ts","../src/components/Input/Input.tsx"],"sourcesContent":["export enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n","{\n \"characters\": \"characters\"\n}\n","{\n \"characters\": \"tegn\"\n}\n","{\n \"characters\": \"teikn\"\n}\n","import type { HNDesignsystemInput } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Input.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Input.nb-NO.json';\nimport nnNO from '../../resources/HN.Designsystem.Input.nn-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemInput => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nnNO;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import { useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport type { HNDesignsystemInput } from '../../resources/Resources';\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\nimport type { SvgIcon } from '../Icon';\nimport type { IconName } from '../Icons/IconNames';\n\nimport { InputTypes } from './constants';\nimport { getResources } from './resourceHelper';\nimport { FormOnColor, FormSize, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX, LanguageLocales } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { getColor } from '../../theme/currys';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { mergeRefs } from '../../utils/refs';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize } from '../Icon';\nimport { renderLabel } from '../Label/utils';\nimport LazyIcon from '../LazyIcon';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends\n ErrorWrapperClassNameProps,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n | 'inputMode'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon | IconName;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputContainerRef */\n inputContainerRef?: React.RefObject<HTMLDivElement | null>;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement | null>;\n /** Changes the color profile of the input */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the input */\n size?: keyof typeof FormSize;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInput>;\n /** Ref passed to the input element */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input: React.FC<InputProps> = props => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputWrapperRef,\n onColor = FormOnColor.onwhite,\n size,\n baseIncrementValue,\n label,\n error,\n errorText,\n errorTextId: errorTextIdProp,\n inputId: inputIdProp,\n errorWrapperClassName,\n testId,\n disabled,\n readOnly,\n autoComplete = 'off',\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n inputContainerRef,\n resources,\n ref,\n ...rest\n } = props;\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemInput = {\n ...defaultResources,\n ...resources,\n };\n\n const breakpoint = useBreakpoint();\n const inputContainerRefLocal = useRef<HTMLDivElement>(null);\n const inputId = useIdWithFallback(inputIdProp);\n const [input, setInput] = useState(defaultValue || '');\n const [prevDefaultValue, setPrevDefaultValue] = useState(defaultValue);\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const numRegex = /^[0-9]$/;\n\n if (defaultValue !== prevDefaultValue) {\n setPrevDefaultValue(defaultValue);\n setInput(defaultValue || '');\n }\n\n const onDark = onColor === FormOnColor.ondark;\n const onBlueberry = onColor === FormOnColor.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = onColor === FormOnColor.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const isLarge = size === FormSize.large;\n const isTransparent = transparent && onColor !== FormOnColor.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n [styles['input-container--with-icon--right']]: icon && iconRight,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--large']]: isLarge,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 700) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !isLarge ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n if (!icon) {\n return;\n }\n\n if (typeof icon === 'string') {\n return <LazyIcon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} iconName={icon} />;\n }\n\n return <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRefLocal && inputContainerRefLocal.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRefLocal.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n if (props.onClick) props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n if (onKeyDown) onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper className={errorWrapperClassName} errorText={errorText} errorTextId={errorTextId}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel({ label: label, inputId: inputId, onColor: onColor as FormOnColor })}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n onClick={handleClick}\n ref={mergeRefs([inputContainerRefLocal, inputContainerRef])}\n className={inputContainer}\n style={{ maxWidth }}\n >\n {!iconRight && renderIcon()}\n <input\n {...rest}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputId}\n className={inputClass}\n ref={ref}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters\n maxCharacters={maxCharacters}\n length={input.toString().length}\n maxText={mergedResources.characters}\n onColor={onColor}\n maxWidth={maxWidth}\n />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n};\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAY,aAAA,yBAAA,cAAL;AACL,cAAA,UAAA;AACA,cAAA,YAAA;AACA,cAAA,WAAA;AACA,cAAA,cAAA;AACA,cAAA,YAAA;AACA,cAAA,SAAA;AACA,cAAA,SAAA;AACA,cAAA,UAAA;AACA,cAAA,UAAA;;;;;;AIFF,MAAa,gBAAgB,aAAmD;AAC9E,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB,kBACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACkFb,IAAM,oBAAoB,cAAoB,SAAkB,aAA6B;CAC3F,MAAM,eAAe,UAAU,WAAW;CAC1C,MAAM,YAAY,UAAU,GAAG,SAAS,MAAM;AAG9C,QAAO,QAAQ,eAAA,GAAwC,OAAO,aAAa,KAAK,UAAU;;AAG5F,IAAMA,SAA8B,UAAS;CAC3C,MAAM,EACJ,WACA,cACA,aACA,OAAO,WAAW,MAClB,MACA,cAAc,OACd,MACA,WACA,iBACA,UAAU,YAAY,SACtB,MACA,oBACA,OACA,OACA,WACA,aAAa,iBACb,SAAS,aACT,uBACA,QACA,UACA,UACA,eAAe,OACf,oBACA,cACA,OACA,UACA,UACA,WACA,WACA,eACA,mBACA,WACA,KACA,GAAG,SACD;CACJ,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAMC,kBAAuC;EAC3C,GAHuB,aAAa,SAAS;EAI7C,GAAG;EACJ;CAED,MAAM,aAAa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gBAErB,qBAAC,OAAA;MACC,SAAS;MACT,KAAK,UAAU,CAAC,wBAAwB,kBAAkB,CAAC;MAC3D,WAAW;MACX,OAAO,EAAE,UAAU;;OAElB,CAAC,aAAa,YAAY;OAC3B,oBAAC,SAAA;QACC,GAAI;QACJ,UAAU;QACV,WAAW;QACX,SAAS;QACH;QACA;QACQ;QACd,IAAI;QACJ,WAAW;QACN;QACL,oBAAkB,mBAAmB,OAAO,YAAY;QACxD,gBAAc,CAAC,CAAC;QACN;QACG;QACH;QACV,cAAc,gBAAgB;QACpB;QAEC;SACX;OACD,aAAa,YAAY;;OACtB,EACN,oBAAC,OAAA;MAAI,WAAW,OAAO;gBAAqC;OAAmB,CAAA;MAC3E;IACL,iBACC,oBAAC,uBAAA;KACgB;KACf,QAAQ,MAAM,UAAU,CAAC;KACzB,SAAS,gBAAgB;KAChB;KACC;MACV;IAEH;;IACG;GACO;;AAInB,MAAM,cAAc;AAEpB,IAAA,gBAAe"}
|
|
1
|
+
{"version":3,"file":"Input.js","names":[],"sources":["../src/components/Input/constants.ts","../src/resources/HN.Designsystem.Input.en-GB.json","../src/resources/HN.Designsystem.Input.nb-NO.json","../src/resources/HN.Designsystem.Input.nn-NO.json","../src/components/Input/resourceHelper.ts","../src/components/Input/Input.tsx"],"sourcesContent":["export enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n","{\n \"characters\": \"characters\"\n}\n","{\n \"characters\": \"tegn\"\n}\n","{\n \"characters\": \"teikn\"\n}\n","import type { HNDesignsystemInput } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.Input.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.Input.nb-NO.json';\nimport nnNO from '../../resources/HN.Designsystem.Input.nn-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemInput => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN_NYNORSK:\n return nnNO;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import { useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport type { HNDesignsystemInput } from '../../resources/Resources';\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\nimport type { SvgIcon } from '../Icon';\nimport type { IconName } from '../Icons/IconNames';\n\nimport { InputTypes } from './constants';\nimport { getResources } from './resourceHelper';\nimport { FormOnColor, FormSize, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX, LanguageLocales } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { getColor } from '../../theme/currys';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { mergeRefs } from '../../utils/refs';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize } from '../Icon';\nimport { renderLabel } from '../Label/utils';\nimport LazyIcon from '../LazyIcon';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends\n ErrorWrapperClassNameProps,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n | 'inputMode'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon | IconName;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputContainerRef */\n inputContainerRef?: React.RefObject<HTMLDivElement | null>;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement | null>;\n /** Changes the color profile of the input */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the input */\n size?: keyof typeof FormSize;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** Resources for component */\n resources?: Partial<HNDesignsystemInput>;\n /** Ref passed to the input element */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input: React.FC<InputProps> = props => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputWrapperRef,\n onColor = FormOnColor.onwhite,\n size,\n baseIncrementValue,\n label,\n error,\n errorText,\n errorTextId: errorTextIdProp,\n inputId: inputIdProp,\n errorWrapperClassName,\n testId,\n disabled,\n readOnly,\n autoComplete = 'off',\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n inputContainerRef,\n resources,\n ref,\n ...rest\n } = props;\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemInput = {\n ...defaultResources,\n ...resources,\n };\n\n const breakpoint = useBreakpoint();\n const inputContainerRefLocal = useRef<HTMLDivElement>(null);\n const inputId = useIdWithFallback(inputIdProp);\n const [input, setInput] = useState(defaultValue || '');\n const [prevDefaultValue, setPrevDefaultValue] = useState(defaultValue);\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const numRegex = /^[0-9]$/;\n\n if (defaultValue !== prevDefaultValue) {\n setPrevDefaultValue(defaultValue);\n setInput(defaultValue || '');\n }\n\n const onDark = onColor === FormOnColor.ondark;\n const onBlueberry = onColor === FormOnColor.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = onColor === FormOnColor.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const isLarge = size === FormSize.large;\n const isTransparent = transparent && onColor !== FormOnColor.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n [styles['input-container--with-icon--right']]: icon && iconRight,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--large']]: isLarge,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 700) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !isLarge ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n if (!icon) {\n return;\n }\n\n if (typeof icon === 'string') {\n return <LazyIcon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} iconName={icon} />;\n }\n\n return <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRefLocal && inputContainerRefLocal.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRefLocal.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n if (props.onClick) props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n if (onKeyDown) onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper className={errorWrapperClassName} errorText={errorText} errorTextId={errorTextId}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel({ label: label, inputId: inputId, onColor: onColor as FormOnColor })}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div\n onClick={handleClick}\n ref={mergeRefs([inputContainerRefLocal, inputContainerRef])}\n className={inputContainer}\n style={{ maxWidth }}\n >\n {!iconRight && renderIcon()}\n <input\n {...rest}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputId}\n className={inputClass}\n ref={ref}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters\n maxCharacters={maxCharacters}\n length={input.toString().length}\n maxText={mergedResources.characters}\n onColor={onColor}\n maxWidth={maxWidth}\n />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n};\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAY,aAAL,yBAAA,YAAA;CACL,WAAA,UAAO;CACP,WAAA,YAAS;CACT,WAAA,WAAQ;CACR,WAAA,cAAW;CACX,WAAA,YAAS;CACT,WAAA,SAAM;CACN,WAAA,SAAM;CACN,WAAA,UAAO;CACP,WAAA,UAAO;;KACR;;;;;;AIHD,IAAa,gBAAgB,aAAmD;CAC9E,QAAQ,UAAR;EACE,KAAK,gBAAgB,SACnB,OAAO;EACT,KAAK,gBAAgB,mBACnB,OAAO;EACT,KAAK,gBAAgB;EACrB,SACE,OAAO;;;;;ACkFb,IAAM,oBAAoB,YAAoB,SAAkB,aAA6B;CAC3F,MAAM,eAAe,UAAU,WAAW;CAC1C,MAAM,YAAY,UAAU,GAAG,SAAS,MAAM;CAG9C,OAAO,QAAQ,aAAA,GAAwC,OAAO,aAAa,KAAK,UAAU;;AAG5F,IAAM,SAA8B,UAAS;CAC3C,MAAM,EACJ,WACA,cACA,aACA,OAAO,WAAW,MACl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SAAS,KAAK,EAAE,IAAI,EACtB,cAAc,UAAU;;CAI5B,MAAM,WAAW,QAAQ,iBAAiB,OAAO,CAAC,CAAC,MAAM,SAAS,GAAG,KAAA;CAErE,OACE,oBAAC,sBAAD;EAAc,WAAW;EAAkC;EAAwB;YACjF,qBAAC,OAAD;GAAK,eAAa;GAAQ,oBAAkB,YAAY;GAAO,WAAW;GAAmB,KAAK;aAAlG;IACG,YAAY;KAAS;KAAgB;KAAkB;KAAwB,CAAC;IAEjF,qBAAC,OAAD;KAAK,WAAW,OAAO;eAAvB,CAEE,qBAAC,OAAD;MACE,SAAS;MACT,KAAK,UAAU,CAAC,wBAAwB,kBAAkB,CAAC;MAC3D,WAAW;MACX,OAAO,EAAE,UAAU;gBAJrB;OAMG,CAAC,aAAa,YAAY;OAC3B,oBAAC,SAAD;QACE,GAAI;QACJ,UAAU;QACV,WAAW;QACX,SAAS;QACH;QACA;QACQ;QACd,IAAI;QACJ,WAAW;QACN;QACL,oBAAkB,mBAAmB,OAAO,YAAY;QACxD,gBAAc,CAAC,CAAC;QACN;QACG;QACH;QACV,cAAc,gBAAgB;QACpB;QAEC;QACX,CAAA;OACD,aAAa,YAAY;OACtB;SACN,oBAAC,OAAD;MAAK,WAAW,OAAO;gBAAqC;MAAmB,CAAA,CAC3E;;IACL,iBACC,oBAAC,eAAD;KACiB;KACf,QAAQ,MAAM,UAAU,CAAC;KACzB,SAAS,gBAAgB;KAChB;KACC;KACV,CAAA;IAEH;IACG;;EACO,CAAA;;AAInB,MAAM,cAAc"}
|
package/lib/LazyIcon.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconSize } from "./constants.js";
|
|
2
2
|
import { t as Icon_default } from "./Icon.js";
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
3
|
+
import { n as _rolldown_dynamic_import_helper_default, t as ErrorBoundary } from "./ErrorBoundary.js";
|
|
4
|
+
import { useIsServerSide } from "./hooks/useIsServerSide.js";
|
|
5
5
|
import { Suspense, lazy, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
//#region src/components/LazyIcon/LazyIcon.tsx
|
|
8
|
+
var LazyIcon = ({ iconName, size = IconSize.Small, ...rest }) => {
|
|
9
|
+
const lazyLoadIcon = (iconName) => lazy(() => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
|
|
9
10
|
"../Icons/ActiveMonitoring.tsx": () => import("./components/Icons/ActiveMonitoring.js"),
|
|
10
11
|
"../Icons/AcupunctureBack.tsx": () => import("./components/Icons/AcupunctureBack.js"),
|
|
11
12
|
"../Icons/AlarmClock.tsx": () => import("./components/Icons/AlarmClock.js"),
|
|
@@ -356,7 +357,7 @@ const LazyIcon = ({ iconName, size = IconSize.Small, ...rest }) => {
|
|
|
356
357
|
"../Icons/Zoom.tsx": () => import("./components/Icons/Zoom.js"),
|
|
357
358
|
"../Icons/ZoomInLeft.tsx": () => import("./components/Icons/ZoomInLeft.js"),
|
|
358
359
|
"../Icons/ZoomOutLeft.tsx": () => import("./components/Icons/ZoomOutLeft.js")
|
|
359
|
-
}, `../Icons/${iconName
|
|
360
|
+
}), `../Icons/${iconName}.tsx`, 3));
|
|
360
361
|
const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);
|
|
361
362
|
if (useIsServerSide()) return null;
|
|
362
363
|
const fallback = /* @__PURE__ */ jsx("svg", {
|
|
@@ -372,7 +373,7 @@ const LazyIcon = ({ iconName, size = IconSize.Small, ...rest }) => {
|
|
|
372
373
|
width: size,
|
|
373
374
|
height: size
|
|
374
375
|
});
|
|
375
|
-
return /* @__PURE__ */ jsx(
|
|
376
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
376
377
|
fallback,
|
|
377
378
|
reset: iconName,
|
|
378
379
|
children: /* @__PURE__ */ jsx(Suspense, {
|
|
@@ -385,9 +386,14 @@ const LazyIcon = ({ iconName, size = IconSize.Small, ...rest }) => {
|
|
|
385
386
|
})
|
|
386
387
|
});
|
|
387
388
|
};
|
|
389
|
+
//#endregion
|
|
390
|
+
//#region src/components/LazyIcon/utils.ts
|
|
391
|
+
/** @deprecated Use the useIsServerSide hook instead */
|
|
392
|
+
var isServerSide = () => typeof document === "undefined";
|
|
393
|
+
//#endregion
|
|
394
|
+
//#region src/components/LazyIcon/index.ts
|
|
388
395
|
var LazyIcon_default = LazyIcon;
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
export { isServerSide as n, LazyIcon as r, LazyIcon_default$1 as t };
|
|
396
|
+
//#endregion
|
|
397
|
+
export { isServerSide as n, LazyIcon as r, LazyIcon_default as t };
|
|
392
398
|
|
|
393
399
|
//# sourceMappingURL=LazyIcon.js.map
|
package/lib/LazyIcon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyIcon.js","names":[
|
|
1
|
+
{"version":3,"file":"LazyIcon.js","names":[],"sources":["../src/components/LazyIcon/LazyIcon.tsx","../src/components/LazyIcon/utils.ts","../src/components/LazyIcon/index.ts"],"sourcesContent":["import { lazy, Suspense, useMemo } from 'react';\n\nimport type { BaseIconProps, SvgIcon } from '../Icon';\nimport type { IconName } from '../Icons/IconNames';\n\nimport ErrorBoundary from './ErrorBoundary';\nimport { useIsServerSide } from '../../hooks/useIsServerSide';\nimport Icon, { IconSize } from '../Icon';\n\nexport interface LazyIconProps extends BaseIconProps {\n // Navnet på ikonet som skal vises. Tilsvarer filnavnet til ikonet i Icons-mappen\n iconName: IconName;\n}\n\nexport const LazyIcon: React.FC<LazyIconProps> = ({ iconName, size = IconSize.Small, ...rest }) => {\n const lazyLoadIcon = (iconName: IconName): React.LazyExoticComponent<SvgIcon> => lazy<SvgIcon>(() => import(`../Icons/${iconName}.tsx`));\n\n const icon = useMemo(() => lazyLoadIcon(iconName), [iconName]);\n const isServerSide = useIsServerSide();\n\n if (isServerSide) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 48 48\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={iconName}>\n <Suspense fallback={fallback}>\n <Icon svgIcon={icon} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIcon;\n","/** @deprecated Use the useIsServerSide hook instead */\nexport const isServerSide = (): boolean => typeof document === 'undefined';\n","import LazyIcon from './LazyIcon';\nexport * from './LazyIcon';\nexport * from './utils';\nexport default LazyIcon;\n"],"mappings":";;;;;;;AAcA,IAAa,YAAqC,EAAE,UAAU,OAAO,SAAS,OAAO,GAAG,WAAW;CACjG,MAAM,gBAAgB,aAA2D,WAAoB,wCAAA,uBAAA,OAAA;EAAA,uCAAA,OAAA;EAAA,sCAAA,OAAA;EAAA,iCAAA,OAAA;EAAA,oCAAA,OAAA;EAAA,sCAAA,OAAA;EAAA,iCAAA,OAAA;EAAA,8BAAA,OAAA;EAAA,4BAAA,OAAA;EAAA,8BAAA,OAAA;EAAA,iCAAA,OAAA;EAAA,gCAAA,OAAA;EAAA,gCAAA,OAAA;EAAA,iCAAA,OAAA;EAAA,8BAAA,OAAA;EAAA,mCAAA,OAAA;EAAA,iCAAA,OAAA;EAAA,0BAAA,OAAA;EAAA,6BAAA,OAAA;EAAA,0CAAA,OAAA;EAAA,2BAAA,OAAA;EAAA,8BAAA,OAAA;EAAA,mCAAA,OAAA;EAAA,2BAAA,OAAA;EAAA,2BAAA,OAAA;EAAA,mCAAA,OAAA;EAAA,mCAAA,OAAA;EAAA,2BAAA,OAAA;EAAA,2BAAA,OAAA;EAAA,8BAAA,OAAA;EAAA,4BAAA,OAAA;EAAA,2CAAA,OAAA;EAAA,oCAAA,OAAA;EAAA,8BAAA,OAAA;EAAA,kCAAA,OAAA;EAAA,mCAAA,OAAA;EAAA,0BAAA,OAAA;EAAA,+BAAA,OAAA;EAAA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AO;CAGT,MAAM,WACJ,oBAAC,OAAD;EACE,eAAa;EACb,MAAM;EACN,WAAW;EACX,eAAa;EACb,SAAQ;EACR,OAAO;GAAE,UAAU;GAAM,WAAW;GAAM;EAC1C,OAAO;EACP,QAAQ;EACR,CAAA;CAGJ,OACE,oBAAC,eAAD;EAAyB;EAAU,OAAO;YACxC,oBAAC,UAAD;GAAoB;aAClB,oBAAC,cAAD;IAAM,SAAS;IAAY;IAAM,GAAI;IAAQ,CAAA;GACpC,CAAA;EACG,CAAA;;;;;ACzCpB,IAAa,qBAA8B,OAAO,aAAa;;;ACE/D,IAAA,mBAAe"}
|
package/lib/LazyIllustration.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { n as
|
|
2
|
-
import {
|
|
1
|
+
import { n as _rolldown_dynamic_import_helper_default, t as ErrorBoundary } from "./ErrorBoundary.js";
|
|
2
|
+
import { useIsServerSide } from "./hooks/useIsServerSide.js";
|
|
3
3
|
import { n as getIllustration } from "./utils4.js";
|
|
4
4
|
import { t as Illustration_default } from "./Illustration.js";
|
|
5
|
-
import {
|
|
5
|
+
import { IllustrationSizeList } from "./components/Illustrations/IllustrationNames.js";
|
|
6
6
|
import { Suspense, lazy, useMemo } from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
//#region src/components/LazyIllustration/LazyIllustration.tsx
|
|
9
|
+
var LazyIllustration = ({ illustrationName, size = 512, ...rest }) => {
|
|
10
|
+
const lazyLoadIllustration = (illustrationName, size) => {
|
|
11
|
+
const sizes = IllustrationSizeList[illustrationName];
|
|
11
12
|
const illustrationFileName = getIllustration({
|
|
12
|
-
size
|
|
13
|
+
size,
|
|
13
14
|
...sizes
|
|
14
15
|
});
|
|
15
|
-
return lazy(() =>
|
|
16
|
+
return lazy(() => _rolldown_dynamic_import_helper_default(/* @__PURE__ */ Object.assign({
|
|
16
17
|
"../Illustrations/BabyMobile.tsx": () => import("./components/Illustrations/BabyMobile.js"),
|
|
17
18
|
"../Illustrations/BabyMobileMedium.tsx": () => import("./components/Illustrations/BabyMobileMedium.js"),
|
|
18
19
|
"../Illustrations/Child.tsx": () => import("./components/Illustrations/Child.js"),
|
|
@@ -37,7 +38,7 @@ const LazyIllustration = ({ illustrationName, size = 512, ...rest }) => {
|
|
|
37
38
|
"../Illustrations/Support2Medium.tsx": () => import("./components/Illustrations/Support2Medium.js"),
|
|
38
39
|
"../Illustrations/Thinking.tsx": () => import("./components/Illustrations/Thinking.js"),
|
|
39
40
|
"../Illustrations/ThinkingMedium.tsx": () => import("./components/Illustrations/ThinkingMedium.js")
|
|
40
|
-
}, `../Illustrations/${illustrationFileName}.tsx`, 3));
|
|
41
|
+
}), `../Illustrations/${illustrationFileName}.tsx`, 3));
|
|
41
42
|
};
|
|
42
43
|
const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);
|
|
43
44
|
if (useIsServerSide()) return null;
|
|
@@ -54,7 +55,7 @@ const LazyIllustration = ({ illustrationName, size = 512, ...rest }) => {
|
|
|
54
55
|
width: size,
|
|
55
56
|
height: size
|
|
56
57
|
});
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
58
|
+
return /* @__PURE__ */ jsx(ErrorBoundary, {
|
|
58
59
|
fallback,
|
|
59
60
|
reset: illustrationName,
|
|
60
61
|
children: /* @__PURE__ */ jsx(Suspense, {
|
|
@@ -67,7 +68,10 @@ const LazyIllustration = ({ illustrationName, size = 512, ...rest }) => {
|
|
|
67
68
|
})
|
|
68
69
|
});
|
|
69
70
|
};
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/components/LazyIllustration/index.ts
|
|
73
|
+
var LazyIllustration_default = LazyIllustration;
|
|
74
|
+
//#endregion
|
|
75
|
+
export { LazyIllustration as n, LazyIllustration_default as t };
|
|
72
76
|
|
|
73
77
|
//# sourceMappingURL=LazyIllustration.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyIllustration.js","names":[
|
|
1
|
+
{"version":3,"file":"LazyIllustration.js","names":[],"sources":["../src/components/LazyIllustration/LazyIllustration.tsx","../src/components/LazyIllustration/index.ts"],"sourcesContent":["import { lazy, Suspense, useMemo } from 'react';\n\nimport type { BaseIllustrationProps, SvgIllustration } from '../Illustration';\nimport type { IllustrationName } from '../Illustrations/IllustrationNames';\n\nimport { useIsServerSide } from '../../hooks/useIsServerSide';\nimport Illustration from '../Illustration';\nimport { getIllustration } from '../Illustration/utils';\nimport { IllustrationSizeList } from '../Illustrations/IllustrationNames';\nimport ErrorBoundary from '../LazyIcon/ErrorBoundary';\n\nexport interface LazyIllustrationProps extends BaseIllustrationProps {\n // Navnet på illustrasjonen som skal vises. Tilsvarer filnavnet til illustrasjonen i Icons-mappen\n illustrationName: IllustrationName;\n}\n\nexport const LazyIllustration: React.FC<LazyIllustrationProps> = ({ illustrationName, size = 512, ...rest }) => {\n const lazyLoadIllustration = (illustrationName: IllustrationName, size: number): React.LazyExoticComponent<SvgIllustration> => {\n const sizes = IllustrationSizeList[illustrationName];\n const illustrationFileName = getIllustration({ size, ...sizes });\n\n return lazy<SvgIllustration>(() => import(`../Illustrations/${illustrationFileName}.tsx`));\n };\n\n const illustration = useMemo(() => lazyLoadIllustration(illustrationName, size), [illustrationName, size]);\n const isServerSide = useIsServerSide();\n\n if (isServerSide) {\n return null;\n }\n\n const fallback = (\n <svg\n data-testid={'fallback'}\n role={'presentation'}\n focusable={false}\n aria-hidden={true}\n viewBox=\"0 0 512 512\"\n style={{ minWidth: size, minHeight: size }}\n width={size}\n height={size}\n />\n );\n\n return (\n <ErrorBoundary fallback={fallback} reset={illustrationName}>\n <Suspense fallback={fallback}>\n <Illustration illustration={illustration} size={size} {...rest} />\n </Suspense>\n </ErrorBoundary>\n );\n};\n\nexport default LazyIllustration;\n","import LazyIllustration from './LazyIllustration';\nexport * from './LazyIllustration';\nexport default LazyIllustration;\n"],"m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HANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { AnalyticsId, LanguageLocales } from "./constants.js";
|
|
2
|
+
import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
|
|
3
|
+
import ArrowUpRight from "./components/Icons/ArrowUpRight.js";
|
|
4
|
+
import { useLanguage } from "./hooks/useLanguage.js";
|
|
5
5
|
import { i as renderElementHeader } from "./ElementHeader.js";
|
|
6
6
|
import { n as listEditModeWrapperClassnames, t as ListEditMode_default } from "./ListEditMode.js";
|
|
7
|
-
import
|
|
7
|
+
import ChevronRight from "./components/Icons/ChevronRight.js";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import LinkListStyles from "./components/LinkList/styles.module.scss";
|
|
12
12
|
var HN_Designsystem_LinkList_en_GB_default = { editMode_deleteButtonAriaLabel: "Delete" };
|
|
13
13
|
var HN_Designsystem_LinkList_nb_NO_default = { editMode_deleteButtonAriaLabel: "Slett" };
|
|
14
|
-
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/LinkList/resourceHelper.ts
|
|
16
|
+
var getResources = (language) => {
|
|
15
17
|
switch (language) {
|
|
16
18
|
case LanguageLocales.ENGLISH: return HN_Designsystem_LinkList_en_GB_default;
|
|
17
19
|
case LanguageLocales.NORWEGIAN:
|
|
18
20
|
default: return HN_Designsystem_LinkList_nb_NO_default;
|
|
19
21
|
}
|
|
20
22
|
};
|
|
21
|
-
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/components/LinkList/LinkList.tsx
|
|
25
|
+
var Link = (props) => {
|
|
22
26
|
const { children, className = "", color = "white", icon, image, size = "medium", chevron = false, linkRef, status = "none", testId, target, variant, htmlMarkup = "a", highlightText, editMode = false, contentId, resources, ref, external = false, ...restProps } = props;
|
|
23
27
|
const { refObject, isHovered } = usePseudoClasses(linkRef);
|
|
24
28
|
const isFill = variant === "fill";
|
|
@@ -48,8 +52,8 @@ const Link = (props) => {
|
|
|
48
52
|
children: image
|
|
49
53
|
});
|
|
50
54
|
let chevronIcon = void 0;
|
|
51
|
-
if (external) chevronIcon =
|
|
52
|
-
else if (chevron) chevronIcon =
|
|
55
|
+
if (external) chevronIcon = ArrowUpRight;
|
|
56
|
+
else if (chevron) chevronIcon = ChevronRight;
|
|
53
57
|
return editMode ? /* @__PURE__ */ jsx("div", {
|
|
54
58
|
id: contentId,
|
|
55
59
|
className: liClasses,
|
|
@@ -150,11 +154,14 @@ var LinkListComponent = (props) => {
|
|
|
150
154
|
})
|
|
151
155
|
});
|
|
152
156
|
};
|
|
153
|
-
|
|
157
|
+
var LinkList = LinkListComponent;
|
|
154
158
|
LinkList.displayName = "LinkList";
|
|
155
159
|
LinkList.Link = Link;
|
|
156
160
|
Link.displayName = "LinkList.Link";
|
|
157
|
-
|
|
158
|
-
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region src/components/LinkList/index.ts
|
|
163
|
+
var LinkList_default = LinkList;
|
|
164
|
+
//#endregion
|
|
165
|
+
export { Link as n, LinkList as r, LinkList_default as t };
|
|
159
166
|
|
|
160
167
|
//# sourceMappingURL=LinkList.js.map
|
package/lib/LinkList.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.js","names":["Link: LinkType","LinkListComponent: React.FC<LinkListProps>","mergedResources: HNDesignsystemLinkList"],"sources":["../src/resources/HN.Designsystem.LinkList.en-GB.json","../src/resources/HN.Designsystem.LinkList.nb-NO.json","../src/components/LinkList/resourceHelper.ts","../src/components/LinkList/LinkList.tsx","../src/components/LinkList/index.ts"],"sourcesContent":["{\n \"editMode_deleteButtonAriaLabel\": \"Delete\"\n}\n","{\n \"editMode_deleteButtonAriaLabel\": \"Slett\"\n}\n","import type { HNDesignsystemLinkList } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.LinkList.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.LinkList.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemLinkList => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React from 'react';\n\nimport cn from 'classnames';\n\nimport type { HNDesignsystemLinkList } from '../../resources/Resources';\nimport type { PaletteNames } from '../../theme/palette';\nimport type { ElementHeaderType } from '../ElementHeader/ElementHeader';\nimport type { ListEditModeItemProps } from '../ListEditMode';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { renderElementHeader } from '../ElementHeader/utils';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\nimport ChevronRight from '../Icons/ChevronRight';\nimport ListEditModeItem from '../ListEditMode';\nimport { listEditModeWrapperClassnames } from '../ListEditMode/constants';\n\nimport LinkListStyles from './styles.module.scss';\n\nexport type LinkListSize = 'small' | 'medium' | 'large';\n\nexport type LinkListStatus = 'none' | 'new';\n\nexport type LinkAnchorTargets = '_self' | '_blank' | '_parent';\n\nexport type LinkListColors = Extract<PaletteNames, 'white' | 'blueberry' | 'cherry' | 'neutral'>;\nexport type LinkListVariant = 'line' | 'outline' | 'fill' | 'fill-negative';\n\nexport interface LinkType extends React.FC<LinkProps> {\n ElementHeader?: ElementHeaderType;\n}\n\nexport type LinkTags = 'button' | 'a';\nexport interface CompoundComponent extends React.FC<LinkListProps> {\n Link: LinkType;\n}\n\nexport interface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the colors of the list. */\n color?: LinkListColors;\n /** Toggles chevron icon on or off. */\n chevron?: boolean;\n /** Changes size of the LinkList. */\n size?: LinkListSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets visual priority */\n variant?: LinkListVariant;\n /** Highlights text. Used for search results */\n highlightText?: string;\n /**\n * @experimental This prop is experimental and may change in the future.\n * Enables ListEditMode\n */\n editMode?: boolean;\n /** Resources for component */\n resources?: Partial<HNDesignsystemLinkList>;\n /** Ref passed to the ul element */\n ref?: React.Ref<HTMLUListElement | null>;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type LinkProps = Modify<\n React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>,\n {\n children: React.ReactNode;\n /** @private Turns chevron icon on/off. Overwritten by LinkList so not possible to set on LinkList.Link */\n chevron?: boolean;\n className?: string;\n icon?: React.ReactElement;\n /** Renders the image in the LinkList header */\n image?: React.ReactElement;\n /** Displays a status on the left side: default none */\n status?: LinkListStatus;\n href?: string;\n target?: LinkAnchorTargets;\n /** HTML markup for link. Default: a */\n htmlMarkup?: LinkTags;\n /** Ref for lenke/knapp */\n linkRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Highlights text. Override if different from list */\n highlightText?: string;\n /** Resources for component */\n resources?: Partial<HNDesignsystemLinkList>;\n /** @experimental id for content (only used in edit mode for aria-describedby) */\n contentId?: string;\n /** Ref passed to the list item element */\n ref?: React.Ref<HTMLLIElement | null>;\n /** Replaces the chevron with an arrow up right which is used for indicating external links */\n external?: boolean;\n }\n> &\n Pick<LinkListProps, 'color' | 'size' | 'variant'> &\n ListEditModeItemProps;\n\nexport const Link: LinkType = (props: LinkProps) => {\n const {\n children,\n className = '',\n color = 'white',\n icon,\n image,\n size = 'medium',\n chevron = false,\n linkRef,\n status = 'none',\n testId,\n target,\n variant,\n htmlMarkup = 'a',\n highlightText,\n editMode = false,\n contentId,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resources, // used by ListEditModeItem in LinkList\n ref,\n external = false,\n ...restProps\n } = props;\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(linkRef);\n\n const isFill = variant === 'fill';\n const isFillNegative = variant === 'fill-negative';\n const isOutline = variant === 'outline';\n const isLine = variant === 'line';\n\n const liClasses = cn(LinkListStyles['link-list'], {\n [LinkListStyles['link-list__list-item--line']]: isLine,\n [LinkListStyles['link-list__list-item--outline']]: isOutline,\n [LinkListStyles[`link-list__list-item--outline--${color}`]]: isOutline,\n });\n const linkClasses = cn(\n LinkListStyles['link-list__anchor'],\n LinkListStyles[`link-list__anchor--${color}`],\n {\n [LinkListStyles[`link-list__anchor--line--${color}`]]: isLine,\n [LinkListStyles['link-list__anchor--fill']]: isFill,\n [LinkListStyles[`link-list__anchor--fill--${color}`]]: isFill,\n [LinkListStyles['link-list__anchor--outline']]: isOutline,\n [LinkListStyles[`link-list__anchor--outline--${color}`]]: isOutline,\n [LinkListStyles['link-list__anchor--fill-negative']]: isFillNegative,\n [LinkListStyles[`link-list__anchor--fill-negative--${color}`]]: isFillNegative,\n [LinkListStyles[`link-list__anchor--${size}`]]: size,\n [LinkListStyles['link-list__anchor--button']]: htmlMarkup === 'button',\n [LinkListStyles['link-list__anchor--new']]: status === 'new',\n },\n className\n );\n\n const statusMarkerClasses = cn(LinkListStyles['link-list__status-marker'], {\n [LinkListStyles['link-list__status-marker--new']]: status === 'new',\n });\n\n const imageContainer = <span className={LinkListStyles['link-list__image-container']}>{image}</span>;\n\n let chevronIcon = undefined;\n if (external) {\n chevronIcon = ArrowUpRight;\n } else if (chevron) {\n chevronIcon = ChevronRight;\n }\n\n return editMode ? (\n <div id={contentId} className={liClasses} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n <div className={linkClasses}>\n <div className={statusMarkerClasses}></div>\n {renderElementHeader(children, {\n titleHtmlMarkup: 'span',\n size,\n parentType: 'linklist',\n chevronIcon: chevronIcon,\n icon: icon ?? imageContainer,\n highlightText,\n })}\n </div>\n </div>\n ) : (\n <li className={liClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n {htmlMarkup === 'a' ? (\n <a\n className={linkClasses}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n target={target}\n {...restProps}\n >\n <div className={statusMarkerClasses}></div>\n {renderElementHeader(children, {\n titleHtmlMarkup: 'span',\n isHovered,\n size,\n parentType: 'linklist',\n chevronIcon: chevronIcon,\n icon: icon ?? imageContainer,\n highlightText,\n })}\n </a>\n ) : (\n htmlMarkup === 'button' && (\n <button className={linkClasses} ref={refObject as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n <div className={statusMarkerClasses}></div>\n {renderElementHeader(children, {\n titleHtmlMarkup: 'span',\n isHovered,\n size,\n parentType: 'linklist',\n chevronIcon: chevronIcon,\n icon: icon ?? imageContainer,\n highlightText,\n })}\n </button>\n )\n )}\n </li>\n );\n};\n\nconst LinkListComponent: React.FC<LinkListProps> = (props: LinkListProps) => {\n const {\n children,\n className = '',\n chevron = false,\n size = 'medium',\n color = 'white',\n testId,\n variant = 'line',\n highlightText,\n editMode = false,\n resources,\n ref,\n } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemLinkList = {\n ...defaultResources,\n ...resources,\n };\n\n const listClassNames = cn(LinkListStyles['link-list'], className, {\n [LinkListStyles[`link-list--outline--${color}`]]: variant === 'outline',\n [listEditModeWrapperClassnames]: editMode,\n });\n\n return (\n <ul ref={ref} className={listClassNames} data-testid={testId} data-analyticsid={AnalyticsId.LinkList}>\n {React.Children.map(children, (child: React.ReactNode, index) => {\n if (React.isValidElement<LinkProps>(child) && child.type === Link) {\n if (editMode) {\n const childResources = child.props.resources;\n const deleteAriaLabel = childResources?.editMode_deleteButtonAriaLabel ?? mergedResources.editMode_deleteButtonAriaLabel;\n const itemId = `linklist-item-${index}`;\n\n return (\n <ListEditModeItem\n color={color}\n variant={variant}\n onDelete={child.props.onDelete}\n contentId={itemId}\n deleteButtonAriaLabel={deleteAriaLabel}\n >\n {React.cloneElement(child, {\n color,\n size,\n chevron: false,\n variant,\n highlightText: highlightText,\n editMode: true,\n contentId: itemId,\n })}\n </ListEditModeItem>\n );\n } else {\n return React.cloneElement(child, {\n color,\n size,\n chevron,\n variant,\n highlightText: highlightText,\n editMode: false,\n });\n }\n }\n return null;\n })}\n </ul>\n );\n};\n\nexport const LinkList = LinkListComponent as CompoundComponent;\n\nLinkList.displayName = 'LinkList';\nLinkList.Link = Link;\nLink.displayName = 'LinkList.Link';\n\nexport default LinkList;\n","import LinkList from './LinkList';\nexport * from './LinkList';\nexport default LinkList;\n"],"mappings":";;;;;;;;;;;;;AEMA,MAAa,gBAAgB,aAAsD;AACjF,SAAQ,UAAR;EACE,KAAK,gBAAgB,QACnB,QAAO;EACT,KAAK,gBAAgB;EACrB,QACE,QAAO;;;AC4Fb,MAAaA,QAAkB,UAAqB;CAClD,MAAM,EACJ,UACA,YAAY,IACZ,QAAQ,SACR,MACA,OACA,OAAO,UACP,UAAU,OACV,SACA,SAAS,QACT,QACA,QACA,SACA,aAAa,KACb,eACA,WAAW,OACX,WAEA,WACA,KACA,WAAW,OACX,GAAG,cACD;CACJ,MAAM,EAAE,WAAW,cAAc,iBAA+D,QAAQ;CAExG,MAAM,SAAS,YAAY;CAC3B,MAAM,iBAAiB,YAAY;CACnC,MAAM,YAAY,YAAY;CAC9B,MAAM,SAAS,YAAY;CAE3B,MAAM,YAAY,WAAG,eAAe,cAAc;GAC/C,eAAe,gCAAgC;GAC/C,eAAe,mCAAmC;GAClD,eAAe,kCAAkC,WAAW;EAC9D,CAAC;CACF,MAAM,cAAc,WAClB,eAAe,sBACf,eAAe,sBAAsB,UACrC;GACG,eAAe,4BAA4B,WAAW;GACtD,eAAe,6BAA6B;GAC5C,eAAe,4BAA4B,WAAW;GACtD,eAAe,gCAAgC;GAC/C,eAAe,+BAA+B,WAAW;GACzD,eAAe,sCAAsC;GACrD,eAAe,qCAAqC,WAAW;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,OAAO,UACP,QAAQ,SACR,QACA,UAAU,QACV,eACA,WAAW,OACX,WACA,QACE;CAEJ,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAMC,kBAA0C;EAC9C,GAHuB,aAAa,SAAS;EAI7C,GAAG;EACJ;AAOD,QACE,oBAAC,MAAA;EAAQ;EAAK,WANO,WAAG,eAAe,cAAc,WAAW;IAC/D,eAAe,uBAAuB,WAAW,YAAY;IAC7D,gCAAgC;GAClC,CAAC;EAGyC,eAAa;EAAQ,oBAAkB,YAAY;YACzF,MAAM,SAAS,IAAI,WAAW,OAAwB,UAAU;AAC/D,OAAI,MAAM,eAA0B,MAAM,IAAI,MAAM,SAAS,KAC3D,KAAI,UAAU;IAEZ,MAAM,kBADiB,MAAM,MAAM,WACK,kCAAkC,gBAAgB;IAC1F,MAAM,SAAS,iBAAiB;AAEhC,WACE,oBAAC,sBAAA;KACQ;KACE;KACT,UAAU,MAAM,MAAM;KACtB,WAAW;KACX,uBAAuB;eAEtB,MAAM,aAAa,OAAO;MACzB;MACA;MACA,SAAS;MACT;MACe;MACf,UAAU;MACV,WAAW;MACZ,CAAC;MACe;SAGrB,QAAO,MAAM,aAAa,OAAO;IAC/B;IACA;IACA;IACA;IACe;IACf,UAAU;IACX,CAAC;AAGN,UAAO;IACP;GACC;;AAIT,MAAa,WAAW;AAExB,SAAS,cAAc;AACvB,SAAS,OAAO;AAChB,KAAK,cAAc;AC7SnB,IAAA,qBD+Se"}
|
|
1
|
+
{"version":3,"file":"LinkList.js","names":[],"sources":["../src/resources/HN.Designsystem.LinkList.en-GB.json","../src/resources/HN.Designsystem.LinkList.nb-NO.json","../src/components/LinkList/resourceHelper.ts","../src/components/LinkList/LinkList.tsx","../src/components/LinkList/index.ts"],"sourcesContent":["{\n \"editMode_deleteButtonAriaLabel\": \"Delete\"\n}\n","{\n \"editMode_deleteButtonAriaLabel\": \"Slett\"\n}\n","import type { HNDesignsystemLinkList } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport enGB from '../../resources/HN.Designsystem.LinkList.en-GB.json';\nimport nbNO from '../../resources/HN.Designsystem.LinkList.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemLinkList => {\n switch (language) {\n case LanguageLocales.ENGLISH:\n return enGB;\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import React from 'react';\n\nimport cn from 'classnames';\n\nimport type { HNDesignsystemLinkList } from '../../resources/Resources';\nimport type { PaletteNames } from '../../theme/palette';\nimport type { ElementHeaderType } from '../ElementHeader/ElementHeader';\nimport type { ListEditModeItemProps } from '../ListEditMode';\n\nimport { getResources } from './resourceHelper';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { renderElementHeader } from '../ElementHeader/utils';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\nimport ChevronRight from '../Icons/ChevronRight';\nimport ListEditModeItem from '../ListEditMode';\nimport { listEditModeWrapperClassnames } from '../ListEditMode/constants';\n\nimport LinkListStyles from './styles.module.scss';\n\nexport type LinkListSize = 'small' | 'medium' | 'large';\n\nexport type LinkListStatus = 'none' | 'new';\n\nexport type LinkAnchorTargets = '_self' | '_blank' | '_parent';\n\nexport type LinkListColors = Extract<PaletteNames, 'white' | 'blueberry' | 'cherry' | 'neutral'>;\nexport type LinkListVariant = 'line' | 'outline' | 'fill' | 'fill-negative';\n\nexport interface LinkType extends React.FC<LinkProps> {\n ElementHeader?: ElementHeaderType;\n}\n\nexport type LinkTags = 'button' | 'a';\nexport interface CompoundComponent extends React.FC<LinkListProps> {\n Link: LinkType;\n}\n\nexport interface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the colors of the list. */\n color?: LinkListColors;\n /** Toggles chevron icon on or off. */\n chevron?: boolean;\n /** Changes size of the LinkList. */\n size?: LinkListSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets visual priority */\n variant?: LinkListVariant;\n /** Highlights text. Used for search results */\n highlightText?: string;\n /**\n * @experimental This prop is experimental and may change in the future.\n * Enables ListEditMode\n */\n editMode?: boolean;\n /** Resources for component */\n resources?: Partial<HNDesignsystemLinkList>;\n /** Ref passed to the ul element */\n ref?: React.Ref<HTMLUListElement | null>;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type LinkProps = Modify<\n React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>,\n {\n children: React.ReactNode;\n /** @private Turns chevron icon on/off. Overwritten by LinkList so not possible to set on LinkList.Link */\n chevron?: boolean;\n className?: string;\n icon?: React.ReactElement;\n /** Renders the image in the LinkList header */\n image?: React.ReactElement;\n /** Displays a status on the left side: default none */\n status?: LinkListStatus;\n href?: string;\n target?: LinkAnchorTargets;\n /** HTML markup for link. Default: a */\n htmlMarkup?: LinkTags;\n /** Ref for lenke/knapp */\n linkRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Highlights text. Override if different from list */\n highlightText?: string;\n /** Resources for component */\n resources?: Partial<HNDesignsystemLinkList>;\n /** @experimental id for content (only used in edit mode for aria-describedby) */\n contentId?: string;\n /** Ref passed to the list item element */\n ref?: React.Ref<HTMLLIElement | null>;\n /** Replaces the chevron with an arrow up right which is used for indicating external links */\n external?: boolean;\n }\n> &\n Pick<LinkListProps, 'color' | 'size' | 'variant'> &\n ListEditModeItemProps;\n\nexport const Link: LinkType = (props: LinkProps) => {\n const {\n children,\n className = '',\n color = 'white',\n icon,\n image,\n size = 'medium',\n chevron = false,\n linkRef,\n status = 'none',\n testId,\n target,\n variant,\n htmlMarkup = 'a',\n highlightText,\n editMode = false,\n contentId,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n resources, // used by ListEditModeItem in LinkList\n ref,\n external = false,\n ...restProps\n } = props;\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(linkRef);\n\n const isFill = variant === 'fill';\n const isFillNegative = variant === 'fill-negative';\n const isOutline = variant === 'outline';\n const isLine = variant === 'line';\n\n const liClasses = cn(LinkListStyles['link-list'], {\n [LinkListStyles['link-list__list-item--line']]: isLine,\n [LinkListStyles['link-list__list-item--outline']]: isOutline,\n [LinkListStyles[`link-list__list-item--outline--${color}`]]: isOutline,\n });\n const linkClasses = cn(\n LinkListStyles['link-list__anchor'],\n LinkListStyles[`link-list__anchor--${color}`],\n {\n [LinkListStyles[`link-list__anchor--line--${color}`]]: isLine,\n [LinkListStyles['link-list__anchor--fill']]: isFill,\n [LinkListStyles[`link-list__anchor--fill--${color}`]]: isFill,\n [LinkListStyles['link-list__anchor--outline']]: isOutline,\n [LinkListStyles[`link-list__anchor--outline--${color}`]]: isOutline,\n [LinkListStyles['link-list__anchor--fill-negative']]: isFillNegative,\n [LinkListStyles[`link-list__anchor--fill-negative--${color}`]]: isFillNegative,\n [LinkListStyles[`link-list__anchor--${size}`]]: size,\n [LinkListStyles['link-list__anchor--button']]: htmlMarkup === 'button',\n [LinkListStyles['link-list__anchor--new']]: status === 'new',\n },\n className\n );\n\n const statusMarkerClasses = cn(LinkListStyles['link-list__status-marker'], {\n [LinkListStyles['link-list__status-marker--new']]: status === 'new',\n });\n\n const imageContainer = <span className={LinkListStyles['link-list__image-container']}>{image}</span>;\n\n let chevronIcon = undefined;\n if (external) {\n chevronIcon = ArrowUpRight;\n } else if (chevron) {\n chevronIcon = ChevronRight;\n }\n\n return editMode ? (\n <div id={contentId} className={liClasses} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n <div className={linkClasses}>\n <div className={statusMarkerClasses}></div>\n {renderElementHeader(children, {\n titleHtmlMarkup: 'span',\n size,\n parentType: 'linklist',\n chevronIcon: chevronIcon,\n icon: icon ?? imageContainer,\n highlightText,\n })}\n </div>\n </div>\n ) : (\n <li className={liClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n {htmlMarkup === 'a' ? (\n <a\n className={linkClasses}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n target={target}\n {...restProps}\n >\n <div className={statusMarkerClasses}></div>\n {renderElementHeader(children, {\n titleHtmlMarkup: 'span',\n isHovered,\n size,\n parentType: 'linklist',\n chevronIcon: chevronIcon,\n icon: icon ?? imageContainer,\n highlightText,\n })}\n </a>\n ) : (\n htmlMarkup === 'button' && (\n <button className={linkClasses} ref={refObject as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n <div className={statusMarkerClasses}></div>\n {renderElementHeader(children, {\n titleHtmlMarkup: 'span',\n isHovered,\n size,\n parentType: 'linklist',\n chevronIcon: chevronIcon,\n icon: icon ?? imageContainer,\n highlightText,\n })}\n </button>\n )\n )}\n </li>\n );\n};\n\nconst LinkListComponent: React.FC<LinkListProps> = (props: LinkListProps) => {\n const {\n children,\n className = '',\n chevron = false,\n size = 'medium',\n color = 'white',\n testId,\n variant = 'line',\n highlightText,\n editMode = false,\n resources,\n ref,\n } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemLinkList = {\n ...defaultResources,\n ...resources,\n };\n\n const listClassNames = cn(LinkListStyles['link-list'], className, {\n [LinkListStyles[`link-list--outline--${color}`]]: variant === 'outline',\n [listEditModeWrapperClassnames]: editMode,\n });\n\n return (\n <ul ref={ref} className={listClassNames} data-testid={testId} data-analyticsid={AnalyticsId.LinkList}>\n {React.Children.map(children, (child: React.ReactNode, index) => {\n if (React.isValidElement<LinkProps>(child) && child.type === Link) {\n if (editMode) {\n const childResources = child.props.resources;\n const deleteAriaLabel = childResources?.editMode_deleteButtonAriaLabel ?? mergedResources.editMode_deleteButtonAriaLabel;\n const itemId = `linklist-item-${index}`;\n\n return (\n <ListEditModeItem\n color={color}\n variant={variant}\n onDelete={child.props.onDelete}\n contentId={itemId}\n deleteButtonAriaLabel={deleteAriaLabel}\n >\n {React.cloneElement(child, {\n color,\n size,\n chevron: false,\n variant,\n highlightText: highlightText,\n editMode: true,\n contentId: itemId,\n })}\n </ListEditModeItem>\n );\n } else {\n return React.cloneElement(child, {\n color,\n size,\n chevron,\n variant,\n highlightText: highlightText,\n editMode: false,\n });\n }\n }\n return null;\n })}\n </ul>\n );\n};\n\nexport const LinkList = LinkListComponent as CompoundComponent;\n\nLinkList.displayName = 'LinkList';\nLinkList.Link = Link;\nLink.displayName = 'LinkList.Link';\n\nexport default LinkList;\n","import LinkList from './LinkList';\nexport * from './LinkList';\nexport default LinkList;\n"],"mappings":";;;;;;;;;;;;;;;AEMA,IAAa,gBAAgB,aAAsD;CACjF,QAAQ,UAAR;EACE,KAAK,gBAAgB,SACnB,OAAO;EACT,KAAK,gBAAgB;EACrB,SACE,OAAO;;;;;AC4Fb,IAAa,QAAkB,UAAqB;CAClD,MAAM,EACJ,UACA,YAAY,IACZ,QAAQ,SACR,MACA,OACA,OAAO,UACP,UAAU,OACV,SACA,SAAS,QACT,QACA,QACA,SACA,aAAa,KACb,eACA,WAAW,OACX,WAEA,WACA,KACA,WAAW,OACX,GAAG,cACD;CACJ,MAAM,EAAE,WAAW,cAAc,iBAA+D,QAAQ;CAExG,MAAM,SAAS,YAAY;CAC3B,MAAM,iBAAiB,YAAY;CACnC,MAAM,YAAY,YAAY;CAC9B,MAAM,SAAS,YAAY;CAE3B,MAAM,YAAY,WAAG,eAAe,cAAc;GAC/C,eAAe,gCAAgC;GAC/C,eAAe,mCAAmC;GAClD,eAAe,kCAAkC,WAAW;EAC9D,CAAC;CACF,MAAM,cAAc,WAClB,eAAe,sBACf,eAAe,sBAAsB,UACrC;GACG,eAAe,4BAA4B,WAAW;GACtD,eAAe,6BAA6B;GAC5C,eAAe,4BAA4B,WAAW;GACtD,eAAe,gCAAgC;GAC/C,eAAe,+BAA+B,WAAW;GACzD,eAAe,sCAAsC;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AAyB;CAC3E,MAAM,EACJ,UACA,YAAY,IACZ,UAAU,OACV,OAAO,UACP,QAAQ,SACR,QACA,UAAU,QACV,eACA,WAAW,OACX,WACA,QACE;CAEJ,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAG5E,MAAM,kBAA0C;EAC9C,GAHuB,aAAa,SAGjC;EACH,GAAG;EACJ;CAOD,OACE,oBAAC,MAAD;EAAS;EAAK,WANO,WAAG,eAAe,cAAc,WAAW;IAC/D,eAAe,uBAAuB,WAAW,YAAY;IAC7D,gCAAgC;GAClC,CAG0B;EAAgB,eAAa;EAAQ,oBAAkB,YAAY;YACzF,MAAM,SAAS,IAAI,WAAW,OAAwB,UAAU;GAC/D,IAAI,MAAM,eAA0B,MAAM,IAAI,MAAM,SAAS,MAC3D,IAAI,UAAU;IAEZ,MAAM,kBADiB,MAAM,MAAM,WACK,kCAAkC,gBAAgB;IAC1F,MAAM,SAAS,iBAAiB;IAEhC,OACE,oBAAC,sBAAD;KACS;KACE;KACT,UAAU,MAAM,MAAM;KACtB,WAAW;KACX,uBAAuB;eAEtB,MAAM,aAAa,OAAO;MACzB;MACA;MACA,SAAS;MACT;MACe;MACf,UAAU;MACV,WAAW;MACZ,CAAC;KACe,CAAA;UAGrB,OAAO,MAAM,aAAa,OAAO;IAC/B;IACA;IACA;IACA;IACe;IACf,UAAU;IACX,CAAC;GAGN,OAAO;IACP;EACC,CAAA;;AAIT,IAAa,WAAW;AAExB,SAAS,cAAc;AACvB,SAAS,OAAO;AAChB,KAAK,cAAc;;;AC7SnB,IAAA,mBAAe"}
|
package/lib/List.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnalyticsId } from "./constants.js";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import styles from "./components/List/styles.module.scss";
|
|
5
|
+
//#region src/components/List/List.tsx
|
|
5
6
|
var Item = ({ children }) => /* @__PURE__ */ jsx("li", {
|
|
6
7
|
className: styles.list__item,
|
|
7
8
|
children
|
|
@@ -15,7 +16,10 @@ var List = ({ children, className, testId, variant = "bullet", margin }) => {
|
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
18
|
List.Item = Item;
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/components/List/index.ts
|
|
21
|
+
var List_default = List;
|
|
22
|
+
//#endregion
|
|
23
|
+
export { List_default as t };
|
|
20
24
|
|
|
21
25
|
//# sourceMappingURL=List.js.map
|
package/lib/List.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":[
|
|
1
|
+
{"version":3,"file":"List.js","names":[],"sources":["../src/components/List/List.tsx","../src/components/List/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\n\nimport styles from './styles.module.scss';\n\nexport type ListVariant = 'bullet' | 'dashed' | 'numbered' | 'alphabetical';\n\nexport interface ItemProps {\n children: React.ReactNode;\n}\n\nconst Item: React.FC<ItemProps> = ({ children }: ItemProps) => <li className={styles.list__item}>{children}</li>;\n\nexport interface ListProps {\n /** List contents */\n children: React.ReactNode;\n /** Changes the visual representation of the list. */\n variant?: ListVariant;\n /** Adds margin above/below list */\n margin?: boolean;\n /** Adds className to list element */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport interface ListCompound extends React.FC<ListProps> {\n Item: typeof Item;\n}\n\nconst List: ListCompound = ({ children, className, testId, variant = 'bullet', margin }: ListProps) => {\n const CustomTag = ['numbered', 'alphabetical'].includes(variant) ? 'ol' : 'ul';\n\n const listClasses = classNames(styles.list, styles[`list--${variant}`], margin && styles['list--margin'], className);\n\n return (\n <CustomTag className={listClasses} data-testid={testId} data-analyticsid={AnalyticsId.List}>\n {children}\n </CustomTag>\n );\n};\n\nList.Item = Item;\n\nexport default List;\n","import List from './List';\nexport * from './List';\nexport default List;\n"],"mappings":";;;;;AAYA,IAAM,QAA6B,EAAE,eAA0B,oBAAC,MAAD;CAAI,WAAW,OAAO;CAAa;CAAc,CAAA;AAmBhH,IAAM,QAAsB,EAAE,UAAU,WAAW,QAAQ,UAAU,UAAU,aAAwB;CAKrG,OACE,oBALgB,CAAC,YAAY,eAAe,CAAC,SAAS,QAAQ,GAAG,OAAO,MAKxE;EAAW,WAHO,WAAW,OAAO,MAAM,OAAO,SAAS,YAAY,UAAU,OAAO,iBAAiB,UAGlF;EAAa,eAAa;EAAQ,oBAAkB,YAAY;EACnF;EACS,CAAA;;AAIhB,KAAK,OAAO;;;ACzCZ,IAAA,eAAe"}
|
package/lib/ListEditMode.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { IconSize } from "./constants.js";
|
|
2
|
+
import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
|
|
3
3
|
import { t as Icon_default } from "./Icon.js";
|
|
4
|
-
import
|
|
4
|
+
import X from "./components/Icons/X.js";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import styles from "./components/ListEditMode/styles.module.scss";
|
|
8
|
-
|
|
8
|
+
//#region src/components/ListEditMode/ListEditMode.tsx
|
|
9
|
+
var IconButton = ({ icon, color, onClick, ariaLabel, ariaDescribedby }) => {
|
|
9
10
|
const { refObject, isHovered } = usePseudoClasses();
|
|
10
11
|
return /* @__PURE__ */ jsx("button", {
|
|
11
12
|
ref: refObject,
|
|
@@ -22,7 +23,7 @@ const IconButton = ({ icon, color, onClick, ariaLabel, ariaDescribedby }) => {
|
|
|
22
23
|
})
|
|
23
24
|
});
|
|
24
25
|
};
|
|
25
|
-
|
|
26
|
+
var ListEditModeItem = (props) => {
|
|
26
27
|
const { children, variant = "line", color = "neutral", onDelete, deleteButtonAriaLabel, contentId } = props;
|
|
27
28
|
return /* @__PURE__ */ jsxs("li", {
|
|
28
29
|
className: classNames(styles["list-edit-mode__item"], color && styles[`list-edit-mode__item--${color}`], {
|
|
@@ -30,7 +31,7 @@ const ListEditModeItem = (props) => {
|
|
|
30
31
|
[styles["list-edit-mode__item--fill"]]: variant === "fill" || variant === "fill-negative"
|
|
31
32
|
}),
|
|
32
33
|
children: [children, onDelete && /* @__PURE__ */ jsx(IconButton, {
|
|
33
|
-
icon:
|
|
34
|
+
icon: X,
|
|
34
35
|
onClick: onDelete,
|
|
35
36
|
color: "red",
|
|
36
37
|
ariaLabel: deleteButtonAriaLabel,
|
|
@@ -39,9 +40,13 @@ const ListEditModeItem = (props) => {
|
|
|
39
40
|
});
|
|
40
41
|
};
|
|
41
42
|
ListEditModeItem.displayName = "ListEditModeItem";
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/components/ListEditMode/constants.ts
|
|
45
|
+
var listEditModeWrapperClassnames = classNames([styles[`list-edit-mode`]]);
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/components/ListEditMode/index.ts
|
|
42
48
|
var ListEditMode_default = ListEditModeItem;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
export { ListEditModeItem as i, listEditModeWrapperClassnames as n, IconButton as r, ListEditMode_default$1 as t };
|
|
49
|
+
//#endregion
|
|
50
|
+
export { ListEditModeItem as i, listEditModeWrapperClassnames as n, IconButton as r, ListEditMode_default as t };
|
|
46
51
|
|
|
47
52
|
//# sourceMappingURL=ListEditMode.js.map
|
package/lib/ListEditMode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListEditMode.js","names":[],"sources":["../src/components/ListEditMode/ListEditMode.tsx","../src/components/ListEditMode/constants.ts","../src/components/ListEditMode/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { ExpanderListColors, ExpanderListVariant } from '../ExpanderList';\nimport type { SvgIcon } from '../Icon';\nimport type { LinkListColors, LinkListVariant } from '../LinkList';\n\nimport { IconSize } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface ListEditModeProps extends ListEditModeItemProps {\n /** Items in the ListEditMode */\n children: React.ReactNode;\n /** Sets visual priority */\n variant?: LinkListVariant | ExpanderListVariant;\n /** Sets color */\n color?: LinkListColors | ExpanderListColors;\n /** Aria label for delete button */\n deleteButtonAriaLabel?: string;\n}\n\nexport interface ListEditModeItemProps {\n /** Enables ListEditMode */\n editMode?: boolean;\n /** Callback for delete button */\n onDelete?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n contentId?: string;\n}\n\nexport const IconButton = ({\n icon,\n color,\n onClick,\n ariaLabel,\n ariaDescribedby,\n}: {\n icon: SvgIcon;\n color: 'red' | 'blue';\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n ariaLabel?: string;\n ariaDescribedby?: string;\n}): React.JSX.Element => {\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>();\n\n return (\n <button\n ref={refObject}\n onClick={onClick}\n type=\"button\"\n className={classNames(styles['list-edit-mode__icon-button'])}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n >\n <Icon\n isHovered={isHovered}\n svgIcon={icon}\n size={IconSize.Small}\n color={color === 'blue' ? 'var(--color-action-graphics-onlight)' : 'var(--color-destructive-graphics-normal'}\n />\n </button>\n );\n};\n\nexport const ListEditModeItem = (props: ListEditModeProps): React.JSX.Element => {\n const { children, variant = 'line', color = 'neutral', onDelete, deleteButtonAriaLabel, contentId } = props;\n\n const listClassNames = classNames(styles['list-edit-mode__item'], color && styles[`list-edit-mode__item--${color}`], {\n [styles['list-edit-mode__item--line']]: variant === 'line',\n [styles['list-edit-mode__item--fill']]: variant === 'fill' || variant === 'fill-negative',\n });\n\n return (\n <li className={listClassNames}>\n {children}\n {onDelete && <IconButton icon={X} onClick={onDelete} color=\"red\" ariaLabel={deleteButtonAriaLabel} ariaDescribedby={contentId} />}\n </li>\n );\n};\n\nListEditModeItem.displayName = 'ListEditModeItem';\n\nexport default ListEditModeItem;\n","import classNames from 'classnames';\n\nimport styles from './styles.module.scss';\n\nexport const listEditModeWrapperClassnames = classNames([styles[`list-edit-mode`]]);\n","import ListEditModeItem from './ListEditMode';\nexport * from './ListEditMode';\nexport * from './constants';\nexport default ListEditModeItem;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListEditMode.js","names":[],"sources":["../src/components/ListEditMode/ListEditMode.tsx","../src/components/ListEditMode/constants.ts","../src/components/ListEditMode/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { ExpanderListColors, ExpanderListVariant } from '../ExpanderList';\nimport type { SvgIcon } from '../Icon';\nimport type { LinkListColors, LinkListVariant } from '../LinkList';\n\nimport { IconSize } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface ListEditModeProps extends ListEditModeItemProps {\n /** Items in the ListEditMode */\n children: React.ReactNode;\n /** Sets visual priority */\n variant?: LinkListVariant | ExpanderListVariant;\n /** Sets color */\n color?: LinkListColors | ExpanderListColors;\n /** Aria label for delete button */\n deleteButtonAriaLabel?: string;\n}\n\nexport interface ListEditModeItemProps {\n /** Enables ListEditMode */\n editMode?: boolean;\n /** Callback for delete button */\n onDelete?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n contentId?: string;\n}\n\nexport const IconButton = ({\n icon,\n color,\n onClick,\n ariaLabel,\n ariaDescribedby,\n}: {\n icon: SvgIcon;\n color: 'red' | 'blue';\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n ariaLabel?: string;\n ariaDescribedby?: string;\n}): React.JSX.Element => {\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>();\n\n return (\n <button\n ref={refObject}\n onClick={onClick}\n type=\"button\"\n className={classNames(styles['list-edit-mode__icon-button'])}\n aria-label={ariaLabel}\n aria-describedby={ariaDescribedby}\n >\n <Icon\n isHovered={isHovered}\n svgIcon={icon}\n size={IconSize.Small}\n color={color === 'blue' ? 'var(--color-action-graphics-onlight)' : 'var(--color-destructive-graphics-normal'}\n />\n </button>\n );\n};\n\nexport const ListEditModeItem = (props: ListEditModeProps): React.JSX.Element => {\n const { children, variant = 'line', color = 'neutral', onDelete, deleteButtonAriaLabel, contentId } = props;\n\n const listClassNames = classNames(styles['list-edit-mode__item'], color && styles[`list-edit-mode__item--${color}`], {\n [styles['list-edit-mode__item--line']]: variant === 'line',\n [styles['list-edit-mode__item--fill']]: variant === 'fill' || variant === 'fill-negative',\n });\n\n return (\n <li className={listClassNames}>\n {children}\n {onDelete && <IconButton icon={X} onClick={onDelete} color=\"red\" ariaLabel={deleteButtonAriaLabel} ariaDescribedby={contentId} />}\n </li>\n );\n};\n\nListEditModeItem.displayName = 'ListEditModeItem';\n\nexport default ListEditModeItem;\n","import classNames from 'classnames';\n\nimport styles from './styles.module.scss';\n\nexport const listEditModeWrapperClassnames = classNames([styles[`list-edit-mode`]]);\n","import ListEditModeItem from './ListEditMode';\nexport * from './ListEditMode';\nexport * from './constants';\nexport default ListEditModeItem;\n"],"mappings":";;;;;;;;AAgCA,IAAa,cAAc,EACzB,MACA,OACA,SACA,WACA,sBAOuB;CACvB,MAAM,EAAE,WAAW,cAAc,kBAAqC;CAEtE,OACE,oBAAC,UAAD;EACE,KAAK;EACI;EACT,MAAK;EACL,WAAW,WAAW,OAAO,+BAA+B;EAC5D,cAAY;EACZ,oBAAkB;YAElB,oBAAC,cAAD;GACa;GACX,SAAS;GACT,MAAM,SAAS;GACf,OAAO,UAAU,SAAS,yCAAyC;GACnE,CAAA;EACK,CAAA;;AAIb,IAAa,oBAAoB,UAAgD;CAC/E,MAAM,EAAE,UAAU,UAAU,QAAQ,QAAQ,WAAW,UAAU,uBAAuB,cAAc;CAOtG,OACE,qBAAC,MAAD;EAAI,WANiB,WAAW,OAAO,yBAAyB,SAAS,OAAO,yBAAyB,UAAU;IAClH,OAAO,gCAAgC,YAAY;IACnD,OAAO,gCAAgC,YAAY,UAAU,YAAY;GAC3E,CAGgB;YAAf,CACG,UACA,YAAY,oBAAC,YAAD;GAAY,MAAM;GAAG,SAAS;GAAU,OAAM;GAAM,WAAW;GAAuB,iBAAiB;GAAa,CAAA,CAC9H;;;AAIT,iBAAiB,cAAc;;;AC9E/B,IAAa,gCAAgC,WAAW,CAAC,OAAO,kBAAkB,CAAC;;;ACDnF,IAAA,uBAAe"}
|
package/lib/MaxCharacters.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormOnColor } from "./constants.js";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import styles from "./components/MaxCharacters/styles.module.scss";
|
|
5
|
+
//#region src/components/MaxCharacters/MaxCharacters.tsx
|
|
5
6
|
var MaxCharacters = ({ maxCharacters, maxText, length, onColor, maxWidth }) => {
|
|
6
7
|
const progress = length / maxCharacters;
|
|
7
8
|
const counterTextClass = classNames(styles["max-characters"], {
|
|
8
9
|
[styles[`max-characters--on-dark`]]: onColor === FormOnColor.ondark,
|
|
9
10
|
[styles[`max-characters--invalid`]]: progress > 1
|
|
10
11
|
});
|
|
11
|
-
const ariaLevel = progress > .95 ? "polite" : "off";
|
|
12
12
|
return /* @__PURE__ */ jsx("div", {
|
|
13
|
-
"aria-live":
|
|
13
|
+
"aria-live": progress > .95 ? "polite" : "off",
|
|
14
14
|
"aria-atomic": "true",
|
|
15
15
|
className: counterTextClass,
|
|
16
16
|
style: { maxWidth },
|
|
17
17
|
children: `${length}/${maxCharacters} ${maxText}`
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
|
-
|
|
21
|
-
export {
|
|
20
|
+
//#endregion
|
|
21
|
+
export { MaxCharacters as t };
|
|
22
22
|
|
|
23
23
|
//# sourceMappingURL=MaxCharacters.js.map
|
package/lib/MaxCharacters.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaxCharacters.js","names":[
|
|
1
|
+
{"version":3,"file":"MaxCharacters.js","names":[],"sources":["../src/components/MaxCharacters/MaxCharacters.tsx"],"sourcesContent":["import classNames from 'classnames';\n\nimport { FormOnColor } from '../../constants';\n\nimport styles from './styles.module.scss';\n\ninterface MaxCharactersProps {\n /** Current input length */\n length: number;\n /** max character limit in textarea */\n maxCharacters: number;\n /** The text is displayed in the end of the text-counter */\n maxText: string;\n /** Changes the visuals of the textarea */\n onColor?: keyof typeof FormOnColor;\n /** Max width of the component */\n maxWidth?: string;\n}\n\nconst MaxCharacters: React.FC<MaxCharactersProps> = ({ maxCharacters, maxText, length, onColor, maxWidth }) => {\n const progress = length / maxCharacters;\n\n const counterTextClass = classNames(styles['max-characters'], {\n [styles[`max-characters--on-dark`]]: onColor === FormOnColor.ondark,\n [styles[`max-characters--invalid`]]: progress > 1,\n });\n\n const ariaLevel = progress > 0.95 ? 'polite' : 'off';\n\n return (\n <div aria-live={ariaLevel} aria-atomic={'true'} className={counterTextClass} style={{ maxWidth }}>\n {`${length}/${maxCharacters} ${maxText}`}\n </div>\n );\n};\n\nexport default MaxCharacters;\n"],"mappings":";;;;;AAmBA,IAAM,iBAA+C,EAAE,eAAe,SAAS,QAAQ,SAAS,eAAe;CAC7G,MAAM,WAAW,SAAS;CAE1B,MAAM,mBAAmB,WAAW,OAAO,mBAAmB;GAC3D,OAAO,6BAA6B,YAAY,YAAY;GAC5D,OAAO,6BAA6B,WAAW;EACjD,CAAC;CAIF,OACE,oBAAC,OAAD;EAAK,aAHW,WAAW,MAAO,WAAW;EAGlB,eAAa;EAAQ,WAAW;EAAkB,OAAO,EAAE,UAAU;YAC7F,GAAG,OAAO,GAAG,cAAc,GAAG;EAC3B,CAAA"}
|
package/lib/NotificationBadge.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { palette } from "./theme/palette.js";
|
|
2
2
|
import { t as Icon_default } from "./Icon.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
3
|
+
import CheckFill from "./components/Icons/CheckFill.js";
|
|
4
|
+
import ErrorSignFill from "./components/Icons/ErrorSignFill.js";
|
|
5
|
+
import InfoSignFill from "./components/Icons/InfoSignFill.js";
|
|
6
|
+
import TriangleX from "./components/Icons/TriangleX.js";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/Badge/NotificationBadge.tsx
|
|
8
9
|
var NotificationBadge = (props) => {
|
|
9
10
|
const { variant, size, className = "", testId, isHovered = false } = props;
|
|
10
11
|
switch (variant) {
|
|
11
12
|
case "info": return /* @__PURE__ */ jsx(Icon_default, {
|
|
12
|
-
svgIcon:
|
|
13
|
+
svgIcon: InfoSignFill,
|
|
13
14
|
color: palette.blueberry700,
|
|
14
15
|
hoverColor: palette.blueberry700,
|
|
15
16
|
size,
|
|
@@ -18,7 +19,7 @@ var NotificationBadge = (props) => {
|
|
|
18
19
|
isHovered
|
|
19
20
|
});
|
|
20
21
|
case "warn": return /* @__PURE__ */ jsx(Icon_default, {
|
|
21
|
-
svgIcon:
|
|
22
|
+
svgIcon: ErrorSignFill,
|
|
22
23
|
color: palette.banana800,
|
|
23
24
|
hoverColor: palette.banana700,
|
|
24
25
|
size,
|
|
@@ -27,7 +28,7 @@ var NotificationBadge = (props) => {
|
|
|
27
28
|
isHovered
|
|
28
29
|
});
|
|
29
30
|
case "error": return /* @__PURE__ */ jsx(Icon_default, {
|
|
30
|
-
svgIcon:
|
|
31
|
+
svgIcon: TriangleX,
|
|
31
32
|
color: palette.cherry700,
|
|
32
33
|
hoverColor: palette.cherry700,
|
|
33
34
|
size,
|
|
@@ -36,7 +37,7 @@ var NotificationBadge = (props) => {
|
|
|
36
37
|
isHovered
|
|
37
38
|
});
|
|
38
39
|
case "success": return /* @__PURE__ */ jsx(Icon_default, {
|
|
39
|
-
svgIcon:
|
|
40
|
+
svgIcon: CheckFill,
|
|
40
41
|
color: palette.kiwi900,
|
|
41
42
|
hoverColor: palette.kiwi900,
|
|
42
43
|
size,
|
|
@@ -46,7 +47,7 @@ var NotificationBadge = (props) => {
|
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
};
|
|
49
|
-
|
|
50
|
-
export {
|
|
50
|
+
//#endregion
|
|
51
|
+
export { NotificationBadge as t };
|
|
51
52
|
|
|
52
53
|
//# sourceMappingURL=NotificationBadge.js.map
|