@laerdal/life-react-components 6.0.0-dev.19.full → 6.0.0-dev.2.full
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/dist/Accordion/ContentAccordion.cjs +11 -40
- package/dist/Accordion/ContentAccordion.cjs.map +1 -1
- package/dist/Accordion/ContentAccordion.js +11 -40
- package/dist/Accordion/ContentAccordion.js.map +1 -1
- package/dist/Accordion/styles.cjs +13 -51
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.js +13 -51
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/Banners/Banner.cjs +34 -38
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.d.ts +3 -2
- package/dist/Banners/Banner.js +34 -38
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/styles.cjs +16 -8
- package/dist/Banners/styles.cjs.map +1 -1
- package/dist/Banners/styles.js +16 -8
- package/dist/Banners/styles.js.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.cjs +2 -8
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +2 -8
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/styles.cjs +4 -15
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.js +4 -15
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +6 -27
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.js +6 -27
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/Button.cjs +47 -179
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.d.ts +0 -2
- package/dist/Button/Button.js +47 -179
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +21 -83
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.js +21 -83
- package/dist/Button/Iconbutton.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.cjs +5 -20
- package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.js +5 -20
- package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +3 -12
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.js +3 -12
- package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +2 -8
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +2 -8
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
- package/dist/Card/VerticalCard/Card.cjs +5 -20
- package/dist/Card/VerticalCard/Card.cjs.map +1 -1
- package/dist/Card/VerticalCard/Card.js +5 -20
- package/dist/Card/VerticalCard/Card.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +7 -28
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.js +7 -28
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +4 -19
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.js +4 -19
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.cjs +2 -9
- package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.js +2 -9
- package/dist/Card/VerticalCard/CardTopSection.js.map +1 -1
- package/dist/Chips/ChipStyles.cjs +1 -4
- package/dist/Chips/ChipStyles.cjs.map +1 -1
- package/dist/Chips/ChipStyles.js +1 -4
- package/dist/Chips/ChipStyles.js.map +1 -1
- package/dist/ChipsInput/ChipInputField.cjs +4 -16
- package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
- package/dist/ChipsInput/ChipInputField.js +4 -16
- package/dist/ChipsInput/ChipInputField.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +3 -12
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +3 -12
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +42 -172
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.js +42 -172
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +10 -36
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +10 -36
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +3 -12
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +3 -12
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +1 -4
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +1 -4
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
- package/dist/GlobalNavigationBar/Logo.cjs +1 -2
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.js +1 -2
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +1 -8
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.js +1 -8
- package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +2 -3
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js +2 -3
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +1 -4
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.js +1 -4
- package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
- package/dist/HyperLink/HyperLink.cjs +2 -14
- package/dist/HyperLink/HyperLink.cjs.map +1 -1
- package/dist/HyperLink/HyperLink.d.ts +0 -2
- package/dist/HyperLink/HyperLink.js +2 -14
- package/dist/HyperLink/HyperLink.js.map +1 -1
- package/dist/HyperLink/styling.cjs +8 -38
- package/dist/HyperLink/styling.cjs.map +1 -1
- package/dist/HyperLink/styling.js +8 -38
- package/dist/HyperLink/styling.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +14 -54
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.js +14 -54
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +43 -149
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.d.ts +1 -1
- package/dist/InputFields/DatepickerField.js +44 -150
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.cjs +5 -20
- package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.js +5 -20
- package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
- package/dist/InputFields/Label.cjs +11 -38
- package/dist/InputFields/Label.cjs.map +1 -1
- package/dist/InputFields/Label.js +11 -38
- package/dist/InputFields/Label.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +16 -66
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +16 -66
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +1 -4
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.d.ts +1 -1
- package/dist/InputFields/PasswordField.js +1 -4
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/QuickSearch.cjs +6 -30
- package/dist/InputFields/QuickSearch.cjs.map +1 -1
- package/dist/InputFields/QuickSearch.js +6 -30
- package/dist/InputFields/QuickSearch.js.map +1 -1
- package/dist/InputFields/RadioButton.cjs +15 -63
- package/dist/InputFields/RadioButton.cjs.map +1 -1
- package/dist/InputFields/RadioButton.js +15 -63
- package/dist/InputFields/RadioButton.js.map +1 -1
- package/dist/InputFields/RichTextField.cjs +15 -60
- package/dist/InputFields/RichTextField.cjs.map +1 -1
- package/dist/InputFields/RichTextField.js +15 -60
- package/dist/InputFields/RichTextField.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +1 -4
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +1 -4
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +3 -9
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.d.ts +1 -1
- package/dist/InputFields/TextField.js +3 -9
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +17 -68
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.js +17 -68
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/components/SearchBarInput.cjs +7 -28
- package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
- package/dist/InputFields/components/SearchBarInput.js +7 -28
- package/dist/InputFields/components/SearchBarInput.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs +15 -60
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.js +15 -60
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +39 -95
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +2 -1
- package/dist/InputFields/styling.js +39 -95
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/LinearProgress/LinearProgress.cjs +53 -161
- package/dist/LinearProgress/LinearProgress.cjs.map +1 -1
- package/dist/LinearProgress/LinearProgress.js +53 -161
- package/dist/LinearProgress/LinearProgress.js.map +1 -1
- package/dist/List/ListRow.cjs +9 -36
- package/dist/List/ListRow.cjs.map +1 -1
- package/dist/List/ListRow.js +9 -36
- package/dist/List/ListRow.js.map +1 -1
- package/dist/LoadingIndicator/LoadingIndicator.cjs +1 -4
- package/dist/LoadingIndicator/LoadingIndicator.cjs.map +1 -1
- package/dist/LoadingIndicator/LoadingIndicator.js +1 -4
- package/dist/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs +1 -4
- package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.js +1 -4
- package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
- package/dist/MenuItem/MenuItem.cjs +26 -101
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.js +26 -101
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/MiniProductCard/MiniProductCard.cjs +1 -15
- package/dist/MiniProductCard/MiniProductCard.cjs.map +1 -1
- package/dist/MiniProductCard/MiniProductCard.d.ts +0 -1
- package/dist/MiniProductCard/MiniProductCard.js +1 -15
- package/dist/MiniProductCard/MiniProductCard.js.map +1 -1
- package/dist/Modals/Modal.cjs +1 -4
- package/dist/Modals/Modal.cjs.map +1 -1
- package/dist/Modals/Modal.js +1 -4
- package/dist/Modals/Modal.js.map +1 -1
- package/dist/Modals/ModalContent.cjs +6 -24
- package/dist/Modals/ModalContent.cjs.map +1 -1
- package/dist/Modals/ModalContent.js +6 -24
- package/dist/Modals/ModalContent.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +3 -12
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.js +3 -12
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Modals/ModalNote.cjs +4 -16
- package/dist/Modals/ModalNote.cjs.map +1 -1
- package/dist/Modals/ModalNote.js +4 -16
- package/dist/Modals/ModalNote.js.map +1 -1
- package/dist/Modals/ModalStyles.cjs +11 -44
- package/dist/Modals/ModalStyles.cjs.map +1 -1
- package/dist/Modals/ModalStyles.js +11 -44
- package/dist/Modals/ModalStyles.js.map +1 -1
- package/dist/NavItem/NavItem.cjs +2 -11
- package/dist/NavItem/NavItem.cjs.map +1 -1
- package/dist/NavItem/NavItem.js +2 -11
- package/dist/NavItem/NavItem.js.map +1 -1
- package/dist/NotificationDot/NotificationDot.cjs +2 -17
- package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
- package/dist/NotificationDot/NotificationDot.js +2 -17
- package/dist/NotificationDot/NotificationDot.js.map +1 -1
- package/dist/Paginator/Paginator.cjs +29 -76
- package/dist/Paginator/Paginator.cjs.map +1 -1
- package/dist/Paginator/Paginator.js +29 -76
- package/dist/Paginator/Paginator.js.map +1 -1
- package/dist/Panel/Panel.cjs +1 -4
- package/dist/Panel/Panel.cjs.map +1 -1
- package/dist/Panel/Panel.js +1 -4
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Popover/Popover.cjs +3 -22
- package/dist/Popover/Popover.cjs.map +1 -1
- package/dist/Popover/Popover.js +3 -22
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/ProfileButton/ProfileButton.cjs +2 -9
- package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
- package/dist/ProfileButton/ProfileButton.js +2 -9
- package/dist/ProfileButton/ProfileButton.js.map +1 -1
- package/dist/SegmentControl/SegmentControl.cjs +11 -46
- package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
- package/dist/SegmentControl/SegmentControl.js +11 -46
- package/dist/SegmentControl/SegmentControl.js.map +1 -1
- package/dist/SideMenu/SideMenuHeader.cjs +3 -12
- package/dist/SideMenu/SideMenuHeader.cjs.map +1 -1
- package/dist/SideMenu/SideMenuHeader.js +3 -12
- package/dist/SideMenu/SideMenuHeader.js.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.cjs +1 -4
- package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.js +1 -4
- package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
- package/dist/Table/TableFooter.cjs +2 -8
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +2 -8
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/Table/TableStyles.cjs +33 -132
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.js +33 -132
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Tabs/HorizontalTabs.cjs +18 -68
- package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
- package/dist/Tabs/HorizontalTabs.js +18 -68
- package/dist/Tabs/HorizontalTabs.js.map +1 -1
- package/dist/Tabs/TabLink.cjs +1 -4
- package/dist/Tabs/TabLink.cjs.map +1 -1
- package/dist/Tabs/TabLink.js +1 -4
- package/dist/Tabs/TabLink.js.map +1 -1
- package/dist/Tabs/VerticalTabs.cjs +0 -1
- package/dist/Tabs/VerticalTabs.cjs.map +1 -1
- package/dist/Tabs/VerticalTabs.js +0 -1
- package/dist/Tabs/VerticalTabs.js.map +1 -1
- package/dist/Tag/Tag.cjs +2 -2
- package/dist/Tag/Tag.cjs.map +1 -1
- package/dist/Tag/Tag.js +2 -2
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Tile/Tile.cjs +2 -8
- package/dist/Tile/Tile.cjs.map +1 -1
- package/dist/Tile/Tile.js +2 -8
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/TileCommonItems.cjs +2 -8
- package/dist/Tile/TileCommonItems.cjs.map +1 -1
- package/dist/Tile/TileCommonItems.js +2 -8
- package/dist/Tile/TileCommonItems.js.map +1 -1
- package/dist/Tile/TileFooter.cjs +1 -4
- package/dist/Tile/TileFooter.cjs.map +1 -1
- package/dist/Tile/TileFooter.js +1 -4
- package/dist/Tile/TileFooter.js.map +1 -1
- package/dist/Tile/TileHeader.cjs +3 -12
- package/dist/Tile/TileHeader.cjs.map +1 -1
- package/dist/Tile/TileHeader.js +3 -12
- package/dist/Tile/TileHeader.js.map +1 -1
- package/dist/Toasters/Toast.cjs +13 -62
- package/dist/Toasters/Toast.cjs.map +1 -1
- package/dist/Toasters/Toast.js +13 -62
- package/dist/Toasters/Toast.js.map +1 -1
- package/dist/Toggles/ToggleButton.cjs +3 -9
- package/dist/Toggles/ToggleButton.cjs.map +1 -1
- package/dist/Toggles/ToggleButton.d.ts +1 -1
- package/dist/Toggles/ToggleButton.js +3 -9
- package/dist/Toggles/ToggleButton.js.map +1 -1
- package/dist/Toggles/TogglerStyles.cjs +8 -22
- package/dist/Toggles/TogglerStyles.cjs.map +1 -1
- package/dist/Toggles/TogglerStyles.js +8 -22
- package/dist/Toggles/TogglerStyles.js.map +1 -1
- package/dist/Tooltips/TooltipStyles.cjs +6 -28
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.js +6 -28
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/common/InputStyling.cjs +7 -30
- package/dist/common/InputStyling.cjs.map +1 -1
- package/dist/common/InputStyling.js +7 -30
- package/dist/common/InputStyling.js.map +1 -1
- package/dist/custom.d.ts +0 -2
- package/dist/styles/colors.cjs +84 -439
- package/dist/styles/colors.cjs.map +1 -1
- package/dist/styles/colors.d.ts +11 -200
- package/dist/styles/colors.js +84 -439
- package/dist/styles/colors.js.map +1 -1
- package/dist/styles/global.cjs +2 -19
- package/dist/styles/global.cjs.map +1 -1
- package/dist/styles/global.d.ts +2 -3
- package/dist/styles/global.js +3 -18
- package/dist/styles/global.js.map +1 -1
- package/dist/styles/index.cjs +9 -21
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.d.ts +2 -2
- package/dist/styles/index.js +6 -18
- package/dist/styles/index.js.map +1 -1
- package/package.json +141 -144
- package/dist/Accordion/__tests__/AccordionMenu.test.tsx +0 -42
- package/dist/Accordion/__tests__/ContentAccordion.test.tsx +0 -150
- package/dist/AuthPage/__tests__/AuthPage.test.tsx +0 -27
- package/dist/Banners/__tests__/Banner.test.tsx +0 -47
- package/dist/Banners/__tests__/OverviewBanner.test.tsx +0 -20
- package/dist/Breadcrumb/__tests__/Breadcrumb.test.tsx +0 -78
- package/dist/Button/__tests__/BackButton.test.tsx +0 -32
- package/dist/Button/__tests__/Button.test.tsx +0 -45
- package/dist/Button/__tests__/DualButton.test.tsx +0 -119
- package/dist/Card/HorizontalCard/__tests__/HorizontalCard.test.tsx +0 -71
- package/dist/Card/HorizontalCard/__tests__/VerticalCard.test.tsx +0 -124
- package/dist/Card/__tests__/Card.test.tsx +0 -146
- package/dist/Chips/__tests__/ActionChip.test.tsx +0 -94
- package/dist/Chips/__tests__/ChoiceChips.test.tsx +0 -79
- package/dist/Chips/__tests__/FilterChip.test.tsx +0 -95
- package/dist/Chips/__tests__/InputChip.test.tsx +0 -155
- package/dist/ChipsInput/__tests__/ChipDropdownInput.test.tsx +0 -100
- package/dist/ChipsInput/__tests__/ChipInputFields.test.tsx +0 -155
- package/dist/Dropdown/__tests__/DropdownFilter.test.tsx +0 -39
- package/dist/Footer/__tests__/Footer.test.tsx +0 -182
- package/dist/GlobalNavigationBar/__tests__/GlobalNavigationBar.tests.d.ts +0 -1
- package/dist/GlobalNavigationBar/__tests__/Logo.test.tsx +0 -39
- package/dist/GlobalNavigationBar/__tests__/Logo.tests.d.ts +0 -1
- package/dist/GlobalNavigationBar/desktop/__tests__/DesktopActions.test.tsx +0 -108
- package/dist/GlobalNavigationBar/desktop/__tests__/ExtendedMainMenu.test.tsx +0 -28
- package/dist/GlobalNavigationBar/desktop/__tests__/MainMenu.test.tsx +0 -55
- package/dist/GlobalNavigationBar/desktop/__tests__/RightSideNav.test.tsx +0 -45
- package/dist/GlobalNavigationBar/desktop/__tests__/UserMenu.test.tsx +0 -125
- package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenu.test.tsx +0 -317
- package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenuContent.test.tsx +0 -294
- package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenuHeader.test.tsx +0 -195
- package/dist/InputFields/__tests__/NumberField.test.tsx +0 -67
- package/dist/InputFields/__tests__/NumberInput.test.tsx +0 -68
- package/dist/InputFields/__tests__/QuickSearch.test.tsx +0 -42
- package/dist/LinearProgress/__tests__/LinearProgress.test.tsx +0 -25
- package/dist/List/__tests__/ListRow.test.tsx +0 -18
- package/dist/List/__tests__/ListRow.tests.d.ts +0 -1
- package/dist/LoadingPage/__tests__/GlobalLoadingPage.test.tsx +0 -23
- package/dist/Modals/__tests__/Modal.test.tsx +0 -169
- package/dist/Modals/__tests__/ModalContainer.test.tsx +0 -77
- package/dist/Modals/__tests__/ModalContent.test.tsx +0 -126
- package/dist/NavItem/__tests__/NavItem.test.ts +0 -6
- package/dist/NotificationDot/__tests__/NotificationDot.test.tsx +0 -33
- package/dist/Paginator/__tests__/Paginator.test.tsx +0 -39
- package/dist/Popover/__tests__/Popover.test.tsx +0 -64
- package/dist/ProfileButton/__tests__/ProfileButton.test.tsx +0 -31
- package/dist/QuizButton/__tests__/QuizButton.test.tsx +0 -53
- package/dist/SegmentControl/__tests__/SegmentControl.test.tsx +0 -145
- package/dist/SideMenu/__tests__/SideMenu.test.tsx +0 -99
- package/dist/Switcher/__tests__/SwitcherMenuItem.tsx +0 -14
- package/dist/Table/__tests__/Table.test.tsx +0 -499
- package/dist/Tabs/__tests__/HorizontalTabs.test.tsx +0 -95
- package/dist/Tabs/__tests__/TabLink.test.tsx +0 -40
- package/dist/Tabs/__tests__/TabLink.tests.d.ts +0 -1
- package/dist/Tabs/__tests__/Tablist.test.tsx +0 -37
- package/dist/Tabs/__tests__/Tablist.tests.d.ts +0 -2
- package/dist/Tag/__tests__/Tag.test.tsx +0 -86
- package/dist/Toasters/__tests__/Toast.test.tsx +0 -74
- package/dist/Toggles/__tests__/ToggleButton.test.tsx +0 -53
- package/dist/Toggles/__tests__/ToggleSwitch.test.tsx +0 -87
- package/dist/Tooltips/__tests__/TooltipWrapper.test.tsx +0 -16
- package/dist/common/Link.cjs +0 -45
- package/dist/common/Link.cjs.map +0 -1
- package/dist/common/Link.d.ts +0 -9
- package/dist/common/Link.js +0 -37
- package/dist/common/Link.js.map +0 -1
- package/dist/common/NavigationHelper.cjs +0 -30
- package/dist/common/NavigationHelper.cjs.map +0 -1
- package/dist/common/NavigationHelper.d.ts +0 -4
- package/dist/common/NavigationHelper.js +0 -23
- package/dist/common/NavigationHelper.js.map +0 -1
- package/dist/styles/react-datepicker.css +0 -766
- package/dist/utils/color-tokens.cjs +0 -91
- package/dist/utils/color-tokens.cjs.map +0 -1
- package/dist/utils/color-tokens.d.ts +0 -19
- package/dist/utils/color-tokens.js +0 -82
- package/dist/utils/color-tokens.js.map +0 -1
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '../../test-utils';
|
|
3
|
-
import { Breadcrumb } from '../index';
|
|
4
|
-
import '@testing-library/jest-dom';
|
|
5
|
-
import { Size } from '../../types';
|
|
6
|
-
|
|
7
|
-
const items = [
|
|
8
|
-
{ label: 'test1', url: 'http://laerdal_test.com', callback: (id?: string) => {} },
|
|
9
|
-
{ label: 'test2', url: 'http://laerdal_test1.com', callback: (id?: string) => {} },
|
|
10
|
-
{ label: 'test3', url: 'http://laerdal_test2.com', callback: (id?: string) => {} },
|
|
11
|
-
{ label: 'test4', url: 'http://laerdal_test3.com', callback: (id?: string) => {} },
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
describe('<Breadcrumb />', () => {
|
|
17
|
-
it('Renders with no values', async () => {
|
|
18
|
-
const { getByTestId, container } = render(<Breadcrumb items={[]} />);
|
|
19
|
-
//main container is displayed
|
|
20
|
-
expect(getByTestId('breacrumbContainer')).toBeDefined();
|
|
21
|
-
//home link is displayed
|
|
22
|
-
expect(container.querySelector('[id="homelink"]')).toBeDefined();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('Renders with home icon and no values', async () => {
|
|
26
|
-
const { getByTestId, container } = render(<Breadcrumb items={[]} homeIcon={true} />);
|
|
27
|
-
expect(getByTestId('breacrumbContainer')).toBeDefined();
|
|
28
|
-
//home icon is displayed
|
|
29
|
-
expect(container.querySelector('[id="homeIcon"]')).toBeDefined();
|
|
30
|
-
|
|
31
|
-
//because a size was not provided, small icons width will be set (20px)
|
|
32
|
-
const svg = container.querySelector('svg');
|
|
33
|
-
expect(svg).toHaveAttribute('width', '20px');
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
it('Render breadcrumb with two values ', async () => {
|
|
37
|
-
const options = items.slice(0, 2);
|
|
38
|
-
const { getByTestId, container } = render(<Breadcrumb lastItemAsLabel={true} items={options} size={Size.Medium} />);
|
|
39
|
-
expect(getByTestId('breacrumbContainer')).toBeDefined();
|
|
40
|
-
//check breadcrumbs displayed correctly - only one link defined for this scenario
|
|
41
|
-
const linkItem = container.querySelector('a[id*="link-item"]');
|
|
42
|
-
expect(linkItem).toBeDefined();
|
|
43
|
-
expect(linkItem).toHaveTextContent(options[0].label);
|
|
44
|
-
|
|
45
|
-
//query breadcrumb chrevron separators
|
|
46
|
-
const breadcrumbSeparators = container.querySelectorAll('.chevronicon');
|
|
47
|
-
expect(breadcrumbSeparators).toBeDefined();
|
|
48
|
-
expect(breadcrumbSeparators).toHaveLength(2);
|
|
49
|
-
|
|
50
|
-
//medium size provided
|
|
51
|
-
const svg = container.querySelector('svg');
|
|
52
|
-
expect(svg).toHaveAttribute('width', '24px');
|
|
53
|
-
|
|
54
|
-
const lastItem = container.querySelector('label');
|
|
55
|
-
expect(lastItem).toBeDefined();
|
|
56
|
-
expect(lastItem).toHaveTextContent(options[options.length - 1].label);
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
it('Render more than 3 items', async () => {
|
|
60
|
-
const { container, getByText } = render(<Breadcrumb lastItemAsLabel={true} items={items} size={Size.XSmall} />);
|
|
61
|
-
|
|
62
|
-
//having more than 2 item show more dropdown selector should be displayed
|
|
63
|
-
//because home page button is not provided, only one button should be rendered
|
|
64
|
-
const showMoreBtn = container.querySelector('button');
|
|
65
|
-
expect(showMoreBtn).toBeDefined();
|
|
66
|
-
//in this scenario, first option label is not displayed, so only one link item available
|
|
67
|
-
const linkItem = container.querySelectorAll('a[id*="link-item"]');
|
|
68
|
-
expect(linkItem).toHaveLength(1);
|
|
69
|
-
|
|
70
|
-
//links not displayed for first two items, but these are defined as dropdown options
|
|
71
|
-
expect(getByText(items[0].label)).toBeDefined();
|
|
72
|
-
expect(getByText(items[1].label)).toBeDefined();
|
|
73
|
-
|
|
74
|
-
//xs size provided
|
|
75
|
-
const svg = container.querySelector('svg');
|
|
76
|
-
expect(svg).toHaveAttribute('width', '16px');
|
|
77
|
-
});
|
|
78
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {act, render} from '../../test-utils';
|
|
3
|
-
import {BackButton} from '../index';
|
|
4
|
-
import {Size} from '../../types'
|
|
5
|
-
import 'jest-styled-components';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
describe('<BackButton />', () => {
|
|
11
|
-
it('should render back button', function () {
|
|
12
|
-
const {queryByText} = render(<BackButton size={Size.Small}>Back Button</BackButton>);
|
|
13
|
-
expect(queryByText('Back Button')).toBeDefined();
|
|
14
|
-
});
|
|
15
|
-
it('should call action on click', function () {
|
|
16
|
-
const clickMock = jest.fn(() => {});
|
|
17
|
-
const component = render(<BackButton size={Size.Small} onClick={clickMock}>Back Button</BackButton>);
|
|
18
|
-
act(() => {
|
|
19
|
-
component.getByText('Back Button').click();
|
|
20
|
-
});
|
|
21
|
-
expect(clickMock).toBeCalled();
|
|
22
|
-
});
|
|
23
|
-
it('should not call action on click when disabled', function () {
|
|
24
|
-
const clickMock = jest.fn(() => {});
|
|
25
|
-
const component = render(<BackButton size={Size.Small} disabled={true} onClick={clickMock}>Back Button</BackButton>);
|
|
26
|
-
act(() => {
|
|
27
|
-
component.getByText('Back Button').click();
|
|
28
|
-
});
|
|
29
|
-
expect(clickMock).toBeCalledTimes(0);
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
});
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '../../test-utils';
|
|
3
|
-
import { Button } from '../index';
|
|
4
|
-
import 'jest-styled-components';
|
|
5
|
-
import { COLORS } from '../../styles';
|
|
6
|
-
import { Size } from '../..';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
describe('<Button />', () => {
|
|
12
|
-
it('Renders primary button', async () => {
|
|
13
|
-
const { queryByText, getByTestId } = render(
|
|
14
|
-
<Button variant="primary" testId="TestButton" size={Size.Large}>
|
|
15
|
-
TestButton
|
|
16
|
-
</Button>,
|
|
17
|
-
);
|
|
18
|
-
expect(queryByText('TestButton')).toBeDefined();
|
|
19
|
-
/*expect(getByTestId('TestButton')).toHaveStyleRule('background-color', COLORS.primary);
|
|
20
|
-
expect(getByTestId('TestButton')).toHaveStyleRule('cursor', 'pointer');
|
|
21
|
-
expect(getByTestId('TestButton')).toHaveStyleRule('color', 'white');*/
|
|
22
|
-
});
|
|
23
|
-
it('Renders secondary button', async () => {
|
|
24
|
-
const { queryByText, getByTestId } = render(
|
|
25
|
-
<Button variant="secondary" testId="TestButton">
|
|
26
|
-
TestButton
|
|
27
|
-
</Button>,
|
|
28
|
-
);
|
|
29
|
-
expect(queryByText('TestButton')).toBeDefined();
|
|
30
|
-
/*expect(getByTestId('TestButton')).toHaveStyleRule('color', COLORS.primary);
|
|
31
|
-
expect(getByTestId('TestButton')).toHaveStyleRule('border-color', COLORS.primary);
|
|
32
|
-
expect(getByTestId('TestButton')).toHaveStyleRule('background-color', 'white');*/
|
|
33
|
-
});
|
|
34
|
-
it('Renders tertiary button', async () => {
|
|
35
|
-
const { queryByText, getByTestId } = render(
|
|
36
|
-
<Button variant="tertiary" testId="TestButton">
|
|
37
|
-
TestButton
|
|
38
|
-
</Button>,
|
|
39
|
-
);
|
|
40
|
-
expect(queryByText('TestButton')).toBeDefined();
|
|
41
|
-
/*expect(getByTestId('TestButton')).toHaveStyleRule('background-color', 'white');
|
|
42
|
-
expect(getByTestId('TestButton')).toHaveStyleRule('border-color', COLORS.neutral_100);
|
|
43
|
-
expect(getByTestId('TestButton')).toHaveStyleRule('color', COLORS.primary);*/
|
|
44
|
-
});
|
|
45
|
-
});
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { fireEvent, render } from '../../test-utils';
|
|
3
|
-
import { DualFunctionButton } from '../index';
|
|
4
|
-
import '@testing-library/jest-dom';
|
|
5
|
-
import { Size, SystemIcons } from '../..';
|
|
6
|
-
import 'jest-styled-components';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
describe('<DualButton />', () => {
|
|
12
|
-
it('Renders checkbox button', async () => {
|
|
13
|
-
const dropdownItems = [
|
|
14
|
-
{ value: 'Item 1', icon: undefined },
|
|
15
|
-
{ value: 'Item 2', icon: undefined, disabled: true },
|
|
16
|
-
];
|
|
17
|
-
const { getByText, container, getByTestId } = render(
|
|
18
|
-
<DualFunctionButton
|
|
19
|
-
dropdownCustomizationProps={{
|
|
20
|
-
items: dropdownItems,
|
|
21
|
-
itemsType: 'checkbox',
|
|
22
|
-
multiSelect: true,
|
|
23
|
-
pinTopItem: true,
|
|
24
|
-
actionLabel: 'Custom Action',
|
|
25
|
-
action: () => {},
|
|
26
|
-
onValueUpdate: (vals) => {},
|
|
27
|
-
scrollable: true,
|
|
28
|
-
}}
|
|
29
|
-
id="test"
|
|
30
|
-
size={Size.Small}
|
|
31
|
-
variant="primary">
|
|
32
|
-
Dual button checkbox test
|
|
33
|
-
</DualFunctionButton>,
|
|
34
|
-
);
|
|
35
|
-
//expect button name defined
|
|
36
|
-
expect(getByText('Dual button checkbox test')).toBeTruthy();
|
|
37
|
-
//expect all items displayed
|
|
38
|
-
expect(getByText('Item 1')).toBeTruthy();
|
|
39
|
-
expect(getByText('Item 2')).toBeTruthy();
|
|
40
|
-
|
|
41
|
-
//check that checkbox controls are displayed
|
|
42
|
-
expect(getByText('Item 1').closest('label')).toHaveClass('checkbox-label');
|
|
43
|
-
expect(getByText('Item 2').closest('label')).toHaveClass('checkbox-label');
|
|
44
|
-
|
|
45
|
-
//expect item 2 to be disabled
|
|
46
|
-
expect(getByText('Item 2').closest('div')).toHaveAttribute('disabled');
|
|
47
|
-
|
|
48
|
-
//expect the toggle button to be defined
|
|
49
|
-
expect(getByTestId('options_toggleBtn')).toBeTruthy();
|
|
50
|
-
|
|
51
|
-
//expect select all displayed as pin top item is set as "true"
|
|
52
|
-
expect(document.body.querySelector('[id*="checkbox_selectall"]')).toBeTruthy();
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
it('Renders normal dual button', async () => {
|
|
56
|
-
const dropdownItems = [
|
|
57
|
-
{ value: 'Item 1', icon: undefined },
|
|
58
|
-
{ value: 'Item 2', icon: undefined },
|
|
59
|
-
];
|
|
60
|
-
const { getByText, container, getByTestId } = render(
|
|
61
|
-
<DualFunctionButton
|
|
62
|
-
dropdownCustomizationProps={{
|
|
63
|
-
items: dropdownItems,
|
|
64
|
-
itemsType: 'normal',
|
|
65
|
-
multiSelect: true,
|
|
66
|
-
action: () => {},
|
|
67
|
-
onValueUpdate: (vals) => {},
|
|
68
|
-
scrollable: true,
|
|
69
|
-
}}
|
|
70
|
-
id="test"
|
|
71
|
-
size={Size.Small}
|
|
72
|
-
variant="primary">
|
|
73
|
-
Dual button test
|
|
74
|
-
</DualFunctionButton>,
|
|
75
|
-
);
|
|
76
|
-
//check that the dual button text defined
|
|
77
|
-
expect(getByText('Dual button test')).toBeTruthy();
|
|
78
|
-
expect(getByText('Item 1')).toBeTruthy();
|
|
79
|
-
expect(getByText('Item 2')).toBeTruthy();
|
|
80
|
-
//check that none of the items disabled
|
|
81
|
-
expect(getByText('Item 1').closest('div')).not.toHaveAttribute('disabled');
|
|
82
|
-
expect(getByText('Item 2').closest('div')).not.toHaveAttribute('disabled');
|
|
83
|
-
expect(getByTestId('options_toggleBtn')).toBeTruthy();
|
|
84
|
-
|
|
85
|
-
//two options available
|
|
86
|
-
expect(document.body.querySelectorAll('button[tabindex="-1"]')).toHaveLength(2);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('Renders radio-button type dual button', async () => {
|
|
90
|
-
const dropdownItems = [
|
|
91
|
-
{ value: 'Item 1', icon: undefined, disabled: true },
|
|
92
|
-
{ value: 'Item 2', icon: undefined, disabled: true },
|
|
93
|
-
];
|
|
94
|
-
const { getByText, container, getByTestId } = render(
|
|
95
|
-
<DualFunctionButton
|
|
96
|
-
dropdownCustomizationProps={{
|
|
97
|
-
items: dropdownItems,
|
|
98
|
-
itemsType: 'radio',
|
|
99
|
-
multiSelect: true,
|
|
100
|
-
action: () => {},
|
|
101
|
-
onValueUpdate: (vals) => {},
|
|
102
|
-
scrollable: true,
|
|
103
|
-
}}
|
|
104
|
-
id="test"
|
|
105
|
-
size={Size.Small}
|
|
106
|
-
variant="primary">
|
|
107
|
-
Dual button test radio
|
|
108
|
-
</DualFunctionButton>,
|
|
109
|
-
);
|
|
110
|
-
//check that the dual button text defined
|
|
111
|
-
expect(getByText('Dual button test radio')).toBeTruthy();
|
|
112
|
-
expect(getByText('Item 1')).toBeTruthy();
|
|
113
|
-
expect(getByText('Item 2')).toBeTruthy();
|
|
114
|
-
|
|
115
|
-
//check that radio buttons displayed
|
|
116
|
-
expect(getByText('Item 1').closest('div')).toHaveClass('radio-button-label');
|
|
117
|
-
expect(getByText('Item 2').closest('div')).toHaveClass('radio-button-label');
|
|
118
|
-
});
|
|
119
|
-
});
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {act, render} from '../../../test-utils';
|
|
3
|
-
import {
|
|
4
|
-
HorizontalCard,
|
|
5
|
-
HorizontalCardDropdownButton,
|
|
6
|
-
HorizontalCardIconButton, HorizontalCardLinearProgression, HorizontalCardTag,
|
|
7
|
-
HorizontalCardToggleButton
|
|
8
|
-
} from '../index';
|
|
9
|
-
import {SystemIcons} from '../../../icons';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
describe('HorizontalCard', () => {
|
|
14
|
-
const action = jest.fn();
|
|
15
|
-
|
|
16
|
-
const actions: (HorizontalCardIconButton | HorizontalCardToggleButton | HorizontalCardDropdownButton)[] = [
|
|
17
|
-
{componentType: 'icon', action: action, icon: <SystemIcons.Share/>},
|
|
18
|
-
{componentType: 'icon', action: action, icon: <SystemIcons.OpenNewWindow/>}
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
const tags: HorizontalCardTag[] = [{label: 'label 1'}, {label: 'label 2'}, {label: 'label 3'}];
|
|
22
|
-
|
|
23
|
-
const progress: HorizontalCardLinearProgression = {max: 100, value: 30};
|
|
24
|
-
|
|
25
|
-
beforeEach(() => {
|
|
26
|
-
action.mockReset();
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
it('should render title', async () => {
|
|
30
|
-
const {queryByText} = render(<HorizontalCard title={'title'}/>)
|
|
31
|
-
|
|
32
|
-
expect(queryByText('title')).toBeDefined()
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should render tags', async () => {
|
|
36
|
-
|
|
37
|
-
const {queryByText} = render(<HorizontalCard title={'title'} tags={tags}/>)
|
|
38
|
-
|
|
39
|
-
expect(queryByText('label 1')).toBeDefined()
|
|
40
|
-
expect(queryByText('label 2')).toBeDefined()
|
|
41
|
-
expect(queryByText('label 3')).toBeDefined()
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it('should render actions', async () => {
|
|
45
|
-
const {container} = render(<HorizontalCard title={'title'} actions={actions}/>)
|
|
46
|
-
|
|
47
|
-
expect(container.querySelectorAll('button')).toHaveLength(2)
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
it('should call action on component click', async () => {
|
|
51
|
-
const {container} = render(<HorizontalCard title={'title'} action={action}/>)
|
|
52
|
-
|
|
53
|
-
act(() => {
|
|
54
|
-
// @ts-ignore
|
|
55
|
-
container.querySelector('.clickable').click();
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
expect(action).toHaveBeenCalled()
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it('should call action on button press', async () => {
|
|
62
|
-
const {container} = render(<HorizontalCard title={'title'} actions={actions}/>)
|
|
63
|
-
|
|
64
|
-
act(() => {
|
|
65
|
-
container.querySelectorAll('button').forEach(a => a.click());
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
expect(action).toHaveBeenCalledTimes(2)
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
});
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { fireEvent, render } from '../../../test-utils';
|
|
3
|
-
import 'jest-styled-components';
|
|
4
|
-
import { Card } from '../..';
|
|
5
|
-
import { COLORS } from '../../../styles';
|
|
6
|
-
import { SystemIcons } from '../../../icons';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
describe('<Card />',()=>{
|
|
10
|
-
it('renders top section', async () => {
|
|
11
|
-
const{getByTestId} = render(
|
|
12
|
-
<Card topSectionProps={{disabled: false}} disabled/>
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
expect(getByTestId('card-topSection')).toBeDefined();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('renders middle section', async () => {
|
|
19
|
-
const{getByTestId} = render(
|
|
20
|
-
<Card middleSectionProps={{title:'title',disabled:false}} disabled/>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
expect(getByTestId('card-middleSection')).toBeDefined();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('renders bottom section', async () => {
|
|
27
|
-
const{getByTestId} = render(
|
|
28
|
-
<Card bottomSectionProps={{disabled:false}} disabled/>
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
expect(getByTestId('card-bottomSection')).toBeDefined();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('fires card clicked event on click', async () => {
|
|
35
|
-
const cardClicked = jest.fn();
|
|
36
|
-
const{getByTestId} = render(
|
|
37
|
-
<Card bottomSectionProps={{disabled:false}} disabled={false} onCardClicked={cardClicked}/>
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
fireEvent.click(getByTestId('card-wrapper'));
|
|
41
|
-
expect(cardClicked).toBeCalledTimes(1);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it('fires card clicked event on keyDown', async () => {
|
|
45
|
-
const cardClicked = jest.fn();
|
|
46
|
-
const{getByTestId} = render(
|
|
47
|
-
<Card bottomSectionProps={{disabled:false}} disabled={false} onCardClicked={cardClicked}/>
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
fireEvent.keyDown(getByTestId('card-wrapper'), {key: 'Enter', code: 'Enter', charCode: 13});
|
|
51
|
-
expect(cardClicked).toBeCalledTimes(1);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('renders tag in top section', async () => {
|
|
55
|
-
const{getByText} = render(
|
|
56
|
-
<Card topSectionProps={{disabled: false, tagLabel:'test_label'}} disabled/>
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
expect(getByText('test_label')).toBeDefined();
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('renders checkbox in top section', async () => {
|
|
63
|
-
const{getByTestId} = render(
|
|
64
|
-
<Card topSectionProps={{disabled: false, selected: true}} disabled/>
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
expect(getByTestId('card-topSection-checkbox')).toBeDefined();
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('renders highlight ribbon in top section', async () => {
|
|
71
|
-
const{getByTestId, getByText} = render(
|
|
72
|
-
<Card topSectionProps={{disabled: false, highlightRibbonText:'testRibbon', highlightRibbonBgColor:'red'}} disabled={false}/>
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
expect(getByText('testRibbon')).toBeDefined();
|
|
76
|
-
expect(getByTestId('card-topSection-ribbon')).toHaveStyleRule('background-color','red');
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('renders title ,description and category label in middle section', async () => {
|
|
80
|
-
const{getByText} = render(
|
|
81
|
-
<Card middleSectionProps={{title:'testTitle', disabled: false, description:'testDescription', categoryLabel:'testCatLabel'}} disabled={false}/>
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
expect(getByText('testTitle')).toBeDefined();
|
|
85
|
-
expect(getByText('testDescription')).toBeDefined();
|
|
86
|
-
expect(getByText('testCatLabel')).toBeDefined();
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('renders tags in middle section', async () => {
|
|
90
|
-
const{getByText} = render(
|
|
91
|
-
<Card middleSectionProps={{title:'testTitle', disabled: false, tags:[{label:'testTag'}], row2Tags:[{label:'testTag2'}]}} disabled={false}/>
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
expect(getByText('testTitle')).toBeDefined();
|
|
95
|
-
expect(getByText('testTag2')).toBeDefined();
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('renders note text in bottom section', async () => {
|
|
99
|
-
const{getByText} = render(
|
|
100
|
-
<Card bottomSectionProps={{disabled: false, noteLeft:'leftNote', noteRight:'rightNote'}} disabled={false}/>
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
expect(getByText('leftNote')).toBeDefined();
|
|
104
|
-
expect(getByText('rightNote')).toBeDefined();
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it('renders author in bottom section', async () => {
|
|
108
|
-
const{getByText,getByTestId} = render(
|
|
109
|
-
<Card bottomSectionProps={{disabled: true, authorName:'testAuthor'}} disabled={true}/>
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
expect(getByText('testAuthor')).toBeDefined();
|
|
113
|
-
expect(getByTestId('card-bottomSection-author')).toBeDefined();
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
it('renders actions in bottom section', async () => {
|
|
117
|
-
const{getByText,getByTestId} = render(
|
|
118
|
-
<Card bottomSectionProps={{disabled: true, authorName:'testAuthor', actions:[{icon:<SystemIcons.Add/>,onClick:()=>{}}]}} disabled={true}/>
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
expect(getByText('testAuthor')).toBeDefined();
|
|
122
|
-
expect(getByTestId('card-bottomSection-author')).toBeDefined();
|
|
123
|
-
});
|
|
124
|
-
})
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { fireEvent, getByRole, render } from '../../test-utils';
|
|
3
|
-
import 'jest-styled-components';
|
|
4
|
-
import { Card } from '../..';
|
|
5
|
-
import { COLORS } from '../../styles';
|
|
6
|
-
import { SystemIcons } from '../../icons';
|
|
7
|
-
|
|
8
|
-
describe('<Card />',()=>{
|
|
9
|
-
it('renders top section', async () => {
|
|
10
|
-
const{getByTestId} = render(
|
|
11
|
-
<Card topSectionProps={{disabled: false}} disabled/>
|
|
12
|
-
);
|
|
13
|
-
|
|
14
|
-
expect(getByTestId('card-topSection')).toBeDefined();
|
|
15
|
-
//expect(getByTestId('card-middleSection')).toBeDefined();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('renders middle section', async () => {
|
|
19
|
-
const{getByTestId} = render(
|
|
20
|
-
<Card middleSectionProps={{title:'title',disabled:false}} disabled/>
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
expect(getByTestId('card-middleSection')).toBeDefined();
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
it('renders bottom section', async () => {
|
|
27
|
-
const{getByTestId} = render(
|
|
28
|
-
<Card bottomSectionProps={{disabled:false}} disabled/>
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
expect(getByTestId('card-bottomSection')).toBeDefined();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
it('fires card clicked event on click', async () => {
|
|
35
|
-
const cardClicked = jest.fn();
|
|
36
|
-
const{getByTestId} = render(
|
|
37
|
-
<Card bottomSectionProps={{disabled:false}} disabled={false} onCardClicked={cardClicked}/>
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
fireEvent.click(getByTestId('card-wrapper'));
|
|
41
|
-
expect(cardClicked).toBeCalledTimes(1);
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
it('fires card clicked event on keyDown', async () => {
|
|
45
|
-
const cardClicked = jest.fn();
|
|
46
|
-
const{getByTestId} = render(
|
|
47
|
-
<Card bottomSectionProps={{disabled:false}} disabled={false} onCardClicked={cardClicked}/>
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
fireEvent.keyDown(getByTestId('card-wrapper'), {key: 'Enter', code: 'Enter', charCode: 13});
|
|
51
|
-
expect(cardClicked).toBeCalledTimes(1);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('renders tag in top section', async () => {
|
|
55
|
-
const{getByText} = render(
|
|
56
|
-
<Card topSectionProps={{disabled: false, tagLabel:'test_label'}} disabled/>
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
expect(getByText('test_label')).toBeDefined();
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('renders checkbox in top section', async () => {
|
|
63
|
-
const{getByTestId} = render(
|
|
64
|
-
<Card topSectionProps={{disabled: false, selected: true}} disabled/>
|
|
65
|
-
);
|
|
66
|
-
|
|
67
|
-
expect(getByTestId('card-topSection-checkbox')).toBeDefined();
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
it('renders highlight ribbon in top section', async () => {
|
|
71
|
-
const{getByTestId, getByText} = render(
|
|
72
|
-
<Card topSectionProps={{disabled: false, highlightRibbonText:'testRibbon', highlightRibbonBgColor:'red'}} disabled={false}/>
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
expect(getByText('testRibbon')).toBeDefined();
|
|
76
|
-
expect(getByTestId('card-topSection-ribbon')).toHaveStyleRule('background-color','red');
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
it('renders title ,description and category label in middle section', async () => {
|
|
80
|
-
const{getByText} = render(
|
|
81
|
-
<Card middleSectionProps={{title:'testTitle', disabled: false, description:'testDescription', categoryLabel:'testCatLabel'}} disabled={false}/>
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
expect(getByText('testTitle')).toBeDefined();
|
|
85
|
-
expect(getByText('testDescription')).toBeDefined();
|
|
86
|
-
expect(getByText('testCatLabel')).toBeDefined();
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
it('renders tags in middle section', async () => {
|
|
90
|
-
const{getByText} = render(
|
|
91
|
-
<Card middleSectionProps={{title:'testTitle', disabled: false, tags:[{label:'testTag'}], row2Tags:[{label:'testTag2'}]}} disabled={false}/>
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
expect(getByText('testTitle')).toBeDefined();
|
|
95
|
-
expect(getByText('testTag2')).toBeDefined();
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
it('renders note text in bottom section', async () => {
|
|
99
|
-
const{getByText} = render(
|
|
100
|
-
<Card bottomSectionProps={{disabled: false, noteLeft:'leftNote', noteRight:'rightNote'}} disabled={false}/>
|
|
101
|
-
);
|
|
102
|
-
|
|
103
|
-
expect(getByText('leftNote')).toBeDefined();
|
|
104
|
-
expect(getByText('rightNote')).toBeDefined();
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
it('renders author in bottom section', async () => {
|
|
108
|
-
const{getByText,getByTestId} = render(
|
|
109
|
-
<Card bottomSectionProps={{disabled: true, authorName:'testAuthor'}} disabled={true}/>
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
expect(getByText('testAuthor')).toBeDefined();
|
|
113
|
-
expect(getByTestId('card-bottomSection-author')).toBeDefined();
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
it('renders actions in bottom section', async () => {
|
|
117
|
-
const{getByText,getByTestId} = render(
|
|
118
|
-
<Card bottomSectionProps={{disabled: true, authorName:'testAuthor', actions:[{icon:<SystemIcons.Add/>,onClick:()=>{}}]}} disabled={true}/>
|
|
119
|
-
);
|
|
120
|
-
|
|
121
|
-
expect(getByText('testAuthor')).toBeDefined();
|
|
122
|
-
expect(getByTestId('card-bottomSection-author')).toBeDefined();
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
it('fires leftButton click event on click', async () => {
|
|
126
|
-
const leftButtonClicked = jest.fn();
|
|
127
|
-
const{getByRole} = render(
|
|
128
|
-
<Card bottomSectionProps={{disabled: true,
|
|
129
|
-
authorName:'testAuthor',
|
|
130
|
-
actions:[],
|
|
131
|
-
leftButton: {
|
|
132
|
-
variant: 'tertiary',
|
|
133
|
-
buttonText: 'button',
|
|
134
|
-
onClick: (e) => {
|
|
135
|
-
e.stopPropagation();
|
|
136
|
-
leftButtonClicked();
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}}
|
|
140
|
-
disabled={true}/>
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
fireEvent.click(getByRole('button'));
|
|
144
|
-
expect(leftButtonClicked).toBeCalledTimes(1);
|
|
145
|
-
});
|
|
146
|
-
})
|