@helsenorge/designsystem-react 14.7.3 → 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 +26 -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 +10 -6
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +10 -6
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +14 -10
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +13 -11
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +14 -10
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +17 -13
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +19 -14
- package/lib/TableRow.js.map +1 -1
- package/lib/Textarea.js +18 -11
- package/lib/Textarea.js.map +1 -1
- package/lib/Title.js +8 -5
- package/lib/Title.js.map +1 -1
- package/lib/Toast.js +7 -6
- package/lib/Toast.js.map +1 -1
- package/lib/__mocks__/IntersectionObserver.js +3 -2
- package/lib/__mocks__/IntersectionObserver.js.map +1 -1
- package/lib/__mocks__/MutationObserver.js +3 -2
- package/lib/__mocks__/MutationObserver.js.map +1 -1
- package/lib/__mocks__/ResizeObserver.js +3 -2
- package/lib/__mocks__/ResizeObserver.js.map +1 -1
- package/lib/__mocks__/matchMedia.js +3 -1
- package/lib/__mocks__/matchMedia.js.map +1 -1
- package/lib/__mocks__/useLayoutEvent.js +2 -0
- package/lib/__mocks__/useLayoutEvent.js.map +1 -1
- package/lib/__mocks__/useOutsideEvent.js +2 -0
- package/lib/__mocks__/useOutsideEvent.js.map +1 -1
- package/lib/__mocks__/usePseudoClasses.js +2 -0
- package/lib/__mocks__/usePseudoClasses.js.map +1 -1
- package/lib/__mocks__/useSize.js +2 -0
- package/lib/__mocks__/useSize.js.map +1 -1
- package/lib/__mocks__/uuid.js +6 -1
- package/lib/__mocks__/uuid.js.map +1 -1
- package/lib/components/ArticleTeaser/index.js +10 -3
- package/lib/components/ArticleTeaser/index.js.map +1 -1
- package/lib/components/Checkbox/index.js +5 -1
- package/lib/components/Checkbox/index.js.map +1 -0
- package/lib/components/Chip/Chip.d.ts +0 -2
- package/lib/components/Dropdown/SingleSelect/index.js +4 -2
- package/lib/components/Dropdown/SingleSelect/index.js.map +1 -1
- package/lib/components/Dropdown/index.js +27 -19
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/DropdownOld/index.js +25 -17
- package/lib/components/DropdownOld/index.js.map +1 -1
- package/lib/components/ElementHeader/index.js +4 -2
- package/lib/components/ElementHeader/index.js.map +1 -1
- package/lib/components/EmptyState/index.js +23 -17
- package/lib/components/EmptyState/index.js.map +1 -1
- package/lib/components/ExpanderHierarchy/index.js +23 -16
- package/lib/components/ExpanderHierarchy/index.js.map +1 -1
- package/lib/components/ExpanderList/index.js +13 -9
- package/lib/components/ExpanderList/index.js.map +1 -1
- package/lib/components/EyebrowHeader/index.js +6 -2
- package/lib/components/EyebrowHeader/index.js.map +1 -1
- package/lib/components/FavoriteButton/index.js +20 -11
- package/lib/components/FavoriteButton/index.js.map +1 -1
- package/lib/components/Filter/DrawerNavigation/index.js +6 -2
- package/lib/components/Filter/DrawerNavigation/index.js.map +1 -0
- package/lib/components/Filter/FilterLinkList/index.js +6 -2
- package/lib/components/Filter/FilterLinkList/index.js.map +1 -0
- package/lib/components/Filter/FilterSearch/index.js +6 -1
- package/lib/components/Filter/FilterSearch/index.js.map +1 -0
- package/lib/components/Filter/index.js +50 -12
- package/lib/components/Filter/index.js.map +1 -1
- package/lib/components/FormGroup/index.js +4 -2
- package/lib/components/FormGroup/index.js.map +1 -1
- package/lib/components/HelpBubble/index.js +11 -4
- package/lib/components/HelpBubble/index.js.map +1 -1
- package/lib/components/HelpDrawer/index.js +10 -3
- package/lib/components/HelpDrawer/index.js.map +1 -1
- package/lib/components/HelpExpanderInline/index.js +8 -4
- package/lib/components/HelpExpanderInline/index.js.map +1 -1
- package/lib/components/HelpExpanderStandalone/index.js +14 -10
- package/lib/components/HelpExpanderStandalone/index.js.map +1 -1
- package/lib/components/HelpPanel/index.js +6 -2
- package/lib/components/HelpPanel/index.js.map +1 -1
- package/lib/components/HelpTeaser/index.js +6 -2
- package/lib/components/HelpTeaser/index.js.map +1 -1
- package/lib/components/HelpTooltip/index.js +6 -2
- package/lib/components/HelpTooltip/index.js.map +1 -1
- package/lib/components/HelpTriggerInline/index.js +8 -4
- package/lib/components/HelpTriggerInline/index.js.map +1 -1
- package/lib/components/Icon/index.js +1 -1
- package/lib/components/Icons/ActiveMonitoring.js +3 -2
- package/lib/components/Icons/ActiveMonitoring.js.map +1 -1
- package/lib/components/Icons/AcupunctureBack.js +4 -3
- package/lib/components/Icons/AcupunctureBack.js.map +1 -1
- package/lib/components/Icons/AdditionalIconInformation.js +2 -0
- package/lib/components/Icons/AdditionalIconInformation.js.map +1 -1
- package/lib/components/Icons/AlarmClock.js +3 -2
- package/lib/components/Icons/AlarmClock.js.map +1 -1
- package/lib/components/Icons/AlertSignFill.js +17 -2
- package/lib/components/Icons/AlertSignFill.js.map +1 -0
- package/lib/components/Icons/AlertSignStroke.js +17 -2
- package/lib/components/Icons/AlertSignStroke.js.map +1 -0
- package/lib/components/Icons/Amputation.js +3 -2
- package/lib/components/Icons/Amputation.js.map +1 -1
- package/lib/components/Icons/Anxiety.js +3 -2
- package/lib/components/Icons/Anxiety.js.map +1 -1
- package/lib/components/Icons/Apple.js +3 -2
- package/lib/components/Icons/Apple.js.map +1 -1
- package/lib/components/Icons/Archive.js +3 -2
- package/lib/components/Icons/Archive.js.map +1 -1
- package/lib/components/Icons/ArmFlexing.js +3 -2
- package/lib/components/Icons/ArmFlexing.js.map +1 -1
- package/lib/components/Icons/ArrowDown.js +29 -2
- package/lib/components/Icons/ArrowDown.js.map +1 -0
- package/lib/components/Icons/ArrowLeft.js +3 -2
- package/lib/components/Icons/ArrowLeft.js.map +1 -1
- package/lib/components/Icons/ArrowRight.js +17 -2
- package/lib/components/Icons/ArrowRight.js.map +1 -0
- package/lib/components/Icons/ArrowUp.js +29 -2
- package/lib/components/Icons/ArrowUp.js.map +1 -0
- package/lib/components/Icons/ArrowUpRight.js +17 -2
- package/lib/components/Icons/ArrowUpRight.js.map +1 -0
- package/lib/components/Icons/Attachment.js +3 -2
- package/lib/components/Icons/Attachment.js.map +1 -1
- package/lib/components/Icons/Atv.js +3 -2
- package/lib/components/Icons/Atv.js.map +1 -1
- package/lib/components/Icons/Avatar.js +3 -2
- package/lib/components/Icons/Avatar.js.map +1 -1
- package/lib/components/Icons/AwakePersonOnPillow.js +3 -2
- package/lib/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/lib/components/Icons/Baby.js +3 -2
- package/lib/components/Icons/Baby.js.map +1 -1
- package/lib/components/Icons/BandAid.js +3 -2
- package/lib/components/Icons/BandAid.js.map +1 -1
- package/lib/components/Icons/BeerAndPills.js +3 -2
- package/lib/components/Icons/BeerAndPills.js.map +1 -1
- package/lib/components/Icons/Bell.js +3 -2
- package/lib/components/Icons/Bell.js.map +1 -1
- package/lib/components/Icons/Bike.js +3 -2
- package/lib/components/Icons/Bike.js.map +1 -1
- package/lib/components/Icons/BirthControl.js +3 -2
- package/lib/components/Icons/BirthControl.js.map +1 -1
- package/lib/components/Icons/BirthdayCake.js +3 -2
- package/lib/components/Icons/BirthdayCake.js.map +1 -1
- package/lib/components/Icons/Boat.js +3 -2
- package/lib/components/Icons/Boat.js.map +1 -1
- package/lib/components/Icons/Body.js +3 -2
- package/lib/components/Icons/Body.js.map +1 -1
- package/lib/components/Icons/Braille.js +3 -2
- package/lib/components/Icons/Braille.js.map +1 -1
- package/lib/components/Icons/Brain.js +3 -2
- package/lib/components/Icons/Brain.js.map +1 -1
- package/lib/components/Icons/BreastReconstruction.js +3 -2
- package/lib/components/Icons/BreastReconstruction.js.map +1 -1
- package/lib/components/Icons/BreastRemoval.js +3 -2
- package/lib/components/Icons/BreastRemoval.js.map +1 -1
- package/lib/components/Icons/Breasts.js +3 -2
- package/lib/components/Icons/Breasts.js.map +1 -1
- package/lib/components/Icons/BrokenHeart.js +3 -2
- package/lib/components/Icons/BrokenHeart.js.map +1 -1
- package/lib/components/Icons/BrokenPuzzle.js +3 -2
- package/lib/components/Icons/BrokenPuzzle.js.map +1 -1
- package/lib/components/Icons/Bus.js +3 -2
- package/lib/components/Icons/Bus.js.map +1 -1
- package/lib/components/Icons/Calendar.js +3 -2
- package/lib/components/Icons/Calendar.js.map +1 -1
- package/lib/components/Icons/CalendarChange.js +3 -2
- package/lib/components/Icons/CalendarChange.js.map +1 -1
- package/lib/components/Icons/CalendarCheck.js +3 -2
- package/lib/components/Icons/CalendarCheck.js.map +1 -1
- package/lib/components/Icons/CalendarEvent.js +3 -2
- package/lib/components/Icons/CalendarEvent.js.map +1 -1
- package/lib/components/Icons/CalendarSave.js +3 -2
- package/lib/components/Icons/CalendarSave.js.map +1 -1
- package/lib/components/Icons/Cancer.js +3 -2
- package/lib/components/Icons/Cancer.js.map +1 -1
- package/lib/components/Icons/Candle.js +3 -2
- package/lib/components/Icons/Candle.js.map +1 -1
- package/lib/components/Icons/Car.js +3 -2
- package/lib/components/Icons/Car.js.map +1 -1
- package/lib/components/Icons/Carton.js +3 -2
- package/lib/components/Icons/Carton.js.map +1 -1
- package/lib/components/Icons/Change.js +3 -2
- package/lib/components/Icons/Change.js.map +1 -1
- package/lib/components/Icons/Check.js +17 -2
- package/lib/components/Icons/Check.js.map +1 -0
- package/lib/components/Icons/CheckFill.js +29 -2
- package/lib/components/Icons/CheckFill.js.map +1 -0
- package/lib/components/Icons/CheckOutline.js +15 -2
- package/lib/components/Icons/CheckOutline.js.map +1 -0
- package/lib/components/Icons/Chest.js +3 -2
- package/lib/components/Icons/Chest.js.map +1 -1
- package/lib/components/Icons/ChevronDown.js +17 -2
- package/lib/components/Icons/ChevronDown.js.map +1 -0
- package/lib/components/Icons/ChevronLeft.js +17 -2
- package/lib/components/Icons/ChevronLeft.js.map +1 -0
- package/lib/components/Icons/ChevronRight.js +17 -2
- package/lib/components/Icons/ChevronRight.js.map +1 -0
- package/lib/components/Icons/ChevronUp.js +17 -2
- package/lib/components/Icons/ChevronUp.js.map +1 -0
- package/lib/components/Icons/ChevronsDown.js +3 -2
- package/lib/components/Icons/ChevronsDown.js.map +1 -1
- package/lib/components/Icons/ChevronsUp.js +3 -2
- package/lib/components/Icons/ChevronsUp.js.map +1 -1
- package/lib/components/Icons/ChildPlaying.js +3 -2
- package/lib/components/Icons/ChildPlaying.js.map +1 -1
- package/lib/components/Icons/Cigarette.js +3 -2
- package/lib/components/Icons/Cigarette.js.map +1 -1
- package/lib/components/Icons/Coins.js +3 -2
- package/lib/components/Icons/Coins.js.map +1 -1
- package/lib/components/Icons/Contacts.js +3 -2
- package/lib/components/Icons/Contacts.js.map +1 -1
- package/lib/components/Icons/Copy.js +3 -2
- package/lib/components/Icons/Copy.js.map +1 -1
- package/lib/components/Icons/CoronaCertificate.js +3 -2
- package/lib/components/Icons/CoronaCertificate.js.map +1 -1
- package/lib/components/Icons/Coronavirus.js +3 -2
- package/lib/components/Icons/Coronavirus.js.map +1 -1
- package/lib/components/Icons/Cough.js +3 -2
- package/lib/components/Icons/Cough.js.map +1 -1
- package/lib/components/Icons/CreditCard.js +3 -2
- package/lib/components/Icons/CreditCard.js.map +1 -1
- package/lib/components/Icons/CriticalHealthInfo.js +3 -2
- package/lib/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/lib/components/Icons/Cross.js +3 -2
- package/lib/components/Icons/Cross.js.map +1 -1
- package/lib/components/Icons/DataExchange.js +3 -2
- package/lib/components/Icons/DataExchange.js.map +1 -1
- package/lib/components/Icons/DataReceived.js +3 -2
- package/lib/components/Icons/DataReceived.js.map +1 -1
- package/lib/components/Icons/DataSent.js +3 -2
- package/lib/components/Icons/DataSent.js.map +1 -1
- package/lib/components/Icons/Depression.js +3 -2
- package/lib/components/Icons/Depression.js.map +1 -1
- package/lib/components/Icons/DigestiveSystem.js +3 -2
- package/lib/components/Icons/DigestiveSystem.js.map +1 -1
- package/lib/components/Icons/Dizzy.js +3 -2
- package/lib/components/Icons/Dizzy.js.map +1 -1
- package/lib/components/Icons/Documents.js +3 -2
- package/lib/components/Icons/Documents.js.map +1 -1
- package/lib/components/Icons/Dog.js +3 -2
- package/lib/components/Icons/Dog.js.map +1 -1
- package/lib/components/Icons/DonorCard.js +3 -2
- package/lib/components/Icons/DonorCard.js.map +1 -1
- package/lib/components/Icons/DotAttachment.js +3 -2
- package/lib/components/Icons/DotAttachment.js.map +1 -1
- package/lib/components/Icons/DotCheckmark.js +3 -2
- package/lib/components/Icons/DotCheckmark.js.map +1 -1
- package/lib/components/Icons/DotCircleArrows.js +3 -2
- package/lib/components/Icons/DotCircleArrows.js.map +1 -1
- package/lib/components/Icons/DotDot.js +3 -2
- package/lib/components/Icons/DotDot.js.map +1 -1
- package/lib/components/Icons/DotExclamationMark.js +3 -2
- package/lib/components/Icons/DotExclamationMark.js.map +1 -1
- package/lib/components/Icons/DotFill.js +3 -2
- package/lib/components/Icons/DotFill.js.map +1 -1
- package/lib/components/Icons/DotGroup.js +3 -2
- package/lib/components/Icons/DotGroup.js.map +1 -1
- package/lib/components/Icons/DotHalfDisc.js +3 -2
- package/lib/components/Icons/DotHalfDisc.js.map +1 -1
- package/lib/components/Icons/DotInfo.js +3 -2
- package/lib/components/Icons/DotInfo.js.map +1 -1
- package/lib/components/Icons/DotLogin.js +3 -2
- package/lib/components/Icons/DotLogin.js.map +1 -1
- package/lib/components/Icons/DotLookingGlass.js +3 -2
- package/lib/components/Icons/DotLookingGlass.js.map +1 -1
- package/lib/components/Icons/DotNoAccess.js +3 -2
- package/lib/components/Icons/DotNoAccess.js.map +1 -1
- package/lib/components/Icons/DotNoEye.js +3 -2
- package/lib/components/Icons/DotNoEye.js.map +1 -1
- package/lib/components/Icons/DotOutline.js +3 -2
- package/lib/components/Icons/DotOutline.js.map +1 -1
- package/lib/components/Icons/DotPencil.js +3 -2
- package/lib/components/Icons/DotPencil.js.map +1 -1
- package/lib/components/Icons/DotQuestionMark.js +3 -2
- package/lib/components/Icons/DotQuestionMark.js.map +1 -1
- package/lib/components/Icons/DotTriangle.js +3 -2
- package/lib/components/Icons/DotTriangle.js.map +1 -1
- package/lib/components/Icons/DotX.js +3 -2
- package/lib/components/Icons/DotX.js.map +1 -1
- package/lib/components/Icons/Download.js +3 -2
- package/lib/components/Icons/Download.js.map +1 -1
- package/lib/components/Icons/Draft.js +3 -2
- package/lib/components/Icons/Draft.js.map +1 -1
- package/lib/components/Icons/Drag.js +3 -2
- package/lib/components/Icons/Drag.js.map +1 -1
- package/lib/components/Icons/EChat.js +3 -2
- package/lib/components/Icons/EChat.js.map +1 -1
- package/lib/components/Icons/Ear.js +3 -2
- package/lib/components/Icons/Ear.js.map +1 -1
- package/lib/components/Icons/EarDeaf.js +3 -2
- package/lib/components/Icons/EarDeaf.js.map +1 -1
- package/lib/components/Icons/EarHearingAid.js +3 -2
- package/lib/components/Icons/EarHearingAid.js.map +1 -1
- package/lib/components/Icons/EarNoseThroat.js +3 -2
- package/lib/components/Icons/EarNoseThroat.js.map +1 -1
- package/lib/components/Icons/EarVolume.js +3 -2
- package/lib/components/Icons/EarVolume.js.map +1 -1
- package/lib/components/Icons/Edit.js +3 -2
- package/lib/components/Icons/Edit.js.map +1 -1
- package/lib/components/Icons/ElderlyPerson.js +3 -2
- package/lib/components/Icons/ElderlyPerson.js.map +1 -1
- package/lib/components/Icons/Embolization.js +3 -2
- package/lib/components/Icons/Embolization.js.map +1 -1
- package/lib/components/Icons/EmergencyCall.js +3 -2
- package/lib/components/Icons/EmergencyCall.js.map +1 -1
- package/lib/components/Icons/EmoticonAnnoyed.js +3 -2
- package/lib/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/lib/components/Icons/EmoticonDelighted.js +3 -2
- package/lib/components/Icons/EmoticonDelighted.js.map +1 -1
- package/lib/components/Icons/EmoticonDisappointed.js +3 -2
- package/lib/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/lib/components/Icons/EmoticonHappy.js +3 -2
- package/lib/components/Icons/EmoticonHappy.js.map +1 -1
- package/lib/components/Icons/EmoticonMeh.js +3 -2
- package/lib/components/Icons/EmoticonMeh.js.map +1 -1
- package/lib/components/Icons/EmptyBox.js +17 -2
- package/lib/components/Icons/EmptyBox.js.map +1 -0
- package/lib/components/Icons/EnterFullScreen.js +3 -2
- package/lib/components/Icons/EnterFullScreen.js.map +1 -1
- package/lib/components/Icons/Envelope.js +3 -2
- package/lib/components/Icons/Envelope.js.map +1 -1
- package/lib/components/Icons/Epilepsy.js +3 -2
- package/lib/components/Icons/Epilepsy.js.map +1 -1
- package/lib/components/Icons/Eraser.js +3 -2
- package/lib/components/Icons/Eraser.js.map +1 -1
- package/lib/components/Icons/ErrorSignFill.js +17 -2
- package/lib/components/Icons/ErrorSignFill.js.map +1 -0
- package/lib/components/Icons/ErrorSignStroke.js +3 -2
- package/lib/components/Icons/ErrorSignStroke.js.map +1 -1
- package/lib/components/Icons/EuropeanHealthCard.js +3 -2
- package/lib/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/lib/components/Icons/ExitFullScreen.js +3 -2
- package/lib/components/Icons/ExitFullScreen.js.map +1 -1
- package/lib/components/Icons/Eye.js +3 -2
- package/lib/components/Icons/Eye.js.map +1 -1
- package/lib/components/Icons/Facebook.js +3 -2
- package/lib/components/Icons/Facebook.js.map +1 -1
- package/lib/components/Icons/FallingLeaf.js +3 -2
- package/lib/components/Icons/FallingLeaf.js.map +1 -1
- package/lib/components/Icons/Feedback.js +3 -2
- package/lib/components/Icons/Feedback.js.map +1 -1
- package/lib/components/Icons/Female.js +3 -2
- package/lib/components/Icons/Female.js.map +1 -1
- package/lib/components/Icons/FemaleDoctor.js +3 -2
- package/lib/components/Icons/FemaleDoctor.js.map +1 -1
- package/lib/components/Icons/Ferry.js +3 -2
- package/lib/components/Icons/Ferry.js.map +1 -1
- package/lib/components/Icons/File.js +3 -2
- package/lib/components/Icons/File.js.map +1 -1
- package/lib/components/Icons/Filter.js +45 -2
- package/lib/components/Icons/Filter.js.map +1 -0
- package/lib/components/Icons/FingerBleed.js +3 -2
- package/lib/components/Icons/FingerBleed.js.map +1 -1
- package/lib/components/Icons/FirstAidKit.js +3 -2
- package/lib/components/Icons/FirstAidKit.js.map +1 -1
- package/lib/components/Icons/Fish.js +3 -2
- package/lib/components/Icons/Fish.js.map +1 -1
- package/lib/components/Icons/FloppyDisk.js +3 -2
- package/lib/components/Icons/FloppyDisk.js.map +1 -1
- package/lib/components/Icons/Football.js +3 -2
- package/lib/components/Icons/Football.js.map +1 -1
- package/lib/components/Icons/Form.js +3 -2
- package/lib/components/Icons/Form.js.map +1 -1
- package/lib/components/Icons/Forward.js +17 -2
- package/lib/components/Icons/Forward.js.map +1 -0
- package/lib/components/Icons/Gallery.js +3 -2
- package/lib/components/Icons/Gallery.js.map +1 -1
- package/lib/components/Icons/Garden.js +3 -2
- package/lib/components/Icons/Garden.js.map +1 -1
- package/lib/components/Icons/GasCan.js +3 -2
- package/lib/components/Icons/GasCan.js.map +1 -1
- package/lib/components/Icons/GenderIdentity.js +3 -2
- package/lib/components/Icons/GenderIdentity.js.map +1 -1
- package/lib/components/Icons/GlassWater.js +3 -2
- package/lib/components/Icons/GlassWater.js.map +1 -1
- package/lib/components/Icons/Glasses.js +3 -2
- package/lib/components/Icons/Glasses.js.map +1 -1
- package/lib/components/Icons/Globe.js +3 -2
- package/lib/components/Icons/Globe.js.map +1 -1
- package/lib/components/Icons/Grain.js +3 -2
- package/lib/components/Icons/Grain.js.map +1 -1
- package/lib/components/Icons/Graph.js +3 -2
- package/lib/components/Icons/Graph.js.map +1 -1
- package/lib/components/Icons/Group.js +3 -2
- package/lib/components/Icons/Group.js.map +1 -1
- package/lib/components/Icons/GroupTwins.js +3 -2
- package/lib/components/Icons/GroupTwins.js.map +1 -1
- package/lib/components/Icons/HTMLFile.js +3 -2
- package/lib/components/Icons/HTMLFile.js.map +1 -1
- package/lib/components/Icons/HandWaving.js +9 -2
- package/lib/components/Icons/HandWaving.js.map +1 -0
- package/lib/components/Icons/HandWithDisease.js +3 -2
- package/lib/components/Icons/HandWithDisease.js.map +1 -1
- package/lib/components/Icons/HandsAndHeart.js +3 -2
- package/lib/components/Icons/HandsAndHeart.js.map +1 -1
- package/lib/components/Icons/HealthClinic.js +3 -2
- package/lib/components/Icons/HealthClinic.js.map +1 -1
- package/lib/components/Icons/HealthMeasurements.js +3 -2
- package/lib/components/Icons/HealthMeasurements.js.map +1 -1
- package/lib/components/Icons/HealthWarning.js +3 -2
- package/lib/components/Icons/HealthWarning.js.map +1 -1
- package/lib/components/Icons/HealthcarePerson.js +3 -2
- package/lib/components/Icons/HealthcarePerson.js.map +1 -1
- package/lib/components/Icons/HealthcarePersonell.js +3 -2
- package/lib/components/Icons/HealthcarePersonell.js.map +1 -1
- package/lib/components/Icons/HearingProtection.js +3 -2
- package/lib/components/Icons/HearingProtection.js.map +1 -1
- package/lib/components/Icons/Heart.js +3 -2
- package/lib/components/Icons/Heart.js.map +1 -1
- package/lib/components/Icons/HeartHands.js +3 -2
- package/lib/components/Icons/HeartHands.js.map +1 -1
- package/lib/components/Icons/HelpSign.js +3 -2
- package/lib/components/Icons/HelpSign.js.map +1 -1
- package/lib/components/Icons/HelpingHand.js +3 -2
- package/lib/components/Icons/HelpingHand.js.map +1 -1
- package/lib/components/Icons/Hemodialysis.js +3 -2
- package/lib/components/Icons/Hemodialysis.js.map +1 -1
- package/lib/components/Icons/Hiker.js +3 -2
- package/lib/components/Icons/Hiker.js.map +1 -1
- package/lib/components/Icons/Hipprosthesis.js +3 -2
- package/lib/components/Icons/Hipprosthesis.js.map +1 -1
- package/lib/components/Icons/History.js +3 -2
- package/lib/components/Icons/History.js.map +1 -1
- package/lib/components/Icons/HivAndAids.js +3 -2
- package/lib/components/Icons/HivAndAids.js.map +1 -1
- package/lib/components/Icons/Home.js +3 -2
- package/lib/components/Icons/Home.js.map +1 -1
- package/lib/components/Icons/HomeFill.js +3 -2
- package/lib/components/Icons/HomeFill.js.map +1 -1
- package/lib/components/Icons/Hormone.js +3 -2
- package/lib/components/Icons/Hormone.js.map +1 -1
- package/lib/components/Icons/Hospital.js +3 -2
- package/lib/components/Icons/Hospital.js.map +1 -1
- package/lib/components/Icons/Hourglass.js +3 -2
- package/lib/components/Icons/Hourglass.js.map +1 -1
- package/lib/components/Icons/IconNames.js +4 -1
- package/lib/components/Icons/IconNames.js.map +1 -1
- package/lib/components/Icons/ImgFile.js +3 -2
- package/lib/components/Icons/ImgFile.js.map +1 -1
- package/lib/components/Icons/Inbox.js +3 -2
- package/lib/components/Icons/Inbox.js.map +1 -1
- package/lib/components/Icons/InfoSignFill.js +17 -2
- package/lib/components/Icons/InfoSignFill.js.map +1 -0
- package/lib/components/Icons/InfoSignStroke.js +3 -2
- package/lib/components/Icons/InfoSignStroke.js.map +1 -1
- package/lib/components/Icons/Instagram.js +3 -2
- package/lib/components/Icons/Instagram.js.map +1 -1
- package/lib/components/Icons/Intravenous.js +3 -2
- package/lib/components/Icons/Intravenous.js.map +1 -1
- package/lib/components/Icons/JointPain.js +3 -2
- package/lib/components/Icons/JointPain.js.map +1 -1
- package/lib/components/Icons/Journal.js +3 -2
- package/lib/components/Icons/Journal.js.map +1 -1
- package/lib/components/Icons/JpgFile.js +3 -2
- package/lib/components/Icons/JpgFile.js.map +1 -1
- package/lib/components/Icons/Kidney.js +3 -2
- package/lib/components/Icons/Kidney.js.map +1 -1
- package/lib/components/Icons/KitchenScale.js +3 -2
- package/lib/components/Icons/KitchenScale.js.map +1 -1
- package/lib/components/Icons/Kjernejournal.js +3 -2
- package/lib/components/Icons/Kjernejournal.js.map +1 -1
- package/lib/components/Icons/Laboratory.js +3 -2
- package/lib/components/Icons/Laboratory.js.map +1 -1
- package/lib/components/Icons/LaptopBlog.js +3 -2
- package/lib/components/Icons/LaptopBlog.js.map +1 -1
- package/lib/components/Icons/LawBook.js +3 -2
- package/lib/components/Icons/LawBook.js.map +1 -1
- package/lib/components/Icons/LegalDocument.js +3 -2
- package/lib/components/Icons/LegalDocument.js.map +1 -1
- package/lib/components/Icons/LightBulb.js +3 -2
- package/lib/components/Icons/LightBulb.js.map +1 -1
- package/lib/components/Icons/List.js +3 -2
- package/lib/components/Icons/List.js.map +1 -1
- package/lib/components/Icons/Location.js +3 -2
- package/lib/components/Icons/Location.js.map +1 -1
- package/lib/components/Icons/LocationFill.js +3 -2
- package/lib/components/Icons/LocationFill.js.map +1 -1
- package/lib/components/Icons/Lock.js +3 -2
- package/lib/components/Icons/Lock.js.map +1 -1
- package/lib/components/Icons/Login.js +3 -2
- package/lib/components/Icons/Login.js.map +1 -1
- package/lib/components/Icons/Logout.js +3 -2
- package/lib/components/Icons/Logout.js.map +1 -1
- package/lib/components/Icons/Lungs.js +3 -2
- package/lib/components/Icons/Lungs.js.map +1 -1
- package/lib/components/Icons/Makeup.js +3 -2
- package/lib/components/Icons/Makeup.js.map +1 -1
- package/lib/components/Icons/MaleDoctor.js +3 -2
- package/lib/components/Icons/MaleDoctor.js.map +1 -1
- package/lib/components/Icons/MaleDoctorAndPerson.js +3 -2
- package/lib/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompact.js +3 -2
- package/lib/components/Icons/MaleDoctorCompact.js.map +1 -1
- package/lib/components/Icons/MaleDoctorCompactFill.js +3 -2
- package/lib/components/Icons/MaleDoctorCompactFill.js.map +1 -1
- package/lib/components/Icons/MaleGenitalia.js +3 -2
- package/lib/components/Icons/MaleGenitalia.js.map +1 -1
- package/lib/components/Icons/MeasuringTape.js +3 -2
- package/lib/components/Icons/MeasuringTape.js.map +1 -1
- package/lib/components/Icons/Medicine.js +3 -2
- package/lib/components/Icons/Medicine.js.map +1 -1
- package/lib/components/Icons/MedicineWarning.js +3 -2
- package/lib/components/Icons/MedicineWarning.js.map +1 -1
- package/lib/components/Icons/MentalHealthAdult.js +3 -2
- package/lib/components/Icons/MentalHealthAdult.js.map +1 -1
- package/lib/components/Icons/MentalHealthChild.js +3 -2
- package/lib/components/Icons/MentalHealthChild.js.map +1 -1
- package/lib/components/Icons/Menu.js +3 -2
- package/lib/components/Icons/Menu.js.map +1 -1
- package/lib/components/Icons/Microscope.js +3 -2
- package/lib/components/Icons/Microscope.js.map +1 -1
- package/lib/components/Icons/Minus.js +3 -2
- package/lib/components/Icons/Minus.js.map +1 -1
- package/lib/components/Icons/Mirror.js +3 -2
- package/lib/components/Icons/Mirror.js.map +1 -1
- package/lib/components/Icons/MobilePhone.js +3 -2
- package/lib/components/Icons/MobilePhone.js.map +1 -1
- package/lib/components/Icons/MotherHoldingBaby.js +3 -2
- package/lib/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/lib/components/Icons/MuscleBack.js +3 -2
- package/lib/components/Icons/MuscleBack.js.map +1 -1
- package/lib/components/Icons/MuscleLeg.js +3 -2
- package/lib/components/Icons/MuscleLeg.js.map +1 -1
- package/lib/components/Icons/Mushroom.js +3 -2
- package/lib/components/Icons/Mushroom.js.map +1 -1
- package/lib/components/Icons/Music.js +3 -2
- package/lib/components/Icons/Music.js.map +1 -1
- package/lib/components/Icons/MusselsAndSalt.js +3 -2
- package/lib/components/Icons/MusselsAndSalt.js.map +1 -1
- package/lib/components/Icons/NoAccess.js +3 -2
- package/lib/components/Icons/NoAccess.js.map +1 -1
- package/lib/components/Icons/NoEye.js +3 -2
- package/lib/components/Icons/NoEye.js.map +1 -1
- package/lib/components/Icons/NoFilter.js +3 -2
- package/lib/components/Icons/NoFilter.js.map +1 -1
- package/lib/components/Icons/Notepad.js +3 -2
- package/lib/components/Icons/Notepad.js.map +1 -1
- package/lib/components/Icons/Osteotomy.js +3 -2
- package/lib/components/Icons/Osteotomy.js.map +1 -1
- package/lib/components/Icons/PaintRoller.js +3 -2
- package/lib/components/Icons/PaintRoller.js.map +1 -1
- package/lib/components/Icons/PaperPlane.js +3 -2
- package/lib/components/Icons/PaperPlane.js.map +1 -1
- package/lib/components/Icons/PatientAndPerson.js +3 -2
- package/lib/components/Icons/PatientAndPerson.js.map +1 -1
- package/lib/components/Icons/Pause.js +3 -2
- package/lib/components/Icons/Pause.js.map +1 -1
- package/lib/components/Icons/PdfFile.js +3 -2
- package/lib/components/Icons/PdfFile.js.map +1 -1
- package/lib/components/Icons/Pencil.js +3 -2
- package/lib/components/Icons/Pencil.js.map +1 -1
- package/lib/components/Icons/PeopleTalking.js +3 -2
- package/lib/components/Icons/PeopleTalking.js.map +1 -1
- package/lib/components/Icons/Peritonealdialysis.js +3 -2
- package/lib/components/Icons/Peritonealdialysis.js.map +1 -1
- package/lib/components/Icons/Person.js +3 -2
- package/lib/components/Icons/Person.js.map +1 -1
- package/lib/components/Icons/PersonAndPatient.js +3 -2
- package/lib/components/Icons/PersonAndPatient.js.map +1 -1
- package/lib/components/Icons/PersonCancel.js +3 -2
- package/lib/components/Icons/PersonCancel.js.map +1 -1
- package/lib/components/Icons/PersonInXRayMachine.js +3 -2
- package/lib/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/lib/components/Icons/PersonOverweight.js +3 -2
- package/lib/components/Icons/PersonOverweight.js.map +1 -1
- package/lib/components/Icons/PersonRelaxing.js +3 -2
- package/lib/components/Icons/PersonRelaxing.js.map +1 -1
- package/lib/components/Icons/PersonWithBrain.js +3 -2
- package/lib/components/Icons/PersonWithBrain.js.map +1 -1
- package/lib/components/Icons/PersonWithBrokenArm.js +3 -2
- package/lib/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/lib/components/Icons/PersonWithCrutches.js +3 -2
- package/lib/components/Icons/PersonWithCrutches.js.map +1 -1
- package/lib/components/Icons/PersonWithJaw.js +3 -2
- package/lib/components/Icons/PersonWithJaw.js.map +1 -1
- package/lib/components/Icons/PersonWithMagnifyingGlass.js +3 -2
- package/lib/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/lib/components/Icons/PersonWithSenses.js +3 -2
- package/lib/components/Icons/PersonWithSenses.js.map +1 -1
- package/lib/components/Icons/PersonWorking.js +3 -2
- package/lib/components/Icons/PersonWorking.js.map +1 -1
- package/lib/components/Icons/PersonalPlan.js +3 -2
- package/lib/components/Icons/PersonalPlan.js.map +1 -1
- package/lib/components/Icons/PizzaSlice.js +3 -2
- package/lib/components/Icons/PizzaSlice.js.map +1 -1
- package/lib/components/Icons/Plane.js +3 -2
- package/lib/components/Icons/Plane.js.map +1 -1
- package/lib/components/Icons/Plant.js +3 -2
- package/lib/components/Icons/Plant.js.map +1 -1
- package/lib/components/Icons/PlateKnifeFork.js +3 -2
- package/lib/components/Icons/PlateKnifeFork.js.map +1 -1
- package/lib/components/Icons/Play.js +3 -2
- package/lib/components/Icons/Play.js.map +1 -1
- package/lib/components/Icons/PlusLarge.js +3 -2
- package/lib/components/Icons/PlusLarge.js.map +1 -1
- package/lib/components/Icons/PlusSmall.js +17 -2
- package/lib/components/Icons/PlusSmall.js.map +1 -0
- package/lib/components/Icons/PngFile.js +3 -2
- package/lib/components/Icons/PngFile.js.map +1 -1
- package/lib/components/Icons/Podcast.js +3 -2
- package/lib/components/Icons/Podcast.js.map +1 -1
- package/lib/components/Icons/PoisonInformation.js +3 -2
- package/lib/components/Icons/PoisonInformation.js.map +1 -1
- package/lib/components/Icons/Pregnant.js +3 -2
- package/lib/components/Icons/Pregnant.js.map +1 -1
- package/lib/components/Icons/Printer.js +3 -2
- package/lib/components/Icons/Printer.js.map +1 -1
- package/lib/components/Icons/Psychosis.js +3 -2
- package/lib/components/Icons/Psychosis.js.map +1 -1
- package/lib/components/Icons/Publication.js +3 -2
- package/lib/components/Icons/Publication.js.map +1 -1
- package/lib/components/Icons/Puzzle.js +3 -2
- package/lib/components/Icons/Puzzle.js.map +1 -1
- package/lib/components/Icons/QrCode.js +3 -2
- package/lib/components/Icons/QrCode.js.map +1 -1
- package/lib/components/Icons/Quarrel.js +3 -2
- package/lib/components/Icons/Quarrel.js.map +1 -1
- package/lib/components/Icons/RadioTherapy.js +3 -2
- package/lib/components/Icons/RadioTherapy.js.map +1 -1
- package/lib/components/Icons/RadioactiveTreatment.js +3 -2
- package/lib/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/lib/components/Icons/Radioiodine.js +3 -2
- package/lib/components/Icons/Radioiodine.js.map +1 -1
- package/lib/components/Icons/Receipt.js +3 -2
- package/lib/components/Icons/Receipt.js.map +1 -1
- package/lib/components/Icons/Receptionist.js +3 -2
- package/lib/components/Icons/Receptionist.js.map +1 -1
- package/lib/components/Icons/Recovery.js +3 -2
- package/lib/components/Icons/Recovery.js.map +1 -1
- package/lib/components/Icons/Referral.js +3 -2
- package/lib/components/Icons/Referral.js.map +1 -1
- package/lib/components/Icons/Refresh.js +3 -2
- package/lib/components/Icons/Refresh.js.map +1 -1
- package/lib/components/Icons/Refund.js +3 -2
- package/lib/components/Icons/Refund.js.map +1 -1
- package/lib/components/Icons/Reminder.js +3 -2
- package/lib/components/Icons/Reminder.js.map +1 -1
- package/lib/components/Icons/Reply.js +3 -2
- package/lib/components/Icons/Reply.js.map +1 -1
- package/lib/components/Icons/Rocket.js +3 -2
- package/lib/components/Icons/Rocket.js.map +1 -1
- package/lib/components/Icons/RtfFile.js +3 -2
- package/lib/components/Icons/RtfFile.js.map +1 -1
- package/lib/components/Icons/STDs.js +3 -2
- package/lib/components/Icons/STDs.js.map +1 -1
- package/lib/components/Icons/Save.js +3 -2
- package/lib/components/Icons/Save.js.map +1 -1
- package/lib/components/Icons/Scale.js +3 -2
- package/lib/components/Icons/Scale.js.map +1 -1
- package/lib/components/Icons/ScreenReader.js +3 -2
- package/lib/components/Icons/ScreenReader.js.map +1 -1
- package/lib/components/Icons/Search.js +27 -2
- package/lib/components/Icons/Search.js.map +1 -0
- package/lib/components/Icons/SectionSign.js +3 -2
- package/lib/components/Icons/SectionSign.js.map +1 -1
- package/lib/components/Icons/Settings.js +3 -2
- package/lib/components/Icons/Settings.js.map +1 -1
- package/lib/components/Icons/SettingsFill.js +3 -2
- package/lib/components/Icons/SettingsFill.js.map +1 -1
- package/lib/components/Icons/Sexualorientation.js +3 -2
- package/lib/components/Icons/Sexualorientation.js.map +1 -1
- package/lib/components/Icons/ShakingHand.js +3 -2
- package/lib/components/Icons/ShakingHand.js.map +1 -1
- package/lib/components/Icons/Share.js +3 -2
- package/lib/components/Icons/Share.js.map +1 -1
- package/lib/components/Icons/SharedHealthData.js +3 -2
- package/lib/components/Icons/SharedHealthData.js.map +1 -1
- package/lib/components/Icons/SharedHealthMeasurements.js +3 -2
- package/lib/components/Icons/SharedHealthMeasurements.js.map +1 -1
- package/lib/components/Icons/Shield.js +3 -2
- package/lib/components/Icons/Shield.js.map +1 -1
- package/lib/components/Icons/ShuntOperation.js +3 -2
- package/lib/components/Icons/ShuntOperation.js.map +1 -1
- package/lib/components/Icons/Skeleton.js +3 -2
- package/lib/components/Icons/Skeleton.js.map +1 -1
- package/lib/components/Icons/Skin.js +3 -2
- package/lib/components/Icons/Skin.js.map +1 -1
- package/lib/components/Icons/Snake.js +3 -2
- package/lib/components/Icons/Snake.js.map +1 -1
- package/lib/components/Icons/Snapchat.js +3 -2
- package/lib/components/Icons/Snapchat.js.map +1 -1
- package/lib/components/Icons/Sort.js +3 -2
- package/lib/components/Icons/Sort.js.map +1 -1
- package/lib/components/Icons/SortDown.js +3 -2
- package/lib/components/Icons/SortDown.js.map +1 -1
- package/lib/components/Icons/SortUp.js +3 -2
- package/lib/components/Icons/SortUp.js.map +1 -1
- package/lib/components/Icons/SpeechBubble.js +3 -2
- package/lib/components/Icons/SpeechBubble.js.map +1 -1
- package/lib/components/Icons/Spray.js +3 -2
- package/lib/components/Icons/Spray.js.map +1 -1
- package/lib/components/Icons/StarFill.js +3 -2
- package/lib/components/Icons/StarFill.js.map +1 -1
- package/lib/components/Icons/StarStroke.js +3 -2
- package/lib/components/Icons/StarStroke.js.map +1 -1
- package/lib/components/Icons/StickyNote.js +3 -2
- package/lib/components/Icons/StickyNote.js.map +1 -1
- package/lib/components/Icons/StickyNotes.js +3 -2
- package/lib/components/Icons/StickyNotes.js.map +1 -1
- package/lib/components/Icons/Stopwatch.js +3 -2
- package/lib/components/Icons/Stopwatch.js.map +1 -1
- package/lib/components/Icons/Sun.js +3 -2
- package/lib/components/Icons/Sun.js.map +1 -1
- package/lib/components/Icons/SupportingPerson.js +3 -2
- package/lib/components/Icons/SupportingPerson.js.map +1 -1
- package/lib/components/Icons/Surgery.js +3 -2
- package/lib/components/Icons/Surgery.js.map +1 -1
- package/lib/components/Icons/Sweets.js +3 -2
- package/lib/components/Icons/Sweets.js.map +1 -1
- package/lib/components/Icons/Syringe.js +4 -3
- package/lib/components/Icons/Syringe.js.map +1 -1
- package/lib/components/Icons/Taxi.js +3 -2
- package/lib/components/Icons/Taxi.js.map +1 -1
- package/lib/components/Icons/TeddyBear.js +3 -2
- package/lib/components/Icons/TeddyBear.js.map +1 -1
- package/lib/components/Icons/Teenagers.js +3 -2
- package/lib/components/Icons/Teenagers.js.map +1 -1
- package/lib/components/Icons/ThinkingAboutBaby.js +3 -2
- package/lib/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/lib/components/Icons/Ticket.js +3 -2
- package/lib/components/Icons/Ticket.js.map +1 -1
- package/lib/components/Icons/TimePassing.js +3 -2
- package/lib/components/Icons/TimePassing.js.map +1 -1
- package/lib/components/Icons/Toddler.js +3 -2
- package/lib/components/Icons/Toddler.js.map +1 -1
- package/lib/components/Icons/Tombstone.js +3 -2
- package/lib/components/Icons/Tombstone.js.map +1 -1
- package/lib/components/Icons/Toolbox.js +3 -2
- package/lib/components/Icons/Toolbox.js.map +1 -1
- package/lib/components/Icons/Tooth.js +3 -2
- package/lib/components/Icons/Tooth.js.map +1 -1
- package/lib/components/Icons/TotalKneeProsthesis.js +3 -2
- package/lib/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/lib/components/Icons/Train.js +3 -2
- package/lib/components/Icons/Train.js.map +1 -1
- package/lib/components/Icons/Transplantation.js +3 -2
- package/lib/components/Icons/Transplantation.js.map +1 -1
- package/lib/components/Icons/TrashCan.js +3 -2
- package/lib/components/Icons/TrashCan.js.map +1 -1
- package/lib/components/Icons/TravelRoute.js +3 -2
- package/lib/components/Icons/TravelRoute.js.map +1 -1
- package/lib/components/Icons/TreatmentAids.js +3 -2
- package/lib/components/Icons/TreatmentAids.js.map +1 -1
- package/lib/components/Icons/TriangleX.js +33 -2
- package/lib/components/Icons/TriangleX.js.map +1 -0
- package/lib/components/Icons/Twitter.js +3 -2
- package/lib/components/Icons/Twitter.js.map +1 -1
- package/lib/components/Icons/Undo.js +3 -2
- package/lib/components/Icons/Undo.js.map +1 -1
- package/lib/components/Icons/UniProsthesis.js +3 -2
- package/lib/components/Icons/UniProsthesis.js.map +1 -1
- package/lib/components/Icons/Upload.js +3 -2
- package/lib/components/Icons/Upload.js.map +1 -1
- package/lib/components/Icons/UserOrganization.js +3 -2
- package/lib/components/Icons/UserOrganization.js.map +1 -1
- package/lib/components/Icons/Vaccine.js +3 -2
- package/lib/components/Icons/Vaccine.js.map +1 -1
- package/lib/components/Icons/VerticalDots.js +17 -2
- package/lib/components/Icons/VerticalDots.js.map +1 -0
- package/lib/components/Icons/VideoCamera.js +3 -2
- package/lib/components/Icons/VideoCamera.js.map +1 -1
- package/lib/components/Icons/VideoChat.js +3 -2
- package/lib/components/Icons/VideoChat.js.map +1 -1
- package/lib/components/Icons/Wallet.js +3 -2
- package/lib/components/Icons/Wallet.js.map +1 -1
- package/lib/components/Icons/Watch.js +3 -2
- package/lib/components/Icons/Watch.js.map +1 -1
- package/lib/components/Icons/Website.js +3 -2
- package/lib/components/Icons/Website.js.map +1 -1
- package/lib/components/Icons/Wheelchair.js +3 -2
- package/lib/components/Icons/Wheelchair.js.map +1 -1
- package/lib/components/Icons/WheelchairActive.js +3 -2
- package/lib/components/Icons/WheelchairActive.js.map +1 -1
- package/lib/components/Icons/Window.js +3 -2
- package/lib/components/Icons/Window.js.map +1 -1
- package/lib/components/Icons/WordDocument.js +3 -2
- package/lib/components/Icons/WordDocument.js.map +1 -1
- package/lib/components/Icons/WorkSuitcase.js +3 -2
- package/lib/components/Icons/WorkSuitcase.js.map +1 -1
- package/lib/components/Icons/X.js +19 -2
- package/lib/components/Icons/X.js.map +1 -0
- package/lib/components/Icons/XOutline.js +3 -2
- package/lib/components/Icons/XOutline.js.map +1 -1
- package/lib/components/Icons/XmlFile.js +3 -2
- package/lib/components/Icons/XmlFile.js.map +1 -1
- package/lib/components/Icons/YouTube.js +3 -2
- package/lib/components/Icons/YouTube.js.map +1 -1
- package/lib/components/Icons/Zoom.js +3 -2
- package/lib/components/Icons/Zoom.js.map +1 -1
- package/lib/components/Icons/ZoomInLeft.js +3 -2
- package/lib/components/Icons/ZoomInLeft.js.map +1 -1
- package/lib/components/Icons/ZoomOutLeft.js +3 -2
- package/lib/components/Icons/ZoomOutLeft.js.map +1 -1
- package/lib/components/Illustrations/BabyMobile.js +5 -4
- package/lib/components/Illustrations/BabyMobile.js.map +1 -1
- package/lib/components/Illustrations/BabyMobileMedium.js +264 -2
- package/lib/components/Illustrations/BabyMobileMedium.js.map +1 -0
- package/lib/components/Illustrations/Child.js +5 -4
- package/lib/components/Illustrations/Child.js.map +1 -1
- package/lib/components/Illustrations/ChildMedium.js +127 -2
- package/lib/components/Illustrations/ChildMedium.js.map +1 -0
- package/lib/components/Illustrations/Doctor.js +7 -6
- package/lib/components/Illustrations/Doctor.js.map +1 -1
- package/lib/components/Illustrations/DoctorMedium.js +55 -2
- package/lib/components/Illustrations/DoctorMedium.js.map +1 -0
- package/lib/components/Illustrations/DoctorSmall.js +53 -2
- package/lib/components/Illustrations/DoctorSmall.js.map +1 -0
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +5 -4
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js.map +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js +200 -2
- package/lib/components/Illustrations/FacialRecognitionFingerprintMedium.js.map +1 -0
- package/lib/components/Illustrations/GiveBabyFood.js +5 -4
- package/lib/components/Illustrations/GiveBabyFood.js.map +1 -1
- package/lib/components/Illustrations/GiveBabyFoodMedium.js +241 -2
- package/lib/components/Illustrations/GiveBabyFoodMedium.js.map +1 -0
- package/lib/components/Illustrations/HealthcarePersonnel.js +7 -6
- package/lib/components/Illustrations/HealthcarePersonnel.js.map +1 -1
- package/lib/components/Illustrations/HealthcarePersonnelMedium.js +149 -2
- package/lib/components/Illustrations/HealthcarePersonnelMedium.js.map +1 -0
- package/lib/components/Illustrations/HealthcarePersonnelSmall.js +150 -2
- package/lib/components/Illustrations/HealthcarePersonnelSmall.js.map +1 -0
- package/lib/components/Illustrations/IllustrationNames.js +37 -1
- package/lib/components/Illustrations/IllustrationNames.js.map +1 -0
- package/lib/components/Illustrations/ReadLetters.js +5 -4
- package/lib/components/Illustrations/ReadLetters.js.map +1 -1
- package/lib/components/Illustrations/ReadLettersMedium.js +79 -2
- package/lib/components/Illustrations/ReadLettersMedium.js.map +1 -0
- package/lib/components/Illustrations/Stork.js +5 -4
- package/lib/components/Illustrations/Stork.js.map +1 -1
- package/lib/components/Illustrations/StorkMedium.js +97 -2
- package/lib/components/Illustrations/StorkMedium.js.map +1 -0
- package/lib/components/Illustrations/Stroller.js +5 -4
- package/lib/components/Illustrations/Stroller.js.map +1 -1
- package/lib/components/Illustrations/StrollerMedium.js +220 -2
- package/lib/components/Illustrations/StrollerMedium.js.map +1 -0
- package/lib/components/Illustrations/Support2.js +5 -4
- package/lib/components/Illustrations/Support2.js.map +1 -1
- package/lib/components/Illustrations/Support2Medium.js +159 -2
- package/lib/components/Illustrations/Support2Medium.js.map +1 -0
- package/lib/components/Illustrations/Thinking.js +5 -4
- package/lib/components/Illustrations/Thinking.js.map +1 -1
- package/lib/components/Illustrations/ThinkingMedium.js +99 -2
- package/lib/components/Illustrations/ThinkingMedium.js.map +1 -0
- package/lib/components/Input/index.js +6 -2
- package/lib/components/Input/index.js.map +1 -0
- package/lib/components/Label/index.js +6 -2
- package/lib/components/Label/index.js.map +1 -0
- package/lib/components/Loader/index.js +11 -5
- package/lib/components/Loader/index.js.map +1 -1
- package/lib/components/Logo/index.js +6 -2
- package/lib/components/Logo/index.js.map +1 -1
- package/lib/components/Modal/index.js +34 -28
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/NotificationPanel/index.js +10 -6
- package/lib/components/NotificationPanel/index.js.map +1 -1
- package/lib/components/Panel/index.js +22 -15
- package/lib/components/Panel/index.js.map +1 -1
- package/lib/components/PanelList/index.js +5 -1
- package/lib/components/PanelList/index.js.map +1 -1
- package/lib/components/PopMenu/index.js +26 -20
- package/lib/components/PopMenu/index.js.map +1 -1
- package/lib/components/Portal/index.js +27 -1
- package/lib/components/Portal/index.js.map +1 -0
- package/lib/components/Progressbar/index.js +21 -15
- package/lib/components/Progressbar/index.js.map +1 -1
- package/lib/components/PromoPanel/index.js +12 -8
- package/lib/components/PromoPanel/index.js.map +1 -1
- package/lib/components/RadioButton/index.js +5 -1
- package/lib/{RadioButton.js.map → components/RadioButton/index.js.map} +1 -1
- package/lib/components/ServiceMessage/index.js +19 -15
- package/lib/components/ServiceMessage/index.js.map +1 -1
- package/lib/components/SharingStatus/index.js +6 -2
- package/lib/components/SharingStatus/index.js.map +1 -1
- package/lib/components/Step/index.js +5 -1
- package/lib/components/Step/index.js.map +1 -1
- package/lib/components/Stepper/index.js +84 -18
- package/lib/components/Stepper/index.js.map +1 -1
- package/lib/components/StickyNote/index.js +17 -11
- package/lib/components/StickyNote/index.js.map +1 -1
- package/lib/components/Table/index.js +13 -9
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Tabs/index.js +13 -6
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Tag/Tag.d.ts +1 -11
- package/lib/components/Tag/constants.d.ts +2 -6
- package/lib/components/Tag/index.d.ts +1 -1
- package/lib/components/Tag/index.js +19 -34
- package/lib/components/Tag/index.js.map +1 -1
- package/lib/components/Tag/styles.module.scss +19 -52
- package/lib/components/Tag/styles.module.scss.d.ts +3 -11
- package/lib/components/TagList/index.js +5 -1
- package/lib/components/TagList/index.js.map +1 -1
- package/lib/components/Tile/index.js +10 -6
- package/lib/components/Tile/index.js.map +1 -1
- package/lib/components/Title/index.js +6 -2
- package/lib/components/Title/index.js.map +1 -0
- package/lib/components/Toast/index.js +4 -2
- package/lib/components/Toast/index.js.map +1 -1
- package/lib/components/ToastList/index.js +7 -3
- package/lib/components/ToastList/index.js.map +1 -1
- package/lib/components/Toggle/index.js +17 -11
- package/lib/components/Toggle/index.js.map +1 -1
- package/lib/components/Validation/index.js +24 -17
- package/lib/components/Validation/index.js.map +1 -1
- package/lib/constants.js +125 -1
- package/lib/constants.js.map +1 -0
- package/lib/constants2.js +45 -117
- package/lib/constants2.js.map +1 -1
- package/lib/floating-ui.react.js +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 +65 -10
- package/lib/utils6.js.map +1 -1
- package/lib/uuid.js +12 -9
- package/lib/uuid.js.map +1 -1
- package/package.json +26 -38
- package/lib/AlertSignFill.js +0 -16
- package/lib/AlertSignFill.js.map +0 -1
- package/lib/AlertSignStroke.js +0 -16
- package/lib/AlertSignStroke.js.map +0 -1
- package/lib/ArrowDown.js +0 -28
- package/lib/ArrowDown.js.map +0 -1
- package/lib/ArrowRight.js +0 -16
- package/lib/ArrowRight.js.map +0 -1
- package/lib/ArrowUp.js +0 -28
- package/lib/ArrowUp.js.map +0 -1
- package/lib/ArrowUpRight.js +0 -16
- package/lib/ArrowUpRight.js.map +0 -1
- package/lib/BabyMobileMedium.js +0 -263
- package/lib/BabyMobileMedium.js.map +0 -1
- package/lib/Check.js +0 -16
- package/lib/Check.js.map +0 -1
- package/lib/CheckFill.js +0 -28
- package/lib/CheckFill.js.map +0 -1
- package/lib/CheckOutline.js +0 -14
- package/lib/CheckOutline.js.map +0 -1
- package/lib/Checkbox2.js +0 -5
- package/lib/Checkbox2.js.map +0 -1
- package/lib/ChevronDown.js +0 -16
- package/lib/ChevronDown.js.map +0 -1
- package/lib/ChevronLeft.js +0 -16
- package/lib/ChevronLeft.js.map +0 -1
- package/lib/ChevronRight.js +0 -16
- package/lib/ChevronRight.js.map +0 -1
- package/lib/ChevronUp.js +0 -16
- package/lib/ChevronUp.js.map +0 -1
- package/lib/ChildMedium.js +0 -126
- package/lib/ChildMedium.js.map +0 -1
- package/lib/DoctorMedium.js +0 -54
- package/lib/DoctorMedium.js.map +0 -1
- package/lib/DoctorSmall.js +0 -52
- package/lib/DoctorSmall.js.map +0 -1
- package/lib/DrawerNavigation2.js +0 -5
- package/lib/DrawerNavigation2.js.map +0 -1
- package/lib/EmptyBox.js +0 -16
- package/lib/EmptyBox.js.map +0 -1
- package/lib/ErrorSignFill.js +0 -16
- package/lib/ErrorSignFill.js.map +0 -1
- package/lib/FacialRecognitionFingerprintMedium.js +0 -199
- package/lib/FacialRecognitionFingerprintMedium.js.map +0 -1
- package/lib/Filter.js +0 -44
- package/lib/Filter.js.map +0 -1
- package/lib/FilterLinkList2.js +0 -5
- package/lib/FilterLinkList2.js.map +0 -1
- package/lib/FilterSearch2.js +0 -5
- package/lib/FilterSearch2.js.map +0 -1
- package/lib/Forward.js +0 -16
- package/lib/Forward.js.map +0 -1
- package/lib/GiveBabyFoodMedium.js +0 -240
- package/lib/GiveBabyFoodMedium.js.map +0 -1
- package/lib/HandWaving.js +0 -8
- package/lib/HandWaving.js.map +0 -1
- package/lib/HealthcarePersonnelMedium.js +0 -148
- package/lib/HealthcarePersonnelMedium.js.map +0 -1
- package/lib/HealthcarePersonnelSmall.js +0 -149
- package/lib/HealthcarePersonnelSmall.js.map +0 -1
- package/lib/IllustrationNames.js +0 -35
- package/lib/IllustrationNames.js.map +0 -1
- package/lib/InfoSignFill.js +0 -16
- package/lib/InfoSignFill.js.map +0 -1
- package/lib/Input2.js +0 -5
- package/lib/Input2.js.map +0 -1
- package/lib/Label.js +0 -5
- package/lib/Label.js.map +0 -1
- package/lib/PlusSmall.js +0 -16
- package/lib/PlusSmall.js.map +0 -1
- package/lib/Portal.js +0 -26
- package/lib/Portal.js.map +0 -1
- package/lib/RadioButton.js +0 -5
- package/lib/ReadLettersMedium.js +0 -78
- package/lib/ReadLettersMedium.js.map +0 -1
- package/lib/Search.js +0 -26
- package/lib/Search.js.map +0 -1
- package/lib/StorkMedium.js +0 -96
- package/lib/StorkMedium.js.map +0 -1
- package/lib/StrollerMedium.js +0 -219
- package/lib/StrollerMedium.js.map +0 -1
- package/lib/Support2Medium.js +0 -158
- package/lib/Support2Medium.js.map +0 -1
- package/lib/ThinkingMedium.js +0 -98
- package/lib/ThinkingMedium.js.map +0 -1
- package/lib/Title2.js +0 -5
- package/lib/Title2.js.map +0 -1
- package/lib/TriangleX.js +0 -32
- package/lib/TriangleX.js.map +0 -1
- package/lib/VerticalDots.js +0 -16
- package/lib/VerticalDots.js.map +0 -1
- package/lib/X.js +0 -18
- package/lib/X.js.map +0 -1
- package/lib/_rolldown_dynamic_import_helper.js.map +0 -1
- package/lib/accessibility.js +0 -17
- package/lib/accessibility.js.map +0 -1
- package/lib/color.js +0 -10
- package/lib/color.js.map +0 -1
- package/lib/component.js +0 -10
- package/lib/component.js.map +0 -1
- package/lib/constants3.js +0 -46
- package/lib/constants3.js.map +0 -1
- package/lib/currys.js +0 -0
- package/lib/debounce.js +0 -16
- package/lib/debounce.js.map +0 -1
- package/lib/deepContains.js +0 -13
- package/lib/deepContains.js.map +0 -1
- package/lib/device.js +0 -6
- package/lib/device.js.map +0 -1
- package/lib/environment.js +0 -5
- package/lib/environment.js.map +0 -1
- package/lib/focus.js +0 -11
- package/lib/focus.js.map +0 -1
- package/lib/grid.js +0 -24
- package/lib/grid.js.map +0 -1
- package/lib/mobile.js +0 -14
- package/lib/mobile.js.map +0 -1
- package/lib/palette.js +0 -85
- package/lib/palette.js.map +0 -1
- package/lib/refs.js +0 -14
- package/lib/refs.js.map +0 -1
- package/lib/resource.js +0 -4
- package/lib/resource.js.map +0 -1
- package/lib/scroll.js +0 -9
- package/lib/scroll.js.map +0 -1
- package/lib/spacers.js +0 -20
- package/lib/spacers.js.map +0 -1
- package/lib/spacing.js +0 -25
- package/lib/spacing.js.map +0 -1
- package/lib/src.js +0 -0
- package/lib/theme.js +0 -13
- package/lib/theme.js.map +0 -1
- package/lib/useBreakpoint.js +0 -38
- package/lib/useBreakpoint.js.map +0 -1
- package/lib/useElementList.js +0 -38
- package/lib/useElementList.js.map +0 -1
- package/lib/useExpand.js +0 -18
- package/lib/useExpand.js.map +0 -1
- package/lib/useFocusToggle.js +0 -26
- package/lib/useFocusToggle.js.map +0 -1
- package/lib/useFocusTrap.js +0 -34
- package/lib/useFocusTrap.js.map +0 -1
- package/lib/useFocusableElements.js +0 -26
- package/lib/useFocusableElements.js.map +0 -1
- package/lib/useIcons.js +0 -26
- package/lib/useIcons.js.map +0 -1
- package/lib/useIdWithFallback.js +0 -8
- package/lib/useIdWithFallback.js.map +0 -1
- package/lib/useIntersectionObserver.js +0 -14
- package/lib/useIntersectionObserver.js.map +0 -1
- package/lib/useIsMobileBreakpoint.js +0 -8
- package/lib/useIsMobileBreakpoint.js.map +0 -1
- package/lib/useIsServerSide.js +0 -10
- package/lib/useIsServerSide.js.map +0 -1
- package/lib/useIsVisible.js +0 -16
- package/lib/useIsVisible.js.map +0 -1
- package/lib/useKeyboardEvent.js +0 -22
- package/lib/useKeyboardEvent.js.map +0 -1
- package/lib/useLanguage.js +0 -10
- package/lib/useLanguage.js.map +0 -1
- package/lib/useLayoutEvent.js +0 -21
- package/lib/useLayoutEvent.js.map +0 -1
- package/lib/useOutsideEvent.js +0 -20
- package/lib/useOutsideEvent.js.map +0 -1
- package/lib/usePrevious.js +0 -11
- package/lib/usePrevious.js.map +0 -1
- package/lib/usePseudoClasses.js +0 -46
- package/lib/usePseudoClasses.js.map +0 -1
- package/lib/useResizeObserver.js +0 -23
- package/lib/useResizeObserver.js.map +0 -1
- package/lib/useReturnFocusOnUnmount.js +0 -16
- package/lib/useReturnFocusOnUnmount.js.map +0 -1
- package/lib/useRovingFocus.js +0 -44
- package/lib/useRovingFocus.js.map +0 -1
- package/lib/useSize.js +0 -23
- package/lib/useSize.js.map +0 -1
- package/lib/useToggle.js +0 -24
- package/lib/useToggle.js.map +0 -1
- package/lib/usestopPropagation.js +0 -11
- package/lib/usestopPropagation.js.map +0 -1
- package/lib/viewport.js +0 -7
- package/lib/viewport.js.map +0 -1
- package/lib/withBreakpoint.js +0 -16
- package/lib/withBreakpoint.js.map +0 -1
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { IconSize } from "../../constants.js";
|
|
2
|
+
import { usePseudoClasses } from "../../hooks/usePseudoClasses.js";
|
|
3
|
+
import { breakpoints } from "../../theme/grid.js";
|
|
4
|
+
import { getColor } from "../../theme/currys/color.js";
|
|
5
5
|
import { t as Icon_default } from "../../Icon.js";
|
|
6
|
-
import { t as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
6
|
+
import { t as NotificationBadge } from "../../NotificationBadge.js";
|
|
7
|
+
import { useBreakpoint } from "../../hooks/useBreakpoint.js";
|
|
8
|
+
import { getAriaLabelAttributes } from "../../utils/accessibility.js";
|
|
9
|
+
import X from "../Icons/X.js";
|
|
10
10
|
import { t as Close_default } from "../../Close.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
11
|
+
import ChevronDown from "../Icons/ChevronDown.js";
|
|
12
|
+
import ChevronUp from "../Icons/ChevronUp.js";
|
|
13
13
|
import { i as renderElementHeader } from "../../ElementHeader.js";
|
|
14
|
-
import
|
|
14
|
+
import Forward from "../Icons/Forward.js";
|
|
15
15
|
import classNames from "classnames";
|
|
16
16
|
import { useId, useState } from "react";
|
|
17
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
18
18
|
import styles from "./styles.module.scss";
|
|
19
|
+
//#region src/components/ServiceMessage/ServiceMessage.tsx
|
|
19
20
|
var Label = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {
|
|
20
21
|
const breakpoint = useBreakpoint();
|
|
21
22
|
const { isHovered, refObject } = usePseudoClasses();
|
|
@@ -26,8 +27,8 @@ var Label = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpan
|
|
|
26
27
|
isHovered,
|
|
27
28
|
size: "compact",
|
|
28
29
|
parentType: "expanderlist",
|
|
29
|
-
chevronIcon: hasExpander ? isExpanded ?
|
|
30
|
-
icon: /* @__PURE__ */ jsx(
|
|
30
|
+
chevronIcon: hasExpander ? isExpanded ? ChevronUp : ChevronDown : void 0,
|
|
31
|
+
icon: /* @__PURE__ */ jsx(NotificationBadge, {
|
|
31
32
|
variant,
|
|
32
33
|
size: iconSize,
|
|
33
34
|
isHovered: hasExpander && isHovered
|
|
@@ -100,7 +101,7 @@ var Content = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnTe
|
|
|
100
101
|
target,
|
|
101
102
|
children: [urlTitle, /* @__PURE__ */ jsx(Icon_default, {
|
|
102
103
|
size: IconSize.XSmall,
|
|
103
|
-
svgIcon:
|
|
104
|
+
svgIcon: Forward,
|
|
104
105
|
color: getColor("blueberry", 700),
|
|
105
106
|
isHovered: readMoreHoverRefIsHovered
|
|
106
107
|
})]
|
|
@@ -111,7 +112,7 @@ var Content = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnTe
|
|
|
111
112
|
onClick: onDismiss,
|
|
112
113
|
children: [closeBtnText, /* @__PURE__ */ jsx(Icon_default, {
|
|
113
114
|
size: IconSize.XSmall,
|
|
114
|
-
svgIcon:
|
|
115
|
+
svgIcon: X,
|
|
115
116
|
color: getColor("blueberry", 700),
|
|
116
117
|
isHovered: closeButtonIsHovered
|
|
117
118
|
})]
|
|
@@ -162,7 +163,10 @@ var ServiceMessage = ({ label, dismissable = true, onDismiss, info, extraInfo, u
|
|
|
162
163
|
})]
|
|
163
164
|
});
|
|
164
165
|
};
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/components/ServiceMessage/index.ts
|
|
165
168
|
var ServiceMessage_default = ServiceMessage;
|
|
169
|
+
//#endregion
|
|
166
170
|
export { ServiceMessage_default as default };
|
|
167
171
|
|
|
168
172
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Label: React.FC<LabelProps>","Content: React.FC<ContentProps>","ServiceMessage: React.FC<ServiceMessageProps>"],"sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx","../../../src/components/ServiceMessage/index.ts"],"sourcesContent":["import { useId, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { AnchorLinkTargets } from '../AnchorLink';\nimport type { NotificationPanelVariants } from '../NotificationPanel';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport NotificationBadge from '../Badge/NotificationBadge';\nimport Close from '../Close';\nimport { renderElementHeader } from '../ElementHeader/utils';\nimport Icon, { IconSize } from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport Forward from '../Icons/Forward';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\ninterface LabelProps {\n label: string;\n variant: NotificationPanelVariants;\n id: string;\n hasExpander: boolean;\n isExpanded: boolean;\n dismissable: boolean;\n onExpand: () => void;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Label: React.FC<LabelProps> = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {\n const breakpoint = useBreakpoint();\n const { isHovered, refObject } = usePseudoClasses<HTMLDivElement>();\n\n const iconSize = breakpoint < breakpoints.lg ? IconSize.XSmall : IconSize.Small;\n const labelContainerClasses = classNames(\n styles['service-message__label-container'],\n styles[`service-message__label-container--${variant}`],\n hasExpander && styles[`service-message__label-container--has-expander`]\n );\n\n const elementHeader = renderElementHeader(label, {\n titleHtmlMarkup: 'span',\n isHovered,\n size: 'compact',\n parentType: 'expanderlist',\n chevronIcon: hasExpander ? (isExpanded ? ChevronUp : ChevronDown) : undefined,\n icon: <NotificationBadge variant={variant} size={iconSize} isHovered={hasExpander && isHovered} />,\n closeButton:\n !hasExpander && dismissable ? (\n <Close onClick={onDismiss} ariaLabel={closeBtnText} className={styles['service-message__close']} />\n ) : undefined,\n });\n\n return (\n <div className={labelContainerClasses} ref={refObject}>\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__label']}>\n {hasExpander ? (\n <h1 className={styles['service-message__title']} id={id}>\n <button type=\"button\" className={styles['service-message__toggle']} onClick={onExpand} aria-expanded={isExpanded}>\n {elementHeader}\n </button>\n </h1>\n ) : (\n <h1 className={styles['service-message__title']} id={id}>\n {elementHeader}\n </h1>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface ContentProps {\n info?: string;\n extraInfo?: string;\n urlTitle?: string;\n url?: string;\n target?: AnchorLinkTargets;\n dismissable: boolean;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Content: React.FC<ContentProps> = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnText, onDismiss }) => {\n const { refObject: readMoreRef, isHovered: readMoreHoverRefIsHovered } = usePseudoClasses<HTMLAnchorElement>();\n const { refObject: closeButtonRef, isHovered: closeButtonIsHovered } = usePseudoClasses<HTMLButtonElement>();\n\n const hasUrl = url && urlTitle;\n\n return (\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__content']}>\n {info && <p className={styles['service-message__info']}>{info}</p>}\n {extraInfo && (\n <p className={classNames(styles['service-message__info'], styles['service-message__info--extra'])}>{extraInfo}</p>\n )}\n <div className={styles['service-message__actions']}>\n {hasUrl && (\n <a className={styles['service-message__action']} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button\n ref={closeButtonRef}\n className={classNames(styles['service-message__action'], styles['service-message__action--close'])}\n aria-label={closeBtnText}\n onClick={onDismiss}\n >\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={closeButtonIsHovered} />\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport type ServiceMessageRoles = 'alert' | 'region' | 'auto' | 'none';\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expanded */\n info?: string;\n /** String displayed in service-message when expanded, with a smaller font */\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the role of the service message - default: auto, will decide based on variant */\n messageRole?: ServiceMessageRoles;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n expanderOpenFromStart = false,\n variant = 'error',\n messageRole = 'auto',\n testId,\n}) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const labelId = useId();\n const hasExpander = !!info || !!extraInfo;\n\n const autoRole = variant === 'error' ? 'alert' : 'region';\n const ariaRole = messageRole === 'auto' ? autoRole : messageRole === 'none' ? undefined : messageRole;\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: labelId });\n\n const handleClick = (): void => {\n if (hasExpander) setIsExpanded(!isExpanded);\n };\n\n const classes = classNames(styles['service-message'], styles[`service-message--${variant}`]);\n\n return (\n <div className={classes} role={ariaRole} {...ariaLabelAttributes} data-testid={testId}>\n <Label\n label={label}\n variant={variant}\n id={labelId}\n hasExpander={hasExpander}\n isExpanded={isExpanded}\n dismissable={dismissable}\n onExpand={handleClick}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n {hasExpander && isExpanded && (\n <Content\n info={info}\n extraInfo={extraInfo}\n urlTitle={urlTitle}\n url={url}\n target={target}\n dismissable={dismissable}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n )}\n </div>\n );\n};\n\nexport default ServiceMessage;\n","import ServiceMessage from './ServiceMessage';\nexport * from './ServiceMessage';\nexport default ServiceMessage;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,IAAMA,SAA+B,EAAE,OAAO,SAAS,IAAI,aAAa,YAAY,aAAa,UAAU,WAAW,mBAAmB;CACvI,MAAM,aAAa,eAAe;CAClC,MAAM,EAAE,WAAW,cAAc,kBAAkC;CAEnE,MAAM,WAAW,aAAa,YAAY,KAAK,SAAS,SAAS,SAAS;CAC1E,MAAM,wBAAwB,WAC5B,OAAO,qCACP,OAAO,qCAAqC,YAC5C,eAAe,OAAO,kDACvB;CAED,MAAM,gBAAgB,oBAAoB,OAAO;EAC/C,iBAAiB;EACjB;EACA,MAAM;EACN,YAAY;EACZ,aAAa,cAAe,aAAa,oBAAY,sBAAe,KAAA;EACpE,MAAM,oBAAC,2BAAA;GAA2B;GAAS,MAAM;GAAU,WAAW,eAAe;IAAa;EAClG,aACE,CAAC,eAAe,cACd,oBAAC,eAAA;GAAM,SAAS;GAAW,WAAW;GAAc,WAAW,OAAO;IAA6B,GACjG,KAAA;EACP,CAAC;AAEF,QACE,oBAAC,OAAA;EAAI,WAAW;EAAuB,KAAK;YAC1C,oBAAC,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cAAA;SAAK,MAAM,SAAS;SAAQ,SAAS;SAAG,OAAO,SAAS,aAAa,IAAI;SAAE,WAAW;UAAwB,CAAA;SACxG,CAAA;QAEP;;MACF;KACF;IACF;GACF;;AAmCV,IAAMC,kBAAiD,EACrD,OACA,cAAc,MACd,WACA,MACA,WACA,UACA,KACA,SAAS,SACT,eAAe,iBACf,wBAAwB,OACxB,UAAU,SACV,cAAc,QACd,aACI;CACJ,MAAM,CAAC,YAAY,iBAAiB,SAAkB,sBAAsB;CAE5E,MAAM,UAAU,OAAO;CACvB,MAAM,cAAc,CAAC,CAAC,QAAQ,CAAC,CAAC;CAGhC,MAAM,WAAW,gBAAgB,SADhB,YAAY,UAAU,UAAU,WACI,gBAAgB,SAAS,KAAA,IAAY;CAC1F,MAAM,sBAAsB,uBAAuB;EAAE;EAAO,IAAI;EAAS,CAAC;CAE1E,MAAM,oBAA0B;AAC9B,MAAI,YAAa,eAAc,CAAC,WAAW;;AAK7C,QACE,qBAAC,OAAA;EAAI,WAHS,WAAW,OAAO,oBAAoB,OAAO,oBAAoB,WAAW;EAGjE,MAAM;EAAU,GAAI;EAAqB,eAAa;aAC7E,oBAAC,OAAA;GACQ;GACE;GACT,IAAI;GACS;GACD;GACC;GACb,UAAU;GACC;GACG;IACd,EACD,eAAe,cACd,oBAAC,SAAA;GACO;GACK;GACD;GACL;GACG;GACK;GACF;GACG;IACd,CAAA;GAEA;;AC7NV,IAAA,yBDiOe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/ServiceMessage/ServiceMessage.tsx","../../../src/components/ServiceMessage/index.ts"],"sourcesContent":["import { useId, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { AnchorLinkTargets } from '../AnchorLink';\nimport type { NotificationPanelVariants } from '../NotificationPanel';\n\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys';\nimport { breakpoints } from '../../theme/grid';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport NotificationBadge from '../Badge/NotificationBadge';\nimport Close from '../Close';\nimport { renderElementHeader } from '../ElementHeader/utils';\nimport Icon, { IconSize } from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport Forward from '../Icons/Forward';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\ninterface LabelProps {\n label: string;\n variant: NotificationPanelVariants;\n id: string;\n hasExpander: boolean;\n isExpanded: boolean;\n dismissable: boolean;\n onExpand: () => void;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Label: React.FC<LabelProps> = ({ label, variant, id, hasExpander, isExpanded, dismissable, onExpand, onDismiss, closeBtnText }) => {\n const breakpoint = useBreakpoint();\n const { isHovered, refObject } = usePseudoClasses<HTMLDivElement>();\n\n const iconSize = breakpoint < breakpoints.lg ? IconSize.XSmall : IconSize.Small;\n const labelContainerClasses = classNames(\n styles['service-message__label-container'],\n styles[`service-message__label-container--${variant}`],\n hasExpander && styles[`service-message__label-container--has-expander`]\n );\n\n const elementHeader = renderElementHeader(label, {\n titleHtmlMarkup: 'span',\n isHovered,\n size: 'compact',\n parentType: 'expanderlist',\n chevronIcon: hasExpander ? (isExpanded ? ChevronUp : ChevronDown) : undefined,\n icon: <NotificationBadge variant={variant} size={iconSize} isHovered={hasExpander && isHovered} />,\n closeButton:\n !hasExpander && dismissable ? (\n <Close onClick={onDismiss} ariaLabel={closeBtnText} className={styles['service-message__close']} />\n ) : undefined,\n });\n\n return (\n <div className={labelContainerClasses} ref={refObject}>\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__label']}>\n {hasExpander ? (\n <h1 className={styles['service-message__title']} id={id}>\n <button type=\"button\" className={styles['service-message__toggle']} onClick={onExpand} aria-expanded={isExpanded}>\n {elementHeader}\n </button>\n </h1>\n ) : (\n <h1 className={styles['service-message__title']} id={id}>\n {elementHeader}\n </h1>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\ninterface ContentProps {\n info?: string;\n extraInfo?: string;\n urlTitle?: string;\n url?: string;\n target?: AnchorLinkTargets;\n dismissable: boolean;\n onDismiss?: () => void;\n closeBtnText?: string;\n}\n\nconst Content: React.FC<ContentProps> = ({ info, extraInfo, urlTitle, url, target, dismissable, closeBtnText, onDismiss }) => {\n const { refObject: readMoreRef, isHovered: readMoreHoverRefIsHovered } = usePseudoClasses<HTMLAnchorElement>();\n const { refObject: closeButtonRef, isHovered: closeButtonIsHovered } = usePseudoClasses<HTMLButtonElement>();\n\n const hasUrl = url && urlTitle;\n\n return (\n <div className={styles['service-message__container']}>\n <div className={styles['service-message__row']}>\n <div className={styles['service-message__col']}>\n <div className={styles['service-message__content']}>\n {info && <p className={styles['service-message__info']}>{info}</p>}\n {extraInfo && (\n <p className={classNames(styles['service-message__info'], styles['service-message__info--extra'])}>{extraInfo}</p>\n )}\n <div className={styles['service-message__actions']}>\n {hasUrl && (\n <a className={styles['service-message__action']} href={url} ref={readMoreRef} target={target}>\n {urlTitle}\n <Icon size={IconSize.XSmall} svgIcon={Forward} color={getColor('blueberry', 700)} isHovered={readMoreHoverRefIsHovered} />\n </a>\n )}\n\n {dismissable && (\n <button\n ref={closeButtonRef}\n className={classNames(styles['service-message__action'], styles['service-message__action--close'])}\n aria-label={closeBtnText}\n onClick={onDismiss}\n >\n {closeBtnText}\n <Icon size={IconSize.XSmall} svgIcon={X} color={getColor('blueberry', 700)} isHovered={closeButtonIsHovered} />\n </button>\n )}\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nexport type ServiceMessageRoles = 'alert' | 'region' | 'auto' | 'none';\n\nexport interface ServiceMessageProps {\n /** Sets a label for the notification panel. */\n label: string;\n /** String displayed in service-message when expanded */\n info?: string;\n /** String displayed in service-message when expanded, with a smaller font */\n extraInfo?: string;\n /** function that runs on dismiss */\n onDismiss?: () => void;\n /** Allows for dismiss to be an option, also for ServiceMessage with only label as content */\n dismissable?: boolean;\n /** Makes expander be open from start. */\n expanderOpenFromStart?: boolean;\n /** Name that describes a url-link for the user*/\n urlTitle?: string;\n /** Url for further information*/\n url?: string;\n /** Sets target for the anchorlink to the url*/\n target?: AnchorLinkTargets;\n /** Text on close-button in service messages. */\n closeBtnText?: string;\n /** Changes the visual representation. */\n variant?: NotificationPanelVariants;\n /** Sets the role of the service message - default: auto, will decide based on variant */\n messageRole?: ServiceMessageRoles;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst ServiceMessage: React.FC<ServiceMessageProps> = ({\n label,\n dismissable = true,\n onDismiss,\n info,\n extraInfo,\n urlTitle,\n url,\n target = '_self',\n closeBtnText = 'fjern melding',\n expanderOpenFromStart = false,\n variant = 'error',\n messageRole = 'auto',\n testId,\n}) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanderOpenFromStart);\n\n const labelId = useId();\n const hasExpander = !!info || !!extraInfo;\n\n const autoRole = variant === 'error' ? 'alert' : 'region';\n const ariaRole = messageRole === 'auto' ? autoRole : messageRole === 'none' ? undefined : messageRole;\n const ariaLabelAttributes = getAriaLabelAttributes({ label, id: labelId });\n\n const handleClick = (): void => {\n if (hasExpander) setIsExpanded(!isExpanded);\n };\n\n const classes = classNames(styles['service-message'], styles[`service-message--${variant}`]);\n\n return (\n <div className={classes} role={ariaRole} {...ariaLabelAttributes} data-testid={testId}>\n <Label\n label={label}\n variant={variant}\n id={labelId}\n hasExpander={hasExpander}\n isExpanded={isExpanded}\n dismissable={dismissable}\n onExpand={handleClick}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n {hasExpander && isExpanded && (\n <Content\n info={info}\n extraInfo={extraInfo}\n urlTitle={urlTitle}\n url={url}\n target={target}\n dismissable={dismissable}\n onDismiss={onDismiss}\n closeBtnText={closeBtnText}\n />\n )}\n </div>\n );\n};\n\nexport default ServiceMessage;\n","import ServiceMessage from './ServiceMessage';\nexport * from './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ADhB,YAAY,UAAU,UAAU,WACI,gBAAgB,SAAS,KAAA,IAAY;CAC1F,MAAM,sBAAsB,uBAAuB;EAAE;EAAO,IAAI;EAAS,CAAC;CAE1E,MAAM,oBAA0B;EAC9B,IAAI,aAAa,cAAc,CAAC,WAAW;;CAK7C,OACE,qBAAC,OAAD;EAAK,WAHS,WAAW,OAAO,oBAAoB,OAAO,oBAAoB,WAG/D;EAAS,MAAM;EAAU,GAAI;EAAqB,eAAa;YAA/E,CACE,oBAAC,OAAD;GACS;GACE;GACT,IAAI;GACS;GACD;GACC;GACb,UAAU;GACC;GACG;GACd,CAAA,EACD,eAAe,cACd,oBAAC,SAAD;GACQ;GACK;GACD;GACL;GACG;GACK;GACF;GACG;GACd,CAAA,CAEA;;;;;AC7NV,IAAA,yBAAe"}
|
|
@@ -1,9 +1,10 @@
|
|
|
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
4
|
import classNames from "classnames";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import styles from "./styles.module.scss";
|
|
7
|
+
//#region src/components/SharingStatus/SharingStatus.tsx
|
|
7
8
|
var SharingStatus = (props) => {
|
|
8
9
|
const { color = "neutral", icon, children, className, testId, wrapText } = props;
|
|
9
10
|
const sharingStatusClasses = classNames(styles["sharing-status"], className);
|
|
@@ -26,7 +27,10 @@ var SharingStatus = (props) => {
|
|
|
26
27
|
})]
|
|
27
28
|
});
|
|
28
29
|
};
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/SharingStatus/index.ts
|
|
29
32
|
var SharingStatus_default = SharingStatus;
|
|
33
|
+
//#endregion
|
|
30
34
|
export { SharingStatus_default as default };
|
|
31
35
|
|
|
32
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/SharingStatus/SharingStatus.tsx","../../../src/components/SharingStatus/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { PaletteNames } from '../../theme/palette';\nimport type { SvgIcon } from '../Icon';\n\nimport { AnalyticsId, IconSize } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon from '../Icon';\n\nimport styles from './styles.module.scss';\n\nexport type SharingStatusColor = Extract<PaletteNames, 'kiwi' | 'cherry' | 'neutral'>;\n\nexport interface SharingStatusProps {\n /** Color choices represent variants of sharingstatus */\n color?: SharingStatusColor;\n /** Adds custom classes to the element. */\n className?: string;\n /** Icon to be displayed next to the sharingstatus */\n icon: SvgIcon;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the text placed to the right of the sharingstatus */\n children: string;\n /** turn on and off word wrapping */\n wrapText?: boolean;\n}\n\nconst SharingStatus: React.FC<SharingStatusProps> = props => {\n const { color = 'neutral', icon, children, className, testId, wrapText } = props;\n\n const sharingStatusClasses = classNames(styles['sharing-status'], className);\n const dotClasses = classNames(styles['sharing-status__dot'], styles[`sharing-status__dot--${color}`]);\n const labelClasses = classNames(styles['sharing-status__label'], styles[`sharing-status__label--${color}`], {\n [styles['sharing-status__label--wrap']]: wrapText,\n });\n\n return (\n <span className={sharingStatusClasses} data-testid={testId} data-analyticsid={AnalyticsId.SharingStatus}>\n <span className={dotClasses}>\n <Icon color={palette.white} svgIcon={icon} size={IconSize.XXSmall} />\n </span>\n <span className={labelClasses}>{children}</span>\n </span>\n );\n};\n\nexport default SharingStatus;\n","import SharingStatus from './SharingStatus';\nexport * from './SharingStatus';\nexport default SharingStatus;\n"],"mappings":";;;;;;;AA4BA,IAAM,iBAA8C,UAAS;CAC3D,MAAM,EAAE,QAAQ,WAAW,MAAM,UAAU,WAAW,QAAQ,aAAa;CAE3E,MAAM,uBAAuB,WAAW,OAAO,mBAAmB,UAAU;CAC5E,MAAM,aAAa,WAAW,OAAO,wBAAwB,OAAO,wBAAwB,SAAS;CACrG,MAAM,eAAe,WAAW,OAAO,0BAA0B,OAAO,0BAA0B,UAAU,GACzG,OAAO,iCAAiC,UAC1C,CAAC;CAEF,OACE,qBAAC,QAAD;EAAM,WAAW;EAAsB,eAAa;EAAQ,oBAAkB,YAAY;YAA1F,CACE,oBAAC,QAAD;GAAM,WAAW;aACf,oBAAC,cAAD;IAAM,OAAO,QAAQ;IAAO,SAAS;IAAM,MAAM,SAAS;IAAW,CAAA;GAChE,CAAA,EACP,oBAAC,QAAD;GAAM,WAAW;GAAe;GAAgB,CAAA,CAC3C;;;;;ACzCX,IAAA,wBAAe"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AnalyticsId } from "../../constants.js";
|
|
2
2
|
import { t as StepButtons_default } from "../../StepButtons.js";
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import styles from "./styles.module.scss";
|
|
6
|
+
//#region src/components/Step/Step.tsx
|
|
6
7
|
var Step = ({ stepper, children, className, contentClassName, backButton, forwardButton, additionalButtons, cancelButton, stickyButtons = false, testId }) => {
|
|
7
8
|
const hasNavigation = backButton || forwardButton || additionalButtons || cancelButton;
|
|
8
9
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -28,7 +29,10 @@ var Step = ({ stepper, children, className, contentClassName, backButton, forwar
|
|
|
28
29
|
]
|
|
29
30
|
});
|
|
30
31
|
};
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region src/components/Step/index.ts
|
|
31
34
|
var Step_default = Step;
|
|
35
|
+
//#endregion
|
|
32
36
|
export { Step_default as default };
|
|
33
37
|
|
|
34
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Step/Step.tsx","../../../src/components/Step/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { ButtonProps } from '../Button';\nimport type { StepperProps } from '../Stepper';\n\nimport { AnalyticsId } from '../../constants';\nimport StepButtons from '../StepButtons';\n\nimport styles from './styles.module.scss';\n\nexport interface StepProps {\n /** Stepper viser fremdriften */\n stepper?: React.ReactElement<StepperProps>;\n /** Innhold i steget */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the content element. */\n contentClassName?: string;\n /** Knapp for å gå tilbake. Vises med \"outline\" variant. */\n backButton?: React.ReactElement<ButtonProps>;\n /** Knapp for å gå videre. Vises med \"fill\" variant. */\n forwardButton?: React.ReactElement<ButtonProps>;\n /** Ekstra knapper. Valgfritt utseende. */\n additionalButtons?: React.ReactElement<ButtonProps>[];\n /** Knapp for å avbryte eller fortsette senere. Vises med \"borderless\" variant. */\n cancelButton?: React.ReactElement<ButtonProps>;\n /** Knappene vil vises sticky nederst på skjermen dersom innholdet i Step tar mer plass enn vinduet. Default: false */\n stickyButtons?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Step: React.FC<StepProps> = ({\n stepper,\n children,\n className,\n contentClassName,\n backButton,\n forwardButton,\n additionalButtons,\n cancelButton,\n stickyButtons = false,\n testId,\n}) => {\n const hasNavigation = backButton || forwardButton || additionalButtons || cancelButton;\n\n return (\n <div data-testid={testId} data-analyticsid={AnalyticsId.Step} className={className}>\n {stepper && <div className={styles.step__stepper}>{stepper}</div>}\n <div className={classNames(styles.step__content, contentClassName)}>{children}</div>\n {hasNavigation && (\n <StepButtons\n backButton={backButton}\n forwardButton={forwardButton}\n additionalButtons={additionalButtons}\n cancelButton={cancelButton}\n sticky={stickyButtons}\n />\n )}\n </div>\n );\n};\n\nexport default Step;\n","import Step from './Step';\nexport * from './Step';\nexport default Step;\n"],"mappings":";;;;;;AAiCA,IAAM,QAA6B,EACjC,SACA,UACA,WACA,kBACA,YACA,eACA,mBACA,cACA,gBAAgB,OAChB,aACI;CACJ,MAAM,gBAAgB,cAAc,iBAAiB,qBAAqB;CAE1E,OACE,qBAAC,OAAD;EAAK,eAAa;EAAQ,oBAAkB,YAAY;EAAiB;YAAzE;GACG,WAAW,oBAAC,OAAD;IAAK,WAAW,OAAO;cAAgB;IAAc,CAAA;GACjE,oBAAC,OAAD;IAAK,WAAW,WAAW,OAAO,eAAe,iBAAiB;IAAG;IAAe,CAAA;GACnF,iBACC,oBAAC,qBAAD;IACc;IACG;IACI;IACL;IACd,QAAQ;IACR,CAAA;GAEA;;;;;AC1DV,IAAA,eAAe"}
|
|
@@ -1,24 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { AnalyticsId } from "../../constants.js";
|
|
2
|
+
import { getAriaLabelAttributes } from "../../utils/accessibility.js";
|
|
3
|
+
import { useSize } from "../../hooks/useSize.js";
|
|
4
4
|
import classNames from "classnames";
|
|
5
5
|
import { useRef } from "react";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import styles from "./styles.module.scss";
|
|
8
|
+
//#region src/components/Stepper/utils.ts
|
|
9
|
+
/**
|
|
10
|
+
* Minimum avstand fra markør til prikk
|
|
11
|
+
*/
|
|
8
12
|
var MARKER_DOT_MIN_DISTANCE_PX = 4;
|
|
13
|
+
/**
|
|
14
|
+
* Bredde på markør
|
|
15
|
+
*/
|
|
9
16
|
var MARKER_WIDTH_PX = 24;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
17
|
+
/**
|
|
18
|
+
* Horisontal padding på stepper
|
|
19
|
+
*/
|
|
20
|
+
var STEPPER_PADDING_X_PX = 8;
|
|
21
|
+
/**
|
|
22
|
+
* Valider at minimum-verdi er innenfor gyldig område
|
|
23
|
+
* @param min Mimimum-verdi
|
|
24
|
+
* @param max Maksimum-verdi
|
|
25
|
+
* @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi
|
|
26
|
+
*/
|
|
27
|
+
var getValidatedMin = (min, max) => min < max ? min : max - 1;
|
|
28
|
+
/**
|
|
29
|
+
* Valider at maksimum-verdi er innenfor gyldig område
|
|
30
|
+
* @param min Mimimum-verdi
|
|
31
|
+
* @param max Maksimum-verdi
|
|
32
|
+
* @returns Maksimum-verdi, ikke mindre enn minimum-verdi
|
|
33
|
+
*/
|
|
34
|
+
var getValidatedMax = (min, max) => max < min ? min : max;
|
|
35
|
+
/**
|
|
36
|
+
* Valider at verdi er innenfor gyldig område
|
|
37
|
+
* @param value Nåværende verdi
|
|
38
|
+
* @param min Mimimum-verdi
|
|
39
|
+
* @param max Maksimum-verdi
|
|
40
|
+
* @returns Verdi, ikke mindre enn 0, ikke mer enn max
|
|
41
|
+
*/
|
|
42
|
+
var getValidatedValue = (value, min, max) => {
|
|
14
43
|
if (typeof value === "undefined" || value < min) return min;
|
|
15
44
|
return value > max ? max : value;
|
|
16
45
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
46
|
+
/**
|
|
47
|
+
* Finn antall prikker det er plass til
|
|
48
|
+
* @param stepperWidth Bredde på stepper
|
|
49
|
+
* @returns Antall prikker
|
|
50
|
+
*/
|
|
51
|
+
var getMaximumDots = (stepperWidth) => Math.floor(stepperWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));
|
|
52
|
+
/**
|
|
53
|
+
* Beregn riktig distance mellom prikker
|
|
54
|
+
* @param stepperWidth Bredde på stepper
|
|
55
|
+
* @param dots Antall prikker som skal vises
|
|
56
|
+
* @returns Distanse mellom prikker
|
|
57
|
+
*/
|
|
58
|
+
var getDistanceBetweenDots = (stepperWidth, dots) => (stepperWidth - MARKER_WIDTH_PX) / (dots - 1);
|
|
59
|
+
/**
|
|
60
|
+
* Beregn riktig plassering av markør
|
|
61
|
+
* @param distanceBetweenDots Distanse mellom prikker
|
|
62
|
+
* @param index Nåværende verdi i stepper
|
|
63
|
+
* @returns Plassering til markør fra venstre
|
|
64
|
+
*/
|
|
65
|
+
var getMarkerPosition = (distanceBetweenDots, index) => distanceBetweenDots * index;
|
|
66
|
+
/**
|
|
67
|
+
* Lag liste med tillate verdier fra min til maks
|
|
68
|
+
* @param min Mimimum-verdi
|
|
69
|
+
* @param max Maksimum-verdi
|
|
70
|
+
* @returns Liste med verdier
|
|
71
|
+
*/
|
|
72
|
+
var getAllowedValues = (min, max) => Array.from(Array(max - min + 1), (_, index) => index + min);
|
|
73
|
+
/**
|
|
74
|
+
* Valider props som skal brukes til beregning av posisjon m.m.
|
|
75
|
+
* @param value Nåværende verdi
|
|
76
|
+
* @param min Mimimum-verdi
|
|
77
|
+
* @param max Maksimum-verdi
|
|
78
|
+
* @returns Objekt med gyldige verdier
|
|
79
|
+
*/
|
|
80
|
+
var getValidatedProps = (value, min, max) => {
|
|
22
81
|
const validatedMin = getValidatedMin(min, max);
|
|
23
82
|
const validatedMax = getValidatedMax(validatedMin, max);
|
|
24
83
|
return {
|
|
@@ -27,6 +86,8 @@ const getValidatedProps = (value, min, max) => {
|
|
|
27
86
|
validatedMax
|
|
28
87
|
};
|
|
29
88
|
};
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region src/components/Stepper/Dot.tsx
|
|
30
91
|
var Dot = ({ index, completed, distanceBetweenDots, position }) => {
|
|
31
92
|
return /* @__PURE__ */ jsx("span", {
|
|
32
93
|
className: classNames(styles.stepper__dot, completed && styles["stepper__dot--completed"], position && styles[`stepper__dot--${position}`]),
|
|
@@ -34,13 +95,15 @@ var Dot = ({ index, completed, distanceBetweenDots, position }) => {
|
|
|
34
95
|
"data-testid": "dot"
|
|
35
96
|
});
|
|
36
97
|
};
|
|
37
|
-
|
|
38
|
-
|
|
98
|
+
//#endregion
|
|
99
|
+
//#region src/components/Stepper/DotList.tsx
|
|
100
|
+
var Dots = ({ allowedValues, currentValue, distanceBetweenDots }) => /* @__PURE__ */ jsx(Fragment, { children: allowedValues.map((value, index) => /* @__PURE__ */ jsx(Dot, {
|
|
39
101
|
index,
|
|
40
102
|
completed: value < currentValue,
|
|
41
103
|
distanceBetweenDots
|
|
42
104
|
}, value)) });
|
|
43
|
-
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/components/Stepper/Stepper.tsx
|
|
44
107
|
var Stepper = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {
|
|
45
108
|
const wrapperRef = useRef(null);
|
|
46
109
|
const ref = useRef(null);
|
|
@@ -73,15 +136,15 @@ var Stepper = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId })
|
|
|
73
136
|
"data-testid": testId,
|
|
74
137
|
"data-analyticsid": AnalyticsId.Stepper,
|
|
75
138
|
children: [
|
|
76
|
-
showAllDots && /* @__PURE__ */ jsx(
|
|
139
|
+
showAllDots && /* @__PURE__ */ jsx(Dots, {
|
|
77
140
|
allowedValues,
|
|
78
141
|
currentValue: validatedValue,
|
|
79
142
|
distanceBetweenDots
|
|
80
143
|
}),
|
|
81
|
-
!showAllDots && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(
|
|
144
|
+
!showAllDots && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Dot, {
|
|
82
145
|
completed: validatedValue > validatedMin,
|
|
83
146
|
position: "left"
|
|
84
|
-
}), /* @__PURE__ */ jsx(
|
|
147
|
+
}), /* @__PURE__ */ jsx(Dot, {
|
|
85
148
|
completed: validatedValue === validatedMax,
|
|
86
149
|
position: "right"
|
|
87
150
|
})] }),
|
|
@@ -96,7 +159,10 @@ var Stepper = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId })
|
|
|
96
159
|
})]
|
|
97
160
|
});
|
|
98
161
|
};
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/components/Stepper/index.ts
|
|
99
164
|
var Stepper_default = Stepper;
|
|
165
|
+
//#endregion
|
|
100
166
|
export { STEPPER_PADDING_X_PX, Stepper_default as default, getAllowedValues, getDistanceBetweenDots, getMarkerPosition, getMaximumDots, getValidatedMax, getValidatedMin, getValidatedProps, getValidatedValue };
|
|
101
167
|
|
|
102
168
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Dot: React.FC<DotProps>","style: React.HTMLAttributes<HTMLSpanElement>['style']","Dots: React.FC<DotListProps>","Stepper: React.FC<StepperProps>"],"sources":["../../../src/components/Stepper/utils.ts","../../../src/components/Stepper/Dot.tsx","../../../src/components/Stepper/DotList.tsx","../../../src/components/Stepper/Stepper.tsx","../../../src/components/Stepper/index.ts"],"sourcesContent":["/**\n * Minimum avstand fra markør til prikk\n */\nconst MARKER_DOT_MIN_DISTANCE_PX = 4;\n\n/**\n * Bredde på markør\n */\nconst MARKER_WIDTH_PX = 24;\n\n/**\n * Horisontal padding på stepper\n */\nexport const STEPPER_PADDING_X_PX = 8;\n\n/**\n * Valider at minimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi\n */\nexport const getValidatedMin = (min: number, max: number): number => (min < max ? min : max - 1);\n\n/**\n * Valider at maksimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Maksimum-verdi, ikke mindre enn minimum-verdi\n */\nexport const getValidatedMax = (min: number, max: number): number => (max < min ? min : max);\n\n/**\n * Valider at verdi er innenfor gyldig område\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Verdi, ikke mindre enn 0, ikke mer enn max\n */\nexport const getValidatedValue = (value: number | undefined, min: number, max: number): number => {\n if (typeof value === 'undefined' || value < min) {\n return min;\n }\n\n return value > max ? max : value;\n};\n\n/**\n * Finn antall prikker det er plass til\n * @param stepperWidth Bredde på stepper\n * @returns Antall prikker\n */\nexport const getMaximumDots = (stepperWidth: number): number => Math.floor(stepperWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));\n\n/**\n * Beregn riktig distance mellom prikker\n * @param stepperWidth Bredde på stepper\n * @param dots Antall prikker som skal vises\n * @returns Distanse mellom prikker\n */\nexport const getDistanceBetweenDots = (stepperWidth: number, dots: number): number => (stepperWidth - MARKER_WIDTH_PX) / (dots - 1);\n\n/**\n * Beregn riktig plassering av markør\n * @param distanceBetweenDots Distanse mellom prikker\n * @param index Nåværende verdi i stepper\n * @returns Plassering til markør fra venstre\n */\nexport const getMarkerPosition = (distanceBetweenDots: number, index: number): number => distanceBetweenDots * index;\n\n/**\n * Lag liste med tillate verdier fra min til maks\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Liste med verdier\n */\nexport const getAllowedValues = (min: number, max: number): number[] => Array.from(Array(max - min + 1), (_, index) => index + min);\n\n/**\n * Valider props som skal brukes til beregning av posisjon m.m.\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Objekt med gyldige verdier\n */\nexport const getValidatedProps = (\n value: number | undefined,\n min: number,\n max: number\n): { validatedValue: number; validatedMin: number; validatedMax: number } => {\n const validatedMin = getValidatedMin(min, max);\n const validatedMax = getValidatedMax(validatedMin, max);\n const validatedValue = getValidatedValue(value, validatedMin, validatedMax);\n\n return { validatedValue, validatedMin, validatedMax };\n};\n","import classNames from 'classnames';\n\nimport { STEPPER_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.stepper__dot,\n completed && styles['stepper__dot--completed'],\n position && styles[`stepper__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + STEPPER_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n","import Dot from './Dot';\n\ninterface DotListProps {\n allowedValues: number[];\n currentValue: number;\n distanceBetweenDots: number;\n}\n\nconst Dots: React.FC<DotListProps> = ({ allowedValues, currentValue, distanceBetweenDots }) => (\n <>\n {allowedValues.map((value, index) => (\n <Dot index={index} key={value} completed={value < currentValue} distanceBetweenDots={distanceBetweenDots} />\n ))}\n </>\n);\n\nexport default Dots;\n","import { useRef } from 'react';\n\nimport Dot from './Dot';\nimport DotList from './DotList';\nimport { getMaximumDots, getDistanceBetweenDots, getMarkerPosition, getAllowedValues, getValidatedProps } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StepperProps {\n /**\n * Sets aria-label of the stepper. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the stepper. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Current value. Must be between min and max\n */\n value?: number;\n /**\n * Minimum value\n */\n min?: number;\n /**\n * Maximum value\n */\n max?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Stepper: React.FC<StepperProps> = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const ref = useRef<HTMLSpanElement>(null);\n const { width: wrapperWidth = 0 } = useSize(wrapperRef) || {};\n const { width: stepperWidth = 0 } = useSize(ref) || {};\n\n const { validatedValue, validatedMin, validatedMax } = getValidatedProps(value, min, max);\n const allowedValues = getAllowedValues(validatedMin, validatedMax);\n const index = allowedValues.indexOf(validatedValue);\n const maximumDots = getMaximumDots(wrapperWidth);\n const distanceBetweenDots = getDistanceBetweenDots(stepperWidth, allowedValues.length);\n const markerPosition = getMarkerPosition(distanceBetweenDots, index);\n\n const showAllDots = allowedValues.length <= maximumDots;\n const isCompleted = validatedValue === validatedMax;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n return (\n <div className={styles['stepper-wrapper']} ref={wrapperRef}>\n <span\n role=\"progressbar\"\n {...ariaLabelAttributes}\n aria-valuenow={validatedValue}\n aria-valuemin={validatedMin}\n aria-valuemax={validatedMax}\n className={styles.stepper}\n style={{\n backgroundPositionX: `${isCompleted ? stepperWidth : markerPosition}px`,\n }}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Stepper}\n >\n {showAllDots && <DotList allowedValues={allowedValues} currentValue={validatedValue} distanceBetweenDots={distanceBetweenDots} />}\n {!showAllDots && (\n <>\n <Dot completed={validatedValue > validatedMin} position=\"left\" />\n <Dot completed={validatedValue === validatedMax} position=\"right\" />\n </>\n )}\n <span className={styles.stepper__marker} style={{ left: `${markerPosition}px` }} />\n </span>\n {!showAllDots && <span className={styles.stepper__number}>{`${validatedValue}/${validatedMax}`}</span>}\n </div>\n );\n};\n\nexport default Stepper;\n","import Stepper from './Stepper';\nexport * from './Stepper';\nexport * from './utils';\nexport default Stepper;\n"],"mappings":";;;;;;;AAGA,IAAM,6BAA6B;AAKnC,IAAM,kBAAkB;AAKxB,MAAa,uBAAuB;AAQpC,MAAa,mBAAmB,KAAa,QAAyB,MAAM,MAAM,MAAM,MAAM;AAQ9F,MAAa,mBAAmB,KAAa,QAAyB,MAAM,MAAM,MAAM;AASxF,MAAa,qBAAqB,OAA2B,KAAa,QAAwB;AAChG,KAAI,OAAO,UAAU,eAAe,QAAQ,IAC1C,QAAO;AAGT,QAAO,QAAQ,MAAM,MAAM;;AAQ7B,MAAa,kBAAkB,iBAAiC,KAAK,MAAM,gBAAgB,kBAAkB,4BAA4B;AAQzI,MAAa,0BAA0B,cAAsB,UAA0B,eAAe,oBAAoB,OAAO;AAQjI,MAAa,qBAAqB,qBAA6B,UAA0B,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,cAAc,eAAe,aAAa;CAChD,MAAM,sBAAsB,uBAAuB,cAAc,cAAc,OAAO;CACtF,MAAM,iBAAiB,kBAAkB,qBAAqB,MAAM;CAEpE,MAAM,cAAc,cAAc,UAAU;CAC5C,MAAM,cAAc,mBAAmB;CAEvC,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;EAAkB,CAAC;AAE9F,QACE,qBAAC,OAAA;EAAI,WAAW,OAAO;EAAoB,KAAK;aAC9C,qBAAC,QAAA;GACC,MAAK;GACL,GAAI;GACJ,iBAAe;GACf,iBAAe;GACf,iBAAe;GACf,WAAW,OAAO;GAClB,OAAO,EACL,qBAAqB,GAAG,cAAc,eAAe,eAAe,KACrE;GACI;GACL,eAAa;GACb,oBAAkB,YAAY;;IAE7B,eAAe,oBAAC,iBAAA;KAAuB;KAAe,cAAc;KAAqC;MAAuB;IAChI,CAAC,eACA,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,aAAA;KAAI,WAAW,iBAAiB;KAAc,UAAS;MAAS,EACjE,oBAAC,aAAA;KAAI,WAAW,mBAAmB;KAAc,UAAS;MAAU,CAAA,EAAA,CACnE;IAEL,oBAAC,QAAA;KAAK,WAAW,OAAO;KAAiB,OAAO,EAAE,MAAM,GAAG,eAAe,KAAK;MAAI;;IAC9E,EACN,CAAC,eAAe,oBAAC,QAAA;GAAK,WAAW,OAAO;aAAkB,GAAG,eAAe,GAAG;IAAsB,CAAA;GAClG;;AC7EV,IAAA,kBDiFe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/Stepper/utils.ts","../../../src/components/Stepper/Dot.tsx","../../../src/components/Stepper/DotList.tsx","../../../src/components/Stepper/Stepper.tsx","../../../src/components/Stepper/index.ts"],"sourcesContent":["/**\n * Minimum avstand fra markør til prikk\n */\nconst MARKER_DOT_MIN_DISTANCE_PX = 4;\n\n/**\n * Bredde på markør\n */\nconst MARKER_WIDTH_PX = 24;\n\n/**\n * Horisontal padding på stepper\n */\nexport const STEPPER_PADDING_X_PX = 8;\n\n/**\n * Valider at minimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Mimimum-verdi, ikke større enn eller lik maksimum-verdi\n */\nexport const getValidatedMin = (min: number, max: number): number => (min < max ? min : max - 1);\n\n/**\n * Valider at maksimum-verdi er innenfor gyldig område\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Maksimum-verdi, ikke mindre enn minimum-verdi\n */\nexport const getValidatedMax = (min: number, max: number): number => (max < min ? min : max);\n\n/**\n * Valider at verdi er innenfor gyldig område\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Verdi, ikke mindre enn 0, ikke mer enn max\n */\nexport const getValidatedValue = (value: number | undefined, min: number, max: number): number => {\n if (typeof value === 'undefined' || value < min) {\n return min;\n }\n\n return value > max ? max : value;\n};\n\n/**\n * Finn antall prikker det er plass til\n * @param stepperWidth Bredde på stepper\n * @returns Antall prikker\n */\nexport const getMaximumDots = (stepperWidth: number): number => Math.floor(stepperWidth / (MARKER_WIDTH_PX + MARKER_DOT_MIN_DISTANCE_PX));\n\n/**\n * Beregn riktig distance mellom prikker\n * @param stepperWidth Bredde på stepper\n * @param dots Antall prikker som skal vises\n * @returns Distanse mellom prikker\n */\nexport const getDistanceBetweenDots = (stepperWidth: number, dots: number): number => (stepperWidth - MARKER_WIDTH_PX) / (dots - 1);\n\n/**\n * Beregn riktig plassering av markør\n * @param distanceBetweenDots Distanse mellom prikker\n * @param index Nåværende verdi i stepper\n * @returns Plassering til markør fra venstre\n */\nexport const getMarkerPosition = (distanceBetweenDots: number, index: number): number => distanceBetweenDots * index;\n\n/**\n * Lag liste med tillate verdier fra min til maks\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Liste med verdier\n */\nexport const getAllowedValues = (min: number, max: number): number[] => Array.from(Array(max - min + 1), (_, index) => index + min);\n\n/**\n * Valider props som skal brukes til beregning av posisjon m.m.\n * @param value Nåværende verdi\n * @param min Mimimum-verdi\n * @param max Maksimum-verdi\n * @returns Objekt med gyldige verdier\n */\nexport const getValidatedProps = (\n value: number | undefined,\n min: number,\n max: number\n): { validatedValue: number; validatedMin: number; validatedMax: number } => {\n const validatedMin = getValidatedMin(min, max);\n const validatedMax = getValidatedMax(validatedMin, max);\n const validatedValue = getValidatedValue(value, validatedMin, validatedMax);\n\n return { validatedValue, validatedMin, validatedMax };\n};\n","import classNames from 'classnames';\n\nimport { STEPPER_PADDING_X_PX } from './utils';\n\nimport styles from './styles.module.scss';\n\ninterface DotProps {\n index?: number;\n completed: boolean;\n distanceBetweenDots?: number;\n position?: 'left' | 'right';\n}\n\nconst Dot: React.FC<DotProps> = ({ index, completed, distanceBetweenDots, position }) => {\n const classes = classNames(\n styles.stepper__dot,\n completed && styles['stepper__dot--completed'],\n position && styles[`stepper__dot--${position}`]\n );\n const positionWithStyle = !position && typeof index !== 'undefined' && typeof distanceBetweenDots !== 'undefined';\n const style: React.HTMLAttributes<HTMLSpanElement>['style'] = positionWithStyle\n ? { left: `${index * distanceBetweenDots + STEPPER_PADDING_X_PX}px` }\n : undefined;\n\n return <span className={classes} style={style} data-testid=\"dot\" />;\n};\n\nexport default Dot;\n","import Dot from './Dot';\n\ninterface DotListProps {\n allowedValues: number[];\n currentValue: number;\n distanceBetweenDots: number;\n}\n\nconst Dots: React.FC<DotListProps> = ({ allowedValues, currentValue, distanceBetweenDots }) => (\n <>\n {allowedValues.map((value, index) => (\n <Dot index={index} key={value} completed={value < currentValue} distanceBetweenDots={distanceBetweenDots} />\n ))}\n </>\n);\n\nexport default Dots;\n","import { useRef } from 'react';\n\nimport Dot from './Dot';\nimport DotList from './DotList';\nimport { getMaximumDots, getDistanceBetweenDots, getMarkerPosition, getAllowedValues, getValidatedProps } from './utils';\nimport { AnalyticsId } from '../../constants';\nimport { useSize } from '../../hooks/useSize';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StepperProps {\n /**\n * Sets aria-label of the stepper. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the stepper. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /**\n * Current value. Must be between min and max\n */\n value?: number;\n /**\n * Minimum value\n */\n min?: number;\n /**\n * Maximum value\n */\n max?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst Stepper: React.FC<StepperProps> = ({ ariaLabelledById, ariaLabel, value, min = 0, max = 2, testId }) => {\n const wrapperRef = useRef<HTMLDivElement>(null);\n const ref = useRef<HTMLSpanElement>(null);\n const { width: wrapperWidth = 0 } = useSize(wrapperRef) || {};\n const { width: stepperWidth = 0 } = useSize(ref) || {};\n\n const { validatedValue, validatedMin, validatedMax } = getValidatedProps(value, min, max);\n const allowedValues = getAllowedValues(validatedMin, validatedMax);\n const index = allowedValues.indexOf(validatedValue);\n const maximumDots = getMaximumDots(wrapperWidth);\n const distanceBetweenDots = getDistanceBetweenDots(stepperWidth, allowedValues.length);\n const markerPosition = getMarkerPosition(distanceBetweenDots, index);\n\n const showAllDots = allowedValues.length <= maximumDots;\n const isCompleted = validatedValue === validatedMax;\n\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n\n return (\n <div className={styles['stepper-wrapper']} ref={wrapperRef}>\n <span\n role=\"progressbar\"\n {...ariaLabelAttributes}\n aria-valuenow={validatedValue}\n aria-valuemin={validatedMin}\n aria-valuemax={validatedMax}\n className={styles.stepper}\n style={{\n backgroundPositionX: `${isCompleted ? stepperWidth : markerPosition}px`,\n }}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Stepper}\n >\n {showAllDots && <DotList allowedValues={allowedValues} currentValue={validatedValue} distanceBetweenDots={distanceBetweenDots} />}\n {!showAllDots && (\n <>\n <Dot completed={validatedValue > validatedMin} position=\"left\" />\n <Dot completed={validatedValue === validatedMax} position=\"right\" />\n </>\n )}\n <span className={styles.stepper__marker} style={{ left: `${markerPosition}px` }} />\n </span>\n {!showAllDots && <span className={styles.stepper__number}>{`${validatedValue}/${validatedMax}`}</span>}\n </div>\n );\n};\n\nexport default Stepper;\n","import Stepper from './Stepper';\nexport * from './Stepper';\nexport * from './utils';\nexport default Stepper;\n"],"mappings":";;;;;;;;;;;AAGA,IAAM,6BAA6B;;;;AAKnC,IAAM,kBAAkB;;;;AAKxB,IAAa,uBAAuB;;;;;;;AAQpC,IAAa,mBAAmB,KAAa,QAAyB,MAAM,MAAM,MAAM,MAAM;;;;;;;AAQ9F,IAAa,mBAAmB,KAAa,QAAyB,MAAM,MAAM,MAAM;;;;;;;;AASxF,IAAa,qBAAqB,OAA2B,KAAa,QAAwB;CAChG,IAAI,OAAO,UAAU,eAAe,QAAQ,KAC1C,OAAO;CAGT,OAAO,QAAQ,MAAM,MAAM;;;;;;;AAQ7B,IAAa,kBAAkB,iBAAiC,KAAK,MAAM,gBAAgB,kBAAkB,4BAA4B;;;;;;;AAQzI,IAAa,0BAA0B,cAAsB,UAA0B,eAAe,oBAAoB,OAAO;;;;;;;AAQjI,IAAa,qBAAqB,qBAA6B,UAA0B,sBAAsB;;;;;;;AAQ/G,IAAa,oBAAoB,KAAa,QAA0B,MAAM,KAAK,MAAM,MAAM,MAAM,EAAE,GAAG,GAAG,UAAU,QAAQ,IAAI;;;;;;;;AASnI,IAAa,qBACX,OACA,KACA,QAC2E;CAC3E,MAAM,eAAe,gBAAgB,KAAK,IAAI;CAC9C,MAAM,eAAe,gBAAgB,cAAc,IAAI;CAGvD,OAAO;EAAE,gBAFc,kBAAkB,OAAO,cAAc,aAErD;EAAgB;EAAc;EAAc;;;;AChFvD,IAAM,OAA2B,EAAE,OAAO,WAAW,qBAAqB,eAAe;CAWvF,OAAO,oBAAC,QAAD;EAAM,WAVG,WACd,OAAO,cACP,aAAa,OAAO,4BACpB,YAAY,OAAO,iBAAiB,YAOd;EAAgB,OAL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AZhC;IAcG,eAAe,oBAAC,MAAD;KAAwB;KAAe,cAAc;KAAqC;KAAuB,CAAA;IAChI,CAAC,eACA,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,KAAD;KAAK,WAAW,iBAAiB;KAAc,UAAS;KAAS,CAAA,EACjE,oBAAC,KAAD;KAAK,WAAW,mBAAmB;KAAc,UAAS;KAAU,CAAA,CACnE,EAAA,CAAA;IAEL,oBAAC,QAAD;KAAM,WAAW,OAAO;KAAiB,OAAO,EAAE,MAAM,GAAG,eAAe,KAAK;KAAI,CAAA;IAC9E;MACN,CAAC,eAAe,oBAAC,QAAD;GAAM,WAAW,OAAO;aAAkB,GAAG,eAAe,GAAG;GAAsB,CAAA,CAClG;;;;;AC7EV,IAAA,kBAAe"}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { usePseudoClasses } from "../../hooks/usePseudoClasses.js";
|
|
2
|
+
import { mergeRefs } from "../../utils/refs.js";
|
|
3
3
|
import { t as Icon_default } from "../../Icon.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
4
|
+
import { useIsMobileBreakpoint } from "../../hooks/useIsMobileBreakpoint.js";
|
|
5
|
+
import { useIdWithFallback } from "../../hooks/useIdWithFallback.js";
|
|
6
|
+
import { getAriaDescribedBy } from "../../utils/accessibility.js";
|
|
7
|
+
import X from "../Icons/X.js";
|
|
8
8
|
import classNames from "classnames";
|
|
9
9
|
import { useId, useLayoutEffect, useRef } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import styles from "./styles.module.scss";
|
|
12
|
+
//#region src/components/StickyNote/Close.tsx
|
|
12
13
|
var Close = (props) => {
|
|
13
14
|
const { testId, ariaLabel = "Lukk", onClick, ref } = props;
|
|
14
15
|
const { refObject, isHovered } = usePseudoClasses();
|
|
@@ -24,7 +25,7 @@ var Close = (props) => {
|
|
|
24
25
|
children: /* @__PURE__ */ jsx("span", {
|
|
25
26
|
className: classNames(styles["close__inner-container"]),
|
|
26
27
|
children: /* @__PURE__ */ jsx(Icon_default, {
|
|
27
|
-
svgIcon:
|
|
28
|
+
svgIcon: X,
|
|
28
29
|
color: "black",
|
|
29
30
|
size: iconSize,
|
|
30
31
|
isHovered
|
|
@@ -32,7 +33,8 @@ var Close = (props) => {
|
|
|
32
33
|
})
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
|
-
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region src/components/StickyNote/Triangle.tsx
|
|
36
38
|
var Triangle = ({ isHover, isFocus, isActive, isError }) => {
|
|
37
39
|
const uniqueId = useId();
|
|
38
40
|
const maskIdFocus = `${uniqueId}-mask-focus`;
|
|
@@ -110,7 +112,8 @@ var Triangle = ({ isHover, isFocus, isActive, isError }) => {
|
|
|
110
112
|
});
|
|
111
113
|
return /* @__PURE__ */ jsx(Fragment, { children: svg });
|
|
112
114
|
};
|
|
113
|
-
|
|
115
|
+
//#endregion
|
|
116
|
+
//#region src/components/StickyNote/StickyNote.tsx
|
|
114
117
|
var StickyNote = (props) => {
|
|
115
118
|
const { wrapperClassName, timestamp, onXButtonClick, arialabelXButton, footerText, error, errorText, errorTextId: errorTextIdProp, onClickWhileDisabled, testId, ...textareaProps } = props;
|
|
116
119
|
const errorTextId = useIdWithFallback(errorTextIdProp);
|
|
@@ -176,7 +179,7 @@ var StickyNote = (props) => {
|
|
|
176
179
|
onChange: handleChange,
|
|
177
180
|
"aria-describedby": getAriaDescribedBy(props, errorTextId)
|
|
178
181
|
}),
|
|
179
|
-
/* @__PURE__ */ jsx(
|
|
182
|
+
/* @__PURE__ */ jsx(Close, {
|
|
180
183
|
onClick: onXButtonClick,
|
|
181
184
|
ariaLabel: arialabelXButton,
|
|
182
185
|
testId: "closeButton"
|
|
@@ -187,7 +190,7 @@ var StickyNote = (props) => {
|
|
|
187
190
|
}),
|
|
188
191
|
/* @__PURE__ */ jsx("div", {
|
|
189
192
|
className: classNames(styles["sticky-note__triangle"]),
|
|
190
|
-
children: /* @__PURE__ */ jsx(
|
|
193
|
+
children: /* @__PURE__ */ jsx(Triangle, {
|
|
191
194
|
isHover: isHovered,
|
|
192
195
|
isActive,
|
|
193
196
|
isFocus: isTextareaFocused,
|
|
@@ -201,7 +204,10 @@ var StickyNote = (props) => {
|
|
|
201
204
|
children: errorText
|
|
202
205
|
})] });
|
|
203
206
|
};
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/components/StickyNote/index.ts
|
|
204
209
|
var StickyNote_default = StickyNote;
|
|
210
|
+
//#endregion
|
|
205
211
|
export { StickyNote_default as default };
|
|
206
212
|
|
|
207
213
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Close: React.FC<CloseProps>","Triangle: React.FC<TriangleProps>","colors: Palette","svg: React.ReactNode","StickyNote: React.FC<StickyNoteProps>"],"sources":["../../../src/components/StickyNote/Close.tsx","../../../src/components/StickyNote/Triangle.tsx","../../../src/components/StickyNote/StickyNote.tsx","../../../src/components/StickyNote/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Function is called when user clicks the button */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Sets the aria-label of the button */\n ariaLabel?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the button element */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\n/*\n Denne er kopiert fra Close-komponent. \n Det er for å kunne ha en egen lokal variant for StickyNote. \n Likt som i Figma.\n */\n\nconst Close: React.FC<CloseProps> = (props: CloseProps) => {\n const { testId, ariaLabel = 'Lukk', onClick, ref } = props;\n const { refObject, isHovered } = usePseudoClasses();\n\n const iconSize = useIsMobileBreakpoint() ? 38 : 48;\n\n const closeClasses = classNames(styles.close);\n\n return (\n <button\n ref={mergeRefs([ref, refObject])}\n data-testid={testId}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <span className={classNames(styles['close__inner-container'])}>\n <Icon svgIcon={X} color=\"black\" size={iconSize} isHovered={isHovered} />\n </span>\n </button>\n );\n};\n\nexport default Close;\n","import { useId } from 'react';\n\ninterface TriangleProps {\n isHover: boolean;\n isFocus: boolean;\n isActive: boolean;\n isError: boolean;\n}\n\nexport interface Palette {\n border: string;\n background: string;\n}\n\nconst Triangle: React.FC<TriangleProps> = ({ isHover, isFocus, isActive, isError }) => {\n const uniqueId = useId();\n const maskIdFocus = `${uniqueId}-mask-focus`;\n const maskIdNormal = `${uniqueId}-mask-normal`;\n const palette = ((): Palette => {\n const colors: Palette = {\n border: 'var(--component-stickynote-border-normal)',\n background: 'var(--component-stickynote-background-fold-normal-light)',\n };\n\n if (!isError) {\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-normal-dark)';\n }\n } else {\n colors.border = 'var(--component-stickynote-border-error)';\n colors.background = 'var(--component-stickynote-background-fold-error-light)';\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-error-dark)';\n }\n }\n return colors;\n })();\n\n let svg: React.ReactNode;\n\n if (isFocus) {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id={maskIdFocus} fill=\"white\">\n <path d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\" />\n </mask>\n <path\n d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.493163 20.9211L0.493163 22.9211L1.32159 22.9211L1.90738 22.3354L0.493163 20.9211ZM0.276366 20.9211L-1.72363 20.9211L-1.72363 22.9211L0.276366 22.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 -1.07886L-1.72363 -1.07886L-1.72363 0.921142L0.276367 0.921142ZM20.2764 0.921143L22.2764 0.921143L22.2764 -1.07886L20.2764 -1.07886L20.2764 0.921143ZM20.2764 1.13794L21.6906 2.55215L22.2764 1.96637L22.2764 1.13794L20.2764 1.13794ZM0.493163 20.9211L0.493163 18.9211L0.276366 18.9211L0.276366 20.9211L0.276366 22.9211L0.493163 22.9211L0.493163 20.9211ZM0.276366 20.9211L2.27637 20.9211L2.27637 0.921142L0.276367 0.921142L-1.72363 0.921142L-1.72363 20.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 2.92114L20.2764 2.92114L20.2764 0.921143L20.2764 -1.07886L0.276367 -1.07886L0.276367 0.921142ZM20.2764 0.921143L18.2764 0.921142L18.2764 1.13794L20.2764 1.13794L22.2764 1.13794L22.2764 0.921143L20.2764 0.921143ZM20.2764 1.13794L18.8622 -0.276274L-0.92105 19.5069L0.493163 20.9211L1.90738 22.3354L21.6906 2.55215L20.2764 1.13794Z\"\n fill={palette.border}\n mask={`url(#${maskIdFocus})`}\n />\n </svg>\n );\n } else {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id={maskIdNormal} fill=\"white\">\n <path d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\" />\n </mask>\n <path\n d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.923827 20.9211L0.923827 21.9211L1.33804 21.9211L1.63093 21.6282L0.923827 20.9211ZM0.70703 20.9211L-0.29297 20.9211L-0.29297 21.9211L0.70703 21.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 -0.0788582L-0.292969 -0.0788583L-0.292969 0.921142L0.707031 0.921142ZM20.707 0.921143L21.707 0.921143L21.707 -0.0788574L20.707 -0.0788574L20.707 0.921143ZM20.707 1.13794L21.4141 1.84505L21.707 1.55215L21.707 1.13794L20.707 1.13794ZM0.923827 20.9211L0.923827 19.9211L0.70703 19.9211L0.70703 20.9211L0.70703 21.9211L0.923827 21.9211L0.923827 20.9211ZM0.70703 20.9211L1.70703 20.9211L1.70703 0.921142L0.707031 0.921142L-0.292969 0.921142L-0.29297 20.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 1.92114L20.707 1.92114L20.707 0.921143L20.707 -0.0788574L0.707031 -0.0788582L0.707031 0.921142ZM20.707 0.921143L19.707 0.921143L19.707 1.13794L20.707 1.13794L21.707 1.13794L21.707 0.921143L20.707 0.921143ZM20.707 1.13794L19.9999 0.430833L0.21672 20.214L0.923827 20.9211L1.63093 21.6282L21.4141 1.84505L20.707 1.13794Z\"\n fill={palette.border}\n mask={`url(#${maskIdNormal})`}\n />\n </svg>\n );\n }\n\n return <>{svg}</>;\n};\n\nexport default Triangle;\n","import { useLayoutEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Close from './Close';\nimport Triangle from './Triangle';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StickyNoteProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Aria label for the delete/close button */\n arialabelXButton: string;\n /** Activates the error styling */\n error?: boolean;\n /** Error text to show below the note */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Text shown under the textarea */\n footerText?: string;\n /** Function run when clicking the delete/close button */\n onXButtonClick?: () => void;\n /** Function run if user clicks the component while it is disabled */\n onClickWhileDisabled?: () => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Timestamp shown over the textarea */\n timestamp: string;\n /** Classname for the outer wrapper */\n wrapperClassName?: string;\n}\n\nconst StickyNote: React.FC<StickyNoteProps> = (props: StickyNoteProps) => {\n const {\n wrapperClassName,\n timestamp,\n onXButtonClick,\n arialabelXButton,\n footerText,\n error,\n errorText,\n errorTextId: errorTextIdProp,\n onClickWhileDisabled,\n testId,\n ...textareaProps\n } = props;\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const showErrorStyling = error || !!errorText;\n const stickynoteRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const { isFocused: isTextareaFocused } = usePseudoClasses<HTMLTextAreaElement | null>(textareaRef);\n const { isHovered, isActive } = usePseudoClasses<HTMLDivElement | null>(stickynoteRef);\n\n const handleWrapperClick = (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>): void => {\n if ((event.target as HTMLElement).closest('button')) {\n return;\n }\n if (textareaProps.disabled) {\n if (onClickWhileDisabled) onClickWhileDisabled();\n return;\n }\n textareaRef.current?.focus();\n };\n\n const resizeTextarea = (): void => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n resizeTarget(textarea);\n };\n\n const resizeTarget = (target: HTMLTextAreaElement): void => {\n // Reset field height\n target.style.height = 'inherit';\n // Set new height\n target.style.height = `${target.scrollHeight}px`;\n };\n\n useLayoutEffect(() => {\n resizeTextarea();\n // Must run after the shadow DOM has been set up to work on microweb\n setTimeout(() => resizeTextarea(), 1000);\n }, []);\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>): void => {\n const textarea = e.target as HTMLTextAreaElement;\n resizeTarget(textarea);\n if (textareaProps.onChange) textareaProps.onChange(e);\n };\n\n return (\n <div>\n <div\n data-testid={testId}\n ref={stickynoteRef}\n className={classNames(styles['sticky-note'], wrapperClassName, {\n [styles['sticky-note--focused']]: isTextareaFocused,\n [styles['sticky-note--active']]: isActive,\n [styles['sticky-note--hovered']]: isHovered && !isTextareaFocused && !textareaProps.disabled,\n [styles['sticky-note--error']]: showErrorStyling,\n })}\n onClick={handleWrapperClick}\n role=\"textbox\"\n tabIndex={-1}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleWrapperClick(e as React.KeyboardEvent<HTMLDivElement>);\n }\n }}\n >\n <div className={classNames(styles['sticky-note__header'])}>\n {timestamp && <span className={styles['sticky-note__header__timestamp']}>{timestamp}</span>}\n </div>\n <textarea\n ref={textareaRef}\n data-testid={`${testId}-textarea`}\n className={classNames(styles['sticky-note__textarea'], textareaProps.className)}\n {...textareaProps}\n onChange={handleChange}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n />\n <Close onClick={onXButtonClick} ariaLabel={arialabelXButton} testId=\"closeButton\" />\n <div className={classNames(styles['sticky-note__footer'])}>{footerText && <span>{footerText}</span>}</div>\n <div className={classNames(styles['sticky-note__triangle'])}>\n <Triangle isHover={isHovered} isActive={isActive} isFocus={isTextareaFocused} isError={showErrorStyling} />\n </div>\n </div>\n {errorText && (\n <p className={styles['sticky-note__error-text']} id={errorTextId}>\n {errorText}\n </p>\n )}\n </div>\n );\n};\n\nexport default StickyNote;\n","import StickyNote from './StickyNote';\nexport * from './StickyNote';\nexport default StickyNote;\n"],"mappings":";;;;;;;;;;;AA2BA,IAAMA,SAA+B,UAAsB;CACzD,MAAM,EAAE,QAAQ,YAAY,QAAQ,SAAS,QAAQ;CACrD,MAAM,EAAE,WAAW,cAAc,kBAAkB;CAEnD,MAAM,WAAW,uBAA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S,EAAE;;AAGvD,QACE,qBAAC,OAAA,EAAA,UAAA,CACC,qBAAC,OAAA;EACC,eAAa;EACb,KAAK;EACL,WAAW,WAAW,OAAO,gBAAgB,kBAAkB;IAC5D,OAAO,0BAA0B;IACjC,OAAO,yBAAyB;IAChC,OAAO,0BAA0B,aAAa,CAAC,qBAAqB,CAAC,cAAc;IACnF,OAAO,wBAAwB;GACjC,CAAC;EACF,SAAS;EACT,MAAK;EACL,UAAU;EACV,YAAW,MAAK;AACd,OAAI,EAAE,QAAQ,WAAW,EAAE,QAAQ,IACjC,oBAAmB,EAAyC;;;GAIhE,oBAAC,OAAA;IAAI,WAAW,WAAW,OAAO,uBAAuB;cACtD,aAAa,oBAAC,QAAA;KAAK,WAAW,OAAO;eAAoC;MAAiB;KACvF;GACN,oBAAC,YAAA;IACC,KAAK;IACL,eAAa,GAAG,OAAO;IACvB,WAAW,WAAW,OAAO,0BAA0B,cAAc,UAAU;IAC/E,GAAI;IACJ,UAAU;IACV,oBAAkB,mBAAmB,OAAO,YAAY;KACxD;GACF,oBAAC,eAAA;IAAM,SAAS;IAAgB,WAAW;IAAkB,QAAO;KAAgB;GACpF,oBAAC,OAAA;IAAI,WAAW,WAAW,OAAO,uBAAuB;cAAG,cAAc,oBAAC,QAAA,EAAA,UAAM,YAAA,CAAkB;KAAO;GAC1G,oBAAC,OAAA;IAAI,WAAW,WAAW,OAAO,yBAAyB;cACzD,oBAAC,kBAAA;KAAS,SAAS;KAAqB;KAAU,SAAS;KAAmB,SAAS;MAAoB;KACvG;;GACF,EACL,aACC,oBAAC,KAAA;EAAE,WAAW,OAAO;EAA4B,IAAI;YAClD;GACC,CAAA,EAAA,CAEF;;ACpIV,IAAA,qBDwIe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/components/StickyNote/Close.tsx","../../../src/components/StickyNote/Triangle.tsx","../../../src/components/StickyNote/StickyNote.tsx","../../../src/components/StickyNote/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport { useIsMobileBreakpoint } from '../../hooks/useIsMobileBreakpoint';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icon';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Function is called when user clicks the button */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Sets the aria-label of the button */\n ariaLabel?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref passed to the button element */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\n/*\n Denne er kopiert fra Close-komponent. \n Det er for å kunne ha en egen lokal variant for StickyNote. \n Likt som i Figma.\n */\n\nconst Close: React.FC<CloseProps> = (props: CloseProps) => {\n const { testId, ariaLabel = 'Lukk', onClick, ref } = props;\n const { refObject, isHovered } = usePseudoClasses();\n\n const iconSize = useIsMobileBreakpoint() ? 38 : 48;\n\n const closeClasses = classNames(styles.close);\n\n return (\n <button\n ref={mergeRefs([ref, refObject])}\n data-testid={testId}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <span className={classNames(styles['close__inner-container'])}>\n <Icon svgIcon={X} color=\"black\" size={iconSize} isHovered={isHovered} />\n </span>\n </button>\n );\n};\n\nexport default Close;\n","import { useId } from 'react';\n\ninterface TriangleProps {\n isHover: boolean;\n isFocus: boolean;\n isActive: boolean;\n isError: boolean;\n}\n\nexport interface Palette {\n border: string;\n background: string;\n}\n\nconst Triangle: React.FC<TriangleProps> = ({ isHover, isFocus, isActive, isError }) => {\n const uniqueId = useId();\n const maskIdFocus = `${uniqueId}-mask-focus`;\n const maskIdNormal = `${uniqueId}-mask-normal`;\n const palette = ((): Palette => {\n const colors: Palette = {\n border: 'var(--component-stickynote-border-normal)',\n background: 'var(--component-stickynote-background-fold-normal-light)',\n };\n\n if (!isError) {\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-normal-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-normal-dark)';\n }\n } else {\n colors.border = 'var(--component-stickynote-border-error)';\n colors.background = 'var(--component-stickynote-background-fold-error-light)';\n if (isHover) {\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isFocus) {\n colors.border = 'var(--color-action-border-onlight-focus)';\n colors.background = 'var(--component-stickynote-background-fold-error-medium)';\n }\n if (isActive) {\n colors.background = 'var(--component-stickynote-background-fold-error-dark)';\n }\n }\n return colors;\n })();\n\n let svg: React.ReactNode;\n\n if (isFocus) {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id={maskIdFocus} fill=\"white\">\n <path d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\" />\n </mask>\n <path\n d=\"M0.493163 20.9211L0.276366 20.9211L0.276367 0.921142L20.2764 0.921143L20.2764 1.13794L0.493163 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.493163 20.9211L0.493163 22.9211L1.32159 22.9211L1.90738 22.3354L0.493163 20.9211ZM0.276366 20.9211L-1.72363 20.9211L-1.72363 22.9211L0.276366 22.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 -1.07886L-1.72363 -1.07886L-1.72363 0.921142L0.276367 0.921142ZM20.2764 0.921143L22.2764 0.921143L22.2764 -1.07886L20.2764 -1.07886L20.2764 0.921143ZM20.2764 1.13794L21.6906 2.55215L22.2764 1.96637L22.2764 1.13794L20.2764 1.13794ZM0.493163 20.9211L0.493163 18.9211L0.276366 18.9211L0.276366 20.9211L0.276366 22.9211L0.493163 22.9211L0.493163 20.9211ZM0.276366 20.9211L2.27637 20.9211L2.27637 0.921142L0.276367 0.921142L-1.72363 0.921142L-1.72363 20.9211L0.276366 20.9211ZM0.276367 0.921142L0.276367 2.92114L20.2764 2.92114L20.2764 0.921143L20.2764 -1.07886L0.276367 -1.07886L0.276367 0.921142ZM20.2764 0.921143L18.2764 0.921142L18.2764 1.13794L20.2764 1.13794L22.2764 1.13794L22.2764 0.921143L20.2764 0.921143ZM20.2764 1.13794L18.8622 -0.276274L-0.92105 19.5069L0.493163 20.9211L1.90738 22.3354L21.6906 2.55215L20.2764 1.13794Z\"\n fill={palette.border}\n mask={`url(#${maskIdFocus})`}\n />\n </svg>\n );\n } else {\n svg = (\n <svg width=\"21\" height=\"21\" viewBox=\"0 0 21 21\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <mask id={maskIdNormal} fill=\"white\">\n <path d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\" />\n </mask>\n <path\n d=\"M0.923827 20.9211L0.70703 20.9211L0.707031 0.921142L20.707 0.921143L20.707 1.13794L0.923827 20.9211Z\"\n fill={palette.background}\n />\n <path\n d=\"M0.923827 20.9211L0.923827 21.9211L1.33804 21.9211L1.63093 21.6282L0.923827 20.9211ZM0.70703 20.9211L-0.29297 20.9211L-0.29297 21.9211L0.70703 21.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 -0.0788582L-0.292969 -0.0788583L-0.292969 0.921142L0.707031 0.921142ZM20.707 0.921143L21.707 0.921143L21.707 -0.0788574L20.707 -0.0788574L20.707 0.921143ZM20.707 1.13794L21.4141 1.84505L21.707 1.55215L21.707 1.13794L20.707 1.13794ZM0.923827 20.9211L0.923827 19.9211L0.70703 19.9211L0.70703 20.9211L0.70703 21.9211L0.923827 21.9211L0.923827 20.9211ZM0.70703 20.9211L1.70703 20.9211L1.70703 0.921142L0.707031 0.921142L-0.292969 0.921142L-0.29297 20.9211L0.70703 20.9211ZM0.707031 0.921142L0.707031 1.92114L20.707 1.92114L20.707 0.921143L20.707 -0.0788574L0.707031 -0.0788582L0.707031 0.921142ZM20.707 0.921143L19.707 0.921143L19.707 1.13794L20.707 1.13794L21.707 1.13794L21.707 0.921143L20.707 0.921143ZM20.707 1.13794L19.9999 0.430833L0.21672 20.214L0.923827 20.9211L1.63093 21.6282L21.4141 1.84505L20.707 1.13794Z\"\n fill={palette.border}\n mask={`url(#${maskIdNormal})`}\n />\n </svg>\n );\n }\n\n return <>{svg}</>;\n};\n\nexport default Triangle;\n","import { useLayoutEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Close from './Close';\nimport Triangle from './Triangle';\nimport { useIdWithFallback } from '../../hooks/useIdWithFallback';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaDescribedBy } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\nexport interface StickyNoteProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {\n /** Aria label for the delete/close button */\n arialabelXButton: string;\n /** Activates the error styling */\n error?: boolean;\n /** Error text to show below the note */\n errorText?: string;\n /** Error text id */\n errorTextId?: string;\n /** Text shown under the textarea */\n footerText?: string;\n /** Function run when clicking the delete/close button */\n onXButtonClick?: () => void;\n /** Function run if user clicks the component while it is disabled */\n onClickWhileDisabled?: () => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Timestamp shown over the textarea */\n timestamp: string;\n /** Classname for the outer wrapper */\n wrapperClassName?: string;\n}\n\nconst StickyNote: React.FC<StickyNoteProps> = (props: StickyNoteProps) => {\n const {\n wrapperClassName,\n timestamp,\n onXButtonClick,\n arialabelXButton,\n footerText,\n error,\n errorText,\n errorTextId: errorTextIdProp,\n onClickWhileDisabled,\n testId,\n ...textareaProps\n } = props;\n const errorTextId = useIdWithFallback(errorTextIdProp);\n const showErrorStyling = error || !!errorText;\n const stickynoteRef = useRef<HTMLDivElement>(null);\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n const { isFocused: isTextareaFocused } = usePseudoClasses<HTMLTextAreaElement | null>(textareaRef);\n const { isHovered, isActive } = usePseudoClasses<HTMLDivElement | null>(stickynoteRef);\n\n const handleWrapperClick = (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>): void => {\n if ((event.target as HTMLElement).closest('button')) {\n return;\n }\n if (textareaProps.disabled) {\n if (onClickWhileDisabled) onClickWhileDisabled();\n return;\n }\n textareaRef.current?.focus();\n };\n\n const resizeTextarea = (): void => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n resizeTarget(textarea);\n };\n\n const resizeTarget = (target: HTMLTextAreaElement): void => {\n // Reset field height\n target.style.height = 'inherit';\n // Set new height\n target.style.height = `${target.scrollHeight}px`;\n };\n\n useLayoutEffect(() => {\n resizeTextarea();\n // Must run after the shadow DOM has been set up to work on microweb\n setTimeout(() => resizeTextarea(), 1000);\n }, []);\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>): void => {\n const textarea = e.target as HTMLTextAreaElement;\n resizeTarget(textarea);\n if (textareaProps.onChange) textareaProps.onChange(e);\n };\n\n return (\n <div>\n <div\n data-testid={testId}\n ref={stickynoteRef}\n className={classNames(styles['sticky-note'], wrapperClassName, {\n [styles['sticky-note--focused']]: isTextareaFocused,\n [styles['sticky-note--active']]: isActive,\n [styles['sticky-note--hovered']]: isHovered && !isTextareaFocused && !textareaProps.disabled,\n [styles['sticky-note--error']]: showErrorStyling,\n })}\n onClick={handleWrapperClick}\n role=\"textbox\"\n tabIndex={-1}\n onKeyDown={e => {\n if (e.key === 'Enter' || e.key === ' ') {\n handleWrapperClick(e as React.KeyboardEvent<HTMLDivElement>);\n }\n }}\n >\n <div className={classNames(styles['sticky-note__header'])}>\n {timestamp && <span className={styles['sticky-note__header__timestamp']}>{timestamp}</span>}\n </div>\n <textarea\n ref={textareaRef}\n data-testid={`${testId}-textarea`}\n className={classNames(styles['sticky-note__textarea'], textareaProps.className)}\n {...textareaProps}\n onChange={handleChange}\n aria-describedby={getAriaDescribedBy(props, errorTextId)}\n />\n <Close onClick={onXButtonClick} ariaLabel={arialabelXButton} testId=\"closeButton\" />\n <div className={classNames(styles['sticky-note__footer'])}>{footerText && <span>{footerText}</span>}</div>\n <div className={classNames(styles['sticky-note__triangle'])}>\n <Triangle isHover={isHovered} isActive={isActive} isFocus={isTextareaFocused} isError={showErrorStyling} />\n </div>\n </div>\n {errorText && (\n <p className={styles['sticky-note__error-text']} id={errorTextId}>\n {errorText}\n </p>\n )}\n </div>\n );\n};\n\nexport default StickyNote;\n","import StickyNote from './StickyNote';\nexport * from './StickyNote';\nexport default StickyNote;\n"],"mappings":";;;;;;;;;;;;AA2BA,IAAM,SAA+B,UAAsB;CACzD,MAAM,EAAE,QAAQ,YAAY,QAAQ,SAAS,QAAQ;CACrD,MAAM,EAAE,WAAW,cAAc,kBAAkB;CAEnD,MAAM,WAAW,uBAAuB,GAAG,KAAK;CAEhD,MAAM,eAAe,WAAW,OAAO,MAAM;CAE7C,OACE,oBAAC,UAAD;EACE,KAAK,UAAU,CAAC,KAAK,UAAU,CAAC;EAChC,eAAa;EACb,WAAW;EACX,cAAY;EACH;EACT,MAAK;YAEL,oBAAC,QAAD;GAAM,WAAW,WAAW,OAAO,0BAA0B;aAC3D,oBAAC,cAAD;IAAM,SAAS;IAAG,OAAM;IAAQ,MAAM;IAAqB;IAAa,CAAA;GACnE,CAAA;EACA,CAAA;;;;ACjCb,IAAM,YAAqC,EAAE,SAAS,SAAS,UAAU,cAAc;CACrF,MAAM,WAAW,OAAO;CACxB,MAAM,cAAc,GAAG,SAAS;CAChC,MAAM,eAAe,GAAG,SAAS;CACjC,MAAM,iBAA0B;EAC9B,MAAM,SAAkB;GACtB,QAAQ;GACR,YAAY;GACb;EAED,IAAI,CAAC,SAAS;GACZ,IAAI,SACF,OAAO,aAAa;GAEtB,IAAI,SAAS;IACX,OAAO,SAAS;IAChB,OAAO,aAAa;;GAEtB,IAAI,UACF,OAAO,aAAa;SAEjB;GACL,OAAO,SAAS;GAChB,OAAO,aAAa;GACpB,IAAI,SACF,OAAO,aAAa;G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