@helsenorge/designsystem-react 14.0.0-beta.2 → 14.0.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/AnchorLink.js +2 -2
- package/lib/AnchorLink.js.map +1 -1
- package/lib/Avatar.js +2 -2
- package/lib/Avatar.js.map +1 -1
- package/lib/BabyMobileMedium.js +1 -1
- package/lib/Badge.js +2 -2
- package/lib/Badge.js.map +1 -1
- package/lib/Button.js +6 -6
- package/lib/Button.js.map +1 -1
- package/lib/CHANGELOG.md +14 -0
- package/lib/Checkbox.js +6 -6
- package/lib/Checkbox.js.map +1 -1
- package/lib/ChildMedium.js +1 -1
- package/lib/Close.js +3 -3
- package/lib/Close.js.map +1 -1
- package/lib/DictionaryTrigger.js +2 -2
- package/lib/DictionaryTrigger.js.map +1 -1
- package/lib/Drawer.js +5 -5
- package/lib/Drawer.js.map +1 -1
- package/lib/Duolist.js +5 -5
- package/lib/Duolist.js.map +1 -1
- package/lib/ElementHeader.js +10 -10
- package/lib/ElementHeader.js.map +1 -1
- package/lib/ElementHeaderText.js +4 -4
- package/lib/ElementHeaderText.js.map +1 -1
- package/lib/ErrorWrapper.js +2 -2
- package/lib/ErrorWrapper.js.map +1 -1
- package/lib/Expander.js +7 -7
- package/lib/Expander.js.map +1 -1
- package/lib/FacialRecognitionFingerprintMedium.js +1 -1
- package/lib/FormFieldTag.js +2 -2
- package/lib/FormFieldTag.js.map +1 -1
- package/lib/FormGroup.js +8 -19
- package/lib/FormGroup.js.map +1 -1
- package/lib/FormLayout.js +3 -3
- package/lib/FormLayout.js.map +1 -1
- package/lib/GiveBabyFoodMedium.js +1 -1
- package/lib/HelpDetails.js +3 -3
- package/lib/HelpDetails.js.map +1 -1
- package/lib/HelpTriggerIcon.js +2 -2
- package/lib/HelpTriggerIcon.js.map +1 -1
- package/lib/HelpTriggerStandalone.js +2 -2
- package/lib/HelpTriggerStandalone.js.map +1 -1
- package/lib/HighlightPanel.js +3 -3
- package/lib/HighlightPanel.js.map +1 -1
- package/lib/HorizontalScroll.js +4 -4
- package/lib/HorizontalScroll.js.map +1 -1
- package/lib/Icon.js +2 -2
- package/lib/Icon.js.map +1 -1
- package/lib/Illustration.js +1 -1
- package/lib/Illustration.js.map +1 -1
- package/lib/InfoTeaser.js +3 -3
- package/lib/InfoTeaser.js.map +1 -1
- package/lib/Input.js +4 -4
- package/lib/Input.js.map +1 -1
- package/lib/Label.js +3 -90
- package/lib/Label.js.map +1 -1
- package/lib/LazyIcon.js +4 -2
- package/lib/LazyIcon.js.map +1 -1
- package/lib/LazyIllustration.js +1 -1
- package/lib/LinkList.js +7 -8
- package/lib/LinkList.js.map +1 -1
- package/lib/List.js +2 -2
- package/lib/List.js.map +1 -1
- package/lib/ListEditMode.js +7 -5
- package/lib/ListEditMode.js.map +1 -1
- package/lib/MaxCharacters.js +2 -2
- package/lib/MaxCharacters.js.map +1 -1
- package/lib/PanelTitle.js +2 -2
- package/lib/PanelTitle.js.map +1 -1
- package/lib/PopOver.js +2 -2
- package/lib/PopOver.js.map +1 -1
- package/lib/RadioButton.js +3 -80
- package/lib/RadioButton.js.map +1 -1
- package/lib/ReadLettersMedium.js +1 -1
- package/lib/Select.js +4 -4
- package/lib/Select.js.map +1 -1
- package/lib/SingleSelectItem.js +4 -4
- package/lib/SingleSelectItem.js.map +1 -1
- package/lib/Slider.js +4 -4
- package/lib/Slider.js.map +1 -1
- package/lib/Spacer.js +2 -2
- package/lib/Spacer.js.map +1 -1
- package/lib/StatusDot.js +5 -5
- package/lib/StatusDot.js.map +1 -1
- package/lib/StatusDotList.js +2 -2
- package/lib/StatusDotList.js.map +1 -1
- package/lib/StepButtons.js +5 -5
- package/lib/StepButtons.js.map +1 -1
- package/lib/StrollerMedium.js +1 -1
- package/lib/Support2Medium.js +1 -1
- package/lib/TabList.js +8 -8
- package/lib/TabList.js.map +1 -1
- package/lib/TabPanel.js +2 -2
- package/lib/TabPanel.js.map +1 -1
- package/lib/TableBody.js +4 -4
- package/lib/TableBody.js.map +1 -1
- package/lib/TableCell.js +3 -3
- package/lib/TableCell.js.map +1 -1
- package/lib/TableExpandedRow.js +5 -5
- package/lib/TableExpandedRow.js.map +1 -1
- package/lib/TableExpanderCell.js +3 -3
- package/lib/TableExpanderCell.js.map +1 -1
- package/lib/TableHead.js +4 -4
- package/lib/TableHead.js.map +1 -1
- package/lib/TableHeadCell.js +4 -4
- package/lib/TableHeadCell.js.map +1 -1
- package/lib/TableRow.js +5 -5
- package/lib/TableRow.js.map +1 -1
- package/lib/Textarea.js +4 -4
- package/lib/Textarea.js.map +1 -1
- package/lib/Title.js +2 -2
- package/lib/Title.js.map +1 -1
- package/lib/Toast.js +3 -3
- package/lib/Toast.js.map +1 -1
- package/lib/components/ArticleTeaser/index.js +4 -4
- package/lib/components/ArticleTeaser/index.js.map +1 -1
- package/lib/components/Chip/index.js +2 -2
- package/lib/components/Chip/index.js.map +1 -1
- package/lib/{src/components → components}/Dropdown/SingleSelect/index.d.ts +1 -0
- package/lib/components/Dropdown/SingleSelect/index.js +2 -2
- package/lib/components/Dropdown/SingleSelect/index.js.map +1 -1
- package/lib/components/Dropdown/index.js +6 -6
- package/lib/components/Dropdown/index.js.map +1 -1
- package/lib/components/DropdownOld/index.js +3 -3
- package/lib/components/DropdownOld/index.js.map +1 -1
- package/lib/{src/components → components}/ElementHeader/index.d.ts +1 -0
- package/lib/components/ElementHeader/index.js +2 -2
- package/lib/components/ElementHeader/index.js.map +1 -1
- package/lib/components/EmptyState/index.js +2 -2
- package/lib/components/EmptyState/index.js.map +1 -1
- package/lib/{src/components → components}/ExpanderHierarchy/index.d.ts +1 -0
- package/lib/components/ExpanderHierarchy/index.js +8 -8
- package/lib/components/ExpanderHierarchy/index.js.map +1 -1
- package/lib/components/ExpanderList/index.js +8 -9
- package/lib/components/ExpanderList/index.js.map +1 -1
- package/lib/components/FavoriteButton/index.js +2 -2
- package/lib/components/FavoriteButton/index.js.map +1 -1
- package/lib/{src/components → components}/FormGroup/FormGroup.d.ts +1 -1
- package/lib/components/HelpBubble/index.js +3 -3
- package/lib/components/HelpBubble/index.js.map +1 -1
- package/lib/components/HelpPanel/index.js +2 -2
- package/lib/components/HelpPanel/index.js.map +1 -1
- package/lib/components/HelpTriggerInline/index.js +2 -2
- package/lib/components/HelpTriggerInline/index.js.map +1 -1
- package/lib/{src/components → components}/Icon/index.d.ts +1 -0
- package/lib/components/Icon/index.js +2 -1
- package/lib/{src/components → components}/Illustration/index.d.ts +1 -0
- package/lib/components/Illustration/index.js +2 -1
- package/lib/components/Illustrations/BabyMobile.js +1 -1
- package/lib/components/Illustrations/Child.js +1 -1
- package/lib/components/Illustrations/Doctor.js +1 -1
- package/lib/components/Illustrations/FacialRecognitionFingerprint.js +1 -1
- package/lib/components/Illustrations/GiveBabyFood.js +1 -1
- package/lib/components/Illustrations/HealthcarePersonnel.js +1 -1
- package/lib/components/Illustrations/ReadLetters.js +1 -1
- package/lib/components/Illustrations/Stroller.js +1 -1
- package/lib/components/Illustrations/Support2.js +1 -1
- package/lib/{src/components → components}/Label/index.d.ts +1 -0
- package/lib/components/Label/index.js +3 -3
- package/lib/{src/components → components}/LazyIcon/index.d.ts +1 -0
- package/lib/components/LazyIcon/index.js +2 -2
- package/lib/{src/components → components}/ListEditMode/index.d.ts +1 -0
- package/lib/components/ListEditMode/index.js +2 -2
- package/lib/components/Loader/index.js +4 -4
- package/lib/components/Loader/index.js.map +1 -1
- package/lib/components/Modal/index.js +9 -9
- package/lib/components/Modal/index.js.map +1 -1
- package/lib/components/NotificationPanel/index.js +6 -6
- package/lib/components/NotificationPanel/index.js.map +1 -1
- package/lib/components/Panel/index.js +13 -13
- package/lib/components/Panel/index.js.map +1 -1
- package/lib/{src/components → components}/PanelList/index.d.ts +1 -0
- package/lib/components/PanelList/index.js +5 -5
- package/lib/components/PanelList/index.js.map +1 -1
- package/lib/components/PopMenu/index.js +3 -3
- package/lib/components/PopMenu/index.js.map +1 -1
- package/lib/components/Progressbar/index.js +2 -2
- package/lib/components/Progressbar/index.js.map +1 -1
- package/lib/components/PromoPanel/index.js +2 -2
- package/lib/components/PromoPanel/index.js.map +1 -1
- package/lib/{src/components → components}/RadioButton/index.d.ts +1 -0
- package/lib/components/RadioButton/index.js +3 -3
- package/lib/components/ServiceMessage/index.js +6 -6
- package/lib/components/ServiceMessage/index.js.map +1 -1
- package/lib/components/SharingStatus/index.js +4 -4
- package/lib/components/SharingStatus/index.js.map +1 -1
- package/lib/components/Step/index.js +2 -2
- package/lib/components/Step/index.js.map +1 -1
- package/lib/{src/components → components}/Stepper/index.d.ts +1 -0
- package/lib/components/Stepper/index.js +4 -3
- package/lib/components/Stepper/index.js.map +1 -1
- package/lib/components/StickyNote/index.js +8 -8
- package/lib/components/StickyNote/index.js.map +1 -1
- package/lib/{src/components → components}/Table/index.d.ts +1 -0
- package/lib/components/Table/index.js +5 -5
- package/lib/components/Table/index.js.map +1 -1
- package/lib/components/Tabs/index.js +4 -4
- package/lib/components/Tabs/index.js.map +1 -1
- package/lib/components/Tag/index.js +2 -2
- package/lib/components/Tag/index.js.map +1 -1
- package/lib/components/Tile/index.js +4 -4
- package/lib/components/Tile/index.js.map +1 -1
- package/lib/components/Toggle/index.js +9 -9
- package/lib/components/Toggle/index.js.map +1 -1
- package/lib/components/Validation/index.js +4 -4
- package/lib/components/Validation/index.js.map +1 -1
- package/lib/constants3.js +44 -4
- package/lib/constants3.js.map +1 -1
- package/lib/index.d.ts +18 -1
- package/lib/utils2.js +89 -5
- package/lib/utils2.js.map +1 -1
- package/lib/utils3.js +89 -10
- package/lib/utils3.js.map +1 -1
- package/lib/utils4.js +11 -28
- package/lib/utils4.js.map +1 -1
- package/lib/utils5.js +28 -58
- package/lib/utils5.js.map +1 -1
- package/lib/utils6.js +60 -0
- package/lib/utils6.js.map +1 -0
- package/package.json +1 -1
- package/lib/Label2.js +0 -5
- package/lib/Label2.js.map +0 -1
- package/lib/RadioButton2.js +0 -5
- package/lib/RadioButton2.js.map +0 -1
- package/lib/constants4.js +0 -46
- package/lib/constants4.js.map +0 -1
- package/lib/src/components/AnchorLink/AnchorLink.stories.d.ts +0 -33
- package/lib/src/components/AnchorLink/AnchorLink.test.d.ts +0 -1
- package/lib/src/components/ArticleTeaser/ArticleTeaser.stories.d.ts +0 -30
- package/lib/src/components/ArticleTeaser/ArticleTeaser.test.d.ts +0 -1
- package/lib/src/components/AsChildSlot/AsChildSlot.stories.d.ts +0 -20
- package/lib/src/components/AsChildSlot/AsChildSlot.test.d.ts +0 -1
- package/lib/src/components/Avatar/Avatar.stories.d.ts +0 -45
- package/lib/src/components/Avatar/Avatar.test.d.ts +0 -1
- package/lib/src/components/Badge/Badge.stories.d.ts +0 -42
- package/lib/src/components/Badge/Badge.test.d.ts +0 -1
- package/lib/src/components/Button/Button.stories.d.ts +0 -53
- package/lib/src/components/Button/Button.test.d.ts +0 -1
- package/lib/src/components/Checkbox/Checkbox.stories.d.ts +0 -48
- package/lib/src/components/Checkbox/Checkbox.test.d.ts +0 -1
- package/lib/src/components/Chip/Chip.stories.d.ts +0 -44
- package/lib/src/components/Chip/Chip.test.d.ts +0 -1
- package/lib/src/components/Close/Close.stories.d.ts +0 -32
- package/lib/src/components/Close/Close.test.d.ts +0 -1
- package/lib/src/components/DictionaryTrigger/DictionaryTrigger.stories.d.ts +0 -29
- package/lib/src/components/DictionaryTrigger/DictionaryTrigger.test.d.ts +0 -1
- package/lib/src/components/Drawer/Drawer.stories.d.ts +0 -86
- package/lib/src/components/Drawer/Drawer.test.d.ts +0 -1
- package/lib/src/components/Dropdown/Dropdown.stories.d.ts +0 -36
- package/lib/src/components/Dropdown/Dropdown.test.d.ts +0 -1
- package/lib/src/components/Dropdown/SingleSelect/SingleSelect.stories.d.ts +0 -57
- package/lib/src/components/Dropdown/SingleSelect/SingleSelect.test.d.ts +0 -1
- package/lib/src/components/DropdownOld/DropdownOld.stories.d.ts +0 -66
- package/lib/src/components/DropdownOld/DropdownOld.test.d.ts +0 -0
- package/lib/src/components/Duolist/Duolist.stories.d.ts +0 -35
- package/lib/src/components/Duolist/Duolist.test.d.ts +0 -1
- package/lib/src/components/ElementHeader/ElementHeader.stories.d.ts +0 -26
- package/lib/src/components/ElementHeader/ElementHeaderText/ElementHeaderText.stories.d.ts +0 -51
- package/lib/src/components/ElementHeader/StatusDotList/StatusDotList.stories.d.ts +0 -15
- package/lib/src/components/EmptyState/EmptyState.stories.d.ts +0 -38
- package/lib/src/components/EmptyState/EmptyState.test.d.ts +0 -1
- package/lib/src/components/ErrorWrapper/ErrorWrapper.test.d.ts +0 -1
- package/lib/src/components/Expander/Expander.stories.d.ts +0 -54
- package/lib/src/components/Expander/Expander.test.d.ts +0 -1
- package/lib/src/components/ExpanderHierarchy/ExpanderHierarchy.stories.d.ts +0 -40
- package/lib/src/components/ExpanderHierarchy/ExpanderHierarchy.test.d.ts +0 -1
- package/lib/src/components/ExpanderList/ExpanderList.Expander.stories.d.ts +0 -70
- package/lib/src/components/ExpanderList/ExpanderList.stories.d.ts +0 -65
- package/lib/src/components/ExpanderList/ExpanderList.test.d.ts +0 -0
- package/lib/src/components/EyebrowHeader/EyebrowHeader.stories.d.ts +0 -19
- package/lib/src/components/EyebrowHeader/EyebrowHeader.test.d.ts +0 -1
- package/lib/src/components/FavoriteButton/FavoriteButton.stories.d.ts +0 -21
- package/lib/src/components/FavoriteButton/FavoriteButton.test.d.ts +0 -1
- package/lib/src/components/FormFieldTag/FormFieldTag.stories.d.ts +0 -28
- package/lib/src/components/FormFieldTag/FormFieldTag.test.d.ts +0 -1
- package/lib/src/components/FormGroup/FormGroup.stories.d.ts +0 -50
- package/lib/src/components/FormGroup/FormGroup.test.d.ts +0 -1
- package/lib/src/components/FormLayout/FormLayout.stories.d.ts +0 -29
- package/lib/src/components/FormLayout/FormLayout.test.d.ts +0 -1
- package/lib/src/components/HelpBubble/HelpBubble.stories.d.ts +0 -46
- package/lib/src/components/HelpBubble/HelpBubble.test.d.ts +0 -1
- package/lib/src/components/HelpDetails/HelpDetails.stories.d.ts +0 -23
- package/lib/src/components/HelpDetails/HelpDetails.test.d.ts +0 -1
- package/lib/src/components/HelpDrawer/HelpDrawer.stories.d.ts +0 -49
- package/lib/src/components/HelpDrawer/HelpDrawer.test.d.ts +0 -1
- package/lib/src/components/HelpExpanderInline/HelpExpanderInline.stories.d.ts +0 -28
- package/lib/src/components/HelpExpanderInline/HelpExpanderInline.test.d.ts +0 -1
- package/lib/src/components/HelpExpanderStandalone/HelpExpanderStandalone.stories.d.ts +0 -36
- package/lib/src/components/HelpExpanderStandalone/HelpExpanderStandalone.test.d.ts +0 -1
- package/lib/src/components/HelpPanel/HelpPanel.stories.d.ts +0 -30
- package/lib/src/components/HelpPanel/HelpPanel.test.d.ts +0 -1
- package/lib/src/components/HelpTeaser/HelpTeaser.stories.d.ts +0 -37
- package/lib/src/components/HelpTeaser/HelpTeaser.test.d.ts +0 -1
- package/lib/src/components/HelpTooltip/HelpTooltip.stories.d.ts +0 -36
- package/lib/src/components/HelpTooltip/HelpTooltip.test.d.ts +0 -1
- package/lib/src/components/HelpTriggerIcon/HelpTriggerIcon.stories.d.ts +0 -47
- package/lib/src/components/HelpTriggerIcon/HelpTriggerIcon.test.d.ts +0 -1
- package/lib/src/components/HelpTriggerInline/HelpTriggerInline.stories.d.ts +0 -35
- package/lib/src/components/HelpTriggerInline/HelpTriggerInline.test.d.ts +0 -1
- package/lib/src/components/HelpTriggerStandalone/HelpTriggerStandalone.stories.d.ts +0 -35
- package/lib/src/components/HelpTriggerStandalone/HelpTriggerStandalone.test.d.ts +0 -1
- package/lib/src/components/HighlightPanel/HighlightPanel.stories.d.ts +0 -40
- package/lib/src/components/HighlightPanel/HighlightPanel.test.d.ts +0 -1
- package/lib/src/components/Highlighter/Highlighter.stories.d.ts +0 -26
- package/lib/src/components/Highlighter/Highlighter.test.d.ts +0 -1
- package/lib/src/components/HorizontalScroll/HorizontalScroll.test.d.ts +0 -1
- package/lib/src/components/Icon/Icon.stories.d.ts +0 -41
- package/lib/src/components/Icon/Icon.test.d.ts +0 -1
- package/lib/src/components/Illustration/Illustration.stories.d.ts +0 -28
- package/lib/src/components/Illustration/Illustration.test.d.ts +0 -1
- package/lib/src/components/Illustration/Illustrations.stories.d.ts +0 -40
- package/lib/src/components/InfoTeaser/InfoTeaser.stories.d.ts +0 -38
- package/lib/src/components/InfoTeaser/InfoTeaser.test.d.ts +0 -1
- package/lib/src/components/Input/Input.stories.d.ts +0 -85
- package/lib/src/components/Input/Input.test.d.ts +0 -1
- package/lib/src/components/Label/Label.stories.d.ts +0 -35
- package/lib/src/components/Label/Label.test.d.ts +0 -1
- package/lib/src/components/LazyIcon/LazyIcon.stories.d.ts +0 -25
- package/lib/src/components/LazyIcon/LazyIcon.test.d.ts +0 -1
- package/lib/src/components/LazyIllustration/LazyIllustration.stories.d.ts +0 -35
- package/lib/src/components/LazyIllustration/LazyIllustration.test.d.ts +0 -1
- package/lib/src/components/LinkList/LinkList.Link.stories.d.ts +0 -22
- package/lib/src/components/LinkList/LinkList.stories.d.ts +0 -59
- package/lib/src/components/LinkList/LinkList.test.d.ts +0 -1
- package/lib/src/components/List/List.stories.d.ts +0 -53
- package/lib/src/components/List/List.test.d.ts +0 -1
- package/lib/src/components/ListEditMode/ListEditMode.stories.d.ts +0 -41
- package/lib/src/components/Loader/Loader.stories.d.ts +0 -31
- package/lib/src/components/Loader/Loader.test.d.ts +0 -1
- package/lib/src/components/Logo/Logo.stories.d.ts +0 -36
- package/lib/src/components/Logo/Logo.test.d.ts +0 -1
- package/lib/src/components/MaxCharacters/MaxCharacters.test.d.ts +0 -1
- package/lib/src/components/Mittens/Mittens.stories.d.ts +0 -34
- package/lib/src/components/Modal/Modal.stories.d.ts +0 -71
- package/lib/src/components/Modal/Modal.test.d.ts +0 -1
- package/lib/src/components/NotificationPanel/NotificationPanel.stories.d.ts +0 -54
- package/lib/src/components/NotificationPanel/NotificationPanel.test.d.ts +0 -1
- package/lib/src/components/Panel/Panel.stories.d.ts +0 -79
- package/lib/src/components/Panel/Panel.test.d.ts +0 -1
- package/lib/src/components/Panel/PanelTitle/PanelTitle.stories.d.ts +0 -43
- package/lib/src/components/PanelList/PanelList.stories.d.ts +0 -32
- package/lib/src/components/PanelList/PanelList.test.d.ts +0 -1
- package/lib/src/components/PopMenu/PopMenu.stories.d.ts +0 -42
- package/lib/src/components/PopMenu/PopMenu.test.d.ts +0 -0
- package/lib/src/components/PopOver/PopOver.stories.d.ts +0 -46
- package/lib/src/components/PopOver/PopOver.test.d.ts +0 -1
- package/lib/src/components/Progressbar/Progressbar.stories.d.ts +0 -40
- package/lib/src/components/Progressbar/Progressbar.test.d.ts +0 -1
- package/lib/src/components/PromoPanel/PromoPanel.stories.d.ts +0 -44
- package/lib/src/components/PromoPanel/PromoPanel.test.d.ts +0 -1
- package/lib/src/components/RadioButton/RadioButton.stories.d.ts +0 -58
- package/lib/src/components/RadioButton/RadioButton.test.d.ts +0 -1
- package/lib/src/components/Select/Select.stories.d.ts +0 -36
- package/lib/src/components/Select/Select.test.d.ts +0 -1
- package/lib/src/components/ServiceMessage/ServiceMessage.stories.d.ts +0 -71
- package/lib/src/components/ServiceMessage/ServiceMessage.test.d.ts +0 -1
- package/lib/src/components/SharingStatus/SharingStatus.stories.d.ts +0 -30
- package/lib/src/components/SharingStatus/SharingStatus.test.d.ts +0 -1
- package/lib/src/components/Slider/Slider.stories.d.ts +0 -55
- package/lib/src/components/Slider/Slider.test.d.ts +0 -1
- package/lib/src/components/Spacer/Spacer.stories.d.ts +0 -17
- package/lib/src/components/Spacer/Spacer.test.d.ts +0 -1
- package/lib/src/components/StatusDot/StatusDot.stories.d.ts +0 -31
- package/lib/src/components/StatusDot/StatusDot.test.d.ts +0 -1
- package/lib/src/components/Step/Step.stories.d.ts +0 -32
- package/lib/src/components/Step/Step.test.d.ts +0 -1
- package/lib/src/components/StepButtons/StepButtons.stories.d.ts +0 -19
- package/lib/src/components/StepButtons/StepButtons.test.d.ts +0 -1
- package/lib/src/components/Stepper/Stepper.stories.d.ts +0 -38
- package/lib/src/components/Stepper/Stepper.test.d.ts +0 -1
- package/lib/src/components/StickyNote/StickyNote.stories.d.ts +0 -42
- package/lib/src/components/StickyNote/StickyNote.test.d.ts +0 -1
- package/lib/src/components/Table/Table.stories.d.ts +0 -93
- package/lib/src/components/Table/Table.test.d.ts +0 -1
- package/lib/src/components/Tabs/Tabs.stories.d.ts +0 -63
- package/lib/src/components/Tabs/Tabs.test.d.ts +0 -1
- package/lib/src/components/Tag/Tag.stories.d.ts +0 -38
- package/lib/src/components/Tag/Tag.test.d.ts +0 -1
- package/lib/src/components/TagList/TagList.stories.d.ts +0 -18
- package/lib/src/components/TagList/TagList.test.d.ts +0 -1
- package/lib/src/components/Textarea/Textarea.stories.d.ts +0 -76
- package/lib/src/components/Textarea/Textarea.test.d.ts +0 -1
- package/lib/src/components/Tile/Tile.stories.d.ts +0 -71
- package/lib/src/components/Tile/Tile.test.d.ts +0 -1
- package/lib/src/components/Title/Title.stories.d.ts +0 -37
- package/lib/src/components/Title/Title.test.d.ts +0 -1
- package/lib/src/components/Toast/Toast.stories.d.ts +0 -29
- package/lib/src/components/Toast/Toast.test.d.ts +0 -1
- package/lib/src/components/ToastList/ToastList.stories.d.ts +0 -23
- package/lib/src/components/ToastList/ToastList.test.d.ts +0 -1
- package/lib/src/components/Toggle/Toggle.stories.d.ts +0 -36
- package/lib/src/components/Toggle/Toggle.test.d.ts +0 -1
- package/lib/src/components/Validation/Validation.stories.d.ts +0 -14
- package/lib/src/components/Validation/Validation.test.d.ts +0 -1
- package/lib/src/components/Validation/ValidationSummary.test.d.ts +0 -1
- package/lib/src/docs/ButtonWithModal/ButtonWithModal.d.ts +0 -9
- package/lib/src/docs/ButtonWithModal/index.d.ts +0 -3
- package/lib/src/docs/FormExample/FormExample.d.ts +0 -9
- package/lib/src/docs/FormExample/constants.d.ts +0 -10
- package/lib/src/docs/FormExample/index.d.ts +0 -3
- package/lib/src/docs/GridExample/GridExample.d.ts +0 -7
- package/lib/src/docs/GridExample/index.d.ts +0 -3
- package/lib/src/docs/HelpBubbleExample/HelpBubbleExample.d.ts +0 -3
- package/lib/src/docs/HelpBubbleExample/index.d.ts +0 -3
- package/lib/src/docs/HelpTooltipExample/HelpTooltipExample.d.ts +0 -3
- package/lib/src/docs/HelpTooltipExample/index.d.ts +0 -3
- package/lib/src/docs/Tokens/Tokens.stories.d.ts +0 -23
- package/lib/src/docs/Tokens/TokensExample.d.ts +0 -6
- package/lib/src/hoc/withBreakpoint/withBreakpoint.stories.d.ts +0 -16
- package/lib/src/hoc/withBreakpoint/withBreakpoint.test.d.ts +0 -1
- package/lib/src/hooks/useBreakpoint.stories.d.ts +0 -22
- package/lib/src/hooks/useElementList.stories.d.ts +0 -22
- package/lib/src/hooks/useFocusToggle.stories.d.ts +0 -22
- package/lib/src/hooks/useFocusTrap.stories.d.ts +0 -22
- package/lib/src/hooks/useFocusableElements.stories.d.ts +0 -22
- package/lib/src/hooks/useIdWithFallback.stories.d.ts +0 -22
- package/lib/src/hooks/useIntersectionObserver.stories.d.ts +0 -22
- package/lib/src/hooks/useInterval.stories.d.ts +0 -22
- package/lib/src/hooks/useIsMobileBreakpoint.stories.d.ts +0 -22
- package/lib/src/hooks/useIsVisible.stories.d.ts +0 -33
- package/lib/src/hooks/useKeyboardEvent.stories.d.ts +0 -22
- package/lib/src/hooks/useLanguage.stories.d.ts +0 -22
- package/lib/src/hooks/useLayoutEvent.stories.d.ts +0 -22
- package/lib/src/hooks/useOutsideEvent.stories.d.ts +0 -22
- package/lib/src/hooks/usePseudoClasses.stories.d.ts +0 -22
- package/lib/src/hooks/useResizeObserver.stories.d.ts +0 -22
- package/lib/src/hooks/useReturnFocusOnUnmount.stories.d.ts +0 -26
- package/lib/src/hooks/useRovingFocus.stories.d.ts +0 -24
- package/lib/src/hooks/useSize.stories.d.ts +0 -22
- package/lib/src/index.d.ts +0 -18
- package/lib/src/resources/HN.Designsystem.ArticleTeaser.en-GB.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.ArticleTeaser.nb-NO.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.Drawer.en-GB.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.Drawer.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.Dropdown.en-GB.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.Dropdown.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.FavoriteButton.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.FormFieldTag.en-GB.json.d.ts +0 -12
- package/lib/src/resources/HN.Designsystem.FormFieldTag.nb-NO.json.d.ts +0 -12
- package/lib/src/resources/HN.Designsystem.FormFieldTag.nn-NO.json.d.ts +0 -12
- package/lib/src/resources/HN.Designsystem.FormFieldTag.se-NO.json.d.ts +0 -12
- package/lib/src/resources/HN.Designsystem.HelpBubble.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.HelpDrawer.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.InfoTeaser.en-GB.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.InfoTeaser.nb-NO.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.Input.en-GB.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.Input.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.Input.nn-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.LinkList.en-GB.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.LinkList.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.Panel.en-GB.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.Panel.nb-NO.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.Tabs.en-GB.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.Tabs.nb-NO.json.d.ts +0 -7
- package/lib/src/resources/HN.Designsystem.TextArea.en-GB.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.TextArea.nb-NO.json.d.ts +0 -6
- package/lib/src/resources/HN.Designsystem.TextArea.nn-NO.json.d.ts +0 -6
- package/lib/src/resources/index.d.ts +0 -1
- package/lib/src/scss/typography.stories.d.ts +0 -32
- package/lib/src/utils/language.stories.d.ts +0 -27
- package/lib/src/utils/tests/accessibility.test.d.ts +0 -1
- package/lib/src/utils/tests/deepContains.test.d.ts +0 -1
- package/lib/src/utils/tests/language.test.d.ts +0 -1
- package/lib/src/utils/tests/uuid.test.d.ts +0 -1
- package/lib/src/utils/tests/viewport.test.d.ts +0 -1
- /package/lib/{src/__mocks__ → __mocks__}/IntersectionObserver.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/MutationObserver.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/ResizeObserver.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/matchMedia.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/useLayoutEvent.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/useOutsideEvent.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/usePseudoClasses.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/useSize.d.ts +0 -0
- /package/lib/{src/__mocks__ → __mocks__}/uuid.d.ts +0 -0
- /package/lib/{src/components → components}/AnchorLink/AnchorLink.d.ts +0 -0
- /package/lib/{src/components → components}/AnchorLink/index.d.ts +0 -0
- /package/lib/{src/components → components}/ArticleTeaser/ArticleTeaser.d.ts +0 -0
- /package/lib/{src/components → components}/ArticleTeaser/index.d.ts +0 -0
- /package/lib/{src/components → components}/ArticleTeaser/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/AsChildSlot/AsChildSlot.d.ts +0 -0
- /package/lib/{src/components → components}/AsChildSlot/index.d.ts +0 -0
- /package/lib/{src/components → components}/Avatar/Avatar.d.ts +0 -0
- /package/lib/{src/components → components}/Avatar/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Avatar/index.d.ts +0 -0
- /package/lib/{src/components → components}/Badge/Badge.d.ts +0 -0
- /package/lib/{src/components → components}/Badge/NotificationBadge.d.ts +0 -0
- /package/lib/{src/components → components}/Badge/index.d.ts +0 -0
- /package/lib/{src/components → components}/Button/Button.d.ts +0 -0
- /package/lib/{src/components → components}/Button/index.d.ts +0 -0
- /package/lib/{src/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/lib/{src/components → components}/Checkbox/index.d.ts +0 -0
- /package/lib/{src/components → components}/Chip/Chip.d.ts +0 -0
- /package/lib/{src/components → components}/Chip/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Chip/index.d.ts +0 -0
- /package/lib/{src/components → components}/Close/Close.d.ts +0 -0
- /package/lib/{src/components → components}/Close/index.d.ts +0 -0
- /package/lib/{src/components → components}/DictionaryTrigger/DictionaryTrigger.d.ts +0 -0
- /package/lib/{src/components → components}/DictionaryTrigger/index.d.ts +0 -0
- /package/lib/{src/components → components}/Drawer/Drawer.d.ts +0 -0
- /package/lib/{src/components → components}/Drawer/index.d.ts +0 -0
- /package/lib/{src/components → components}/Drawer/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/Dropdown/Dropdown.d.ts +0 -0
- /package/lib/{src/components → components}/Dropdown/SingleSelect/SingleSelect.d.ts +0 -0
- /package/lib/{src/components → components}/Dropdown/SingleSelect/SingleSelectItem.d.ts +0 -0
- /package/lib/{src/components → components}/Dropdown/SingleSelect/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Dropdown/index.d.ts +0 -0
- /package/lib/{src/components → components}/Dropdown/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/DropdownOld/DropdownOld.d.ts +0 -0
- /package/lib/{src/components → components}/DropdownOld/constants.d.ts +0 -0
- /package/lib/{src/components → components}/DropdownOld/index.d.ts +0 -0
- /package/lib/{src/components → components}/DropdownOld/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/Duolist/Duolist.d.ts +0 -0
- /package/lib/{src/components → components}/Duolist/index.d.ts +0 -0
- /package/lib/{src/components → components}/ElementHeader/ElementHeader.d.ts +0 -0
- /package/lib/{src/components → components}/ElementHeader/ElementHeaderText/ElementHeaderText.d.ts +0 -0
- /package/lib/{src/components → components}/ElementHeader/ElementHeaderText/index.d.ts +0 -0
- /package/lib/{src/components → components}/ElementHeader/StatusDotList/StatusDotList.d.ts +0 -0
- /package/lib/{src/components → components}/ElementHeader/StatusDotList/index.d.ts +0 -0
- /package/lib/{src/components → components}/ElementHeader/utils.d.ts +0 -0
- /package/lib/{src/components → components}/EmptyState/EmptyBoxBeeMedium.d.ts +0 -0
- /package/lib/{src/components → components}/EmptyState/EmptyBoxBeeSmall.d.ts +0 -0
- /package/lib/{src/components → components}/EmptyState/EmptyState.d.ts +0 -0
- /package/lib/{src/components → components}/EmptyState/constants.d.ts +0 -0
- /package/lib/{src/components → components}/EmptyState/index.d.ts +0 -0
- /package/lib/{src/components → components}/ErrorWrapper/ErrorWrapper.d.ts +0 -0
- /package/lib/{src/components → components}/ErrorWrapper/index.d.ts +0 -0
- /package/lib/{src/components → components}/Expander/Expander.d.ts +0 -0
- /package/lib/{src/components → components}/Expander/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Expander/index.d.ts +0 -0
- /package/lib/{src/components → components}/ExpanderHierarchy/Expander.d.ts +0 -0
- /package/lib/{src/components → components}/ExpanderHierarchy/ExpanderButton.d.ts +0 -0
- /package/lib/{src/components → components}/ExpanderHierarchy/ExpanderHierarchy.d.ts +0 -0
- /package/lib/{src/components → components}/ExpanderHierarchy/utils.d.ts +0 -0
- /package/lib/{src/components → components}/ExpanderList/ExpanderList.d.ts +0 -0
- /package/lib/{src/components → components}/ExpanderList/index.d.ts +0 -0
- /package/lib/{src/components → components}/EyebrowHeader/EyebrowHeader.d.ts +0 -0
- /package/lib/{src/components → components}/EyebrowHeader/index.d.ts +0 -0
- /package/lib/{src/components → components}/FavoriteButton/FavoriteButton.d.ts +0 -0
- /package/lib/{src/components → components}/FavoriteButton/StarIcon.d.ts +0 -0
- /package/lib/{src/components → components}/FavoriteButton/index.d.ts +0 -0
- /package/lib/{src/components → components}/FavoriteButton/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/FormFieldTag/FormFieldTag.d.ts +0 -0
- /package/lib/{src/components → components}/FormFieldTag/index.d.ts +0 -0
- /package/lib/{src/components → components}/FormFieldTag/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/FormGroup/index.d.ts +0 -0
- /package/lib/{src/components → components}/FormLayout/FormLayout.d.ts +0 -0
- /package/lib/{src/components → components}/FormLayout/constants.d.ts +0 -0
- /package/lib/{src/components → components}/FormLayout/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpBubble/HelpBubble.d.ts +0 -0
- /package/lib/{src/components → components}/HelpBubble/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpBubble/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/HelpDetails/HelpDetails.d.ts +0 -0
- /package/lib/{src/components → components}/HelpDrawer/HelpDrawer.d.ts +0 -0
- /package/lib/{src/components → components}/HelpDrawer/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpDrawer/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/HelpExpanderInline/HelpExpanderInline.d.ts +0 -0
- /package/lib/{src/components → components}/HelpExpanderInline/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpExpanderStandalone/HelpExpanderStandalone.d.ts +0 -0
- /package/lib/{src/components → components}/HelpExpanderStandalone/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpPanel/HelpPanel.d.ts +0 -0
- /package/lib/{src/components → components}/HelpPanel/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTeaser/HelpTeaser.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTeaser/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTooltip/HelpTooltip.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTooltip/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerIcon/HelpSign.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerIcon/HelpTriggerIcon.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerIcon/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerInline/HelpTriggerInline.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerInline/index.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerStandalone/HelpTriggerStandalone.d.ts +0 -0
- /package/lib/{src/components → components}/HelpTriggerStandalone/index.d.ts +0 -0
- /package/lib/{src/components → components}/HighlightPanel/HighlightPanel.d.ts +0 -0
- /package/lib/{src/components → components}/HighlightPanel/index.d.ts +0 -0
- /package/lib/{src/components → components}/Highlighter/Highlighter.d.ts +0 -0
- /package/lib/{src/components → components}/Highlighter/index.d.ts +0 -0
- /package/lib/{src/components → components}/HorizontalScroll/HorizontalScroll.d.ts +0 -0
- /package/lib/{src/components → components}/HorizontalScroll/index.d.ts +0 -0
- /package/lib/{src/components → components}/Icon/Icon.d.ts +0 -0
- /package/lib/{src/components → components}/Icon/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ActiveMonitoring.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/AcupunctureBack.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/AdditionalIconInformation.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/AlarmClock.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/AlertSignFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/AlertSignStroke.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Amputation.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Anxiety.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Apple.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Archive.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ArmFlexing.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ArrowDown.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ArrowLeft.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ArrowRight.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ArrowUp.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ArrowUpRight.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Attachment.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Atv.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Avatar.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/AwakePersonOnPillow.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Baby.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BandAid.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BeerAndPills.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Bell.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Bike.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BirthControl.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BirthdayCake.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Boat.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Body.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Braille.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Brain.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BreastReconstruction.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BreastRemoval.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Breasts.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BrokenHeart.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/BrokenPuzzle.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Bus.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Calendar.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CalendarChange.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CalendarCheck.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CalendarEvent.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CalendarSave.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Cancer.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Candle.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Car.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Carton.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Change.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Check.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CheckFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CheckOutline.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Chest.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChevronDown.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChevronLeft.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChevronRight.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChevronUp.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChevronsDown.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChevronsUp.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ChildPlaying.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Cigarette.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Coins.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Contacts.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Copy.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CoronaCertificate.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Coronavirus.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Cough.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CreditCard.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/CriticalHealthInfo.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Cross.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DataExchange.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DataReceived.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DataSent.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Depression.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DigestiveSystem.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Dizzy.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Documents.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Dog.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DonorCard.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotActive.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotAlert.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotCancelled.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotHalfDisc.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotInactive.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotInfo.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotLookingGlass.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotPending.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotQuestionMark.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotSuccess.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotTransparent.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/DotWarningTriangle.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Download.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Draft.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Drag.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EChat.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Ear.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EarDeaf.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EarHearingAid.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EarNoseThroat.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EarVolume.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Edit.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ElderlyPerson.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Embolization.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmergencyCall.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmoticonAnnoyed.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmoticonDelighted.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmoticonDisappointed.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmoticonHappy.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmoticonMeh.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EmptyBox.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EnterFullScreen.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Envelope.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Epilepsy.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Eraser.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ErrorSignFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ErrorSignStroke.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/EuropeanHealthCard.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ExitFullScreen.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Eye.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Facebook.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/FallingLeaf.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Feedback.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Female.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/FemaleDoctor.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Ferry.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/File.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Filter.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/FingerBleed.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/FirstAidKit.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Fish.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/FloppyDisk.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Football.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Form.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Forward.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Gallery.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Garden.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/GasCan.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/GenderIdentity.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/GlassWater.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Glasses.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Globe.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Grain.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Graph.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Group.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/GroupTwins.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HTMLFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HandWaving.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HandWithDisease.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HandsAndHeart.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HealthClinic.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HealthMeasurements.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HealthWarning.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HealthcarePerson.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HealthcarePersonell.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HearingProtection.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Heart.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HeartHands.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HelpSign.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HelpingHand.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Hemodialysis.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Hiker.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Hipprosthesis.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/History.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HivAndAids.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Home.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/HomeFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Hormone.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Hospital.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Hourglass.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/IconNames.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ImgFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Inbox.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/InfoSignFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/InfoSignStroke.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Instagram.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Intravenous.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/JointPain.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Journal.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/JpgFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Kidney.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/KitchenScale.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Kjernejournal.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Laboratory.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/LaptopBlog.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/LawBook.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/LegalDocument.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/LightBulb.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/List.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Location.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/LocationFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Lock.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Login.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Logout.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Lungs.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Makeup.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MaleDoctor.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MaleDoctorAndPerson.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MaleDoctorCompact.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MaleDoctorCompactFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MaleGenitalia.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Medicine.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MedicineWarning.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MentalHealthAdult.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MentalHealthChild.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Menu.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Microscope.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Minus.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Mirror.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MobilePhone.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MotherHoldingBaby.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MuscleBack.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MuscleLeg.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Mushroom.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Music.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/MusselsAndSalt.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/NoAccess.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/NoEye.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/NoFilter.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Notepad.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Osteotomy.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PaintRoller.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PaperPlane.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PatientAndPerson.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Pause.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PdfFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Pencil.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PeopleTalking.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Peritonealdialysis.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Person.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonAndPatient.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonCancel.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonInXRayMachine.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonOverweight.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonRelaxing.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWithBrain.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWithBrokenArm.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWithCrutches.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWithJaw.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWithMagnifyingGlass.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWithSenses.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonWorking.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PersonalPlan.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PizzaSlice.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Plane.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Plant.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PlateKnifeFork.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Play.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PlusLarge.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PlusSmall.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PngFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Podcast.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/PoisonInformation.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Pregnant.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Printer.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Psychosis.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Publication.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Puzzle.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/QrCode.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Quarrel.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/RadioTherapy.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/RadioactiveTreatment.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Radioiodine.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Receipt.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Receptionist.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Recovery.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Referral.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Refresh.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Refund.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Reminder.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Reply.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Rocket.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/RtfFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/STDs.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Save.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Scale.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ScreenReader.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Search.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SectionSign.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Settings.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SettingsFill.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Sexualorientation.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ShakingHand.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Share.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SharedHealthData.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SharedHealthMeasurements.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Shield.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ShuntOperation.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Skeleton.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Skin.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Snake.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Snapchat.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SortDown.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SortUp.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SpeechBubble.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Spray.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/StickyNote.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/StickyNotes.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Stopwatch.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Sun.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/SupportingPerson.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Surgery.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Sweets.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Syringe.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Taxi.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TeddyBear.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Teenagers.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ThinkingAboutBaby.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Ticket.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TimePassing.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Toddler.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Tombstone.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Toolbox.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Tooth.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TotalKneeProsthesis.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Train.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Transplantation.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TrashCan.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TravelRoute.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TreatmentAids.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/TriangleX.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Twitter.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Undo.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/UniProsthesis.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Upload.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/UserOrganization.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Vaccine.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/VerticalDots.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/VideoCamera.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/VideoChat.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Wallet.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Watch.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Website.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Wheelchair.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/WheelchairActive.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Window.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/WordDocument.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/WorkSuitcase.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/X.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/XOutline.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/XmlFile.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/YouTube.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/Zoom.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ZoomInLeft.d.ts +0 -0
- /package/lib/{src/components → components}/Icons/ZoomOutLeft.d.ts +0 -0
- /package/lib/{src/components → components}/Illustration/Illustration.d.ts +0 -0
- /package/lib/{src/components → components}/Illustration/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/BabyMobile.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/BabyMobileMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/Child.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/ChildMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/Doctor.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/DoctorMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/DoctorSmall.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/FacialRecognitionFingerprint.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/FacialRecognitionFingerprintMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/GiveBabyFood.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/GiveBabyFoodMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/HealthcarePersonnel.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/HealthcarePersonnelMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/HealthcarePersonnelSmall.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/IllustrationNames.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/ReadLetters.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/ReadLettersMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/Stroller.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/StrollerMedium.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/Support2.d.ts +0 -0
- /package/lib/{src/components → components}/Illustrations/Support2Medium.d.ts +0 -0
- /package/lib/{src/components → components}/InfoTeaser/InfoTeaser.d.ts +0 -0
- /package/lib/{src/components → components}/InfoTeaser/index.d.ts +0 -0
- /package/lib/{src/components → components}/InfoTeaser/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/Input/Input.d.ts +0 -0
- /package/lib/{src/components → components}/Input/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Input/index.d.ts +0 -0
- /package/lib/{src/components → components}/Input/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/Label/Label.d.ts +0 -0
- /package/lib/{src/components → components}/Label/SubLabel.d.ts +0 -0
- /package/lib/{src/components → components}/Label/utils.d.ts +0 -0
- /package/lib/{src/components → components}/LazyIcon/ErrorBoundary.d.ts +0 -0
- /package/lib/{src/components → components}/LazyIcon/LazyIcon.d.ts +0 -0
- /package/lib/{src/components → components}/LazyIcon/utils.d.ts +0 -0
- /package/lib/{src/components → components}/LazyIllustration/LazyIllustration.d.ts +0 -0
- /package/lib/{src/components → components}/LazyIllustration/index.d.ts +0 -0
- /package/lib/{src/components → components}/LinkList/LinkList.d.ts +0 -0
- /package/lib/{src/components → components}/LinkList/index.d.ts +0 -0
- /package/lib/{src/components → components}/LinkList/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/List/List.d.ts +0 -0
- /package/lib/{src/components → components}/List/index.d.ts +0 -0
- /package/lib/{src/components → components}/ListEditMode/ListEditMode.d.ts +0 -0
- /package/lib/{src/components → components}/ListEditMode/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Loader/Loader.d.ts +0 -0
- /package/lib/{src/components → components}/Loader/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Loader/index.d.ts +0 -0
- /package/lib/{src/components → components}/Logo/Logo.d.ts +0 -0
- /package/lib/{src/components → components}/Logo/index.d.ts +0 -0
- /package/lib/{src/components → components}/MaxCharacters/MaxCharacters.d.ts +0 -0
- /package/lib/{src/components → components}/Modal/Modal.d.ts +0 -0
- /package/lib/{src/components → components}/Modal/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Modal/index.d.ts +0 -0
- /package/lib/{src/components → components}/NotificationPanel/NotificationPanel.d.ts +0 -0
- /package/lib/{src/components → components}/NotificationPanel/index.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/Panel.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/PanelExamples.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/PanelTitle/PanelTitle.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/PanelTitle/index.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/Paneldocs.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/index.d.ts +0 -0
- /package/lib/{src/components → components}/Panel/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/PanelList/PanelList.d.ts +0 -0
- /package/lib/{src/components → components}/PanelList/utils.d.ts +0 -0
- /package/lib/{src/components → components}/PopMenu/PopMenu.d.ts +0 -0
- /package/lib/{src/components → components}/PopMenu/constants.d.ts +0 -0
- /package/lib/{src/components → components}/PopMenu/index.d.ts +0 -0
- /package/lib/{src/components → components}/PopOver/PopOver.d.ts +0 -0
- /package/lib/{src/components → components}/PopOver/index.d.ts +0 -0
- /package/lib/{src/components → components}/PopOver/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Portal/index.d.ts +0 -0
- /package/lib/{src/components → components}/Progressbar/Progressbar.d.ts +0 -0
- /package/lib/{src/components → components}/Progressbar/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Progressbar/index.d.ts +0 -0
- /package/lib/{src/components → components}/PromoPanel/PromoPanel.d.ts +0 -0
- /package/lib/{src/components → components}/PromoPanel/index.d.ts +0 -0
- /package/lib/{src/components → components}/RadioButton/RadioButton.d.ts +0 -0
- /package/lib/{src/components → components}/RadioButton/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Select/Select.d.ts +0 -0
- /package/lib/{src/components → components}/Select/index.d.ts +0 -0
- /package/lib/{src/components → components}/ServiceMessage/ServiceMessage.d.ts +0 -0
- /package/lib/{src/components → components}/ServiceMessage/index.d.ts +0 -0
- /package/lib/{src/components → components}/SharingStatus/SharingStatus.d.ts +0 -0
- /package/lib/{src/components → components}/SharingStatus/index.d.ts +0 -0
- /package/lib/{src/components → components}/Slider/Slider.d.ts +0 -0
- /package/lib/{src/components → components}/Slider/index.d.ts +0 -0
- /package/lib/{src/components → components}/Spacer/Spacer.d.ts +0 -0
- /package/lib/{src/components → components}/Spacer/index.d.ts +0 -0
- /package/lib/{src/components → components}/StatusDot/StatusDot.d.ts +0 -0
- /package/lib/{src/components → components}/StatusDot/constants.d.ts +0 -0
- /package/lib/{src/components → components}/StatusDot/index.d.ts +0 -0
- /package/lib/{src/components → components}/Step/Step.d.ts +0 -0
- /package/lib/{src/components → components}/Step/index.d.ts +0 -0
- /package/lib/{src/components → components}/StepButtons/StepButtons.d.ts +0 -0
- /package/lib/{src/components → components}/StepButtons/index.d.ts +0 -0
- /package/lib/{src/components → components}/Stepper/Dot.d.ts +0 -0
- /package/lib/{src/components → components}/Stepper/DotList.d.ts +0 -0
- /package/lib/{src/components → components}/Stepper/Stepper.d.ts +0 -0
- /package/lib/{src/components → components}/Stepper/utils.d.ts +0 -0
- /package/lib/{src/components → components}/StickyNote/Close.d.ts +0 -0
- /package/lib/{src/components → components}/StickyNote/StickyNote.d.ts +0 -0
- /package/lib/{src/components → components}/StickyNote/Triangle.d.ts +0 -0
- /package/lib/{src/components → components}/StickyNote/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/Table.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableBody/TableBody.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableBody/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableCell/TableCell.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableCell/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableExpandedRow/TableExpandedRow.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableExpandedRow/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableExpanderCell/TableExpanderCell.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableExpanderCell/TableExpanderCellMobile.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableExpanderCell/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableHead/TableHead.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableHead/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableHeadCell/TableHeadCell.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableHeadCell/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableRow/TableRow.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableRow/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Table/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/Tab.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/TabList/TabChevron.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/TabList/TabItem.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/TabList/TabList.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/TabList/index.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/TabPanel/TabPanel.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/TabPanel/index.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/Tabs.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/index.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/Tag/Tag.d.ts +0 -0
- /package/lib/{src/components → components}/Tag/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Tag/index.d.ts +0 -0
- /package/lib/{src/components → components}/TagList/TagList.d.ts +0 -0
- /package/lib/{src/components → components}/TagList/index.d.ts +0 -0
- /package/lib/{src/components → components}/Textarea/Textarea.d.ts +0 -0
- /package/lib/{src/components → components}/Textarea/index.d.ts +0 -0
- /package/lib/{src/components → components}/Textarea/resourceHelper.d.ts +0 -0
- /package/lib/{src/components → components}/Tile/Tile.d.ts +0 -0
- /package/lib/{src/components → components}/Tile/index.d.ts +0 -0
- /package/lib/{src/components → components}/Title/Title.d.ts +0 -0
- /package/lib/{src/components → components}/Title/index.d.ts +0 -0
- /package/lib/{src/components → components}/Title/utils.d.ts +0 -0
- /package/lib/{src/components → components}/Toast/Toast.d.ts +0 -0
- /package/lib/{src/components → components}/Toast/index.d.ts +0 -0
- /package/lib/{src/components → components}/ToastList/ToastList.d.ts +0 -0
- /package/lib/{src/components → components}/ToastList/index.d.ts +0 -0
- /package/lib/{src/components → components}/Toggle/Toggle.d.ts +0 -0
- /package/lib/{src/components → components}/Toggle/constants.d.ts +0 -0
- /package/lib/{src/components → components}/Toggle/index.d.ts +0 -0
- /package/lib/{src/components → components}/Validation/ErrorList.d.ts +0 -0
- /package/lib/{src/components → components}/Validation/ErrorListItem.d.ts +0 -0
- /package/lib/{src/components → components}/Validation/Validation.d.ts +0 -0
- /package/lib/{src/components → components}/Validation/ValidationSummary.d.ts +0 -0
- /package/lib/{src/components → components}/Validation/index.d.ts +0 -0
- /package/lib/{src/components → components}/Validation/types.d.ts +0 -0
- /package/lib/{src/constants.d.ts → constants.d.ts} +0 -0
- /package/lib/{src/hoc → hoc}/withBreakpoint/index.d.ts +0 -0
- /package/lib/{src/hoc → hoc}/withBreakpoint/withBreakpoint.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useBreakpoint.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useElementList.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useEventListenerState.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useExpand.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useFocusToggle.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useFocusTrap.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useFocusableElements.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useIcons.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useIdWithFallback.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useIntersectionObserver.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useInterval.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useIsMobileBreakpoint.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useIsServerSide.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useIsVisible.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useKeyboardEvent.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useLanguage.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useLayoutEvent.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useOutsideEvent.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/usePrevious.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/usePseudoClasses.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useResizeObserver.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useReturnFocusOnUnmount.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useRovingFocus.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useSize.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useToggle.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/usestopPropagation.d.ts +0 -0
- /package/lib/{src/theme → theme}/currys/color.d.ts +0 -0
- /package/lib/{src/theme → theme}/currys/index.d.ts +0 -0
- /package/lib/{src/theme → theme}/currys/spacing.d.ts +0 -0
- /package/lib/{src/theme → theme}/grid.d.ts +0 -0
- /package/lib/{src/theme → theme}/index.d.ts +0 -0
- /package/lib/{src/theme → theme}/palette.d.ts +0 -0
- /package/lib/{src/theme → theme}/spacers.d.ts +0 -0
- /package/lib/{src/utils → utils}/accessibility.d.ts +0 -0
- /package/lib/{src/utils → utils}/component.d.ts +0 -0
- /package/lib/{src/utils → utils}/debounce.d.ts +0 -0
- /package/lib/{src/utils → utils}/deepContains.d.ts +0 -0
- /package/lib/{src/utils → utils}/device.d.ts +0 -0
- /package/lib/{src/utils → utils}/environment.d.ts +0 -0
- /package/lib/{src/utils → utils}/focus.d.ts +0 -0
- /package/lib/{src/utils → utils}/language.d.ts +0 -0
- /package/lib/{src/utils → utils}/loremtext.d.ts +0 -0
- /package/lib/{src/utils → utils}/mobile.d.ts +0 -0
- /package/lib/{src/utils → utils}/refs.d.ts +0 -0
- /package/lib/{src/utils → utils}/scroll.d.ts +0 -0
- /package/lib/{src/utils → utils}/tests/setup-test.d.ts +0 -0
- /package/lib/{src/utils → utils}/uuid.d.ts +0 -0
- /package/lib/{src/utils → utils}/viewport.d.ts +0 -0
|
@@ -5,7 +5,7 @@ import { t as isComponent } from "../../component.js";
|
|
|
5
5
|
import { t as ChevronDown_default } from "../../ChevronDown.js";
|
|
6
6
|
import { t as ChevronUp_default } from "../../ChevronUp.js";
|
|
7
7
|
import { t as useExpand } from "../../useExpand.js";
|
|
8
|
-
import
|
|
8
|
+
import classNames from "classnames";
|
|
9
9
|
import React from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
import styles from "./expander.module.scss";
|
|
@@ -17,9 +17,9 @@ var ExpanderButton = ({ htmlMarkup = "h2", level = 1, print, expanded, onExpand,
|
|
|
17
17
|
setIsExpanded(!isExpanded);
|
|
18
18
|
};
|
|
19
19
|
const CustomTag = htmlMarkup;
|
|
20
|
-
const buttonClasses =
|
|
21
|
-
const titleClasses =
|
|
22
|
-
const iconClasses =
|
|
20
|
+
const buttonClasses = classNames(styles.expander__button, level > 1 && styles[`expander__button--2-and-lower`], print && styles["expander__button--print"]);
|
|
21
|
+
const titleClasses = classNames(styles.expander__title, (level === 1 || level === 2 || level === 3) && styles[`expander__title--${level}`], level > 3 && styles[`expander__title--4-and-lower`], isExpanded && styles["expander__title--expanded"], print && styles["expander__title--print"]);
|
|
22
|
+
const iconClasses = classNames(styles.expander__icon, level > 1 && styles[`expander__icon--2-and-lower`], level > 2 && styles[`expander__icon--3-and-lower`]);
|
|
23
23
|
return /* @__PURE__ */ jsx(CustomTag, {
|
|
24
24
|
className: titleClasses,
|
|
25
25
|
children: /* @__PURE__ */ jsxs("button", {
|
|
@@ -51,9 +51,9 @@ const getHeadingTag = (htmlMarkup) => {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
var Expander = ({ title, htmlMarkup = "h2", level = 1, print, expanded = false, onExpand, children, testId, className }) => {
|
|
54
|
-
const contentClasses =
|
|
54
|
+
const contentClasses = classNames(styles.expander__content, (level === 1 || level === 2) && styles[`expander__content--${level}`], level > 2 && styles[`expander__content--3-and-lower`]);
|
|
55
55
|
return /* @__PURE__ */ jsxs("li", {
|
|
56
|
-
className:
|
|
56
|
+
className: classNames(styles.expander, className),
|
|
57
57
|
children: [/* @__PURE__ */ jsx(ExpanderButton_default, {
|
|
58
58
|
htmlMarkup,
|
|
59
59
|
level,
|
|
@@ -75,7 +75,7 @@ var Expander = ({ title, htmlMarkup = "h2", level = 1, print, expanded = false,
|
|
|
75
75
|
var Expander_default = Expander;
|
|
76
76
|
var ExpanderHierarchy = ({ htmlMarkup = "h2", level = 1, print, children, testId }) => {
|
|
77
77
|
return /* @__PURE__ */ jsx("ul", {
|
|
78
|
-
className:
|
|
78
|
+
className: classNames(styles$1.expanderhierarchy, level === 2 && styles$1[`expanderhierarchy--${level}`], level > 2 && styles$1[`expanderhierarchy--3-and-lower`]),
|
|
79
79
|
"data-testid": testId,
|
|
80
80
|
"data-analyticsid": AnalyticsId.ExpanderHierarchy,
|
|
81
81
|
children: React.Children.map(children, (child) => isComponent(child, Expander_default) ? React.cloneElement(child, {
|
|
@@ -88,6 +88,6 @@ var ExpanderHierarchy = ({ htmlMarkup = "h2", level = 1, print, children, testId
|
|
|
88
88
|
ExpanderHierarchy.Expander = Expander_default;
|
|
89
89
|
var ExpanderHierarchy_default$1 = ExpanderHierarchy;
|
|
90
90
|
var ExpanderHierarchy_default = ExpanderHierarchy_default$1;
|
|
91
|
-
export { ExpanderHierarchy_default as default };
|
|
91
|
+
export { ExpanderHierarchy_default as default, getHeadingTag };
|
|
92
92
|
|
|
93
93
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ExpanderButton: React.FC<ExpanderButtonProps>","Expander: React.FC<ExpanderProps>","ExpanderHierarchy: ExpanderHierarchyCompound"],"sources":["../../../src/components/ExpanderHierarchy/ExpanderButton.tsx","../../../src/components/ExpanderHierarchy/utils.ts","../../../src/components/ExpanderHierarchy/Expander.tsx","../../../src/components/ExpanderHierarchy/ExpanderHierarchy.tsx","../../../src/components/ExpanderHierarchy/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { ExpanderHierarchyCommonProps } from '../ExpanderHierarchy';\n\nimport { AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport Icon, { IconSize } from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\n\nimport styles from './expander.module.scss';\n\ninterface ExpanderButtonProps extends ExpanderHierarchyCommonProps {\n expanded: boolean;\n onExpand?: (isExpanded: boolean) => void;\n children: string;\n testId?: string;\n}\n\nconst ExpanderButton: React.FC<ExpanderButtonProps> = ({ htmlMarkup = 'h2', level = 1, print, expanded, onExpand, children, testId }) => {\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>();\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n\n const handleClick = (): void => {\n setIsExpanded(!isExpanded);\n };\n\n const CustomTag = htmlMarkup;\n\n const buttonClasses = classNames(\n styles.expander__button,\n level > 1 && styles[`expander__button--2-and-lower`],\n print && styles['expander__button--print']\n );\n\n const titleClasses = classNames(\n styles.expander__title,\n (level === 1 || level === 2 || level === 3) && styles[`expander__title--${level}`],\n level > 3 && styles[`expander__title--4-and-lower`],\n isExpanded && styles['expander__title--expanded'],\n print && styles['expander__title--print']\n );\n\n const iconClasses = classNames(\n styles.expander__icon,\n level > 1 && styles[`expander__icon--2-and-lower`],\n level > 2 && styles[`expander__icon--3-and-lower`]\n );\n\n return (\n <CustomTag className={titleClasses}>\n <button\n type=\"button\"\n onClick={handleClick}\n className={buttonClasses}\n aria-expanded={isExpanded}\n ref={refObject}\n data-testid={testId}\n data-analyticsid={AnalyticsId.ExpanderHierarchyExpander}\n >\n {children}\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} className={iconClasses} size={IconSize.XSmall} />\n </button>\n </CustomTag>\n );\n};\n\nexport default ExpanderButton;\n","export type HeadingTags = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport const getHeadingTag = (htmlMarkup?: HeadingTags): HeadingTags => {\n switch (htmlMarkup) {\n case 'h2':\n return 'h3';\n case 'h3':\n return 'h4';\n case 'h4':\n return 'h5';\n case 'h5':\n return 'h6';\n case 'h6':\n return 'h6';\n default:\n return 'h2';\n }\n};\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ExpanderHierarchyCommonProps, ExpanderHierarchyProps } from './ExpanderHierarchy';\n\nimport ExpanderButton from './ExpanderButton';\nimport ExpanderHierarchy from './ExpanderHierarchy';\nimport { getHeadingTag } from './utils';\nimport { isComponent } from '../../utils/component';\n\nimport styles from './expander.module.scss';\n\nexport interface ExpanderProps extends ExpanderHierarchyCommonProps {\n /** Sets the trigger title */\n title: string;\n /** Opens or closes the expander */\n expanded?: boolean;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Sets the expanded content */\n children?: React.ReactNode;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n /** Adds custom classes to the element. */\n className?: string;\n}\n\nexport type ExpanderType = typeof Expander;\n\nconst Expander: React.FC<ExpanderProps> = ({\n title,\n htmlMarkup = 'h2',\n level = 1,\n print,\n expanded = false,\n onExpand,\n children,\n testId,\n className,\n}: ExpanderProps) => {\n const contentClasses = classNames(\n styles.expander__content,\n (level === 1 || level === 2) && styles[`expander__content--${level}`],\n level > 2 && styles[`expander__content--3-and-lower`]\n );\n\n return (\n <li className={classNames(styles.expander, className)}>\n <ExpanderButton htmlMarkup={htmlMarkup} level={level} print={print} expanded={expanded} onExpand={onExpand} testId={testId}>\n {title}\n </ExpanderButton>\n <div className={contentClasses}>\n {React.Children.map(children, child =>\n isComponent<ExpanderHierarchyProps>(child, ExpanderHierarchy)\n ? React.cloneElement(child, { htmlMarkup: getHeadingTag(htmlMarkup), level: level + 1, print })\n : child\n )}\n </div>\n </li>\n );\n};\n\nexport default Expander;\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ExpanderProps, ExpanderType } from './Expander';\nimport type { HeadingTags } from './utils';\n\nimport Expander from './Expander';\nimport { AnalyticsId } from '../../constants';\nimport { isComponent } from '../../utils/component';\n\nimport styles from './styles.module.scss';\n\nexport interface ExpanderHierarchyCommonProps {\n /** Changes the underlying element of the expander title. Default: h2. */\n htmlMarkup?: HeadingTags;\n /** Expand all children when printing. */\n print?: boolean;\n /** Expander nesting level. Should not be set manually. */\n level?: number;\n}\n\nexport interface ExpanderHierarchyProps extends ExpanderHierarchyCommonProps {\n children: React.ReactNode;\n /** Sets the data-testid attribute on the expander list. */\n testId?: string;\n}\n\nexport interface ExpanderHierarchyCompound extends React.FC<ExpanderHierarchyProps> {\n Expander: ExpanderType;\n}\n\nconst ExpanderHierarchy: ExpanderHierarchyCompound = ({\n htmlMarkup = 'h2',\n level = 1,\n print,\n children,\n testId,\n}: ExpanderHierarchyProps) => {\n const listClasses = classNames(\n styles.expanderhierarchy,\n level === 2 && styles[`expanderhierarchy--${level}`],\n level > 2 && styles[`expanderhierarchy--3-and-lower`]\n );\n\n return (\n <ul className={listClasses} data-testid={testId} data-analyticsid={AnalyticsId.ExpanderHierarchy}>\n {React.Children.map(children, child =>\n isComponent<ExpanderProps>(child, Expander) ? React.cloneElement(child, { htmlMarkup, level, print }) : child\n )}\n </ul>\n );\n};\n\nExpanderHierarchy.Expander = Expander;\n\nexport default ExpanderHierarchy;\n","import ExpanderHierarchy from './ExpanderHierarchy';\nexport * from './ExpanderHierarchy';\nexport default ExpanderHierarchy;\n"],"mappings":";;;;;;;;;;;;AAoBA,IAAMA,kBAAiD,EAAE,aAAa,MAAM,QAAQ,GAAG,OAAO,UAAU,UAAU,UAAU,aAAa;CACvI,MAAM,EAAE,WAAW,cAAc,kBAAqC;CACtE,MAAM,CAAC,YAAY,iBAAiB,UAAU,UAAU,SAAS;CAEjE,MAAM,oBAA0B;AAC9B,gBAAc,CAAC,WAAW;;CAG5B,MAAM,YAAY;CAElB,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"index.js","names":["ExpanderButton: React.FC<ExpanderButtonProps>","Expander: React.FC<ExpanderProps>","ExpanderHierarchy: ExpanderHierarchyCompound"],"sources":["../../../src/components/ExpanderHierarchy/ExpanderButton.tsx","../../../src/components/ExpanderHierarchy/utils.ts","../../../src/components/ExpanderHierarchy/Expander.tsx","../../../src/components/ExpanderHierarchy/ExpanderHierarchy.tsx","../../../src/components/ExpanderHierarchy/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { ExpanderHierarchyCommonProps } from '../ExpanderHierarchy';\n\nimport { AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport Icon, { IconSize } from '../Icon';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\n\nimport styles from './expander.module.scss';\n\ninterface ExpanderButtonProps extends ExpanderHierarchyCommonProps {\n expanded: boolean;\n onExpand?: (isExpanded: boolean) => void;\n children: string;\n testId?: string;\n}\n\nconst ExpanderButton: React.FC<ExpanderButtonProps> = ({ htmlMarkup = 'h2', level = 1, print, expanded, onExpand, children, testId }) => {\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>();\n const [isExpanded, setIsExpanded] = useExpand(expanded, onExpand);\n\n const handleClick = (): void => {\n setIsExpanded(!isExpanded);\n };\n\n const CustomTag = htmlMarkup;\n\n const buttonClasses = classNames(\n styles.expander__button,\n level > 1 && styles[`expander__button--2-and-lower`],\n print && styles['expander__button--print']\n );\n\n const titleClasses = classNames(\n styles.expander__title,\n (level === 1 || level === 2 || level === 3) && styles[`expander__title--${level}`],\n level > 3 && styles[`expander__title--4-and-lower`],\n isExpanded && styles['expander__title--expanded'],\n print && styles['expander__title--print']\n );\n\n const iconClasses = classNames(\n styles.expander__icon,\n level > 1 && styles[`expander__icon--2-and-lower`],\n level > 2 && styles[`expander__icon--3-and-lower`]\n );\n\n return (\n <CustomTag className={titleClasses}>\n <button\n type=\"button\"\n onClick={handleClick}\n className={buttonClasses}\n aria-expanded={isExpanded}\n ref={refObject}\n data-testid={testId}\n data-analyticsid={AnalyticsId.ExpanderHierarchyExpander}\n >\n {children}\n <Icon svgIcon={isExpanded ? ChevronUp : ChevronDown} isHovered={isHovered} className={iconClasses} size={IconSize.XSmall} />\n </button>\n </CustomTag>\n );\n};\n\nexport default ExpanderButton;\n","export type HeadingTags = 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n\nexport const getHeadingTag = (htmlMarkup?: HeadingTags): HeadingTags => {\n switch (htmlMarkup) {\n case 'h2':\n return 'h3';\n case 'h3':\n return 'h4';\n case 'h4':\n return 'h5';\n case 'h5':\n return 'h6';\n case 'h6':\n return 'h6';\n default:\n return 'h2';\n }\n};\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ExpanderHierarchyCommonProps, ExpanderHierarchyProps } from './ExpanderHierarchy';\n\nimport ExpanderButton from './ExpanderButton';\nimport ExpanderHierarchy from './ExpanderHierarchy';\nimport { getHeadingTag } from './utils';\nimport { isComponent } from '../../utils/component';\n\nimport styles from './expander.module.scss';\n\nexport interface ExpanderProps extends ExpanderHierarchyCommonProps {\n /** Sets the trigger title */\n title: string;\n /** Opens or closes the expander */\n expanded?: boolean;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Sets the expanded content */\n children?: React.ReactNode;\n /** Sets the data-testid attribute on the expander button. */\n testId?: string;\n /** Adds custom classes to the element. */\n className?: string;\n}\n\nexport type ExpanderType = typeof Expander;\n\nconst Expander: React.FC<ExpanderProps> = ({\n title,\n htmlMarkup = 'h2',\n level = 1,\n print,\n expanded = false,\n onExpand,\n children,\n testId,\n className,\n}: ExpanderProps) => {\n const contentClasses = classNames(\n styles.expander__content,\n (level === 1 || level === 2) && styles[`expander__content--${level}`],\n level > 2 && styles[`expander__content--3-and-lower`]\n );\n\n return (\n <li className={classNames(styles.expander, className)}>\n <ExpanderButton htmlMarkup={htmlMarkup} level={level} print={print} expanded={expanded} onExpand={onExpand} testId={testId}>\n {title}\n </ExpanderButton>\n <div className={contentClasses}>\n {React.Children.map(children, child =>\n isComponent<ExpanderHierarchyProps>(child, ExpanderHierarchy)\n ? React.cloneElement(child, { htmlMarkup: getHeadingTag(htmlMarkup), level: level + 1, print })\n : child\n )}\n </div>\n </li>\n );\n};\n\nexport default Expander;\n","import React from 'react';\n\nimport classNames from 'classnames';\n\nimport type { ExpanderProps, ExpanderType } from './Expander';\nimport type { HeadingTags } from './utils';\n\nimport Expander from './Expander';\nimport { AnalyticsId } from '../../constants';\nimport { isComponent } from '../../utils/component';\n\nimport styles from './styles.module.scss';\n\nexport interface ExpanderHierarchyCommonProps {\n /** Changes the underlying element of the expander title. Default: h2. */\n htmlMarkup?: HeadingTags;\n /** Expand all children when printing. */\n print?: boolean;\n /** Expander nesting level. Should not be set manually. */\n level?: number;\n}\n\nexport interface ExpanderHierarchyProps extends ExpanderHierarchyCommonProps {\n children: React.ReactNode;\n /** Sets the data-testid attribute on the expander list. */\n testId?: string;\n}\n\nexport interface ExpanderHierarchyCompound extends React.FC<ExpanderHierarchyProps> {\n Expander: ExpanderType;\n}\n\nconst ExpanderHierarchy: ExpanderHierarchyCompound = ({\n htmlMarkup = 'h2',\n level = 1,\n print,\n children,\n testId,\n}: ExpanderHierarchyProps) => {\n const listClasses = classNames(\n styles.expanderhierarchy,\n level === 2 && styles[`expanderhierarchy--${level}`],\n level > 2 && styles[`expanderhierarchy--3-and-lower`]\n );\n\n return (\n <ul className={listClasses} data-testid={testId} data-analyticsid={AnalyticsId.ExpanderHierarchy}>\n {React.Children.map(children, child =>\n isComponent<ExpanderProps>(child, Expander) ? React.cloneElement(child, { htmlMarkup, level, print }) : child\n )}\n </ul>\n );\n};\n\nExpanderHierarchy.Expander = Expander;\n\nexport default ExpanderHierarchy;\n","import ExpanderHierarchy from './ExpanderHierarchy';\nexport * from './ExpanderHierarchy';\nexport * from './utils';\nexport default ExpanderHierarchy;\n"],"mappings":";;;;;;;;;;;;AAoBA,IAAMA,kBAAiD,EAAE,aAAa,MAAM,QAAQ,GAAG,OAAO,UAAU,UAAU,UAAU,aAAa;CACvI,MAAM,EAAE,WAAW,cAAc,kBAAqC;CACtE,MAAM,CAAC,YAAY,iBAAiB,UAAU,UAAU,SAAS;CAEjE,MAAM,oBAA0B;AAC9B,gBAAc,CAAC,WAAW;;CAG5B,MAAM,YAAY;CAElB,MAAM,gBAAgB,WACpB,OAAO,kBACP,QAAQ,KAAK,OAAO,kCACpB,SAAS,OAAO,2BACjB;CAED,MAAM,eAAe,WACnB,OAAO,kBACN,UAAU,KAAK,UAAU,KAAK,UAAU,MAAM,OAAO,oBAAoB,UAC1E,QAAQ,KAAK,OAAO,iCACpB,cAAc,OAAO,8BACrB,SAAS,OAAO,0BACjB;CAED,MAAM,cAAc,WAClB,OAAO,gBACP,QAAQ,KAAK,OAAO,gCACpB,QAAQ,KAAK,OAAO,+BACrB;AAED,QACE,oBAAC,WAAA;EAAU,WAAW;YACpB,qBAAC,UAAA;GACC,MAAK;GACL,SAAS;GACT,WAAW;GACX,iBAAe;GACf,KAAK;GACL,eAAa;GACb,oBAAkB,YAAY;cAE7B,UACD,oBAAC,cAAA;IAAK,SAAS,aAAa,oBAAY;IAAwB;IAAW,WAAW;IAAa,MAAM,SAAS;KAAU,CAAA;IACrH;GACC;;AAIhB,IAAA,yBAAe;AClEf,MAAa,iBAAiB,eAA0C;AACtE,SAAQ,YAAR;EACE,KAAK,KACH,QAAO;EACT,KAAK,KACH,QAAO;EACT,KAAK,KACH,QAAO;EACT,KAAK,KACH,QAAO;EACT,KAAK,KACH,QAAO;EACT,QACE,QAAO;;;ACeb,IAAMC,YAAqC,EACzC,OACA,aAAa,MACb,QAAQ,GACR,OACA,WAAW,OACX,UACA,UACA,QACA,gBACmB;CACnB,MAAM,iBAAiB,WACrB,OAAO,oBACN,UAAU,KAAK,UAAU,MAAM,OAAO,sBAAsB,UAC7D,QAAQ,KAAK,OAAO,kCACrB;AAED,QACE,qBAAC,MAAA;EAAG,WAAW,WAAW,OAAO,UAAU,UAAU;aACnD,oBAAC,wBAAA;GAA2B;GAAmB;GAAc;GAAiB;GAAoB;GAAkB;aACjH;IACc,EACjB,oBAAC,OAAA;GAAI,WAAW;aACb,MAAM,SAAS,IAAI,WAAU,UAC5B,YAAoC,OAAO,4BAAkB,GACzD,MAAM,aAAa,OAAO;IAAE,YAAY,cAAc,WAAW;IAAE,OAAO,QAAQ;IAAG;IAAO,CAAC,GAC7F,MACL;IACG,CAAA;GACH;;AAIT,IAAA,mBAAe;AC/Bf,IAAMC,qBAAgD,EACpD,aAAa,MACb,QAAQ,GACR,OACA,UACA,aAC4B;AAO5B,QACE,oBAAC,MAAA;EAAG,WAPc,WAClB,SAAO,mBACP,UAAU,KAAK,SAAO,sBAAsB,UAC5C,QAAQ,KAAK,SAAO,kCACrB;EAG6B,eAAa;EAAQ,oBAAkB,YAAY;YAC5E,MAAM,SAAS,IAAI,WAAU,UAC5B,YAA2B,OAAO,iBAAS,GAAG,MAAM,aAAa,OAAO;GAAE;GAAY;GAAO;GAAO,CAAC,GAAG,MACzG;GACE;;AAIT,kBAAkB,WAAW;AAE7B,IAAA,8BAAe;ACrDf,IAAA,4BAAe"}
|
|
@@ -4,12 +4,11 @@ import { n as mergeRefs } from "../../refs.js";
|
|
|
4
4
|
import { t as ChevronDown_default } from "../../ChevronDown.js";
|
|
5
5
|
import { t as ChevronUp_default } from "../../ChevronUp.js";
|
|
6
6
|
import { t as Highlighter_default } from "../../Highlighter.js";
|
|
7
|
-
import {
|
|
7
|
+
import { i as renderElementHeader } from "../../ElementHeader.js";
|
|
8
8
|
import { t as useExpand } from "../../useExpand.js";
|
|
9
9
|
import { t as isElementInViewport } from "../../viewport.js";
|
|
10
|
-
import { t as ListEditMode_default } from "../../ListEditMode.js";
|
|
11
|
-
import
|
|
12
|
-
import cn from "classnames";
|
|
10
|
+
import { n as listEditModeWrapperClassnames, t as ListEditMode_default } from "../../ListEditMode.js";
|
|
11
|
+
import classNames from "classnames";
|
|
13
12
|
import React, { useEffect, useId, useRef, useState } from "react";
|
|
14
13
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
15
14
|
import expanderListStyles from "./styles.module.scss";
|
|
@@ -23,7 +22,7 @@ const Expander = (props) => {
|
|
|
23
22
|
const isFillNegative = variant === "fill-negative";
|
|
24
23
|
const isOutline = variant === "outline";
|
|
25
24
|
const isLine = variant === "line";
|
|
26
|
-
const itemClasses =
|
|
25
|
+
const itemClasses = classNames(className, expanderListStyles["expander-list__item"], {
|
|
27
26
|
[expanderListStyles[`expander-list__item--fill`]]: isFill,
|
|
28
27
|
[expanderListStyles[`expander-list__item--fill--${color}`]]: isFill,
|
|
29
28
|
[expanderListStyles[`expander-list__item--fill-negative`]]: isFillNegative,
|
|
@@ -34,7 +33,7 @@ const Expander = (props) => {
|
|
|
34
33
|
[expanderListStyles[`expander-list__item--line--${color}`]]: isLine,
|
|
35
34
|
[expanderListStyles[`expander-list__item--new`]]: status === "new"
|
|
36
35
|
});
|
|
37
|
-
const expanderClasses =
|
|
36
|
+
const expanderClasses = classNames(expanderListStyles["expander-list-link"], expanderListStyles[`expander-list-link--${color}`], {
|
|
38
37
|
[expanderListStyles[`expander-list-link--fill--${color}`]]: isFill,
|
|
39
38
|
[expanderListStyles[`expander-list-link--fill-negative`]]: isFillNegative,
|
|
40
39
|
[expanderListStyles[`expander-list-link--fill-negative--${color}`]]: isFillNegative,
|
|
@@ -48,7 +47,7 @@ const Expander = (props) => {
|
|
|
48
47
|
const renderContent = () => {
|
|
49
48
|
if (!renderChildrenWhenClosed && !isExpanded) return null;
|
|
50
49
|
return /* @__PURE__ */ jsx("div", {
|
|
51
|
-
className:
|
|
50
|
+
className: classNames(expanderListStyles["expander-list-link__main-content"], {
|
|
52
51
|
[expanderListStyles["expander-list-link__main-content--expanded"]]: isExpanded,
|
|
53
52
|
[expanderListStyles["expander-list-link__main-content--padding"]]: padding,
|
|
54
53
|
[expanderListStyles[`expander-list-link__main-content--outline--${color}`]]: isOutline,
|
|
@@ -61,7 +60,7 @@ const Expander = (props) => {
|
|
|
61
60
|
})
|
|
62
61
|
});
|
|
63
62
|
};
|
|
64
|
-
const statusMarkerClasses =
|
|
63
|
+
const statusMarkerClasses = classNames(expanderListStyles["expander-list__item__status-marker"], { [expanderListStyles["expander-list__item__status-marker--new"]]: status === "new" });
|
|
65
64
|
return /* @__PURE__ */ jsx(Fragment, { children: editMode ? /* @__PURE__ */ jsxs("div", {
|
|
66
65
|
className: itemClasses,
|
|
67
66
|
children: [status !== "none" && /* @__PURE__ */ jsx("div", { className: statusMarkerClasses }), /* @__PURE__ */ jsx("div", {
|
|
@@ -114,7 +113,7 @@ var ExpanderListComponent = (props) => {
|
|
|
114
113
|
const [activeExpander, setActiveExpander] = useState();
|
|
115
114
|
const [latestExpander, setLatestExpander] = useState();
|
|
116
115
|
const expanderIdBase = useId();
|
|
117
|
-
const expanderListClasses =
|
|
116
|
+
const expanderListClasses = classNames(expanderListStyles["expander-list"], className, {
|
|
118
117
|
[expanderListStyles[`expander-list--outline--${color}`]]: variant === "outline",
|
|
119
118
|
[expanderListStyles[`expander-list--fill`]]: variant === "fill" || variant === "fill-negative",
|
|
120
119
|
[listEditModeWrapperClassnames]: editMode
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Expander: ExpanderType","ExpanderListComponent: React.FC<ExpanderListProps>","highlightTextChild: string | undefined"],"sources":["../../../src/components/ExpanderList/ExpanderList.tsx","../../../src/components/ExpanderList/index.ts"],"sourcesContent":["import React, { useEffect, useId, useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { PaletteNames } from '../../theme/palette';\nimport type { ElementHeaderType } from '../ElementHeader/ElementHeader';\nimport type { ListEditModeItemProps } from '../ListEditMode';\nimport type { TitleTags } from '../Title';\n\nimport { AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport { isElementInViewport } from '../../utils/viewport';\nimport { renderElementHeader } from '../ElementHeader/utils';\nimport Highlighter from '../Highlighter';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport ListEditModeItem from '../ListEditMode';\nimport { listEditModeWrapperClassnames } from '../ListEditMode/constants';\n\nimport expanderListStyles from './styles.module.scss';\n\nexport type ExpanderListColors = Extract<PaletteNames, 'white' | 'blueberry' | 'cherry' | 'neutral'>;\nexport interface ExpanderType extends React.FC<ExpanderProps> {\n ElementHeader?: ElementHeaderType;\n}\n\nexport interface ExpanderListCompound extends React.FC<ExpanderListProps> {\n Expander: ExpanderType;\n}\n\nexport type ExpanderListVariant = 'line' | 'outline' | 'fill' | 'fill-negative';\n\nexport type ExpanderListStatus = 'none' | 'new';\n\ninterface ExpanderListProps {\n /** Toggles accordion functionality for the expanders. */\n accordion?: boolean;\n /** Items in the ExpanderList */\n children: React.ReactNode;\n /** Toggles padding of child elements */\n childPadding?: boolean;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the colors of the list. */\n color?: ExpanderListColors;\n /** Changes the font size. */\n large?: boolean;\n /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */\n renderChildrenWhenClosed?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets visual priority */\n variant?: ExpanderListVariant;\n /** Overrides the default z-index of the expander header */\n zIndex?: number;\n /** Highlights text in title and content. Used for search results */\n highlightText?: string;\n /**\n * @experimental This prop is experimental and may change in the future.\n * Enables ListEditMode\n */\n editMode?: boolean;\n /** Ref passed to the ul element */\n ref?: React.Ref<HTMLUListElement | null>;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\ntype ExpanderProps = Modify<\n React.HTMLAttributes<HTMLButtonElement>,\n {\n id?: string;\n title: React.ReactElement | string;\n /** Changes the underlying element of the title. Default: span*/\n titleHtmlMarkup?: TitleTags;\n children: React.ReactNode;\n className?: string;\n color?: ExpanderListColors;\n icon?: React.ReactElement;\n padding?: boolean;\n expanded?: boolean;\n large?: boolean;\n testId?: string;\n handleExpanderClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Overrides the default z-index of the expander header */\n zIndex?: number;\n /** Highlights text in title and content. Override if different from list. */\n highlightText?: string;\n /** Displays a status on the left side: default none */\n status?: ExpanderListStatus;\n /** Ref passed to the li element */\n ref?: React.Ref<HTMLLIElement | null>;\n }\n> &\n Pick<ExpanderListProps, 'renderChildrenWhenClosed' | 'variant'> &\n ListEditModeItemProps;\n\nexport const Expander: ExpanderType = (props: ExpanderProps) => {\n const {\n id,\n children,\n padding = true,\n color = 'neutral',\n className = '',\n icon,\n large = false,\n title,\n titleHtmlMarkup = 'span',\n expanded = false,\n testId,\n handleExpanderClick,\n onExpand,\n renderChildrenWhenClosed,\n variant = 'line',\n zIndex = 0,\n highlightText,\n status = 'none',\n editMode = false,\n ref,\n } = props;\n const [isExpanded] = useExpand(expanded, onExpand);\n const expanderRef = useRef<HTMLLIElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const { isHovered, isFocused } = usePseudoClasses(triggerRef);\n\n const isFill = variant === 'fill';\n const isFillNegative = variant === 'fill-negative';\n const isOutline = variant === 'outline';\n const isLine = variant === 'line';\n\n const itemClasses = classNames(className, expanderListStyles['expander-list__item'], {\n [expanderListStyles[`expander-list__item--fill`]]: isFill,\n [expanderListStyles[`expander-list__item--fill--${color}`]]: isFill,\n [expanderListStyles[`expander-list__item--fill-negative`]]: isFillNegative,\n [expanderListStyles[`expander-list__item--fill-negative--${color}`]]: isFillNegative,\n [expanderListStyles['expander-list__item--outline']]: isOutline,\n [expanderListStyles[`expander-list__item--outline--${color}`]]: isOutline,\n [expanderListStyles['expander-list__item--line']]: isLine,\n [expanderListStyles[`expander-list__item--line--${color}`]]: isLine,\n [expanderListStyles[`expander-list__item--new`]]: status === 'new',\n });\n\n const expanderClasses = classNames(expanderListStyles['expander-list-link'], expanderListStyles[`expander-list-link--${color}`], {\n [expanderListStyles[`expander-list-link--fill--${color}`]]: isFill,\n [expanderListStyles[`expander-list-link--fill-negative`]]: isFillNegative,\n [expanderListStyles[`expander-list-link--fill-negative--${color}`]]: isFillNegative,\n [expanderListStyles['expander-list-link--outline']]: isOutline,\n [expanderListStyles[`expander-list-link--outline--${color}`]]: isOutline,\n [expanderListStyles[`expander-list-link--line--${color}`]]: isLine,\n [expanderListStyles['expander-list-link--open']]: isExpanded,\n [expanderListStyles['expander-list-link--large']]: large,\n [expanderListStyles[`expander-list-link--new`]]: status === 'new',\n });\n\n const renderContent = (): React.ReactNode => {\n if (!renderChildrenWhenClosed && !isExpanded) {\n return null;\n }\n\n const mainContentClasses = classNames(expanderListStyles['expander-list-link__main-content'], {\n [expanderListStyles['expander-list-link__main-content--expanded']]: isExpanded,\n [expanderListStyles['expander-list-link__main-content--padding']]: padding,\n [expanderListStyles[`expander-list-link__main-content--outline--${color}`]]: isOutline,\n [expanderListStyles[`expander-list-link__main-content--new`]]: status === 'new',\n });\n\n return (\n <div className={mainContentClasses} data-state={isExpanded ? 'open' : 'closed'}>\n <Highlighter searchText={highlightText}>{children}</Highlighter>\n </div>\n );\n };\n\n const statusMarkerClasses = classNames(expanderListStyles['expander-list__item__status-marker'], {\n [expanderListStyles['expander-list__item__status-marker--new']]: status === 'new',\n });\n\n return (\n <>\n {editMode ? (\n <div className={itemClasses}>\n {status !== 'none' && <div className={statusMarkerClasses}></div>}\n <div id={id} data-testid={testId} data-analyticsid={AnalyticsId.ExpanderListExpander} className={expanderClasses}>\n {renderElementHeader(title, {\n titleHtmlMarkup,\n isHovered: false,\n size: large ? 'large' : 'medium',\n parentType: 'expanderlist',\n chevronIcon: undefined,\n icon,\n highlightText,\n })}\n </div>\n </div>\n ) : (\n <li className={itemClasses} ref={mergeRefs([ref, expanderRef])}>\n {status !== 'none' && <div className={statusMarkerClasses}></div>}\n <button\n type=\"button\"\n id={id}\n onClick={handleExpanderClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.ExpanderListExpander}\n className={expanderClasses}\n ref={triggerRef}\n aria-expanded={isExpanded}\n style={{\n zIndex: isFocused ? zIndex + 1 : zIndex,\n }}\n >\n {renderElementHeader(title, {\n titleHtmlMarkup,\n isHovered: isHovered || isFocused,\n size: large ? 'large' : 'medium',\n parentType: 'expanderlist',\n chevronIcon: isExpanded ? ChevronUp : ChevronDown,\n icon,\n highlightText,\n })}\n </button>\n {renderContent()}\n </li>\n )}\n </>\n );\n};\n\ntype ActiveExpander = Record<string, boolean>;\n\nconst isExpanderComponent = (element: unknown | null | undefined): element is React.ReactElement<ExpanderProps> =>\n React.isValidElement<ExpanderProps>(element) && (element as React.ReactElement).type === Expander;\n\nconst ExpanderListComponent: React.FC<ExpanderListProps> = (props: ExpanderListProps) => {\n const {\n children,\n childPadding = true,\n large,\n renderChildrenWhenClosed = false,\n color = 'white',\n className = '',\n accordion = false,\n testId,\n variant,\n zIndex,\n highlightText,\n editMode = false,\n ref,\n } = props;\n const [activeExpander, setActiveExpander] = useState<ActiveExpander>();\n const [latestExpander, setLatestExpander] = useState<HTMLElement>();\n const expanderIdBase = useId();\n const expanderListClasses = classNames(expanderListStyles['expander-list'], className, {\n [expanderListStyles[`expander-list--outline--${color}`]]: variant === 'outline',\n [expanderListStyles[`expander-list--fill`]]: variant === 'fill' || variant === 'fill-negative',\n [listEditModeWrapperClassnames]: editMode,\n });\n\n function handleExpanderClick(event: React.MouseEvent<HTMLElement, MouseEvent>, id: string): void {\n setActiveExpander(prevState => (accordion ? { [id]: !prevState?.[id] } : { ...prevState, [id]: !prevState?.[id] }));\n setLatestExpander(event.currentTarget);\n }\n\n const getExpanderId = (index: number): string => `${expanderIdBase}-${index}`;\n\n useEffect(() => {\n if (accordion && latestExpander && !isElementInViewport(latestExpander)) {\n latestExpander.scrollIntoView();\n }\n }, [accordion, latestExpander]);\n\n useEffect(() => {\n const newActiveExpander = React.Children.map(children, child => {\n if (isExpanderComponent(child)) {\n return child;\n }\n })?.reduce((acc, child, index) => {\n // Expanded-status skal bare settes dersom prop er satt av den som bruker komponenten\n if (typeof child.props.expanded !== 'undefined') {\n acc[getExpanderId(index)] = child.props.expanded;\n }\n return acc;\n }, {} as ActiveExpander);\n\n setActiveExpander({ ...activeExpander, ...newActiveExpander });\n }, [children]);\n\n return (\n <ul className={expanderListClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.ExpanderList}>\n {React.Children.map(children, (child, index) => {\n if (isExpanderComponent(child)) {\n const id = getExpanderId(index);\n const expanded = activeExpander?.[id];\n const highlightTextChild: string | undefined = child.props.highlightText || highlightText;\n\n if (editMode) {\n return (\n <ListEditModeItem color={color} variant={variant} onDelete={child.props.onDelete}>\n {React.cloneElement(child, {\n id,\n key: index,\n expanded,\n padding: childPadding,\n color,\n large,\n 'aria-expanded': false,\n className: expanderListStyles['expander-list__item'],\n renderChildrenWhenClosed: false,\n variant,\n zIndex: zIndex,\n highlightText: highlightTextChild,\n editMode: true,\n })}\n </ListEditModeItem>\n );\n } else {\n return React.cloneElement(child as React.ReactElement<ExpanderProps>, {\n id,\n key: index,\n expanded,\n padding: childPadding,\n color,\n large,\n 'aria-expanded': expanded,\n className: expanderListStyles['expander-list__item'],\n handleExpanderClick: (event: React.MouseEvent<HTMLElement>) => handleExpanderClick(event, `${expanderIdBase}-${index}`),\n renderChildrenWhenClosed,\n variant,\n zIndex: zIndex,\n highlightText: highlightTextChild,\n });\n }\n }\n return child;\n })}\n </ul>\n );\n};\n\nconst ExpanderList = ExpanderListComponent as ExpanderListCompound;\n\nExpanderList.displayName = 'ExpanderList';\nExpanderList.Expander = Expander;\nExpander.displayName = 'ExpanderList.Expander';\n\nexport default ExpanderList;\n","import ExpanderList from './ExpanderList';\nexport * from './ExpanderList';\nexport default ExpanderList;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["Expander: ExpanderType","ExpanderListComponent: React.FC<ExpanderListProps>","highlightTextChild: string | undefined"],"sources":["../../../src/components/ExpanderList/ExpanderList.tsx","../../../src/components/ExpanderList/index.ts"],"sourcesContent":["import React, { useEffect, useId, useRef, useState } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { PaletteNames } from '../../theme/palette';\nimport type { ElementHeaderType } from '../ElementHeader/ElementHeader';\nimport type { ListEditModeItemProps } from '../ListEditMode';\nimport type { TitleTags } from '../Title';\n\nimport { AnalyticsId } from '../../constants';\nimport { useExpand } from '../../hooks/useExpand';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { mergeRefs } from '../../utils/refs';\nimport { isElementInViewport } from '../../utils/viewport';\nimport { renderElementHeader } from '../ElementHeader/utils';\nimport Highlighter from '../Highlighter';\nimport ChevronDown from '../Icons/ChevronDown';\nimport ChevronUp from '../Icons/ChevronUp';\nimport ListEditModeItem from '../ListEditMode';\nimport { listEditModeWrapperClassnames } from '../ListEditMode/constants';\n\nimport expanderListStyles from './styles.module.scss';\n\nexport type ExpanderListColors = Extract<PaletteNames, 'white' | 'blueberry' | 'cherry' | 'neutral'>;\nexport interface ExpanderType extends React.FC<ExpanderProps> {\n ElementHeader?: ElementHeaderType;\n}\n\nexport interface ExpanderListCompound extends React.FC<ExpanderListProps> {\n Expander: ExpanderType;\n}\n\nexport type ExpanderListVariant = 'line' | 'outline' | 'fill' | 'fill-negative';\n\nexport type ExpanderListStatus = 'none' | 'new';\n\ninterface ExpanderListProps {\n /** Toggles accordion functionality for the expanders. */\n accordion?: boolean;\n /** Items in the ExpanderList */\n children: React.ReactNode;\n /** Toggles padding of child elements */\n childPadding?: boolean;\n /** Adds custom classes to the element. */\n className?: string;\n /** Changes the colors of the list. */\n color?: ExpanderListColors;\n /** Changes the font size. */\n large?: boolean;\n /** Whether to render children when closed (in which case they are hidden with CSS). Default: false */\n renderChildrenWhenClosed?: boolean;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets visual priority */\n variant?: ExpanderListVariant;\n /** Overrides the default z-index of the expander header */\n zIndex?: number;\n /** Highlights text in title and content. Used for search results */\n highlightText?: string;\n /**\n * @experimental This prop is experimental and may change in the future.\n * Enables ListEditMode\n */\n editMode?: boolean;\n /** Ref passed to the ul element */\n ref?: React.Ref<HTMLUListElement | null>;\n}\n\ntype Modify<T, R> = Omit<T, keyof R> & R;\n\ntype ExpanderProps = Modify<\n React.HTMLAttributes<HTMLButtonElement>,\n {\n id?: string;\n title: React.ReactElement | string;\n /** Changes the underlying element of the title. Default: span*/\n titleHtmlMarkup?: TitleTags;\n children: React.ReactNode;\n className?: string;\n color?: ExpanderListColors;\n icon?: React.ReactElement;\n padding?: boolean;\n expanded?: boolean;\n large?: boolean;\n testId?: string;\n handleExpanderClick?: (event: React.MouseEvent<HTMLElement, MouseEvent>) => void;\n /** Called when expander is open/closed. */\n onExpand?: (isExpanded: boolean) => void;\n /** Overrides the default z-index of the expander header */\n zIndex?: number;\n /** Highlights text in title and content. Override if different from list. */\n highlightText?: string;\n /** Displays a status on the left side: default none */\n status?: ExpanderListStatus;\n /** Ref passed to the li element */\n ref?: React.Ref<HTMLLIElement | null>;\n }\n> &\n Pick<ExpanderListProps, 'renderChildrenWhenClosed' | 'variant'> &\n ListEditModeItemProps;\n\nexport const Expander: ExpanderType = (props: ExpanderProps) => {\n const {\n id,\n children,\n padding = true,\n color = 'neutral',\n className = '',\n icon,\n large = false,\n title,\n titleHtmlMarkup = 'span',\n expanded = false,\n testId,\n handleExpanderClick,\n onExpand,\n renderChildrenWhenClosed,\n variant = 'line',\n zIndex = 0,\n highlightText,\n status = 'none',\n editMode = false,\n ref,\n } = props;\n const [isExpanded] = useExpand(expanded, onExpand);\n const expanderRef = useRef<HTMLLIElement>(null);\n const triggerRef = useRef<HTMLButtonElement>(null);\n const { isHovered, isFocused } = usePseudoClasses(triggerRef);\n\n const isFill = variant === 'fill';\n const isFillNegative = variant === 'fill-negative';\n const isOutline = variant === 'outline';\n const isLine = variant === 'line';\n\n const itemClasses = classNames(className, expanderListStyles['expander-list__item'], {\n [expanderListStyles[`expander-list__item--fill`]]: isFill,\n [expanderListStyles[`expander-list__item--fill--${color}`]]: isFill,\n [expanderListStyles[`expander-list__item--fill-negative`]]: isFillNegative,\n [expanderListStyles[`expander-list__item--fill-negative--${color}`]]: isFillNegative,\n [expanderListStyles['expander-list__item--outline']]: isOutline,\n [expanderListStyles[`expander-list__item--outline--${color}`]]: isOutline,\n [expanderListStyles['expander-list__item--line']]: isLine,\n [expanderListStyles[`expander-list__item--line--${color}`]]: isLine,\n [expanderListStyles[`expander-list__item--new`]]: status === 'new',\n });\n\n const expanderClasses = classNames(expanderListStyles['expander-list-link'], expanderListStyles[`expander-list-link--${color}`], {\n [expanderListStyles[`expander-list-link--fill--${color}`]]: isFill,\n [expanderListStyles[`expander-list-link--fill-negative`]]: isFillNegative,\n [expanderListStyles[`expander-list-link--fill-negative--${color}`]]: isFillNegative,\n [expanderListStyles['expander-list-link--outline']]: isOutline,\n [expanderListStyles[`expander-list-link--outline--${color}`]]: isOutline,\n [expanderListStyles[`expander-list-link--line--${color}`]]: isLine,\n [expanderListStyles['expander-list-link--open']]: isExpanded,\n [expanderListStyles['expander-list-link--large']]: large,\n [expanderListStyles[`expander-list-link--new`]]: status === 'new',\n });\n\n const renderContent = (): React.ReactNode => {\n if (!renderChildrenWhenClosed && !isExpanded) {\n return null;\n }\n\n const mainContentClasses = classNames(expanderListStyles['expander-list-link__main-content'], {\n [expanderListStyles['expander-list-link__main-content--expanded']]: isExpanded,\n [expanderListStyles['expander-list-link__main-content--padding']]: padding,\n [expanderListStyles[`expander-list-link__main-content--outline--${color}`]]: isOutline,\n [expanderListStyles[`expander-list-link__main-content--new`]]: status === 'new',\n });\n\n return (\n <div className={mainContentClasses} data-state={isExpanded ? 'open' : 'closed'}>\n <Highlighter searchText={highlightText}>{children}</Highlighter>\n </div>\n );\n };\n\n const statusMarkerClasses = classNames(expanderListStyles['expander-list__item__status-marker'], {\n [expanderListStyles['expander-list__item__status-marker--new']]: status === 'new',\n });\n\n return (\n <>\n {editMode ? (\n <div className={itemClasses}>\n {status !== 'none' && <div className={statusMarkerClasses}></div>}\n <div id={id} data-testid={testId} data-analyticsid={AnalyticsId.ExpanderListExpander} className={expanderClasses}>\n {renderElementHeader(title, {\n titleHtmlMarkup,\n isHovered: false,\n size: large ? 'large' : 'medium',\n parentType: 'expanderlist',\n chevronIcon: undefined,\n icon,\n highlightText,\n })}\n </div>\n </div>\n ) : (\n <li className={itemClasses} ref={mergeRefs([ref, expanderRef])}>\n {status !== 'none' && <div className={statusMarkerClasses}></div>}\n <button\n type=\"button\"\n id={id}\n onClick={handleExpanderClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.ExpanderListExpander}\n className={expanderClasses}\n ref={triggerRef}\n aria-expanded={isExpanded}\n style={{\n zIndex: isFocused ? zIndex + 1 : zIndex,\n }}\n >\n {renderElementHeader(title, {\n titleHtmlMarkup,\n isHovered: isHovered || isFocused,\n size: large ? 'large' : 'medium',\n parentType: 'expanderlist',\n chevronIcon: isExpanded ? ChevronUp : ChevronDown,\n icon,\n highlightText,\n })}\n </button>\n {renderContent()}\n </li>\n )}\n </>\n );\n};\n\ntype ActiveExpander = Record<string, boolean>;\n\nconst isExpanderComponent = (element: unknown | null | undefined): element is React.ReactElement<ExpanderProps> =>\n React.isValidElement<ExpanderProps>(element) && (element as React.ReactElement).type === Expander;\n\nconst ExpanderListComponent: React.FC<ExpanderListProps> = (props: ExpanderListProps) => {\n const {\n children,\n childPadding = true,\n large,\n renderChildrenWhenClosed = false,\n color = 'white',\n className = '',\n accordion = false,\n testId,\n variant,\n zIndex,\n highlightText,\n editMode = false,\n ref,\n } = props;\n const [activeExpander, setActiveExpander] = useState<ActiveExpander>();\n const [latestExpander, setLatestExpander] = useState<HTMLElement>();\n const expanderIdBase = useId();\n const expanderListClasses = classNames(expanderListStyles['expander-list'], className, {\n [expanderListStyles[`expander-list--outline--${color}`]]: variant === 'outline',\n [expanderListStyles[`expander-list--fill`]]: variant === 'fill' || variant === 'fill-negative',\n [listEditModeWrapperClassnames]: editMode,\n });\n\n function handleExpanderClick(event: React.MouseEvent<HTMLElement, MouseEvent>, id: string): void {\n setActiveExpander(prevState => (accordion ? { [id]: !prevState?.[id] } : { ...prevState, [id]: !prevState?.[id] }));\n setLatestExpander(event.currentTarget);\n }\n\n const getExpanderId = (index: number): string => `${expanderIdBase}-${index}`;\n\n useEffect(() => {\n if (accordion && latestExpander && !isElementInViewport(latestExpander)) {\n latestExpander.scrollIntoView();\n }\n }, [accordion, latestExpander]);\n\n useEffect(() => {\n const newActiveExpander = React.Children.map(children, child => {\n if (isExpanderComponent(child)) {\n return child;\n }\n })?.reduce((acc, child, index) => {\n // Expanded-status skal bare settes dersom prop er satt av den som bruker komponenten\n if (typeof child.props.expanded !== 'undefined') {\n acc[getExpanderId(index)] = child.props.expanded;\n }\n return acc;\n }, {} as ActiveExpander);\n\n setActiveExpander({ ...activeExpander, ...newActiveExpander });\n }, [children]);\n\n return (\n <ul className={expanderListClasses} ref={ref} data-testid={testId} data-analyticsid={AnalyticsId.ExpanderList}>\n {React.Children.map(children, (child, index) => {\n if (isExpanderComponent(child)) {\n const id = getExpanderId(index);\n const expanded = activeExpander?.[id];\n const highlightTextChild: string | undefined = child.props.highlightText || highlightText;\n\n if (editMode) {\n return (\n <ListEditModeItem color={color} variant={variant} onDelete={child.props.onDelete}>\n {React.cloneElement(child, {\n id,\n key: index,\n expanded,\n padding: childPadding,\n color,\n large,\n 'aria-expanded': false,\n className: expanderListStyles['expander-list__item'],\n renderChildrenWhenClosed: false,\n variant,\n zIndex: zIndex,\n highlightText: highlightTextChild,\n editMode: true,\n })}\n </ListEditModeItem>\n );\n } else {\n return React.cloneElement(child as React.ReactElement<ExpanderProps>, {\n id,\n key: index,\n expanded,\n padding: childPadding,\n color,\n large,\n 'aria-expanded': expanded,\n className: expanderListStyles['expander-list__item'],\n handleExpanderClick: (event: React.MouseEvent<HTMLElement>) => handleExpanderClick(event, `${expanderIdBase}-${index}`),\n renderChildrenWhenClosed,\n variant,\n zIndex: zIndex,\n highlightText: highlightTextChild,\n });\n }\n }\n return child;\n })}\n </ul>\n );\n};\n\nconst ExpanderList = ExpanderListComponent as ExpanderListCompound;\n\nExpanderList.displayName = 'ExpanderList';\nExpanderList.Expander = Expander;\nExpander.displayName = 'ExpanderList.Expander';\n\nexport default ExpanderList;\n","import ExpanderList from './ExpanderList';\nexport * from './ExpanderList';\nexport default ExpanderList;\n"],"mappings":";;;;;;;;;;;;;;AAqGA,MAAaA,YAA0B,UAAyB;CAC9D,MAAM,EACJ,IACA,UACA,UAAU,MACV,QAAQ,WACR,YAAY,IACZ,MACA,QAAQ,OACR,OACA,kBAAkB,QAClB,WAAW,OACX,QACA,qBACA,UACA,0BACA,UAAU,QACV,SAAS,GACT,eACA,SAAS,QACT,WAAW,OACX,QACE;CACJ,MAAM,CAAC,cAAc,UAAU,UAAU,SAAS;CAClD,MAAM,cAAc,OAAsB,KAAK;CAC/C,MAAM,aAAa,OAA0B,KAAK;CAClD,MAAM,EAAE,WAAW,cAAc,iBAAiB,WAAW;CAE7D,MAAM,SAAS,YAAY;CAC3B,MAAM,iBAAiB,YAAY;CACnC,MAAM,YAAY,YAAY;CAC9B,MAAM,SAAS,YAAY;CAE3B,MAAM,cAAc,WAAW,WAAW,mBAAmB,wBAAwB;GAClF,mBAAmB,+BAA+B;GAClD,mBAAmB,8BAA8B,WAAW;GAC5D,mBAAmB,wCAAwC;GAC3D,mBAAmB,uCAAuC,WAAW;GACrE,mBAAmB,kCAAkC;GACrD,mBAAmB,iCAAiC,WAAW;GAC/D,mBAAmB,+BAA+B;GAClD,mBAAmB,8BAA8B,WAAW;GAC5D,mBAAmB,8BAA8B,WAAW;EAC9D,CAAC;CAEF,MAAM,kBAAkB,WAAW,mBAAmB,uBAAuB,mBAAmB,uBAAuB,UAAU;GAC9H,mBAAmB,6BAA6B,WAAW;GAC3D,mBAAmB,uCAAuC;GAC1D,mBAAmB,sCAAsC,WAAW;GACpE,mBAAmB,iCAAiC;GACpD,mBAAmB,gCAAgC,WAAW;GAC9D,mBAAmB,6BAA6B,WAAW;GAC3D,mBAAmB,8BAA8B;GACjD,mBAAmB,+BAA+B;GAClD,mBAAmB,6BAA6B,WAAW;EAC7D,CAAC;CAEF,MAAM,sBAAuC;AAC3C,MAAI,CAAC,4BAA4B,CAAC,WAChC,QAAO;AAUT,SACE,oBAAC,OAAA;GAAI,WARoB,WAAW,mBAAmB,qCAAqC;KAC3F,mBAAmB,gDAAgD;KACnE,mBAAmB,+CAA+C;KAClE,mBAAmB,8CAA8C,WAAW;KAC5E,mBAAmB,2CAA2C,WAAW;IAC3E,CAAC;GAGoC,cAAY,aAAa,SAAS;aACpE,oBAAC,qBAAA;IAAY,YAAY;IAAgB;KAAuB;IAC5D;;CAIV,MAAM,sBAAsB,WAAW,mBAAmB,uCAAuC,GAC9F,mBAAmB,6CAA6C,WAAW,OAC7E,CAAC;AAEF,QACE,oBAAA,UAAA,EAAA,UACG,WACC,qBAAC,OAAA;EAAI,WAAW;aACb,WAAW,UAAU,oBAAC,OAAA,EAAI,WAAW,qBAAA,CAA2B,EACjE,oBAAC,OAAA;GAAQ;GAAI,eAAa;GAAQ,oBAAkB,YAAY;GAAsB,WAAW;aAC9F,oBAAoB,OAAO;IAC1B;IACA,WAAW;IACX,MAAM,QAAQ,UAAU;IACxB,YAAY;IACZ,aAAa,KAAA;IACb;IACA;IACD,CAAC;IACE,CAAA;GACF,GAEN,qBAAC,MAAA;EAAG,WAAW;EAAa,KAAK,UAAU,CAAC,KAAK,YAAY,CAAC;;GAC3D,WAAW,UAAU,oBAAC,OAAA,EAAI,WAAW,qBAAA,CAA2B;GACjE,oBAAC,UAAA;IACC,MAAK;IACD;IACJ,SAAS;IACT,eAAa;IACb,oBAAkB,YAAY;IAC9B,WAAW;IACX,KAAK;IACL,iBAAe;IACf,OAAO,EACL,QAAQ,YAAY,SAAS,IAAI,QAClC;cAEA,oBAAoB,OAAO;KAC1B;KACA,WAAW,aAAa;KACxB,MAAM,QAAQ,UAAU;KACxB,YAAY;KACZ,aAAa,aAAa,oBAAY;KACtC;KACA;KACD,CAAC;KACK;GACR,eAAe;;GACb,EAAA,CAEN;;AAMP,IAAM,uBAAuB,YAC3B,MAAM,eAA8B,QAAQ,IAAK,QAA+B,SAAS;AAE3F,IAAMC,yBAAsD,UAA6B;CACvF,MAAM,EACJ,UACA,eAAe,MACf,OACA,2BAA2B,OAC3B,QAAQ,SACR,YAAY,IACZ,YAAY,OACZ,QACA,SACA,QACA,eACA,WAAW,OACX,QACE;CACJ,MAAM,CAAC,gBAAgB,qBAAqB,UAA0B;CACtE,MAAM,CAAC,gBAAgB,qBAAqB,UAAuB;CACnE,MAAM,iBAAiB,OAAO;CAC9B,MAAM,sBAAsB,WAAW,mBAAmB,kBAAkB,WAAW;GACpF,mBAAmB,2BAA2B,WAAW,YAAY;GACrE,mBAAmB,yBAAyB,YAAY,UAAU,YAAY;GAC9E,gCAAgC;EAClC,CAAC;CAEF,SAAS,oBAAoB,OAAkD,IAAkB;AAC/F,qBAAkB,cAAc,YAAY,GAAG,KAAK,CAAC,YAAY,KAAK,GAAG;GAAE,GAAG;IAAY,KAAK,CAAC,YAAY;GAAK,CAAE;AACnH,oBAAkB,MAAM,cAAc;;CAGxC,MAAM,iBAAiB,UAA0B,GAAG,eAAe,GAAG;AAEtE,iBAAgB;AACd,MAAI,aAAa,kBAAkB,CAAC,oBAAoB,eAAe,CACrE,gBAAe,gBAAgB;IAEhC,CAAC,WAAW,eAAe,CAAC;AAE/B,iBAAgB;EACd,MAAM,oBAAoB,MAAM,SAAS,IAAI,WAAU,UAAS;AAC9D,OAAI,oBAAoB,MAAM,CAC5B,QAAO;IAET,EAAE,QAAQ,KAAK,OAAO,UAAU;AAEhC,OAAI,OAAO,MAAM,MAAM,aAAa,YAClC,KAAI,cAAc,MAAM,IAAI,MAAM,MAAM;AAE1C,UAAO;KACN,EAAE,CAAmB;AAExB,oBAAkB;GAAE,GAAG;GAAgB,GAAG;GAAmB,CAAC;IAC7D,CAAC,SAAS,CAAC;AAEd,QACE,oBAAC,MAAA;EAAG,WAAW;EAA0B;EAAK,eAAa;EAAQ,oBAAkB,YAAY;YAC9F,MAAM,SAAS,IAAI,WAAW,OAAO,UAAU;AAC9C,OAAI,oBAAoB,MAAM,EAAE;IAC9B,MAAM,KAAK,cAAc,MAAM;IAC/B,MAAM,WAAW,iBAAiB;IAClC,MAAMC,qBAAyC,MAAM,MAAM,iBAAiB;AAE5E,QAAI,SACF,QACE,oBAAC,sBAAA;KAAwB;KAAgB;KAAS,UAAU,MAAM,MAAM;eACrE,MAAM,aAAa,OAAO;MACzB;MACA,KAAK;MACL;MACA,SAAS;MACT;MACA;MACA,iBAAiB;MACjB,WAAW,mBAAmB;MAC9B,0BAA0B;MAC1B;MACQ;MACR,eAAe;MACf,UAAU;MACX,CAAC;MACe;QAGrB,QAAO,MAAM,aAAa,OAA4C;KACpE;KACA,KAAK;KACL;KACA,SAAS;KACT;KACA;KACA,iBAAiB;KACjB,WAAW,mBAAmB;KAC9B,sBAAsB,UAAyC,oBAAoB,OAAO,GAAG,eAAe,GAAG,QAAQ;KACvH;KACA;KACQ;KACR,eAAe;KAChB,CAAC;;AAGN,UAAO;IACP;GACC;;AAIT,IAAM,eAAe;AAErB,aAAa,cAAc;AAC3B,aAAa,WAAW;AACxB,SAAS,cAAc;ACxVvB,IAAA,uBD0Ve"}
|
|
@@ -3,7 +3,7 @@ import { t as usePseudoClasses } from "../../usePseudoClasses.js";
|
|
|
3
3
|
import { t as isMutableRefObject } from "../../refs.js";
|
|
4
4
|
import { n as useLanguage } from "../../useLanguage.js";
|
|
5
5
|
import { n as useBreakpoint, t as Breakpoint } from "../../useBreakpoint.js";
|
|
6
|
-
import
|
|
6
|
+
import classNames from "classnames";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import styles from "./styles.module.scss";
|
|
9
9
|
var HN_Designsystem_FavoriteButton_nb_NO_default = { ariaLabel: "Favorittmarkering" };
|
|
@@ -97,7 +97,7 @@ const starIconHoverDesktop = (isChecked, isActive) => /* @__PURE__ */ jsxs(Fragm
|
|
|
97
97
|
})] });
|
|
98
98
|
const FavoriteButton = (props) => {
|
|
99
99
|
const { checked, id, onClick, resources, tabIndex, testId, ref, ...other } = props;
|
|
100
|
-
const buttonWrapperClasses =
|
|
100
|
+
const buttonWrapperClasses = classNames(styles.favoritebutton);
|
|
101
101
|
const { refObject, isHovered, isActive } = usePseudoClasses(isMutableRefObject(ref) ? ref : null);
|
|
102
102
|
const breakpoint = useBreakpoint();
|
|
103
103
|
const { language } = useLanguage(LanguageLocales.NORWEGIAN);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["FavoriteButton: React.FC<FavoriteButtonProps>","mergedResources: HNDesignsystemFavoriteButton"],"sources":["../../../src/resources/HN.Designsystem.FavoriteButton.nb-NO.json","../../../src/components/FavoriteButton/resourceHelper.ts","../../../src/components/FavoriteButton/StarIcon.tsx","../../../src/components/FavoriteButton/FavoriteButton.tsx","../../../src/components/FavoriteButton/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Favorittmarkering\"\n}\n","import type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.FavoriteButton.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemFavoriteButton => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import styles from './styles.module.scss';\n\nconst normalStroke = 'var(--color-action-graphics-onlight)';\nconst normalFill = 'transparent';\nconst hoverFill = 'var(--color-action-graphics-onlight-hover)';\nconst hoverStroke = 'var(--color-action-graphics-onlight-hover)';\nconst activeStroke = 'var(--core-color-blueberry-800)';\n\nconst fillColor = (isChecked: boolean, isActive: boolean, isHovered: boolean): string => {\n if (isChecked) {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n } else {\n if (isHovered) {\n return hoverFill;\n } else {\n return normalFill;\n }\n }\n};\n\nconst strokeColor = (isActive: boolean, isHovered: boolean): string => {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n};\n\nexport const starIconNormalMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => {\n return (\n <>\n <path\n d=\"M20.1026 31.1787L13.4007 34.7023C10.833 36.0523 7.83185 33.8719 8.32233 31.0126L9.60261 23.5492L4.17653 18.2675C2.09656 16.2428 3.24317 12.712 6.11581 12.2956L13.5982 11.2112L16.9493 4.42107C18.2332 1.81969 21.9426 1.81969 23.2265 4.42107L26.5776 11.2112L34.06 12.2956C36.9326 12.712 38.0792 16.2428 35.9993 18.2675L30.5732 23.5492L31.852 31.0044C32.3428 33.8651 29.3386 36.0456 26.7708 34.6925L20.1026 31.1787Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n display=\"block\"\n />\n <path\n d=\"M20.0961 26.5515L12.6372 30.4731L14.0621 22.1671L8.01953 16.2853L16.3582 15.0768L20.0877 7.52002L23.8171 15.0768L32.1558 16.2853L26.1133 22.1671L27.5381 30.4731L20.0961 26.5515Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n );\n};\n\nexport const starIconHoverMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M22.2128 31.4832L16.2246 36.117C13.9303 37.8924 10.5961 36.2662 10.5826 33.3653L10.5475 25.7929L4.28665 21.5336C1.88672 19.9009 2.40278 16.2246 5.15948 15.3158L12.3399 12.9486L14.461 5.67964C15.2736 2.89484 18.9267 2.2507 20.6428 4.58962L25.1221 10.6947L32.6791 10.4633C35.5804 10.3745 37.3227 13.6526 35.6259 16.0077L31.1994 22.1514L33.7534 29.2712C34.7335 32.0033 32.1536 34.6724 29.3898 33.7857L22.2128 31.4832Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M21.4079 26.8365L14.7433 31.9937L14.7041 23.5664L7.73204 18.8233L15.7342 16.1851L18.0947 8.09555L23.0798 14.8899L31.5016 14.6321L26.5722 21.4738L29.4178 29.4062L21.4079 26.8365Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\nexport const starIconNormalDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M30.1061 44.1854L20.3139 49.3338C17.7461 50.6838 14.745 48.5034 15.2355 45.6441L17.1061 34.7394L9.17653 27.0207C7.09656 24.9961 8.24318 21.4653 11.1158 21.0489L22.053 19.4638L26.9493 9.54278C28.2331 6.9414 31.9426 6.94139 33.2265 9.54278L38.1227 19.4638L49.06 21.0489C51.9326 21.4653 53.0792 24.9961 50.9993 27.0207L43.0697 34.7394L44.9389 45.6359C45.4296 48.4966 42.4254 50.6772 39.8576 49.324L30.1061 44.1854Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M30.0998 39.4723L19.5927 44.9966L21.5998 33.2961L13.0879 25.0106L24.8343 23.3082L30.0879 12.6632L35.3414 23.3082L47.0879 25.0106L38.576 33.2961L40.5831 44.9966L30.0998 39.4723Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n\nexport const starIconHoverDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M33.1609 44.7458L24.4114 51.5164C22.1171 53.2918 18.783 51.6656 18.7695 48.7646L18.7181 37.7007L9.56864 31.4763C7.1687 29.8436 7.68476 26.1672 10.4415 25.2584L20.9373 21.7982L24.0364 11.1776C24.849 8.39281 28.5021 7.74867 30.2182 10.0876L36.7629 19.0077L47.8092 18.6695C50.7105 18.5807 52.4528 21.8588 50.756 24.2138L44.2872 33.1922L48.0201 43.5985C49.0002 46.3306 46.4203 48.9997 43.6565 48.113L33.1609 44.7458Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M32.3991 40.1029L23.0108 47.3678L22.9557 35.4965L13.1343 28.815L24.4067 25.0987L27.732 13.7031L34.7542 23.2741L46.6178 22.9109L39.674 32.5486L43.6823 43.7228L32.3991 40.1029Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n","import type { AriaAttributes } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HTMLButtonProps } from '../../constants';\nimport type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { getResources } from './resourceHelper';\nimport { starIconHoverDesktop, starIconHoverMobile, starIconNormalDesktop, starIconNormalMobile } from './StarIcon';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { isMutableRefObject } from '../../utils/refs';\n\nimport styles from './styles.module.scss';\n\nexport interface FavoriteButtonProps extends Omit<HTMLButtonProps, 'type'>, AriaAttributes {\n /** Determines if the FavoriteButton is checked */\n checked: boolean;\n /** Gives a unique id to the button */\n id?: string;\n /** Function that is called when clicked */\n onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Resources for component */\n resources?: Partial<HNDesignsystemFavoriteButton>;\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 /** Ref passed to the button element */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nexport const FavoriteButton: React.FC<FavoriteButtonProps> = (props: FavoriteButtonProps) => {\n const { checked, id, onClick, resources, tabIndex, testId, ref, ...other } = props;\n\n const buttonWrapperClasses = classNames(styles.favoritebutton);\n const { refObject, isHovered, isActive } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n const breakpoint = useBreakpoint();\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemFavoriteButton = {\n ...defaultResources,\n ...resources,\n ariaLabel: other['aria-label'] || resources?.ariaLabel || defaultResources.ariaLabel,\n };\n\n const isMobile = breakpoint <= Breakpoint.sm;\n\n const starIcon = ((): React.JSX.Element => {\n if (isMobile) {\n if (isHovered) {\n return starIconHoverMobile(checked, isActive);\n } else {\n return starIconNormalMobile(checked, isActive);\n }\n } else {\n if (isHovered) {\n return starIconHoverDesktop(checked, isActive);\n } else {\n return starIconNormalDesktop(checked, isActive);\n }\n }\n })();\n\n return (\n <button\n id={id}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.FavoriteButton}\n className={buttonWrapperClasses}\n ref={refObject}\n tabIndex={tabIndex}\n role=\"switch\"\n aria-checked={checked}\n type=\"button\"\n aria-label={mergedResources.ariaLabel}\n {...other}\n >\n <svg focusable={false} overflow=\"visible\" role=\"presentation\" viewBox={isMobile ? '0 0 41 41' : '0 0 61 61'}>\n {starIcon}\n </svg>\n </button>\n );\n};\n\nFavoriteButton.displayName = 'FavoriteButton';\n\nexport default FavoriteButton;\n","export * from './FavoriteButton';\n\nimport { FavoriteButton } from './FavoriteButton';\nexport default FavoriteButton;\n"],"mappings":";;;;;;;;;ACKA,MAAa,gBAAgB,aAA4D;AACvF,SAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACPb,IAAM,eAAe;AACrB,IAAM,aAAa;AACnB,IAAM,YAAY;AAClB,IAAM,cAAc;AACpB,IAAM,eAAe;AAErB,IAAM,aAAa,WAAoB,UAAmB,cAA+B;AACvF,KAAI,UACF,KAAI,SACF,QAAO;UAEH,UACF,QAAO;KAEP,QAAO;UAIP,UACF,QAAO;KAEP,QAAO;;AAKb,IAAM,eAAe,UAAmB,cAA+B;AACrE,KAAI,SACF,QAAO;UAEH,UACF,QAAO;KAEP,QAAO;;AAKb,MAAa,wBAAwB,WAAoB,aAAyC;AAChG,QACE,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAA;EACC,GAAE;EACF,QAAO;EACP,MAAK;EACL,aAAY;EACZ,eAAc;EACd,WAAW,OAAO;EAClB,SAAQ;GACR,EACF,oBAAC,QAAA;EACC,GAAE;EACF,QAAQ,YAAY,UAAU,MAAM;EACpC,MAAM,UAAU,WAAW,UAAU,MAAM;EAC3C,aAAY;EACZ,eAAc;EACd,gBAAe;GACf,CAAA,EAAA,CACD;;AAIP,MAAa,uBAAuB,WAAoB,aACtD,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAA;CACC,GAAE;CACF,QAAO;CACP,MAAK;CACL,aAAY;CACZ,eAAc;CACd,WAAW,OAAO;EAClB,EACF,oBAAC,QAAA;CACC,GAAE;CACF,QAAQ,YAAY,UAAU,KAAK;CACnC,MAAM,UAAU,WAAW,UAAU,KAAK;CAC1C,aAAa,YAAY,MAAM;CAC/B,aAAY;CACZ,eAAc;CACd,gBAAe;EACf,CAAA,EAAA,CACD;AAEL,MAAa,yBAAyB,WAAoB,aACxD,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAA;CACC,GAAE;CACF,QAAO;CACP,MAAK;CACL,aAAY;CACZ,eAAc;CACd,WAAW,OAAO;EAClB,EACF,oBAAC,QAAA;CACC,GAAE;CACF,QAAQ,YAAY,UAAU,MAAM;CACpC,MAAM,UAAU,WAAW,UAAU,MAAM;CAC3C,aAAY;CACZ,eAAc;CACd,gBAAe;EACf,CAAA,EAAA,CACD;AAGL,MAAa,wBAAwB,WAAoB,aACvD,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAA;CACC,GAAE;CACF,QAAO;CACP,MAAK;CACL,aAAY;CACZ,eAAc;CACd,WAAW,OAAO;EAClB,EACF,oBAAC,QAAA;CACC,GAAE;CACF,QAAQ,YAAY,UAAU,KAAK;CACnC,MAAM,UAAU,WAAW,UAAU,KAAK;CAC1C,aAAa,YAAY,MAAM;CAC/B,aAAY;CACZ,eAAc;CACd,gBAAe;EACf,CAAA,EAAA,CACD;AC3FL,MAAaA,kBAAiD,UAA+B;CAC3F,MAAM,EAAE,SAAS,IAAI,SAAS,WAAW,UAAU,QAAQ,KAAK,GAAG,UAAU;CAE7E,MAAM,uBAAuB,GAAW,OAAO,eAAe;CAC9D,MAAM,EAAE,WAAW,WAAW,aAAa,iBAAoC,mBAAmB,IAAI,GAAG,MAAM,KAAK;CACpH,MAAM,aAAa,eAAe;CAClC,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;CAC5E,MAAM,mBAAmB,aAAa,SAAS;CAE/C,MAAMC,kBAAgD;EACpD,GAAG;EACH,GAAG;EACH,WAAW,MAAM,iBAAiB,WAAW,aAAa,iBAAiB;EAC5E;CAED,MAAM,WAAW,cAAc,WAAW;CAE1C,MAAM,kBAAqC;AACzC,MAAI,SACF,KAAI,UACF,QAAO,oBAAoB,SAAS,SAAS;MAE7C,QAAO,qBAAqB,SAAS,SAAS;WAG5C,UACF,QAAO,qBAAqB,SAAS,SAAS;MAE9C,QAAO,sBAAsB,SAAS,SAAS;KAGjD;AAEJ,QACE,oBAAC,UAAA;EACK;EACK;EACT,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,KAAK;EACK;EACV,MAAK;EACL,gBAAc;EACd,MAAK;EACL,cAAY,gBAAgB;EAC5B,GAAI;YAEJ,oBAAC,OAAA;GAAI,WAAW;GAAO,UAAS;GAAU,MAAK;GAAe,SAAS,WAAW,cAAc;aAC7F;IACG;GACC;;AAIb,eAAe,cAAc;ACtF7B,IAAA,yBAAe"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["FavoriteButton: React.FC<FavoriteButtonProps>","mergedResources: HNDesignsystemFavoriteButton"],"sources":["../../../src/resources/HN.Designsystem.FavoriteButton.nb-NO.json","../../../src/components/FavoriteButton/resourceHelper.ts","../../../src/components/FavoriteButton/StarIcon.tsx","../../../src/components/FavoriteButton/FavoriteButton.tsx","../../../src/components/FavoriteButton/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Favorittmarkering\"\n}\n","import type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.FavoriteButton.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemFavoriteButton => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import styles from './styles.module.scss';\n\nconst normalStroke = 'var(--color-action-graphics-onlight)';\nconst normalFill = 'transparent';\nconst hoverFill = 'var(--color-action-graphics-onlight-hover)';\nconst hoverStroke = 'var(--color-action-graphics-onlight-hover)';\nconst activeStroke = 'var(--core-color-blueberry-800)';\n\nconst fillColor = (isChecked: boolean, isActive: boolean, isHovered: boolean): string => {\n if (isChecked) {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n } else {\n if (isHovered) {\n return hoverFill;\n } else {\n return normalFill;\n }\n }\n};\n\nconst strokeColor = (isActive: boolean, isHovered: boolean): string => {\n if (isActive) {\n return activeStroke;\n } else {\n if (isHovered) {\n return hoverStroke;\n } else {\n return normalStroke;\n }\n }\n};\n\nexport const starIconNormalMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => {\n return (\n <>\n <path\n d=\"M20.1026 31.1787L13.4007 34.7023C10.833 36.0523 7.83185 33.8719 8.32233 31.0126L9.60261 23.5492L4.17653 18.2675C2.09656 16.2428 3.24317 12.712 6.11581 12.2956L13.5982 11.2112L16.9493 4.42107C18.2332 1.81969 21.9426 1.81969 23.2265 4.42107L26.5776 11.2112L34.06 12.2956C36.9326 12.712 38.0792 16.2428 35.9993 18.2675L30.5732 23.5492L31.852 31.0044C32.3428 33.8651 29.3386 36.0456 26.7708 34.6925L20.1026 31.1787Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n display=\"block\"\n />\n <path\n d=\"M20.0961 26.5515L12.6372 30.4731L14.0621 22.1671L8.01953 16.2853L16.3582 15.0768L20.0877 7.52002L23.8171 15.0768L32.1558 16.2853L26.1133 22.1671L27.5381 30.4731L20.0961 26.5515Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n );\n};\n\nexport const starIconHoverMobile = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M22.2128 31.4832L16.2246 36.117C13.9303 37.8924 10.5961 36.2662 10.5826 33.3653L10.5475 25.7929L4.28665 21.5336C1.88672 19.9009 2.40278 16.2246 5.15948 15.3158L12.3399 12.9486L14.461 5.67964C15.2736 2.89484 18.9267 2.2507 20.6428 4.58962L25.1221 10.6947L32.6791 10.4633C35.5804 10.3745 37.3227 13.6526 35.6259 16.0077L31.1994 22.1514L33.7534 29.2712C34.7335 32.0033 32.1536 34.6724 29.3898 33.7857L22.2128 31.4832Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M21.4079 26.8365L14.7433 31.9937L14.7041 23.5664L7.73204 18.8233L15.7342 16.1851L18.0947 8.09555L23.0798 14.8899L31.5016 14.6321L26.5722 21.4738L29.4178 29.4062L21.4079 26.8365Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\nexport const starIconNormalDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M30.1061 44.1854L20.3139 49.3338C17.7461 50.6838 14.745 48.5034 15.2355 45.6441L17.1061 34.7394L9.17653 27.0207C7.09656 24.9961 8.24318 21.4653 11.1158 21.0489L22.053 19.4638L26.9493 9.54278C28.2331 6.9414 31.9426 6.94139 33.2265 9.54278L38.1227 19.4638L49.06 21.0489C51.9326 21.4653 53.0792 24.9961 50.9993 27.0207L43.0697 34.7394L44.9389 45.6359C45.4296 48.4966 42.4254 50.6772 39.8576 49.324L30.1061 44.1854Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M30.0998 39.4723L19.5927 44.9966L21.5998 33.2961L13.0879 25.0106L24.8343 23.3082L30.0879 12.6632L35.3414 23.3082L47.0879 25.0106L38.576 33.2961L40.5831 44.9966L30.0998 39.4723Z\"\n stroke={strokeColor(isActive, false)}\n fill={fillColor(isChecked, isActive, false)}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n\nexport const starIconHoverDesktop = (isChecked: boolean, isActive: boolean): React.JSX.Element => (\n <>\n <path\n d=\"M33.1609 44.7458L24.4114 51.5164C22.1171 53.2918 18.783 51.6656 18.7695 48.7646L18.7181 37.7007L9.56864 31.4763C7.1687 29.8436 7.68476 26.1672 10.4415 25.2584L20.9373 21.7982L24.0364 11.1776C24.849 8.39281 28.5021 7.74867 30.2182 10.0876L36.7629 19.0077L47.8092 18.6695C50.7105 18.5807 52.4528 21.8588 50.756 24.2138L44.2872 33.1922L48.0201 43.5985C49.0002 46.3306 46.4203 48.9997 43.6565 48.113L33.1609 44.7458Z\"\n stroke=\"black\"\n fill=\"transparent\"\n strokeWidth=\"3\"\n strokeLinecap=\"round\"\n className={styles['favoritebutton__star-icon--focus']}\n />\n <path\n d=\"M32.3991 40.1029L23.0108 47.3678L22.9557 35.4965L13.1343 28.815L24.4067 25.0987L27.732 13.7031L34.7542 23.2741L46.6178 22.9109L39.674 32.5486L43.6823 43.7228L32.3991 40.1029Z\"\n stroke={strokeColor(isActive, true)}\n fill={fillColor(isChecked, isActive, true)}\n fillOpacity={isChecked ? '1' : '0.13'}\n strokeWidth=\"2.5\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </>\n);\n","import type { AriaAttributes } from 'react';\n\nimport classNames from 'classnames';\n\nimport type { HTMLButtonProps } from '../../constants';\nimport type { HNDesignsystemFavoriteButton } from '../../resources/Resources';\n\nimport { getResources } from './resourceHelper';\nimport { starIconHoverDesktop, starIconHoverMobile, starIconNormalDesktop, starIconNormalMobile } from './StarIcon';\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { Breakpoint, useBreakpoint } from '../../hooks/useBreakpoint';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { isMutableRefObject } from '../../utils/refs';\n\nimport styles from './styles.module.scss';\n\nexport interface FavoriteButtonProps extends Omit<HTMLButtonProps, 'type'>, AriaAttributes {\n /** Determines if the FavoriteButton is checked */\n checked: boolean;\n /** Gives a unique id to the button */\n id?: string;\n /** Function that is called when clicked */\n onClick: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;\n /** Resources for component */\n resources?: Partial<HNDesignsystemFavoriteButton>;\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 /** Ref passed to the button element */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nexport const FavoriteButton: React.FC<FavoriteButtonProps> = (props: FavoriteButtonProps) => {\n const { checked, id, onClick, resources, tabIndex, testId, ref, ...other } = props;\n\n const buttonWrapperClasses = classNames(styles.favoritebutton);\n const { refObject, isHovered, isActive } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n const breakpoint = useBreakpoint();\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n const defaultResources = getResources(language);\n\n const mergedResources: HNDesignsystemFavoriteButton = {\n ...defaultResources,\n ...resources,\n ariaLabel: other['aria-label'] || resources?.ariaLabel || defaultResources.ariaLabel,\n };\n\n const isMobile = breakpoint <= Breakpoint.sm;\n\n const starIcon = ((): React.JSX.Element => {\n if (isMobile) {\n if (isHovered) {\n return starIconHoverMobile(checked, isActive);\n } else {\n return starIconNormalMobile(checked, isActive);\n }\n } else {\n if (isHovered) {\n return starIconHoverDesktop(checked, isActive);\n } else {\n return starIconNormalDesktop(checked, isActive);\n }\n }\n })();\n\n return (\n <button\n id={id}\n onClick={onClick}\n data-testid={testId}\n data-analyticsid={AnalyticsId.FavoriteButton}\n className={buttonWrapperClasses}\n ref={refObject}\n tabIndex={tabIndex}\n role=\"switch\"\n aria-checked={checked}\n type=\"button\"\n aria-label={mergedResources.ariaLabel}\n {...other}\n >\n <svg focusable={false} overflow=\"visible\" role=\"presentation\" viewBox={isMobile ? '0 0 41 41' : '0 0 61 61'}>\n {starIcon}\n </svg>\n </button>\n );\n};\n\nFavoriteButton.displayName = 'FavoriteButton';\n\nexport default FavoriteButton;\n","export * from './FavoriteButton';\n\nimport { FavoriteButton } from './FavoriteButton';\nexport default FavoriteButton;\n"],"mappings":"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"}
|
|
@@ -41,7 +41,7 @@ export interface FormGroupProps {
|
|
|
41
41
|
/** Renders the error component (Default: true) */
|
|
42
42
|
renderError?: boolean;
|
|
43
43
|
/** Ref passed to the error message element */
|
|
44
|
-
|
|
44
|
+
errorMessageRef?: React.Ref<HTMLDivElement | null>;
|
|
45
45
|
}
|
|
46
46
|
export declare const FormGroup: React.FC<FormGroupProps>;
|
|
47
47
|
export default FormGroup;
|
|
@@ -3,7 +3,7 @@ import { t as AnchorLink_default } from "../../AnchorLink.js";
|
|
|
3
3
|
import { n as useLanguage } from "../../useLanguage.js";
|
|
4
4
|
import { t as Close_default } from "../../Close.js";
|
|
5
5
|
import { n as PopOverVariant, t as PopOver_default } from "../../PopOver.js";
|
|
6
|
-
import
|
|
6
|
+
import classNames from "classnames";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import styles from "./styles.module.scss";
|
|
9
9
|
var HN_Designsystem_HelpBubble_nb_NO_default = { ariaLabel: "Hjelpetekst" };
|
|
@@ -22,8 +22,8 @@ var HelpBubble = (props) => {
|
|
|
22
22
|
...getResources(language),
|
|
23
23
|
...resources
|
|
24
24
|
};
|
|
25
|
-
const helpBubbleClasses =
|
|
26
|
-
const contentClasses =
|
|
25
|
+
const helpBubbleClasses = classNames(styles.helpbubble, className);
|
|
26
|
+
const contentClasses = classNames(styles.helpbubble__content);
|
|
27
27
|
const renderLink = () => {
|
|
28
28
|
if (onLinkClick && linkText) return /* @__PURE__ */ jsx("button", {
|
|
29
29
|
className: styles.helpbubble__link,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HelpBubble: React.FC<HelpBubbleProps>","mergedResources: HNDesignsystemHelpBubble"],"sources":["../../../src/resources/HN.Designsystem.HelpBubble.nb-NO.json","../../../src/components/HelpBubble/resourceHelper.ts","../../../src/components/HelpBubble/HelpBubble.tsx","../../../src/components/HelpBubble/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Hjelpetekst\"\n}\n","import type { HNDesignsystemHelpBubble } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.HelpBubble.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemHelpBubble => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import classNames from 'classnames';\n\nimport type { HNDesignsystemHelpBubble } from '../../resources/Resources';\nimport type { AnchorLinkTargets } from '../AnchorLink';\nimport type { PopOverProps } from '../PopOver';\n\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport AnchorLink from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverVariant } from '../PopOver';\nimport { getResources } from './resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Sets aria-labelledby of the bubble. */\n ariaLabelledById?: string;\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement | null>;\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. */\n noCloseButton?: boolean;\n /** Visible text on the link. */\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 /** Resources for the component */\n resources?: Partial<HNDesignsystemHelpBubble>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLDivElement | SVGSVGElement | null>;\n}\n\nconst HelpBubble: React.FC<HelpBubbleProps> = props => {\n const {\n ariaLabelledById,\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 resources,\n testId,\n ref,\n } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n\n if (!showBubble) {\n return null;\n }\n\n const defaultResources = getResources(language);\n const mergedResources: HNDesignsystemHelpBubble = {\n ...defaultResources,\n ...resources,\n };\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n const contentClasses = classNames(styles.helpbubble__content);\n\n const renderLink = (): React.ReactNode | undefined => {\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 = (): React.ReactNode | undefined => {\n if (noCloseButton) {\n return;\n }\n return <Close small color=\"plum\" onClick={onClose} ariaLabel={closeAriaLabel} className={styles.helpbubble__close} />;\n };\n\n return (\n <PopOver\n ariaLabel={mergedResources.ariaLabel}\n ariaLabelledById={ariaLabelledById}\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role=\"group\"\n ref={ref}\n show={showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n {renderCloseButton()}\n </div>\n </PopOver>\n );\n};\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n","import HelpBubble from './HelpBubble';\nexport * from './HelpBubble';\nexport default HelpBubble;\n"],"mappings":";;;;;;;;;ACKA,MAAa,gBAAgB,aAAwD;AACnF,SAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACMb,MAAa,oBAAoB;AAuCjC,IAAMA,cAAwC,UAAS;CACrD,MAAM,EACJ,kBACA,UACA,YAAY,IACZ,eACA,WAAW,aACX,SACA,YACA,aACA,SACA,gBAEA,YACA,cACA,SACA,eACA,WACA,QACA,QACE;CAEJ,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;AAE5E,KAAI,CAAC,WACH,QAAO;CAIT,MAAMC,kBAA4C;EAChD,GAFuB,aAAa,SAAS;EAG7C,GAAG;EACJ;CAED,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"index.js","names":["HelpBubble: React.FC<HelpBubbleProps>","mergedResources: HNDesignsystemHelpBubble"],"sources":["../../../src/resources/HN.Designsystem.HelpBubble.nb-NO.json","../../../src/components/HelpBubble/resourceHelper.ts","../../../src/components/HelpBubble/HelpBubble.tsx","../../../src/components/HelpBubble/index.ts"],"sourcesContent":["{\n \"ariaLabel\": \"Hjelpetekst\"\n}\n","import type { HNDesignsystemHelpBubble } from '../../resources/Resources';\n\nimport { LanguageLocales } from '../../constants';\nimport nbNO from '../../resources/HN.Designsystem.HelpBubble.nb-NO.json';\n\nexport const getResources = (language: LanguageLocales): HNDesignsystemHelpBubble => {\n switch (language) {\n case LanguageLocales.NORWEGIAN:\n default:\n return nbNO;\n }\n};\n","import classNames from 'classnames';\n\nimport type { HNDesignsystemHelpBubble } from '../../resources/Resources';\nimport type { AnchorLinkTargets } from '../AnchorLink';\nimport type { PopOverProps } from '../PopOver';\n\nimport { AnalyticsId, LanguageLocales } from '../../constants';\nimport { useLanguage } from '../../hooks/useLanguage';\nimport AnchorLink from '../AnchorLink';\nimport Close from '../Close';\nimport PopOver, { PopOverVariant } from '../PopOver';\nimport { getResources } from './resourceHelper';\n\nimport styles from './styles.module.scss';\n\nexport const HelpBubbleVariant = PopOverVariant;\n\nexport interface HelpBubbleProps extends Pick<PopOverProps, 'children' | 'variant' | 'controllerRef' | 'role'> {\n /** Sets aria-labelledby of the bubble. */\n ariaLabelledById?: string;\n /** Id of the HelpBubble */\n helpBubbleId?: string;\n /** Content shown inside HelpBubble. */\n children: React.ReactNode;\n /** Ref for the element the HelpBubble is placed upon */\n controllerRef: React.RefObject<HTMLElement | SVGSVGElement | null>;\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. */\n noCloseButton?: boolean;\n /** Visible text on the link. */\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 /** Resources for the component */\n resources?: Partial<HNDesignsystemHelpBubble>;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Ref that is passed to the component */\n ref?: React.Ref<HTMLDivElement | SVGSVGElement | null>;\n}\n\nconst HelpBubble: React.FC<HelpBubbleProps> = props => {\n const {\n ariaLabelledById,\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 resources,\n testId,\n ref,\n } = props;\n\n const { language } = useLanguage<LanguageLocales>(LanguageLocales.NORWEGIAN);\n\n if (!showBubble) {\n return null;\n }\n\n const defaultResources = getResources(language);\n const mergedResources: HNDesignsystemHelpBubble = {\n ...defaultResources,\n ...resources,\n };\n\n const helpBubbleClasses = classNames(styles.helpbubble, className);\n const contentClasses = classNames(styles.helpbubble__content);\n\n const renderLink = (): React.ReactNode | undefined => {\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 = (): React.ReactNode | undefined => {\n if (noCloseButton) {\n return;\n }\n return <Close small color=\"plum\" onClick={onClose} ariaLabel={closeAriaLabel} className={styles.helpbubble__close} />;\n };\n\n return (\n <PopOver\n ariaLabel={mergedResources.ariaLabel}\n ariaLabelledById={ariaLabelledById}\n id={helpBubbleId}\n variant={variant}\n controllerRef={controllerRef}\n role=\"group\"\n ref={ref}\n show={showBubble}\n testId={testId}\n >\n <div className={helpBubbleClasses} data-analyticsid={AnalyticsId.HelpBubble}>\n <div className={contentClasses}>\n {children}\n {renderLink()}\n </div>\n {renderCloseButton()}\n </div>\n </PopOver>\n );\n};\n\nHelpBubble.displayName = 'HelpBubble';\n\nexport default HelpBubble;\n","import HelpBubble from './HelpBubble';\nexport * from './HelpBubble';\nexport default HelpBubble;\n"],"mappings":";;;;;;;;;ACKA,MAAa,gBAAgB,aAAwD;AACnF,SAAQ,UAAR;EACE,KAAK,gBAAgB;EACrB,QACE,QAAO;;;ACMb,MAAa,oBAAoB;AAuCjC,IAAMA,cAAwC,UAAS;CACrD,MAAM,EACJ,kBACA,UACA,YAAY,IACZ,eACA,WAAW,aACX,SACA,YACA,aACA,SACA,gBAEA,YACA,cACA,SACA,eACA,WACA,QACA,QACE;CAEJ,MAAM,EAAE,aAAa,YAA6B,gBAAgB,UAAU;AAE5E,KAAI,CAAC,WACH,QAAO;CAIT,MAAMC,kBAA4C;EAChD,GAFuB,aAAa,SAAS;EAG7C,GAAG;EACJ;CAED,MAAM,oBAAoB,WAAW,OAAO,YAAY,UAAU;CAClE,MAAM,iBAAiB,WAAW,OAAO,oBAAoB;CAE7D,MAAM,mBAAgD;AACpD,MAAI,eAAe,SACjB,QACE,oBAAC,UAAA;GAAO,WAAW,OAAO;GAAkB,SAAS;GAAa,MAAK;aACpE;IACM;WAEF,WAAW,SACpB,QACE,oBAAC,oBAAA;GAAW,MAAM;GAAS,QAAQ;aAChC;IACU;;CAKnB,MAAM,0BAAuD;AAC3D,MAAI,cACF;AAEF,SAAO,oBAAC,eAAA;GAAM,OAAA;GAAM,OAAM;GAAO,SAAS;GAAS,WAAW;GAAgB,WAAW,OAAO;IAAqB;;AAGvH,QACE,oBAAC,iBAAA;EACC,WAAW,gBAAgB;EACT;EAClB,IAAI;EACK;EACM;EACf,MAAK;EACA;EACL,MAAM;EACE;YAER,qBAAC,OAAA;GAAI,WAAW;GAAmB,oBAAkB,YAAY;cAC/D,qBAAC,OAAA;IAAI,WAAW;eACb,UACA,YAAY,CAAA;KACT,EACL,mBAAmB,CAAA;IAChB;GACE;;AAId,WAAW,cAAc;ACvIzB,IAAA,qBDyIe"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as HighlightPanel_default } from "../../HighlightPanel.js";
|
|
2
2
|
import { t as HandWaving_default } from "../../HandWaving.js";
|
|
3
|
-
import
|
|
3
|
+
import classNames from "classnames";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
import styles from "./styles.module.scss";
|
|
6
6
|
var HelpPanel = ({ className, variant = "normal", testId, children, title }) => {
|
|
7
7
|
return /* @__PURE__ */ jsx(HighlightPanel_default, {
|
|
8
|
-
className:
|
|
8
|
+
className: classNames([styles["help-panel"]], className),
|
|
9
9
|
testId,
|
|
10
10
|
svgIcon: HandWaving_default,
|
|
11
11
|
title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HelpPanel: React.FC<HelpPanelProps>"],"sources":["../../../src/components/HelpPanel/HelpPanel.tsx","../../../src/components/HelpPanel/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport HighlightPanel from '../HighlightPanel';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\nexport type HelpPanelVariants = 'normal' | 'compact';\n\nexport interface HelpPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** If set the compact styling will be used */\n variant?: HelpPanelVariants;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets title if needed */\n title?: string;\n}\n\nconst HelpPanel: React.FC<HelpPanelProps> = ({ className, variant = 'normal', testId, children, title }) => {\n return (\n <HighlightPanel\n className={classNames([styles['help-panel']], className)}\n testId={testId}\n svgIcon={HandWaving}\n title={title}\n variant={variant}\n >\n {children}\n </HighlightPanel>\n );\n};\n\nexport default HelpPanel;\n","import HelpPanel from './HelpPanel';\nexport * from './HelpPanel';\nexport default HelpPanel;\n"],"mappings":";;;;;AAsBA,IAAMA,aAAuC,EAAE,WAAW,UAAU,UAAU,QAAQ,UAAU,YAAY;AAC1G,QACE,oBAAC,wBAAA;EACC,WAAW,
|
|
1
|
+
{"version":3,"file":"index.js","names":["HelpPanel: React.FC<HelpPanelProps>"],"sources":["../../../src/components/HelpPanel/HelpPanel.tsx","../../../src/components/HelpPanel/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport HighlightPanel from '../HighlightPanel';\nimport HandWaving from '../Icons/HandWaving';\n\nimport styles from './styles.module.scss';\n\nexport type HelpPanelVariants = 'normal' | 'compact';\n\nexport interface HelpPanelProps {\n /** What's in the box? */\n children: React.ReactNode;\n /** If set the compact styling will be used */\n variant?: HelpPanelVariants;\n /** Adds custom classes to the element. */\n className?: string;\n /** Sets the data-testid attribute. */\n testId?: string;\n /** Sets title if needed */\n title?: string;\n}\n\nconst HelpPanel: React.FC<HelpPanelProps> = ({ className, variant = 'normal', testId, children, title }) => {\n return (\n <HighlightPanel\n className={classNames([styles['help-panel']], className)}\n testId={testId}\n svgIcon={HandWaving}\n title={title}\n variant={variant}\n >\n {children}\n </HighlightPanel>\n );\n};\n\nexport default HelpPanel;\n","import HelpPanel from './HelpPanel';\nexport * from './HelpPanel';\nexport default HelpPanel;\n"],"mappings":";;;;;AAsBA,IAAMA,aAAuC,EAAE,WAAW,UAAU,UAAU,QAAQ,UAAU,YAAY;AAC1G,QACE,oBAAC,wBAAA;EACC,WAAW,WAAW,CAAC,OAAO,cAAc,EAAE,UAAU;EAChD;EACR,SAAS;EACF;EACE;EAER;GACc;;AC9BrB,IAAA,oBDkCe"}
|
|
@@ -3,7 +3,7 @@ import { t as usePseudoClasses } from "../../usePseudoClasses.js";
|
|
|
3
3
|
import { n as mergeRefs, t as isMutableRefObject } from "../../refs.js";
|
|
4
4
|
import { n as getAriaLabelAttributes } from "../../accessibility.js";
|
|
5
5
|
import { n as HelpTriggerIconInternal } from "../../HelpTriggerIcon.js";
|
|
6
|
-
import
|
|
6
|
+
import classNames from "classnames";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
import styles from "./styles.module.scss";
|
|
9
9
|
var HelpTriggerInline = (props) => {
|
|
@@ -12,7 +12,7 @@ var HelpTriggerInline = (props) => {
|
|
|
12
12
|
label: ariaLabel,
|
|
13
13
|
id: ariaLabelledById
|
|
14
14
|
});
|
|
15
|
-
const helpTriggerInlineStyles =
|
|
15
|
+
const helpTriggerInlineStyles = classNames(styles["help-trigger-inline"], className);
|
|
16
16
|
const { refObject, isHovered } = usePseudoClasses(isMutableRefObject(ref) ? ref : null);
|
|
17
17
|
return /* @__PURE__ */ jsxs("button", {
|
|
18
18
|
"aria-label": ariaLabel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["HelpTriggerInline: React.FC<HelpTriggerInlineProps>"],"sources":["../../../src/components/HelpTriggerInline/HelpTriggerInline.tsx","../../../src/components/HelpTriggerInline/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { HelpTriggerWeights } from '../HelpTriggerIcon';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { HelpTriggerIconInternal } from '../HelpTriggerIcon';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpTriggerInlineProps extends Pick<\n React.InputHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'aria-haspopup' | 'aria-controls' | 'aria-expanded'\n> {\n /**\n * Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /** Sets the text content of the HelpTriggerInline. */\n children: string;\n /**\n * Sets the colors of the help trigger. Default: normal.\n */\n weight?: HelpTriggerWeights;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Optional test id.\n */\n testId?: string;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst HelpTriggerInline: React.FC<HelpTriggerInlineProps> = props => {\n const { ariaLabel, ariaLabelledById, children, className, testId, weight = 'normal', ref, ...rest } = props;\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n const helpTriggerInlineStyles = classNames(styles['help-trigger-inline'], className);\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n\n return (\n <button\n aria-label={ariaLabel}\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.HelpTriggerInline}\n className={helpTriggerInlineStyles}\n ref={mergeRefs([refObject, ref])}\n {...ariaLabelAttributes}\n {...rest}\n >\n <span className={styles['help-trigger-inline__text']}>{children}</span>\n <HelpTriggerIconInternal weight={weight} size={'inherit'} htmlMarkup={'span'} isHovered={isHovered} />\n </button>\n );\n};\n\nHelpTriggerInline.displayName = 'HelpTriggerInline';\n\nexport default HelpTriggerInline;\n","import HelpTriggerInline from './HelpTriggerInline';\nexport * from './HelpTriggerInline';\nexport default HelpTriggerInline;\n"],"mappings":";;;;;;;;AA0CA,IAAMA,qBAAsD,UAAS;CACnE,MAAM,EAAE,WAAW,kBAAkB,UAAU,WAAW,QAAQ,SAAS,UAAU,KAAK,GAAG,SAAS;CACtG,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;EAAkB,CAAC;CAC9F,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.js","names":["HelpTriggerInline: React.FC<HelpTriggerInlineProps>"],"sources":["../../../src/components/HelpTriggerInline/HelpTriggerInline.tsx","../../../src/components/HelpTriggerInline/index.ts"],"sourcesContent":["import classNames from 'classnames';\n\nimport type { HelpTriggerWeights } from '../HelpTriggerIcon';\n\nimport { AnalyticsId } from '../../constants';\nimport { usePseudoClasses } from '../../hooks/usePseudoClasses';\nimport { getAriaLabelAttributes } from '../../utils/accessibility';\nimport { isMutableRefObject, mergeRefs } from '../../utils/refs';\nimport { HelpTriggerIconInternal } from '../HelpTriggerIcon';\n\nimport styles from './styles.module.scss';\n\nexport interface HelpTriggerInlineProps extends Pick<\n React.InputHTMLAttributes<HTMLButtonElement>,\n 'onClick' | 'aria-haspopup' | 'aria-controls' | 'aria-expanded'\n> {\n /**\n * Sets aria-label of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabel?: string;\n /**\n * Sets aria-labelledby of the trigger. ariaLabel or ariaLabelledById MUST be set!\n */\n ariaLabelledById?: string;\n /** Sets the text content of the HelpTriggerInline. */\n children: string;\n /**\n * Sets the colors of the help trigger. Default: normal.\n */\n weight?: HelpTriggerWeights;\n /**\n * Classname will be applied to the button element.\n */\n className?: string;\n /**\n * Optional test id.\n */\n testId?: string;\n /** Ref passed to the component */\n ref?: React.Ref<HTMLButtonElement | null>;\n}\n\nconst HelpTriggerInline: React.FC<HelpTriggerInlineProps> = props => {\n const { ariaLabel, ariaLabelledById, children, className, testId, weight = 'normal', ref, ...rest } = props;\n const ariaLabelAttributes = getAriaLabelAttributes({ label: ariaLabel, id: ariaLabelledById });\n const helpTriggerInlineStyles = classNames(styles['help-trigger-inline'], className);\n const { refObject, isHovered } = usePseudoClasses<HTMLButtonElement>(isMutableRefObject(ref) ? ref : null);\n\n return (\n <button\n aria-label={ariaLabel}\n type=\"button\"\n data-testid={testId}\n data-analyticsid={AnalyticsId.HelpTriggerInline}\n className={helpTriggerInlineStyles}\n ref={mergeRefs([refObject, ref])}\n {...ariaLabelAttributes}\n {...rest}\n >\n <span className={styles['help-trigger-inline__text']}>{children}</span>\n <HelpTriggerIconInternal weight={weight} size={'inherit'} htmlMarkup={'span'} isHovered={isHovered} />\n </button>\n );\n};\n\nHelpTriggerInline.displayName = 'HelpTriggerInline';\n\nexport default HelpTriggerInline;\n","import HelpTriggerInline from './HelpTriggerInline';\nexport * from './HelpTriggerInline';\nexport default HelpTriggerInline;\n"],"mappings":";;;;;;;;AA0CA,IAAMA,qBAAsD,UAAS;CACnE,MAAM,EAAE,WAAW,kBAAkB,UAAU,WAAW,QAAQ,SAAS,UAAU,KAAK,GAAG,SAAS;CACtG,MAAM,sBAAsB,uBAAuB;EAAE,OAAO;EAAW,IAAI;EAAkB,CAAC;CAC9F,MAAM,0BAA0B,WAAW,OAAO,wBAAwB,UAAU;CACpF,MAAM,EAAE,WAAW,cAAc,iBAAoC,mBAAmB,IAAI,GAAG,MAAM,KAAK;AAE1G,QACE,qBAAC,UAAA;EACC,cAAY;EACZ,MAAK;EACL,eAAa;EACb,oBAAkB,YAAY;EAC9B,WAAW;EACX,KAAK,UAAU,CAAC,WAAW,IAAI,CAAC;EAChC,GAAI;EACJ,GAAI;aAEJ,oBAAC,QAAA;GAAK,WAAW,OAAO;GAA+B;IAAgB,EACvE,oBAAC,yBAAA;GAAgC;GAAQ,MAAM;GAAW,YAAY;GAAmB;IAAa,CAAA;GAC/F;;AAIb,kBAAkB,cAAc;AC/DhC,IAAA,4BDiEe"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { a as IconSize } from "../../constants2.js";
|
|
2
2
|
import { n as Icon, t as Icon_default } from "../../Icon.js";
|
|
3
|
-
|
|
3
|
+
import { t as getIcon } from "../../utils.js";
|
|
4
|
+
export { Icon, IconSize, Icon_default as default, getIcon };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { n as getIllustration, t as ViewBoxSize } from "../../utils4.js";
|
|
1
2
|
import { n as Illustration, t as Illustration_default } from "../../Illustration.js";
|
|
2
|
-
export { Illustration, Illustration_default as default };
|
|
3
|
+
export { Illustration, ViewBoxSize, Illustration_default as default, getIllustration };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as BabyMobileMedium_default } from "../../BabyMobileMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var BabyMobile = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as ChildMedium_default } from "../../ChildMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Child = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as DoctorMedium_default } from "../../DoctorMedium.js";
|
|
3
3
|
import { t as DoctorSmall_default } from "../../DoctorSmall.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as FacialRecognitionFingerprintMedium_default } from "../../FacialRecognitionFingerprintMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var FacialRecognitionFingerprint = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as GiveBabyFoodMedium_default } from "../../GiveBabyFoodMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var GiveBabyFood = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as HealthcarePersonnelMedium_default } from "../../HealthcarePersonnelMedium.js";
|
|
3
3
|
import { t as HealthcarePersonnelSmall_default } from "../../HealthcarePersonnelSmall.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as ReadLettersMedium_default } from "../../ReadLettersMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var ReadLetters = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as StrollerMedium_default } from "../../StrollerMedium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Stroller = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as getIllustration } from "../../
|
|
1
|
+
import { n as getIllustration } from "../../utils4.js";
|
|
2
2
|
import { t as Support2Medium_default } from "../../Support2Medium.js";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
var Support2 = ({ size = 512, color, ...rest }) => {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as Label_default } from "../../
|
|
3
|
-
export { Sublabel, Label_default as default };
|
|
1
|
+
import { a as Sublabel, n as renderLabel, r as renderLabelAsParent, t as getLabelText } from "../../utils2.js";
|
|
2
|
+
import { t as Label_default } from "../../Label.js";
|
|
3
|
+
export { Sublabel, Label_default as default, getLabelText, renderLabel, renderLabelAsParent };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as LazyIcon, t as LazyIcon_default } from "../../LazyIcon.js";
|
|
2
|
-
export { LazyIcon, LazyIcon_default as default };
|
|
1
|
+
import { n as isServerSide, r as LazyIcon, t as LazyIcon_default } from "../../LazyIcon.js";
|
|
2
|
+
export { LazyIcon, LazyIcon_default as default, isServerSide };
|