@laerdal/life-react-components 3.6.0-dev.1.full → 3.6.1
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/__tests__/AccordionMenu.test.tsx +42 -0
- package/dist/Accordion/__tests__/ContentAccordion.test.tsx +150 -0
- package/dist/AuthPage/__tests__/AuthPage.test.tsx +27 -0
- package/dist/Banners/__tests__/Banner.test.tsx +47 -0
- package/dist/Banners/__tests__/OverviewBanner.test.tsx +20 -0
- package/dist/Breadcrumb/__tests__/Breadcrumb.test.tsx +78 -0
- package/dist/Button/TextButton.cjs +648 -0
- package/dist/Button/TextButton.cjs.map +1 -0
- package/dist/Button/TextButton.d.ts +77 -0
- package/dist/Button/TextButton.js +640 -0
- package/dist/Button/TextButton.js.map +1 -0
- package/dist/Button/__tests__/BackButton.test.tsx +32 -0
- package/dist/Button/__tests__/Button.test.tsx +45 -0
- package/dist/Button/__tests__/DualButton.test.tsx +119 -0
- package/dist/Button/__tests__/TextButton.test.tsx +45 -0
- package/dist/Card/HorizontalCard/__tests__/HorizontalCard.test.tsx +71 -0
- package/dist/Card/HorizontalCard/__tests__/VerticalCard.test.tsx +124 -0
- package/dist/Card/VerticalCard/VerticalCard.cjs +187 -0
- package/dist/Card/VerticalCard/VerticalCard.cjs.map +1 -0
- package/dist/Card/VerticalCard/VerticalCard.d.ts +25 -0
- package/dist/Card/VerticalCard/VerticalCard.js +178 -0
- package/dist/Card/VerticalCard/VerticalCard.js.map +1 -0
- package/dist/Card/VerticalCard/VerticalCardBottomSection.cjs +261 -0
- package/dist/Card/VerticalCard/VerticalCardBottomSection.cjs.map +1 -0
- package/dist/Card/VerticalCard/VerticalCardBottomSection.d.ts +53 -0
- package/dist/Card/VerticalCard/VerticalCardBottomSection.js +252 -0
- package/dist/Card/VerticalCard/VerticalCardBottomSection.js.map +1 -0
- package/dist/Card/VerticalCard/VerticalCardMiddleSection.cjs +145 -0
- package/dist/Card/VerticalCard/VerticalCardMiddleSection.cjs.map +1 -0
- package/dist/Card/VerticalCard/VerticalCardMiddleSection.d.ts +42 -0
- package/dist/Card/VerticalCard/VerticalCardMiddleSection.js +136 -0
- package/dist/Card/VerticalCard/VerticalCardMiddleSection.js.map +1 -0
- package/dist/Card/VerticalCard/VerticalCardTopSection.cjs +165 -0
- package/dist/Card/VerticalCard/VerticalCardTopSection.cjs.map +1 -0
- package/dist/Card/VerticalCard/VerticalCardTopSection.d.ts +45 -0
- package/dist/Card/VerticalCard/VerticalCardTopSection.js +156 -0
- package/dist/Card/VerticalCard/VerticalCardTopSection.js.map +1 -0
- package/dist/Card/VerticalCard/__tests__/VerticalCard.test.tsx +124 -0
- package/dist/Card/__tests__/Card.test.tsx +146 -0
- package/dist/Chips/ChoiceChips.cjs +0 -1
- package/dist/Chips/ChoiceChips.cjs.map +1 -1
- package/dist/Chips/ChoiceChips.js +0 -1
- package/dist/Chips/ChoiceChips.js.map +1 -1
- package/dist/Chips/__tests__/ActionChip.test.tsx +94 -0
- package/dist/Chips/__tests__/ChoiceChips.test.tsx +79 -0
- package/dist/Chips/__tests__/FilterChip.test.tsx +95 -0
- package/dist/Chips/__tests__/InputChip.test.tsx +155 -0
- package/dist/ChipsInput/ChipDropdownInput.cjs +1 -1
- package/dist/ChipsInput/ChipDropdownInput.cjs.map +1 -1
- package/dist/ChipsInput/ChipDropdownInput.js +1 -1
- package/dist/ChipsInput/ChipDropdownInput.js.map +1 -1
- package/dist/ChipsInput/__tests__/ChipDropdownInput.test.tsx +100 -0
- package/dist/ChipsInput/__tests__/ChipInputFields.test.tsx +155 -0
- package/dist/Dropdown/BasicDropdown.cjs +0 -2
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +0 -2
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/DropdownButton.cjs +0 -4
- package/dist/Dropdown/DropdownButton.cjs.map +1 -1
- package/dist/Dropdown/DropdownButton.js +0 -4
- package/dist/Dropdown/DropdownButton.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +1 -1
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +1 -1
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +0 -2
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +0 -2
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Dropdown/__tests__/DropdownFilter.test.tsx +39 -0
- package/dist/Footer/__tests__/Footer.test.tsx +182 -0
- package/dist/GlobalNavigationBar/__tests__/Logo.test.tsx +31 -0
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs +1 -0
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +1 -0
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +1 -0
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.js +1 -0
- package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/__tests__/DesktopActions.test.tsx +108 -0
- package/dist/GlobalNavigationBar/desktop/__tests__/ExtendedMainMenu.test.tsx +28 -0
- package/dist/GlobalNavigationBar/desktop/__tests__/MainMenu.test.tsx +55 -0
- package/dist/GlobalNavigationBar/desktop/__tests__/RightSideNav.test.tsx +45 -0
- package/dist/GlobalNavigationBar/desktop/__tests__/UserMenu.test.tsx +125 -0
- package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenu.test.tsx +317 -0
- package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenuContent.test.tsx +294 -0
- package/dist/GlobalNavigationBar/mobile/__tests__/MobileMenuHeader.test.tsx +195 -0
- package/dist/InputFields/QuickSearch.cjs +1 -1
- package/dist/InputFields/QuickSearch.cjs.map +1 -1
- package/dist/InputFields/QuickSearch.js +1 -1
- package/dist/InputFields/QuickSearch.js.map +1 -1
- package/dist/InputFields/__tests__/NumberField.test.tsx +67 -0
- package/dist/InputFields/__tests__/NumberInput.test.tsx +68 -0
- package/dist/InputFields/__tests__/QuickSearch.test.tsx +42 -0
- package/dist/LinearProgress/__tests__/LinearProgress.test.tsx +25 -0
- package/dist/List/__tests__/ListRow.test.tsx +18 -0
- package/dist/LoadingPage/__tests__/GlobalLoadingPage.test.tsx +23 -0
- package/dist/Modals/__tests__/Modal.test.tsx +169 -0
- package/dist/Modals/__tests__/ModalContainer.test.tsx +77 -0
- package/dist/Modals/__tests__/ModalContent.test.tsx +126 -0
- package/dist/NavItem/__tests__/NavItem.test.ts +6 -0
- package/dist/Navigation/NavigationProvider.cjs +43 -0
- package/dist/Navigation/NavigationProvider.cjs.map +1 -0
- package/dist/Navigation/NavigationProvider.d.ts +15 -0
- package/dist/Navigation/NavigationProvider.js +32 -0
- package/dist/Navigation/NavigationProvider.js.map +1 -0
- package/dist/Navigation/index.cjs +19 -0
- package/dist/Navigation/index.cjs.map +1 -0
- package/dist/Navigation/index.d.ts +2 -0
- package/dist/Navigation/index.js +2 -0
- package/dist/Navigation/index.js.map +1 -0
- package/dist/NotificationDot/__tests__/NotificationDot.test.tsx +33 -0
- package/dist/Paginator/__tests__/Paginator.test.tsx +33 -0
- package/dist/Popover/__tests__/Popover.test.tsx +64 -0
- package/dist/ProfileButton/__tests__/ProfileButton.test.tsx +31 -0
- package/dist/QuizButton/__tests__/QuizButton.test.tsx +53 -0
- package/dist/SegmentControl/__tests__/SegmentControl.test.tsx +145 -0
- package/dist/SideMenu/__tests__/SideMenu.test.tsx +99 -0
- package/dist/Switcher/__tests__/SwitcherMenuItem.tsx +14 -0
- package/dist/Table/Table.cjs +3 -1
- package/dist/Table/Table.cjs.map +1 -1
- package/dist/Table/Table.js +3 -1
- package/dist/Table/Table.js.map +1 -1
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.cjs.map +1 -1
- package/dist/Table/TableBody.js +1 -1
- package/dist/Table/TableBody.js.map +1 -1
- package/dist/Table/TableFooter.cjs +0 -2
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +0 -2
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/Table/__tests__/Table.test.tsx +499 -0
- package/dist/Tabs/__tests__/HorizontalTabs.test.tsx +95 -0
- package/dist/Tabs/__tests__/TabLink.test.tsx +40 -0
- package/dist/Tabs/__tests__/Tablist.test.tsx +37 -0
- package/dist/Tag/__tests__/Tag.test.tsx +86 -0
- package/dist/Toasters/__tests__/Toast.test.tsx +74 -0
- package/dist/Toggles/__tests__/ToggleButton.test.tsx +53 -0
- package/dist/Toggles/__tests__/ToggleSwitch.test.tsx +87 -0
- package/dist/Tooltips/__tests__/TooltipWrapper.test.tsx +16 -0
- package/dist/icons/systemicons/CreditCard.cjs +43 -0
- package/dist/icons/systemicons/CreditCard.cjs.map +1 -0
- package/dist/icons/systemicons/CreditCard.d.ts +3 -0
- package/dist/icons/systemicons/CreditCard.js +33 -0
- package/dist/icons/systemicons/CreditCard.js.map +1 -0
- package/dist/icons/systemicons/Discount.cjs +43 -0
- package/dist/icons/systemicons/Discount.cjs.map +1 -0
- package/dist/icons/systemicons/Discount.d.ts +3 -0
- package/dist/icons/systemicons/Discount.js +33 -0
- package/dist/icons/systemicons/Discount.js.map +1 -0
- package/dist/icons/systemicons/DocumentComplete.cjs +43 -0
- package/dist/icons/systemicons/DocumentComplete.cjs.map +1 -0
- package/dist/icons/systemicons/DocumentComplete.d.ts +3 -0
- package/dist/icons/systemicons/DocumentComplete.js +33 -0
- package/dist/icons/systemicons/DocumentComplete.js.map +1 -0
- package/dist/icons/systemicons/Folder.cjs +43 -0
- package/dist/icons/systemicons/Folder.cjs.map +1 -0
- package/dist/icons/systemicons/Folder.d.ts +3 -0
- package/dist/icons/systemicons/Folder.js +33 -0
- package/dist/icons/systemicons/Folder.js.map +1 -0
- package/dist/icons/systemicons/FolderNew.cjs +43 -0
- package/dist/icons/systemicons/FolderNew.cjs.map +1 -0
- package/dist/icons/systemicons/FolderNew.d.ts +3 -0
- package/dist/icons/systemicons/FolderNew.js +33 -0
- package/dist/icons/systemicons/FolderNew.js.map +1 -0
- package/dist/icons/systemicons/MoodHappy.cjs +43 -0
- package/dist/icons/systemicons/MoodHappy.cjs.map +1 -0
- package/dist/icons/systemicons/MoodHappy.d.ts +3 -0
- package/dist/icons/systemicons/MoodHappy.js +33 -0
- package/dist/icons/systemicons/MoodHappy.js.map +1 -0
- package/dist/icons/systemicons/MoodIndifferent.cjs +43 -0
- package/dist/icons/systemicons/MoodIndifferent.cjs.map +1 -0
- package/dist/icons/systemicons/MoodIndifferent.d.ts +3 -0
- package/dist/icons/systemicons/MoodIndifferent.js +33 -0
- package/dist/icons/systemicons/MoodIndifferent.js.map +1 -0
- package/dist/icons/systemicons/MoodSad.cjs +43 -0
- package/dist/icons/systemicons/MoodSad.cjs.map +1 -0
- package/dist/icons/systemicons/MoodSad.d.ts +3 -0
- package/dist/icons/systemicons/MoodSad.js +33 -0
- package/dist/icons/systemicons/MoodSad.js.map +1 -0
- package/dist/icons/systemicons/MoodVeryHappy.cjs +43 -0
- package/dist/icons/systemicons/MoodVeryHappy.cjs.map +1 -0
- package/dist/icons/systemicons/MoodVeryHappy.d.ts +3 -0
- package/dist/icons/systemicons/MoodVeryHappy.js +33 -0
- package/dist/icons/systemicons/MoodVeryHappy.js.map +1 -0
- package/dist/icons/systemicons/MoodVerySad.cjs +43 -0
- package/dist/icons/systemicons/MoodVerySad.cjs.map +1 -0
- package/dist/icons/systemicons/MoodVerySad.d.ts +3 -0
- package/dist/icons/systemicons/MoodVerySad.js +33 -0
- package/dist/icons/systemicons/MoodVerySad.js.map +1 -0
- package/dist/icons/systemicons/Orders.cjs +43 -0
- package/dist/icons/systemicons/Orders.cjs.map +1 -0
- package/dist/icons/systemicons/Orders.d.ts +3 -0
- package/dist/icons/systemicons/Orders.js +33 -0
- package/dist/icons/systemicons/Orders.js.map +1 -0
- package/dist/icons/systemicons/Palette.cjs +43 -0
- package/dist/icons/systemicons/Palette.cjs.map +1 -0
- package/dist/icons/systemicons/Palette.d.ts +3 -0
- package/dist/icons/systemicons/Palette.js +33 -0
- package/dist/icons/systemicons/Palette.js.map +1 -0
- package/dist/icons/systemicons/Stack.cjs +43 -0
- package/dist/icons/systemicons/Stack.cjs.map +1 -0
- package/dist/icons/systemicons/Stack.d.ts +3 -0
- package/dist/icons/systemicons/Stack.js +33 -0
- package/dist/icons/systemicons/Stack.js.map +1 -0
- package/dist/styles/design-tokens/dark/tokens.css +481 -0
- package/dist/styles/design-tokens/light/tokens.css +481 -0
- package/dist/styles/design-tokens/rqi_dark/tokens.css +481 -0
- package/dist/styles/design-tokens/rqi_light/tokens.css +481 -0
- package/dist/styles/react-datepicker.css +766 -0
- package/dist/styles/typography.cjs +35 -59
- package/dist/styles/typography.cjs.map +1 -1
- package/dist/styles/typography.d.ts +1 -1
- package/dist/styles/typography.js +35 -59
- package/dist/styles/typography.js.map +1 -1
- package/dist/test-utils.cjs +16 -10
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.d.ts +5 -5
- package/dist/test-utils.js +14 -8
- package/dist/test-utils.js.map +1 -1
- package/dist/utils/color-tokens.cjs +91 -0
- package/dist/utils/color-tokens.cjs.map +1 -0
- package/dist/utils/color-tokens.d.ts +19 -0
- package/dist/utils/color-tokens.js +82 -0
- package/dist/utils/color-tokens.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextButton.js","names":["React","styled","useTheme","LoadingIndicator","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","COLORS","focusStyles","invertedFocusStyles","Size","defaultOnMouseDownHandler","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","getBorderRadius","flatEdge","radius","TextButtonContentContainer","div","TextButtonBaseStyled","button","TextButtonPrimaryStyled","props","$size","Large","Bold","generateToken","componentType","isOnFill","defaultVariant","theme","Small","$flatEdge","$width","Medium","$iconOnly","state","$invertFocus","undefined","TextButtonSecondaryStyled","TextButtonInvertedSecondaryStyled","TextButtonTertiaryStyled","TextButtonPositiveStyled","getColor","TextButtonDestructiveStyled","TextButtonSecondaryDestructiveStyled","TextButton","forwardRef","_ref","ref","children","variant","type","size","invertFocus","width","testId","disabled","icon","iconPosition","_objectWithoutProperties","_excluded","loading","renderProps","_excluded2","renderIcon","className","renderContent","TextButtonStyled","_objectSpread","onMouseDown","propTypes","_pt","oneOf","bool","oneOfType","string","node"],"sources":["../../src/Button/TextButton.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { css, useTheme } from 'styled-components';\r\nimport { LoadingIndicator } from '../LoadingIndicator';\r\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport { COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { Size, Testable } from '../types';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\n\r\nconst getBorderRadius = (flatEdge: string | undefined, radius: number) => {\r\n switch (flatEdge) {\r\n case 'left':\r\n return `0px ${radius}px ${radius}px 0px`;\r\n\r\n case 'right':\r\n return `${radius}px 0px 0px ${radius}px`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}px`;\r\n }\r\n};\r\n\r\nexport const TextButtonContentContainer = styled.div`\r\n min-width: 64px;\r\n`;\r\n\r\nconst TextButtonBaseStyled = styled.button<{$iconOnly: boolean; $size: Size; $flatEdge: string | undefined; $width: string; $invertFocus: boolean | undefined; }>``;\r\n\r\nexport const TextButtonPrimaryStyled = styled(TextButtonBaseStyled)`\r\n border: none;\r\n background-color: transparent;\r\n cursor: pointer;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n box-sizing: border-box; \r\n &.loading-state {\r\n cursor: wait;\r\n }\r\n ${TextButtonContentContainer} {\r\n ${(props) =>\r\n props.$size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))\r\n : props.$size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))\r\n : ComponentMStyling(ComponentTextStyle.Bold, COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme))};\r\n\r\n background-color: ${(props) => COLORS.generateToken({ componentType: 'bg-fill', defaultVariant: 'primary' }, props.theme)};\r\n border-radius: ${(props) => getBorderRadius(props.$flatEdge, 8)};\r\n\r\n width: ${(props) => props.$width};\r\n position: relative;\r\n\r\n min-height: ${(props) => (props.$size === Size.Large ? '56px' : props.$size === Size.Small ? '32px' : '40px')};\r\n\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: ${(props) => (props.$size === Size.Large ? '14px 16px' : props.$size === Size.Small ? '6px 8px' : '8px 12px')};\r\n\r\n span.icon:not(.loading) {\r\n pointer-events: none;\r\n }\r\n\r\n span.loading {\r\n opacity: 0;\r\n }\r\n\r\n .icon {\r\n margin: ${(props) => (props.$size === Size.Medium ? props.$iconOnly ? '-2px -8px' : '' : (props.$size === Size.Small ? props.$iconOnly ? '-2px -6px' : '' : '' ))};\r\n width: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n height: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n svg {\r\n width: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')} !important;\r\n height: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')} !important;\r\n }\r\n }\r\n\r\n .label {\r\n margin: 0 4px;\r\n }\r\n\r\n div {\r\n position: absolute;\r\n width: 100%;\r\n svg {\r\n height: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n width: ${(props) => (props.$size === Size.Large ? '28px' : props.$size === Size.Small ? '20px' : '24px')};\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'icon', isOnFill: true, defaultVariant: 'primary' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => COLORS.generateToken({ componentType: 'bg-fill', state: 'hover', defaultVariant: 'primary' }, props.theme)};\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme)};\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => COLORS.generateToken({ componentType: 'bg-fill', state: 'active', defaultVariant: 'primary' }, props.theme)};\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', isOnFill: true, defaultVariant: 'primary' }, props.theme)};\r\n }\r\n\r\n &:focus,\r\n &.focus-state {\r\n ${(props) => (props.$invertFocus || (props.$invertFocus === undefined) ? invertedFocusStyles : focusStyles)}\r\n }\r\n &:disabled,\r\n &.disabled-state {\r\n cursor: not-allowed;\r\n }\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n pointer-events: none;\r\n background-color: ${(props) => COLORS.generateToken({ componentType: 'bg-fill', state: 'disabled' }, props.theme)};\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', isOnFill: true, state: 'disabled' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const TextButtonSecondaryStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n background-color: transparent;\r\n div svg path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'icon', defaultVariant: 'primary' }, props.theme)};\r\n }\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', defaultVariant: 'primary' }, props.theme)};\r\n \r\n padding: ${(props) => (props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'primary' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'hover', defaultVariant: 'primary' }, props.theme)};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'primary' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'active', defaultVariant: 'primary' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'active', defaultVariant: 'primary' }, props.theme)};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'primary' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: transparent;\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'disabled' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'disabled' }, props.theme)};\r\n }\r\n`;\r\n\r\n\r\nexport const TextButtonInvertedSecondaryStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'inverse' }, props.theme)};\r\n background-color: transparent;\r\n div svg path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'icon', defaultVariant: 'inverse' }, props.theme)};\r\n }\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', defaultVariant: 'inverse' }, props.theme)};\r\n \r\n padding: ${(props) => (props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'inverse' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'hover', defaultVariant: 'inverse' }, props.theme)};\r\n\r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'inverse' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'active', defaultVariant: 'inverse' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'active', defaultVariant: 'inverse' }, props.theme)};\r\n\r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'inverse' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: transparent;\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'disabled', defaultVariant: 'inverse' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'disabled', defaultVariant: 'inverse' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const TextButtonTertiaryStyled = styled(TextButtonPrimaryStyled)`\r\n${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n background-color: transparent;\r\n\r\n div svg path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n }\r\n\r\n padding: ${(props) => (props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => COLORS.generateToken({ componentType: 'bg-surface', state:'hover' }, props.theme)};\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${(props) => COLORS.generateToken({ componentType: 'bg-surface', state: 'active' }, props.theme)};\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'primary' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: transparent !important;\r\n color: ${props => COLORS.generateToken({ componentType: 'text', isOnFill:true, state:'disabled' }, props.theme)};\r\n border-color: transparent !important;\r\n }\r\n`;\r\n\r\nexport const TextButtonPositiveStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: white;\r\n background-color: ${props => COLORS.getColor('positive_500', props.theme)};\r\n }\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('positive_700', props.theme)};\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('positive_800', props.theme)};\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n`;\r\n\r\nexport const TextButtonDestructiveStyled = styled(TextButtonPrimaryStyled)`\r\n${TextButtonContentContainer} {\r\n color: white;\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', state:'hover', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', state:'active', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: ${props => COLORS.generateToken({ componentType: 'bg-fill', state: 'disabled' }, props.theme)};\r\n color: ${props => COLORS.generateToken({ componentType: 'text', isOnFill: true, state: 'disabled' }, props.theme)}; \r\n }\r\n`;\r\n\r\nexport const TextButtonSecondaryDestructiveStyled = styled(TextButtonPrimaryStyled)`\r\n ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', defaultVariant: 'critical' }, props.theme)};\r\n background-color: transparent;\r\n div svg path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'icon', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', defaultVariant: 'critical' }, props.theme)};\r\n \r\n padding: ${(props) => (props.$size === Size.Large ? '12px 16px' : props.$size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${TextButtonContentContainer},\r\n &.hover-state > ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'critical' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'hover', defaultVariant: 'critical' }, props.theme)};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${TextButtonContentContainer},\r\n &.active-state > ${TextButtonContentContainer} {\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'active', defaultVariant: 'critical' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'active', defaultVariant: 'critical' }, props.theme)};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => COLORS.generateToken({ componentType: 'text', state:'hover', defaultVariant: 'critical' }, props.theme)};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${TextButtonContentContainer},\r\n &.disabled-state > ${TextButtonContentContainer} {\r\n background-color: transparent;\r\n color: ${(props) => COLORS.generateToken({ componentType: 'text', state:'disabled' }, props.theme)};\r\n box-shadow: inset 0 0 0 2px ${(props) => COLORS.generateToken({ componentType: 'border', state:'disabled' }, props.theme)};\r\n }\r\n`;\r\n\r\n\r\nexport interface TextButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n /** Look and feel variant of the component. Defaults to 'primary'. */\r\n variant?: 'primary' | 'secondary' | 'tertiary' | 'positive' | 'destructive' | 'secondaryDestructive' | 'secondaryInverse';\r\n /** Can be used in order to remove rounded corners on right or left edge of the button. Used by 'DualFunctionButton'. Defaults to 'undefined' */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** Size of the component. Small, Medium or Large. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Allows using inverted colors for outlining focus rect. Shown when component focused by keyboard. */\r\n invertFocus?: boolean;\r\n /** Can be used to set custom value for width style. Value is set for 'ButtonContent' container. */\r\n width?: 'auto' | string;\r\n /** If set, then 'opacity' of children container will be set to 0, and loading indicator will be shown. */\r\n loading?: boolean;\r\n /** TestId. Will be set to the top level button component. */\r\n testId?: string;\r\n /** Icon that will be shown on the left of the children. */\r\n icon?: React.ReactNode;\r\n /** Icon position in the button. Defaults to 'left' */\r\n iconPosition?: 'left' | 'right';\r\n}\r\n\r\n/**\r\n * TextButton component\r\n */\r\nconst TextButton = React.forwardRef<HTMLButtonElement, TextButtonProps>(\r\n ({ children = '', variant = 'primary', type = 'button', size = Size.Medium, invertFocus, width: width = 'auto', testId, disabled, flatEdge, icon, iconPosition = 'left', ...props }, ref) => {\r\n // Let's filter out properties that we don't need to render.\r\n const { loading, ...renderProps } = props;\r\n\r\n const theme = useTheme();\r\n const renderIcon = () => (\r\n <><span className={(children ? 'extramargin ' : '') + (loading ? 'icon loading' : 'icon')}>{icon}</span></>\r\n )\r\n\r\n const renderContent = () => (\r\n <>\r\n {icon && iconPosition == 'left' && renderIcon()}\r\n {children && <span className={loading ? 'label loading' : 'label'}>{children}</span>}\r\n {icon && iconPosition == 'right' && renderIcon()}\r\n {loading && <LoadingIndicator />}\r\n </>\r\n );\r\n\r\n let TextButtonStyled = TextButtonPrimaryStyled;\r\n switch (variant) {\r\n case 'secondary':\r\n TextButtonStyled = TextButtonSecondaryStyled;\r\n break;\r\n case 'tertiary':\r\n TextButtonStyled = TextButtonTertiaryStyled;\r\n break;\r\n case 'positive':\r\n TextButtonStyled = TextButtonPositiveStyled;\r\n break;\r\n case 'destructive':\r\n TextButtonStyled = TextButtonDestructiveStyled;\r\n break;\r\n case 'secondaryDestructive':\r\n TextButtonStyled = TextButtonSecondaryDestructiveStyled;\r\n break;\r\n case 'secondaryInverse':\r\n TextButtonStyled = TextButtonInvertedSecondaryStyled;\r\n break;\r\n }\r\n\r\n return (\r\n <TextButtonStyled\r\n {...renderProps}\r\n $size={size}\r\n $invertFocus={invertFocus} \r\n ref={ref}\r\n disabled={disabled}\r\n $iconOnly={!children}\r\n type={type}\r\n $flatEdge={flatEdge}\r\n $width={width}\r\n data-testid={testId}\r\n className={props.loading ? 'loading-state ' + props.className : ' ' + props.className}\r\n onMouseDown={defaultOnMouseDownHandler}>\r\n <TextButtonContentContainer>{renderContent()}</TextButtonContentContainer>\r\n </TextButtonStyled>\r\n );\r\n },\r\n);\r\n\r\nexport default TextButton;\r\n"],"mappings":";;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAASC,QAAQ,QAAQ,mBAAmB;AACzD,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,WAAW;AACvG,SAASC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACpE,SAASC,IAAI,QAAkB,UAAU;AACzC,SAASC,yBAAyB,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEtD,MAAMC,eAAe,GAAGA,CAACC,QAA4B,EAAEC,MAAc,KAAK;EACxE,QAAQD,QAAQ;IACd,KAAK,MAAM;MACT,OAAO,OAAOC,MAAM,MAAMA,MAAM,QAAQ;IAE1C,KAAK,OAAO;MACV,OAAO,GAAGA,MAAM,cAAcA,MAAM,IAAI;IAE1C,KAAK,MAAM;IACX;MACE,OAAO,GAAGA,MAAM,IAAI;EACxB;AACF,CAAC;AAED,OAA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,UAAA,CAAAyB,SAAA;EAjFApB,OAAO,EAAAqB,GAAA,CAAAC,KAAA,EAAG,SAAS,EAAG,WAAW,EAAG,UAAU,EAAG,UAAU,EAAG,aAAa,EAAG,sBAAsB,EAAG,kBAAkB;EAMzHnB,WAAW,EAAAkB,GAAA,CAAAE,IAAA;EAEXnB,KAAK,EAAAiB,GAAA,CAAAG,SAAA,EAAAH,GAAA,CAAAC,KAAA,EAAG,MAAM,IAAAD,GAAA,CAAAI,MAAA;EAEdd,OAAO,EAAAU,GAAA,CAAAE,IAAA;EAEPlB,MAAM,EAAAgB,GAAA,CAAAI,MAAA;EAENlB,IAAI,EAAAc,GAAA,CAAAK,IAAA;EAEJlB,YAAY,EAAAa,GAAA,CAAAC,KAAA,EAAG,MAAM,EAAG,OAAO;AAAA;AAmEjC,eAAe3B,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '../../test-utils';
|
|
3
|
+
import { TextButton } from '../index';
|
|
4
|
+
import 'jest-styled-components';
|
|
5
|
+
import { COLORS } from '../../styles';
|
|
6
|
+
import { Size } from '../..';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
describe('<TextButton />', () => {
|
|
12
|
+
it('Renders primary button', async () => {
|
|
13
|
+
const { queryByText, getByTestId } = render(
|
|
14
|
+
<TextButton variant="primary" testId="TestButton" size={Size.Large}>
|
|
15
|
+
TestButton
|
|
16
|
+
</TextButton>,
|
|
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
|
+
<TextButton variant="secondary" testId="TestButton">
|
|
26
|
+
TestButton
|
|
27
|
+
</TextButton>,
|
|
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
|
+
<TextButton variant="tertiary" testId="TestButton">
|
|
37
|
+
TestButton
|
|
38
|
+
</TextButton>,
|
|
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
|
+
});
|
|
@@ -0,0 +1,119 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '../../test-utils';
|
|
3
|
+
import { TextButton } from '../index';
|
|
4
|
+
import 'jest-styled-components';
|
|
5
|
+
import { COLORS } from '../../styles';
|
|
6
|
+
import { Size } from '../..';
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
describe('<TextButton />', () => {
|
|
12
|
+
it('Renders primary button', async () => {
|
|
13
|
+
const { queryByText, getByTestId } = render(
|
|
14
|
+
<TextButton variant="primary" testId="TestButton" size={Size.Large}>
|
|
15
|
+
TestButton
|
|
16
|
+
</TextButton>,
|
|
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
|
+
<TextButton variant="secondary" testId="TestButton">
|
|
26
|
+
TestButton
|
|
27
|
+
</TextButton>,
|
|
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
|
+
<TextButton variant="tertiary" testId="TestButton">
|
|
37
|
+
TestButton
|
|
38
|
+
</TextButton>,
|
|
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
|
+
});
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,124 @@
|
|
|
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-link'));
|
|
41
|
+
expect(cardClicked).toHaveBeenCalled();
|
|
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).toHaveBeenCalled();
|
|
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
|
+
})
|