@helsenorge/designsystem-react 14.7.2 → 15.0.0-beta.0
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 +33 -10
- 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 +8 -4
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +8 -4
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +10 -6
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +12 -10
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +8 -4
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +12 -8
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +14 -9
- 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 +11 -7
- 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 +475 -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/global.d.ts +1 -0
- 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 +63 -8
- 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/AnchorLink.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AnalyticsId, IconSize } from "./constants.js";
|
|
2
|
+
import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
|
|
3
|
+
import { getColor } from "./theme/currys/color.js";
|
|
4
4
|
import { t as AsChildSlot_default } from "./AsChildSlot.js";
|
|
5
5
|
import { t as Icon_default } from "./Icon.js";
|
|
6
|
-
import
|
|
6
|
+
import ArrowUpRight from "./components/Icons/ArrowUpRight.js";
|
|
7
7
|
import classNames from "classnames";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import AnchorLinkStyles from "./components/AnchorLink/styles.module.scss";
|
|
10
|
+
//#region src/components/AnchorLink/AnchorLink.tsx
|
|
10
11
|
var AnchorLink = (props) => {
|
|
11
12
|
const { asChild, id, href, children, className, target = "_self", htmlMarkup = "a", onClick, testId, ref } = props;
|
|
12
13
|
const external = target === "_blank";
|
|
@@ -20,7 +21,7 @@ var AnchorLink = (props) => {
|
|
|
20
21
|
};
|
|
21
22
|
const renderContent = () => /* @__PURE__ */ jsxs(Fragment, { children: [children, external && /* @__PURE__ */ jsx(Icon_default, {
|
|
22
23
|
className: AnchorLinkStyles.anchorlink__icon,
|
|
23
|
-
svgIcon:
|
|
24
|
+
svgIcon: ArrowUpRight,
|
|
24
25
|
color: getColor("blueberry", 600),
|
|
25
26
|
hoverColor: getColor("blueberry", 700),
|
|
26
27
|
size: IconSize.XSmall,
|
|
@@ -52,7 +53,10 @@ var AnchorLink = (props) => {
|
|
|
52
53
|
})
|
|
53
54
|
});
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/AnchorLink/index.ts
|
|
58
|
+
var AnchorLink_default = AnchorLink;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { AnchorLink_default as t };
|
|
57
61
|
|
|
58
62
|
//# sourceMappingURL=AnchorLink.js.map
|
package/lib/AnchorLink.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorLink.js","names":[
|
|
1
|
+
{"version":3,"file":"AnchorLink.js","names":[],"sources":["../src/components/AnchorLink/AnchorLink.tsx","../src/components/AnchorLink/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys';\nimport AsChildSlot from '../AsChildSlot';\nimport Icon, { IconSize } from '../Icon';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\n\nimport AnchorLinkStyles from './styles.module.scss';\n\nexport type AnchorLinkTargets = '_self' | '_blank' | '_parent';\n\nexport type AnchorLinkTags = 'a' | 'button';\n\nexport type AnchorLinkOnClickEvent =\n | React.MouseEvent<HTMLElement, MouseEvent>\n | React.FormEvent<unknown>\n | React.KeyboardEvent<HTMLUListElement>\n | null;\n\nexport interface AnchorLinkProps {\n /** When true, onclick and keyboard events will be passed to the child. */\n asChild?: boolean;\n /** Sets the content of the <a> tag */\n children: React.ReactNode;\n /** URL to link to */\n href?: string;\n /** Gives a unique id to the anchor-link :) */\n id?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the target type of the <a> tag. _blank adds an arrow icon at the end of the link */\n target?: AnchorLinkTargets;\n /** HTML markup for anchor link. Default: a */\n htmlMarkup?: AnchorLinkTags;\n /** Function that is called when clicked */\n onClick?: (e?: AnchorLinkOnClickEvent) => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLAnchorElement | HTMLButtonElement | null>;\n}\n\nconst AnchorLink: React.FC<AnchorLinkProps> = props => {\n const { asChild, id, href, children, className, target = '_self', htmlMarkup = 'a', onClick, testId, ref } = props;\n const external = target === '_blank';\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement>(\n ref as React.RefObject<HTMLButtonElement | HTMLAnchorElement>\n );\n const anchorClasses = classNames(AnchorLinkStyles.anchorlink, className);\n\n const commonProps = {\n id,\n ['data-testid']: testId,\n ['data-analyticsid']: AnalyticsId.AnchorLink,\n onClick,\n };\n\n const renderContent = (): React.ReactElement => (\n <>\n {children}\n {external && (\n <Icon\n className={AnchorLinkStyles.anchorlink__icon}\n svgIcon={ArrowUpRight}\n color={getColor('blueberry', 600)}\n hoverColor={getColor('blueberry', 700)}\n size={IconSize.XSmall}\n isHovered={isHovered}\n />\n )}\n </>\n );\n\n if (asChild) {\n return (\n <AsChildSlot content={<span className={anchorClasses} />} className={AnchorLinkStyles['anchorlink-wrapper']} elementRef={refObject}>\n {children}\n </AsChildSlot>\n );\n }\n\n if (htmlMarkup === 'a') {\n return (\n <a\n href={href}\n target={target}\n className={anchorClasses}\n rel={external ? 'noopener noreferrer' : undefined}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n {...commonProps}\n >\n {renderContent()}\n </a>\n );\n }\n\n return (\n <button\n type=\"button\"\n className={AnchorLinkStyles['anchorlink-wrapper']}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n {...commonProps}\n >\n <span className={anchorClasses}>{renderContent()}</span>\n </button>\n );\n};\n\nexport default AnchorLink;\n","import AnchorLink from './AnchorLink';\nexport * from './AnchorLink';\nexport default AnchorLink;\n"],"mappings":";;;;;;;;;;AA4CA,IAAM,cAAwC,UAAS;CACrD,MAAM,EAAE,SAAS,IAAI,MAAM,UAAU,WAAW,SAAS,SAAS,aAAa,KAAK,SAAS,QAAQ,QAAQ;CAC7G,MAAM,WAAW,WAAW;CAC5B,MAAM,EAAE,WAAW,cAAc,iBAC/B,IACD;CACD,MAAM,gBAAgB,WAAW,iBAAiB,YAAY,UAAU;CAExE,MAAM,cAAc;EAClB;GACC,gBAAgB;GAChB,qBAAqB,YAAY;EAClC;EACD;CAED,MAAM,sBACJ,qBAAA,UAAA,EAAA,UAAA,CACG,UACA,YACC,oBAAC,cAAD;EACE,WAAW,iBAAiB;EAC5B,SAAS;EACT,OAAO,SAAS,aAAa,IAAI;EACjC,YAAY,SAAS,aAAa,IAAI;EACtC,MAAM,SAAS;EACJ;EACX,CAAA,CAEH,EAAA,CAAA;CAGL,IAAI,SACF,OACE,oBAAC,qBAAD;EAAa,SAAS,oBAAC,QAAD,EAAM,WAAW,eAAiB,CAAA;EAAE,WAAW,iBAAiB;EAAuB,YAAY;EACtH;EACW,CAAA;CAIlB,IAAI,eAAe,KACjB,OACE,oBAAC,KAAD;EACQ;EACE;EACR,WAAW;EACX,KAAK,WAAW,wBAAwB,KAAA;EACxC,KAAK;EACL,GAAI;YAEH,eAAe;EACd,CAAA;CAIR,OACE,oBAAC,UAAD;EACE,MAAK;EACL,WAAW,iBAAiB;EAC5B,KAAK;EACL,GAAI;YAEJ,oBAAC,QAAD;GAAM,WAAW;aAAgB,eAAe;GAAQ,CAAA;EACjD,CAAA;;;;ACxGb,IAAA,qBAAe"}
|
package/lib/AsChildSlot.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mergeRefs } from "./utils/refs.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import styles from "./components/AsChildSlot/styles.module.scss";
|
|
4
|
+
//#region src/components/AsChildSlot/AsChildSlot.tsx
|
|
4
5
|
var isAriaDisabled = (v) => v === true || v === "true";
|
|
5
|
-
|
|
6
|
+
var AsChildSlot = (props) => {
|
|
6
7
|
const { children, className, content, disabled, onSelect, ariaCurrent, elementRef, ref } = props;
|
|
7
8
|
const childElement = React.Children.toArray(children).filter(React.isValidElement)[0];
|
|
8
9
|
const nodeRef = React.useRef(null);
|
|
@@ -61,7 +62,10 @@ const AsChildSlot = (props) => {
|
|
|
61
62
|
};
|
|
62
63
|
return React.cloneElement(childElement, nextProps);
|
|
63
64
|
};
|
|
64
|
-
|
|
65
|
-
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/components/AsChildSlot/index.ts
|
|
67
|
+
var AsChildSlot_default = AsChildSlot;
|
|
68
|
+
//#endregion
|
|
69
|
+
export { AsChildSlot as n, AsChildSlot_default as t };
|
|
66
70
|
|
|
67
71
|
//# sourceMappingURL=AsChildSlot.js.map
|
package/lib/AsChildSlot.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsChildSlot.js","names":[
|
|
1
|
+
{"version":3,"file":"AsChildSlot.js","names":[],"sources":["../src/components/AsChildSlot/AsChildSlot.tsx","../src/components/AsChildSlot/index.ts"],"sourcesContent":["import React from 'react';\n\nimport { mergeRefs } from '../../utils/refs';\n\nimport styles from './styles.module.scss';\n\nexport interface AsChildSlotHandle {\n /** Click the child’s DOM node */\n click: () => void;\n}\n\nexport interface AsChildSlotProps {\n /** Pass one element/component that we will map to a DOM element (<a>, <button>, React Router <Link>) */\n children?: React.ReactNode;\n /** Class names to apply to the visible element */\n className?: string;\n /** Content to render inside the visible element - For example the text and icons of the parent component that renders AsChildSlot */\n content?: React.ReactNode;\n /** Disabled state passed down (merged with child’s disabled/aria-disabled) */\n disabled?: boolean;\n /** Called before the child’s onClick when visible */\n onSelect?: (e: React.SyntheticEvent) => void;\n /** Optional states to apply to the DOM element */\n ariaCurrent?: 'page' | 'true';\n /** DOM ref for the element we end up rendering */\n elementRef?: React.Ref<HTMLElement>;\n /** Ref that is passed to the component */\n ref?: React.Ref<AsChildSlotHandle>;\n}\n\nconst isAriaDisabled = (v: unknown): boolean => v === true || v === 'true';\n\nexport const AsChildSlot: React.FC<AsChildSlotProps> = props => {\n const { children, className, content, disabled, onSelect, ariaCurrent, elementRef, ref } = props;\n const childElement = React.Children.toArray(children).filter(React.isValidElement)[0] as React.ReactElement | undefined;\n const nodeRef = React.useRef<HTMLElement | null>(null);\n const childPropsRef = (childElement as unknown as { props?: { ref?: React.Ref<HTMLElement> } })?.props?.ref;\n const mergedRef = mergeRefs<HTMLElement>([\n (node): void => {\n nodeRef.current = node;\n },\n childPropsRef,\n elementRef,\n ]);\n\n const childProps =\n (childElement?.props as Partial<React.DOMAttributes<HTMLElement>> &\n Partial<React.AnchorHTMLAttributes<HTMLElement>> &\n Partial<React.ButtonHTMLAttributes<HTMLElement>> & { disabled?: boolean; href?: unknown }) || {};\n const childDisabled = !!childProps.disabled || isAriaDisabled((childProps as React.AriaAttributes)['aria-disabled']);\n const isDisabled = !!disabled || childDisabled;\n\n // Exposes a callable click() to the parents.\n React.useImperativeHandle(\n ref,\n () => ({\n click: (): void => {\n if (isDisabled) return;\n nodeRef.current?.click();\n },\n }),\n [isDisabled]\n );\n\n if (!childElement) return null;\n\n // Actual user mouse interaction\n const childOnClick = childProps.onClick as React.MouseEventHandler<HTMLElement> | undefined;\n const wrappedOnClick: React.MouseEventHandler<HTMLElement> = e => {\n if (isDisabled) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n onSelect?.(e);\n childOnClick?.(e);\n };\n\n // Actual user keyboard interaction\n const childOnKeyDown = childProps.onKeyDown as React.KeyboardEventHandler<HTMLElement> | undefined;\n const wrappedOnKeyDown: React.KeyboardEventHandler<HTMLElement> = e => {\n childOnKeyDown?.(e);\n if (e.defaultPrevented) return;\n if (e.key === ' ' || e.key === 'Spacebar' || e.code === 'Space') {\n if (isDisabled) {\n e.preventDefault();\n return;\n }\n e.preventDefault();\n nodeRef.current?.click();\n }\n };\n\n const isButtonLike = typeof childProps.href === 'undefined';\n const elementWithChildren = childElement as React.ReactElement<{ children?: React.ReactNode }>;\n const wrappedChildren =\n content && React.isValidElement(content)\n ? React.cloneElement(content, undefined, elementWithChildren.props.children)\n : elementWithChildren.props.children;\n\n const nextProps: Record<string, unknown> = {\n ref: mergedRef,\n className: `${styles['as-child-reset']} ${className ?? ''}`,\n style: undefined,\n 'aria-disabled': isDisabled || undefined,\n 'aria-current': ariaCurrent,\n ...(isButtonLike && !('type' in childProps) ? { type: 'button' as const } : {}),\n onClick: wrappedOnClick,\n onKeyDown: wrappedOnKeyDown,\n children: wrappedChildren,\n };\n\n return React.cloneElement(childElement as React.ReactElement<Record<string, unknown>>, nextProps);\n};\n\nexport default AsChildSlot;\n","import AsChildSlot from './AsChildSlot';\nexport * from './AsChildSlot';\nexport default AsChildSlot;\n"],"mappings":";;;;AA8BA,IAAM,kBAAkB,MAAwB,MAAM,QAAQ,MAAM;AAEpE,IAAa,eAA0C,UAAS;CAC9D,MAAM,EAAE,UAAU,WAAW,SAAS,UAAU,UAAU,aAAa,YAAY,QAAQ;CAC3F,MAAM,eAAe,MAAM,SAAS,QAAQ,SAAS,CAAC,OAAO,MAAM,eAAe,CAAC;CACnF,MAAM,UAAU,MAAM,OAA2B,KAAK;CACtD,MAAM,gBAAiB,cAA0E,OAAO;CACxG,MAAM,YAAY,UAAuB;GACtC,SAAe;GACd,QAAQ,UAAU;;EAEpB;EACA;EACD,CAAC;CAEF,MAAM,aACH,cAAc,SAEiF,EAAE;CACpG,MAAM,gBAAgB,CAAC,CAAC,WAAW,YAAY,eAAgB,WAAoC,iBAAiB;CACpH,MAAM,aAAa,CAAC,CAAC,YAAY;CAGjC,MAAM,oBACJ,YACO,EACL,aAAmB;EACjB,IAAI,YAAY;EAChB,QAAQ,SAAS,OAAO;IAE3B,GACD,CAAC,WAAW,CACb;CAED,IAAI,CAAC,cAAc,OAAO;CAG1B,MAAM,eAAe,WAAW;CAChC,MAAM,kBAAuD,MAAK;EAChE,IAAI,YAAY;GACd,EAAE,gBAAgB;GAClB,EAAE,iBAAiB;GACnB;;EAEF,WAAW,EAAE;EACb,eAAe,EAAE;;CAInB,MAAM,iBAAiB,WAAW;CAClC,MAAM,oBAA4D,MAAK;EACrE,iBAAiB,EAAE;EACnB,IAAI,EAAE,kBAAkB;EACxB,IAAI,EAAE,QAAQ,OAAO,EAAE,QAAQ,cAAc,EAAE,SAAS,SAAS;GAC/D,IAAI,YAAY;IACd,EAAE,gBAAgB;IAClB;;GAEF,EAAE,gBAAgB;GAClB,QAAQ,SAAS,OAAO;;;CAI5B,MAAM,eAAe,OAAO,WAAW,SAAS;CAChD,MAAM,sBAAsB;CAC5B,MAAM,kBACJ,WAAW,MAAM,eAAe,QAAQ,GACpC,MAAM,aAAa,SAAS,KAAA,GAAW,oBAAoB,MAAM,SAAS,GAC1E,oBAAoB,MAAM;CAEhC,MAAM,YAAqC;EACzC,KAAK;EACL,WAAW,GAAG,OAAO,kBAAkB,GAAG,aAAa;EACvD,OAAO,KAAA;EACP,iBAAiB,cAAc,KAAA;EAC/B,gBAAgB;EAChB,GAAI,gBAAgB,EAAE,UAAU,cAAc,EAAE,MAAM,UAAmB,GAAG,EAAE;EAC9E,SAAS;EACT,WAAW;EACX,UAAU;EACX;CAED,OAAO,MAAM,aAAa,cAA6D,UAAU;;;;AC9GnG,IAAA,sBAAe"}
|
package/lib/Avatar.js
CHANGED
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { AnalyticsId, IconSize } from "./constants.js";
|
|
2
|
+
import { palette } from "./theme/palette.js";
|
|
3
3
|
import { t as Icon_default } from "./Icon.js";
|
|
4
|
-
import
|
|
4
|
+
import Check from "./components/Icons/Check.js";
|
|
5
5
|
import classNames from "classnames";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import styles from "./components/Avatar/styles.module.scss";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
AvatarSize
|
|
11
|
-
|
|
8
|
+
//#region src/components/Avatar/constants.ts
|
|
9
|
+
var AvatarSize = /* @__PURE__ */ function(AvatarSize) {
|
|
10
|
+
AvatarSize["xsmall"] = "xsmall";
|
|
11
|
+
AvatarSize["small"] = "small";
|
|
12
|
+
return AvatarSize;
|
|
12
13
|
}({});
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/Avatar/Avatar.tsx
|
|
13
16
|
var Avatar = (props) => {
|
|
14
17
|
const { children, className = "", selected = false, color = "blueberry", variant = "square", size = AvatarSize.small, testId, ref } = props;
|
|
15
18
|
const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);
|
|
@@ -19,13 +22,16 @@ var Avatar = (props) => {
|
|
|
19
22
|
"data-testid": testId,
|
|
20
23
|
"data-analyticsid": AnalyticsId.Avatar,
|
|
21
24
|
children: selected ? /* @__PURE__ */ jsx(Icon_default, {
|
|
22
|
-
svgIcon:
|
|
25
|
+
svgIcon: Check,
|
|
23
26
|
size: IconSize.Small,
|
|
24
27
|
color: color === "black" ? palette.neutral900 : palette.blueberry600
|
|
25
28
|
}) : truncatedName
|
|
26
29
|
});
|
|
27
30
|
};
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/components/Avatar/index.ts
|
|
33
|
+
var Avatar_default = Avatar;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { AvatarSize as n, Avatar_default as t };
|
|
30
36
|
|
|
31
37
|
//# sourceMappingURL=Avatar.js.map
|
package/lib/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","names":[
|
|
1
|
+
{"version":3,"file":"Avatar.js","names":[],"sources":["../src/components/Avatar/constants.ts","../src/components/Avatar/Avatar.tsx","../src/components/Avatar/index.ts"],"sourcesContent":["export enum AvatarSize {\n xsmall = 'xsmall',\n small = 'small',\n}\n","import cn from 'classnames';\n\nimport { AvatarSize } from './constants';\nimport { AnalyticsId } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icon';\nimport Check from '../Icons/Check';\n\nimport styles from './styles.module.scss';\n\nexport interface AvatarProps {\n /** Name to display in the avatar. Will be truncated to the first two characters. */\n children: string;\n /** Displays a check icon to indicated the selected state. */\n selected?: boolean;\n /** Sets blue or black color on avatar. */\n color?: 'blueberry' | 'black';\n /** Square or circle variant of avatar. The circle should only be used for representation of someone else. NB: This is temporary and will be renamed in v10 */\n variant?: 'square' | 'circle';\n /** Avatar size. Default: small */\n size?: keyof typeof AvatarSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the root element */\n ref?: React.Ref<HTMLElement | null>;\n}\nexport type AvatarType = typeof Avatar;\nconst Avatar: React.FC<AvatarProps> = (props: AvatarProps) => {\n const {\n children,\n className = '',\n selected = false,\n color = 'blueberry',\n variant = 'square',\n size = AvatarSize.small,\n testId,\n ref,\n } = props;\n const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);\n return (\n <span\n className={cn(\n styles.avatar,\n selected && styles['avatar--selected'],\n color === 'black' && styles['avatar--black'],\n variant === 'circle' && styles['avatar--circle'],\n size === AvatarSize.xsmall && styles['avatar--xsmall'],\n size === AvatarSize.small && styles['avatar--small'],\n className\n )}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Avatar}\n >\n {selected ? (\n <Icon svgIcon={Check} size={IconSize.Small} color={color === 'black' ? palette.neutral900 : palette.blueberry600} />\n ) : (\n truncatedName\n )}\n </span>\n );\n};\n\nexport default Avatar;\n","import Avatar from './Avatar';\nexport { AvatarSize } from './constants';\nexport * from './Avatar';\nexport default Avatar;\n"],"mappings":";;;;;;;;AAAA,IAAY,aAAL,yBAAA,YAAA;CACL,WAAA,YAAS;CACT,WAAA,WAAQ;;KACT;;;AC0BD,IAAM,UAAiC,UAAuB;CAC5D,MAAM,EACJ,UACA,YAAY,IACZ,WAAW,OACX,QAAQ,aACR,UAAU,UACV,OAAO,WAAW,OAClB,QACA,QACE;CACJ,MAAM,gBAAgB,SAAS,OAAO,EAAE,CAAC,mBAAmB,GAAG,SAAS,UAAU,GAAG,EAAE;CACvF,OACE,oBAAC,QAAD;EACE,WAAW,WACT,OAAO,QACP,YAAY,OAAO,qBACnB,UAAU,WAAW,OAAO,kBAC5B,YAAY,YAAY,OAAO,mBAC/B,SAAS,WAAW,UAAU,OAAO,mBACrC,SAAS,WAAW,SAAS,OAAO,kBACpC,UACD;EACI;EACL,eAAa;EACb,oBAAkB,YAAY;YAE7B,WACC,oBAAC,cAAD;GAAM,SAAS;GAAO,MAAM,SAAS;GAAO,OAAO,UAAU,UAAU,QAAQ,aAAa,QAAQ;GAAgB,CAAA,GAEpH;EAEG,CAAA;;;;AC1DX,IAAA,iBAAe"}
|
package/lib/Badge.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
1
|
+
import { AnalyticsId, IconSize } from "./constants.js";
|
|
2
|
+
import { t as NotificationBadge } from "./NotificationBadge.js";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import badgeStyles from "./components/Badge/styles.module.scss";
|
|
6
|
+
//#region src/components/Badge/Badge.tsx
|
|
6
7
|
var Badge = (props) => {
|
|
7
8
|
const { children, className = "", color = "blueberry", testId, type = "string", notificationVariant = "info", ref } = props;
|
|
8
9
|
const badgeClasses = classNames(badgeStyles.badge, {
|
|
@@ -10,7 +11,7 @@ var Badge = (props) => {
|
|
|
10
11
|
[badgeStyles["badge--cherry"]]: color === "cherry",
|
|
11
12
|
[badgeStyles["badge--neutral"]]: color === "neutral"
|
|
12
13
|
}, className);
|
|
13
|
-
if (type === "notification" && notificationVariant !== void 0) return /* @__PURE__ */ jsx(
|
|
14
|
+
if (type === "notification" && notificationVariant !== void 0) return /* @__PURE__ */ jsx(NotificationBadge, {
|
|
14
15
|
variant: notificationVariant,
|
|
15
16
|
size: IconSize.XSmall,
|
|
16
17
|
className,
|
|
@@ -25,7 +26,10 @@ var Badge = (props) => {
|
|
|
25
26
|
children
|
|
26
27
|
});
|
|
27
28
|
};
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/components/Badge/index.ts
|
|
31
|
+
var Badge_default = Badge;
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Badge_default as t };
|
|
30
34
|
|
|
31
35
|
//# sourceMappingURL=Badge.js.map
|
package/lib/Badge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","names":[
|
|
1
|
+
{"version":3,"file":"Badge.js","names":[],"sources":["../src/components/Badge/Badge.tsx","../src/components/Badge/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { BadgeNotificationVariant } from './NotificationBadge';\nimport type { PaletteNames } from '../../theme/palette';\n\nimport NotificationBadge from './NotificationBadge';\nimport { AnalyticsId, IconSize } from '../../constants';\n\nimport badgeStyles from './styles.module.scss';\n\nexport type BadgeColors = Extract<PaletteNames, 'blueberry' | 'cherry' | 'neutral'>;\nexport type BadgeChildren = string | number;\nexport type BadgeVariant = 'string' | 'notification';\n\nexport interface BadgeProps {\n /** Sets the content of the badge. */\n children?: BadgeChildren;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the badge background color. */\n color?: BadgeColors;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Changes the type of the badge. Default: string */\n type?: BadgeVariant;\n /** Type of notification badge. Only works if type is 'notification'. */\n notificationVariant?: BadgeNotificationVariant;\n /** Ref passed to the root element */\n ref?: React.Ref<HTMLElement | null>;\n}\n\nexport type BadgeType = typeof Badge;\nconst Badge: React.FC<BadgeProps> = (props: BadgeProps) => {\n const { children, className = '', color = 'blueberry', testId, type = 'string', notificationVariant = 'info', ref } = props;\n const badgeClasses = classNames(\n badgeStyles.badge,\n {\n [badgeStyles['badge--blueberry']]: color === 'blueberry',\n [badgeStyles['badge--cherry']]: color === 'cherry',\n [badgeStyles['badge--neutral']]: color === 'neutral',\n },\n className\n );\n\n if (type === 'notification' && notificationVariant !== undefined) {\n return (\n <NotificationBadge\n variant={notificationVariant}\n size={IconSize.XSmall}\n className={className}\n testId={testId}\n data-analyticsid={AnalyticsId.Badge}\n />\n );\n }\n\n return (\n <span className={badgeClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Badge}>\n {children}\n </span>\n );\n};\n\nexport default Badge;\n","import Badge from './Badge';\nexport * from './Badge';\nexport default Badge;\n"],"mappings":";;;;;;AAgCA,IAAM,SAA+B,UAAsB;CACzD,MAAM,EAAE,UAAU,YAAY,IAAI,QAAQ,aAAa,QAAQ,OAAO,UAAU,sBAAsB,QAAQ,QAAQ;CACtH,MAAM,eAAe,WACnB,YAAY,OACZ;GACG,YAAY,sBAAsB,UAAU;GAC5C,YAAY,mBAAmB,UAAU;GACzC,YAAY,oBAAoB,UAAU;EAC5C,EACD,UACD;CAED,IAAI,SAAS,kBAAkB,wBAAwB,KAAA,GACrD,OACE,oBAAC,mBAAD;EACE,SAAS;EACT,MAAM,SAAS;EACJ;EACH;EACR,oBAAkB,YAAY;EAC9B,CAAA;CAIN,OACE,oBAAC,QAAD;EAAM,WAAW;EAAmB;EAAK,eAAa;EAAQ,oBAAkB,YAAY;EACzF;EACI,CAAA;;;;ACzDX,IAAA,gBAAe"}
|
package/lib/Button.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { isProd, isTest } from "./utils/environment.js";
|
|
2
|
+
import { AnalyticsId, IconSize } from "./constants.js";
|
|
3
|
+
import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
|
|
4
|
+
import { getColor } from "./theme/currys/color.js";
|
|
5
5
|
import { t as Icon_default } from "./Icon.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
6
|
+
import { useIcons } from "./hooks/useIcons.js";
|
|
7
|
+
import { useIsMobileBreakpoint } from "./hooks/useIsMobileBreakpoint.js";
|
|
8
|
+
import ArrowRight from "./components/Icons/ArrowRight.js";
|
|
9
9
|
import classNames from "classnames";
|
|
10
10
|
import React, { useEffect, useRef } from "react";
|
|
11
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import buttonStyles from "./components/Button/styles.module.scss";
|
|
13
|
+
//#region src/components/Button/Button.tsx
|
|
13
14
|
var getIconColor = (fill, borderless, disabled, concept, ondark, mobile) => {
|
|
14
15
|
if (mobile && disabled) return !ondark || fill ? getColor("neutral", !borderless ? 700 : 500) : getColor("white");
|
|
15
16
|
if (disabled) return !ondark || fill ? getColor("neutral", 500) : `${getColor("white")}b3`;
|
|
@@ -86,7 +87,7 @@ var Button = (props) => {
|
|
|
86
87
|
children: [
|
|
87
88
|
renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles["button__left-icon"] : void 0),
|
|
88
89
|
renderButtonContent(),
|
|
89
|
-
hasArrow ? renderIcon(/* @__PURE__ */ jsx(Icon_default, { svgIcon:
|
|
90
|
+
hasArrow ? renderIcon(/* @__PURE__ */ jsx(Icon_default, { svgIcon: ArrowRight }), getLargeIconSize(large, isMobile), classNames(buttonStyles["button__arrow"], { [buttonStyles["button__arrow--both-icons"]]: bothIcons })) : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles["button__right-icon"]),
|
|
90
91
|
hasUURightArrow && /* @__PURE__ */ jsx("span", {
|
|
91
92
|
style: { color: iconColor },
|
|
92
93
|
className: buttonStyles["button__right-unicode-arrow"],
|
|
@@ -124,7 +125,10 @@ var Button = (props) => {
|
|
|
124
125
|
children: renderbuttonContentWrapper()
|
|
125
126
|
})] });
|
|
126
127
|
};
|
|
127
|
-
|
|
128
|
-
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region src/components/Button/index.ts
|
|
130
|
+
var Button_default = Button;
|
|
131
|
+
//#endregion
|
|
132
|
+
export { Button_default as t };
|
|
129
133
|
|
|
130
134
|
//# sourceMappingURL=Button.js.map
|
package/lib/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["Button: React.FC<ButtonProps>"],"sources":["../src/components/Button/Button.tsx","../src/components/Button/index.ts"],"sourcesContent":["import React, { type AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { type HTMLButtonProps, type HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { type BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonOnColor = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\nexport type ButtonArrows = 'icon' | 'accessibility-character';\nexport type ButtonTextPosition = 'left' | 'centered';\n\nexport interface ButtonProps extends Omit<HTMLButtonProps, 'onClick' | 'type'>, Omit<HTMLAnchorProps, 'onClick'>, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: ButtonArrows;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n onColor?: ButtonOnColor;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (\n e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<unknown> | React.KeyboardEvent<HTMLUListElement> | null\n ) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the text */\n textClassName?: string;\n /** Sets the position of the text in the button - only applies when button is fluid */\n textPosition?: ButtonTextPosition;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n /** Ref that is passed to the component */\n ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button: React.FC<ButtonProps> = props => {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n onColor = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ref,\n ...restProps\n } = props;\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(ref);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = onColor === 'ondark';\n const isMobile = useIsMobileBreakpoint();\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, isMobile);\n const hasArrow = arrow === 'icon' && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const hasUURightArrow = arrow === 'accessibility-character' && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(\n buttonStyles['button__text'],\n {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n [buttonStyles['button__text--centered']]: fluid && textPosition === 'centered',\n },\n textClassName\n );\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (iconElement: BaseIconElement | null, iconSize: number, iconClassName?: string): BaseIconElement | null => {\n return iconElement\n ? React.cloneElement(iconElement, {\n size: iconSize,\n color: iconElement?.props.color && !disabled ? iconElement.props.color : iconColor,\n isHovered: iconElement.props.isHovered === undefined ? !disabled && isHovered : iconElement.props.isHovered,\n className: iconClassName,\n })\n : null;\n };\n\n const renderButtonContent = (): React.ReactNode => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): React.ReactNode => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, isMobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles['button__right-icon'])}\n {hasUURightArrow && (\n <span style={{ color: iconColor }} className={buttonStyles['button__right-unicode-arrow']} aria-hidden>\n {' →'}\n </span>\n )}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Button from './Button';\nexport * from './Button';\nexport default Button;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Button.js","names":[],"sources":["../src/components/Button/Button.tsx","../src/components/Button/index.ts"],"sourcesContent":["import React, { type AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconSize } from './../Icon';\nimport { type HTMLButtonProps, type HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { type BaseIconElement, useIcons } from '../../hooks/useIcons';\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonOnColor = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\nexport type ButtonArrows = 'icon' | 'accessibility-character';\nexport type ButtonTextPosition = 'left' | 'centered';\n\nexport interface ButtonProps extends Omit<HTMLButtonProps, 'onClick' | 'type'>, Omit<HTMLAnchorProps, 'onClick'>, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: ButtonArrows;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n onColor?: ButtonOnColor;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (\n e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<unknown> | React.KeyboardEvent<HTMLUListElement> | null\n ) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Adds custom classes to the text */\n textClassName?: string;\n /** Sets the position of the text in the button - only applies when button is fluid */\n textPosition?: ButtonTextPosition;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n /** Ref that is passed to the component */\n ref?: React.RefObject<HTMLButtonElement | HTMLAnchorElement | null>;\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean): void => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button: React.FC<ButtonProps> = props => {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n onColor = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n textClassName,\n textPosition = 'left',\n ref,\n ...restProps\n } = props;\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement | HTMLAnchorElement | null>(ref);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = onColor === 'ondark';\n const isMobile = useIsMobileBreakpoint();\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, isMobile);\n const hasArrow = arrow === 'icon' && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const hasUURightArrow = arrow === 'accessibility-character' && !fluid && !leftIcon && !rightIcon && !hasArrow && borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(\n buttonStyles['button__text'],\n {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n [buttonStyles['button__text--centered']]: fluid && textPosition === 'centered',\n },\n textClassName\n );\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (iconElement: BaseIconElement | null, iconSize: number, iconClassName?: string): BaseIconElement | null => {\n return iconElement\n ? React.cloneElement(iconElement, {\n size: iconSize,\n color: iconElement?.props.color && !disabled ? iconElement.props.color : iconColor,\n isHovered: iconElement.props.isHovered === undefined ? !disabled && isHovered : iconElement.props.isHovered,\n className: iconClassName,\n })\n : null;\n };\n\n const renderButtonContent = (): React.ReactNode => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): React.ReactNode => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, isMobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, isMobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, isMobile), buttonStyles['button__right-icon'])}\n {hasUURightArrow && (\n <span style={{ color: iconColor }} className={buttonStyles['button__right-unicode-arrow']} aria-hidden>\n {' →'}\n </span>\n )}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={refObject as React.RefObject<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={refObject as React.RefObject<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n};\n\nexport default Button;\n","import Button from './Button';\nexport * from './Button';\nexport default Button;\n"],"mappings":"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"}
|
package/lib/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
|
|
2
|
+
## 15.0.0-beta.0 (2026-05-08)
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **chip:** fjerner deprecated onclick prop ([b0eae93](https://github.com/helsenorge/designsystem/commit/b0eae93ca4a87e57bbd9b77f214f5b311ad90799)), closes [#376455](https://github.com/helsenorge/designsystem/issues/376455)
|
|
7
|
+
* **tag:** legg til accent2 variant med banana farge ([bb0c49b](https://github.com/helsenorge/designsystem/commit/bb0c49b340c8305fdc98e25adf955777f0d80be0)), closes [#376269](https://github.com/helsenorge/designsystem/issues/376269)
|
|
8
|
+
* **tag:** nytt design på tag ([d0871d8](https://github.com/helsenorge/designsystem/commit/d0871d877a6b7ea52908114c533ea2cb924ad8ed)), closes [#374718](https://github.com/helsenorge/designsystem/issues/374718)
|
|
9
|
+
|
|
10
|
+
## [14.7.3](https://github.com/helsenorge/designsystem/compare/v14.7.2...v14.7.3) (2026-05-08)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **datepicker:** fokus og hover styling justering ([0b3440c](https://github.com/helsenorge/designsystem/commit/0b3440cee67ae39fa123c55406d86bb453038247)), closes [#377339](https://github.com/helsenorge/designsystem/issues/377339)
|
|
15
|
+
* **datepicker:** racecondition mellom intern og ekstern value ([43428c6](https://github.com/helsenorge/designsystem/commit/43428c642beb09170b178df25133fb7729ff8a18)), closes [#377492](https://github.com/helsenorge/designsystem/issues/377492)
|
|
16
|
+
|
|
2
17
|
## [14.7.2](https://github.com/helsenorge/designsystem/compare/v14.7.1...v14.7.2) (2026-05-06)
|
|
3
18
|
|
|
4
19
|
### Features
|
|
@@ -111,26 +126,17 @@
|
|
|
111
126
|
* **bootstrap:** fjern deprecation warning ([38e0178](https://github.com/helsenorge/designsystem/commit/38e017841630d8f3b6f170373f64432a6e86b01c)), closes [#373746](https://github.com/helsenorge/designsystem/issues/373746)
|
|
112
127
|
* **tile:** lazyicon vises ikke ([f7cec5f](https://github.com/helsenorge/designsystem/commit/f7cec5f381c4d49b8ecc1e7e58451a8710cff877)), closes [#373723](https://github.com/helsenorge/designsystem/issues/373723)
|
|
113
128
|
|
|
114
|
-
## [14.0.0](https://github.com/helsenorge/designsystem/compare/v13.
|
|
129
|
+
## [14.0.0](https://github.com/helsenorge/designsystem/compare/v13.9.0...v14.0.0) (2026-03-11)
|
|
115
130
|
|
|
116
131
|
### Features
|
|
117
132
|
|
|
118
133
|
* **helpexpander:** ref blir nullable ([2bd75af](https://github.com/helsenorge/designsystem/commit/2bd75affe116883b10e50e2b5b8a9dd6dbbf0555)), closes [#371787](https://github.com/helsenorge/designsystem/issues/371787)
|
|
119
134
|
* **icon:** nye ikoner starstroke og starfill ([f4c9f7f](https://github.com/helsenorge/designsystem/commit/f4c9f7f57c7ce440aa2a564cf4a2f133c5c2f6d0)), closes [#370948](https://github.com/helsenorge/designsystem/issues/370948)
|
|
120
|
-
* **illustration:** nye illustrasjoner stork og thinking ([26d4edc](https://github.com/helsenorge/designsystem/commit/26d4edce1606559c4017b74097513b090dd3cb0e)), closes [#372380](https://github.com/helsenorge/designsystem/issues/372380)
|
|
121
|
-
* **servicemessage:** ny prop messageRole ([ee8ac9f](https://github.com/helsenorge/designsystem/commit/ee8ac9f084ec3e51904b0a58ff9bb0ccd5f45542)), closes [#372043](https://github.com/helsenorge/designsystem/issues/372043)
|
|
122
135
|
|
|
123
136
|
### Bug Fixes
|
|
124
137
|
|
|
125
|
-
* generer ider til svger istedenfor hardkodede ([ea0cccf](https://github.com/helsenorge/designsystem/commit/ea0cccf37a31a817940b36f78b73af7303accb1b)), closes [#372412](https://github.com/helsenorge/designsystem/issues/372412)
|
|
126
138
|
* stopper å sette state i useffect for å få færre rerenders ([6d66002](https://github.com/helsenorge/designsystem/commit/6d6600271241fd7498281a52ab5c6bc269e5faec)), closes [#371689](https://github.com/helsenorge/designsystem/issues/371689)
|
|
127
|
-
* **button:** ikke vis hoverfarge på små skjermer for disabled buttons ([9a6a451](https://github.com/helsenorge/designsystem/commit/9a6a451fefaaf181858a282ca467bfdf176ec6f7)), closes [#372696](https://github.com/helsenorge/designsystem/issues/372696)
|
|
128
|
-
* **datepicker:** legg på outline ved hover på kalenderknapp ([b0c1a4e](https://github.com/helsenorge/designsystem/commit/b0c1a4e0025c1d7dfa69ab7cf08f00cb790cb0a0)), closes [#345238](https://github.com/helsenorge/designsystem/issues/345238)
|
|
129
|
-
* **datepicker:** småfikser rundt validering ([cd06bee](https://github.com/helsenorge/designsystem/commit/cd06beed0212d3d82fb67165722f5f740367255b)), closes [#372577](https://github.com/helsenorge/designsystem/issues/372577) [#373156](https://github.com/helsenorge/designsystem/issues/373156)
|
|
130
|
-
* **drawer:** flytt lukkekryss tilbake til flexbox ([f0f3c6f](https://github.com/helsenorge/designsystem/commit/f0f3c6f0c2f8d5c6b615c1ac7dbf6aab997b2e73)), closes [#373141](https://github.com/helsenorge/designsystem/issues/373141)
|
|
131
|
-
* **helptriggerinline:** tekst er nå left aligned ([ea0deeb](https://github.com/helsenorge/designsystem/commit/ea0deebe9a2ee373766a5ac6e4500fc581b0ee97)), closes [#372216](https://github.com/helsenorge/designsystem/issues/372216)
|
|
132
139
|
* **icon:** fiks ikonfiler etter major oppgradering ([8e65a7e](https://github.com/helsenorge/designsystem/commit/8e65a7e9b1ea24bfac5176a1b00517aee4726cb5)), closes [#373313](https://github.com/helsenorge/designsystem/issues/373313)
|
|
133
|
-
* **unsafe_datepicker:** bruk resources i labels fra react-day-picker ([0958b64](https://github.com/helsenorge/designsystem/commit/0958b64f730776a515917e5dcd44392e5d19ab50)), closes [#345238](https://github.com/helsenorge/designsystem/issues/345238) [#372577](https://github.com/helsenorge/designsystem/issues/372577)
|
|
134
140
|
|
|
135
141
|
## 14.0.0-beta.9 (2026-02-25)
|
|
136
142
|
|
|
@@ -202,6 +208,23 @@
|
|
|
202
208
|
* ts feilmeldinger under bygg og runtime ([0688fb9](https://github.com/helsenorge/designsystem/commit/0688fb98634de41b75c3c172831634e6b57b2901)), closes [#368806](https://github.com/helsenorge/designsystem/issues/368806)
|
|
203
209
|
* **panel:** fiks feil import ([b952624](https://github.com/helsenorge/designsystem/commit/b952624923ef37e2f0b88efe659a8a0117c94201))
|
|
204
210
|
|
|
211
|
+
## [13.9.0](https://github.com/helsenorge/designsystem/compare/v13.8.0...v13.9.0) (2026-03-09)
|
|
212
|
+
|
|
213
|
+
### Features
|
|
214
|
+
|
|
215
|
+
* **illustration:** nye illustrasjoner stork og thinking ([26d4edc](https://github.com/helsenorge/designsystem/commit/26d4edce1606559c4017b74097513b090dd3cb0e)), closes [#372380](https://github.com/helsenorge/designsystem/issues/372380)
|
|
216
|
+
* **servicemessage:** ny prop messageRole ([ee8ac9f](https://github.com/helsenorge/designsystem/commit/ee8ac9f084ec3e51904b0a58ff9bb0ccd5f45542)), closes [#372043](https://github.com/helsenorge/designsystem/issues/372043)
|
|
217
|
+
|
|
218
|
+
### Bug Fixes
|
|
219
|
+
|
|
220
|
+
* generer ider til svger istedenfor hardkodede ([ea0cccf](https://github.com/helsenorge/designsystem/commit/ea0cccf37a31a817940b36f78b73af7303accb1b)), closes [#372412](https://github.com/helsenorge/designsystem/issues/372412)
|
|
221
|
+
* **button:** ikke vis hoverfarge på små skjermer for disabled buttons ([9a6a451](https://github.com/helsenorge/designsystem/commit/9a6a451fefaaf181858a282ca467bfdf176ec6f7)), closes [#372696](https://github.com/helsenorge/designsystem/issues/372696)
|
|
222
|
+
* **datepicker:** legg på outline ved hover på kalenderknapp ([b0c1a4e](https://github.com/helsenorge/designsystem/commit/b0c1a4e0025c1d7dfa69ab7cf08f00cb790cb0a0)), closes [#345238](https://github.com/helsenorge/designsystem/issues/345238)
|
|
223
|
+
* **datepicker:** småfikser rundt validering ([cd06bee](https://github.com/helsenorge/designsystem/commit/cd06beed0212d3d82fb67165722f5f740367255b)), closes [#372577](https://github.com/helsenorge/designsystem/issues/372577) [#373156](https://github.com/helsenorge/designsystem/issues/373156)
|
|
224
|
+
* **drawer:** flytt lukkekryss tilbake til flexbox ([f0f3c6f](https://github.com/helsenorge/designsystem/commit/f0f3c6f0c2f8d5c6b615c1ac7dbf6aab997b2e73)), closes [#373141](https://github.com/helsenorge/designsystem/issues/373141)
|
|
225
|
+
* **helptriggerinline:** tekst er nå left aligned ([ea0deeb](https://github.com/helsenorge/designsystem/commit/ea0deebe9a2ee373766a5ac6e4500fc581b0ee97)), closes [#372216](https://github.com/helsenorge/designsystem/issues/372216)
|
|
226
|
+
* **unsafe_datepicker:** bruk resources i labels fra react-day-picker ([0958b64](https://github.com/helsenorge/designsystem/commit/0958b64f730776a515917e5dcd44392e5d19ab50)), closes [#345238](https://github.com/helsenorge/designsystem/issues/345238) [#372577](https://github.com/helsenorge/designsystem/issues/372577)
|
|
227
|
+
|
|
205
228
|
## [13.8.0](https://github.com/helsenorge/designsystem/compare/v13.7.0...v13.8.0) (2026-02-24)
|
|
206
229
|
|
|
207
230
|
### Features
|
package/lib/Checkbox.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import { t as uuid } from "./uuid.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { AnalyticsId, FormOnColor, FormSize, IconSize } from "./constants.js";
|
|
3
|
+
import { usePseudoClasses } from "./hooks/usePseudoClasses.js";
|
|
4
|
+
import { getColor } from "./theme/currys/color.js";
|
|
5
|
+
import { isMutableRefObject, mergeRefs } from "./utils/refs.js";
|
|
6
6
|
import { t as Icon_default } from "./Icon.js";
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import Check from "./components/Icons/Check.js";
|
|
8
|
+
import { useIdWithFallback } from "./hooks/useIdWithFallback.js";
|
|
9
|
+
import { getAriaDescribedBy } from "./utils/accessibility.js";
|
|
10
10
|
import { t as ErrorWrapper_default } from "./ErrorWrapper.js";
|
|
11
11
|
import { r as renderLabelAsParent, t as getLabelText } from "./utils2.js";
|
|
12
12
|
import classNames from "classnames";
|
|
13
13
|
import { useEffect, useState } from "react";
|
|
14
14
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
15
|
import checkboxStyles from "./components/Checkbox/styles.module.scss";
|
|
16
|
-
|
|
16
|
+
//#region src/components/Checkbox/Checkbox.tsx
|
|
17
|
+
var Checkbox = (props) => {
|
|
17
18
|
const { className, checked = false, disabled, label, inputId = uuid(), onColor = FormOnColor.onwhite, name = inputId, size, errorText, error = !!errorText, errorTextId: errorTextIdProp, errorWrapperClassName, value = getLabelText(label), testId, required, onChange, ref } = props;
|
|
18
19
|
const [isChecked, setIsChecked] = useState(checked);
|
|
19
20
|
const errorTextId = useIdWithFallback(errorTextIdProp);
|
|
@@ -93,7 +94,7 @@ const Checkbox = (props) => {
|
|
|
93
94
|
children: isChecked && /* @__PURE__ */ jsx(Icon_default, {
|
|
94
95
|
color: iconColor,
|
|
95
96
|
className: checkboxStyles["checkbox__icon"],
|
|
96
|
-
svgIcon:
|
|
97
|
+
svgIcon: Check,
|
|
97
98
|
size: IconSize.XSmall
|
|
98
99
|
})
|
|
99
100
|
})] });
|
|
@@ -120,7 +121,7 @@ const Checkbox = (props) => {
|
|
|
120
121
|
})
|
|
121
122
|
});
|
|
122
123
|
};
|
|
123
|
-
|
|
124
|
-
export {
|
|
124
|
+
//#endregion
|
|
125
|
+
export { Checkbox as t };
|
|
125
126
|
|
|
126
127
|
//# sourceMappingURL=Checkbox.js.map
|
package/lib/Checkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","names":["Checkbox: React.FC<CheckboxProps>"],"sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\n\nimport { AnalyticsId, FormOnColor, FormSize, IconSize } from '../../constants';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { uuid } from '../../utils/uuid';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport Check from '../Icons/Check';\nimport { getLabelText, renderLabelAsParent } from '../Label/utils';\n\nimport checkboxStyles from './styles.module.scss';\n\nexport interface CheckboxProps\n extends\n ErrorWrapperClassNameProps,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'aria-describedby' | 'name' | 'value' | 'disabled' | 'checked' | 'required' | 'onChange'\n > {\n /** Adds custom classes to the element. */\n className?: string;\n /** The <Label/> next to the checkbox - sublabels kan ikke kombineres med large variant */\n label: React.ReactNode;\n /** input id of the checkbox */\n inputId?: string;\n /** Changes the visuals of the checkbox */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the checkbox */\n size?: keyof typeof FormSize;\n /** Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup */\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 /** Ref that is passed to the component */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = props => {\n const {\n className,\n checked = false,\n disabled,\n label,\n inputId = uuid(),\n onColor = FormOnColor.onwhite,\n name = inputId,\n size,\n errorText,\n error = !!errorText,\n errorTextId: errorTextIdProp,\n errorWrapperClassName,\n value = getLabelText(label),\n testId,\n required,\n onChange,\n ref,\n } = props;\n const [isChecked, setIsChecked] = useState(checked);\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const onWhite = onColor === FormOnColor.onwhite;\n const onGrey = onColor === FormOnColor.ongrey;\n const onBlueberry = onColor === FormOnColor.onblueberry;\n const onInvalid = error || onColor === FormOnColor.oninvalid;\n const onDark = onColor === FormOnColor.ondark;\n const large = size === FormSize.large;\n const { refObject, isFocused } = usePseudoClasses<HTMLInputElement>(isMutableRefObject(ref) ? ref : null);\n const mergedRefs = mergeRefs([ref, refObject]);\n\n const checkboxWrapperClasses = classNames(checkboxStyles['checkbox-wrapper'], {\n [checkboxStyles['checkbox-wrapper--large']]: large,\n });\n const checkboxLabelClasses = classNames(checkboxStyles['checkbox-label'], {\n [checkboxStyles['checkbox-label--disabled']]: disabled,\n [checkboxStyles['checkbox-label--on-dark']]: onDark,\n [checkboxStyles['checkbox-label--large']]: large,\n [checkboxStyles['checkbox-label__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__large--focus']]: large && isFocused,\n [checkboxStyles['checkbox-label__large--on-white']]: large && onWhite,\n [checkboxStyles['checkbox-label__large--on-grey']]: large && onGrey,\n [checkboxStyles['checkbox-label__large--on-blueberry']]: large && onBlueberry,\n [checkboxStyles['checkbox-label__large--on-invalid']]: large && onInvalid,\n [checkboxStyles['checkbox-label__large--disabled']]: large && disabled,\n });\n const checkboxClasses = classNames(checkboxStyles.checkbox, className);\n const checkboxIconWrapperClasses = classNames(checkboxStyles['checkbox__icon-wrapper'], {\n [checkboxStyles['checkbox__icon-wrapper--on-white']]: onWhite,\n [checkboxStyles['checkbox__icon-wrapper--on-grey']]: onGrey,\n [checkboxStyles['checkbox__icon-wrapper--on-invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--disabled']]: disabled,\n [checkboxStyles['checkbox__icon-wrapper__regular--checked']]: !large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__regular--invalid']]: !large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__regular--on-dark']]: !large && isChecked && onDark,\n [checkboxStyles['checkbox__icon-wrapper__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--on-dark']]: onDark,\n [checkboxStyles['checkbox__icon-wrapper--on-blueberry']]: onBlueberry,\n [checkboxStyles['checkbox__icon-wrapper--invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--disabled']]: disabled && large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--disabled']]: disabled && large && isChecked,\n });\n const labelTextClasses = classNames(checkboxStyles['checkbox-label__text'], {\n [checkboxStyles['checkbox-label__text__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__text__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox-label__text--on-dark']]: onDark,\n [checkboxStyles['checkbox-label__text--disabled']]: disabled,\n });\n\n let iconColor = getColor('white');\n if (onDark || (large && isChecked)) iconColor = getColor('blueberry', 900);\n if (onInvalid && large && isChecked) iconColor = getColor('white');\n if (disabled) iconColor = getColor('neutral', 700);\n\n useEffect(() => {\n setIsChecked(checked);\n }, [checked]);\n\n const onChangeHandler = (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (onChange) {\n onChange(e);\n }\n\n setIsChecked(!isChecked);\n };\n\n const getLabelContent = (): React.ReactNode => {\n return (\n <>\n <input\n id={inputId}\n name={name}\n className={checkboxClasses}\n type=\"checkbox\"\n checked={isChecked}\n disabled={disabled}\n value={value}\n ref={mergedRefs}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n aria-invalid={error}\n required={required}\n onChange={onChangeHandler}\n />\n <span className={checkboxIconWrapperClasses}>\n {isChecked && <Icon color={iconColor} className={checkboxStyles['checkbox__icon']} svgIcon={Check} size={IconSize.XSmall} />}\n </span>\n </>\n );\n };\n\n return (\n <ErrorWrapper className={errorWrapperClassName} errorText={errorText} errorTextId={errorTextId}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Checkbox} className={checkboxWrapperClasses}>\n {renderLabelAsParent({\n label: label,\n children: getLabelContent(),\n inputId: inputId,\n onColor: onColor as FormOnColor,\n labelClassName: checkboxLabelClasses,\n labelTextClassName: labelTextClasses,\n sublabelWrapperClassName: checkboxStyles['checkbox-sublabel-wrapper'],\n large: large,\n afterLabelChildrenClassName: checkboxStyles['checkbox-afterlabelchildren-wrapper'],\n })}\n </div>\n </ErrorWrapper>\n );\n};\n\nexport default Checkbox;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Checkbox.js","names":[],"sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import { useEffect, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ErrorWrapperClassNameProps } from '../ErrorWrapper';\n\nimport { AnalyticsId, FormOnColor, FormSize, IconSize } from '../../constants';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { uuid } from '../../utils/uuid';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon from '../Icon';\nimport Check from '../Icons/Check';\nimport { getLabelText, renderLabelAsParent } from '../Label/utils';\n\nimport checkboxStyles from './styles.module.scss';\n\nexport interface CheckboxProps\n extends\n ErrorWrapperClassNameProps,\n Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'aria-describedby' | 'name' | 'value' | 'disabled' | 'checked' | 'required' | 'onChange'\n > {\n /** Adds custom classes to the element. */\n className?: string;\n /** The <Label/> next to the checkbox - sublabels kan ikke kombineres med large variant */\n label: React.ReactNode;\n /** input id of the checkbox */\n inputId?: string;\n /** Changes the visuals of the checkbox */\n onColor?: keyof typeof FormOnColor;\n /** Changes the visuals of the checkbox */\n size?: keyof typeof FormSize;\n /** Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup */\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 /** Ref that is passed to the component */\n ref?: React.Ref<HTMLInputElement | null>;\n}\n\nexport const Checkbox: React.FC<CheckboxProps> = props => {\n const {\n className,\n checked = false,\n disabled,\n label,\n inputId = uuid(),\n onColor = FormOnColor.onwhite,\n name = inputId,\n size,\n errorText,\n error = !!errorText,\n errorTextId: errorTextIdProp,\n errorWrapperClassName,\n value = getLabelText(label),\n testId,\n required,\n onChange,\n ref,\n } = props;\n const [isChecked, setIsChecked] = useState(checked);\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const onWhite = onColor === FormOnColor.onwhite;\n const onGrey = onColor === FormOnColor.ongrey;\n const onBlueberry = onColor === FormOnColor.onblueberry;\n const onInvalid = error || onColor === FormOnColor.oninvalid;\n const onDark = onColor === FormOnColor.ondark;\n const large = size === FormSize.large;\n const { refObject, isFocused } = usePseudoClasses<HTMLInputElement>(isMutableRefObject(ref) ? ref : null);\n const mergedRefs = mergeRefs([ref, refObject]);\n\n const checkboxWrapperClasses = classNames(checkboxStyles['checkbox-wrapper'], {\n [checkboxStyles['checkbox-wrapper--large']]: large,\n });\n const checkboxLabelClasses = classNames(checkboxStyles['checkbox-label'], {\n [checkboxStyles['checkbox-label--disabled']]: disabled,\n [checkboxStyles['checkbox-label--on-dark']]: onDark,\n [checkboxStyles['checkbox-label--large']]: large,\n [checkboxStyles['checkbox-label__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__large--focus']]: large && isFocused,\n [checkboxStyles['checkbox-label__large--on-white']]: large && onWhite,\n [checkboxStyles['checkbox-label__large--on-grey']]: large && onGrey,\n [checkboxStyles['checkbox-label__large--on-blueberry']]: large && onBlueberry,\n [checkboxStyles['checkbox-label__large--on-invalid']]: large && onInvalid,\n [checkboxStyles['checkbox-label__large--disabled']]: large && disabled,\n });\n const checkboxClasses = classNames(checkboxStyles.checkbox, className);\n const checkboxIconWrapperClasses = classNames(checkboxStyles['checkbox__icon-wrapper'], {\n [checkboxStyles['checkbox__icon-wrapper--on-white']]: onWhite,\n [checkboxStyles['checkbox__icon-wrapper--on-grey']]: onGrey,\n [checkboxStyles['checkbox__icon-wrapper--on-invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--disabled']]: disabled,\n [checkboxStyles['checkbox__icon-wrapper__regular--checked']]: !large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__regular--invalid']]: !large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__regular--on-dark']]: !large && isChecked && onDark,\n [checkboxStyles['checkbox__icon-wrapper__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--on-dark']]: onDark,\n [checkboxStyles['checkbox__icon-wrapper--on-blueberry']]: onBlueberry,\n [checkboxStyles['checkbox__icon-wrapper--invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--disabled']]: disabled && large && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__large--checked--disabled']]: disabled && large && isChecked,\n });\n const labelTextClasses = classNames(checkboxStyles['checkbox-label__text'], {\n [checkboxStyles['checkbox-label__text__large--checked']]: large && isChecked,\n [checkboxStyles['checkbox-label__text__large--invalid']]: large && isChecked && onInvalid,\n [checkboxStyles['checkbox-label__text--on-dark']]: onDark,\n [checkboxStyles['checkbox-label__text--disabled']]: disabled,\n });\n\n let iconColor = getColor('white');\n if (onDark || (large && isChecked)) iconColor = getColor('blueberry', 900);\n if (onInvalid && large && isChecked) iconColor = getColor('white');\n if (disabled) iconColor = getColor('neutral', 700);\n\n useEffect(() => {\n setIsChecked(checked);\n }, [checked]);\n\n const onChangeHandler = (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (onChange) {\n onChange(e);\n }\n\n setIsChecked(!isChecked);\n };\n\n const getLabelContent = (): React.ReactNode => {\n return (\n <>\n <input\n id={inputId}\n name={name}\n className={checkboxClasses}\n type=\"checkbox\"\n checked={isChecked}\n disabled={disabled}\n value={value}\n ref={mergedRefs}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n aria-invalid={error}\n required={required}\n onChange={onChangeHandler}\n />\n <span className={checkboxIconWrapperClasses}>\n {isChecked && <Icon color={iconColor} className={checkboxStyles['checkbox__icon']} svgIcon={Check} size={IconSize.XSmall} />}\n </span>\n </>\n );\n };\n\n return (\n <ErrorWrapper className={errorWrapperClassName} errorText={errorText} errorTextId={errorTextId}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Checkbox} className={checkboxWrapperClasses}>\n {renderLabelAsParent({\n label: label,\n children: getLabelContent(),\n inputId: inputId,\n onColor: onColor as FormOnColor,\n labelClassName: checkboxLabelClasses,\n labelTextClassName: labelTextClasses,\n sublabelWrapperClassName: checkboxStyles['checkbox-sublabel-wrapper'],\n large: large,\n afterLabelChildrenClassName: checkboxStyles['checkbox-afterlabelchildren-wrapper'],\n })}\n </div>\n </ErrorWrapper>\n );\n};\n\nexport default Checkbox;\n"],"mappings":"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"}
|