@helsenorge/designsystem-react 5.12.0 → 6.0.0-beta.14
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/CHANGELOG.md +99 -0
- package/__mocks__/IntersectionObserver.js +14 -1
- package/__mocks__/IntersectionObserver.js.map +1 -1
- package/__mocks__/MutationObserver.js +12 -1
- package/__mocks__/MutationObserver.js.map +1 -1
- package/__mocks__/ResizeObserver.js +14 -1
- package/__mocks__/ResizeObserver.js.map +1 -1
- package/__mocks__/matchMedia.js +12 -1
- package/__mocks__/matchMedia.js.map +1 -1
- package/__mocks__/useHover.js +3 -1
- package/__mocks__/useHover.js.map +1 -1
- package/__mocks__/useLayoutEvent.js +3 -1
- package/__mocks__/useLayoutEvent.js.map +1 -1
- package/__mocks__/useOutsideEvent.js +3 -1
- package/__mocks__/useOutsideEvent.js.map +1 -1
- package/__mocks__/useSize.js +3 -1
- package/__mocks__/useSize.js.map +1 -1
- package/__mocks__/uuid.js +5 -1
- package/__mocks__/uuid.js.map +1 -1
- package/_virtual/dynamic-import-helper.js +10 -0
- package/_virtual/dynamic-import-helper.js.map +1 -0
- package/components/AnchorLink/AnchorLink.js +53 -0
- package/components/AnchorLink/AnchorLink.js.map +1 -0
- package/components/AnchorLink/index.js +4 -1
- package/components/AnchorLink/index.js.map +1 -1
- package/components/Avatar/Avatar.js +33 -0
- package/components/Avatar/Avatar.js.map +1 -0
- package/components/Avatar/index.js +6 -1
- package/components/Avatar/index.js.map +1 -1
- package/components/Badge/Badge.js +25 -0
- package/components/Badge/Badge.js.map +1 -0
- package/components/Badge/index.js +4 -1
- package/components/Badge/index.js.map +1 -1
- package/components/Button/Button.d.ts.map +1 -1
- package/components/Button/Button.js +119 -0
- package/components/Button/Button.js.map +1 -0
- package/components/Button/index.js +4 -1
- package/components/Button/index.js.map +1 -1
- package/components/ButtonWithModal/ButtonWithModal.js +11 -0
- package/components/ButtonWithModal/ButtonWithModal.js.map +1 -0
- package/components/ButtonWithModal/index.js +4 -1
- package/components/ButtonWithModal/index.js.map +1 -1
- package/components/Checkbox/Checkbox.d.ts +3 -3
- package/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/components/Checkbox/Checkbox.js +108 -0
- package/components/Checkbox/Checkbox.js.map +1 -0
- package/components/Checkbox/index.js +6 -1
- package/components/Checkbox/index.js.map +1 -1
- package/components/Checkbox/styles.module.scss +9 -9
- package/components/Checkbox/styles.module.scss.d.ts +18 -18
- package/components/Close/Close.js +30 -0
- package/components/Close/Close.js.map +1 -0
- package/components/Close/index.js +4 -1
- package/components/Close/index.js.map +1 -1
- package/components/DictionaryTrigger/DictionaryTrigger.js +28 -0
- package/components/DictionaryTrigger/DictionaryTrigger.js.map +1 -0
- package/components/DictionaryTrigger/index.js +4 -1
- package/components/DictionaryTrigger/index.js.map +1 -1
- package/components/Dropdown/Dropdown.js +119 -0
- package/components/Dropdown/Dropdown.js.map +1 -0
- package/components/Dropdown/index.js +6 -1
- package/components/Dropdown/index.js.map +1 -1
- package/components/Dropdown/styles.module.scss +2 -2
- package/components/Duolist/Duolist.js +55 -0
- package/components/Duolist/Duolist.js.map +1 -0
- package/components/Duolist/index.js +7 -1
- package/components/Duolist/index.js.map +1 -1
- package/components/EmptyState/EmptyState.js +10 -0
- package/components/EmptyState/EmptyState.js.map +1 -0
- package/components/EmptyState/NobodyHome.js +155 -0
- package/components/EmptyState/NobodyHome.js.map +1 -0
- package/components/EmptyState/index.js +4 -1
- package/components/EmptyState/index.js.map +1 -1
- package/components/ErrorWrapper/ErrorWrapper.js +12 -0
- package/components/ErrorWrapper/ErrorWrapper.js.map +1 -0
- package/components/ErrorWrapper/index.js +6 -1
- package/components/ErrorWrapper/index.js.map +1 -1
- package/components/Expander/Expander.d.ts +3 -2
- package/components/Expander/Expander.d.ts.map +1 -1
- package/components/Expander/Expander.js +100 -0
- package/components/Expander/Expander.js.map +1 -0
- package/components/Expander/index.js +6 -1
- package/components/Expander/index.js.map +1 -1
- package/components/ExpanderHierarchy/Expander.js +31 -0
- package/components/ExpanderHierarchy/Expander.js.map +1 -0
- package/components/ExpanderHierarchy/ExpanderButton.js +46 -0
- package/components/ExpanderHierarchy/ExpanderButton.js.map +1 -0
- package/components/ExpanderHierarchy/ExpanderHierarchy.js +29 -0
- package/components/ExpanderHierarchy/ExpanderHierarchy.js.map +1 -0
- package/components/ExpanderHierarchy/index.js +4 -1
- package/components/ExpanderHierarchy/index.js.map +1 -1
- package/components/ExpanderHierarchy/utils.js +20 -0
- package/components/ExpanderHierarchy/utils.js.map +1 -0
- package/components/ExpanderList/ExpanderList.d.ts +0 -7
- package/components/ExpanderList/ExpanderList.d.ts.map +1 -1
- package/components/ExpanderList/ExpanderList.js +134 -0
- package/components/ExpanderList/ExpanderList.js.map +1 -0
- package/components/ExpanderList/index.js +6 -1
- package/components/ExpanderList/index.js.map +1 -1
- package/components/FormExample/FormExample.d.ts +2 -2
- package/components/FormExample/FormExample.d.ts.map +1 -1
- package/components/FormExample/FormExample.js +249 -0
- package/components/FormExample/FormExample.js.map +1 -0
- package/components/FormExample/index.js +7 -11
- package/components/FormExample/index.js.map +1 -1
- package/components/FormGroup/FormGroup.d.ts +2 -2
- package/components/FormGroup/FormGroup.d.ts.map +1 -1
- package/components/FormGroup/FormGroup.js +97 -0
- package/components/FormGroup/FormGroup.js.map +1 -0
- package/components/FormGroup/index.js +6 -1
- package/components/FormGroup/index.js.map +1 -1
- package/components/FormLayout/FormLayout.d.ts +3 -3
- package/components/FormLayout/FormLayout.d.ts.map +1 -1
- package/components/FormLayout/FormLayout.js +39 -0
- package/components/FormLayout/FormLayout.js.map +1 -0
- package/components/FormLayout/index.js +7 -1
- package/components/FormLayout/index.js.map +1 -1
- package/components/FormLayout/styles.module.scss +1 -1
- package/components/FormLayout/styles.module.scss.d.ts +1 -1
- package/components/GridExample/GridExample.js +7 -0
- package/components/GridExample/GridExample.js.map +1 -0
- package/components/GridExample/index.js +6 -1
- package/components/GridExample/index.js.map +1 -1
- package/components/HelpBubble/HelpBubble.js +62 -0
- package/components/HelpBubble/HelpBubble.js.map +1 -0
- package/components/HelpBubble/index.js +6 -1
- package/components/HelpBubble/index.js.map +1 -1
- package/components/HelpBubbleExample/HelpBubbleExample.js +20 -0
- package/components/HelpBubbleExample/HelpBubbleExample.js.map +1 -0
- package/components/HelpBubbleExample/index.js +4 -1
- package/components/HelpBubbleExample/index.js.map +1 -1
- package/components/HelpPanel/HelpPanel.js +24 -0
- package/components/HelpPanel/HelpPanel.js.map +1 -0
- package/components/HelpPanel/index.js +4 -1
- package/components/HelpPanel/index.js.map +1 -1
- package/components/HelpQuestion/HelpQuestion.js +32 -0
- package/components/HelpQuestion/HelpQuestion.js.map +1 -0
- package/components/HelpQuestion/index.js +4 -1
- package/components/HelpQuestion/index.js.map +1 -1
- package/components/HighlightBox/HighlightBox.d.ts +3 -2
- package/components/HighlightBox/HighlightBox.d.ts.map +1 -1
- package/components/HighlightBox/HighlightBox.js +62 -0
- package/components/HighlightBox/HighlightBox.js.map +1 -0
- package/components/HighlightBox/index.js +6 -1
- package/components/HighlightBox/index.js.map +1 -1
- package/components/HorizontalScroll/HorizontalScroll.js +46 -0
- package/components/HorizontalScroll/HorizontalScroll.js.map +1 -0
- package/components/HorizontalScroll/index.js +6 -1
- package/components/HorizontalScroll/index.js.map +1 -1
- package/components/{Icons → Icon}/Icon.d.ts +4 -3
- package/components/Icon/Icon.d.ts.map +1 -0
- package/components/Icon/Icon.js +57 -0
- package/components/Icon/Icon.js.map +1 -0
- package/components/Icon/index.d.ts.map +1 -0
- package/components/Icon/index.js +10 -0
- package/components/Icon/index.js.map +1 -0
- package/components/Icons/ActiveMonitoring.d.ts +1 -1
- package/components/Icons/ActiveMonitoring.d.ts.map +1 -1
- package/components/Icons/ActiveMonitoring.js +17 -1
- package/components/Icons/ActiveMonitoring.js.map +1 -1
- package/components/Icons/AcupunctureBack.d.ts +1 -1
- package/components/Icons/AcupunctureBack.d.ts.map +1 -1
- package/components/Icons/AcupunctureBack.js +22 -1
- package/components/Icons/AcupunctureBack.js.map +1 -1
- package/components/Icons/AdditionalIconInformation.d.ts +1192 -0
- package/components/Icons/AdditionalIconInformation.d.ts.map +1 -0
- package/components/Icons/AdditionalIconInformation.js +302 -298
- package/components/Icons/AdditionalIconInformation.js.map +1 -0
- package/components/Icons/AlarmClock.d.ts +1 -1
- package/components/Icons/AlarmClock.d.ts.map +1 -1
- package/components/Icons/AlarmClock.js +18 -1
- package/components/Icons/AlarmClock.js.map +1 -1
- package/components/Icons/AlertSignFill.d.ts +1 -1
- package/components/Icons/AlertSignFill.d.ts.map +1 -1
- package/components/Icons/AlertSignFill.js +6 -1
- package/components/Icons/AlertSignFill.js.map +1 -1
- package/components/Icons/AlertSignStroke.d.ts +1 -1
- package/components/Icons/AlertSignStroke.d.ts.map +1 -1
- package/components/Icons/AlertSignStroke.js +6 -1
- package/components/Icons/AlertSignStroke.js.map +1 -1
- package/components/Icons/Amputation.d.ts +1 -1
- package/components/Icons/Amputation.d.ts.map +1 -1
- package/components/Icons/Amputation.js +5 -1
- package/components/Icons/Amputation.js.map +1 -1
- package/components/Icons/Anxiety.d.ts +1 -1
- package/components/Icons/Anxiety.d.ts.map +1 -1
- package/components/Icons/Anxiety.js +5 -1
- package/components/Icons/Anxiety.js.map +1 -1
- package/components/Icons/Apple.d.ts +1 -1
- package/components/Icons/Apple.d.ts.map +1 -1
- package/components/Icons/Apple.js +5 -1
- package/components/Icons/Apple.js.map +1 -1
- package/components/Icons/Archive.d.ts +1 -1
- package/components/Icons/Archive.d.ts.map +1 -1
- package/components/Icons/Archive.js +30 -1
- package/components/Icons/Archive.js.map +1 -1
- package/components/Icons/ArmFlexing.d.ts +1 -1
- package/components/Icons/ArmFlexing.d.ts.map +1 -1
- package/components/Icons/ArmFlexing.js +5 -1
- package/components/Icons/ArmFlexing.js.map +1 -1
- package/components/Icons/ArrowDown.d.ts +1 -1
- package/components/Icons/ArrowDown.d.ts.map +1 -1
- package/components/Icons/ArrowDown.js +30 -1
- package/components/Icons/ArrowDown.js.map +1 -1
- package/components/Icons/ArrowLeft.d.ts +1 -1
- package/components/Icons/ArrowLeft.d.ts.map +1 -1
- package/components/Icons/ArrowLeft.js +6 -1
- package/components/Icons/ArrowLeft.js.map +1 -1
- package/components/Icons/ArrowRight.d.ts +1 -1
- package/components/Icons/ArrowRight.d.ts.map +1 -1
- package/components/Icons/ArrowRight.js +6 -1
- package/components/Icons/ArrowRight.js.map +1 -1
- package/components/Icons/ArrowUp.d.ts +1 -1
- package/components/Icons/ArrowUp.d.ts.map +1 -1
- package/components/Icons/ArrowUp.js +30 -1
- package/components/Icons/ArrowUp.js.map +1 -1
- package/components/Icons/ArrowUpRight.d.ts +1 -1
- package/components/Icons/ArrowUpRight.d.ts.map +1 -1
- package/components/Icons/ArrowUpRight.js +6 -1
- package/components/Icons/ArrowUpRight.js.map +1 -1
- package/components/Icons/Attachment.d.ts +1 -1
- package/components/Icons/Attachment.d.ts.map +1 -1
- package/components/Icons/Attachment.js +6 -1
- package/components/Icons/Attachment.js.map +1 -1
- package/components/Icons/Atv.d.ts +1 -1
- package/components/Icons/Atv.d.ts.map +1 -1
- package/components/Icons/Atv.js +5 -1
- package/components/Icons/Atv.js.map +1 -1
- package/components/Icons/Avatar.d.ts +1 -1
- package/components/Icons/Avatar.d.ts.map +1 -1
- package/components/Icons/Avatar.js +6 -1
- package/components/Icons/Avatar.js.map +1 -1
- package/components/Icons/AwakePersonOnPillow.d.ts +1 -1
- package/components/Icons/AwakePersonOnPillow.d.ts.map +1 -1
- package/components/Icons/AwakePersonOnPillow.js +5 -1
- package/components/Icons/AwakePersonOnPillow.js.map +1 -1
- package/components/Icons/Baby.d.ts +1 -1
- package/components/Icons/Baby.d.ts.map +1 -1
- package/components/Icons/Baby.js +5 -1
- package/components/Icons/Baby.js.map +1 -1
- package/components/Icons/BandAid.d.ts +1 -1
- package/components/Icons/BandAid.d.ts.map +1 -1
- package/components/Icons/BandAid.js +5 -1
- package/components/Icons/BandAid.js.map +1 -1
- package/components/Icons/BeerAndPills.d.ts +1 -1
- package/components/Icons/BeerAndPills.d.ts.map +1 -1
- package/components/Icons/BeerAndPills.js +17 -1
- package/components/Icons/BeerAndPills.js.map +1 -1
- package/components/Icons/Bell.d.ts +1 -1
- package/components/Icons/Bell.d.ts.map +1 -1
- package/components/Icons/Bell.js +5 -1
- package/components/Icons/Bell.js.map +1 -1
- package/components/Icons/Bike.d.ts +1 -1
- package/components/Icons/Bike.d.ts.map +1 -1
- package/components/Icons/Bike.js +5 -1
- package/components/Icons/Bike.js.map +1 -1
- package/components/Icons/BirthControl.d.ts +1 -1
- package/components/Icons/BirthControl.d.ts.map +1 -1
- package/components/Icons/BirthControl.js +17 -1
- package/components/Icons/BirthControl.js.map +1 -1
- package/components/Icons/BirthdayCake.d.ts +1 -1
- package/components/Icons/BirthdayCake.d.ts.map +1 -1
- package/components/Icons/BirthdayCake.js +5 -1
- package/components/Icons/BirthdayCake.js.map +1 -1
- package/components/Icons/Boat.d.ts +1 -1
- package/components/Icons/Boat.d.ts.map +1 -1
- package/components/Icons/Boat.js +5 -1
- package/components/Icons/Boat.js.map +1 -1
- package/components/Icons/Body.d.ts +1 -1
- package/components/Icons/Body.d.ts.map +1 -1
- package/components/Icons/Body.js +17 -1
- package/components/Icons/Body.js.map +1 -1
- package/components/Icons/Braille.d.ts +1 -1
- package/components/Icons/Braille.d.ts.map +1 -1
- package/components/Icons/Braille.js +6 -1
- package/components/Icons/Braille.js.map +1 -1
- package/components/Icons/Brain.d.ts +1 -1
- package/components/Icons/Brain.d.ts.map +1 -1
- package/components/Icons/Brain.js +5 -1
- package/components/Icons/Brain.js.map +1 -1
- package/components/Icons/BreastReconstruction.d.ts +1 -1
- package/components/Icons/BreastReconstruction.d.ts.map +1 -1
- package/components/Icons/BreastReconstruction.js +17 -1
- package/components/Icons/BreastReconstruction.js.map +1 -1
- package/components/Icons/BreastRemoval.d.ts +1 -1
- package/components/Icons/BreastRemoval.d.ts.map +1 -1
- package/components/Icons/BreastRemoval.js +17 -1
- package/components/Icons/BreastRemoval.js.map +1 -1
- package/components/Icons/Breasts.d.ts +1 -1
- package/components/Icons/Breasts.d.ts.map +1 -1
- package/components/Icons/Breasts.js +5 -1
- package/components/Icons/Breasts.js.map +1 -1
- package/components/Icons/BrokenHeart.d.ts +1 -1
- package/components/Icons/BrokenHeart.d.ts.map +1 -1
- package/components/Icons/BrokenHeart.js +5 -1
- package/components/Icons/BrokenHeart.js.map +1 -1
- package/components/Icons/BrokenPuzzle.d.ts +1 -1
- package/components/Icons/BrokenPuzzle.d.ts.map +1 -1
- package/components/Icons/BrokenPuzzle.js +5 -1
- package/components/Icons/BrokenPuzzle.js.map +1 -1
- package/components/Icons/Bus.d.ts +1 -1
- package/components/Icons/Bus.d.ts.map +1 -1
- package/components/Icons/Bus.js +18 -1
- package/components/Icons/Bus.js.map +1 -1
- package/components/Icons/Calendar.d.ts +1 -1
- package/components/Icons/Calendar.d.ts.map +1 -1
- package/components/Icons/Calendar.js +30 -1
- package/components/Icons/Calendar.js.map +1 -1
- package/components/Icons/CalendarChange.d.ts +1 -1
- package/components/Icons/CalendarChange.d.ts.map +1 -1
- package/components/Icons/CalendarChange.js +30 -1
- package/components/Icons/CalendarChange.js.map +1 -1
- package/components/Icons/CalendarCheck.d.ts +1 -1
- package/components/Icons/CalendarCheck.d.ts.map +1 -1
- package/components/Icons/CalendarCheck.js +30 -1
- package/components/Icons/CalendarCheck.js.map +1 -1
- package/components/Icons/CalendarEvent.d.ts +1 -1
- package/components/Icons/CalendarEvent.d.ts.map +1 -1
- package/components/Icons/CalendarEvent.js +5 -1
- package/components/Icons/CalendarEvent.js.map +1 -1
- package/components/Icons/CalendarSave.d.ts +1 -1
- package/components/Icons/CalendarSave.d.ts.map +1 -1
- package/components/Icons/CalendarSave.js +6 -1
- package/components/Icons/CalendarSave.js.map +1 -1
- package/components/Icons/Cancer.d.ts +1 -1
- package/components/Icons/Cancer.d.ts.map +1 -1
- package/components/Icons/Cancer.js +5 -1
- package/components/Icons/Cancer.js.map +1 -1
- package/components/Icons/Candle.d.ts +1 -1
- package/components/Icons/Candle.d.ts.map +1 -1
- package/components/Icons/Candle.js +18 -1
- package/components/Icons/Candle.js.map +1 -1
- package/components/Icons/Car.d.ts +1 -1
- package/components/Icons/Car.d.ts.map +1 -1
- package/components/Icons/Car.js +5 -1
- package/components/Icons/Car.js.map +1 -1
- package/components/Icons/Change.d.ts +1 -1
- package/components/Icons/Change.d.ts.map +1 -1
- package/components/Icons/Change.js +39 -1
- package/components/Icons/Change.js.map +1 -1
- package/components/Icons/Check.d.ts +1 -1
- package/components/Icons/Check.d.ts.map +1 -1
- package/components/Icons/Check.js +6 -1
- package/components/Icons/Check.js.map +1 -1
- package/components/Icons/CheckFill.d.ts +1 -1
- package/components/Icons/CheckFill.d.ts.map +1 -1
- package/components/Icons/CheckFill.js +30 -1
- package/components/Icons/CheckFill.js.map +1 -1
- package/components/Icons/CheckOutline.d.ts +1 -1
- package/components/Icons/CheckOutline.d.ts.map +1 -1
- package/components/Icons/CheckOutline.js +17 -1
- package/components/Icons/CheckOutline.js.map +1 -1
- package/components/Icons/Chest.d.ts +1 -1
- package/components/Icons/Chest.d.ts.map +1 -1
- package/components/Icons/Chest.js +5 -1
- package/components/Icons/Chest.js.map +1 -1
- package/components/Icons/ChevronDown.d.ts +1 -1
- package/components/Icons/ChevronDown.d.ts.map +1 -1
- package/components/Icons/ChevronDown.js +6 -1
- package/components/Icons/ChevronDown.js.map +1 -1
- package/components/Icons/ChevronLeft.d.ts +1 -1
- package/components/Icons/ChevronLeft.d.ts.map +1 -1
- package/components/Icons/ChevronLeft.js +6 -1
- package/components/Icons/ChevronLeft.js.map +1 -1
- package/components/Icons/ChevronRight.d.ts +1 -1
- package/components/Icons/ChevronRight.d.ts.map +1 -1
- package/components/Icons/ChevronRight.js +6 -1
- package/components/Icons/ChevronRight.js.map +1 -1
- package/components/Icons/ChevronUp.d.ts +1 -1
- package/components/Icons/ChevronUp.d.ts.map +1 -1
- package/components/Icons/ChevronUp.js +6 -1
- package/components/Icons/ChevronUp.js.map +1 -1
- package/components/Icons/ChevronsDown.d.ts +1 -1
- package/components/Icons/ChevronsDown.d.ts.map +1 -1
- package/components/Icons/ChevronsDown.js +30 -1
- package/components/Icons/ChevronsDown.js.map +1 -1
- package/components/Icons/ChevronsUp.d.ts +1 -1
- package/components/Icons/ChevronsUp.d.ts.map +1 -1
- package/components/Icons/ChevronsUp.js +30 -1
- package/components/Icons/ChevronsUp.js.map +1 -1
- package/components/Icons/ChildPlaying.d.ts +1 -1
- package/components/Icons/ChildPlaying.d.ts.map +1 -1
- package/components/Icons/ChildPlaying.js +5 -1
- package/components/Icons/ChildPlaying.js.map +1 -1
- package/components/Icons/Cigarette.d.ts +1 -1
- package/components/Icons/Cigarette.d.ts.map +1 -1
- package/components/Icons/Cigarette.js +5 -1
- package/components/Icons/Cigarette.js.map +1 -1
- package/components/Icons/Coins.d.ts +1 -1
- package/components/Icons/Coins.d.ts.map +1 -1
- package/components/Icons/Coins.js +17 -1
- package/components/Icons/Coins.js.map +1 -1
- package/components/Icons/Contacts.d.ts +1 -1
- package/components/Icons/Contacts.d.ts.map +1 -1
- package/components/Icons/Contacts.js +6 -1
- package/components/Icons/Contacts.js.map +1 -1
- package/components/Icons/Copy.d.ts +1 -1
- package/components/Icons/Copy.d.ts.map +1 -1
- package/components/Icons/Copy.js +6 -1
- package/components/Icons/Copy.js.map +1 -1
- package/components/Icons/CoronaCertificate.d.ts +1 -1
- package/components/Icons/CoronaCertificate.d.ts.map +1 -1
- package/components/Icons/CoronaCertificate.js +17 -1
- package/components/Icons/CoronaCertificate.js.map +1 -1
- package/components/Icons/Coronavirus.d.ts +1 -1
- package/components/Icons/Coronavirus.d.ts.map +1 -1
- package/components/Icons/Coronavirus.js +5 -1
- package/components/Icons/Coronavirus.js.map +1 -1
- package/components/Icons/Cough.d.ts +1 -1
- package/components/Icons/Cough.d.ts.map +1 -1
- package/components/Icons/Cough.js +5 -1
- package/components/Icons/Cough.js.map +1 -1
- package/components/Icons/CriticalHealthInfo.d.ts +1 -1
- package/components/Icons/CriticalHealthInfo.d.ts.map +1 -1
- package/components/Icons/CriticalHealthInfo.js +5 -1
- package/components/Icons/CriticalHealthInfo.js.map +1 -1
- package/components/Icons/Cross.d.ts +1 -1
- package/components/Icons/Cross.d.ts.map +1 -1
- package/components/Icons/Cross.js +5 -1
- package/components/Icons/Cross.js.map +1 -1
- package/components/Icons/DataExchange.d.ts +1 -1
- package/components/Icons/DataExchange.d.ts.map +1 -1
- package/components/Icons/DataExchange.js +17 -1
- package/components/Icons/DataExchange.js.map +1 -1
- package/components/Icons/DataReceived.d.ts +1 -1
- package/components/Icons/DataReceived.d.ts.map +1 -1
- package/components/Icons/DataReceived.js +17 -1
- package/components/Icons/DataReceived.js.map +1 -1
- package/components/Icons/DataSent.d.ts +1 -1
- package/components/Icons/DataSent.d.ts.map +1 -1
- package/components/Icons/DataSent.js +17 -1
- package/components/Icons/DataSent.js.map +1 -1
- package/components/Icons/Depression.d.ts +1 -1
- package/components/Icons/Depression.d.ts.map +1 -1
- package/components/Icons/Depression.js +5 -1
- package/components/Icons/Depression.js.map +1 -1
- package/components/Icons/DigestiveSystem.d.ts +1 -1
- package/components/Icons/DigestiveSystem.d.ts.map +1 -1
- package/components/Icons/DigestiveSystem.js +5 -1
- package/components/Icons/DigestiveSystem.js.map +1 -1
- package/components/Icons/Dizzy.d.ts +1 -1
- package/components/Icons/Dizzy.d.ts.map +1 -1
- package/components/Icons/Dizzy.js +5 -1
- package/components/Icons/Dizzy.js.map +1 -1
- package/components/Icons/Documents.d.ts +1 -1
- package/components/Icons/Documents.d.ts.map +1 -1
- package/components/Icons/Documents.js +5 -1
- package/components/Icons/Documents.js.map +1 -1
- package/components/Icons/Dog.d.ts +1 -1
- package/components/Icons/Dog.d.ts.map +1 -1
- package/components/Icons/Dog.js +5 -1
- package/components/Icons/Dog.js.map +1 -1
- package/components/Icons/DonorCard.d.ts +1 -1
- package/components/Icons/DonorCard.d.ts.map +1 -1
- package/components/Icons/DonorCard.js +5 -1
- package/components/Icons/DonorCard.js.map +1 -1
- package/components/Icons/Download.d.ts +1 -1
- package/components/Icons/Download.d.ts.map +1 -1
- package/components/Icons/Download.js +30 -1
- package/components/Icons/Download.js.map +1 -1
- package/components/Icons/Draft.d.ts +1 -1
- package/components/Icons/Draft.d.ts.map +1 -1
- package/components/Icons/Draft.js +5 -1
- package/components/Icons/Draft.js.map +1 -1
- package/components/Icons/EChat.d.ts +1 -1
- package/components/Icons/EChat.d.ts.map +1 -1
- package/components/Icons/EChat.js +6 -1
- package/components/Icons/EChat.js.map +1 -1
- package/components/Icons/Ear.d.ts +1 -1
- package/components/Icons/Ear.d.ts.map +1 -1
- package/components/Icons/Ear.js +9 -1
- package/components/Icons/Ear.js.map +1 -1
- package/components/Icons/EarDeaf.d.ts +1 -1
- package/components/Icons/EarDeaf.d.ts.map +1 -1
- package/components/Icons/EarDeaf.js +6 -1
- package/components/Icons/EarDeaf.js.map +1 -1
- package/components/Icons/EarHearingAid.d.ts +1 -1
- package/components/Icons/EarHearingAid.d.ts.map +1 -1
- package/components/Icons/EarHearingAid.js +9 -1
- package/components/Icons/EarHearingAid.js.map +1 -1
- package/components/Icons/EarNoseThroat.d.ts +1 -1
- package/components/Icons/EarNoseThroat.d.ts.map +1 -1
- package/components/Icons/EarNoseThroat.js +5 -1
- package/components/Icons/EarNoseThroat.js.map +1 -1
- package/components/Icons/EarVolume.d.ts +1 -1
- package/components/Icons/EarVolume.d.ts.map +1 -1
- package/components/Icons/EarVolume.js +16 -1
- package/components/Icons/EarVolume.js.map +1 -1
- package/components/Icons/ElderlyPerson.d.ts +1 -1
- package/components/Icons/ElderlyPerson.d.ts.map +1 -1
- package/components/Icons/ElderlyPerson.js +5 -1
- package/components/Icons/ElderlyPerson.js.map +1 -1
- package/components/Icons/Embolization.d.ts +1 -1
- package/components/Icons/Embolization.d.ts.map +1 -1
- package/components/Icons/Embolization.js +17 -1
- package/components/Icons/Embolization.js.map +1 -1
- package/components/Icons/EmergencyCall.d.ts +1 -1
- package/components/Icons/EmergencyCall.d.ts.map +1 -1
- package/components/Icons/EmergencyCall.js +20 -1
- package/components/Icons/EmergencyCall.js.map +1 -1
- package/components/Icons/EmoticonAnnoyed.d.ts +1 -1
- package/components/Icons/EmoticonAnnoyed.d.ts.map +1 -1
- package/components/Icons/EmoticonAnnoyed.js +15 -1
- package/components/Icons/EmoticonAnnoyed.js.map +1 -1
- package/components/Icons/EmoticonDelighted.d.ts +1 -1
- package/components/Icons/EmoticonDelighted.d.ts.map +1 -1
- package/components/Icons/EmoticonDelighted.js +9 -1
- package/components/Icons/EmoticonDelighted.js.map +1 -1
- package/components/Icons/EmoticonDisappointed.d.ts +1 -1
- package/components/Icons/EmoticonDisappointed.d.ts.map +1 -1
- package/components/Icons/EmoticonDisappointed.js +9 -1
- package/components/Icons/EmoticonDisappointed.js.map +1 -1
- package/components/Icons/EmoticonHappy.d.ts +1 -1
- package/components/Icons/EmoticonHappy.d.ts.map +1 -1
- package/components/Icons/EmoticonHappy.js +9 -1
- package/components/Icons/EmoticonHappy.js.map +1 -1
- package/components/Icons/EmoticonMeh.d.ts +1 -1
- package/components/Icons/EmoticonMeh.d.ts.map +1 -1
- package/components/Icons/EmoticonMeh.js +9 -1
- package/components/Icons/EmoticonMeh.js.map +1 -1
- package/components/Icons/EnterFullScreen.d.ts +1 -1
- package/components/Icons/EnterFullScreen.d.ts.map +1 -1
- package/components/Icons/EnterFullScreen.js +6 -1
- package/components/Icons/EnterFullScreen.js.map +1 -1
- package/components/Icons/Envelope.d.ts +1 -1
- package/components/Icons/Envelope.d.ts.map +1 -1
- package/components/Icons/Envelope.js +6 -1
- package/components/Icons/Envelope.js.map +1 -1
- package/components/Icons/Epilepsy.d.ts +1 -1
- package/components/Icons/Epilepsy.d.ts.map +1 -1
- package/components/Icons/Epilepsy.js +5 -1
- package/components/Icons/Epilepsy.js.map +1 -1
- package/components/Icons/Eraser.d.ts +1 -1
- package/components/Icons/Eraser.d.ts.map +1 -1
- package/components/Icons/Eraser.js +6 -1
- package/components/Icons/Eraser.js.map +1 -1
- package/components/Icons/ErrorSignFill.d.ts +1 -1
- package/components/Icons/ErrorSignFill.d.ts.map +1 -1
- package/components/Icons/ErrorSignFill.js +6 -1
- package/components/Icons/ErrorSignFill.js.map +1 -1
- package/components/Icons/ErrorSignStroke.d.ts +1 -1
- package/components/Icons/ErrorSignStroke.d.ts.map +1 -1
- package/components/Icons/ErrorSignStroke.js +6 -1
- package/components/Icons/ErrorSignStroke.js.map +1 -1
- package/components/Icons/EuropeanHealthCard.d.ts +1 -1
- package/components/Icons/EuropeanHealthCard.d.ts.map +1 -1
- package/components/Icons/EuropeanHealthCard.js +5 -1
- package/components/Icons/EuropeanHealthCard.js.map +1 -1
- package/components/Icons/ExitFullScreen.d.ts +1 -1
- package/components/Icons/ExitFullScreen.d.ts.map +1 -1
- package/components/Icons/ExitFullScreen.js +6 -1
- package/components/Icons/ExitFullScreen.js.map +1 -1
- package/components/Icons/Eye.d.ts +1 -1
- package/components/Icons/Eye.d.ts.map +1 -1
- package/components/Icons/Eye.js +20 -1
- package/components/Icons/Eye.js.map +1 -1
- package/components/Icons/Facebook.d.ts +1 -1
- package/components/Icons/Facebook.d.ts.map +1 -1
- package/components/Icons/Facebook.js +5 -1
- package/components/Icons/Facebook.js.map +1 -1
- package/components/Icons/FallingLeaf.d.ts +1 -1
- package/components/Icons/FallingLeaf.d.ts.map +1 -1
- package/components/Icons/FallingLeaf.js +21 -1
- package/components/Icons/FallingLeaf.js.map +1 -1
- package/components/Icons/Female.d.ts +1 -1
- package/components/Icons/Female.d.ts.map +1 -1
- package/components/Icons/Female.js +5 -1
- package/components/Icons/Female.js.map +1 -1
- package/components/Icons/FemaleDoctor.d.ts +1 -1
- package/components/Icons/FemaleDoctor.d.ts.map +1 -1
- package/components/Icons/FemaleDoctor.js +5 -1
- package/components/Icons/FemaleDoctor.js.map +1 -1
- package/components/Icons/Ferry.d.ts +1 -1
- package/components/Icons/Ferry.d.ts.map +1 -1
- package/components/Icons/Ferry.js +5 -1
- package/components/Icons/Ferry.js.map +1 -1
- package/components/Icons/File.d.ts +1 -1
- package/components/Icons/File.d.ts.map +1 -1
- package/components/Icons/File.js +30 -1
- package/components/Icons/File.js.map +1 -1
- package/components/Icons/Filter.d.ts +1 -1
- package/components/Icons/Filter.d.ts.map +1 -1
- package/components/Icons/Filter.js +25 -1
- package/components/Icons/Filter.js.map +1 -1
- package/components/Icons/FingerBleed.d.ts +1 -1
- package/components/Icons/FingerBleed.d.ts.map +1 -1
- package/components/Icons/FingerBleed.js +5 -1
- package/components/Icons/FingerBleed.js.map +1 -1
- package/components/Icons/FirstAidKit.d.ts +1 -1
- package/components/Icons/FirstAidKit.d.ts.map +1 -1
- package/components/Icons/FirstAidKit.js +5 -1
- package/components/Icons/FirstAidKit.js.map +1 -1
- package/components/Icons/FloppyDisk.d.ts +1 -1
- package/components/Icons/FloppyDisk.d.ts.map +1 -1
- package/components/Icons/FloppyDisk.js +17 -1
- package/components/Icons/FloppyDisk.js.map +1 -1
- package/components/Icons/Football.d.ts +1 -1
- package/components/Icons/Football.d.ts.map +1 -1
- package/components/Icons/Football.js +5 -1
- package/components/Icons/Football.js.map +1 -1
- package/components/Icons/Form.d.ts +1 -1
- package/components/Icons/Form.d.ts.map +1 -1
- package/components/Icons/Form.js +6 -1
- package/components/Icons/Form.js.map +1 -1
- package/components/Icons/Forward.d.ts +1 -1
- package/components/Icons/Forward.d.ts.map +1 -1
- package/components/Icons/Forward.js +6 -1
- package/components/Icons/Forward.js.map +1 -1
- package/components/Icons/Gallery.d.ts +1 -1
- package/components/Icons/Gallery.d.ts.map +1 -1
- package/components/Icons/Gallery.js +30 -1
- package/components/Icons/Gallery.js.map +1 -1
- package/components/Icons/Garden.d.ts +1 -1
- package/components/Icons/Garden.d.ts.map +1 -1
- package/components/Icons/Garden.js +5 -1
- package/components/Icons/Garden.js.map +1 -1
- package/components/Icons/GasCan.d.ts +1 -1
- package/components/Icons/GasCan.d.ts.map +1 -1
- package/components/Icons/GasCan.js +5 -1
- package/components/Icons/GasCan.js.map +1 -1
- package/components/Icons/GenderIdentity.d.ts +1 -1
- package/components/Icons/GenderIdentity.d.ts.map +1 -1
- package/components/Icons/GenderIdentity.js +17 -1
- package/components/Icons/GenderIdentity.js.map +1 -1
- package/components/Icons/Glasses.d.ts +1 -1
- package/components/Icons/Glasses.d.ts.map +1 -1
- package/components/Icons/Glasses.js +20 -1
- package/components/Icons/Glasses.js.map +1 -1
- package/components/Icons/Globe.d.ts +1 -1
- package/components/Icons/Globe.d.ts.map +1 -1
- package/components/Icons/Globe.js +6 -1
- package/components/Icons/Globe.js.map +1 -1
- package/components/Icons/Graph.d.ts +1 -1
- package/components/Icons/Graph.d.ts.map +1 -1
- package/components/Icons/Graph.js +21 -1
- package/components/Icons/Graph.js.map +1 -1
- package/components/Icons/Group.d.ts +1 -1
- package/components/Icons/Group.d.ts.map +1 -1
- package/components/Icons/Group.js +28 -1
- package/components/Icons/Group.js.map +1 -1
- package/components/Icons/GroupTwins.d.ts +1 -1
- package/components/Icons/GroupTwins.d.ts.map +1 -1
- package/components/Icons/GroupTwins.js +63 -1
- package/components/Icons/GroupTwins.js.map +1 -1
- package/components/Icons/HTMLFile.d.ts +1 -1
- package/components/Icons/HTMLFile.d.ts.map +1 -1
- package/components/Icons/HTMLFile.js +9 -1
- package/components/Icons/HTMLFile.js.map +1 -1
- package/components/Icons/HandWaving.d.ts +1 -1
- package/components/Icons/HandWaving.d.ts.map +1 -1
- package/components/Icons/HandWaving.js +5 -1
- package/components/Icons/HandWaving.js.map +1 -1
- package/components/Icons/HandWithDisease.d.ts +1 -1
- package/components/Icons/HandWithDisease.d.ts.map +1 -1
- package/components/Icons/HandWithDisease.js +5 -1
- package/components/Icons/HandWithDisease.js.map +1 -1
- package/components/Icons/HandsAndHeart.d.ts +1 -1
- package/components/Icons/HandsAndHeart.d.ts.map +1 -1
- package/components/Icons/HandsAndHeart.js +18 -1
- package/components/Icons/HandsAndHeart.js.map +1 -1
- package/components/Icons/HealthClinic.d.ts +1 -1
- package/components/Icons/HealthClinic.d.ts.map +1 -1
- package/components/Icons/HealthClinic.js +17 -1
- package/components/Icons/HealthClinic.js.map +1 -1
- package/components/Icons/HealthWarning.d.ts +1 -1
- package/components/Icons/HealthWarning.d.ts.map +1 -1
- package/components/Icons/HealthWarning.js +17 -1
- package/components/Icons/HealthWarning.js.map +1 -1
- package/components/Icons/HealthcarePerson.d.ts +1 -1
- package/components/Icons/HealthcarePerson.d.ts.map +1 -1
- package/components/Icons/HealthcarePerson.js +57 -1
- package/components/Icons/HealthcarePerson.js.map +1 -1
- package/components/Icons/HealthcarePersonell.d.ts +1 -1
- package/components/Icons/HealthcarePersonell.d.ts.map +1 -1
- package/components/Icons/HealthcarePersonell.js +75 -1
- package/components/Icons/HealthcarePersonell.js.map +1 -1
- package/components/Icons/HearingProtection.d.ts +1 -1
- package/components/Icons/HearingProtection.d.ts.map +1 -1
- package/components/Icons/HearingProtection.js +23 -1
- package/components/Icons/HearingProtection.js.map +1 -1
- package/components/Icons/Heart.d.ts +1 -1
- package/components/Icons/Heart.d.ts.map +1 -1
- package/components/Icons/Heart.js +6 -1
- package/components/Icons/Heart.js.map +1 -1
- package/components/Icons/HeartHands.d.ts +1 -1
- package/components/Icons/HeartHands.d.ts.map +1 -1
- package/components/Icons/HeartHands.js +64 -1
- package/components/Icons/HeartHands.js.map +1 -1
- package/components/Icons/HelpSign.d.ts +1 -1
- package/components/Icons/HelpSign.d.ts.map +1 -1
- package/components/Icons/HelpSign.js +6 -1
- package/components/Icons/HelpSign.js.map +1 -1
- package/components/Icons/HelpingHand.d.ts +1 -1
- package/components/Icons/HelpingHand.d.ts.map +1 -1
- package/components/Icons/HelpingHand.js +17 -1
- package/components/Icons/HelpingHand.js.map +1 -1
- package/components/Icons/Hemodialysis.d.ts +1 -1
- package/components/Icons/Hemodialysis.d.ts.map +1 -1
- package/components/Icons/Hemodialysis.js +17 -1
- package/components/Icons/Hemodialysis.js.map +1 -1
- package/components/Icons/Hiker.d.ts +1 -1
- package/components/Icons/Hiker.d.ts.map +1 -1
- package/components/Icons/Hiker.js +5 -1
- package/components/Icons/Hiker.js.map +1 -1
- package/components/Icons/Hipprosthesis.d.ts +1 -1
- package/components/Icons/Hipprosthesis.d.ts.map +1 -1
- package/components/Icons/Hipprosthesis.js +17 -1
- package/components/Icons/Hipprosthesis.js.map +1 -1
- package/components/Icons/History.d.ts +1 -1
- package/components/Icons/History.d.ts.map +1 -1
- package/components/Icons/History.js +6 -1
- package/components/Icons/History.js.map +1 -1
- package/components/Icons/HivAndAids.d.ts +1 -1
- package/components/Icons/HivAndAids.d.ts.map +1 -1
- package/components/Icons/HivAndAids.js +5 -1
- package/components/Icons/HivAndAids.js.map +1 -1
- package/components/Icons/Home.d.ts +1 -1
- package/components/Icons/Home.d.ts.map +1 -1
- package/components/Icons/Home.js +30 -1
- package/components/Icons/Home.js.map +1 -1
- package/components/Icons/Hormone.d.ts +1 -1
- package/components/Icons/Hormone.d.ts.map +1 -1
- package/components/Icons/Hormone.js +5 -1
- package/components/Icons/Hormone.js.map +1 -1
- package/components/Icons/Hospital.d.ts +1 -1
- package/components/Icons/Hospital.d.ts.map +1 -1
- package/components/Icons/Hospital.js +30 -1
- package/components/Icons/Hospital.js.map +1 -1
- package/components/Icons/Hourglass.d.ts +1 -1
- package/components/Icons/Hourglass.d.ts.map +1 -1
- package/components/Icons/Hourglass.js +30 -1
- package/components/Icons/Hourglass.js.map +1 -1
- package/components/Icons/IconNames.d.ts +3 -0
- package/components/Icons/IconNames.d.ts.map +1 -0
- package/components/Icons/IconNames.js +308 -0
- package/components/Icons/IconNames.js.map +1 -0
- package/components/Icons/ImgFile.d.ts +1 -1
- package/components/Icons/ImgFile.d.ts.map +1 -1
- package/components/Icons/ImgFile.js +17 -1
- package/components/Icons/ImgFile.js.map +1 -1
- package/components/Icons/Inbox.d.ts +1 -1
- package/components/Icons/Inbox.d.ts.map +1 -1
- package/components/Icons/Inbox.js +11 -1
- package/components/Icons/Inbox.js.map +1 -1
- package/components/Icons/InfoSignFill.d.ts +1 -1
- package/components/Icons/InfoSignFill.d.ts.map +1 -1
- package/components/Icons/InfoSignFill.js +6 -1
- package/components/Icons/InfoSignFill.js.map +1 -1
- package/components/Icons/InfoSignStroke.d.ts +1 -1
- package/components/Icons/InfoSignStroke.d.ts.map +1 -1
- package/components/Icons/InfoSignStroke.js +6 -1
- package/components/Icons/InfoSignStroke.js.map +1 -1
- package/components/Icons/Instagram.d.ts +1 -1
- package/components/Icons/Instagram.d.ts.map +1 -1
- package/components/Icons/Instagram.js +5 -1
- package/components/Icons/Instagram.js.map +1 -1
- package/components/Icons/Intravenous.d.ts +1 -1
- package/components/Icons/Intravenous.d.ts.map +1 -1
- package/components/Icons/Intravenous.js +17 -1
- package/components/Icons/Intravenous.js.map +1 -1
- package/components/Icons/JointPain.d.ts +1 -1
- package/components/Icons/JointPain.d.ts.map +1 -1
- package/components/Icons/JointPain.js +5 -1
- package/components/Icons/JointPain.js.map +1 -1
- package/components/Icons/Journal.d.ts +1 -1
- package/components/Icons/Journal.d.ts.map +1 -1
- package/components/Icons/Journal.js +6 -1
- package/components/Icons/Journal.js.map +1 -1
- package/components/Icons/JpgFile.d.ts +1 -1
- package/components/Icons/JpgFile.d.ts.map +1 -1
- package/components/Icons/JpgFile.js +17 -1
- package/components/Icons/JpgFile.js.map +1 -1
- package/components/Icons/Kidney.d.ts +1 -1
- package/components/Icons/Kidney.d.ts.map +1 -1
- package/components/Icons/Kidney.js +5 -1
- package/components/Icons/Kidney.js.map +1 -1
- package/components/Icons/KitchenScale.d.ts +1 -1
- package/components/Icons/KitchenScale.d.ts.map +1 -1
- package/components/Icons/KitchenScale.js +17 -1
- package/components/Icons/KitchenScale.js.map +1 -1
- package/components/Icons/Kjernejournal.d.ts +1 -1
- package/components/Icons/Kjernejournal.d.ts.map +1 -1
- package/components/Icons/Kjernejournal.js +5 -1
- package/components/Icons/Kjernejournal.js.map +1 -1
- package/components/Icons/Laboratory.d.ts +1 -1
- package/components/Icons/Laboratory.d.ts.map +1 -1
- package/components/Icons/Laboratory.js +17 -1
- package/components/Icons/Laboratory.js.map +1 -1
- package/components/Icons/LaptopBlog.d.ts +1 -1
- package/components/Icons/LaptopBlog.d.ts.map +1 -1
- package/components/Icons/LaptopBlog.js +5 -1
- package/components/Icons/LaptopBlog.js.map +1 -1
- package/components/Icons/LawBook.d.ts +1 -1
- package/components/Icons/LawBook.d.ts.map +1 -1
- package/components/Icons/LawBook.js +5 -1
- package/components/Icons/LawBook.js.map +1 -1
- package/components/Icons/LegalDocument.d.ts +1 -1
- package/components/Icons/LegalDocument.d.ts.map +1 -1
- package/components/Icons/LegalDocument.js +27 -1
- package/components/Icons/LegalDocument.js.map +1 -1
- package/components/Icons/LightBulb.d.ts +1 -1
- package/components/Icons/LightBulb.d.ts.map +1 -1
- package/components/Icons/LightBulb.js +5 -1
- package/components/Icons/LightBulb.js.map +1 -1
- package/components/Icons/List.d.ts +1 -1
- package/components/Icons/List.d.ts.map +1 -1
- package/components/Icons/List.js +30 -1
- package/components/Icons/List.js.map +1 -1
- package/components/Icons/Location.d.ts +1 -1
- package/components/Icons/Location.d.ts.map +1 -1
- package/components/Icons/Location.js +6 -1
- package/components/Icons/Location.js.map +1 -1
- package/components/Icons/Lock.d.ts +1 -1
- package/components/Icons/Lock.d.ts.map +1 -1
- package/components/Icons/Lock.js +18 -1
- package/components/Icons/Lock.js.map +1 -1
- package/components/Icons/Login.d.ts +1 -1
- package/components/Icons/Login.d.ts.map +1 -1
- package/components/Icons/Login.js +37 -1
- package/components/Icons/Login.js.map +1 -1
- package/components/Icons/Logout.d.ts +1 -1
- package/components/Icons/Logout.d.ts.map +1 -1
- package/components/Icons/Logout.js +37 -1
- package/components/Icons/Logout.js.map +1 -1
- package/components/Icons/Lungs.d.ts +1 -1
- package/components/Icons/Lungs.d.ts.map +1 -1
- package/components/Icons/Lungs.js +5 -1
- package/components/Icons/Lungs.js.map +1 -1
- package/components/Icons/Makeup.d.ts +1 -1
- package/components/Icons/Makeup.d.ts.map +1 -1
- package/components/Icons/Makeup.js +5 -1
- package/components/Icons/Makeup.js.map +1 -1
- package/components/Icons/MaleDoctor.d.ts +1 -1
- package/components/Icons/MaleDoctor.d.ts.map +1 -1
- package/components/Icons/MaleDoctor.js +5 -1
- package/components/Icons/MaleDoctor.js.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.d.ts +1 -1
- package/components/Icons/MaleDoctorAndPerson.d.ts.map +1 -1
- package/components/Icons/MaleDoctorAndPerson.js +5 -1
- package/components/Icons/MaleDoctorAndPerson.js.map +1 -1
- package/components/Icons/MaleGenitalia.d.ts +1 -1
- package/components/Icons/MaleGenitalia.d.ts.map +1 -1
- package/components/Icons/MaleGenitalia.js +5 -1
- package/components/Icons/MaleGenitalia.js.map +1 -1
- package/components/Icons/Medicine.d.ts +1 -1
- package/components/Icons/Medicine.d.ts.map +1 -1
- package/components/Icons/Medicine.js +30 -1
- package/components/Icons/Medicine.js.map +1 -1
- package/components/Icons/MedicineWarning.d.ts +1 -1
- package/components/Icons/MedicineWarning.d.ts.map +1 -1
- package/components/Icons/MedicineWarning.js +17 -1
- package/components/Icons/MedicineWarning.js.map +1 -1
- package/components/Icons/MentalHealthAdult.d.ts +1 -1
- package/components/Icons/MentalHealthAdult.d.ts.map +1 -1
- package/components/Icons/MentalHealthAdult.js +5 -1
- package/components/Icons/MentalHealthAdult.js.map +1 -1
- package/components/Icons/MentalHealthChild.d.ts +1 -1
- package/components/Icons/MentalHealthChild.d.ts.map +1 -1
- package/components/Icons/MentalHealthChild.js +5 -1
- package/components/Icons/MentalHealthChild.js.map +1 -1
- package/components/Icons/Menu.d.ts +1 -1
- package/components/Icons/Menu.d.ts.map +1 -1
- package/components/Icons/Menu.js +6 -1
- package/components/Icons/Menu.js.map +1 -1
- package/components/Icons/Microscope.d.ts +1 -1
- package/components/Icons/Microscope.d.ts.map +1 -1
- package/components/Icons/Microscope.js +17 -1
- package/components/Icons/Microscope.js.map +1 -1
- package/components/Icons/Minus.d.ts +1 -1
- package/components/Icons/Minus.d.ts.map +1 -1
- package/components/Icons/Minus.js +6 -1
- package/components/Icons/Minus.js.map +1 -1
- package/components/Icons/Mirror.d.ts +1 -1
- package/components/Icons/Mirror.d.ts.map +1 -1
- package/components/Icons/Mirror.js +5 -1
- package/components/Icons/Mirror.js.map +1 -1
- package/components/Icons/MobilePhone.d.ts +1 -1
- package/components/Icons/MobilePhone.d.ts.map +1 -1
- package/components/Icons/MobilePhone.js +6 -1
- package/components/Icons/MobilePhone.js.map +1 -1
- package/components/Icons/MotherHoldingBaby.d.ts +1 -1
- package/components/Icons/MotherHoldingBaby.d.ts.map +1 -1
- package/components/Icons/MotherHoldingBaby.js +5 -1
- package/components/Icons/MotherHoldingBaby.js.map +1 -1
- package/components/Icons/MuscleBack.d.ts +1 -1
- package/components/Icons/MuscleBack.d.ts.map +1 -1
- package/components/Icons/MuscleBack.js +5 -1
- package/components/Icons/MuscleBack.js.map +1 -1
- package/components/Icons/MuscleLeg.d.ts +1 -1
- package/components/Icons/MuscleLeg.d.ts.map +1 -1
- package/components/Icons/MuscleLeg.js +5 -1
- package/components/Icons/MuscleLeg.js.map +1 -1
- package/components/Icons/Mushroom.d.ts +1 -1
- package/components/Icons/Mushroom.d.ts.map +1 -1
- package/components/Icons/Mushroom.js +5 -1
- package/components/Icons/Mushroom.js.map +1 -1
- package/components/Icons/Music.d.ts +1 -1
- package/components/Icons/Music.d.ts.map +1 -1
- package/components/Icons/Music.js +17 -1
- package/components/Icons/Music.js.map +1 -1
- package/components/Icons/MusselsAndSalt.d.ts +1 -1
- package/components/Icons/MusselsAndSalt.d.ts.map +1 -1
- package/components/Icons/MusselsAndSalt.js +5 -1
- package/components/Icons/MusselsAndSalt.js.map +1 -1
- package/components/Icons/NoAccess.d.ts +1 -1
- package/components/Icons/NoAccess.d.ts.map +1 -1
- package/components/Icons/NoAccess.js +39 -1
- package/components/Icons/NoAccess.js.map +1 -1
- package/components/Icons/NoEye.d.ts +1 -1
- package/components/Icons/NoEye.d.ts.map +1 -1
- package/components/Icons/NoEye.js +44 -1
- package/components/Icons/NoEye.js.map +1 -1
- package/components/Icons/NoFilter.d.ts +1 -1
- package/components/Icons/NoFilter.d.ts.map +1 -1
- package/components/Icons/NoFilter.js +6 -1
- package/components/Icons/NoFilter.js.map +1 -1
- package/components/Icons/Notepad.d.ts +1 -1
- package/components/Icons/Notepad.d.ts.map +1 -1
- package/components/Icons/Notepad.js +5 -1
- package/components/Icons/Notepad.js.map +1 -1
- package/components/Icons/Osteotomy.d.ts +1 -1
- package/components/Icons/Osteotomy.d.ts.map +1 -1
- package/components/Icons/Osteotomy.js +17 -1
- package/components/Icons/Osteotomy.js.map +1 -1
- package/components/Icons/PaintRoller.d.ts +1 -1
- package/components/Icons/PaintRoller.d.ts.map +1 -1
- package/components/Icons/PaintRoller.js +5 -1
- package/components/Icons/PaintRoller.js.map +1 -1
- package/components/Icons/PaperPlane.d.ts +1 -1
- package/components/Icons/PaperPlane.d.ts.map +1 -1
- package/components/Icons/PaperPlane.js +6 -1
- package/components/Icons/PaperPlane.js.map +1 -1
- package/components/Icons/PatientAndPerson.d.ts +1 -1
- package/components/Icons/PatientAndPerson.d.ts.map +1 -1
- package/components/Icons/PatientAndPerson.js +5 -1
- package/components/Icons/PatientAndPerson.js.map +1 -1
- package/components/Icons/Pause.d.ts +1 -1
- package/components/Icons/Pause.d.ts.map +1 -1
- package/components/Icons/Pause.js +6 -1
- package/components/Icons/Pause.js.map +1 -1
- package/components/Icons/PdfFile.d.ts +1 -1
- package/components/Icons/PdfFile.d.ts.map +1 -1
- package/components/Icons/PdfFile.js +17 -1
- package/components/Icons/PdfFile.js.map +1 -1
- package/components/Icons/Pencil.d.ts +1 -1
- package/components/Icons/Pencil.d.ts.map +1 -1
- package/components/Icons/Pencil.js +6 -1
- package/components/Icons/Pencil.js.map +1 -1
- package/components/Icons/PeopleTalking.d.ts +1 -1
- package/components/Icons/PeopleTalking.d.ts.map +1 -1
- package/components/Icons/PeopleTalking.js +17 -1
- package/components/Icons/PeopleTalking.js.map +1 -1
- package/components/Icons/Peritonealdialysis.d.ts +1 -1
- package/components/Icons/Peritonealdialysis.d.ts.map +1 -1
- package/components/Icons/Peritonealdialysis.js +17 -1
- package/components/Icons/Peritonealdialysis.js.map +1 -1
- package/components/Icons/Person.d.ts +1 -1
- package/components/Icons/Person.d.ts.map +1 -1
- package/components/Icons/Person.js +5 -1
- package/components/Icons/Person.js.map +1 -1
- package/components/Icons/PersonAndPatient.d.ts +1 -1
- package/components/Icons/PersonAndPatient.d.ts.map +1 -1
- package/components/Icons/PersonAndPatient.js +5 -1
- package/components/Icons/PersonAndPatient.js.map +1 -1
- package/components/Icons/PersonCancel.d.ts +1 -1
- package/components/Icons/PersonCancel.d.ts.map +1 -1
- package/components/Icons/PersonCancel.js +57 -1
- package/components/Icons/PersonCancel.js.map +1 -1
- package/components/Icons/PersonInXRayMachine.d.ts +1 -1
- package/components/Icons/PersonInXRayMachine.d.ts.map +1 -1
- package/components/Icons/PersonInXRayMachine.js +17 -1
- package/components/Icons/PersonInXRayMachine.js.map +1 -1
- package/components/Icons/PersonOverweight.d.ts +1 -1
- package/components/Icons/PersonOverweight.d.ts.map +1 -1
- package/components/Icons/PersonOverweight.js +5 -1
- package/components/Icons/PersonOverweight.js.map +1 -1
- package/components/Icons/PersonRelaxing.d.ts +1 -1
- package/components/Icons/PersonRelaxing.d.ts.map +1 -1
- package/components/Icons/PersonRelaxing.js +5 -1
- package/components/Icons/PersonRelaxing.js.map +1 -1
- package/components/Icons/PersonWithBrain.d.ts +1 -1
- package/components/Icons/PersonWithBrain.d.ts.map +1 -1
- package/components/Icons/PersonWithBrain.js +5 -1
- package/components/Icons/PersonWithBrain.js.map +1 -1
- package/components/Icons/PersonWithBrokenArm.d.ts +1 -1
- package/components/Icons/PersonWithBrokenArm.d.ts.map +1 -1
- package/components/Icons/PersonWithBrokenArm.js +5 -1
- package/components/Icons/PersonWithBrokenArm.js.map +1 -1
- package/components/Icons/PersonWithCrutches.d.ts +1 -1
- package/components/Icons/PersonWithCrutches.d.ts.map +1 -1
- package/components/Icons/PersonWithCrutches.js +5 -1
- package/components/Icons/PersonWithCrutches.js.map +1 -1
- package/components/Icons/PersonWithJaw.d.ts +1 -1
- package/components/Icons/PersonWithJaw.d.ts.map +1 -1
- package/components/Icons/PersonWithJaw.js +5 -1
- package/components/Icons/PersonWithJaw.js.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.d.ts +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.d.ts.map +1 -1
- package/components/Icons/PersonWithMagnifyingGlass.js +5 -1
- package/components/Icons/PersonWithMagnifyingGlass.js.map +1 -1
- package/components/Icons/PersonWithSenses.d.ts +1 -1
- package/components/Icons/PersonWithSenses.d.ts.map +1 -1
- package/components/Icons/PersonWithSenses.js +5 -1
- package/components/Icons/PersonWithSenses.js.map +1 -1
- package/components/Icons/PersonWorking.d.ts +1 -1
- package/components/Icons/PersonWorking.d.ts.map +1 -1
- package/components/Icons/PersonWorking.js +5 -1
- package/components/Icons/PersonWorking.js.map +1 -1
- package/components/Icons/PersonalPlan.d.ts +1 -1
- package/components/Icons/PersonalPlan.d.ts.map +1 -1
- package/components/Icons/PersonalPlan.js +33 -1
- package/components/Icons/PersonalPlan.js.map +1 -1
- package/components/Icons/PizzaSlice.d.ts +1 -1
- package/components/Icons/PizzaSlice.d.ts.map +1 -1
- package/components/Icons/PizzaSlice.js +5 -1
- package/components/Icons/PizzaSlice.js.map +1 -1
- package/components/Icons/Plane.d.ts +1 -1
- package/components/Icons/Plane.d.ts.map +1 -1
- package/components/Icons/Plane.js +5 -1
- package/components/Icons/Plane.js.map +1 -1
- package/components/Icons/Plant.d.ts +1 -1
- package/components/Icons/Plant.d.ts.map +1 -1
- package/components/Icons/Plant.js +5 -1
- package/components/Icons/Plant.js.map +1 -1
- package/components/Icons/Play.d.ts +1 -1
- package/components/Icons/Play.d.ts.map +1 -1
- package/components/Icons/Play.js +6 -1
- package/components/Icons/Play.js.map +1 -1
- package/components/Icons/PlusLarge.d.ts +1 -1
- package/components/Icons/PlusLarge.d.ts.map +1 -1
- package/components/Icons/PlusLarge.js +6 -1
- package/components/Icons/PlusLarge.js.map +1 -1
- package/components/Icons/PlusSmall.d.ts +1 -1
- package/components/Icons/PlusSmall.d.ts.map +1 -1
- package/components/Icons/PlusSmall.js +6 -1
- package/components/Icons/PlusSmall.js.map +1 -1
- package/components/Icons/PngFile.d.ts +1 -1
- package/components/Icons/PngFile.d.ts.map +1 -1
- package/components/Icons/PngFile.js +17 -1
- package/components/Icons/PngFile.js.map +1 -1
- package/components/Icons/Podcast.d.ts +1 -1
- package/components/Icons/Podcast.d.ts.map +1 -1
- package/components/Icons/Podcast.js +17 -1
- package/components/Icons/Podcast.js.map +1 -1
- package/components/Icons/PoisonInformation.d.ts +1 -1
- package/components/Icons/PoisonInformation.d.ts.map +1 -1
- package/components/Icons/PoisonInformation.js +5 -1
- package/components/Icons/PoisonInformation.js.map +1 -1
- package/components/Icons/Pregnant.d.ts +1 -1
- package/components/Icons/Pregnant.d.ts.map +1 -1
- package/components/Icons/Pregnant.js +5 -1
- package/components/Icons/Pregnant.js.map +1 -1
- package/components/Icons/Printer.d.ts +1 -1
- package/components/Icons/Printer.d.ts.map +1 -1
- package/components/Icons/Printer.js +30 -1
- package/components/Icons/Printer.js.map +1 -1
- package/components/Icons/Psychosis.d.ts +1 -1
- package/components/Icons/Psychosis.d.ts.map +1 -1
- package/components/Icons/Psychosis.js +5 -1
- package/components/Icons/Psychosis.js.map +1 -1
- package/components/Icons/Publication.d.ts +1 -1
- package/components/Icons/Publication.d.ts.map +1 -1
- package/components/Icons/Publication.js +17 -1
- package/components/Icons/Publication.js.map +1 -1
- package/components/Icons/Puzzle.d.ts +1 -1
- package/components/Icons/Puzzle.d.ts.map +1 -1
- package/components/Icons/Puzzle.js +5 -1
- package/components/Icons/Puzzle.js.map +1 -1
- package/components/Icons/QrCode.d.ts +1 -1
- package/components/Icons/QrCode.d.ts.map +1 -1
- package/components/Icons/QrCode.js +30 -1
- package/components/Icons/QrCode.js.map +1 -1
- package/components/Icons/Quarrel.d.ts +1 -1
- package/components/Icons/Quarrel.d.ts.map +1 -1
- package/components/Icons/Quarrel.js +17 -1
- package/components/Icons/Quarrel.js.map +1 -1
- package/components/Icons/RadioTherapy.d.ts +1 -1
- package/components/Icons/RadioTherapy.d.ts.map +1 -1
- package/components/Icons/RadioTherapy.js +17 -1
- package/components/Icons/RadioTherapy.js.map +1 -1
- package/components/Icons/RadioactiveTreatment.d.ts +1 -1
- package/components/Icons/RadioactiveTreatment.d.ts.map +1 -1
- package/components/Icons/RadioactiveTreatment.js +17 -1
- package/components/Icons/RadioactiveTreatment.js.map +1 -1
- package/components/Icons/Radioiodine.d.ts +1 -1
- package/components/Icons/Radioiodine.d.ts.map +1 -1
- package/components/Icons/Radioiodine.js +17 -1
- package/components/Icons/Radioiodine.js.map +1 -1
- package/components/Icons/Receipt.d.ts +1 -1
- package/components/Icons/Receipt.d.ts.map +1 -1
- package/components/Icons/Receipt.js +5 -1
- package/components/Icons/Receipt.js.map +1 -1
- package/components/Icons/Receptionist.d.ts +1 -1
- package/components/Icons/Receptionist.d.ts.map +1 -1
- package/components/Icons/Receptionist.js +6 -1
- package/components/Icons/Receptionist.js.map +1 -1
- package/components/Icons/Recovery.d.ts +1 -1
- package/components/Icons/Recovery.d.ts.map +1 -1
- package/components/Icons/Recovery.js +17 -1
- package/components/Icons/Recovery.js.map +1 -1
- package/components/Icons/Referral.d.ts +1 -1
- package/components/Icons/Referral.d.ts.map +1 -1
- package/components/Icons/Referral.js +6 -1
- package/components/Icons/Referral.js.map +1 -1
- package/components/Icons/Refresh.d.ts +1 -1
- package/components/Icons/Refresh.d.ts.map +1 -1
- package/components/Icons/Refresh.js +6 -1
- package/components/Icons/Refresh.js.map +1 -1
- package/components/Icons/Refund.d.ts +1 -1
- package/components/Icons/Refund.d.ts.map +1 -1
- package/components/Icons/Refund.js +5 -1
- package/components/Icons/Refund.js.map +1 -1
- package/components/Icons/Reply.d.ts +1 -1
- package/components/Icons/Reply.d.ts.map +1 -1
- package/components/Icons/Reply.js +6 -1
- package/components/Icons/Reply.js.map +1 -1
- package/components/Icons/Rocket.d.ts +1 -1
- package/components/Icons/Rocket.d.ts.map +1 -1
- package/components/Icons/Rocket.js +5 -1
- package/components/Icons/Rocket.js.map +1 -1
- package/components/Icons/RtfFile.d.ts +1 -1
- package/components/Icons/RtfFile.d.ts.map +1 -1
- package/components/Icons/RtfFile.js +17 -1
- package/components/Icons/RtfFile.js.map +1 -1
- package/components/Icons/STDs.d.ts +1 -1
- package/components/Icons/STDs.d.ts.map +1 -1
- package/components/Icons/STDs.js +17 -1
- package/components/Icons/STDs.js.map +1 -1
- package/components/Icons/Save.d.ts +1 -1
- package/components/Icons/Save.d.ts.map +1 -1
- package/components/Icons/Save.js +6 -1
- package/components/Icons/Save.js.map +1 -1
- package/components/Icons/Scale.d.ts +1 -1
- package/components/Icons/Scale.d.ts.map +1 -1
- package/components/Icons/Scale.js +5 -1
- package/components/Icons/Scale.js.map +1 -1
- package/components/Icons/ScreenReader.d.ts +1 -1
- package/components/Icons/ScreenReader.d.ts.map +1 -1
- package/components/Icons/ScreenReader.js +37 -1
- package/components/Icons/ScreenReader.js.map +1 -1
- package/components/Icons/Search.d.ts +1 -1
- package/components/Icons/Search.d.ts.map +1 -1
- package/components/Icons/Search.js +6 -1
- package/components/Icons/Search.js.map +1 -1
- package/components/Icons/SectionSign.d.ts +1 -1
- package/components/Icons/SectionSign.d.ts.map +1 -1
- package/components/Icons/SectionSign.js +30 -1
- package/components/Icons/SectionSign.js.map +1 -1
- package/components/Icons/Settings.d.ts +1 -1
- package/components/Icons/Settings.d.ts.map +1 -1
- package/components/Icons/Settings.js +30 -1
- package/components/Icons/Settings.js.map +1 -1
- package/components/Icons/Sexualorientation.d.ts +1 -1
- package/components/Icons/Sexualorientation.d.ts.map +1 -1
- package/components/Icons/Sexualorientation.js +17 -1
- package/components/Icons/Sexualorientation.js.map +1 -1
- package/components/Icons/ShakingHand.d.ts +1 -1
- package/components/Icons/ShakingHand.d.ts.map +1 -1
- package/components/Icons/ShakingHand.js +11 -1
- package/components/Icons/ShakingHand.js.map +1 -1
- package/components/Icons/Share.d.ts +1 -1
- package/components/Icons/Share.d.ts.map +1 -1
- package/components/Icons/Share.js +6 -1
- package/components/Icons/Share.js.map +1 -1
- package/components/Icons/Shield.d.ts +1 -1
- package/components/Icons/Shield.d.ts.map +1 -1
- package/components/Icons/Shield.js +17 -1
- package/components/Icons/Shield.js.map +1 -1
- package/components/Icons/ShuntOperation.d.ts +1 -1
- package/components/Icons/ShuntOperation.d.ts.map +1 -1
- package/components/Icons/ShuntOperation.js +17 -1
- package/components/Icons/ShuntOperation.js.map +1 -1
- package/components/Icons/Skeleton.d.ts +1 -1
- package/components/Icons/Skeleton.d.ts.map +1 -1
- package/components/Icons/Skeleton.js +5 -1
- package/components/Icons/Skeleton.js.map +1 -1
- package/components/Icons/Skin.d.ts +1 -1
- package/components/Icons/Skin.d.ts.map +1 -1
- package/components/Icons/Skin.js +5 -1
- package/components/Icons/Skin.js.map +1 -1
- package/components/Icons/Snake.d.ts +1 -1
- package/components/Icons/Snake.d.ts.map +1 -1
- package/components/Icons/Snake.js +5 -1
- package/components/Icons/Snake.js.map +1 -1
- package/components/Icons/Snapchat.d.ts +1 -1
- package/components/Icons/Snapchat.d.ts.map +1 -1
- package/components/Icons/Snapchat.js +5 -1
- package/components/Icons/Snapchat.js.map +1 -1
- package/components/Icons/SortDown.d.ts +1 -1
- package/components/Icons/SortDown.d.ts.map +1 -1
- package/components/Icons/SortDown.js +9 -1
- package/components/Icons/SortDown.js.map +1 -1
- package/components/Icons/SortUp.d.ts +1 -1
- package/components/Icons/SortUp.d.ts.map +1 -1
- package/components/Icons/SortUp.js +9 -1
- package/components/Icons/SortUp.js.map +1 -1
- package/components/Icons/SpeechBubble.d.ts +1 -1
- package/components/Icons/SpeechBubble.d.ts.map +1 -1
- package/components/Icons/SpeechBubble.js +30 -1
- package/components/Icons/SpeechBubble.js.map +1 -1
- package/components/Icons/Spray.d.ts +1 -1
- package/components/Icons/Spray.d.ts.map +1 -1
- package/components/Icons/Spray.js +5 -1
- package/components/Icons/Spray.js.map +1 -1
- package/components/Icons/Stopwatch.d.ts +1 -1
- package/components/Icons/Stopwatch.d.ts.map +1 -1
- package/components/Icons/Stopwatch.js +30 -1
- package/components/Icons/Stopwatch.js.map +1 -1
- package/components/Icons/Sun.d.ts +1 -1
- package/components/Icons/Sun.d.ts.map +1 -1
- package/components/Icons/Sun.js +23 -1
- package/components/Icons/Sun.js.map +1 -1
- package/components/Icons/SupportingPerson.d.ts +1 -1
- package/components/Icons/SupportingPerson.d.ts.map +1 -1
- package/components/Icons/SupportingPerson.js +41 -1
- package/components/Icons/SupportingPerson.js.map +1 -1
- package/components/Icons/Surgery.d.ts +1 -1
- package/components/Icons/Surgery.d.ts.map +1 -1
- package/components/Icons/Surgery.js +17 -1
- package/components/Icons/Surgery.js.map +1 -1
- package/components/Icons/Syringe.d.ts +1 -1
- package/components/Icons/Syringe.d.ts.map +1 -1
- package/components/Icons/Syringe.js +22 -1
- package/components/Icons/Syringe.js.map +1 -1
- package/components/Icons/Taxi.d.ts +1 -1
- package/components/Icons/Taxi.d.ts.map +1 -1
- package/components/Icons/Taxi.js +5 -1
- package/components/Icons/Taxi.js.map +1 -1
- package/components/Icons/TeddyBear.d.ts +1 -1
- package/components/Icons/TeddyBear.d.ts.map +1 -1
- package/components/Icons/TeddyBear.js +5 -1
- package/components/Icons/TeddyBear.js.map +1 -1
- package/components/Icons/Teenagers.d.ts +1 -1
- package/components/Icons/Teenagers.d.ts.map +1 -1
- package/components/Icons/Teenagers.js +17 -1
- package/components/Icons/Teenagers.js.map +1 -1
- package/components/Icons/ThinkingAboutBaby.d.ts +1 -1
- package/components/Icons/ThinkingAboutBaby.d.ts.map +1 -1
- package/components/Icons/ThinkingAboutBaby.js +5 -1
- package/components/Icons/ThinkingAboutBaby.js.map +1 -1
- package/components/Icons/Ticket.d.ts +1 -1
- package/components/Icons/Ticket.d.ts.map +1 -1
- package/components/Icons/Ticket.js +5 -1
- package/components/Icons/Ticket.js.map +1 -1
- package/components/Icons/TimePassing.d.ts +1 -1
- package/components/Icons/TimePassing.d.ts.map +1 -1
- package/components/Icons/TimePassing.js +30 -1
- package/components/Icons/TimePassing.js.map +1 -1
- package/components/Icons/Tombstone.d.ts +1 -1
- package/components/Icons/Tombstone.d.ts.map +1 -1
- package/components/Icons/Tombstone.js +21 -1
- package/components/Icons/Tombstone.js.map +1 -1
- package/components/Icons/Toolbox.d.ts +1 -1
- package/components/Icons/Toolbox.d.ts.map +1 -1
- package/components/Icons/Toolbox.js +42 -1
- package/components/Icons/Toolbox.js.map +1 -1
- package/components/Icons/Tooth.d.ts +1 -1
- package/components/Icons/Tooth.d.ts.map +1 -1
- package/components/Icons/Tooth.js +5 -1
- package/components/Icons/Tooth.js.map +1 -1
- package/components/Icons/TotalKneeProsthesis.d.ts +1 -1
- package/components/Icons/TotalKneeProsthesis.d.ts.map +1 -1
- package/components/Icons/TotalKneeProsthesis.js +17 -1
- package/components/Icons/TotalKneeProsthesis.js.map +1 -1
- package/components/Icons/Train.d.ts +1 -1
- package/components/Icons/Train.d.ts.map +1 -1
- package/components/Icons/Train.js +5 -1
- package/components/Icons/Train.js.map +1 -1
- package/components/Icons/Transplantation.d.ts +1 -1
- package/components/Icons/Transplantation.d.ts.map +1 -1
- package/components/Icons/Transplantation.js +17 -1
- package/components/Icons/Transplantation.js.map +1 -1
- package/components/Icons/TrashCan.d.ts +1 -1
- package/components/Icons/TrashCan.d.ts.map +1 -1
- package/components/Icons/TrashCan.js +30 -1
- package/components/Icons/TrashCan.js.map +1 -1
- package/components/Icons/TravelRoute.d.ts +1 -1
- package/components/Icons/TravelRoute.d.ts.map +1 -1
- package/components/Icons/TravelRoute.js +50 -1
- package/components/Icons/TravelRoute.js.map +1 -1
- package/components/Icons/TriangleX.d.ts +1 -1
- package/components/Icons/TriangleX.d.ts.map +1 -1
- package/components/Icons/TriangleX.js +37 -1
- package/components/Icons/TriangleX.js.map +1 -1
- package/components/Icons/Twitter.d.ts +1 -1
- package/components/Icons/Twitter.d.ts.map +1 -1
- package/components/Icons/Twitter.js +5 -1
- package/components/Icons/Twitter.js.map +1 -1
- package/components/Icons/Undo.d.ts +1 -1
- package/components/Icons/Undo.d.ts.map +1 -1
- package/components/Icons/Undo.js +42 -1
- package/components/Icons/Undo.js.map +1 -1
- package/components/Icons/UniProsthesis.d.ts +1 -1
- package/components/Icons/UniProsthesis.d.ts.map +1 -1
- package/components/Icons/UniProsthesis.js +17 -1
- package/components/Icons/UniProsthesis.js.map +1 -1
- package/components/Icons/Upload.d.ts +1 -1
- package/components/Icons/Upload.d.ts.map +1 -1
- package/components/Icons/Upload.js +6 -1
- package/components/Icons/Upload.js.map +1 -1
- package/components/Icons/UserOrganization.d.ts +1 -1
- package/components/Icons/UserOrganization.d.ts.map +1 -1
- package/components/Icons/UserOrganization.js +5 -1
- package/components/Icons/UserOrganization.js.map +1 -1
- package/components/Icons/Vaccine.d.ts +1 -1
- package/components/Icons/Vaccine.d.ts.map +1 -1
- package/components/Icons/Vaccine.js +30 -1
- package/components/Icons/Vaccine.js.map +1 -1
- package/components/Icons/VerticalDots.d.ts +1 -1
- package/components/Icons/VerticalDots.d.ts.map +1 -1
- package/components/Icons/VerticalDots.js +6 -1
- package/components/Icons/VerticalDots.js.map +1 -1
- package/components/Icons/VideoCamera.d.ts +1 -1
- package/components/Icons/VideoCamera.d.ts.map +1 -1
- package/components/Icons/VideoCamera.js +30 -1
- package/components/Icons/VideoCamera.js.map +1 -1
- package/components/Icons/VideoChat.d.ts +1 -1
- package/components/Icons/VideoChat.d.ts.map +1 -1
- package/components/Icons/VideoChat.js +6 -1
- package/components/Icons/VideoChat.js.map +1 -1
- package/components/Icons/Wallet.d.ts +1 -1
- package/components/Icons/Wallet.d.ts.map +1 -1
- package/components/Icons/Wallet.js +6 -1
- package/components/Icons/Wallet.js.map +1 -1
- package/components/Icons/Watch.d.ts +1 -1
- package/components/Icons/Watch.d.ts.map +1 -1
- package/components/Icons/Watch.js +30 -1
- package/components/Icons/Watch.js.map +1 -1
- package/components/Icons/Website.d.ts +1 -1
- package/components/Icons/Website.d.ts.map +1 -1
- package/components/Icons/Website.js +17 -1
- package/components/Icons/Website.js.map +1 -1
- package/components/Icons/Wheelchair.d.ts +1 -1
- package/components/Icons/Wheelchair.d.ts.map +1 -1
- package/components/Icons/Wheelchair.js +17 -1
- package/components/Icons/Wheelchair.js.map +1 -1
- package/components/Icons/WheelchairActive.d.ts +1 -1
- package/components/Icons/WheelchairActive.d.ts.map +1 -1
- package/components/Icons/WheelchairActive.js +17 -1
- package/components/Icons/WheelchairActive.js.map +1 -1
- package/components/Icons/Window.d.ts +1 -1
- package/components/Icons/Window.d.ts.map +1 -1
- package/components/Icons/Window.js +5 -1
- package/components/Icons/Window.js.map +1 -1
- package/components/Icons/WordDocument.d.ts +1 -1
- package/components/Icons/WordDocument.d.ts.map +1 -1
- package/components/Icons/WordDocument.js +11 -1
- package/components/Icons/WordDocument.js.map +1 -1
- package/components/Icons/WorkSuitcase.d.ts +1 -1
- package/components/Icons/WorkSuitcase.d.ts.map +1 -1
- package/components/Icons/WorkSuitcase.js +11 -1
- package/components/Icons/WorkSuitcase.js.map +1 -1
- package/components/Icons/X.d.ts +1 -1
- package/components/Icons/X.d.ts.map +1 -1
- package/components/Icons/X.js +6 -1
- package/components/Icons/X.js.map +1 -1
- package/components/Icons/XOutline.d.ts +1 -1
- package/components/Icons/XOutline.d.ts.map +1 -1
- package/components/Icons/XOutline.js +17 -1
- package/components/Icons/XOutline.js.map +1 -1
- package/components/Icons/XmlFile.d.ts +1 -1
- package/components/Icons/XmlFile.d.ts.map +1 -1
- package/components/Icons/XmlFile.js +17 -1
- package/components/Icons/XmlFile.js.map +1 -1
- package/components/Icons/YouTube.d.ts +1 -1
- package/components/Icons/YouTube.d.ts.map +1 -1
- package/components/Icons/YouTube.js +5 -1
- package/components/Icons/YouTube.js.map +1 -1
- package/components/Icons/Zoom.d.ts +1 -1
- package/components/Icons/Zoom.d.ts.map +1 -1
- package/components/Icons/Zoom.js +30 -1
- package/components/Icons/Zoom.js.map +1 -1
- package/components/Input/Input.d.ts +5 -4
- package/components/Input/Input.d.ts.map +1 -1
- package/components/Input/Input.js +116 -0
- package/components/Input/Input.js.map +1 -0
- package/components/Input/index.js +6 -1
- package/components/Input/index.js.map +1 -1
- package/components/Input/styles.module.scss +3 -3
- package/components/Input/styles.module.scss.d.ts +2 -2
- package/components/Label/Label.d.ts +1 -1
- package/components/Label/Label.d.ts.map +1 -1
- package/components/Label/Label.js +84 -0
- package/components/Label/Label.js.map +1 -0
- package/components/Label/SubLabel.js +19 -0
- package/components/Label/SubLabel.js.map +1 -0
- package/components/Label/index.js +10 -1
- package/components/Label/index.js.map +1 -1
- package/components/Label/styles.module.scss +5 -0
- package/components/Label/styles.module.scss.d.ts +1 -0
- package/components/LazyIcon/ErrorBoundary.d.ts +17 -0
- package/components/LazyIcon/ErrorBoundary.d.ts.map +1 -0
- package/components/LazyIcon/ErrorBoundary.js +22 -0
- package/components/LazyIcon/ErrorBoundary.js.map +1 -0
- package/components/LazyIcon/LazyIcon.d.ts +10 -0
- package/components/LazyIcon/LazyIcon.d.ts.map +1 -0
- package/components/LazyIcon/LazyIcon.js +29 -0
- package/components/LazyIcon/LazyIcon.js.map +1 -0
- package/components/LazyIcon/index.d.ts +4 -0
- package/components/LazyIcon/index.d.ts.map +1 -0
- package/components/LazyIcon/index.js +8 -0
- package/components/{Icons → LazyIcon}/index.js.map +1 -1
- package/components/LinkList/LinkList.d.ts +0 -4
- package/components/LinkList/LinkList.d.ts.map +1 -1
- package/components/LinkList/LinkList.js +60 -0
- package/components/LinkList/LinkList.js.map +1 -0
- package/components/LinkList/index.js +6 -1
- package/components/LinkList/index.js.map +1 -1
- package/components/List/List.js +14 -0
- package/components/List/List.js.map +1 -0
- package/components/List/index.js +4 -1
- package/components/List/index.js.map +1 -1
- package/components/ListHeader/ListHeader.d.ts +1 -1
- package/components/ListHeader/ListHeader.d.ts.map +1 -1
- package/components/ListHeader/ListHeader.js +73 -0
- package/components/ListHeader/ListHeader.js.map +1 -0
- package/components/ListHeader/ListHeaderText/ListHeaderText.js +31 -0
- package/components/ListHeader/ListHeaderText/ListHeaderText.js.map +1 -0
- package/components/ListHeader/ListHeaderText/index.js +6 -1
- package/components/ListHeader/ListHeaderText/index.js.map +1 -1
- package/components/ListHeader/index.js +10 -1
- package/components/ListHeader/index.js.map +1 -1
- package/components/Loader/Loader.js +68 -0
- package/components/Loader/Loader.js.map +1 -0
- package/components/Loader/index.js +6 -1
- package/components/Loader/index.js.map +1 -1
- package/components/Logo/Logo.js +40 -0
- package/components/Logo/Logo.js.map +1 -0
- package/components/Logo/index.js +4 -1
- package/components/Logo/index.js.map +1 -1
- package/components/MaxCharacters/MaxCharacters.js +15 -0
- package/components/MaxCharacters/MaxCharacters.js.map +1 -0
- package/components/Modal/Modal.js +143 -0
- package/components/Modal/Modal.js.map +1 -0
- package/components/Modal/index.js +7 -1
- package/components/Modal/index.js.map +1 -1
- package/components/NotificationPanel/DetailButton/DetailButton.js +28 -0
- package/components/NotificationPanel/DetailButton/DetailButton.js.map +1 -0
- package/components/NotificationPanel/NotificationPanel.js +127 -0
- package/components/NotificationPanel/NotificationPanel.js.map +1 -0
- package/components/NotificationPanel/index.js +4 -1
- package/components/NotificationPanel/index.js.map +1 -1
- package/components/Panel/Panel.d.ts +0 -2
- package/components/Panel/Panel.d.ts.map +1 -1
- package/components/Panel/Panel.js +191 -0
- package/components/Panel/Panel.js.map +1 -0
- package/components/Panel/index.js +8 -1
- package/components/Panel/index.js.map +1 -1
- package/components/PanelList/PanelList.js +17 -0
- package/components/PanelList/PanelList.js.map +1 -0
- package/components/PanelList/index.js +4 -1
- package/components/PanelList/index.js.map +1 -1
- package/components/PopMenu/PopMenu.js +77 -0
- package/components/PopMenu/PopMenu.js.map +1 -0
- package/components/PopMenu/index.js +7 -1
- package/components/PopMenu/index.js.map +1 -1
- package/components/PopOver/PopOver.js +56 -0
- package/components/PopOver/PopOver.js.map +1 -0
- package/components/PopOver/index.js +6 -1
- package/components/PopOver/index.js.map +1 -1
- package/components/PopOver/utils.js +33 -0
- package/components/PopOver/utils.js.map +1 -0
- package/components/Portal/index.js +15 -1
- package/components/Portal/index.js.map +1 -1
- package/components/PromoPanel/PromoPanel.js +42 -0
- package/components/PromoPanel/PromoPanel.js.map +1 -0
- package/components/PromoPanel/index.js +4 -1
- package/components/PromoPanel/index.js.map +1 -1
- package/components/RadioButton/RadioButton.d.ts +4 -4
- package/components/RadioButton/RadioButton.d.ts.map +1 -1
- package/components/RadioButton/RadioButton.js +102 -0
- package/components/RadioButton/RadioButton.js.map +1 -0
- package/components/RadioButton/index.js +7 -1
- package/components/RadioButton/index.js.map +1 -1
- package/components/RadioButton/styles.module.scss +12 -12
- package/components/RadioButton/styles.module.scss.d.ts +14 -14
- package/components/Select/Select.js +69 -0
- package/components/Select/Select.js.map +1 -0
- package/components/Select/index.js +6 -1
- package/components/Select/index.js.map +1 -1
- package/components/ServiceMessage/ServiceMessage.d.ts +0 -5
- package/components/ServiceMessage/ServiceMessage.d.ts.map +1 -1
- package/components/ServiceMessage/ServiceMessage.js +106 -0
- package/components/ServiceMessage/ServiceMessage.js.map +1 -0
- package/components/ServiceMessage/index.js +4 -1
- package/components/ServiceMessage/index.js.map +1 -1
- package/components/SharingStatus/SharingStatus.d.ts +1 -1
- package/components/SharingStatus/SharingStatus.d.ts.map +1 -1
- package/components/SharingStatus/SharingStatus.js +16 -0
- package/components/SharingStatus/SharingStatus.js.map +1 -0
- package/components/SharingStatus/index.js +4 -1
- package/components/SharingStatus/index.js.map +1 -1
- package/components/Slider/Slider.js +165 -0
- package/components/Slider/Slider.js.map +1 -0
- package/components/Slider/index.js +6 -1
- package/components/Slider/index.js.map +1 -1
- package/components/Spacer/Spacer.js +30 -0
- package/components/Spacer/Spacer.js.map +1 -0
- package/components/Spacer/index.js +4 -1
- package/components/Spacer/index.js.map +1 -1
- package/components/StatusDot/StatusDot.js +27 -0
- package/{StatusDot.js.map → components/StatusDot/StatusDot.js.map} +1 -1
- package/components/StatusDot/index.js +7 -1
- package/components/StatusDot/index.js.map +1 -1
- package/components/StatusDot/styles.module.scss +1 -0
- package/components/Step/Step.js +30 -0
- package/components/Step/Step.js.map +1 -0
- package/components/Step/index.js +4 -1
- package/components/Step/index.js.map +1 -1
- package/components/StepButtons/StepButtons.js +21 -0
- package/components/StepButtons/StepButtons.js.map +1 -0
- package/components/StepButtons/index.js +6 -1
- package/components/StepButtons/index.js.map +1 -1
- package/components/Stepper/Dot.js +16 -0
- package/components/Stepper/Dot.js.map +1 -0
- package/components/Stepper/DotList.js +7 -0
- package/components/Stepper/DotList.js.map +1 -0
- package/components/Stepper/Stepper.js +35 -0
- package/components/Stepper/Stepper.js.map +1 -0
- package/components/Stepper/index.js +4 -1
- package/components/Stepper/index.js.map +1 -1
- package/components/Stepper/utils.js +16 -0
- package/components/Stepper/utils.js.map +1 -0
- package/components/Table/Table.js +59 -0
- package/components/Table/Table.js.map +1 -0
- package/components/Table/TableBody/TableBody.js +13 -0
- package/components/Table/TableBody/TableBody.js.map +1 -0
- package/components/Table/TableBody/index.js +6 -1
- package/components/Table/TableBody/index.js.map +1 -1
- package/components/Table/TableCell/TableCell.js +30 -0
- package/components/Table/TableCell/TableCell.js.map +1 -0
- package/components/Table/TableCell/index.js +7 -1
- package/components/Table/TableCell/index.js.map +1 -1
- package/components/Table/TableExpandedRow/TableExpandedRow.js +33 -0
- package/components/Table/TableExpandedRow/TableExpandedRow.js.map +1 -0
- package/components/Table/TableExpandedRow/index.js +6 -1
- package/components/Table/TableExpandedRow/index.js.map +1 -1
- package/components/Table/TableExpanderCell/TableExpanderCell.js +35 -0
- package/components/Table/TableExpanderCell/TableExpanderCell.js.map +1 -0
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js +25 -0
- package/components/Table/TableExpanderCell/TableExpanderCellMobile.js.map +1 -0
- package/components/Table/TableExpanderCell/index.js +6 -1
- package/components/Table/TableExpanderCell/index.js.map +1 -1
- package/components/Table/TableHead/TableHead.js +24 -0
- package/components/Table/TableHead/TableHead.js.map +1 -0
- package/components/Table/TableHead/index.js +7 -1
- package/components/Table/TableHead/index.js.map +1 -1
- package/components/Table/TableHeadCell/TableHeadCell.js +33 -0
- package/components/Table/TableHeadCell/TableHeadCell.js.map +1 -0
- package/components/Table/TableHeadCell/index.js +7 -1
- package/components/Table/TableHeadCell/index.js.map +1 -1
- package/components/Table/TableRow/TableRow.js +40 -0
- package/components/Table/TableRow/TableRow.js.map +1 -0
- package/components/Table/TableRow/index.js +6 -1
- package/components/Table/TableRow/index.js.map +1 -1
- package/components/Table/index.js +27 -1
- package/components/Table/index.js.map +1 -1
- package/components/Table/utils.js +37 -0
- package/components/Table/utils.js.map +1 -0
- package/components/Tag/Tag.d.ts +3 -2
- package/components/Tag/Tag.d.ts.map +1 -1
- package/components/Tag/Tag.js +48 -0
- package/components/Tag/Tag.js.map +1 -0
- package/components/Tag/index.js +8 -1
- package/components/Tag/index.js.map +1 -1
- package/components/TagList/TagList.js +8 -0
- package/components/TagList/TagList.js.map +1 -0
- package/components/TagList/index.js +4 -1
- package/components/TagList/index.js.map +1 -1
- package/components/Textarea/Textarea.js +105 -0
- package/components/Textarea/Textarea.js.map +1 -0
- package/components/Textarea/index.js +4 -1
- package/components/Textarea/index.js.map +1 -1
- package/components/Textarea/styles.module.scss.d.ts +1 -1
- package/components/Tile/Tile.d.ts +1 -0
- package/components/Tile/Tile.d.ts.map +1 -1
- package/components/Tile/Tile.js +68 -0
- package/components/Tile/Tile.js.map +1 -0
- package/components/Tile/index.js +6 -1
- package/components/Tile/index.js.map +1 -1
- package/components/Tile/styles.module.scss +4 -0
- package/components/Tile/styles.module.scss.d.ts +1 -0
- package/components/Title/Title.js +25 -0
- package/components/Title/Title.js.map +1 -0
- package/components/Title/index.js +7 -1
- package/components/Title/index.js.map +1 -1
- package/components/Tooltip/Tooltip.js +55 -0
- package/components/Tooltip/Tooltip.js.map +1 -0
- package/components/Tooltip/TooltipWord/TooltipWord.js +28 -0
- package/components/Tooltip/TooltipWord/TooltipWord.js.map +1 -0
- package/components/Tooltip/TooltipWord/index.js +4 -1
- package/components/Tooltip/TooltipWord/index.js.map +1 -1
- package/components/Tooltip/index.js +7 -1
- package/components/Tooltip/index.js.map +1 -1
- package/components/TooltipExample/TooltipExample.js +8 -0
- package/components/TooltipExample/TooltipExample.js.map +1 -0
- package/components/TooltipExample/index.js +4 -1
- package/components/TooltipExample/index.js.map +1 -1
- package/components/Trigger/HelpSign.d.ts +1 -1
- package/components/Trigger/HelpSign.d.ts.map +1 -1
- package/components/Trigger/HelpSign.js +7 -0
- package/components/Trigger/HelpSign.js.map +1 -0
- package/components/Trigger/InfoSignStroke.d.ts +1 -1
- package/components/Trigger/InfoSignStroke.d.ts.map +1 -1
- package/components/Trigger/Trigger.js +74 -0
- package/components/Trigger/Trigger.js.map +1 -0
- package/components/Trigger/index.js +4 -1
- package/components/Trigger/index.js.map +1 -1
- package/components/Validation/Validation.d.ts +3 -3
- package/components/Validation/Validation.d.ts.map +1 -1
- package/components/Validation/Validation.js +18 -0
- package/components/Validation/Validation.js.map +1 -0
- package/components/Validation/index.js +6 -1
- package/components/Validation/index.js.map +1 -1
- package/constants.d.ts +3 -3
- package/constants.d.ts.map +1 -1
- package/constants.js +12 -1
- package/constants.js.map +1 -1
- package/hoc/withBreakpoint/index.js +5 -1
- package/hoc/withBreakpoint/index.js.map +1 -1
- package/hoc/withBreakpoint/withBreakpoint.js +12 -1
- package/hoc/withBreakpoint/withBreakpoint.js.map +1 -1
- package/hooks/useBreakpoint.js +44 -1
- package/hooks/useBreakpoint.js.map +1 -1
- package/hooks/useDelayedState.js +14 -1
- package/hooks/useDelayedState.js.map +1 -1
- package/hooks/useElementList.js +17 -1
- package/hooks/useElementList.js.map +1 -1
- package/hooks/useEventListenerState.js +10 -1
- package/hooks/useEventListenerState.js.map +1 -1
- package/hooks/useExpand.js +13 -1
- package/hooks/useExpand.js.map +1 -1
- package/hooks/useFocusToggle.js +18 -1
- package/hooks/useFocusToggle.js.map +1 -1
- package/hooks/useFocusTrap.js +22 -1
- package/hooks/useFocusTrap.js.map +1 -1
- package/hooks/useFocusableElements.js +19 -1
- package/hooks/useFocusableElements.js.map +1 -1
- package/hooks/useHover.js +8 -1
- package/hooks/useHover.js.map +1 -1
- package/hooks/useIcons.d.ts +4 -2
- package/hooks/useIcons.d.ts.map +1 -1
- package/hooks/useIcons.js +15 -1
- package/hooks/useIcons.js.map +1 -1
- package/hooks/useIntersectionObserver.js +12 -1
- package/hooks/useIntersectionObserver.js.map +1 -1
- package/hooks/useInterval.js +12 -1
- package/hooks/useInterval.js.map +1 -1
- package/hooks/useIsVisible.js +11 -1
- package/hooks/useIsVisible.js.map +1 -1
- package/hooks/useKeyboardEvent.js +20 -1
- package/hooks/useKeyboardEvent.js.map +1 -1
- package/hooks/useLayoutEvent.js +15 -1
- package/hooks/useLayoutEvent.js.map +1 -1
- package/hooks/useOutsideEvent.js +12 -1
- package/hooks/useOutsideEvent.js.map +1 -1
- package/hooks/usePrevious.js +10 -1
- package/hooks/usePrevious.js.map +1 -1
- package/hooks/usePseudoClasses.js +15 -1
- package/hooks/usePseudoClasses.js.map +1 -1
- package/hooks/useResizeObserver.js +17 -1
- package/hooks/useResizeObserver.js.map +1 -1
- package/hooks/useSize.js +27 -1
- package/hooks/useSize.js.map +1 -1
- package/hooks/useSticky.js +17 -1
- package/hooks/useSticky.js.map +1 -1
- package/hooks/useToggle.js +15 -1
- package/hooks/useToggle.js.map +1 -1
- package/hooks/useUuid.js +9 -1
- package/hooks/useUuid.js.map +1 -1
- package/index.js +47 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/scss/_input.scss +1 -1
- package/theme/currys/color.js +6 -1
- package/theme/currys/color.js.map +1 -1
- package/theme/currys/index.js +8 -1
- package/theme/currys/index.js.map +1 -1
- package/theme/currys/spacing.js +37 -1
- package/theme/currys/spacing.js.map +1 -1
- package/theme/grid.js +24 -1
- package/theme/grid.js.map +1 -1
- package/theme/index.js +13 -1
- package/theme/index.js.map +1 -1
- package/theme/palette.js +79 -1
- package/theme/palette.js.map +1 -1
- package/theme/spacers.js +20 -1
- package/theme/spacers.js.map +1 -1
- package/utils/accessibility.js +18 -1
- package/utils/accessibility.js.map +1 -1
- package/utils/component.js +6 -1
- package/utils/component.js.map +1 -1
- package/utils/debounce.js +13 -1
- package/utils/debounce.js.map +1 -1
- package/utils/device.js +4 -1
- package/utils/device.js.map +1 -1
- package/utils/environment.js +11 -1
- package/utils/environment.js.map +1 -1
- package/utils/focus.js +10 -1
- package/utils/focus.js.map +1 -1
- package/utils/loremtext.js +7 -1
- package/utils/loremtext.js.map +1 -1
- package/utils/mobile.js +10 -1
- package/utils/mobile.js.map +1 -1
- package/utils/refs.js +9 -1
- package/utils/refs.js.map +1 -1
- package/utils/uuid.js +9 -1
- package/utils/uuid.js.map +1 -1
- package/utils/viewport.js +7 -1
- package/utils/viewport.js.map +1 -1
- package/AnchorLink.js +0 -2
- package/AnchorLink.js.map +0 -1
- package/Avatar.js +0 -2
- package/Avatar.js.map +0 -1
- package/Badge.js +0 -2
- package/Badge.js.map +0 -1
- package/Button.js +0 -2
- package/Button.js.map +0 -1
- package/Checkbox.js +0 -2
- package/Checkbox.js.map +0 -1
- package/Close.js +0 -2
- package/Close.js.map +0 -1
- package/ErrorWrapper.js +0 -2
- package/ErrorWrapper.js.map +0 -1
- package/FormGroup.js +0 -2
- package/FormGroup.js.map +0 -1
- package/FormLayout.js +0 -2
- package/FormLayout.js.map +0 -1
- package/HelpBubble.js +0 -2
- package/HelpBubble.js.map +0 -1
- package/HighlightBox.js +0 -2
- package/HighlightBox.js.map +0 -1
- package/HorizontalScroll.js +0 -2
- package/HorizontalScroll.js.map +0 -1
- package/Input.js +0 -2
- package/Input.js.map +0 -1
- package/Label.js +0 -2
- package/Label.js.map +0 -1
- package/LinkList.js +0 -2
- package/LinkList.js.map +0 -1
- package/ListHeader.js +0 -2
- package/ListHeader.js.map +0 -1
- package/ListHeaderText.js +0 -2
- package/ListHeaderText.js.map +0 -1
- package/MaxCharacters.js +0 -2
- package/MaxCharacters.js.map +0 -1
- package/Modal.js +0 -2
- package/Modal.js.map +0 -1
- package/Panel.js +0 -2
- package/Panel.js.map +0 -1
- package/PopOver.js +0 -2
- package/PopOver.js.map +0 -1
- package/RadioButton.js +0 -2
- package/RadioButton.js.map +0 -1
- package/Select.js +0 -2
- package/Select.js.map +0 -1
- package/Spacer.js +0 -2
- package/Spacer.js.map +0 -1
- package/StatusDot.js +0 -2
- package/StepButtons.js +0 -2
- package/StepButtons.js.map +0 -1
- package/Table.js +0 -2
- package/Table.js.map +0 -1
- package/TableBody.js +0 -2
- package/TableBody.js.map +0 -1
- package/TableCell.js +0 -2
- package/TableCell.js.map +0 -1
- package/TableExpandedRow.js +0 -2
- package/TableExpandedRow.js.map +0 -1
- package/TableExpanderCell.js +0 -2
- package/TableExpanderCell.js.map +0 -1
- package/TableHead.js +0 -2
- package/TableHead.js.map +0 -1
- package/TableHeadCell.js +0 -2
- package/TableHeadCell.js.map +0 -1
- package/TableRow.js +0 -2
- package/TableRow.js.map +0 -1
- package/Textarea.js +0 -2
- package/Textarea.js.map +0 -1
- package/Title.js +0 -2
- package/Title.js.map +0 -1
- package/Tooltip.js +0 -2
- package/Tooltip.js.map +0 -1
- package/TooltipWord.js +0 -2
- package/TooltipWord.js.map +0 -1
- package/Trigger.js +0 -2
- package/Trigger.js.map +0 -1
- package/Validation.js +0 -2
- package/Validation.js.map +0 -1
- package/components/AnchorLink/componentdata.json +0 -1
- package/components/Avatar/componentdata.json +0 -1
- package/components/Badge/componentdata.json +0 -1
- package/components/Button/componentdata.json +0 -1
- package/components/ButtonWithModal/componentdata.json +0 -1
- package/components/Checkbox/componentdata.json +0 -1
- package/components/Close/componentdata.json +0 -1
- package/components/DictionaryTrigger/componentdata.json +0 -1
- package/components/Dropdown/componentdata.json +0 -1
- package/components/Duolist/componentdata.json +0 -1
- package/components/EmptyState/componentdata.json +0 -1
- package/components/ErrorWrapper/componentdata.json +0 -1
- package/components/Expander/componentdata.json +0 -1
- package/components/ExpanderHierarchy/componentdata.json +0 -1
- package/components/ExpanderList/componentdata.json +0 -1
- package/components/FormExample/componentdata.json +0 -1
- package/components/FormGroup/componentdata.json +0 -1
- package/components/FormLayout/componentdata.json +0 -1
- package/components/GridExample/componentdata.json +0 -1
- package/components/HelpBubble/componentdata.json +0 -1
- package/components/HelpBubbleExample/componentdata.json +0 -1
- package/components/HelpPanel/componentdata.json +0 -1
- package/components/HelpQuestion/componentdata.json +0 -1
- package/components/HighlightBox/componentdata.json +0 -1
- package/components/HorizontalScroll/componentdata.json +0 -1
- package/components/Icons/Icon.d.ts.map +0 -1
- package/components/Icons/Icon.js +0 -2
- package/components/Icons/Icon.js.map +0 -1
- package/components/Icons/IconWall.d.ts +0 -8
- package/components/Icons/IconWall.d.ts.map +0 -1
- package/components/Icons/IconWall.js +0 -2
- package/components/Icons/IconWall.js.map +0 -1
- package/components/Icons/componentdata.json +0 -1
- package/components/Icons/index.d.ts.map +0 -1
- package/components/Icons/index.js +0 -2
- package/components/Input/componentdata.json +0 -1
- package/components/Label/componentdata.json +0 -1
- package/components/LinkList/componentdata.json +0 -1
- package/components/List/componentdata.json +0 -1
- package/components/ListHeader/ListHeaderText/componentdata.json +0 -1
- package/components/ListHeader/componentdata.json +0 -1
- package/components/Loader/componentdata.json +0 -1
- package/components/Logo/componentdata.json +0 -1
- package/components/MaxCharacters/componentdata.json +0 -1
- package/components/Modal/componentdata.json +0 -1
- package/components/NotificationPanel/DetailButton/componentdata.json +0 -1
- package/components/NotificationPanel/componentdata.json +0 -1
- package/components/Panel/componentdata.json +0 -1
- package/components/PanelList/componentdata.json +0 -1
- package/components/PopMenu/componentdata.json +0 -1
- package/components/PopOver/componentdata.json +0 -1
- package/components/PromoPanel/componentdata.json +0 -1
- package/components/RadioButton/componentdata.json +0 -1
- package/components/Select/componentdata.json +0 -1
- package/components/ServiceMessage/componentdata.json +0 -1
- package/components/SharingStatus/componentdata.json +0 -1
- package/components/Slider/componentdata.json +0 -1
- package/components/Spacer/componentdata.json +0 -1
- package/components/StatusDot/componentdata.json +0 -1
- package/components/Step/componentdata.json +0 -1
- package/components/StepButtons/componentdata.json +0 -1
- package/components/Stepper/componentdata.json +0 -1
- package/components/Table/TableBody/componentdata.json +0 -1
- package/components/Table/TableCell/componentdata.json +0 -1
- package/components/Table/TableExpandedRow/componentdata.json +0 -1
- package/components/Table/TableExpanderCell/componentdata.json +0 -1
- package/components/Table/TableHead/componentdata.json +0 -1
- package/components/Table/TableHeadCell/componentdata.json +0 -1
- package/components/Table/TableRow/componentdata.json +0 -1
- package/components/Table/componentdata.json +0 -1
- package/components/Tag/componentdata.json +0 -1
- package/components/TagList/componentdata.json +0 -1
- package/components/Textarea/componentdata.json +0 -1
- package/components/Tile/componentdata.json +0 -1
- package/components/Title/componentdata.json +0 -1
- package/components/Tooltip/TooltipWord/componentdata.json +0 -1
- package/components/Tooltip/componentdata.json +0 -1
- package/components/TooltipExample/componentdata.json +0 -1
- package/components/Trigger/componentdata.json +0 -1
- package/components/Validation/componentdata.json +0 -1
- package/uuid.js +0 -2
- package/uuid.js.map +0 -1
- /package/components/{Icons → Icon}/index.d.ts +0 -0
package/utils/refs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"refs.js","sources":["../../src/utils/refs.ts"],"sourcesContent":["/**\n * Slår sammen refs fra forwardRef og useRef slik at begge deler kan brukes\n * Fra https://github.com/gregberge/react-merge-refs\n * @param refs array med refs som skal slås sammen\n * @returns refcallback som kan brukes på komponent\n */\nexport const mergeRefs = <T>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T> => {\n return value => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n};\n\n/**\n * Sjekker om ref er et objekt (og ikke en funksjon)\n * @param ref\n * @returns type predicate\n */\nexport const isMutableRefObject = <T>(ref: React.ForwardedRef<T>): ref is React.MutableRefObject<T> => {\n return typeof ref !== 'function' && ref !== null;\n};\n"],"names":["mergeRefs","refs","value","ref","isMutableRefObject"],"mappings":"AAMa,MAAAA,
|
|
1
|
+
{"version":3,"file":"refs.js","sources":["../../src/utils/refs.ts"],"sourcesContent":["/**\n * Slår sammen refs fra forwardRef og useRef slik at begge deler kan brukes\n * Fra https://github.com/gregberge/react-merge-refs\n * @param refs array med refs som skal slås sammen\n * @returns refcallback som kan brukes på komponent\n */\nexport const mergeRefs = <T>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T> => {\n return value => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n};\n\n/**\n * Sjekker om ref er et objekt (og ikke en funksjon)\n * @param ref\n * @returns type predicate\n */\nexport const isMutableRefObject = <T>(ref: React.ForwardedRef<T>): ref is React.MutableRefObject<T> => {\n return typeof ref !== 'function' && ref !== null;\n};\n"],"names":["mergeRefs","refs","value","ref","isMutableRefObject"],"mappings":"AAMa,MAAAA,IAAY,CAAIC,MACpB,CAASC,MAAA;AACd,EAAAD,EAAK,QAAQ,CAAOE,MAAA;AACd,IAAA,OAAOA,KAAQ,aACjBA,EAAID,CAAK,IACAC,KAAO,SACfA,EAAyC,UAAUD;AAAA,EACtD,CACD;AAAA,GASQE,IAAqB,CAAID,MAC7B,OAAOA,KAAQ,cAAcA,MAAQ;"}
|
package/utils/uuid.js
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { isTest as r } from "./environment.js";
|
|
2
|
+
const o = () => r() ? "test" : "bxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".replace(/[x]/g, function(t) {
|
|
3
|
+
const x = Math.random() * 16 | 0;
|
|
4
|
+
return (t == "x" ? x : x & 3 | 8).toString(16);
|
|
5
|
+
});
|
|
6
|
+
export {
|
|
7
|
+
o as default,
|
|
8
|
+
o as uuid
|
|
9
|
+
};
|
|
2
10
|
//# sourceMappingURL=uuid.js.map
|
package/utils/uuid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uuid.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"uuid.js","sources":["../../src/utils/uuid.ts"],"sourcesContent":["import { isTest } from './environment';\n\nexport const uuid = (): string => {\n if (isTest()) {\n return 'test';\n }\n return 'bxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'.replace(/[x]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n};\n\nexport default uuid;\n"],"names":["uuid","isTest","c","r"],"mappings":";AAEO,MAAMA,IAAO,MACdC,MACK,SAEF,uCAAuC,QAAQ,QAAQ,SAAUC,GAAG;AACnE,QAAAC,IAAK,KAAK,OAAW,IAAA,KAAM;AAE1B,UADDD,KAAK,MAAMC,IAAKA,IAAI,IAAO,GACxB,SAAS,EAAE;AAAA,CACrB;"}
|
package/utils/viewport.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
const c=
|
|
1
|
+
const c = (t) => {
|
|
2
|
+
const { top: e, left: n, bottom: i, right: o } = t.getBoundingClientRect();
|
|
3
|
+
return e >= 0 && n >= 0 && i <= (window.innerHeight || document.documentElement.clientHeight) && o <= (window.innerWidth || document.documentElement.clientWidth);
|
|
4
|
+
};
|
|
5
|
+
export {
|
|
6
|
+
c as isElementInViewport
|
|
7
|
+
};
|
|
2
8
|
//# sourceMappingURL=viewport.js.map
|
package/utils/viewport.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewport.js","sources":["../../src/utils/viewport.ts"],"sourcesContent":["export const isElementInViewport = (el: HTMLElement): boolean => {\n const { top, left, bottom, right } = el.getBoundingClientRect();\n\n return (\n top >= 0 &&\n left >= 0 &&\n bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n};\n"],"names":["isElementInViewport","el","top","left","bottom","right"],"mappings":"AAAa,MAAAA,
|
|
1
|
+
{"version":3,"file":"viewport.js","sources":["../../src/utils/viewport.ts"],"sourcesContent":["export const isElementInViewport = (el: HTMLElement): boolean => {\n const { top, left, bottom, right } = el.getBoundingClientRect();\n\n return (\n top >= 0 &&\n left >= 0 &&\n bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n right <= (window.innerWidth || document.documentElement.clientWidth)\n );\n};\n"],"names":["isElementInViewport","el","top","left","bottom","right"],"mappings":"AAAa,MAAAA,IAAsB,CAACC,MAA6B;AAC/D,QAAM,EAAE,KAAAC,GAAK,MAAAC,GAAM,QAAAC,GAAQ,OAAAC,MAAUJ,EAAG;AAExC,SACEC,KAAO,KACPC,KAAQ,KACRC,MAAW,OAAO,eAAe,SAAS,gBAAgB,iBAC1DC,MAAU,OAAO,cAAc,SAAS,gBAAgB;AAE5D;"}
|
package/AnchorLink.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import g from"classnames";import{AnalyticsId as v,IconSize as y}from"./constants.js";import{useHover as E}from"./hooks/useHover.js";import{getColor as m}from"./theme/currys/color.js";import{Icon as N}from"./components/Icons/Icon.js";import _ from"./components/Icons/ArrowUpRight.js";import r from"./components/AnchorLink/styles.module.scss";const C=e.forwardRef((i,f)=>{const{id:p,href:h,children:d,className:u,target:o="_self",htmlMarkup:t="a",onClick:k,testId:b}=i,n=o==="_blank",{hoverRef:a,isHovered:A}=E(f),c=g(r.anchorlink,u),l={id:p,"data-testid":b,"data-analyticsid":v.AnchorLink,onClick:k},s=()=>e.createElement(e.Fragment,null,d,n&&e.createElement(N,{className:r.anchorlink__icon,svgIcon:_,color:m("blueberry",600),hoverColor:m("blueberry",700),size:y.XSmall,isHovered:A}));return e.createElement(e.Fragment,null,t==="a"&&e.createElement("a",{href:h,target:o,className:c,rel:n?"noopener noreferrer":void 0,ref:a,...l},s()),t==="button"&&e.createElement("button",{type:"button",className:r["anchorlink-wrapper"],ref:a,...l},e.createElement("span",{className:c},s())))}),H=C;export{H as A};
|
|
2
|
-
//# sourceMappingURL=AnchorLink.js.map
|
package/AnchorLink.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AnchorLink.js","sources":["../src/components/AnchorLink/AnchorLink.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useHover } from '../../hooks/useHover';\nimport { getColor } from '../../theme/currys';\nimport Icon, { IconSize } from '../Icons';\nimport ArrowUpRight from '../Icons/ArrowUpRight';\n\nimport AnchorLinkStyles from './styles.module.scss';\n\nexport type AnchorLinkTargets = '_self' | '_blank' | '_parent';\n\nexport type AnchorLinkTags = 'a' | 'button';\n\ninterface AnchorLinkProps {\n /** Sets the content of the <a> tag */\n children: React.ReactNode;\n /** URL to link to */\n href?: string;\n /** Gives a unique id to the anchor-link :) */\n id?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the target type of the <a> tag. _blank adds an arrow icon at the end of the link */\n target?: AnchorLinkTargets;\n /** HTML markup for anchor link. Default: a */\n htmlMarkup?: AnchorLinkTags;\n /** Function that is called when clicked */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<{}> | React.KeyboardEvent<HTMLUListElement> | null) => void;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst AnchorLink = React.forwardRef<HTMLAnchorElement | HTMLButtonElement, AnchorLinkProps>((props, ref) => {\n const { id, href, children, className, target = '_self', htmlMarkup = 'a', onClick, testId } = props;\n const external = target === '_blank';\n const { hoverRef, isHovered } = useHover<HTMLButtonElement | HTMLAnchorElement>(\n ref as React.RefObject<HTMLButtonElement | HTMLAnchorElement>\n );\n const anchorClasses = classNames(AnchorLinkStyles.anchorlink, className);\n\n const commonProps = {\n id,\n ['data-testid']: testId,\n ['data-analyticsid']: AnalyticsId.AnchorLink,\n onClick,\n };\n\n const renderContent = () => (\n <>\n {children}\n {external && (\n <Icon\n className={AnchorLinkStyles.anchorlink__icon}\n svgIcon={ArrowUpRight}\n color={getColor('blueberry', 600)}\n hoverColor={getColor('blueberry', 700)}\n size={IconSize.XSmall}\n isHovered={isHovered}\n />\n )}\n </>\n );\n\n return (\n <>\n {htmlMarkup === 'a' && (\n <a\n href={href}\n target={target}\n className={anchorClasses}\n rel={external ? 'noopener noreferrer' : undefined}\n ref={hoverRef as React.RefObject<HTMLAnchorElement>}\n {...commonProps}\n >\n {renderContent()}\n </a>\n )}\n {htmlMarkup === 'button' && (\n <button\n type=\"button\"\n className={AnchorLinkStyles['anchorlink-wrapper']}\n ref={hoverRef as React.RefObject<HTMLButtonElement>}\n {...commonProps}\n >\n <span className={anchorClasses}>{renderContent()}</span>\n </button>\n )}\n </>\n );\n});\n\nexport default AnchorLink;\n"],"names":["AnchorLink","React","props","ref","id","href","children","className","target","htmlMarkup","onClick","testId","external","hoverRef","isHovered","useHover","anchorClasses","classNames","AnchorLinkStyles","commonProps","AnalyticsId","renderContent","Icon","ArrowUpRight","getColor","IconSize","AnchorLink$1"],"mappings":"0WAmCA,MAAMA,EAAaC,EAAM,WAAmE,CAACC,EAAOC,IAAQ,CACpG,KAAA,CAAE,GAAAC,EAAI,KAAAC,EAAM,SAAAC,EAAU,UAAAC,EAAW,OAAAC,EAAS,QAAS,WAAAC,EAAa,IAAK,QAAAC,EAAS,OAAAC,CAAA,EAAWT,EACzFU,EAAWJ,IAAW,SACtB,CAAE,SAAAK,EAAU,UAAAC,CAAA,EAAcC,EAC9BZ,CAAA,EAEIa,EAAgBC,EAAWC,EAAiB,WAAYX,CAAS,EAEjEY,EAAc,CAClB,GAAAf,EACC,cAAgBO,EAChB,mBAAqBS,EAAY,WAClC,QAAAV,CAAA,EAGIW,EAAgB,IAEjBpB,EAAA,cAAAA,EAAA,SAAA,KAAAK,EACAM,GACCX,EAAA,cAACqB,EAAA,CACC,UAAWJ,EAAiB,iBAC5B,QAASK,EACT,MAAOC,EAAS,YAAa,GAAG,EAChC,WAAYA,EAAS,YAAa,GAAG,EACrC,KAAMC,EAAS,OACf,UAAAX,CAAA,CAAA,CAGN,EAIA,OAAAb,EAAA,cAAAA,EAAA,SAAA,KACGQ,IAAe,KACdR,EAAA,cAAC,IAAA,CACC,KAAAI,EACA,OAAAG,EACA,UAAWQ,EACX,IAAKJ,EAAW,sBAAwB,OACxC,IAAKC,EACJ,GAAGM,CAAA,EAEHE,EAAc,CAAA,EAGlBZ,IAAe,UACdR,EAAA,cAAC,SAAA,CACC,KAAK,SACL,UAAWiB,EAAiB,oBAAoB,EAChD,IAAKL,EACJ,GAAGM,CAAA,EAEHlB,EAAA,cAAA,OAAA,CAAK,UAAWe,CAAA,EAAgBK,GAAgB,CAAA,CAGvD,CAEJ,CAAC,EAEDK,EAAe1B"}
|
package/Avatar.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r from"react";import p from"classnames";import{AnalyticsId as v,IconSize as u}from"./constants.js";import{palette as o}from"./theme/palette.js";import{Icon as b}from"./components/Icons/Icon.js";import A from"./components/Icons/Check.js";import a from"./components/Avatar/styles.module.scss";var x=(t=>(t.xsmall="xsmall",t.small="small",t))(x||{});const I=r.forwardRef(function(c,n){const{children:e,className:i="",selected:l=!1,variant:s="normal",size:m="small",testId:d}=c,f=e.charAt(0).toLocaleUpperCase()+e.substring(1,2);return r.createElement("span",{className:p(a.avatar,l&&a["avatar--selected"],s==="black"&&a["avatar--black"],m==="xsmall"&&a["avatar--xsmall"],m==="small"&&a["avatar--small"],i),ref:n,"data-testid":d,"data-analyticsid":v.Avatar},l?r.createElement(b,{svgIcon:A,size:u.Small,color:s==="black"?o.neutral900:o.blueberry600}):f)}),z=I;export{z as A,x as a};
|
|
2
|
-
//# sourceMappingURL=Avatar.js.map
|
package/Avatar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../src/components/Avatar/Avatar.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { palette } from '../../theme/palette';\nimport Icon, { IconSize } from '../Icons';\nimport Check from '../Icons/Check';\n\nimport styles from './styles.module.scss';\n\nexport enum AvatarSize {\n xsmall = 'xsmall',\n small = 'small',\n}\n\nexport interface AvatarProps {\n /** Name to display in the avatar. Will be truncated to the first two characters. */\n children: string;\n /** Displays a check icon to indicated the selected state. */\n selected?: boolean;\n /** background and color will be determined on variant. */\n variant?: 'normal' | 'black';\n /** Avatar size. Default: small */\n size?: keyof typeof AvatarSize;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\nexport type AvatarType = React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLElement>>;\nconst Avatar: AvatarType = React.forwardRef(function AvatarForwardedRef(props: AvatarProps, ref: React.ForwardedRef<HTMLElement>) {\n const { children, className = '', selected = false, variant = 'normal', size = AvatarSize.small, testId } = props;\n const truncatedName = children.charAt(0).toLocaleUpperCase() + children.substring(1, 2);\n return (\n <span\n className={cn(\n styles.avatar,\n selected && styles['avatar--selected'],\n variant === 'black' && styles['avatar--black'],\n size === AvatarSize.xsmall && styles['avatar--xsmall'],\n size === AvatarSize.small && styles['avatar--small'],\n className\n )}\n ref={ref}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Avatar}\n >\n {selected ? (\n <Icon svgIcon={Check} size={IconSize.Small} color={variant === 'black' ? palette.neutral900 : palette.blueberry600} />\n ) : (\n truncatedName\n )}\n </span>\n );\n});\n\nexport default Avatar;\n"],"names":["AvatarSize","Avatar","React","props","ref","children","className","selected","variant","size","testId","truncatedName","cn","styles","AnalyticsId","Icon","Check","IconSize","palette","Avatar$1"],"mappings":"0SAWY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QAFEA,IAAAA,GAAA,CAAA,CAAA,EAoBZ,MAAMC,EAAqBC,EAAM,WAAW,SAA4BC,EAAoBC,EAAsC,CAC1H,KAAA,CAAE,SAAAC,EAAU,UAAAC,EAAY,GAAI,SAAAC,EAAW,GAAO,QAAAC,EAAU,SAAU,KAAAC,EAAO,QAAkB,OAAAC,CAAA,EAAWP,EACtGQ,EAAgBN,EAAS,OAAO,CAAC,EAAE,kBAAsB,EAAAA,EAAS,UAAU,EAAG,CAAC,EAEpF,OAAAH,EAAA,cAAC,OAAA,CACC,UAAWU,EACTC,EAAO,OACPN,GAAYM,EAAO,kBAAkB,EACrCL,IAAY,SAAWK,EAAO,eAAe,EAC7CJ,IAAS,UAAqBI,EAAO,gBAAgB,EACrDJ,IAAS,SAAoBI,EAAO,eAAe,EACnDP,CACF,EACA,IAAAF,EACA,cAAaM,EACb,mBAAkBI,EAAY,MAAA,EAE7BP,EACCL,EAAA,cAACa,EAAK,CAAA,QAASC,EAAO,KAAMC,EAAS,MAAO,MAAOT,IAAY,QAAUU,EAAQ,WAAaA,EAAQ,YAAc,CAAA,EAEpHP,CAAA,CAIR,CAAC,EAEDQ,EAAelB"}
|
package/Badge.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r from"react";import n from"classnames";import{AnalyticsId as o}from"./constants.js";import a from"./components/Badge/styles.module.scss";const i=r.forwardRef(function(t,d){const{children:s,className:b="",color:e="black",testId:l}=t,c=n(a.badge,{[a["badge--black"]]:e==="black",[a["badge--white"]]:e==="white",[a["badge--blueberry"]]:e==="blueberry",[a["badge--banana"]]:e==="banana",[a["badge--cherry"]]:e==="cherry",[a["badge--kiwi"]]:e==="kiwi",[a["badge--neutral"]]:e==="neutral",[a["badge--plum"]]:e==="plum"},b);return r.createElement("span",{className:c,ref:d,"data-testid":l,"data-analyticsid":o.Badge},s)}),y=i;export{y as B};
|
|
2
|
-
//# sourceMappingURL=Badge.js.map
|
package/Badge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../src/components/Badge/Badge.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\n\nimport badgeStyles from './styles.module.scss';\n\nexport type BadgeColors = PaletteNames;\nexport type BadgeChildren = string | number;\n\nexport interface BadgeProps {\n /** Sets the content of the badge. */\n children: BadgeChildren;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the badge background color. */\n color?: BadgeColors;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\nexport type BadgeType = React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLElement>>;\nconst Badge: BadgeType = React.forwardRef(function BadgeForwardedRef(props: BadgeProps, ref: React.ForwardedRef<HTMLElement>) {\n const { children, className = '', color = 'black', testId } = props;\n const badgeClasses = classNames(\n badgeStyles.badge,\n {\n [badgeStyles['badge--black']]: color === 'black',\n [badgeStyles['badge--white']]: color === 'white',\n [badgeStyles['badge--blueberry']]: color === 'blueberry',\n [badgeStyles['badge--banana']]: color === 'banana',\n [badgeStyles['badge--cherry']]: color === 'cherry',\n [badgeStyles['badge--kiwi']]: color === 'kiwi',\n [badgeStyles['badge--neutral']]: color === 'neutral',\n [badgeStyles['badge--plum']]: color === 'plum',\n },\n className\n );\n\n return (\n <span className={badgeClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Badge}>\n {children}\n </span>\n );\n});\n\nexport default Badge;\n"],"names":["Badge","React","props","ref","children","className","color","testId","badgeClasses","classNames","badgeStyles","AnalyticsId","Badge$1"],"mappings":"iJAuBA,MAAMA,EAAmBC,EAAM,WAAW,SAA2BC,EAAmBC,EAAsC,CAC5H,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAY,GAAI,MAAAC,EAAQ,QAAS,OAAAC,CAAW,EAAAL,EACxDM,EAAeC,EACnBC,EAAY,MACZ,CACE,CAACA,EAAY,cAAc,CAAC,EAAGJ,IAAU,QACzC,CAACI,EAAY,cAAc,CAAC,EAAGJ,IAAU,QACzC,CAACI,EAAY,kBAAkB,CAAC,EAAGJ,IAAU,YAC7C,CAACI,EAAY,eAAe,CAAC,EAAGJ,IAAU,SAC1C,CAACI,EAAY,eAAe,CAAC,EAAGJ,IAAU,SAC1C,CAACI,EAAY,aAAa,CAAC,EAAGJ,IAAU,OACxC,CAACI,EAAY,gBAAgB,CAAC,EAAGJ,IAAU,UAC3C,CAACI,EAAY,aAAa,CAAC,EAAGJ,IAAU,MAC1C,EACAD,CAAA,EAIA,OAAAJ,EAAA,cAAC,OAAK,CAAA,UAAWO,EAAc,IAAAL,EAAU,cAAaI,EAAQ,mBAAkBI,EAAY,KAAA,EACzFP,CACH,CAEJ,CAAC,EAEDQ,EAAeZ"}
|
package/Button.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import o,{useRef as lt,useEffect as ct}from"react";import m from"classnames";import{Icon as it}from"./components/Icons/Icon.js";import{AnalyticsId as V,IconSize as y}from"./constants.js";import{useBreakpoint as ut}from"./hooks/useBreakpoint.js";import{useHover as W}from"./hooks/useHover.js";import{useIcons as mt}from"./hooks/useIcons.js";import{useSize as pt}from"./hooks/useSize.js";import{getColor as c}from"./theme/currys/color.js";import{breakpoints as bt}from"./theme/grid.js";import{isTest as dt,isProd as ft}from"./utils/environment.js";import ht from"./components/Icons/ArrowRight.js";import t from"./components/Button/styles.module.scss";const gt=(e,r,n,p,s,g)=>g&&n?!s||e?c("neutral",r?500:700):c("white"):n?!s||e?c("neutral",500):`${c("white")}b3`:e&&!s||!e&&s?"white":p==="normal"?c("blueberry",600):c("cherry",500),k=(e,r)=>r&&e?y.Small:e?y.Medium:y.XSmall,_t=(e,r,n)=>{if(n&&e&&(r===void 0||r===""))throw new Error("Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav")},wt=o.forwardRef(function(r,n){const{ariaLabel:p,id:s,children:g,wrapperClassName:$,className:j,arrow:v=!1,concept:B="normal",disabled:b=!1,ellipsis:N=!1,fluid:D=!1,htmlMarkup:_="button",mode:X="onlight",onBlur:R,onClick:E,size:q="medium",variant:w="fill",href:G,tabIndex:S,testId:x,target:z,type:J="button",...A}=r,[d,f,F]=mt(o.Children.toArray(g)),{hoverRef:H,isHovered:K}=_==="button"?W(n):W(n),L=lt(null);pt(L);const a=!!(d||f)&&!F,M=d&&(f||v)&&!a,I=X==="ondark",h=ut()<bt.md,O=B==="destructive"&&!b,Q=w==="outline",i=w==="borderless",Y=gt(w==="fill",i,b,B,I,h),P=v&&!i,u=q==="large"&&!O&&!i,Z={...A},T=m(t["button-wrapper"],{[t["button-wrapper--fluid"]]:D||N},$),tt=m(t.button,{[t["button--destructive"]]:O,[t["button--normal"]]:!u,[t["button--large"]]:u,[t["button--outline"]]:Q,[t["button--borderless"]]:i,[t["button--left-icon"]]:d&&!a,[t["button--right-icon"]]:f&&!a,[t["button--both-icons"]]:M,[t["button--only-icon"]]:a,[t["button--arrow"]]:P,[t["button--on-dark"]]:I},j),ot=m(t.button__text,{[t["button__text--ellipsis"]]:N}),et=m(t.diagonal,{[t["diagonal--on-dark"]]:I});ct(()=>{_t(a,p,!dt()&&!ft())},[]);const C=(l,nt,st)=>{const at=l&&l.props&&l.props.color?l.props.color:Y;return l&&Object.keys(l).length>0?o.cloneElement(l,{size:nt,color:at,isHovered:K,className:st}):null},rt=()=>o.createElement("span",{className:ot,ref:L},b&&i&&o.createElement("span",{className:et},o.createElement("span",{className:t.diagonal__line})),o.createElement("span",null,a?p:F)),U=()=>o.createElement("span",{className:tt},C(d,k(u,h),a?void 0:t["button__left-icon"]),rt(),P?C(o.createElement(it,{svgIcon:ht}),k(u,h),m(t.button__arrow,{[t["button__arrow--both-icons"]]:M})):C(f,k(u,h),t["button__right-icon"]));return o.createElement(o.Fragment,null,_==="button"&&o.createElement("button",{id:s,onBlur:R,onClick:E,disabled:b,"data-testid":x,"data-analyticsid":V.Button,className:T,ref:H,tabIndex:S,type:J,...Z},U()),_==="a"&&o.createElement("a",{id:s,onBlur:R,onClick:E,"data-testid":x,"data-analyticsid":V.Button,className:T,href:G,target:z,rel:z==="_blank"?"noopener noreferrer":r.rel,ref:H,tabIndex:S,...A},U()))}),Ht=wt;export{Ht as B};
|
|
2
|
-
//# sourceMappingURL=Button.js.map
|
package/Button.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import React, { AriaAttributes, useEffect, useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport Icon, { IconProps, IconSize } from './../Icons/';\nimport { HTMLButtonProps, HTMLAnchorProps, AnalyticsId } from '../../constants';\nimport { useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { useIcons } from '../../hooks/useIcons';\nimport { useSize } from '../../hooks/useSize';\nimport { getColor } from '../../theme/currys/color';\nimport { breakpoints } from '../../theme/grid';\nimport { isTest, isProd } from '../../utils/environment';\nimport ArrowRight from '../Icons/ArrowRight';\n\nimport buttonStyles from './styles.module.scss';\n\nexport type ButtonConcept = 'normal' | 'destructive';\nexport type ButtonVariant = 'fill' | 'outline' | 'borderless';\nexport type ButtonSize = 'medium' | 'large';\nexport type ButtonMode = 'onlight' | 'ondark';\nexport type ButtonTags = 'button' | 'a';\n\nexport interface ButtonProps extends HTMLButtonProps, HTMLAnchorProps, AriaAttributes {\n /** Sets the aria-label of the button, use when the button only includes an icon */\n ariaLabel?: string;\n /** Gives a unique id to the button */\n id?: string;\n /** Sets the content of the button. */\n children: React.ReactNode;\n /** Adds custom classes to the wrapper element. */\n wrapperClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Enables an arrow icon to the right inside the button (Not available in borderless variant) */\n arrow?: boolean;\n /** Changes the intent of the button. Mostly changes the color profile. */\n concept?: ButtonConcept;\n /** Disables text wrapping and enables ellipsis. */\n ellipsis?: boolean;\n /** Makes the button scale to full width of its parent element. */\n fluid?: boolean;\n /** Changes the underlying element of the button. */\n htmlMarkup?: ButtonTags;\n /** Changes the button colors for different backgrounds. */\n mode?: ButtonMode;\n /** Function that is called when the Button loses focus */\n onBlur?: () => void;\n /** Function that is called when clicked */\n onClick?: (e?: React.MouseEvent<HTMLElement, MouseEvent> | React.FormEvent<{}> | React.KeyboardEvent<HTMLUListElement> | null) => void;\n /** Changes the button colors for different backgrounds. (Large not available in borderless variant) */\n size?: ButtonSize;\n /** Changes the visual representation of the button. */\n variant?: ButtonVariant;\n /** Specifies the focus order relative to the other buttons or controls on the page */\n tabIndex?: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Button type. Default: button */\n type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];\n}\n\nconst getIconColor = (\n fill: boolean,\n borderless: boolean,\n disabled: boolean,\n concept: ButtonConcept,\n ondark: boolean,\n mobile: boolean\n): string => {\n if (mobile && disabled) {\n return !ondark || fill ? getColor('neutral', !borderless ? 700 : 500) : getColor('white');\n }\n if (disabled) {\n return !ondark || fill ? getColor('neutral', 500) : `${getColor('white')}b3`;\n }\n if ((fill && !ondark) || (!fill && ondark)) {\n return 'white';\n }\n\n return concept === 'normal' ? getColor('blueberry', 600) : getColor('cherry', 500);\n};\nconst getLargeIconSize = (large: boolean, mobile: boolean): IconSize => {\n if (mobile && large) return IconSize.Small;\n if (large) return IconSize.Medium;\n return IconSize.XSmall;\n};\n\nconst checkOnlyIconAria = (onlyIcon: boolean, ariaLabel: string | undefined, devEnv: boolean) => {\n if (devEnv && onlyIcon && (ariaLabel === undefined || ariaLabel === '')) {\n throw new Error('Fyll inn ariaLabel prop på Button uten tekst for å opprettholde UU krav');\n }\n};\n\nconst Button = React.forwardRef(function ButtonForwardedRef(\n props: ButtonProps,\n ref: React.ForwardedRef<HTMLButtonElement | HTMLAnchorElement>\n) {\n const {\n ariaLabel,\n id,\n children,\n wrapperClassName,\n className,\n arrow = false,\n concept = 'normal',\n disabled = false,\n ellipsis = false,\n fluid = false,\n htmlMarkup = 'button',\n mode = 'onlight',\n onBlur,\n onClick,\n size = 'medium',\n variant = 'fill',\n href,\n tabIndex,\n testId,\n target,\n type = 'button',\n ...restProps\n } = props;\n\n const [leftIcon, rightIcon, restChildren] = useIcons(React.Children.toArray(children));\n const { hoverRef, isHovered } =\n htmlMarkup === 'button'\n ? useHover<HTMLButtonElement>(ref as React.RefObject<HTMLButtonElement>)\n : useHover<HTMLAnchorElement>(ref as React.RefObject<HTMLAnchorElement>);\n const buttonContentRef = useRef<HTMLDivElement>(null);\n const buttonContentSize = useSize(buttonContentRef);\n const onlyIcon = !!(leftIcon || rightIcon) && !restChildren;\n const bothIcons = leftIcon && (rightIcon || arrow) && !onlyIcon;\n const onDark = mode === 'ondark';\n const breakpoint = useBreakpoint();\n const mobile = breakpoint < breakpoints.md;\n const destructive = concept === 'destructive' && !disabled;\n const outlineVariant = variant === 'outline';\n const borderlessVariant = variant === 'borderless';\n const iconColor = getIconColor(variant === 'fill', borderlessVariant, disabled, concept, onDark, mobile);\n const hasArrow = arrow && !borderlessVariant;\n const large = size === 'large' && !destructive && !borderlessVariant;\n const rest = { ...restProps };\n\n const buttonWrapperClasses = classNames(\n buttonStyles['button-wrapper'],\n { [buttonStyles['button-wrapper--fluid']]: fluid || ellipsis },\n wrapperClassName\n );\n const buttonClasses = classNames(\n buttonStyles.button,\n {\n [buttonStyles['button--destructive']]: destructive,\n [buttonStyles['button--normal']]: !large,\n [buttonStyles['button--large']]: large,\n [buttonStyles['button--outline']]: outlineVariant,\n [buttonStyles['button--borderless']]: borderlessVariant,\n [buttonStyles['button--left-icon']]: leftIcon && !onlyIcon,\n [buttonStyles['button--right-icon']]: rightIcon && !onlyIcon,\n [buttonStyles['button--both-icons']]: bothIcons,\n [buttonStyles['button--only-icon']]: onlyIcon,\n [buttonStyles['button--arrow']]: hasArrow,\n [buttonStyles['button--on-dark']]: onDark,\n },\n className\n );\n const buttonTextClasses = classNames(buttonStyles['button__text'], {\n [buttonStyles['button__text--ellipsis']]: ellipsis,\n });\n const diagonalClasses = classNames(buttonStyles['diagonal'], {\n [buttonStyles['diagonal--on-dark']]: onDark,\n });\n\n useEffect(() => {\n checkOnlyIconAria(onlyIcon, ariaLabel, !isTest() && !isProd());\n }, []);\n\n const renderIcon = (\n iconElement: React.ReactElement<IconProps> | {} | undefined | null,\n iconSize: number,\n iconClassName?: string\n ): React.ReactElement<IconProps> | React.Component<IconProps> | null => {\n const color =\n iconElement && (iconElement as React.ReactElement<IconProps>).props && (iconElement as React.ReactElement<IconProps>).props.color\n ? (iconElement as React.ReactElement<IconProps>).props.color\n : iconColor;\n return iconElement && Object.keys(iconElement).length > 0\n ? React.cloneElement(iconElement as React.ReactElement<IconProps>, { size: iconSize, color, isHovered, className: iconClassName })\n : null;\n };\n\n const renderButtonContent = (): JSX.Element => {\n return (\n <span className={buttonTextClasses} ref={buttonContentRef}>\n {disabled && borderlessVariant && (\n <span className={diagonalClasses}>\n <span className={buttonStyles['diagonal__line']} />\n </span>\n )}\n <span>{onlyIcon ? ariaLabel : restChildren}</span>\n </span>\n );\n };\n\n const renderbuttonContentWrapper = (): JSX.Element => (\n <span className={buttonClasses}>\n {renderIcon(leftIcon, getLargeIconSize(large, mobile), !onlyIcon ? buttonStyles['button__left-icon'] : undefined)}\n {renderButtonContent()}\n {hasArrow\n ? renderIcon(\n <Icon svgIcon={ArrowRight} />,\n getLargeIconSize(large, mobile),\n classNames(buttonStyles['button__arrow'], { [buttonStyles['button__arrow--both-icons']]: bothIcons })\n )\n : renderIcon(rightIcon, getLargeIconSize(large, mobile), buttonStyles['button__right-icon'])}\n </span>\n );\n\n return (\n <>\n {htmlMarkup === 'button' && (\n <button\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n disabled={disabled}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n ref={hoverRef as React.ForwardedRef<HTMLButtonElement>}\n tabIndex={tabIndex}\n type={type}\n {...rest}\n >\n {renderbuttonContentWrapper()}\n </button>\n )}\n {htmlMarkup === 'a' && (\n <a\n id={id}\n onBlur={onBlur}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Button}\n className={buttonWrapperClasses}\n href={href}\n target={target}\n rel={target === '_blank' ? 'noopener noreferrer' : props.rel}\n ref={hoverRef as React.ForwardedRef<HTMLAnchorElement>}\n tabIndex={tabIndex}\n {...restProps}\n >\n {renderbuttonContentWrapper()}\n </a>\n )}\n </>\n );\n});\n\nexport default Button;\n"],"names":["getIconColor","fill","borderless","disabled","concept","ondark","mobile","getColor","getLargeIconSize","large","IconSize","checkOnlyIconAria","onlyIcon","ariaLabel","devEnv","Button","React","props","ref","id","children","wrapperClassName","className","arrow","ellipsis","fluid","htmlMarkup","mode","onBlur","onClick","size","variant","href","tabIndex","testId","target","type","restProps","leftIcon","rightIcon","restChildren","useIcons","hoverRef","isHovered","useHover","buttonContentRef","useRef","useSize","bothIcons","onDark","useBreakpoint","breakpoints","destructive","outlineVariant","borderlessVariant","iconColor","hasArrow","rest","buttonWrapperClasses","classNames","buttonStyles","buttonClasses","buttonTextClasses","diagonalClasses","useEffect","isTest","isProd","renderIcon","iconElement","iconSize","iconClassName","color","renderButtonContent","renderbuttonContentWrapper","Icon","ArrowRight","AnalyticsId","Button$1"],"mappings":"yoBA8DA,MAAMA,GAAe,CACnBC,EACAC,EACAC,EACAC,EACAC,EACAC,IAEIA,GAAUH,EACL,CAACE,GAAUJ,EAAOM,EAAS,UAAYL,EAAmB,IAAN,GAAS,EAAIK,EAAS,O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,cAAaK,EACb,mBAAkB0C,EAAY,OAC9B,UAAWlB,EACX,KAAA1B,EACA,OAAAG,EACA,IAAKA,IAAW,SAAW,sBAAwBlB,EAAM,IACzD,IAAKyB,EACL,SAAAT,EACC,GAAGI,CAAA,EAEHoC,EAA2B,CAAA,CAGlC,CAEJ,CAAC,EAEDI,GAAe9D"}
|
package/Checkbox.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import b,{useState as H,useEffect as V}from"react";import l from"classnames";import{FormMode as n,FormVariant as X,AnalyticsId as $,IconSize as J}from"./constants.js";import{usePseudoClasses as K}from"./hooks/usePseudoClasses.js";import{getColor as h}from"./theme/currys/color.js";import{isMutableRefObject as Q,mergeRefs as U}from"./utils/refs.js";import{u as Y}from"./uuid.js";import{Icon as Z}from"./components/Icons/Icon.js";import ee from"./components/Icons/Check.js";import{g as ce,r as oe}from"./Label.js";import e from"./components/Checkbox/styles.module.scss";const v=b.forwardRef((p,k)=>{const{className:I,checked:d=!1,disabled:r,label:x,inputId:m=Y(),mode:i=n.onwhite,name:N=m,variant:E,errorText:s,error:f=!!s,value:R=ce(x),testId:S,required:F,onChange:g,...L}=p,[o,u]=H(d),w=i===n.onwhite,C=i===n.ongrey,y=i===n.onblueberry,a=f||i===n.oninvalid,t=i===n.ondark,c=E===X.bigform,{refObject:T,isFocused:W}=K(Q(k)?k:null),j=U([k,T]),z=l(e["checkbox-wrapper"],{[e["checkbox-wrapper--with-error"]]:s,[e["checkbox-wrapper--bigform"]]:c}),A=l(e["checkbox-label"],{[e["checkbox-label--disabled"]]:r,[e["checkbox-label--on-dark"]]:t,[e["checkbox-label--bigform"]]:c,[e["checkbox-label__big-form--checked"]]:c&&o,[e["checkbox-label__big-form--focus"]]:c&&W,[e["checkbox-label__big-form--on-white"]]:c&&w,[e["checkbox-label__big-form--on-grey"]]:c&&C,[e["checkbox-label__big-form--on-blueberry"]]:c&&y,[e["checkbox-label__big-form--on-invalid"]]:c&&a,[e["checkbox-label__big-form--disabled"]]:c&&r}),M=l(e.checkbox,I),O=l(e["checkbox__icon-wrapper"],{[e["checkbox__icon-wrapper--on-white"]]:w,[e["checkbox__icon-wrapper--on-grey"]]:C,[e["checkbox__icon-wrapper--on-invalid"]]:a,[e["checkbox__icon-wrapper--disabled"]]:r,[e["checkbox__icon-wrapper__regular--checked"]]:!c&&o,[e["checkbox__icon-wrapper__regular--invalid"]]:!c&&o&&a,[e["checkbox__icon-wrapper__regular--on-dark"]]:!c&&o&&t,[e["checkbox__icon-wrapper__big-form--checked"]]:c&&o,[e["checkbox__icon-wrapper__big-form--invalid"]]:c&&a,[e["checkbox__icon-wrapper--on-dark"]]:t,[e["checkbox__icon-wrapper--on-blueberry"]]:y,[e["checkbox__icon-wrapper--invalid"]]:a,[e["checkbox__icon-wrapper__big-form--invalid"]]:c&&o&&a,[e["checkbox__icon-wrapper__big-form--disabled"]]:r&&c&&o,[e["checkbox__icon-wrapper__big-form--checked--invalid"]]:c&&o&&a,[e["checkbox__icon-wrapper__big-form--checked--disabled"]]:r&&c&&o}),P=l(e["checkbox-label__text"],{[e["checkbox-label__text__big-form--checked"]]:c&&o,[e["checkbox-label__text__big-form--invalid"]]:c&&o&&a,[e["checkbox-label__text--on-dark"]]:t,[e["checkbox-label__text--disabled"]]:r}),q=l(e["checkbox-errors"]);let _=h("white");(t||c&&o)&&(_=h("blueberry",900)),a&&c&&o&&(_=h("white")),r&&(_=h("neutral",400)),V(()=>{u(d)},[d]);const B=G=>{g&&g(G),u(!o)},D=()=>b.createElement(b.Fragment,null,b.createElement("input",{id:m,name:N,className:M,type:"checkbox",checked:o,disabled:r,value:R,ref:j,"aria-describedby":p["aria-describedby"]??void 0,"aria-invalid":f,required:F,onChange:B,...L}),b.createElement("span",{className:O},o&&b.createElement(Z,{color:_,className:e.checkbox__icon,svgIcon:ee,size:J.XSmall})));return b.createElement("div",{"data-testid":S,"data-analyticsid":$.Checkbox,className:z},s&&b.createElement("p",{className:q},s),oe(x,D(),m,i,r,A,P,e["checkbox-sublabel-wrapper"],c))});v.displayName="Checkbox";const de=v;export{de as C,v as a};
|
|
2
|
-
//# sourceMappingURL=Checkbox.js.map
|
package/Checkbox.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../src/components/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, FormVariant, IconSize } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getColor } from '../../theme/currys/color';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { uuid } from '../../utils/uuid';\nimport Icon from '../Icons';\nimport Check from '../Icons/Check';\nimport { getLabelText, renderLabelAsParent } from '../Label';\n\nimport checkboxStyles from './styles.module.scss';\n\nexport interface CheckboxProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n 'aria-describedby' | 'name' | 'value' | 'disabled' | 'checked' | 'required' | 'onChange'\n > {\n /** Adds custom classes to the element. */\n className?: string;\n /** The <Label/> next to the checkbox - sublabels kan ikke kombineres med bigform variant */\n label: React.ReactNode;\n /** input id of the checkbox */\n inputId?: string;\n /** Changes the visuals of the checkbox */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the checkbox */\n variant?: keyof typeof FormVariant;\n /** Activates Error style for the checkbox - This is can be true while errorText is empty, when in a FormGroup */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const Checkbox = React.forwardRef((props: CheckboxProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n checked = false,\n disabled,\n label,\n inputId = uuid(),\n mode = FormMode.onwhite,\n name = inputId,\n variant,\n errorText,\n error = !!errorText,\n value = getLabelText(label),\n testId,\n required,\n onChange,\n ...rest\n } = props;\n const [isChecked, setIsChecked] = useState(checked);\n const onWhite = mode === FormMode.onwhite;\n const onGrey = mode === FormMode.ongrey;\n const onBlueberry = mode === FormMode.onblueberry;\n const onInvalid = error || mode === FormMode.oninvalid;\n const onDark = mode === FormMode.ondark;\n const bigform = variant === FormVariant.bigform;\n const { refObject, isFocused } = usePseudoClasses<HTMLInputElement>(isMutableRefObject(ref) ? ref : null);\n const mergedRefs = mergeRefs([ref, refObject]);\n\n const checkboxWrapperClasses = classNames(checkboxStyles['checkbox-wrapper'], {\n [checkboxStyles['checkbox-wrapper--with-error']]: errorText,\n [checkboxStyles['checkbox-wrapper--bigform']]: bigform,\n });\n const checkboxLabelClasses = classNames(checkboxStyles['checkbox-label'], {\n [checkboxStyles['checkbox-label--disabled']]: disabled,\n [checkboxStyles['checkbox-label--on-dark']]: onDark,\n [checkboxStyles['checkbox-label--bigform']]: bigform,\n [checkboxStyles['checkbox-label__big-form--checked']]: bigform && isChecked,\n [checkboxStyles['checkbox-label__big-form--focus']]: bigform && isFocused,\n [checkboxStyles['checkbox-label__big-form--on-white']]: bigform && onWhite,\n [checkboxStyles['checkbox-label__big-form--on-grey']]: bigform && onGrey,\n [checkboxStyles['checkbox-label__big-form--on-blueberry']]: bigform && onBlueberry,\n [checkboxStyles['checkbox-label__big-form--on-invalid']]: bigform && onInvalid,\n [checkboxStyles['checkbox-label__big-form--disabled']]: bigform && disabled,\n });\n const checkboxClasses = classNames(checkboxStyles.checkbox, className);\n const checkboxIconWrapperClasses = classNames(checkboxStyles['checkbox__icon-wrapper'], {\n [checkboxStyles['checkbox__icon-wrapper--on-white']]: onWhite,\n [checkboxStyles['checkbox__icon-wrapper--on-grey']]: onGrey,\n [checkboxStyles['checkbox__icon-wrapper--on-invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--disabled']]: disabled,\n [checkboxStyles['checkbox__icon-wrapper__regular--checked']]: !bigform && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__regular--invalid']]: !bigform && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__regular--on-dark']]: !bigform && isChecked && onDark,\n [checkboxStyles['checkbox__icon-wrapper__big-form--checked']]: bigform && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__big-form--invalid']]: bigform && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper--on-dark']]: onDark,\n [checkboxStyles['checkbox__icon-wrapper--on-blueberry']]: onBlueberry,\n [checkboxStyles['checkbox__icon-wrapper--invalid']]: onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__big-form--invalid']]: bigform && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__big-form--disabled']]: disabled && bigform && isChecked,\n [checkboxStyles['checkbox__icon-wrapper__big-form--checked--invalid']]: bigform && isChecked && onInvalid,\n [checkboxStyles['checkbox__icon-wrapper__big-form--checked--disabled']]: disabled && bigform && isChecked,\n });\n const labelTextClasses = classNames(checkboxStyles['checkbox-label__text'], {\n [checkboxStyles['checkbox-label__text__big-form--checked']]: bigform && isChecked,\n [checkboxStyles['checkbox-label__text__big-form--invalid']]: bigform && isChecked && onInvalid,\n [checkboxStyles['checkbox-label__text--on-dark']]: onDark,\n [checkboxStyles['checkbox-label__text--disabled']]: disabled,\n });\n const errorStyles = classNames(checkboxStyles['checkbox-errors']);\n\n let iconColor = getColor('white');\n if (onDark || (bigform && isChecked)) iconColor = getColor('blueberry', 900);\n if (onInvalid && bigform && isChecked) iconColor = getColor('white');\n if (disabled) iconColor = getColor('neutral', 400);\n\n useEffect(() => {\n setIsChecked(checked);\n }, [checked]);\n\n const onChangeHandler = (e: React.ChangeEvent<HTMLInputElement>): void => {\n if (onChange) {\n onChange(e);\n }\n\n setIsChecked(!isChecked);\n };\n\n const getLabelContent = (): React.ReactNode => {\n return (\n <>\n <input\n id={inputId}\n name={name}\n className={checkboxClasses}\n type=\"checkbox\"\n checked={isChecked}\n disabled={disabled}\n value={value}\n ref={mergedRefs}\n aria-describedby={props['aria-describedby'] ?? undefined}\n aria-invalid={error}\n required={required}\n onChange={onChangeHandler}\n {...rest}\n />\n <span className={checkboxIconWrapperClasses}>\n {isChecked && <Icon color={iconColor} className={checkboxStyles['checkbox__icon']} svgIcon={Check} size={IconSize.XSmall} />}\n </span>\n </>\n );\n };\n\n return (\n <div data-testid={testId} data-analyticsid={AnalyticsId.Checkbox} className={checkboxWrapperClasses}>\n {errorText && <p className={errorStyles}>{errorText}</p>}\n {renderLabelAsParent(\n label,\n getLabelContent(),\n inputId,\n mode as FormMode,\n disabled,\n checkboxLabelClasses,\n labelTextClasses,\n checkboxStyles['checkbox-sublabel-wrapper'],\n bigform\n )}\n </div>\n );\n});\n\nCheckbox.displayName = 'Checkbox';\n\nexport default Checkbox;\n"],"names":["Checkbox","React","props","ref","className","checked","disabled","label","inputId","uuid","mode","FormMode","name","variant","errorText","error","value","getLabelText","testId","required","onChange","rest","isChecked","setIsChecked","useState","onWhite","onGrey","onBlueberry","onInvalid","onDark","bigform","FormVariant","refObject","isFocused","usePseudoClasses","isMutableRefObject","mergedRefs","mergeRefs","checkboxWrapperClasses","classNames","checkboxStyles","checkboxLabelClasses","checkboxClasses","checkboxIconWrapperClasses","labelTextClasses","errorStyles","iconColor","getColor","useEffect","onChangeHandler","e","getLabelContent","Icon","Check","IconSize","AnalyticsId","renderLabelAsParent","Checkbox$1"],"mappings":"yjBAsCO,MAAMA,EAAWC,EAAM,WAAW,CAACC,EAAsBC,IAAqC,CAC7F,KAAA,CACJ,UAAAC,EACA,QAAAC,EAAU,GACV,SAAAC,EACA,MAAAC,EACA,QAAAC,EAAUC,EAAK,EACf,KAAAC,EAAOC,EAAS,QAChB,KAAAC,EAAOJ,EACP,QAAAK,EACA,UAAAC,EACA,MAAAC,EAAQ,CAAC,CAACD,EACV,MAAAE,EAAQC,GAAaV,CAAK,EAC1B,OAAAW,EACA,SAAAC,EACA,SAAAC,EACA,GAAGC,CACD,EAAAnB,EACE,CAACoB,EAAWC,CAAY,EAAIC,EAASnB,CAAO,EAC5CoB,EAAUf,IAASC,EAAS,QAC5Be,EAAShB,IAASC,EAAS,OAC3BgB,EAAcjB,I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,EAAA,cAAC,QAAA,CACC,GAAIO,EACJ,KAAAI,EACA,UAAW8B,EACX,KAAK,WACL,QAASpB,EACT,SAAAhB,EACA,MAAAU,EACA,IAAKoB,EACL,mBAAkBlC,EAAM,kBAAkB,GAAK,OAC/C,eAAca,EACd,SAAAI,EACA,SAAU8B,EACT,GAAG5B,CAAA,CACN,kBACC,OAAK,CAAA,UAAWsB,GACdrB,GAAarB,EAAA,cAACmD,GAAK,MAAON,EAAW,UAAWN,EAAe,eAAmB,QAASa,GAAO,KAAMC,EAAS,MAAQ,CAAA,CAC5H,CACF,EAIJ,OACGrD,EAAA,cAAA,MAAA,CAAI,cAAaiB,EAAQ,mBAAkBqC,EAAY,SAAU,UAAWjB,CAAA,EAC1ExB,GAAcb,EAAA,cAAA,IAAA,CAAE,UAAW4C,CAAA,EAAc/B,CAAU,EACnD0C,GACCjD,EACA4C,EAAgB,EAChB3C,EACAE,EACAJ,EACAmC,EACAG,EACAJ,EAAe,2BAA2B,EAC1CV,CAAA,CAEJ,CAEJ,CAAC,EAED9B,EAAS,YAAc,WAEvB,MAAAyD,GAAezD"}
|
package/Close.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import o from"react";import b from"classnames";import{AnalyticsId as k}from"./constants.js";import{useBreakpoint as C,Breakpoint as y}from"./hooks/useBreakpoint.js";import{useHover as R}from"./hooks/useHover.js";import{palette as v}from"./theme/palette.js";import{mergeRefs as I}from"./utils/refs.js";import{Icon as B}from"./components/Icons/Icon.js";import N from"./components/Icons/X.js";import t from"./components/Close/styles.module.scss";const g=o.forwardRef(function(r,s){const{small:e,testId:a,ariaLabel:m="Lukk",onClick:l,className:i,color:c=v.blueberry600}=r,n=C(),{hoverRef:f,isHovered:p}=R(),d=n===y.xs||e?38:48,u=b(t.close,{[t["close--small"]]:e},i);return o.createElement("button",{ref:I([s,f]),"data-testid":a,"data-analyticsid":k.Close,className:u,"aria-label":m,onClick:l,type:"button"},o.createElement(B,{svgIcon:N,color:c,size:d,isHovered:p}))}),X=g;export{X as C};
|
|
2
|
-
//# sourceMappingURL=Close.js.map
|
package/Close.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Close.js","sources":["../src/components/Close/Close.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useHover } from '../../hooks/useHover';\nimport { palette } from '../../theme/palette';\nimport { mergeRefs } from '../../utils/refs';\nimport Icon from '../Icons';\nimport X from '../Icons/X';\n\nimport styles from './styles.module.scss';\n\nexport interface CloseProps {\n /** Keeps the icon small for all screen sizes */\n small?: boolean;\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 /** Adds custom classes to the element. */\n className?: string;\n /** Gives color to the svg */\n color?: string;\n}\n\nconst Close = React.forwardRef(function ButtonForwardedRef(props: CloseProps, ref: React.ForwardedRef<HTMLButtonElement>) {\n const { small, testId, ariaLabel = 'Lukk', onClick, className, color = palette.blueberry600 } = props;\n const breakpoint = useBreakpoint();\n const { hoverRef, isHovered } = useHover();\n\n const iconSize = breakpoint === Breakpoint.xs || small ? 38 : 48;\n\n const closeClasses = classNames(styles.close, { [styles['close--small']]: small }, className);\n\n return (\n <button\n ref={mergeRefs([ref, hoverRef])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.Close}\n className={closeClasses}\n aria-label={ariaLabel}\n onClick={onClick}\n type=\"button\"\n >\n <Icon svgIcon={X} color={color} size={iconSize} isHovered={isHovered} />\n </button>\n );\n});\n\nexport default Close;\n"],"names":["Close","React","props","ref","small","testId","ariaLabel","onClick","className","color","palette","breakpoint","useBreakpoint","hoverRef","isHovered","useHover","iconSize","Breakpoint","closeClasses","classNames","styles","mergeRefs","AnalyticsId","Icon","X","Close$1"],"mappings":"2bA6BA,MAAMA,EAAQC,EAAM,WAAW,SAA4BC,EAAmBC,EAA4C,CAClH,KAAA,CAAE,MAAAC,EAAO,OAAAC,EAAQ,UAAAC,EAAY,OAAQ,QAAAC,EAAS,UAAAC,EAAW,MAAAC,EAAQC,EAAQ,YAAA,EAAiBR,EAC1FS,EAAaC,IACb,CAAE,SAAAC,EAAU,UAAAC,CAAU,EAAIC,EAAS,EAEnCC,EAAWL,IAAeM,EAAW,IAAMb,EAAQ,GAAK,GAExDc,EAAeC,EAAWC,EAAO,MAAO,CAAE,CAACA,EAAO,cAAc,CAAC,EAAGhB,CAAM,EAAGI,CAAS,EAG1F,OAAAP,EAAA,cAAC,SAAA,CACC,IAAKoB,EAAU,CAAClB,EAAKU,CAAQ,CAAC,EAC9B,cAAaR,EACb,mBAAkBiB,EAAY,MAC9B,UAAWJ,EACX,aAAYZ,EACZ,QAAAC,EACA,KAAK,QAAA,kBAEJgB,EAAK,CAAA,QAASC,EAAG,MAAAf,EAAc,KAAMO,EAAU,UAAAF,EAAsB,CAAA,CAG5E,CAAC,EAEDW,EAAezB"}
|
package/ErrorWrapper.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import a from"react";import o from"classnames";import e from"./components/ErrorWrapper/styles.module.scss";const m=t=>{const{errorText:r,className:s,testId:p}=t,c=o(e["error-wrapper"],s,{[e["error-wrapper--with-error"]]:r}),l=o(e["error-wrapper__errors"]);return a.createElement("div",{className:c,"data-testid":p||"error-wrapper-testid"},r&&a.createElement("p",{role:"alert",className:l},r),t.children)},w=m;export{w as E,m as a};
|
|
2
|
-
//# sourceMappingURL=ErrorWrapper.js.map
|
package/ErrorWrapper.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorWrapper.js","sources":["../src/components/ErrorWrapper/ErrorWrapper.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport styles from './styles.module.scss';\n\nexport interface ErrorWrapperProps {\n /** Error message */\n errorText?: string;\n /** Form component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const ErrorWrapper: React.FC<ErrorWrapperProps> = props => {\n const { errorText, className, testId } = props;\n\n const withErrorStyle = cn(styles['error-wrapper'], className, { [styles[`error-wrapper--with-error`]]: errorText });\n\n const errorStyles = cn(styles['error-wrapper__errors']);\n\n return (\n <div className={withErrorStyle} data-testid={testId || 'error-wrapper-testid'}>\n {errorText && (\n <p role=\"alert\" className={errorStyles}>\n {errorText}\n </p>\n )}\n {props.children}\n </div>\n );\n};\n\nexport default ErrorWrapper;\n"],"names":["ErrorWrapper","props","errorText","className","testId","withErrorStyle","cn","styles","errorStyles","React","ErrorWrapper$1"],"mappings":"2GAiBO,MAAMA,EAAqDC,GAAA,CAChE,KAAM,CAAE,UAAAC,EAAW,UAAAC,EAAW,OAAAC,CAAA,EAAWH,EAEnCI,EAAiBC,EAAGC,EAAO,eAAe,EAAGJ,EAAW,CAAE,CAACI,EAAO,2BAA2B,CAAC,EAAGL,CAAW,CAAA,EAE5GM,EAAcF,EAAGC,EAAO,uBAAuB,CAAC,EAEtD,uBACG,MAAI,CAAA,UAAWF,EAAgB,cAAaD,GAAU,sBACpD,EAAAF,GACEO,EAAA,cAAA,IAAA,CAAE,KAAK,QAAQ,UAAWD,GACxBN,CACH,EAEDD,EAAM,QACT,CAEJ,EAEAS,EAAeV"}
|
package/FormGroup.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r,{useState as _}from"react";import l from"classnames";import{FormMode as k,FormVariant as F,AnalyticsId as A}from"./constants.js";import{isComponent as s}from"./utils/component.js";import{u as D}from"./uuid.js";import{C as H}from"./Checkbox.js";import{E as V}from"./ErrorWrapper.js";import{F as $}from"./FormLayout.js";import{I as j}from"./Input.js";import{R as q,g as z}from"./RadioButton.js";import{S as J}from"./Select.js";import{T as K}from"./Title.js";import t from"./components/FormGroup/styles.module.scss";const u=r.forwardRef((o,G)=>{const{className:b,fieldsetClassName:w,mode:n=k.onwhite,variant:m=F.normal,error:a,name:p,htmlMarkup:c="fieldset",renderError:R=!0,errorWrapperClassName:y,errorWrapperTestId:v}=o,[T,x]=_(),[S]=_(D()),i=n===k.ondark,f=m===F.bigform,W=l(t["form-group-wrapper"],{[t["form-group-wrapper--on-dark"]]:i,[t["form-group-wrapper--invalid"]]:a},b),M=l(t["form-group-wrapper__title"],{[t["form-group-wrapper__title--on-dark"]]:i&&!a,[t["form-group-wrapper__title--bigform"]]:f}),B=l(t["form-group"]),g=l(t["field-set__legend"],{[t["field-set__legend--on-dark"]]:i&&!a,[t["field-set__legend--bigform"]]:f}),C=l(t["field-set"],w),d=(e,L)=>{if(s(e,$))return r.cloneElement(e,{variant:m,mapHelper:d});if(s(e,u))return r.cloneElement(e,{mode:n,variant:m,error:a,renderError:!1});if(s(e,H))return r.cloneElement(e,{name:p??e.props.name,mode:n,variant:m,error:!!a});if(s(e,q)){const N=typeof e.props.inputId>"u"?S+L:e.props.inputId;return r.cloneElement(e,{inputId:N,name:p??e.props.name,mode:n,onChange:I=>{x(I.target.id),e.props.onChange&&e.props.onChange(I)},variant:m,error:!!a,labelClassNames:z(N,n,f,T)})}else{if(s(e,j))return r.cloneElement(e,{name:p??e.props.name,mode:n,variant:m,error:!!a});if(s(e,J))return r.cloneElement(e,{name:p??e.props.name,mode:n,error:!!a})}return e},E=()=>r.createElement("div",{className:B},c==="div"&&r.createElement("div",{className:C},o.legend&&r.createElement("h5",{className:g},o.legend),r.Children.map(o.children,d)),c==="fieldset"&&r.createElement("fieldset",{name:o.fieldsetName,className:C},o.legend&&r.createElement("legend",{className:g},o.legend),r.Children.map(o.children,d)));return r.createElement("div",{"data-testid":o.testId,"data-analyticsid":A.FormGroup,className:W,ref:G,tabIndex:-1},o.title&&r.createElement(K,{className:M,htmlMarkup:"h4",appearance:"title4",margin:{marginTop:0,marginBottom:a?1:2}},o.title),R?r.createElement(V,{className:y,errorText:a,testId:v},E()):E())});u.displayName="FormGroup";const ne=u;export{ne as F,u as a};
|
|
2
|
-
//# sourceMappingURL=FormGroup.js.map
|
package/FormGroup.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormGroup.js","sources":["../src/components/FormGroup/FormGroup.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormMode, FormVariant } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport uuid from '../../utils/uuid';\nimport Checkbox, { CheckboxProps } from '../Checkbox/Checkbox';\nimport ErrorWrapper from '../ErrorWrapper';\nimport FormLayout, { FormLayoutProps } from '../FormLayout';\nimport Input, { InputProps } from '../Input/Input';\nimport RadioButton, { RadioButtonProps, getRadioLabelClasses } from '../RadioButton/RadioButton';\nimport Select, { SelectProps } from '../Select';\nimport Title from '../Title';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport type FormGroupTags = 'fieldset' | 'div';\n\nexport interface FormGroupProps {\n /** title for the the fieldset */\n title?: string;\n /** text placed in the legend tag of the fieldset */\n legend?: string;\n /** Items in the FormGroup component */\n children?: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the errorWrapper. */\n errorWrapperClassName?: string;\n /** Adds custom classes to the fieldset element. */\n fieldsetClassName?: string;\n /** Changes the visuals of the formgroup */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the formgroup */\n variant?: keyof typeof FormVariant;\n /** Error message */\n error?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets the data-testid attribute for the error-wrapper. */\n errorWrapperTestId?: string;\n /** Unique name for the child input element */\n name?: string;\n /** Unique name for the fieldset */\n fieldsetName?: string;\n /** Sets div instead of fieldset tag */\n htmlMarkup?: FormGroupTags;\n /** Renders the error component (Default: true) */\n renderError?: boolean;\n}\n\nexport const FormGroup = React.forwardRef((props: FormGroupProps, ref: React.ForwardedRef<HTMLDivElement>) => {\n const {\n className,\n fieldsetClassName,\n mode = FormMode.onwhite,\n variant = FormVariant.normal,\n error,\n name,\n htmlMarkup = 'fieldset',\n renderError = true,\n errorWrapperClassName,\n errorWrapperTestId,\n } = props;\n const [checkedRadioId, setCheckedRadioId] = useState<string>();\n const [radioGroupId] = useState<string>(uuid());\n const onDark = mode === FormMode.ondark;\n const bigform = variant === FormVariant.bigform;\n const formGroupWrapperClasses = classNames(\n formGroupStyles['form-group-wrapper'],\n {\n [formGroupStyles['form-group-wrapper--on-dark']]: onDark,\n [formGroupStyles['form-group-wrapper--invalid']]: error,\n },\n className\n );\n const titleClasses = classNames(formGroupStyles['form-group-wrapper__title'], {\n [formGroupStyles['form-group-wrapper__title--on-dark']]: onDark && !error,\n [formGroupStyles['form-group-wrapper__title--bigform']]: bigform,\n });\n const formGroupClasses = classNames(formGroupStyles['form-group']);\n\n const legendClasses = classNames(formGroupStyles['field-set__legend'], {\n [formGroupStyles['field-set__legend--on-dark']]: onDark && !error,\n [formGroupStyles['field-set__legend--bigform']]: bigform,\n });\n\n const fieldsetClasses = classNames(formGroupStyles['field-set'], fieldsetClassName);\n\n const mapFormComponent = (child: React.ReactNode, index: number): React.ReactNode => {\n if (isComponent<FormGroupProps>(child, FormLayout)) {\n return React.cloneElement(child as React.ReactElement<FormLayoutProps>, {\n variant,\n mapHelper: mapFormComponent,\n });\n } else if (isComponent<FormGroupProps>(child, FormGroup)) {\n return React.cloneElement(child, {\n mode,\n variant,\n error,\n renderError: false,\n });\n } else if (isComponent<CheckboxProps>(child, Checkbox)) {\n return React.cloneElement(child as React.ReactElement<CheckboxProps>, {\n name: name ?? child.props.name,\n mode,\n variant,\n error: !!error,\n });\n } else if (isComponent<RadioButtonProps>(child, RadioButton)) {\n const radioId = typeof child.props.inputId === 'undefined' ? radioGroupId + index : child.props.inputId;\n return React.cloneElement(child as React.ReactElement<RadioButtonProps>, {\n inputId: radioId,\n name: name ?? child.props.name,\n mode,\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => {\n setCheckedRadioId(event.target.id);\n child.props.onChange && child.props.onChange(event);\n },\n variant,\n error: !!error,\n labelClassNames: getRadioLabelClasses(radioId, mode as FormMode, bigform, checkedRadioId),\n });\n } else if (isComponent<InputProps>(child, Input)) {\n return React.cloneElement(child as React.ReactElement<InputProps>, {\n name: name ?? child.props.name,\n mode,\n variant,\n error: !!error,\n });\n } else if (isComponent<SelectProps>(child, Select)) {\n return React.cloneElement(child as React.ReactElement<SelectProps>, {\n name: name ?? child.props.name,\n mode,\n error: !!error,\n });\n }\n return child;\n };\n\n const formGroupContent = (): React.ReactNode => {\n return (\n <div className={formGroupClasses}>\n {htmlMarkup === 'div' && (\n <div className={fieldsetClasses}>\n {props.legend && <h5 className={legendClasses}>{props.legend}</h5>}\n {React.Children.map(props.children, mapFormComponent)}\n </div>\n )}\n {htmlMarkup === 'fieldset' && (\n <fieldset name={props.fieldsetName} className={fieldsetClasses}>\n {props.legend && <legend className={legendClasses}>{props.legend}</legend>}\n {React.Children.map(props.children, mapFormComponent)}\n </fieldset>\n )}\n </div>\n );\n };\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormGroup} className={formGroupWrapperClasses} ref={ref} tabIndex={-1}>\n {props.title && (\n <Title className={titleClasses} htmlMarkup={'h4'} appearance={'title4'} margin={{ marginTop: 0, marginBottom: error ? 1 : 2 }}>\n {props.title}\n </Title>\n )}\n {renderError ? (\n <ErrorWrapper className={errorWrapperClassName} errorText={error} testId={errorWrapperTestId}>\n {formGroupContent()}\n </ErrorWrapper>\n ) : (\n formGroupContent()\n )}\n </div>\n );\n});\n\nFormGroup.displayName = 'FormGroup';\n\nexport default FormGroup;\n"],"names":["FormGroup","React","props","ref","className","fieldsetClassName","mode","FormMode","variant","FormVariant","error","name","htmlMarkup","renderError","errorWrapperClassName","errorWrapperTestId","checkedRadioId","setCheckedRadioId","useState","radioGroupId","uuid","onDark","bigform","formGroupWrapperClasses","classNames","formGroupStyles","titleClasses","formGroupClasses","legendClasses","fieldsetClasses","mapFormComponent","child","index","isComponent","FormLayout","Checkbox","RadioButton","radioId","event","getRadioLabelClasses","Input","Select","formGroupContent","AnalyticsId","Title","ErrorWrapper","FormGroup$1"],"mappings":"0gBAoDO,MAAMA,EAAYC,EAAM,WAAW,CAACC,EAAuBC,IAA4C,CACtG,KAAA,CACJ,UAAAC,EACA,kBAAAC,EACA,KAAAC,EAAOC,EAAS,QAChB,QAAAC,EAAUC,EAAY,OACtB,MAAAC,EACA,KAAAC,EACA,WAAAC,EAAa,WACb,YAAAC,EAAc,GACd,sBAAAC,EACA,mBAAAC,CACE,EAAAb,EACE,CAACc,EAAgBC,CAAiB,EAAIC,EAAiB,EACvD,CAACC,CAAY,EAAID,EAAiBE,EAAM,CAAA,EACxCC,EAASf,IAASC,EAAS,OAC3Be,EAAUd,IAAYC,EAAY,QAClCc,EAA0BC,EAC9BC,EAAgB,oBAAoB,EACpC,CACE,CAACA,EAAgB,6BAA6B,CAAC,EAAGJ,EAClD,CAACI,EAAgB,6BAA6B,CAAC,EAAGf,CACpD,EACAN,CAAA,EAEIsB,EAAeF,EAAWC,EAAgB,2BAA2B,EAAG,CAC5E,CAACA,EAAgB,oCAAoC,CAAC,EAAGJ,GAAU,CAACX,EACpE,CAACe,EAAgB,oCAAoC,CAAC,EAAGH,CAAA,CAC1D,EACKK,EAAmBH,EAAWC,EAAgB,YAAY,CAAC,EAE3DG,EAAgBJ,EAAWC,EAAgB,mBAAmB,EAAG,CACrE,CAACA,EAAgB,4BAA4B,CAAC,EAAGJ,GAAU,CAACX,EAC5D,CAACe,EAAgB,4BAA4B,CAAC,EAAGH,CAAA,CAClD,EAEKO,EAAkBL,EAAWC,EAAgB,WAAW,EAAGpB,CAAiB,EAE5EyB,EAAmB,CAACC,EAAwBC,IAAmC,CAC/E,GAAAC,EAA4BF,EAAOG,CAAU,EACxC,OAAAjC,EAAM,aAAa8B,EAA8C,CACtE,QAAAvB,EACA,UAAWsB,CAAA,CACZ,EACQ,G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W0B,CAAgB,EAAA1B,EAAM,MAAO,EAC5DD,EAAM,SAAS,IAAIC,EAAM,SAAU4B,CAAgB,CACtD,EAEDlB,IAAe,YACbX,EAAA,cAAA,WAAA,CAAS,KAAMC,EAAM,aAAc,UAAW2B,CAAA,EAC5C3B,EAAM,QAAWD,EAAA,cAAA,SAAA,CAAO,UAAW2B,CAAgB,EAAA1B,EAAM,MAAO,EAChED,EAAM,SAAS,IAAIC,EAAM,SAAU4B,CAAgB,CACtD,CAEJ,EAKF,OAAA7B,EAAA,cAAC,OAAI,cAAaC,EAAM,OAAQ,mBAAkByC,EAAY,UAAW,UAAWpB,EAAyB,IAAApB,EAAU,SAAU,EAC9H,EAAAD,EAAM,OACJD,EAAA,cAAA2C,EAAA,CAAM,UAAWlB,EAAc,WAAY,KAAM,WAAY,SAAU,OAAQ,CAAE,UAAW,EAAG,aAAchB,EAAQ,EAAI,CACvH,CAAA,EAAAR,EAAM,KACT,EAEDW,EACCZ,EAAA,cAAC4C,GAAa,UAAW/B,EAAuB,UAAWJ,EAAO,OAAQK,GACvE2B,EAAiB,CACpB,EAEAA,EAEJ,CAAA,CAEJ,CAAC,EAED1C,EAAU,YAAc,YAExB,MAAA8C,GAAe9C"}
|
package/FormLayout.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import l from"classnames";import{FormVariant as h,AnalyticsId as v}from"./constants.js";import o from"./components/FormLayout/styles.module.scss";var p=(t=>(t.one="one",t.two="two",t.three="three",t.four="four",t.five="five",t))(p||{});const m=e.forwardRef((t,w)=>{const{maxColumns:a="one",colMinWidth:s=300,variant:f,className:c,mapHelper:r}=t,n={"--min-col-width":`${s}px`},d=l(o["form-layout-container"],{[o["form-layout-container--bigform"]]:f===h.bigform},c),u=l(o["form-layout-child"],{[o["form-layout-child--two"]]:a==="two",[o["form-layout-child--three"]]:a==="three",[o["form-layout-child--four"]]:a==="four",[o["form-layout-child--five"]]:a==="five"});return e.createElement("div",{"data-testid":t.testId,"data-analyticsid":v.FormLayout,style:n,className:d},e.Children.map(t.children,(i,y)=>e.createElement("div",{className:u},r?r(i,y):i)))});m.displayName="FormLayout";const C=m;export{C as F,p as a,m as b};
|
|
2
|
-
//# sourceMappingURL=FormLayout.js.map
|
package/FormLayout.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FormLayout.js","sources":["../src/components/FormLayout/FormLayout.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId, FormVariant } from '../../constants';\n\nimport formGroupStyles from './styles.module.scss';\n\nexport enum FormLayoutColumns {\n one = 'one',\n two = 'two',\n three = 'three',\n four = 'four',\n five = 'five',\n}\n\nexport interface FormLayoutProps {\n /** The max number of columns that will exist if space is available */\n maxColumns?: keyof typeof FormLayoutColumns;\n /** Sets the minimum width for the columns in pixels - this determines how many will fit on a row */\n colMinWidth?: number;\n /** Items in the FormLayout component */\n children?: React.ReactNode;\n /** Changes the visuals of the formgroup */\n variant?: keyof typeof FormVariant;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Function that helps map the form children */\n mapHelper?: (child: React.ReactNode, index: number) => React.ReactNode;\n}\n\nexport const FormLayout = React.forwardRef((props: FormLayoutProps, ref: React.ForwardedRef<HTMLElement>) => {\n const { maxColumns: columns = FormLayoutColumns.one, colMinWidth = 300, variant, className, mapHelper } = props;\n\n const cssVariable = { '--min-col-width': `${colMinWidth}px` } as React.CSSProperties;\n const formLayoutContainerClasses = classNames(\n formGroupStyles['form-layout-container'],\n {\n [formGroupStyles['form-layout-container--bigform']]: variant === FormVariant.bigform,\n },\n className\n );\n const formLayoutChildClasses = classNames(formGroupStyles['form-layout-child'], {\n [formGroupStyles['form-layout-child--two']]: columns === FormLayoutColumns.two,\n [formGroupStyles['form-layout-child--three']]: columns === FormLayoutColumns.three,\n [formGroupStyles['form-layout-child--four']]: columns === FormLayoutColumns.four,\n [formGroupStyles['form-layout-child--five']]: columns === FormLayoutColumns.five,\n });\n\n return (\n <div data-testid={props.testId} data-analyticsid={AnalyticsId.FormLayout} style={cssVariable} className={formLayoutContainerClasses}>\n {React.Children.map(props.children, (child: React.ReactNode, index: number) => {\n return <div className={formLayoutChildClasses}>{mapHelper ? mapHelper(child, index) : child}</div>;\n })}\n </div>\n );\n});\n\nFormLayout.displayName = 'FormLayout';\n\nexport default FormLayout;\n"],"names":["FormLayoutColumns","FormLayout","React","props","ref","columns","colMinWidth","variant","className","mapHelper","cssVariable","formLayoutContainerClasses","classNames","formGroupStyles","FormVariant","formLayoutChildClasses","AnalyticsId","child","index","FormLayout$1"],"mappings":"uKAQY,IAAAA,GAAAA,IACVA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,MAAQ,QACRA,EAAA,KAAO,OACPA,EAAA,KAAO,OALGA,IAAAA,GAAA,CAAA,CAAA,EAyBL,MAAMC,EAAaC,EAAM,WAAW,CAACC,EAAwBC,IAAyC,CACrG,KAAA,CAAE,WAAYC,EAAU,MAAuB,YAAAC,EAAc,IAAK,QAAAC,EAAS,UAAAC,EAAW,UAAAC,CAAc,EAAAN,EAEpGO,EAAc,CAAE,kBAAmB,GAAGJ,CAAW,MACjDK,EAA6BC,EACjCC,EAAgB,uBAAuB,EACvC,CACE,CAACA,EAAgB,gCAAgC,CAAC,EAAGN,IAAYO,EAAY,OAC/E,EACAN,CAAA,EAEIO,EAAyBH,EAAWC,EAAgB,mBAAmB,EAAG,CAC9E,CAACA,EAAgB,wBAAwB,CAAC,EAAGR,IAAY,MACzD,CAACQ,EAAgB,0BAA0B,CAAC,EAAGR,IAAY,QAC3D,CAACQ,EAAgB,yBAAyB,CAAC,EAAGR,IAAY,OAC1D,CAACQ,EAAgB,yBAAyB,CAAC,EAAGR,IAAY,MAAA,CAC3D,EAED,uBACG,MAAI,CAAA,cAAaF,EAAM,OAAQ,mBAAkBa,EAAY,WAAY,MAAON,EAAa,UAAWC,GACtGT,EAAM,SAAS,IAAIC,EAAM,SAAU,CAACc,EAAwBC,IACpDhB,EAAA,cAAC,OAAI,UAAWa,CAAA,EAAyBN,EAAYA,EAAUQ,EAAOC,CAAK,EAAID,CAAM,CAC7F,CACH,CAEJ,CAAC,EAEDhB,EAAW,YAAc,aAEzB,MAAAkB,EAAelB"}
|
package/HelpBubble.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import c from"classnames";import{AnalyticsId as L}from"./constants.js";import{A}from"./AnchorLink.js";import{C as w}from"./Close.js";import{P as I,a as P}from"./PopOver.js";import t from"./components/HelpBubble/styles.module.scss";const M=I,b=e.forwardRef((m,p)=>{const{children:u,className:f="",noCloseButton:n,linkText:r="Mer hjelp",linkUrl:o,linkTarget:d,onLinkClick:a,onClose:h,closeAriaLabel:k,showBubble:s,helpBubbleId:B,variant:C,controllerRef:_,role:i,testId:E}=m,l=i==="tooltip";if(!s&&!l)return null;const N=c(t.helpbubble,f),v=c(t.helpbubble__content,{[t["helpbubble__content--close"]]:!n&&!l}),H=()=>{if(!l){if(a&&r)return e.createElement("button",{className:t.helpbubble__link,onClick:a,type:"button"},r);if(o&&r)return e.createElement(A,{href:o,target:d},r)}},y=()=>{if(!(n||l))return e.createElement("div",{className:t.helpbubble__close},e.createElement(w,{small:!0,onClick:h,ariaLabel:k}))};return e.createElement(P,{id:B,variant:C,controllerRef:_,role:i,ref:p,show:l&&s,testId:E},e.createElement("div",{className:N,"data-analyticsid":L.HelpBubble},y(),e.createElement("div",{className:v},u,H())))});b.displayName="HelpBubble";const U=b;export{U as H,M as a};
|
|
2
|
-
//# sourceMappingURL=HelpBubble.js.map
|
package/HelpBubble.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HelpBubble.js","sources":["../src/components/HelpBubble/HelpBubble.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport AnchorLink, { AnchorLinkTargets } from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverProps, PopOverVariant } from '../PopOver';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\ntype HelpBubbleRole = 'tooltip';\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. Note that if role=\"tooltip\", you must not include interactive/focusable elements. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement>;\n /** Adds custom classes to the element. */\n className?: string;\n /** Determines the placement of the helpbubble. Default: automatic positioning. */\n variant?: keyof typeof HelpBubbleVariant;\n /** Show the bubble. Default: false. */\n showBubble?: boolean;\n /** Hide the close button in the bubble. Close button is never rendered if role=\"tooltip\". */\n noCloseButton?: boolean;\n /** Visible text on the link. Link is never rendered if role=\"tooltip\". */\n linkText?: string;\n /** Url the link leads to */\n linkUrl?: string;\n /** Sets the target type of the link. _blank adds an arrow icon at the end of the link */\n linkTarget?: AnchorLinkTargets;\n /** Function is called when link is clicked */\n onLinkClick?: () => void;\n /** Function is called when user clicks the button */\n onClose?: () => void;\n /** aria-label to be passed onto Close */\n closeAriaLabel?: string;\n /** Sets role of the HelpBubble element. If set to \"tooltip\", */\n role?: HelpBubbleRole;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nconst HelpBubble = React.forwardRef<HTMLDivElement | SVGSVGElement, HelpBubbleProps>((props, ref) => {\n const {\n children,\n className = '',\n noCloseButton,\n linkText = 'Mer hjelp',\n linkUrl,\n linkTarget,\n onLinkClick,\n onClose,\n closeAriaLabel,\n // Props passed on to PopOver\n showBubble,\n helpBubbleId,\n variant,\n controllerRef,\n role,\n testId,\n } = props;\n\n const isTooltip = role === 'tooltip';\n\n if (!showBubble && !isTooltip) {\n return null;\n }\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n\n const contentClasses = classNames(styles.helpbubble__content, {\n [styles['helpbubble__content--close']]: !noCloseButton && !isTooltip,\n });\n\n const renderLink = (): JSX.Element | undefined => {\n // Det er ikke tillatt med interaktive/fokuserbare elementer i role=\"tooltip\"\n if (isTooltip) {\n return;\n }\n if (onLinkClick && linkText) {\n return (\n <button className={styles.helpbubble__link} onClick={onLinkClick} type=\"button\">\n {linkText}\n </button>\n );\n } else if (linkUrl && linkText) {\n return (\n <AnchorLink href={linkUrl} target={linkTarget}>\n {linkText}\n </AnchorLink>\n );\n }\n };\n\n const renderCloseButton = (): JSX.Element | undefined => {\n if (noCloseButton || isTooltip) {\n return;\n }\n return (\n <div className={styles.helpbubble__close}>\n <Close small onClick={onClose} ariaLabel={closeAriaLabel} />\n </div>\n );\n };\n\n return (\n <PopOver\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role={role}\n ref={ref}\n show={isTooltip && showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n {renderCloseButton()}\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n </div>\n </PopOver>\n );\n});\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n"],"names":["HelpBubbleVariant","PopOverVariant","HelpBubble","React","props","ref","children","className","noCloseButton","linkText","linkUrl","linkTarget","onLinkClick","onClose","closeAriaLabel","showBubble","helpBubbleId","variant","controllerRef","role","testId","isTooltip","helpBubbleClasses","classNames","styles","contentClasses","renderLink","AnchorLink","renderCloseButton","Close","PopOver","AnalyticsId","HelpBubble$1"],"mappings":"4PAWO,MAAMA,EAAoBC,EAqC3BC,EAAaC,EAAM,WAA4D,CAACC,EAAOC,IAAQ,CAC7F,KAAA,CACJ,SAAAC,EACA,UAAAC,EAAY,GACZ,cAAAC,EACA,SAAAC,EAAW,YACX,QAAAC,EACA,WAAAC,EACA,YAAAC,EACA,QAAAC,EACA,eAAAC,EAEA,WAAAC,EACA,aAAAC,EACA,QAAAC,EACA,cAAAC,EACA,KAAAC,EACA,OAAAC,CACE,EAAAhB,EAEEiB,EAAYF,IAAS,UAEvB,GAAA,CAACJ,GAAc,CAACM,EACX,OAAA,KAGT,MAAMC,EAAoBC,EAAWC,EAAO,WAAYjB,CAAS,EAE3DkB,EAAiBF,EAAWC,EAAO,oBAAqB,CAC5D,CAACA,EAAO,4BAA4B,CAAC,EAAG,CAAChB,GAAiB,CAACa,CAAA,CAC5D,EAEKK,EAAa,IAA+B,CAEhD,GAAI,CAAAL,EAGJ,IAAIT,GAAeH,EAEf,OAAAN,EAAA,cAAC,UAAO,UAAWqB,EAAO,iBAAkB,QAASZ,EAAa,KAAK,QAAA,EACpEH,CACH,EAEJ,GAAWC,GAAWD,EACpB,uBACGkB,EAAW,CAAA,KAAMjB,EAAS,OAAQC,GAChCF,CACH,EAEJ,EAGImB,EAAoB,IAA+B,CACvD,GAAI,EAAApB,GAAiBa,GAGrB,OACGlB,EAAA,cAAA,MAAA,CAAI,UAAWqB,EAAO,iBACrB,EAAArB,EAAA,cAAC0B,EAAM,CAAA,MAAK,GAAC,QAAShB,EAAS,UAAWC,CAAgB,CAAA,CAC5D,CAAA,EAKF,OAAAX,EAAA,cAAC2B,EAAA,CACC,GAAId,EACJ,QAAAC,EACA,cAAAC,EACA,KAAAC,EACA,IAAAd,EACA,KAAMgB,GAAaN,EACnB,OAAAK,CAAA,kBAEC,MAAI,CAAA,UAAWE,EAAmB,mBAAkBS,EAAY,YAC9DH,EACD,EAAAzB,EAAA,cAAC,OAAI,UAAWsB,GACbnB,EACAoB,EAAA,CACH,CACF,CAAA,CAGN,CAAC,EAEDxB,EAAW,YAAc,aAEzB,MAAA8B,EAAe9B"}
|
package/HighlightBox.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import l from"classnames";import"./theme/grid.js";import{useBreakpoint as C,Breakpoint as I}from"./hooks/useBreakpoint.js";import{AnalyticsId as p,IconSize as N}from"./constants.js";import{Icon as y}from"./components/Icons/Icon.js";import{T as B}from"./Title.js";import t from"./components/HighlightBox/styles.module.scss";var H=(i=>(i.medium="medium",i.large="large",i.fluid="fluid",i))(H||{});const u=({className:i,size:r,children:s})=>e.createElement("div",{className:i,"data-testid":"highlightbox-wrapper"},e.createElement("div",{className:t.highlightbox__row},e.createElement("div",{className:l(t.highlightbox__col,r==="medium"&&t["highlightbox__col--offset"])},s))),x=i=>{const{children:r,className:s}=i,a=l(t["highlightbox__content-wrapper"],s);return e.createElement("div",{className:a},e.createElement("div",{className:l(t.highlightbox__row)},r))},W=i=>{const{children:r,color:s="white",size:a="medium",testId:n,svgIcon:c,htmlMarkup:f="div",className:b,contentWrapperClassName:v,title:g,titleHtmlMarkup:k="h2"}=i,_=C(),o=l(t.highlightbox,t[`highlightbox--${s}`],t[`highlightbox--${a}`],c&&t["highlightbox--has-icon"],{container:a==="medium"||a==="large"},b),m=()=>{if(c){const w=a==="large"&&_&&_>=I.md?N.Medium:N.Small,E=e.createElement(B,{testId:"titleId",htmlMarkup:k,appearance:"title4"},g);return e.createElement(e.Fragment,null,e.createElement("div",{className:t.highlightbox__icon},e.createElement(y,{svgIcon:c,size:w}),g&&e.createElement("div",{className:t.mobile},E)),e.createElement("div",{className:t.highlightbox__content},g&&e.createElement("div",{className:t.desktop,"aria-hidden":"true"},E),r))}return r},h=f,d=l(t["highlightbox__content-wrapper"],v);return a==="medium"?e.createElement(u,{className:o,size:a},e.createElement(h,{className:d,"data-testid":n,"data-analyticsid":p.HighlightBox},m())):a==="large"&&c?e.createElement(u,{className:o,size:a},e.createElement(x,{className:d},e.createElement(h,{className:l(t.highlightbox__col,t["highlightbox__col--large-with-icon"]),"data-testid":n,"data-analyticsid":p.HighlightBox},m()))):a==="large"?e.createElement(u,{className:o,size:a},e.createElement(x,{className:d},e.createElement(h,{className:l(t.highlightbox__col,t["highlightbox__col--offset"]),"data-testid":n,"data-analyticsid":p.HighlightBox},m()))):a==="fluid"?e.createElement(h,{className:o,"data-testid":n},m()):null},j=W;export{j as H,H as a};
|
|
2
|
-
//# sourceMappingURL=HighlightBox.js.map
|
package/HighlightBox.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HighlightBox.js","sources":["../src/components/HighlightBox/HighlightBox.tsx"],"sourcesContent":["import React from 'react';\n\nimport classNames from 'classnames';\n\nimport { useBreakpoint, Breakpoint } from '../..';\nimport { AnalyticsId } from '../../constants';\nimport { PaletteNames } from '../../theme/palette';\nimport Icon, { SvgIcon, IconSize } from '../Icons';\nimport Title, { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type HighlightBoxColors = Extract<PaletteNames, 'white' | 'neutral' | 'blueberry' | 'cherry'>;\n\nexport enum HighlightBoxSize {\n medium = 'medium',\n large = 'large',\n fluid = 'fluid',\n}\n\nexport type HighlightBoxTags = Exclude<\n keyof HTMLElementTagNameMap,\n 'dir' | 'font' | 'frame' | 'frameset' | 'marquee' | 'applet' | 'basefont'\n>;\n\ninterface HighlightBoxProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** Changes the background color. Default: white */\n color?: HighlightBoxColors;\n /** Changes the size. Default: medium */\n size?: keyof typeof HighlightBoxSize;\n /** Adds an icon to the highlightbox. */\n svgIcon?: SvgIcon;\n /** Changes the underlying element. Default: div */\n htmlMarkup?: HighlightBoxTags;\n /** Adds custom classes to the element. */\n className?: string;\n /** Adds custom classes to the content-wrapper */\n contentWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Element that is set after the icon-element in the DOM, often a title-element */\n title?: string;\n /** Markup props for title */\n titleHtmlMarkup?: TitleTags;\n}\n\ninterface WrapperProps {\n className: string;\n size?: keyof typeof HighlightBoxSize;\n}\n\nconst Wrapper: React.FC<WrapperProps> = ({ className, size, children }) => (\n <div className={className} data-testid={'highlightbox-wrapper'}>\n <div className={styles.highlightbox__row}>\n <div className={classNames(styles.highlightbox__col, size === HighlightBoxSize.medium && styles['highlightbox__col--offset'])}>\n {children}\n </div>\n </div>\n </div>\n);\n\ninterface ContentWrapperProps {\n children: React.ReactNode;\n className?: string;\n}\n\nconst ContentWrapper: React.FC<ContentWrapperProps> = props => {\n const { children, className } = props;\n const contentWrapperClasses = classNames(styles['highlightbox__content-wrapper'], className);\n\n return (\n <div className={contentWrapperClasses}>\n <div className={classNames(styles.highlightbox__row)}>{children}</div>\n </div>\n );\n};\n\nconst HighlightBox: React.FC<HighlightBoxProps> = props => {\n const {\n children,\n color = 'white',\n size = HighlightBoxSize.medium,\n testId,\n svgIcon,\n htmlMarkup = 'div',\n className,\n contentWrapperClassName,\n title,\n titleHtmlMarkup = 'h2',\n } = props;\n const breakpoint = useBreakpoint();\n\n const containerClassName = classNames(\n styles['highlightbox'],\n styles[`highlightbox--${color}`],\n styles[`highlightbox--${size}`],\n svgIcon && styles['highlightbox--has-icon'],\n { container: size === 'medium' || size === 'large' },\n className\n );\n\n const renderContent = () => {\n if (svgIcon) {\n const iconSize = size === HighlightBoxSize.large && breakpoint && breakpoint >= Breakpoint.md ? IconSize.Medium : IconSize.Small;\n\n const titleElement = (\n <Title testId=\"titleId\" htmlMarkup={titleHtmlMarkup} appearance=\"title4\">\n {title}\n </Title>\n );\n\n return (\n <>\n <div className={styles.highlightbox__icon}>\n <Icon svgIcon={svgIcon} size={iconSize} />\n {title && <div className={styles['mobile']}>{titleElement}</div>}\n </div>\n <div className={styles.highlightbox__content}>\n {title && (\n <div className={styles['desktop']} aria-hidden=\"true\">\n {titleElement}\n </div>\n )}\n {children}\n </div>\n </>\n );\n }\n\n return children;\n };\n\n const CustomTag = htmlMarkup;\n\n const contentWrapperClasses = classNames(styles['highlightbox__content-wrapper'], contentWrapperClassName);\n\n if (size === HighlightBoxSize.medium) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <CustomTag className={contentWrapperClasses} data-testid={testId} data-analyticsid={AnalyticsId.HighlightBox}>\n {renderContent()}\n </CustomTag>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.large && svgIcon) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <ContentWrapper className={contentWrapperClasses}>\n <CustomTag\n className={classNames(styles.highlightbox__col, styles['highlightbox__col--large-with-icon'])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.HighlightBox}\n >\n {renderContent()}\n </CustomTag>\n </ContentWrapper>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.large) {\n return (\n <Wrapper className={containerClassName} size={size}>\n <ContentWrapper className={contentWrapperClasses}>\n <CustomTag\n className={classNames(styles.highlightbox__col, styles['highlightbox__col--offset'])}\n data-testid={testId}\n data-analyticsid={AnalyticsId.HighlightBox}\n >\n {renderContent()}\n </CustomTag>\n </ContentWrapper>\n </Wrapper>\n );\n }\n\n if (size === HighlightBoxSize.fluid) {\n return (\n <CustomTag className={containerClassName} data-testid={testId}>\n {renderContent()}\n </CustomTag>\n );\n }\n\n return null;\n};\n\nexport default HighlightBox;\n"],"names":["HighlightBoxSize","Wrapper","className","size","children","React","styles","classNames","ContentWrapper","props","contentWrapperClasses","HighlightBox","color","testId","svgIcon","htmlMarkup","contentWrapperClassName","title","titleHtmlMarkup","breakpoint","useBreakpoint","containerClassName","renderContent","iconSize","Breakpoint","IconSize","titleElement","Title","Icon","CustomTag","AnalyticsId","HighlightBox$1"],"mappings":"wVAcY,IAAAA,GAAAA,IACVA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,MAAQ,QAHEA,IAAAA,GAAA,CAAA,CAAA,EAuCZ,MAAMC,EAAkC,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAM,SAAAC,CAC1D,IAAAC,EAAA,cAAC,MAAI,CAAA,UAAAH,EAAsB,cAAa,sBAAA,kBACrC,MAAI,CAAA,UAAWI,EAAO,iBAAA,EACpBD,EAAA,cAAA,MAAA,CAAI,UAAWE,EAAWD,EAAO,kBAAmBH,IAAS,UAA2BG,EAAO,2BAA2B,CAAC,GACzHF,CACH,CACF,CACF,EAQII,EAAyDC,GAAA,CACvD,KAAA,CAA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AAO,+BAA+B,EAAGU,CAAuB,EAEzG,OAAIb,IAAS,yBAERF,EAAQ,CAAA,UAAWoB,EAAoB,KAAAlB,CAAA,kBACrC0B,EAAU,CAAA,UAAWnB,EAAuB,cAAaG,EAAQ,mBAAkBiB,EAAY,YAC7F,EAAAR,EACH,CAAA,CACF,EAIAnB,IAAS,SAA0BW,EAEnCT,EAAA,cAACJ,GAAQ,UAAWoB,EAAoB,KAAAlB,GACrCE,EAAA,cAAAG,EAAA,CAAe,UAAWE,CACzB,EAAAL,EAAA,cAACwB,EAAA,CACC,UAAWtB,EAAWD,EAAO,kBAAmBA,EAAO,oCAAoC,CAAC,EAC5F,cAAaO,EACb,mBAAkBiB,EAAY,YAAA,EAE7BR,EAAc,CAEnB,CAAA,CACF,EAIAnB,IAAS,QAETE,EAAA,cAACJ,GAAQ,UAAWoB,EAAoB,KAAAlB,GACrCE,EAAA,cAAAG,EAAA,CAAe,UAAWE,CACzB,EAAAL,EAAA,cAACwB,EAAA,CACC,UAAWtB,EAAWD,EAAO,kBAAmBA,EAAO,2BAA2B,CAAC,EACnF,cAAaO,EACb,mBAAkBiB,EAAY,YAAA,EAE7BR,EAAc,CAEnB,CAAA,CACF,EAIAnB,IAAS,wBAER0B,EAAU,CAAA,UAAWR,EAAoB,cAAaR,CAAA,EACpDS,GACH,EAIG,IACT,EAEAS,EAAepB"}
|
package/HorizontalScroll.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r,{useRef as e}from"react";import i from"classnames";import{useIsVisible as c}from"./hooks/useIsVisible.js";import{useSize as g}from"./hooks/useSize.js";import o from"./components/HorizontalScroll/styles.module.scss";const d="3px",p=({children:m,childWidth:_,testId:h,...l})=>{const t=e(null),a=e(null),s=e(null),f=c(a,1,{root:t==null?void 0:t.current,rootMargin:d},!0),u=c(s,1,{root:t==null?void 0:t.current,rootMargin:d},!0),{width:v=0}=g(t)||{},z=_>v,b=i(o.horizontalscroll__viewport,z&&o["horizontalscroll__viewport--overflow"]),n=l["aria-label"]||l["aria-labelledby"];return r.createElement("div",{className:o.horizontalscroll,"data-testid":h},r.createElement("div",{className:b,ref:t,tabIndex:n?0:void 0,role:n?"region":void 0,...l},r.createElement("div",{className:i(o.horizontalscroll__indicator,o["horizontalscroll__indicator--left"],!f&&o["horizontalscroll__indicator--visible"])}),r.createElement("div",{className:i(o.horizontalscroll__indicator,o["horizontalscroll__indicator--right"],!u&&o["horizontalscroll__indicator--visible"])}),r.createElement("div",{ref:a}),m,r.createElement("div",{ref:s})))},S=p;export{S as H,p as a};
|
|
2
|
-
//# sourceMappingURL=HorizontalScroll.js.map
|
package/HorizontalScroll.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalScroll.js","sources":["../src/components/HorizontalScroll/HorizontalScroll.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport classNames from 'classnames';\n\nimport { useIsVisible } from '../../hooks/useIsVisible';\nimport { useSize } from '../../hooks/useSize';\nimport { AriaLabelAttributes } from '../../utils/accessibility';\n\nimport styles from './styles.module.scss';\n\n// Scrolle-indikator vises/skjules når det er x px igjen til venstre eller høyre side\nconst ROOT_MARGIN_OFFSET = '3px';\n\ninterface HorizontalScrollProps {\n /**\n * Bredden på elementet som potensielt vil scrolle horisontalt i px\n */\n childWidth: number;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const HorizontalScroll: React.FC<HorizontalScrollProps & AriaLabelAttributes> = ({ children, childWidth, testId, ...rest }) => {\n const viewportRef = useRef<HTMLDivElement>(null);\n const leftRef = useRef<HTMLDivElement>(null);\n const rightRef = useRef<HTMLDivElement>(null);\n const leftIsVisible = useIsVisible(leftRef, 1, { root: viewportRef?.current, rootMargin: ROOT_MARGIN_OFFSET }, true);\n const rightIsVisible = useIsVisible(rightRef, 1, { root: viewportRef?.current, rootMargin: ROOT_MARGIN_OFFSET }, true);\n const { width: viewPortWidth = 0 } = useSize(viewportRef) || {};\n\n const isOverflowing = childWidth > viewPortWidth;\n const viewportClasses = classNames(styles.horizontalscroll__viewport, isOverflowing && styles['horizontalscroll__viewport--overflow']);\n const hasAriaAttributes = rest['aria-label'] || rest['aria-labelledby'];\n\n return (\n <div className={styles.horizontalscroll} data-testid={testId}>\n {/* viewport-diven må ta tabIndex for å løse et annet UU-problem, at div med overflow: scroll må kunne navigeres med keyboard. */}\n {/* Enten aria-label eller aria-labelledbyid må settes */}\n <div\n className={viewportClasses}\n ref={viewportRef}\n tabIndex={hasAriaAttributes ? 0 : undefined}\n role={hasAriaAttributes ? 'region' : undefined}\n {...rest}\n >\n <div\n className={classNames(\n styles.horizontalscroll__indicator,\n styles['horizontalscroll__indicator--left'],\n !leftIsVisible && styles['horizontalscroll__indicator--visible']\n )}\n />\n <div\n className={classNames(\n styles.horizontalscroll__indicator,\n styles['horizontalscroll__indicator--right'],\n !rightIsVisible && styles['horizontalscroll__indicator--visible']\n )}\n />\n <div ref={leftRef} />\n {children}\n <div ref={rightRef} />\n </div>\n </div>\n );\n};\n\nexport default HorizontalScroll;\n"],"names":["ROOT_MARGIN_OFFSET","HorizontalScroll","children","childWidth","testId","rest","viewportRef","useRef","leftRef","rightRef","leftIsVisible","useIsVisible","rightIsVisible","viewPortWidth","useSize","isOverflowing","viewportClasses","classNames","styles","hasAriaAttributes","React","HorizontalScroll$1"],"mappings":"gOAWA,MAAMA,EAAqB,MAWdC,EAA0E,CAAC,CAAE,SAAAC,EAAU,WAAAC,EAAY,OAAAC,EAAQ,GAAGC,KAAW,CAC9H,MAAAC,EAAcC,EAAuB,IAAI,EACzCC,EAAUD,EAAuB,IAAI,EACrCE,EAAWF,EAAuB,IAAI,EACtCG,EAAgBC,EAAaH,EAAS,EAAG,CAAE,KAAMF,GAAA,YAAAA,EAAa,QAAS,WAAYN,CAAmB,EAAG,EAAI,EAC7GY,EAAiBD,EAAaF,EAAU,EAAG,CAAE,KAAMH,GAAA,YAAAA,EAAa,QAAS,WAAYN,CAAmB,EAAG,EAAI,EAC/G,CAAE,MAAOa,EAAgB,GAAMC,EAAQR,CAAW,GAAK,GAEvDS,EAAgBZ,EAAaU,EAC7BG,EAAkBC,EAAWC,EAAO,2BAA4BH,GAAiBG,EAAO,sCAAsC,CAAC,EAC/HC,EAAoBd,EAAK,YAAY,GAAKA,EAAK,iBAAiB,EAEtE,uBACG,MAAI,CAAA,UAAWa,EAAO,iBAAkB,cAAad,CAGpD,EAAAgB,EAAA,cAAC,MAAA,CACC,UAAWJ,EACX,IAAKV,EACL,SAAUa,EAAoB,EAAI,OAClC,KAAMA,EAAoB,SAAW,OACpC,GAAGd,CAAA,EAEJe,EAAA,cAAC,MAAA,CACC,UAAWH,EACTC,EAAO,4BACPA,EAAO,mCAAmC,EAC1C,CAACR,GAAiBQ,EAAO,sCAAsC,CACjE,CAAA,CACF,EACAE,EAAA,cAAC,MAAA,CACC,UAAWH,EACTC,EAAO,4BACPA,EAAO,oCAAoC,EAC3C,CAACN,GAAkBM,EAAO,sCAAsC,CAClE,CAAA,CACF,EACAE,EAAA,cAAC,MAAI,CAAA,IAAKZ,CAAS,CAAA,EAClBN,EACDkB,EAAA,cAAC,MAAI,CAAA,IAAKX,CAAU,CAAA,CAAA,CAExB,CAEJ,EAEAY,EAAepB"}
|
package/Input.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import r,{useRef as A,useState as K,useEffect as he}from"react";import x from"classnames";import{FormMode as l,FormVariant as ge,IconSize as D,AnalyticsId as ve,AVERAGE_CHARACTER_WIDTH_PX as Ce}from"./constants.js";import{useBreakpoint as xe,Breakpoint as _e}from"./hooks/useBreakpoint.js";import{useUuid as Ee}from"./hooks/useUuid.js";import{getColor as F}from"./theme/currys/color.js";import{E as ye}from"./ErrorWrapper.js";import{Icon as ke}from"./components/Icons/Icon.js";import{a as we}from"./Label.js";import{M as Ie}from"./MaxCharacters.js";import t from"./components/Input/styles.module.scss";var Ne=(e=>(e.text="text",e.number="number",e.email="email",e.password="password",e.search="search",e.tel="tel",e.url="url",e.date="date",e.time="time",e))(Ne||{});const Re=(e,u,f)=>{const o=u?"1.5rem":"2rem",b=u?`${f}px`:"0px",d="4px";return`calc(${e*Ce}px + ${o} + ${b} + ${d})`},M=r.forwardRef((e,u)=>{const{className:f,defaultValue:o,placeholder:b,type:d="text",name:z,transparent:B=!1,icon:c,iconRight:h,inputId:P,inputWrapperRef:U,mode:i=l.onwhite,baseIncrementValue:_,variant:H,label:O,error:X,errorText:E,testId:q,disabled:s,readOnly:G,autoComplete:L,afterInputChildren:j,rightOfInput:J,width:y,required:Q,onChange:k,onKeyDown:w,autoFocus:Y,maxCharacters:m,maxText:Z,...T}=e,ee=xe(),p=A(null),I=Ee(P),[N,R]=K(o||""),[te,ne]=K(void 0),g=A(!1),W=/^[0-9]$/;he(()=>{R(o||"")},[o]);const re=i===l.ondark,ae=i===l.onblueberry,oe=!!m&&N.toString().length>m,v=i===l.oninvalid||!!E||!!X||oe,C=H===ge.bigform,ie=B&&i!==l.ondark&&!v,ce=x(t["input-wrapper"],f),se=x(t["input-container"],{[t["input-container--transparent"]]:ie,[t["input-container--on-blueberry"]]:ae,[t["input-container--on-dark"]]:re,[t["input-container--invalid"]]:v,[t["input-container--bigform"]]:C,[t["input-container--disabled"]]:s,[t["input-container--with-icon"]]:c}),le=x(t["input-container__input"],{[t["input-container__input--bigform"]]:C,[t["input-container__input--disabled"]]:s}),ue=s?F("neutral",500):F("black"),S=ee===_e.xs||!C?D.XSmall:D.Small,V=()=>c!==void 0?r.createElement(ke,{className:t["input-container__input__icon"],color:ue,size:S,svgIcon:c}):null,de=n=>{if(p&&p.current&&c){const a=h?0:1;p.current.children[a].focus(),e.onClick&&e.onClick(n)}},me=n=>{const a=pe(n);k&&k(n),R(a),ne(a)},pe=n=>{if(typeof _>"u"||d!=="number")return n.target.value;const a=Number(n.target.value);return!te&&!g.current&&(a===1||a===-1)&&(n.target.value=_+""),n.target.value},fe=n=>{W.test(n.key)&&(g.current=!0),w&&w(n)},be=n=>{W.test(n.key)&&(g.current=!1)},$=y?Re(y,!!c,S):void 0;return r.createElement(ye,{errorText:E},r.createElement("div",{"data-testid":q,"data-analyticsid":ve.Input,className:ce,ref:U},we(O,I,i,s),r.createElement("div",{className:t["content-wrapper"]},r.createElement("div",{onClick:de,ref:p,className:se,style:{maxWidth:$}},!h&&V(),r.createElement("input",{onChange:me,onKeyDown:fe,onKeyUp:be,name:z,type:d,defaultValue:o,id:I,className:le,ref:u,"aria-labelledby":e["aria-labelledby"]??void 0,"aria-describedby":e["aria-describedby"]??void 0,"aria-invalid":!!v,disabled:s,placeholder:b,readOnly:G,autoComplete:L||"off",required:Q,autoFocus:Y,...T}),h&&V()),r.createElement("div",{className:t["content-wrapper__right-of-input"]},J)),m&&r.createElement(Ie,{maxCharacters:m,length:N.toString().length,maxText:Z,mode:i,maxWidth:$}),j))});M.displayName="Input";const Ue=M;export{Ue as I,Ne as a};
|
|
2
|
-
//# sourceMappingURL=Input.js.map
|
package/Input.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../src/components/Input/Input.tsx"],"sourcesContent":["import React, { useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\n\nimport { FormMode, FormVariant, AnalyticsId, AVERAGE_CHARACTER_WIDTH_PX } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useUuid } from '../../hooks/useUuid';\nimport { getColor } from '../../theme/currys';\nimport ErrorWrapper from '../ErrorWrapper';\nimport Icon, { IconSize, SvgIcon } from '../Icons';\nimport { renderLabel } from '../Label';\nimport MaxCharacters from '../MaxCharacters/MaxCharacters';\n\nimport styles from './styles.module.scss';\n\nexport interface InputProps\n extends Pick<\n React.InputHTMLAttributes<HTMLInputElement>,\n | 'disabled'\n | 'readOnly'\n | 'autoComplete'\n | 'name'\n | 'placeholder'\n | 'defaultValue'\n | 'required'\n | 'value'\n | 'min'\n | 'max'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'onBlur'\n | 'onClick'\n | 'onChange'\n | 'onFocus'\n | 'onKeyDown'\n | 'autoFocus'\n > {\n /** The number at which the input field starts when you increment or decrement it */\n baseIncrementValue?: number;\n /** Adds custom classes to the element. */\n className?: string;\n /** HMTL Input type */\n type?: keyof typeof InputTypes;\n /** input id */\n inputId?: string;\n /** Width of input field in characters (approximate) */\n width?: number;\n /** If true, the component will be transparent. */\n transparent?: boolean;\n /** Icon to be displayed next to the input field */\n icon?: SvgIcon;\n /** Places the icon to the right */\n iconRight?: boolean;\n /** Ref that is placed on the inputWrapper */\n inputWrapperRef?: React.RefObject<HTMLDivElement>;\n /** Changes the color profile of the input */\n mode?: keyof typeof FormMode;\n /** Changes the visuals of the input */\n variant?: keyof typeof FormVariant;\n /** Label of the input */\n label?: React.ReactNode;\n /** Activates Error style for the input */\n error?: boolean;\n /** Error text to show above the component */\n errorText?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Component shown after input */\n afterInputChildren?: React.ReactNode;\n /** Component shown to the right of input */\n rightOfInput?: React.ReactNode;\n /** max character limit in input */\n maxCharacters?: number;\n /** The text is displayed in the end of the text-counter */\n maxText?: string;\n}\n\nexport enum InputTypes {\n text = 'text',\n number = 'number',\n email = 'email',\n password = 'password',\n search = 'search',\n tel = 'tel',\n url = 'url',\n date = 'date',\n time = 'time',\n}\n\nconst getInputMaxWidth = (characters: number, hasIcon: boolean, iconSize: number): string => {\n const paddingWidth = hasIcon ? '1.5rem' : '2rem';\n const iconWidth = hasIcon ? `${iconSize}px` : '0px';\n const borderWidth = '4px';\n\n return `calc(${characters * AVERAGE_CHARACTER_WIDTH_PX}px + ${paddingWidth} + ${iconWidth} + ${borderWidth})`;\n};\n\nconst Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {\n const {\n className,\n defaultValue,\n placeholder,\n type = InputTypes.text,\n name,\n transparent = false,\n icon,\n iconRight,\n inputId,\n inputWrapperRef,\n mode = FormMode.onwhite,\n baseIncrementValue,\n variant,\n label,\n error,\n errorText,\n testId,\n disabled,\n readOnly,\n autoComplete,\n afterInputChildren,\n rightOfInput,\n width,\n required,\n onChange,\n onKeyDown,\n autoFocus,\n maxCharacters,\n maxText,\n ...rest\n } = props;\n const breakpoint = useBreakpoint();\n const inputContainerRef = useRef<HTMLDivElement>(null);\n const inputIdState = useUuid(inputId);\n const [input, setInput] = useState(defaultValue || '');\n const [prevValue, setPrevValue] = useState<string | number | undefined>(undefined);\n const numKeyPressed = useRef<boolean>(false);\n const numRegex = /^[0-9]$/;\n\n useEffect(() => {\n setInput(defaultValue || '');\n }, [defaultValue]);\n\n const onDark = mode === FormMode.ondark;\n const onBlueberry = mode === FormMode.onblueberry;\n const maxCharactersExceeded = !!maxCharacters && input.toString().length > maxCharacters;\n const onError = mode === FormMode.oninvalid || !!errorText || !!error || maxCharactersExceeded;\n const bigForm = variant === FormVariant.bigform;\n const isTransparent = transparent && mode !== FormMode.ondark && !onError;\n\n const inputWrapperClass = cn(styles['input-wrapper'], className);\n\n const inputContainer = cn(styles['input-container'], {\n [styles['input-container--transparent']]: isTransparent,\n [styles['input-container--on-blueberry']]: onBlueberry,\n [styles['input-container--on-dark']]: onDark,\n [styles['input-container--invalid']]: onError,\n [styles['input-container--bigform']]: bigForm,\n [styles['input-container--disabled']]: disabled,\n [styles['input-container--with-icon']]: icon,\n });\n\n const inputClass = cn(styles['input-container__input'], {\n [styles['input-container__input--bigform']]: bigForm,\n [styles['input-container__input--disabled']]: disabled,\n });\n\n const iconColor = disabled ? getColor('neutral', 500) : getColor('black');\n const iconSize = breakpoint === Breakpoint.xs || !bigForm ? IconSize.XSmall : IconSize.Small;\n\n const renderIcon = (): React.ReactNode => {\n return icon !== undefined ? (\n <Icon className={styles['input-container__input__icon']} color={iconColor} size={iconSize} svgIcon={icon} />\n ) : null;\n };\n\n // eslint-disable-next-line\n const handleClick = (e: React.MouseEvent<any>): void => {\n if (inputContainerRef && inputContainerRef.current && icon) {\n const selectedChild = iconRight ? 0 : 1;\n const input = inputContainerRef.current.children[selectedChild] as HTMLInputElement;\n input.focus();\n\n props.onClick && props.onClick(e);\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>): void => {\n const newValue = getIncrementValue(e);\n\n if (onChange) {\n onChange(e);\n }\n\n setInput(newValue);\n setPrevValue(newValue);\n };\n\n // Hvis bruker endrer number value med 1 og det skal startes på en annen verdi enn 0\n const getIncrementValue = (e: React.ChangeEvent<HTMLInputElement>): string => {\n if (typeof baseIncrementValue === 'undefined' || type !== 'number') return e.target.value;\n\n const valueAsNumber = Number(e.target.value);\n\n if (!prevValue && !numKeyPressed.current && (valueAsNumber === 1 || valueAsNumber === -1)) {\n e.target.value = baseIncrementValue + '';\n }\n\n return e.target.value;\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = true;\n }\n onKeyDown && onKeyDown(e);\n };\n\n const handleKeyUp = (e: React.KeyboardEvent<HTMLInputElement>): void => {\n if (numRegex.test(e.key)) {\n numKeyPressed.current = false;\n }\n };\n\n const maxWidth = width ? getInputMaxWidth(width, !!icon, iconSize) : undefined;\n\n return (\n <ErrorWrapper errorText={errorText}>\n <div data-testid={testId} data-analyticsid={AnalyticsId.Input} className={inputWrapperClass} ref={inputWrapperRef}>\n {renderLabel(label, inputIdState, mode as FormMode, disabled)}\n {/* input-elementet tillater keyboard-interaksjon */}\n <div className={styles['content-wrapper']}>\n {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}\n <div onClick={handleClick} ref={inputContainerRef} className={inputContainer} style={{ maxWidth }}>\n {!iconRight && renderIcon()}\n <input\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n onKeyUp={handleKeyUp}\n name={name}\n type={type}\n defaultValue={defaultValue}\n id={inputIdState}\n className={inputClass}\n ref={ref}\n aria-labelledby={props['aria-labelledby'] ?? undefined}\n aria-describedby={props['aria-describedby'] ?? undefined}\n aria-invalid={!!onError}\n disabled={disabled}\n placeholder={placeholder}\n readOnly={readOnly}\n autoComplete={autoComplete || 'off'}\n required={required}\n // eslint-disable-next-line jsx-a11y/no-autofocus\n autoFocus={autoFocus}\n {...rest}\n />\n {iconRight && renderIcon()}\n </div>\n <div className={styles['content-wrapper__right-of-input']}>{rightOfInput}</div>\n </div>\n {maxCharacters && (\n <MaxCharacters maxCharacters={maxCharacters} length={input.toString().length} maxText={maxText} mode={mode} maxWidth={maxWidth} />\n )}\n {afterInputChildren}\n </div>\n </ErrorWrapper>\n );\n});\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["InputTypes","getInputMaxWidth","characters","hasIcon","iconSize","paddingWidth","iconWidth","borderWidth","AVERAGE_CHARACTER_WIDTH_PX","Input","React","props","ref","className","defaultValue","placeholder","type","name","transparent","icon","iconRight","inputId","inputWrapperRef","mode","FormMode","baseIncrementValue","variant","label","error","errorText","testId","disabled","readOnly","autoComplete","afterInputChildren","rightOfInput","width","required","onChange","onKeyDown","autoFocus","maxCharacters","maxText","rest","breakpoint","useBreakpoint","inputContainerRef","useRef","inputIdState","useUuid","input","setInput","useState","prevValue","setPrevValue","numKeyPressed","numRegex","useEffect","onDark","onBlueberry","maxCharactersExceeded","onError","bigForm","FormVariant","isTransparent","inputWrapperClass","cn","styles","inputContainer","inputClass","iconColor","getColor","Breakpoint","IconSize","renderIcon","Icon","handleClick","e","selectedChild","handleChange","newValue","getIncrementValue","valueAsNumber","handleKeyDown","handleKeyUp","maxWidth","ErrorWrapper","AnalyticsId","renderLabel","MaxCharacters","Input$1"],"mappings":"0lBA6EY,IAAAA,IAAAA,IACVA,EAAA,KAAO,OACPA,EAAA,OAAS,SACTA,EAAA,MAAQ,QACRA,EAAA,SAAW,WACXA,EAAA,OAAS,SACTA,EAAA,IAAM,MACNA,EAAA,IAAM,MACNA,EAAA,KAAO,OACPA,EAAA,KAAO,OATGA,IAAAA,IAAA,CAAA,CAAA,EAYZ,MAAMC,GAAmB,CA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CAAiC,CAAI,EAAAhC,CAAa,CAC3E,EACCM,GACC/B,EAAA,cAAC+E,GAAc,CAAA,cAAAhD,EAA8B,OAAQS,EAAM,SAAS,EAAE,OAAQ,QAAAR,EAAkB,KAAAnB,EAAY,SAAA8D,CAAoB,CAAA,EAEjInD,CACH,CACF,CAEJ,CAAC,EAEDzB,EAAM,YAAc,QAEpB,MAAAiF,GAAejF"}
|
package/Label.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import y from"classnames";import{AnalyticsId as S,FormMode as f}from"./constants.js";import{S as h}from"./Spacer.js";import r from"./components/Label/styles.module.scss";import{isComponent as u}from"./utils/component.js";import{S as R}from"./StatusDot.js";const _=({className:t,id:a,mode:n,sublabelTexts:l,testId:s})=>{const o=p=>l&&l.map((i,E)=>{const b=y(r.label,r["label--sublabel"],{[r["label--semibold"]]:i.type==="semibold",[r["label--on-dark"]]:n===f.ondark});return p===i.hideFromScreenReader&&e.createElement("span",{className:b,key:E},i.text)}),m=o(),c=o(!0);return e.createElement(e.Fragment,null,e.createElement(h,{size:"3xs"}),m&&e.createElement("div",{className:t,id:a,"data-testid":s,"data-analyticsid":S.Sublabel},m),c&&e.createElement("div",{className:t,"data-testid":s},c))},$=t=>{let a="";return u(t,d)&&t.props.labelTexts.forEach(n=>{a+=n.hideFromScreenReader?"":n.text}),a},j=(t,a,n,l)=>e.createElement(e.Fragment,null,t&&u(t,d)?e.cloneElement(t,{htmlFor:a,mode:n,disabled:l}):typeof t=="string"&&e.createElement(d,{labelTexts:[{text:t,type:"semibold"}],htmlFor:a,mode:n,disabled:l})),q=(t,a,n,l,s,o,m,c,p)=>e.createElement(e.Fragment,null,t&&u(t,d)?e.cloneElement(t,{htmlFor:n,mode:l,children:a,disabled:s,labelClassName:y(o,t.props.labelClassName),labelTextClassName:m,sublabelWrapperClassName:c,sublabel:p?void 0:t.props.sublabel,statusDot:p?void 0:t.props.statusDot}):typeof t=="string"&&e.createElement(d,{labelTexts:[{text:t}],htmlFor:n,mode:l,disabled:s,labelClassName:o,labelTextClassName:m,sublabelWrapperClassName:c},a)),d=({afterLabelChildren:t,children:a,className:n,disabled:l,htmlFor:s,labelClassName:o,labelTextClassName:m,labelId:c,labelTexts:p,mode:i=f.onwhite,statusDot:E,sublabel:b,sublabelWrapperClassName:g,testId:k})=>{const v=a&&typeof a<"u",L=y(r["label-wrapper"],{[r["label-wrapper--no-bottom-margin"]]:v,[r["label-wrapper--after-label-children"]]:t},n),w=()=>p.map((F,N)=>{const x=y(r.label,{[r["label--semibold"]]:F.type==="semibold",[r["label--on-dark"]]:i===f.ondark,[r["label--disabled"]]:l},m);return e.createElement("span",{"aria-hidden":F.hideFromScreenReader,className:x,key:N},F.text)});return e.createElement("div",{className:L},e.createElement("div",{className:r["label-wrapper__inner"]},e.createElement("label",{className:o,id:c,htmlFor:s,"data-testid":k,"data-analyticsid":S.Label},e.createElement("span",{className:r["label-content-wrapper"]},a,e.createElement("span",null,w()))),e.createElement("div",{className:g},b&&u(b,_)&&e.cloneElement(b,{mode:i}),E&&u(E,R)&&e.createElement(e.Fragment,null,e.createElement(h,{size:"3xs"}),e.cloneElement(E,{mode:i===f.ondark?"ondark":"onwhite"})))),t&&e.createElement("div",{className:r["after-label-children"]},t))},B=d;export{B as L,_ as S,j as a,$ as g,q as r};
|
|
2
|
-
//# sourceMappingURL=Label.js.map
|
package/Label.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sources":["../src/components/Label/SubLabel.tsx","../src/components/Label/Label.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { LabelText } from './Label';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport Spacer from '../Spacer';\n\nimport styles from './styles.module.scss';\n\nexport interface SublabelProps {\n /** Adds custom classes to the element. */\n className?: string;\n /** id that is placed on the wrapper */\n id: string;\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: FormMode;\n /** Array of sublabel strings. Can be of type semibold or normal */\n sublabelTexts?: LabelText[];\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const Sublabel: React.FC<SublabelProps> = ({ className, id, mode, sublabelTexts, testId }) => {\n const mapSublabels = (hideFromScreenReader?: boolean): React.ReactNode => {\n return (\n sublabelTexts &&\n sublabelTexts.map((sublabelText, index) => {\n const labelClasses = cn(styles.label, styles['label--sublabel'], {\n [styles['label--semibold']]: sublabelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n });\n return (\n hideFromScreenReader === sublabelText.hideFromScreenReader && (\n <span className={labelClasses} key={index}>\n {sublabelText.text}\n </span>\n )\n );\n })\n );\n };\n\n const subLabels = mapSublabels();\n const ariaHiddenSublabels = mapSublabels(true);\n\n return (\n <>\n <Spacer size={'3xs'} />\n {subLabels && (\n <div className={className} id={id} data-testid={testId} data-analyticsid={AnalyticsId.Sublabel}>\n {subLabels}\n </div>\n )}\n {ariaHiddenSublabels && (\n <div className={className} data-testid={testId}>\n {ariaHiddenSublabels}\n </div>\n )}\n </>\n );\n};\n","import React, { FunctionComponent } from 'react';\n\nimport cn from 'classnames';\n\nimport { Sublabel, SublabelProps } from './SubLabel';\nimport { AnalyticsId, FormMode } from '../../constants';\nimport { isComponent } from '../../utils/component';\nimport Spacer from '../Spacer';\nimport StatusDot, { StatusDotProps } from '../StatusDot';\n\nimport styles from './styles.module.scss';\n\nexport type LabelText = {\n hideFromScreenReader?: boolean;\n text: string;\n type?: 'semibold' | 'normal';\n};\n\nexport interface LabelProps extends Pick<React.InputHTMLAttributes<HTMLLabelElement>, 'disabled'> {\n /** Component shown after label - discourage use of this */\n afterLabelChildren?: React.ReactNode;\n /** Adds custom classes to the element. */\n children?: React.ReactNode;\n /** Adds custom classes to the label tag. */\n labelClassName?: string;\n /** Adds custom classes to the label text. */\n labelTextClassName?: string;\n /** Adds custom classes to the element. */\n className?: string;\n /** Id that is put on the \"for\" attribute of the label */\n htmlFor?: string;\n /** Id som plasseres på <label/> */\n labelId?: string;\n /** Array of main label strings. Can be of type semibold or normal */\n labelTexts: LabelText[];\n /** Array of sublabel strings. Can be of type semibold or normal */\n mode?: keyof typeof FormMode;\n /** StatusDot placed underneath the last sublabel */\n statusDot?: React.ReactNode;\n /** Sublabel component */\n sublabel?: React.ReactNode;\n /** Adds custom classes to the div wrapping the sublabels. */\n sublabelWrapperClassName?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\nexport const getLabelText = (label: React.ReactNode): string => {\n let allLabelText = '';\n\n if (isComponent<LabelProps>(label, Label)) {\n label.props.labelTexts.forEach(labelText => {\n allLabelText += !labelText.hideFromScreenReader ? labelText.text : '';\n });\n }\n\n return allLabelText;\n};\n\nexport const renderLabel = (label: React.ReactNode, inputId: string, mode: FormMode, disabled?: boolean): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n disabled,\n })\n : typeof label === 'string' && (\n <Label labelTexts={[{ text: label, type: 'semibold' }]} htmlFor={inputId} mode={mode} disabled={disabled} />\n )}\n </>\n );\n};\n\nexport const renderLabelAsParent = (\n label: React.ReactNode,\n children: React.ReactNode,\n inputId: string,\n mode: FormMode,\n disabled?: boolean,\n labelClassName?: string,\n labelTextClassName?: string,\n sublabelWrapperClassName?: string,\n bigform?: boolean\n): React.ReactNode => {\n return (\n <>\n {label && isComponent<LabelProps>(label, Label)\n ? React.cloneElement(label, {\n htmlFor: inputId,\n mode: mode,\n children: children,\n disabled,\n labelClassName: cn(labelClassName, label.props.labelClassName),\n labelTextClassName: labelTextClassName,\n sublabelWrapperClassName: sublabelWrapperClassName,\n sublabel: bigform ? undefined : label.props.sublabel,\n statusDot: bigform ? undefined : label.props.statusDot,\n })\n : typeof label === 'string' && (\n <Label\n labelTexts={[{ text: label }]}\n htmlFor={inputId}\n mode={mode}\n disabled={disabled}\n labelClassName={labelClassName}\n labelTextClassName={labelTextClassName}\n sublabelWrapperClassName={sublabelWrapperClassName}\n >\n {children}\n </Label>\n )}\n </>\n );\n};\n\nconst Label: FunctionComponent<LabelProps> = ({\n afterLabelChildren,\n children,\n className,\n disabled,\n htmlFor,\n labelClassName,\n labelTextClassName,\n labelId,\n labelTexts,\n mode = FormMode.onwhite,\n statusDot,\n sublabel,\n sublabelWrapperClassName,\n testId,\n}) => {\n const hasChildren = children && typeof children !== 'undefined';\n const labelWrapperClasses = cn(\n styles['label-wrapper'],\n { [styles['label-wrapper--no-bottom-margin']]: hasChildren, [styles['label-wrapper--after-label-children']]: afterLabelChildren },\n className\n );\n\n const mapLabels = (): React.ReactNode => {\n return labelTexts.map((labelText, index) => {\n const labelClasses = cn(\n styles.label,\n {\n [styles['label--semibold']]: labelText.type === 'semibold',\n [styles['label--on-dark']]: mode === FormMode.ondark,\n [styles['label--disabled']]: disabled,\n },\n labelTextClassName\n );\n return (\n <span aria-hidden={labelText.hideFromScreenReader} className={labelClasses} key={index}>\n {labelText.text}\n </span>\n );\n });\n };\n\n return (\n <div className={labelWrapperClasses}>\n <div className={styles['label-wrapper__inner']}>\n <label className={labelClassName} id={labelId} htmlFor={htmlFor} data-testid={testId} data-analyticsid={AnalyticsId.Label}>\n <span className={styles['label-content-wrapper']}>\n {children}\n <span>{mapLabels()}</span>\n </span>\n </label>\n <div className={sublabelWrapperClassName}>\n {sublabel &&\n isComponent<SublabelProps>(sublabel, Sublabel) &&\n React.cloneElement(sublabel, {\n mode: mode as FormMode,\n })}\n {statusDot && isComponent<StatusDotProps>(statusDot, StatusDot) && (\n <>\n <Spacer size={'3xs'} />\n {React.cloneElement(statusDot, {\n mode: mode === FormMode.ondark ? 'ondark' : 'onwhite',\n })}\n </>\n )}\n </div>\n </div>\n {afterLabelChildren && <div className={styles['after-label-children']}>{afterLabelChildren}</div>}\n </div>\n );\n};\n\nexport default Label;\n"],"names":["Sublabel","className","id","mode","sublabelTexts","testId","mapSublabels","hideFromScreenReader","sublabelText","index","labelClasses","cn","styles","FormMode","React","subLabels","ariaHiddenSublabels","Spacer","AnalyticsId","getLabelText","label","allLabelText","isComponent","Label","labelText","renderLabel","inputId","disabled","renderLabelAsParent","children","labelClassName","labelTextClassName","sublabelWrapperClassName","bigform","afterLabelChildren","htmlFor","labelId","labelTexts","statusDot","sublabel","hasChildren","labelWrapperClasses","mapLabels","StatusDot","Label$1"],"mappings":"qRAuBa,MAAAA,EAAoC,CAAC,CAAE,UAAAC,EAAW,GAAAC,EAAI,KAAAC,EAAM,cAAAC,EAAe,OAAAC,KAAa,CAC7F,MAAAC,EAAgBC,GAElBH,GACAA,EAAc,IAAI,CAACI,EAAcC,IAAU,CACzC,MAAMC,EAAeC,EAAGC,EAAO,MAAOA,EAAO,iBAAiB,EAAG,CAC/D,CAACA,EAAO,iBAAiB,CAAC,EAAGJ,EAAa,OAAS,WACnD,CAACI,EAAO,gBAAgB,CAAC,EAAGT,IAASU,EAAS,MAAA,CAC/C,EAEC,OAAAN,IAAyBC,EAAa,sBACnCM,EAAA,cAAA,OAAA,CAAK,UAAWJ,EAAc,IAAKD,CACjC,EAAAD,EAAa,IAChB,CAAA,CAGL,EAICO,EAAYT,IACZU,EAAsBV,EAAa,EAAI,EAG3C,OAAAQ,EAAA,cAAAA,EAAA,SAAA,KACGA,EAAA,cAAAG,EAAA,CAAO,KAAM,KAAA,CAAO,EACpBF,GACCD,EAAA,cAAC,MAAI,CAAA,UAAAb,EAAsB,GAAAC,EAAQ,cAAaG,EAAQ,mBAAkBa,EAAY,QACnF,EAAAH,CACH,EAEDC,GACEF,EAAA,cAAA,MAAA,CAAI,UAAAb,EAAsB,cAAaI,CACrC,EAAAW,CACH,CAEJ,CAEJ,ECdaG,EAAgBC,GAAmC,CAC9D,IAAIC,EAAe,GAEf,OAAAC,EAAwBF,EAAOG,CAAK,GAChCH,EAAA,MAAM,WAAW,QAAqBI,GAAA,CAC1CH,GAAiBG,EAAU,qBAAwC,GAAjBA,EAAU,IAAO,CACpE,EAGIH,CACT,EAEaI,EAAc,CAACL,EAA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|
|
1
|
-
import e from"react";import _ from"classnames";import{AnalyticsId as b}from"./constants.js";import{useHover as w}from"./hooks/useHover.js";import y from"./components/Icons/ChevronRight.js";import{r as R}from"./ListHeader.js";import t from"./components/LinkList/styles.module.scss";const u=e.forwardRef((L,r)=>{const{children:s,className:o="",color:c="neutral",icon:a,size:i="medium",chevron:l=!1,linkRef:m,testId:d,target:n,variant:f,htmlMarkup:k="a",...p}=L,{hoverRef:h,isHovered:v}=w(m),C=_(t["link-list__list-item"],{[t["link-list__list-item--line"]]:f==="line",[t["link-list__list-item--outline"]]:f==="outline"}),N=_(t["link-list__anchor"],t["link-list__anchor--"+c],{[t["link-list__anchor--fill"]]:f==="fill",[t["link-list__anchor--"+i]]:i,[t["link-list__anchor--button"]]:k==="button"},o);return e.createElement("li",{className:C,ref:r,"data-testid":d,"data-analyticsid":b.Link},k==="a"&&e.createElement("a",{className:N,ref:h,rel:n==="_blank"?"noopener noreferrer":void 0,target:n,...p},R(s,"span",v,i,l?y:void 0,a)),k==="button"&&e.createElement("button",{className:N,ref:h,type:"button",...p},R(s,"span",v,i,l?y:void 0,a)))}),E=e.forwardRef(function(r,s){const{children:o,className:c="",chevron:a=!1,size:i="medium",color:l,testId:m,variant:d="line"}=r;return e.createElement("ul",{ref:s,className:_(t["link-list"],c),"data-testid":m,"data-analyticsid":b.LinkList},e.Children.map(o,n=>{if(n.type===u)return e.cloneElement(n,{color:l,size:i,chevron:a,variant:d})}))});E.Link=u;u.displayName="LinkList.Link";const M=E;export{M as L,E as a};
|
|
2
|
-
//# sourceMappingURL=LinkList.js.map
|
package/LinkList.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LinkList.js","sources":["../src/components/LinkList/LinkList.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport { AnalyticsId } from '../../constants';\nimport { useHover } from '../../hooks/useHover';\nimport { PaletteNames } from '../../theme/palette';\nimport ChevronRight from '../Icons/ChevronRight';\nimport { ListHeaderType, renderListHeader } from '../ListHeader/ListHeader';\n\nimport LinkListStyles from './styles.module.scss';\n\nexport type LinkListSize = 'small' | 'medium' | 'large';\n\nexport type LinkAnchorTargets = '_self' | '_blank' | '_parent';\n\nexport type LinkListColors = PaletteNames;\nexport type LinkListVariant = 'line' | 'outline' | 'fill';\n\nexport interface LinkType extends React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLLIElement>> {\n ListHeader?: ListHeaderType;\n}\n\nexport type LinkTags = 'button' | 'a';\nexport interface CompoundComponent extends React.ForwardRefExoticComponent<LinkListProps & React.RefAttributes<HTMLUListElement>> {\n Link: LinkType;\n}\n\nexport interface LinkListProps {\n /** Items in the LinkList */\n children: React.ReactNode;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the link list background color on hover. */\n color?: LinkListColors;\n /** Toggles chevron icon on or off. */\n chevron?: boolean;\n /** @deprecated Skal fases ut - Brukes ikke lenger. */\n bottomBorder?: boolean;\n /** @deprecated Skal fases ut - Brukes ikke lenger. */\n topBorder?: boolean;\n /** Changes size of the LinkList. */\n size?: LinkListSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets visual priority */\n variant?: LinkListVariant;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\nexport type LinkProps = Modify<\n React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>,\n {\n children: React.ReactNode;\n chevron?: boolean;\n className?: string;\n icon?: React.ReactElement;\n href?: string;\n target?: LinkAnchorTargets;\n /** HTML markup for link. Default: a */\n htmlMarkup?: LinkTags;\n /**\n * Ref for lenke/knapp\n */\n linkRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement>;\n /** Sets the data-testid attribute. */\n testId?: string;\n }\n> &\n Pick<LinkListProps, 'color' | 'size' | 'variant'>;\n\nconst Link: LinkType = React.forwardRef((props: LinkProps, ref: React.Ref<HTMLLIElement>) => {\n const {\n children,\n className = '',\n color = 'neutral',\n icon,\n size = 'medium',\n chevron = false,\n linkRef,\n testId,\n target,\n variant,\n htmlMarkup = 'a',\n ...restProps\n } = props;\n const { hoverRef, isHovered } = useHover<HTMLButtonElement | HTMLAnchorElement>(linkRef);\n\n const liClasses = cn(LinkListStyles['link-list__list-item'], {\n [LinkListStyles['link-list__list-item--line']]: variant === 'line',\n [LinkListStyles['link-list__list-item--outline']]: variant === 'outline',\n });\n const linkClasses = cn(\n LinkListStyles['link-list__anchor'],\n LinkListStyles['link-list__anchor--' + color],\n\n {\n [LinkListStyles['link-list__anchor--fill']]: variant === 'fill',\n [LinkListStyles['link-list__anchor--' + size]]: size,\n [LinkListStyles['link-list__anchor--button']]: htmlMarkup === 'button',\n },\n className\n );\n return (\n <li className={liClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.Link}>\n {htmlMarkup === 'a' && (\n <a\n className={linkClasses}\n ref={hoverRef as React.RefObject<HTMLAnchorElement>}\n rel={target === '_blank' ? 'noopener noreferrer' : undefined}\n target={target}\n {...restProps}\n >\n {renderListHeader(children, 'span', isHovered, size, chevron ? ChevronRight : undefined, icon)}\n </a>\n )}\n {htmlMarkup === 'button' && (\n <button className={linkClasses} ref={hoverRef as React.RefObject<HTMLButtonElement>} type=\"button\" {...restProps}>\n {renderListHeader(children, 'span', isHovered, size, chevron ? ChevronRight : undefined, icon)}\n </button>\n )}\n </li>\n );\n});\n\nexport const LinkList = React.forwardRef(function LinkListForwardedRef(props: LinkListProps, ref: React.Ref<HTMLUListElement>) {\n const { children, className = '', chevron = false, size = 'medium', color, testId, variant = 'line' } = props;\n return (\n <ul ref={ref} className={cn(LinkListStyles['link-list'], className)} data-testid={testId} data-analyticsid={AnalyticsId.LinkList}>\n {React.Children.map(children, (child: React.ReactNode | React.ReactElement<LinkProps>) => {\n if ((child as React.ReactElement<LinkProps>).type === Link) {\n return React.cloneElement(child as React.ReactElement<LinkProps>, { color, size, chevron, variant });\n }\n })}\n </ul>\n );\n}) as CompoundComponent;\n\nLinkList.Link = Link;\nLink.displayName = 'LinkList.Link';\n\nexport default LinkList;\n"],"names":["Link","React","props","ref","children","className","color","icon","size","chevron","linkRef","testId","target","variant","htmlMarkup","restProps","hoverRef","isHovered","useHover","liClasses","cn","LinkListStyles","linkClasses","AnalyticsId","renderListHeader","ChevronRight","LinkList","child","LinkList$1"],"mappings":"yRAwEA,MAAMA,EAAiBC,EAAM,WAAW,CAACC,EAAkBC,IAAkC,CACrF,KAAA,CACJ,SAAAC,EACA,UAAAC,EAAY,GACZ,MAAAC,EAAQ,UACR,KAAAC,EACA,KAAAC,EAAO,SACP,QAAAC,EAAU,GACV,QAAAC,EACA,OAAAC,EACA,OAAAC,EACA,QAAAC,EACA,WAAAC,EAAa,IACb,GAAGC,CACD,EAAAb,EACE,CAAE,SAAAc,EAAU,UAAAC,CAAU,EAAIC,EAAgDR,CAAO,EAEjFS,EAAYC,EAAGC,EAAe,sBAAsB,EAAG,CAC3D,CAACA,EAAe,4BAA4B,CAAC,EAAGR,IAAY,OAC5D,CAACQ,EAAe,+BAA+B,CAAC,EAAGR,IAAY,SAAA,CAChE,EACKS,EAAcF,EAClBC,EAAe,mBAAmB,EAClCA,EAAe,sBAAwBf,CAAK,EAE5C,CACE,CAACe,EAAe,yBAAyB,CAAC,EAAGR,IAAY,OACzD,CAACQ,EAAe,sBAAwBb,CAAI,CAAC,EAAGA,EAChD,CAACa,EAAe,2BAA2B,CAAC,EAAGP,IAAe,QAChE,EACAT,CAAA,EAGA,OAAAJ,EAAA,cAAC,KAAG,CAAA,UAAWkB,EAAW,IAAAhB,EAAU,cAAaQ,EAAQ,mBAAkBY,EAAY,IACpF,EAAAT,IAAe,KACdb,EAAA,cAAC,IAAA,CACC,UAAWqB,EACX,IAAKN,EACL,IAAKJ,IAAW,SAAW,sBAAwB,OACnD,OAAAA,EACC,GAAGG,CAAA,EAEHS,EAAiBpB,EAAU,OAAQa,EAAWT,EAAMC,EAAUgB,EAAe,OAAWlB,CAAI,CAC/F,EAEDO,IAAe,UACdb,EAAA,cAAC,UAAO,UAAWqB,EAAa,IAAKN,EAAgD,KAAK,SAAU,GAAGD,CACpG,EAAAS,EAAiBpB,EAAU,OAAQa,EAAWT,EAAMC,EAAUgB,EAAe,OAAWlB,CAAI,CAC/F,CAEJ,CAEJ,CAAC,EAEYmB,EAAWzB,EAAM,WAAW,SAA8BC,EAAsBC,EAAkC,CAC7H,KAAM,CAAE,SAAAC,EAAU,UAAAC,EAAY,GAAI,QAAAI,EAAU,GAAO,KAAAD,EAAO,SAAU,MAAAF,EAAO,OAAAK,EAAQ,QAAAE,EAAU,MAAA,EAAWX,EAEtG,OAAAD,EAAA,cAAC,MAAG,IAAAE,EAAU,UAAWiB,EAAGC,EAAe,WAAW,EAAGhB,CAAS,EAAG,cAAaM,EAAQ,mBAAkBY,EAAY,QACrH,EAAAtB,EAAM,SAAS,IAAIG,EAAWuB,GAA2D,CACnF,GAAAA,EAAwC,OAAS3B,EAC7C,OAAAC,EAAM,aAAa0B,EAAwC,CAAE,MAAArB,EAAO,KAAAE,EAAM,QAAAC,EAAS,QAAAI,EAAS,CAEtG,CAAA,CACH,CAEJ,CAAC,EAEDa,EAAS,KAAO1B,EAChBA,EAAK,YAAc,gBAEnB,MAAA4B,EAAeF"}
|
package/ListHeader.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import n from"react";import _ from"classnames";import{L as A}from"./ListHeaderText.js";import{useBreakpoint as k,Breakpoint as B}from"./hooks/useBreakpoint.js";import{isComponent as u,isComponentWithChildren as b}from"./utils/component.js";import{A as R,a as p}from"./Avatar.js";import{B as w}from"./Badge.js";import{Icon as X}from"./components/Icons/Icon.js";import{IconSize as C}from"./constants.js";import t from"./components/ListHeader/styles.module.scss";const P=(l,f,c,m,o,i)=>{if(u(l,E))return n.cloneElement(l,{chevronIcon:o,icon:i,isHovered:c,size:m});if(l)return n.createElement(E,{titleHtmlMarkup:f,chevronIcon:o,icon:i,isHovered:c,size:m},l)},N=(l,f=!1)=>{var d,v,h,s;let c,m;const o=[],i=[],a=[];n.Children.forEach(l,e=>{e===null||typeof e>"u"||(u(e,R)?c=e:u(e,A)?o.push(e):u(e,w)?m=e:typeof e=="string"?i.push(e):a.push(e))});const g=c!==void 0||o.length>0||m!==void 0&&i.length>0,r=a.length===0||b(a[0])&&typeof((v=(d=a[0])==null?void 0:d.props)==null?void 0:v.children)>"u";if(f||g||r)return{avatarChild:c,listHeaderTextChildren:o,badgeChild:m,stringChildren:i,remainingChildren:a};if(b(a[0]))return N((s=(h=a[0])==null?void 0:h.props)==null?void 0:s.children,!0)},E=n.forwardRef((l,f)=>{const{className:c="",titleHtmlMarkup:m="h2",chevronIcon:o,children:i,icon:a,isHovered:g,size:r,testId:d}=l,v=k(),h=r!=="small"&&!!(o||a),s=typeof i=="string",e=N(i),H=(e==null?void 0:e.avatarChild)||(e==null?void 0:e.listHeaderTextChildren)&&e.listHeaderTextChildren.length>0||(e==null?void 0:e.remainingChildren)&&(e==null?void 0:e.remainingChildren.length)>0,x=_(t["list-header"],{[t["list-header--for-element-content"]]:!s,[t["list-header--top-align-content"]]:H},c),L=_(t["list-header__badge"],{[t["list-header__badge--for-string-content"]]:s,[t["list-header__badge--right"]]:!s,[t["list-header__badge--"+r]]:!s&&r}),S=_(t["list-header__chevron"],{[t["list-header__chevron--for-string-content"]]:s,[t["list-header__chevron--"+r]]:!s&&r}),y=_(t["list-header__content"],{[t["list-header__content--string"]]:s,[t["list-header__content--element"]]:!s,[t["list-header__content--spacing"]]:!(e!=null&&e.avatarChild)&&!a}),I=_(t["list-header__icon"],{[t["list-header__icon--for-string-content"]]:s,[t["list-header__icon--for-element-content"]]:!s,[t["list-header__icon--for-element-content--"+r]]:!s&&r}),T=_(t["list-header__avatar"],{[t["list-header__avatar--for-string-content"]]:s,[t["list-header__avatar--for-element-content"]]:!s,[t["list-header__avatar--for-element-content--"+r]]:!s&&r}),z=m;return n.createElement("span",{"data-testid":d,className:x},h&&a&&n.createElement("span",{className:I},n.cloneElement(a,{size:v===B.xs?C.XSmall:C.Small,isHovered:g})),r!=="small"&&(e==null?void 0:e.avatarChild)&&n.createElement("span",{className:T},n.cloneElement(e.avatarChild,{size:p.xsmall})),n.createElement("span",{className:y},e==null?void 0:e.listHeaderTextChildren,!!(e!=null&&e.stringChildren.length)&&n.createElement(z,{className:t["list-header__title"]},e.stringChildren),e==null?void 0:e.remainingChildren),(e==null?void 0:e.badgeChild)&&n.createElement("span",{className:L},e.badgeChild),h&&o&&n.createElement("span",{className:S},n.createElement(X,{svgIcon:o,isHovered:g,size:C.XSmall})))});E.displayName="ListHeader";export{E as L,N as m,P as r};
|
|
2
|
-
//# sourceMappingURL=ListHeader.js.map
|
package/ListHeader.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListHeader.js","sources":["../src/components/ListHeader/ListHeader.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport ListHeaderText, { ListHeaderTextProps, ListHeaderTextType } from './ListHeaderText/ListHeaderText';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { isComponent, isComponentWithChildren } from '../../utils/component';\nimport Avatar, { AvatarProps, AvatarSize, AvatarType } from '../Avatar';\nimport Badge, { BadgeProps, BadgeType } from '../Badge';\nimport Icon, { IconSize, SvgIcon } from '../Icons';\nimport { TitleTags } from '../Title';\n\nimport styles from './styles.module.scss';\n\nexport type ListHeaderSize = 'small' | 'medium' | 'large';\n\nexport interface ListHeaderType extends React.ForwardRefExoticComponent<ListHeaderProps & React.RefAttributes<HTMLLIElement>> {\n Avatar?: AvatarType;\n Badge?: BadgeType;\n ListHeaderText?: ListHeaderTextType;\n}\n\nexport const renderListHeader = (\n element: React.ReactNode,\n titleHtmlMarkup: TitleTags,\n isHovered: boolean,\n size: ListHeaderSize,\n chevronIcon?: SvgIcon,\n icon?: React.ReactElement\n): JSX.Element | undefined => {\n if (isComponent<ListHeaderProps>(element, ListHeader)) {\n return React.cloneElement(element, {\n chevronIcon,\n icon,\n isHovered,\n size,\n });\n }\n if (element) {\n return (\n <ListHeader titleHtmlMarkup={titleHtmlMarkup} chevronIcon={chevronIcon} icon={icon} isHovered={isHovered} size={size}>\n {element}\n </ListHeader>\n );\n }\n};\n\nexport interface ListHeaderProps {\n /** Adds custom classes to the ListHeader element. */\n className?: string;\n /** Chevron to render inside of the ListHeader */\n chevronIcon?: SvgIcon;\n /** Children to be rendered inside of ListHeader */\n children: React.ReactNode;\n /** Changes the underlying element of the title. Default: h2*/\n titleHtmlMarkup?: TitleTags;\n /** icon to be rendered inside of ListHeader */\n icon?: React.ReactElement;\n /** whether or not the parent is hovered */\n isHovered?: boolean;\n /** Changes size of the ListHeader. */\n size?: ListHeaderSize;\n /** Sets the data-testid attribute. */\n testId?: string;\n}\n\ninterface ListHeaderChildren {\n avatarChild?: React.ReactElement<AvatarProps>;\n listHeaderTextChildren: React.ReactElement<ListHeaderTextProps>[];\n badgeChild?: React.ReactElement<BadgeProps>;\n elementChild?: React.ReactElement;\n stringChildren: string[];\n remainingChildren: React.ReactNode[];\n}\n\ntype ChildrenMapper = (children: React.ReactNode, isJsxChild?: boolean) => ListHeaderChildren | undefined;\n\nexport const mapChildren: ChildrenMapper = (children, isJsxChild = false) => {\n let avatarChild: React.ReactElement<AvatarProps> | undefined;\n let badgeChild: React.ReactElement<BadgeProps> | undefined;\n const listHeaderTextChildren: React.ReactElement<ListHeaderTextProps>[] = [];\n const stringChildren: string[] = [];\n const remainingChildren: React.ReactNode[] = [];\n\n React.Children.forEach(children, child => {\n if (child === null || typeof child === 'undefined') return;\n if (isComponent<AvatarProps>(child, Avatar)) {\n avatarChild = child;\n } else if (isComponent<ListHeaderTextProps>(child, ListHeaderText)) {\n listHeaderTextChildren.push(child);\n } else if (isComponent<BadgeProps>(child, Badge)) {\n badgeChild = child;\n } else if (typeof child === 'string') {\n stringChildren.push(child);\n } else {\n remainingChildren.push(child);\n }\n });\n\n // Dette og recursive mapChildren under(gjøres en gang) er for å passe på at jsx children også sjekkes for Avatar og liknende innhold.\n // Slik opprettholder vi stylingen i tilfeller hvor vertikaler har wrappet elementer i en parent span eller div.\n const hasSpecialChildren =\n avatarChild !== undefined || listHeaderTextChildren.length > 0 || (badgeChild !== undefined && stringChildren.length > 0);\n const noRemainingRecursiveChildren =\n remainingChildren.length === 0 ||\n (isComponentWithChildren(remainingChildren[0]) && typeof remainingChildren[0]?.props?.children === 'undefined');\n\n if (isJsxChild || hasSpecialChildren || noRemainingRecursiveChildren) {\n return { avatarChild, listHeaderTextChildren, badgeChild, stringChildren, remainingChildren };\n }\n\n if (isComponentWithChildren(remainingChildren[0])) {\n return mapChildren(remainingChildren[0]?.props?.children, true);\n }\n};\n\nexport const ListHeader: ListHeaderType = React.forwardRef((props: ListHeaderProps, ref: React.Ref<HTMLLIElement>) => {\n const { className = '', titleHtmlMarkup = 'h2', chevronIcon, children, icon, isHovered, size, testId } = props;\n const breakpoint = useBreakpoint();\n const showChevronAndIcon = size !== 'small' && !!(chevronIcon || icon);\n const contentIsString = typeof children === 'string';\n const mappedChildren = mapChildren(children);\n const topAlignContent =\n mappedChildren?.avatarChild ||\n (mappedChildren?.listHeaderTextChildren && mappedChildren.listHeaderTextChildren.length > 0) ||\n (mappedChildren?.remainingChildren && mappedChildren?.remainingChildren.length > 0);\n\n const listLabelClasses = cn(\n styles['list-header'],\n {\n [styles['list-header--for-element-content']]: !contentIsString,\n [styles['list-header--top-align-content']]: topAlignContent,\n },\n className\n );\n const badgeClasses = cn(styles['list-header__badge'], {\n [styles['list-header__badge--for-string-content']]: contentIsString,\n [styles['list-header__badge--right']]: !contentIsString,\n [styles['list-header__badge--' + size]]: !contentIsString && size,\n });\n const chevronClasses = cn(styles['list-header__chevron'], {\n [styles['list-header__chevron--for-string-content']]: contentIsString,\n [styles['list-header__chevron--' + size]]: !contentIsString && size,\n });\n const contentClasses = cn(styles['list-header__content'], {\n [styles['list-header__content--string']]: contentIsString,\n [styles['list-header__content--element']]: !contentIsString,\n [styles['list-header__content--spacing']]: !mappedChildren?.avatarChild && !icon,\n });\n const iconClasses = cn(styles['list-header__icon'], {\n [styles['list-header__icon--for-string-content']]: contentIsString,\n [styles['list-header__icon--for-element-content']]: !contentIsString,\n [styles['list-header__icon--for-element-content--' + size]]: !contentIsString && size,\n });\n const avatarClasses = cn(styles['list-header__avatar'], {\n [styles['list-header__avatar--for-string-content']]: contentIsString,\n [styles['list-header__avatar--for-element-content']]: !contentIsString,\n [styles['list-header__avatar--for-element-content--' + size]]: !contentIsString && size,\n });\n const CustomTag = titleHtmlMarkup;\n return (\n <span data-testid={testId} className={listLabelClasses}>\n {showChevronAndIcon && icon && (\n <span className={iconClasses}>\n {React.cloneElement(icon, {\n size: breakpoint === Breakpoint.xs ? IconSize.XSmall : IconSize.Small,\n isHovered,\n })}\n </span>\n )}\n {size !== 'small' && mappedChildren?.avatarChild && (\n <span className={avatarClasses}>{React.cloneElement(mappedChildren.avatarChild, { size: AvatarSize.xsmall })}</span>\n )}\n <span className={contentClasses}>\n {mappedChildren?.listHeaderTextChildren}\n {!!mappedChildren?.stringChildren.length && (\n <CustomTag className={styles['list-header__title']}>{mappedChildren.stringChildren}</CustomTag>\n )}\n {mappedChildren?.remainingChildren}\n </span>\n\n {mappedChildren?.badgeChild && <span className={badgeClasses}>{mappedChildren.badgeChild}</span>}\n {showChevronAndIcon && chevronIcon && (\n <span className={chevronClasses}>\n <Icon svgIcon={chevronIcon} isHovered={isHovered} size={IconSize.XSmall} />\n </span>\n )}\n </span>\n );\n});\n\nListHeader.displayName = 'ListHeader';\n\nexport default ListHeader;\n"],"names":["renderListHeader","element","titleHtmlMarkup","isHovered","size","chevronIcon","icon","isComponent","ListHeader","React","mapChildren","children","isJsxChild","avatarChild","badgeChild","listHeaderTextChildren","stringChildren","remainingChildren","child","Avatar","ListHeaderText","Badge","hasSpecialChildren","noRemainingRecursiveChildren","isComponentWithChildren","_b","_a","_d","_c","props","ref","className","testId","breakpoint","useBreakpoint","showChevronAndIcon","contentIsString","mappedChildren","topAlignContent","listLabelClasses","cn","styles","badgeClasses","chevronClasses","contentClasses","iconClasses","avatarClasses","CustomTag","Breakpoint","IconSize","AvatarSize","Icon"],"mappings":"4cAsBO,MAAMA,EAAmB,CAC9BC,EACAC,EACAC,EACAC,EACAC,EACAC,IAC4B,CACxB,GAAAC,EAA6BN,EAASO,CAAU,EAC3C,OAAAC,EAAM,aAAaR,EAAS,CACjC,YAAAI,EACA,KAAAC,EACA,UAAAH,EACA,KAAAC,CAAA,CACD,EAEH,GAAIH,EACF,uBACGO,EAAW,CAAA,gBAAAN,EAAkC,YAAAG,EAA0B,KAAAC,EAAY,UAAAH,EAAsB,KAAAC,GACvGH,CACH,CAGN,EAgCaS,EAA8B,CAACC,EAAUC,EAAa,KAAU,aACvE,IAAAC,EACAC,EACJ,MAAMC,EAAoE,CAAA,EACpEC,EAA2B,CAAA,EAC3BC,EAAuC,CAAA,EAEvCR,EAAA,SAAS,QAAQE,EAAmBO,GAAA,CACpCA,IAAU,MAAQ,OAAOA,EAAU,MACnCX,EAAyBW,EAAOC,CAAM,EAC1BN,EAAAK,EACLX,EAAiCW,EAAOE,CAAc,EAC/DL,EAAuB,KAAKG,CAAK,EACxBX,EAAwBW,EAAOG,CAAK,EAChCP,EAAAI,EACJ,OAAOA,GAAU,SAC1BF,EAAe,KAAKE,CAAK,EAEzBD,EAAkB,KAAKC,CAAK,EAC9B,CACD,EAIK,MAAAI,EACJT,IAAgB,QAAaE,EAAuB,OAAS,GAAMD,IAAe,QAAaE,EAAe,OAAS,EACnHO,EACJN,EAAkB,SAAW,GAC5BO,EAAwBP,EAAkB,CAAC,CAAC,GAAK,QAAOQ,GAAAC,EAAAT,EAAkB,CAAC,IAAnB,YAAAS,EAAsB,QAAtB,YAAAD,EAA6B,UAAa,IAEjG,GAAAb,GAAcU,GAAsBC,EACtC,MAAO,CAAE,YAAAV,EAAa,uBAAAE,EAAwB,WAAAD,EAAY,eAAAE,EAAgB,kBAAAC,CAAkB,EAG9F,GAAIO,EAAwBP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L,EAAe,UAAW,EACxFF,GAAsB9B,GACpBI,EAAA,cAAA,OAAA,CAAK,UAAWkC,CACf,EAAAlC,EAAA,cAAC0C,EAAK,CAAA,QAAS9C,EAAa,UAAAF,EAAsB,KAAM8C,EAAS,MAAA,CAAQ,CAC3E,CAEJ,CAEJ,CAAC,EAEDzC,EAAW,YAAc"}
|
package/ListHeaderText.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import e from"react";import s from"classnames";import{S as _}from"./StatusDot.js";import t from"./components/ListHeader/styles.module.scss";const l=e.forwardRef((m,N)=>{const{firstText:n,firstTextEmphasised:p=!1,secondText:a=void 0,secondTextEmphasised:o=!1,subText:c=!1,statusDotVariant:r,className:i="",testId:d,titleHtmlMarkup:x="span"}=m,f=s(i,t["text-wrapper"],{[t["text-wrapper--sub-level"]]:c}),T=s({[t["text-wrapper__text--emphasised"]]:p}),u=s({[t["text-wrapper__text--emphasised"]]:o}),E=x;return e.createElement("span",{"data-testid":d,className:f},r!==void 0&&e.createElement("span",null,e.createElement(_,{text:"",variant:r})),e.createElement(E,{className:t["list-header__title"]},e.createElement("span",{className:T},n),a&&e.createElement("span",{className:u},a)))});l.displayName="ListHeaderText";const C=l;export{C as L,l as a};
|
|
2
|
-
//# sourceMappingURL=ListHeaderText.js.map
|
package/ListHeaderText.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListHeaderText.js","sources":["../src/components/ListHeader/ListHeaderText/ListHeaderText.tsx"],"sourcesContent":["import React from 'react';\n\nimport cn from 'classnames';\n\nimport StatusDot, { StatusDotVariant } from '../../StatusDot';\nimport { TitleTags } from '../../Title';\nimport styles from '../styles.module.scss';\n\nexport type ListHeaderTextType = React.ForwardRefExoticComponent<ListHeaderTextProps & React.RefAttributes<HTMLLIElement>>;\n\nexport interface ListHeaderTextProps {\n /** The first text in the ListHeaderText Component */\n firstText: string;\n /** Will style the first text as bold */\n firstTextEmphasised?: boolean;\n /** The second text in the ListHeaderText Component */\n secondText?: string;\n /** Will style the second text as bold */\n secondTextEmphasised?: boolean;\n /** Whether or not this ListHeaderText is a sub text */\n subText?: boolean;\n /** Decides the variant for the StatusDot */\n statusDotVariant?: StatusDotVariant;\n /** Adds custom classes to the ListHeaderText component. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Changes the underlying element of the title. Default: span*/\n titleHtmlMarkup?: TitleTags;\n}\n\nexport const ListHeaderText: ListHeaderTextType = React.forwardRef((props: ListHeaderTextProps, ref: React.Ref<HTMLLIElement>) => {\n const {\n firstText,\n firstTextEmphasised = false,\n secondText = undefined,\n secondTextEmphasised = false,\n subText = false,\n statusDotVariant,\n className = '',\n testId,\n titleHtmlMarkup = 'span',\n } = props;\n\n const headerTextWrapperClasses = cn(className, styles['text-wrapper'], {\n [styles['text-wrapper--sub-level']]: subText,\n });\n const firstHeaderTextSegmentClasses = cn({\n [styles['text-wrapper__text--emphasised']]: firstTextEmphasised,\n });\n const secondHeaderTextSegmentClasses = cn({\n [styles['text-wrapper__text--emphasised']]: secondTextEmphasised,\n });\n const CustomTag = titleHtmlMarkup;\n\n return (\n <span data-testid={testId} className={headerTextWrapperClasses}>\n {statusDotVariant !== undefined && (\n <span>\n <StatusDot text={''} variant={statusDotVariant} />\n </span>\n )}\n <CustomTag className={styles['list-header__title']}>\n <span className={firstHeaderTextSegmentClasses}>{firstText}</span>\n {secondText && <span className={secondHeaderTextSegmentClasses}>{secondText}</span>}\n </CustomTag>\n </span>\n );\n});\n\nListHeaderText.displayName = 'ListHeaderText';\n\nexport default ListHeaderText;\n"],"names":["ListHeaderText","React","props","ref","firstText","firstTextEmphasised","secondText","secondTextEmphasised","subText","statusDotVariant","className","testId","titleHtmlMarkup","headerTextWrapperClasses","cn","styles","firstHeaderTextSegmentClasses","secondHeaderTextSegmentClasses","CustomTag","StatusDot","ListHeaderText$1"],"mappings":"4IA+BO,MAAMA,EAAqCC,EAAM,WAAW,CAACC,EAA4BC,IAAkC,CAC1H,KAAA,CACJ,UAAAC,EACA,oBAAAC,EAAsB,GACtB,WAAAC,EAAa,OACb,qBAAAC,EAAuB,GACvB,QAAAC,EAAU,GACV,iBAAAC,EACA,UAAAC,EAAY,GACZ,OAAAC,EACA,gBAAAC,EAAkB,MAChB,EAAAV,EAEEW,EAA2BC,EAAGJ,EAAWK,EAAO,cAAc,EAAG,CACrE,CAACA,EAAO,yBAAyB,CAAC,EAAGP,CAAA,CACtC,EACKQ,EAAgCF,EAAG,CACvC,CAACC,EAAO,gCAAgC,CAAC,EAAGV,CAAA,CAC7C,EACKY,EAAiCH,EAAG,CACxC,CAACC,EAAO,gCAAgC,CAAC,EAAGR,CAAA,CAC7C,EACKW,EAAYN,EAElB,uBACG,OAAK,CAAA,cAAaD,EAAQ,UAAWE,GACnCJ,IAAqB,QACnBR,EAAA,cAAA,OAAA,qBACEkB,EAAU,CAAA,KAAM,GAAI,QAASV,CAAkB,CAAA,CAClD,EAEDR,EAAA,cAAAiB,EAAA,CAAU,UAAWH,EAAO,oBAAoB,CAC/C,EAAAd,EAAA,cAAC,QAAK,UAAWe,GAAgCZ,CAAU,EAC1DE,GAAeL,EAAA,cAAA,OAAA,CAAK,UAAWgB,CAAiC,EAAAX,CAAW,CAC9E,CACF,CAEJ,CAAC,EAEDN,EAAe,YAAc,iBAE7B,MAAAoB,EAAepB"}
|