@laerdal/life-react-components 6.0.0-dev.2.full → 6.0.0-dev.21.full.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 +40 -11
- package/dist/Accordion/ContentAccordion.cjs.map +1 -1
- package/dist/Accordion/ContentAccordion.js +40 -11
- package/dist/Accordion/ContentAccordion.js.map +1 -1
- package/dist/Accordion/__tests__/AccordionMenu.test.tsx +42 -0
- package/dist/Accordion/__tests__/ContentAccordion.test.tsx +150 -0
- package/dist/Accordion/styles.cjs +51 -13
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.js +51 -13
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/AuthPage/__tests__/AuthPage.test.tsx +27 -0
- package/dist/Banners/Banner.cjs +38 -34
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.d.ts +2 -3
- package/dist/Banners/Banner.js +38 -34
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/__tests__/Banner.test.tsx +47 -0
- package/dist/Banners/__tests__/OverviewBanner.test.tsx +20 -0
- package/dist/Banners/styles.cjs +8 -16
- package/dist/Banners/styles.cjs.map +1 -1
- package/dist/Banners/styles.js +8 -16
- package/dist/Banners/styles.js.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.cjs +8 -2
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +8 -2
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/__tests__/Breadcrumb.test.tsx +78 -0
- package/dist/Breadcrumb/styles.cjs +15 -4
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.js +15 -4
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +27 -6
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.js +27 -6
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/Button.cjs +179 -47
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.d.ts +2 -0
- package/dist/Button/Button.js +179 -47
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +83 -21
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.js +83 -21
- package/dist/Button/Iconbutton.js.map +1 -1
- 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/Card/HorizontalCard/HorizontalCard.cjs +20 -5
- package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.js +20 -5
- package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +12 -3
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.js +12 -3
- package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +8 -2
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +8 -2
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
- package/dist/Card/HorizontalCard/__tests__/HorizontalCard.test.tsx +71 -0
- package/dist/Card/HorizontalCard/__tests__/VerticalCard.test.tsx +124 -0
- package/dist/Card/VerticalCard/Card.cjs +67 -16
- package/dist/Card/VerticalCard/Card.cjs.map +1 -1
- package/dist/Card/VerticalCard/Card.d.ts +1 -0
- package/dist/Card/VerticalCard/Card.js +67 -16
- package/dist/Card/VerticalCard/Card.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +34 -7
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.js +34 -7
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +27 -8
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.d.ts +5 -0
- package/dist/Card/VerticalCard/CardMiddleSection.js +27 -8
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.cjs +12 -3
- package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.js +12 -3
- package/dist/Card/VerticalCard/CardTopSection.js.map +1 -1
- package/dist/Card/__tests__/Card.test.tsx +146 -0
- package/dist/Chips/ChipStyles.cjs +4 -1
- package/dist/Chips/ChipStyles.cjs.map +1 -1
- package/dist/Chips/ChipStyles.js +4 -1
- package/dist/Chips/ChipStyles.js.map +1 -1
- package/dist/Chips/FilterChip.cjs +1 -0
- package/dist/Chips/FilterChip.cjs.map +1 -1
- package/dist/Chips/FilterChip.js +1 -0
- package/dist/Chips/FilterChip.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/ChipInputField.cjs +16 -4
- package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
- package/dist/ChipsInput/ChipInputField.js +16 -4
- package/dist/ChipsInput/ChipInputField.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 +12 -3
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +12 -3
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +172 -42
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.js +172 -42
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +36 -10
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +36 -10
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +12 -3
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +12 -3
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Dropdown/__tests__/DropdownFilter.test.tsx +39 -0
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +4 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +4 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
- package/dist/Footer/__tests__/Footer.test.tsx +182 -0
- package/dist/GlobalNavigationBar/Logo.cjs +2 -1
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.js +2 -1
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/__tests__/Logo.test.tsx +39 -0
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +10 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.js +10 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs +3 -2
- package/dist/GlobalNavigationBar/desktop/RightSideNav.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js +3 -2
- package/dist/GlobalNavigationBar/desktop/RightSideNav.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +4 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.js +4 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.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/CommonStyles.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
- 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/HyperLink/HyperLink.cjs +18 -2
- package/dist/HyperLink/HyperLink.cjs.map +1 -1
- package/dist/HyperLink/HyperLink.d.ts +2 -0
- package/dist/HyperLink/HyperLink.js +18 -2
- package/dist/HyperLink/HyperLink.js.map +1 -1
- package/dist/HyperLink/styling.cjs +38 -8
- package/dist/HyperLink/styling.cjs.map +1 -1
- package/dist/HyperLink/styling.js +38 -8
- package/dist/HyperLink/styling.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +54 -14
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.js +54 -14
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +149 -43
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.d.ts +1 -1
- package/dist/InputFields/DatepickerField.js +150 -44
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.cjs +20 -5
- package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.js +20 -5
- package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
- package/dist/InputFields/Label.cjs +38 -11
- package/dist/InputFields/Label.cjs.map +1 -1
- package/dist/InputFields/Label.js +38 -11
- package/dist/InputFields/Label.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +66 -16
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +66 -16
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +4 -1
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.d.ts +1 -1
- package/dist/InputFields/PasswordField.js +4 -1
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/QuickSearch.cjs +30 -6
- package/dist/InputFields/QuickSearch.cjs.map +1 -1
- package/dist/InputFields/QuickSearch.js +30 -6
- package/dist/InputFields/QuickSearch.js.map +1 -1
- package/dist/InputFields/RadioButton.cjs +63 -15
- package/dist/InputFields/RadioButton.cjs.map +1 -1
- package/dist/InputFields/RadioButton.js +63 -15
- package/dist/InputFields/RadioButton.js.map +1 -1
- package/dist/InputFields/RichTextField.cjs +60 -15
- package/dist/InputFields/RichTextField.cjs.map +1 -1
- package/dist/InputFields/RichTextField.js +60 -15
- package/dist/InputFields/RichTextField.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +4 -1
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +4 -1
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +9 -3
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.d.ts +1 -1
- package/dist/InputFields/TextField.js +9 -3
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +68 -17
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.js +68 -17
- package/dist/InputFields/Textarea.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/InputFields/components/SearchBarInput.cjs +28 -7
- package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
- package/dist/InputFields/components/SearchBarInput.js +28 -7
- package/dist/InputFields/components/SearchBarInput.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs +60 -15
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.js +60 -15
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +95 -39
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +1 -2
- package/dist/InputFields/styling.js +95 -39
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/LinearProgress/LinearProgress.cjs +161 -53
- package/dist/LinearProgress/LinearProgress.cjs.map +1 -1
- package/dist/LinearProgress/LinearProgress.js +161 -53
- package/dist/LinearProgress/LinearProgress.js.map +1 -1
- package/dist/LinearProgress/__tests__/LinearProgress.test.tsx +25 -0
- package/dist/List/ListRow.cjs +36 -9
- package/dist/List/ListRow.cjs.map +1 -1
- package/dist/List/ListRow.js +36 -9
- package/dist/List/ListRow.js.map +1 -1
- package/dist/List/__tests__/ListRow.test.tsx +18 -0
- package/dist/LoadingIndicator/LoadingIndicator.cjs +4 -1
- package/dist/LoadingIndicator/LoadingIndicator.cjs.map +1 -1
- package/dist/LoadingIndicator/LoadingIndicator.js +4 -1
- package/dist/LoadingIndicator/LoadingIndicator.js.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs +4 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.js +4 -1
- package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
- package/dist/LoadingPage/__tests__/GlobalLoadingPage.test.tsx +23 -0
- package/dist/MenuItem/MenuItem.cjs +101 -26
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.js +101 -26
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/MiniProductCard/MiniProductCard.cjs +15 -1
- package/dist/MiniProductCard/MiniProductCard.cjs.map +1 -1
- package/dist/MiniProductCard/MiniProductCard.d.ts +1 -0
- package/dist/MiniProductCard/MiniProductCard.js +15 -1
- package/dist/MiniProductCard/MiniProductCard.js.map +1 -1
- package/dist/Modals/Modal.cjs +4 -1
- package/dist/Modals/Modal.cjs.map +1 -1
- package/dist/Modals/Modal.js +4 -1
- package/dist/Modals/Modal.js.map +1 -1
- package/dist/Modals/ModalContent.cjs +24 -6
- package/dist/Modals/ModalContent.cjs.map +1 -1
- package/dist/Modals/ModalContent.js +24 -6
- package/dist/Modals/ModalContent.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +12 -3
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.js +12 -3
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Modals/ModalNote.cjs +16 -4
- package/dist/Modals/ModalNote.cjs.map +1 -1
- package/dist/Modals/ModalNote.js +16 -4
- package/dist/Modals/ModalNote.js.map +1 -1
- package/dist/Modals/ModalStyles.cjs +44 -11
- package/dist/Modals/ModalStyles.cjs.map +1 -1
- package/dist/Modals/ModalStyles.js +44 -11
- package/dist/Modals/ModalStyles.js.map +1 -1
- 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/NavItem.cjs +11 -2
- package/dist/NavItem/NavItem.cjs.map +1 -1
- package/dist/NavItem/NavItem.js +11 -2
- package/dist/NavItem/NavItem.js.map +1 -1
- package/dist/NavItem/__tests__/NavItem.test.ts +6 -0
- package/dist/NotificationDot/NotificationDot.cjs +17 -2
- package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
- package/dist/NotificationDot/NotificationDot.js +17 -2
- package/dist/NotificationDot/NotificationDot.js.map +1 -1
- package/dist/NotificationDot/__tests__/NotificationDot.test.tsx +33 -0
- package/dist/Paginator/Paginator.cjs +86 -35
- package/dist/Paginator/Paginator.cjs.map +1 -1
- package/dist/Paginator/Paginator.d.ts +1 -5
- package/dist/Paginator/Paginator.js +86 -35
- package/dist/Paginator/Paginator.js.map +1 -1
- package/dist/Paginator/__tests__/Paginator.test.tsx +33 -0
- package/dist/Panel/Panel.cjs +4 -1
- package/dist/Panel/Panel.cjs.map +1 -1
- package/dist/Panel/Panel.js +4 -1
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Popover/Popover.cjs +22 -3
- package/dist/Popover/Popover.cjs.map +1 -1
- package/dist/Popover/Popover.js +22 -3
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/Popover/__tests__/Popover.test.tsx +64 -0
- package/dist/ProfileButton/ProfileButton.cjs +9 -2
- package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
- package/dist/ProfileButton/ProfileButton.js +9 -2
- package/dist/ProfileButton/ProfileButton.js.map +1 -1
- package/dist/ProfileButton/__tests__/ProfileButton.test.tsx +31 -0
- package/dist/QuizButton/__tests__/QuizButton.test.tsx +53 -0
- package/dist/SegmentControl/SegmentControl.cjs +46 -11
- package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
- package/dist/SegmentControl/SegmentControl.js +46 -11
- package/dist/SegmentControl/SegmentControl.js.map +1 -1
- package/dist/SegmentControl/__tests__/SegmentControl.test.tsx +145 -0
- package/dist/SideMenu/SideMenuHeader.cjs +12 -3
- package/dist/SideMenu/SideMenuHeader.cjs.map +1 -1
- package/dist/SideMenu/SideMenuHeader.js +12 -3
- package/dist/SideMenu/SideMenuHeader.js.map +1 -1
- package/dist/SideMenu/__tests__/SideMenu.test.tsx +99 -0
- package/dist/Switcher/SwitcherMenuItem.cjs +4 -1
- package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.js +4 -1
- package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
- package/dist/Switcher/__tests__/SwitcherMenuItem.tsx +14 -0
- package/dist/Table/TableFooter.cjs +8 -2
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +8 -2
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/Table/TableStyles.cjs +132 -33
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.js +132 -33
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Table/__tests__/Table.test.tsx +499 -0
- package/dist/Tabs/HorizontalTabs.cjs +68 -18
- package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
- package/dist/Tabs/HorizontalTabs.js +68 -18
- package/dist/Tabs/HorizontalTabs.js.map +1 -1
- package/dist/Tabs/TabLink.cjs +4 -1
- package/dist/Tabs/TabLink.cjs.map +1 -1
- package/dist/Tabs/TabLink.js +4 -1
- package/dist/Tabs/TabLink.js.map +1 -1
- package/dist/Tabs/VerticalTabs.cjs +1 -0
- package/dist/Tabs/VerticalTabs.cjs.map +1 -1
- package/dist/Tabs/VerticalTabs.js +1 -0
- package/dist/Tabs/VerticalTabs.js.map +1 -1
- 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/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/Tag/__tests__/Tag.test.tsx +86 -0
- package/dist/Tile/Tile.cjs +8 -2
- package/dist/Tile/Tile.cjs.map +1 -1
- package/dist/Tile/Tile.js +8 -2
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/TileCommonItems.cjs +8 -2
- package/dist/Tile/TileCommonItems.cjs.map +1 -1
- package/dist/Tile/TileCommonItems.js +8 -2
- package/dist/Tile/TileCommonItems.js.map +1 -1
- package/dist/Tile/TileFooter.cjs +4 -1
- package/dist/Tile/TileFooter.cjs.map +1 -1
- package/dist/Tile/TileFooter.js +4 -1
- package/dist/Tile/TileFooter.js.map +1 -1
- package/dist/Tile/TileHeader.cjs +12 -3
- package/dist/Tile/TileHeader.cjs.map +1 -1
- package/dist/Tile/TileHeader.js +12 -3
- package/dist/Tile/TileHeader.js.map +1 -1
- package/dist/Toasters/Toast.cjs +62 -13
- package/dist/Toasters/Toast.cjs.map +1 -1
- package/dist/Toasters/Toast.js +62 -13
- package/dist/Toasters/Toast.js.map +1 -1
- package/dist/Toasters/__tests__/Toast.test.tsx +74 -0
- package/dist/Toggles/ToggleButton.cjs +9 -3
- package/dist/Toggles/ToggleButton.cjs.map +1 -1
- package/dist/Toggles/ToggleButton.d.ts +1 -1
- package/dist/Toggles/ToggleButton.js +9 -3
- package/dist/Toggles/ToggleButton.js.map +1 -1
- package/dist/Toggles/TogglerStyles.cjs +22 -8
- package/dist/Toggles/TogglerStyles.cjs.map +1 -1
- package/dist/Toggles/TogglerStyles.js +22 -8
- package/dist/Toggles/TogglerStyles.js.map +1 -1
- package/dist/Toggles/__tests__/ToggleButton.test.tsx +53 -0
- package/dist/Toggles/__tests__/ToggleSwitch.test.tsx +87 -0
- package/dist/Tooltips/TooltipStyles.cjs +28 -6
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.js +28 -6
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/Tooltips/__tests__/TooltipWrapper.test.tsx +16 -0
- package/dist/common/InputStyling.cjs +30 -7
- package/dist/common/InputStyling.cjs.map +1 -1
- package/dist/common/InputStyling.js +30 -7
- package/dist/common/InputStyling.js.map +1 -1
- package/dist/custom.d.ts +2 -0
- package/dist/styles/colors.cjs +439 -84
- package/dist/styles/colors.cjs.map +1 -1
- package/dist/styles/colors.d.ts +200 -11
- package/dist/styles/colors.js +439 -84
- package/dist/styles/colors.js.map +1 -1
- package/dist/styles/global.cjs +19 -2
- package/dist/styles/global.cjs.map +1 -1
- package/dist/styles/global.d.ts +3 -2
- package/dist/styles/global.js +18 -3
- package/dist/styles/global.js.map +1 -1
- package/dist/styles/index.cjs +21 -9
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.d.ts +2 -2
- package/dist/styles/index.js +18 -6
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/react-datepicker.css +766 -0
- package/dist/test-utils.cjs +7 -1
- package/dist/test-utils.cjs.map +1 -1
- package/dist/test-utils.js +7 -1
- 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 +12 -5
|
@@ -24,7 +24,10 @@ const CardBottomSectionProgressStyles = exports.CardBottomSectionProgressStyles
|
|
|
24
24
|
const CardBottomSectionNotesStyles = exports.CardBottomSectionNotesStyles = _styledComponents.default.div`
|
|
25
25
|
height: 48px;
|
|
26
26
|
position: relative;
|
|
27
|
-
color: ${props => _index.COLORS.
|
|
27
|
+
color: ${props => _index.COLORS.generateToken({
|
|
28
|
+
componentType: 'text',
|
|
29
|
+
defaultVariant: 'subtle'
|
|
30
|
+
}, props.theme)};
|
|
28
31
|
display: flex;
|
|
29
32
|
flex-direction: row;
|
|
30
33
|
align-items: center;
|
|
@@ -46,7 +49,10 @@ const CardBottomSectionAuthorStyles = exports.CardBottomSectionAuthorStyles = _s
|
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
${props => props.$disabled ? `
|
|
49
|
-
color: ${_index.COLORS.
|
|
52
|
+
color: ${_index.COLORS.generateToken({
|
|
53
|
+
componentType: 'text',
|
|
54
|
+
state: 'disabled'
|
|
55
|
+
}, props.theme)};
|
|
50
56
|
svg, img {
|
|
51
57
|
filter: grayscale(100%);
|
|
52
58
|
}
|
|
@@ -55,7 +61,10 @@ const CardBottomSectionAuthorStyles = exports.CardBottomSectionAuthorStyles = _s
|
|
|
55
61
|
`;
|
|
56
62
|
const CardBottomSectionDivider = exports.CardBottomSectionDivider = _styledComponents.default.div`
|
|
57
63
|
border-top: 1px;
|
|
58
|
-
border-top-color: ${props => _index.COLORS.
|
|
64
|
+
border-top-color: ${props => _index.COLORS.generateToken({
|
|
65
|
+
componentType: 'border',
|
|
66
|
+
defaultVariant: 'subtle'
|
|
67
|
+
}, props.theme)};
|
|
59
68
|
border-top-style: solid;
|
|
60
69
|
width: 100%;
|
|
61
70
|
`;
|
|
@@ -91,7 +100,10 @@ const CardBottomSectionButtonRowContainerStyles = exports.CardBottomSectionButto
|
|
|
91
100
|
justify-content: flex-end;
|
|
92
101
|
align-items: center;
|
|
93
102
|
border-top: 1px;
|
|
94
|
-
border-top-color: ${props => _index.COLORS.
|
|
103
|
+
border-top-color: ${props => _index.COLORS.generateToken({
|
|
104
|
+
componentType: 'border',
|
|
105
|
+
defaultVariant: 'subtle'
|
|
106
|
+
}, props.theme)};
|
|
95
107
|
border-top-style: solid;
|
|
96
108
|
|
|
97
109
|
button:last-child {
|
|
@@ -102,8 +114,15 @@ const CardBottomSectionButtonRowContainerStyles = exports.CardBottomSectionButto
|
|
|
102
114
|
margin: 8px 0px 0px 0px;
|
|
103
115
|
}
|
|
104
116
|
|
|
117
|
+
.card-bottom-section-action-button {
|
|
118
|
+
z-index: 2000;
|
|
119
|
+
}
|
|
120
|
+
|
|
105
121
|
svg {
|
|
106
|
-
color: ${props => _index.COLORS.
|
|
122
|
+
color: ${props => _index.COLORS.generateToken({
|
|
123
|
+
componentType: 'icon',
|
|
124
|
+
defaultVariant: 'subtle'
|
|
125
|
+
}, props.theme)};
|
|
107
126
|
}
|
|
108
127
|
`;
|
|
109
128
|
const CardBottomSectionContainer = exports.CardBottomSectionContainer = _styledComponents.default.div`
|
|
@@ -168,13 +187,19 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
168
187
|
}), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionNotesStyles, {
|
|
169
188
|
children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionNoteLeftStyles, {
|
|
170
189
|
children: [noteLeftIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXXS, {
|
|
171
|
-
color: _index.COLORS.
|
|
190
|
+
color: _index.COLORS.generateToken({
|
|
191
|
+
componentType: 'icon',
|
|
192
|
+
defaultVariant: 'subtle'
|
|
193
|
+
}, theme),
|
|
172
194
|
textStyle: _index.ComponentTextStyle.Bold,
|
|
173
195
|
children: noteLeft
|
|
174
196
|
})]
|
|
175
197
|
}), (noteRight || noteRightIcon) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardBottomSectionNoteRightStyles, {
|
|
176
198
|
children: [noteRightIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentXXS, {
|
|
177
|
-
color: _index.COLORS.
|
|
199
|
+
color: _index.COLORS.generateToken({
|
|
200
|
+
componentType: 'icon',
|
|
201
|
+
defaultVariant: 'subtle'
|
|
202
|
+
}, theme),
|
|
178
203
|
textStyle: _index.ComponentTextStyle.Bold,
|
|
179
204
|
children: noteRight
|
|
180
205
|
})]
|
|
@@ -191,6 +216,8 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
191
216
|
}), actions && /*#__PURE__*/(0, _jsxRuntime.jsx)(RightItemContainer, {
|
|
192
217
|
children: actions.map((x, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.IconButton, {
|
|
193
218
|
ref: elRefs[index],
|
|
219
|
+
className: "card-bottom-section-action-button",
|
|
220
|
+
"z-index": 2000,
|
|
194
221
|
disabled: disabled,
|
|
195
222
|
variant: "secondary",
|
|
196
223
|
shape: "circular",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardBottomSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_Button","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","CardBottomSectionProgressStyles","exports","styled","div","CardBottomSectionNotesStyles","props","COLORS","getColor","theme","CardBottomSectionAuthorStyles","$disabled","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","LeftItemContainer","RightItemContainer","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","useTheme","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","rest","_objectWithoutProperties2","jsx","Button","size","Size","XSmall","XXSmall","includes","Small","Large","Medium","children","jsxs","LinearProgress","type","variant","LinearProgressVariant","Normal","value","max","ComponentXXS","color","textStyle","ComponentTextStyle","Bold","x","index","IconButton","shape","action","onClick","icon","propTypes","_propTypes","number","string","node","arrayOf","isRequired","func","bool","_default"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { Button, ButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport type CardStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: CardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.getColor('neutral_300', props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, ...rest} = leftButton;\r\n return (<Button \r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>)\r\n }\r\n}\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <CardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n key={index}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,MAAAK,SAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,W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IAAAC,QAAA,GAAA3F,OAAA,CAAA9B,OAAA,GAiNK+C,iBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CardBottomSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_Button","_jsxRuntime","_excluded","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ownKeys","keys","getOwnPropertySymbols","o","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","CardBottomSectionProgressStyles","exports","styled","div","CardBottomSectionNotesStyles","props","COLORS","generateToken","componentType","defaultVariant","theme","CardBottomSectionAuthorStyles","$disabled","state","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","LeftItemContainer","RightItemContainer","getColor","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","LinearProgressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","useTheme","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","rest","_objectWithoutProperties2","jsx","Button","size","Size","XSmall","XXSmall","includes","Small","Large","Medium","children","jsxs","LinearProgress","type","variant","LinearProgressVariant","Normal","value","max","ComponentXXS","color","textStyle","ComponentTextStyle","Bold","x","index","IconButton","className","shape","action","onClick","icon","propTypes","_propTypes","number","string","node","arrayOf","isRequired","func","bool","_default"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { Button, ButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport type CardStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: CardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.generateToken({ componentType:'text', defaultVariant:'subtle' }, props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.generateToken({ componentType: 'text', state: 'disabled' }, props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n .card-bottom-section-action-button {\r\n z-index: 2000;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({componentType:'icon', defaultVariant:'subtle' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, ...rest} = leftButton;\r\n return (<Button \r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>)\r\n }\r\n}\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <CardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n className=\"card-bottom-section-action-button\"\r\n key={index}\r\n z-index={2000}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AASA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,WAAA,GAAAJ,OAAA;AAAA,MAAA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H,OAAA,CAAAyH,IAAA;EAEZ3D,SAAS,EAAAwD,UAAA,CAAAtH,OAAA,CAAAwH,MAAA;EAETzD,aAAa,EAAAuD,UAAA,CAAAtH,OAAA,CAAAyH,IAAA;EAMbxD,UAAU,EAAAqD,UAAA,CAAAtH,OAAA,CAAAwH,MAAA;EAEVrD,OAAO,EAAAmD,UAAA,CAAAtH,OAAA,CAAA0H,OAAA,CAAAJ,UAAA,CAAAtH,OAAA,CAAAiH,KAAA;IAhCPG,IAAI,EAAAE,UAAA,CAAAtH,OAAA,CAAAyH,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,UAAA,CAAAtH,OAAA,CAAA4H,IAAA,CAAAD;EAAA;EAiCPzD,IAAI,EAAAoD,UAAA,CAAAtH,OAAA,CAAAyH,IAAA;EAEJrD,QAAQ,EAAAkD,UAAA,CAAAtH,OAAA,CAAA6H;AAAA;AAAA,IAAAC,QAAA,GAAAhG,OAAA,CAAA9B,OAAA,GAuNKmD,iBAAiB","ignoreList":[]}
|
|
@@ -15,7 +15,10 @@ export const CardBottomSectionProgressStyles = styled.div`
|
|
|
15
15
|
export const CardBottomSectionNotesStyles = styled.div`
|
|
16
16
|
height: 48px;
|
|
17
17
|
position: relative;
|
|
18
|
-
color: ${props => COLORS.
|
|
18
|
+
color: ${props => COLORS.generateToken({
|
|
19
|
+
componentType: 'text',
|
|
20
|
+
defaultVariant: 'subtle'
|
|
21
|
+
}, props.theme)};
|
|
19
22
|
display: flex;
|
|
20
23
|
flex-direction: row;
|
|
21
24
|
align-items: center;
|
|
@@ -37,7 +40,10 @@ export const CardBottomSectionAuthorStyles = styled.div`
|
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
${props => props.$disabled ? `
|
|
40
|
-
color: ${COLORS.
|
|
43
|
+
color: ${COLORS.generateToken({
|
|
44
|
+
componentType: 'text',
|
|
45
|
+
state: 'disabled'
|
|
46
|
+
}, props.theme)};
|
|
41
47
|
svg, img {
|
|
42
48
|
filter: grayscale(100%);
|
|
43
49
|
}
|
|
@@ -46,7 +52,10 @@ export const CardBottomSectionAuthorStyles = styled.div`
|
|
|
46
52
|
`;
|
|
47
53
|
export const CardBottomSectionDivider = styled.div`
|
|
48
54
|
border-top: 1px;
|
|
49
|
-
border-top-color: ${props => COLORS.
|
|
55
|
+
border-top-color: ${props => COLORS.generateToken({
|
|
56
|
+
componentType: 'border',
|
|
57
|
+
defaultVariant: 'subtle'
|
|
58
|
+
}, props.theme)};
|
|
50
59
|
border-top-style: solid;
|
|
51
60
|
width: 100%;
|
|
52
61
|
`;
|
|
@@ -82,7 +91,10 @@ export const CardBottomSectionButtonRowContainerStyles = styled.div`
|
|
|
82
91
|
justify-content: flex-end;
|
|
83
92
|
align-items: center;
|
|
84
93
|
border-top: 1px;
|
|
85
|
-
border-top-color: ${props => COLORS.
|
|
94
|
+
border-top-color: ${props => COLORS.generateToken({
|
|
95
|
+
componentType: 'border',
|
|
96
|
+
defaultVariant: 'subtle'
|
|
97
|
+
}, props.theme)};
|
|
86
98
|
border-top-style: solid;
|
|
87
99
|
|
|
88
100
|
button:last-child {
|
|
@@ -93,8 +105,15 @@ export const CardBottomSectionButtonRowContainerStyles = styled.div`
|
|
|
93
105
|
margin: 8px 0px 0px 0px;
|
|
94
106
|
}
|
|
95
107
|
|
|
108
|
+
.card-bottom-section-action-button {
|
|
109
|
+
z-index: 2000;
|
|
110
|
+
}
|
|
111
|
+
|
|
96
112
|
svg {
|
|
97
|
-
color: ${props => COLORS.
|
|
113
|
+
color: ${props => COLORS.generateToken({
|
|
114
|
+
componentType: 'icon',
|
|
115
|
+
defaultVariant: 'subtle'
|
|
116
|
+
}, props.theme)};
|
|
98
117
|
}
|
|
99
118
|
`;
|
|
100
119
|
export const CardBottomSectionContainer = styled.div`
|
|
@@ -159,13 +178,19 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
159
178
|
}), (noteLeft || noteLeftIcon || noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNotesStyles, {
|
|
160
179
|
children: [(noteLeft || noteLeftIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNoteLeftStyles, {
|
|
161
180
|
children: [noteLeftIcon, /*#__PURE__*/_jsx(ComponentXXS, {
|
|
162
|
-
color: COLORS.
|
|
181
|
+
color: COLORS.generateToken({
|
|
182
|
+
componentType: 'icon',
|
|
183
|
+
defaultVariant: 'subtle'
|
|
184
|
+
}, theme),
|
|
163
185
|
textStyle: ComponentTextStyle.Bold,
|
|
164
186
|
children: noteLeft
|
|
165
187
|
})]
|
|
166
188
|
}), (noteRight || noteRightIcon) && /*#__PURE__*/_jsxs(CardBottomSectionNoteRightStyles, {
|
|
167
189
|
children: [noteRightIcon, /*#__PURE__*/_jsx(ComponentXXS, {
|
|
168
|
-
color: COLORS.
|
|
190
|
+
color: COLORS.generateToken({
|
|
191
|
+
componentType: 'icon',
|
|
192
|
+
defaultVariant: 'subtle'
|
|
193
|
+
}, theme),
|
|
169
194
|
textStyle: ComponentTextStyle.Bold,
|
|
170
195
|
children: noteRight
|
|
171
196
|
})]
|
|
@@ -182,6 +207,8 @@ const CardBottomSection = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
182
207
|
}), actions && /*#__PURE__*/_jsx(RightItemContainer, {
|
|
183
208
|
children: actions.map((x, index) => /*#__PURE__*/_jsx(IconButton, {
|
|
184
209
|
ref: elRefs[index],
|
|
210
|
+
className: "card-bottom-section-action-button",
|
|
211
|
+
"z-index": 2000,
|
|
185
212
|
disabled: disabled,
|
|
186
213
|
variant: "secondary",
|
|
187
214
|
shape: "circular",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardBottomSection.js","names":["React","styled","useTheme","COLORS","ComponentTextStyle","ComponentXXS","LinearProgress","LinearProgressType","LinearProgressVariant","Size","Button","IconButton","jsx","_jsx","jsxs","_jsxs","CardBottomSectionProgressStyles","div","CardBottomSectionNotesStyles","props","getColor","theme","CardBottomSectionAuthorStyles","$disabled","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","LeftItemContainer","RightItemContainer","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","rest","_objectWithoutProperties","_excluded","_objectSpread","size","XSmall","XXSmall","includes","Small","Large","Medium","children","type","variant","Normal","value","max","color","textStyle","Bold","x","index","shape","action","e","onClick","icon","propTypes","_pt","number","string","node","arrayOf","isRequired","func","bool"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { Button, ButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport type CardStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: CardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.getColor('neutral_500', props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.getColor('neutral_300', props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, ...rest} = leftButton;\r\n return (<Button \r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>)\r\n }\r\n}\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.getColor('neutral_500', theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <CardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n key={index}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SACEC,MAAM,EACNC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,IAAI,QACC,aAAa;AACpB,SAASC,MAAM,EAAeC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA0C/D,OAAO,MAAMC,+BAA+B,GAAGf,MAAM,CAACgB,GAAG;AACzD;AACA,CAAC;AAED,OAAO,MAAMC,4BAA4B,GAAGjB,MAAM,CAACgB,GAAG;AACtD;AACA;AACA,WAAWE,KAAK,IAAIhB,MAAM,CAACiB,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AAC/D;AACA;AACA;AACA,CAAC;AAED,OAAO,MAAMC,6BAA6B,GAAGrB,MAAM,CAACgB,GAA4B;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIE,KAAK,IAAIA,KAAK,CAACI,SAAS,GAAG;AAC/B,aAAapB,MAAM,CAACiB,QAAQ,CAAC,aAAa,EAAED,KAAK,CAACE,KAAK,CAAC;AACxD;AACA;AACA;AACA;AACA,GAAG,GAAG,EAAE;AACR,CAAC;AAED,OAAO,MAAMG,wBAAwB,GAAGvB,MAAM,CAACgB,GAAG;AAClD;AACA,sBAAsBE,KAAK,IAAIhB,MAAM,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C,OAAO,EAAA4C,GAAA,CAAAI,OAAA,CAAAJ,GAAA,CAAAN,KAAA;IAhCPI,IAAI,EAAAE,GAAA,CAAAG,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,GAAA,CAAAM,IAAA,CAAAD;EAAA;EAiCPlD,IAAI,EAAA6C,GAAA,CAAAG,IAAA;EAEJ9C,QAAQ,EAAA2C,GAAA,CAAAO;AAAA;AAiNV,eAAelE,iBAAiB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"CardBottomSection.js","names":["React","styled","useTheme","COLORS","ComponentTextStyle","ComponentXXS","LinearProgress","LinearProgressType","LinearProgressVariant","Size","Button","IconButton","jsx","_jsx","jsxs","_jsxs","CardBottomSectionProgressStyles","div","CardBottomSectionNotesStyles","props","generateToken","componentType","defaultVariant","theme","CardBottomSectionAuthorStyles","$disabled","state","CardBottomSectionDivider","CardBottomSectionNoteLeftStyles","CardBottomSectionNoteRightStyles","CardBottomSectionButtonRowContainerStyles","CardBottomSectionContainer","LeftItemContainer","RightItemContainer","getColor","CardBottomSection","forwardRef","_ref","ref","progressLevel","progressMax","progressType","Line","noteLeft","noteLeftIcon","noteRight","noteRightIcon","leftButton","authorName","logo","actions","disabled","elRefs","setElRefs","useState","length","useEffect","Array","fill","map","createRef","useImperativeHandle","haveAtLeastSomething","undefined","renderLeftButton","buttonText","rest","_objectWithoutProperties","_excluded","_objectSpread","size","XSmall","XXSmall","includes","Small","Large","Medium","children","type","variant","Normal","value","max","color","textStyle","Bold","x","index","className","shape","action","e","onClick","icon","propTypes","_pt","number","string","node","arrayOf","isRequired","func","bool"],"sources":["../../../src/Card/VerticalCard/CardBottomSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {\r\n COLORS,\r\n ComponentTextStyle,\r\n ComponentXXS,\r\n LinearProgress,\r\n LinearProgressType,\r\n LinearProgressVariant,\r\n Size,\r\n} from '../../index';\r\nimport { Button, ButtonProps, IconButton } from '../../Button';\r\n\r\nexport interface ActionItem {\r\n icon: React.ReactNode;\r\n onClick: () => void;\r\n}\r\n\r\nexport type CardStandardButton = Pick<ButtonProps, 'width' | 'variant' | 'loading' | 'icon' | 'onClick' | 'disabled'> & {\r\n buttonText: string;\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n}\r\n\r\nexport interface CardBottomSectionProps {\r\n /** Optional. Current progress level shown in the progress bar. */\r\n progressLevel?: number;\r\n /** Optional. Maximum level of progress in the progress bar. */\r\n progressMax?: number;\r\n /** Optional. Type of the progress bar. */\r\n progressType?: LinearProgressType;\r\n\r\n /** Optional. Note text shown on the left side of the section. */\r\n noteLeft?: string;\r\n /** Optional. Note icon shown on the left side of the section. */\r\n noteLeftIcon?: React.ReactNode;\r\n /** Optional. Note text shown on the right side of the section. */\r\n noteRight?: string;\r\n /** Optional. Note icon shown on the right side of the section. */\r\n noteRightIcon?: React.ReactNode;\r\n\r\n /** Optional. Note icon/Hyperlink/button shown on the left side of the section. */\r\n leftButton?: CardStandardButton;\r\n\r\n /** Author name shown at the bottom-left part of the section. */\r\n authorName?: string;\r\n /** Array of actions shown on the bottom-right corner of the section. */\r\n actions?: ActionItem[];\r\n /** Logo shown on the right side of the section, in front of AuthorName. */\r\n logo?: React.ReactNode;\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardBottomSectionProgressStyles = styled.div`\r\n padding: 8px 0;\r\n`;\r\n\r\nexport const CardBottomSectionNotesStyles = styled.div`\r\n height: 48px;\r\n position: relative;\r\n color: ${props => COLORS.generateToken({ componentType:'text', defaultVariant:'subtle' }, props.theme)};\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n`;\r\n\r\nexport const CardBottomSectionAuthorStyles = styled.div<{ $disabled?: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n height: 48px;\r\n\r\n div:first-child {\r\n flex-grow: 2;\r\n }\r\n\r\n svg, img {\r\n width: 80px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n\r\n ${props => props.$disabled ? `\r\n color: ${COLORS.generateToken({ componentType: 'text', state: 'disabled' }, props.theme)};\r\n svg, img {\r\n filter: grayscale(100%);\r\n }\r\n \r\n ` : ''}\r\n`;\r\n\r\nexport const CardBottomSectionDivider = styled.div`\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n width: 100%;\r\n`;\r\n\r\nexport const CardBottomSectionNoteLeftStyles = styled.div`\r\n position: absolute;\r\n left: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionNoteRightStyles = styled.div`\r\n position: absolute;\r\n right: 0px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n\r\n svg {\r\n margin-right: 4px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionButtonRowContainerStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n align-items: center;\r\n border-top: 1px;\r\n border-top-color: ${props => COLORS.generateToken({componentType:'border', defaultVariant:'subtle'}, props.theme)};\r\n border-top-style: solid;\r\n\r\n button:last-child {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n button:not(:last-child) {\r\n margin: 8px 0px 0px 0px;\r\n }\r\n\r\n .card-bottom-section-action-button {\r\n z-index: 2000;\r\n }\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({componentType:'icon', defaultVariant:'subtle' }, props.theme)};\r\n }\r\n`;\r\n\r\nexport const CardBottomSectionContainer = styled.div`\r\n padding: 0px 16px 8px 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nconst LeftItemContainer = styled.div`\r\n flex: 1\r\n`;\r\n\r\nconst RightItemContainer = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n justify-content: flex-end;\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n`;\r\n\r\nconst CardBottomSection = React.forwardRef(({\r\n progressLevel,\r\n progressMax,\r\n progressType = LinearProgressType.Line,\r\n noteLeft,\r\n noteLeftIcon,\r\n noteRight,\r\n noteRightIcon,\r\n leftButton,\r\n authorName,\r\n logo,\r\n actions,\r\n disabled\r\n}: CardBottomSectionProps,\r\n ref: React.Ref<React.RefObject<HTMLButtonElement | null>[]>) => {\r\n\r\n const [elRefs, setElRefs] = React.useState<React.RefObject<HTMLButtonElement | null>[]>([]);\r\n const theme = useTheme();\r\n const length = actions?.length || 0;\r\n\r\n React.useEffect(() => {\r\n setElRefs(Array(length || 0).fill(null).map(() => React.createRef<HTMLButtonElement>()));\r\n }, [length]);\r\n\r\n React.useImperativeHandle(ref, () => elRefs, [elRefs]);\r\n\r\n const haveAtLeastSomething = progressLevel != undefined || noteLeft || noteLeftIcon || noteRight || noteRightIcon || authorName || leftButton;\r\n\r\n const renderLeftButton = () => {\r\n if (leftButton){\r\n const {buttonText, ...rest} = leftButton;\r\n return (<Button \r\n size={ leftButton.size && [Size.XSmall, Size.XSmall, Size.XXSmall].includes(leftButton.size) ? Size.Small: \r\n leftButton.size == Size.Large ? Size.Large : Size.Medium}\r\n {...rest}>\r\n {buttonText}\r\n </Button>)\r\n }\r\n}\r\n\r\n return (\r\n <CardBottomSectionContainer data-testid={'card-bottomSection'}>\r\n {haveAtLeastSomething && <CardBottomSectionDivider/>}\r\n {progressLevel != undefined && <CardBottomSectionProgressStyles>\r\n <LinearProgress size={Size.Small}\r\n type={progressType}\r\n variant={LinearProgressVariant.Normal}\r\n value={progressLevel}\r\n max={progressMax ?? progressLevel}/>\r\n </CardBottomSectionProgressStyles>}\r\n\r\n {(noteLeft || noteLeftIcon || noteRight || noteRightIcon) && <CardBottomSectionNotesStyles>\r\n {(noteLeft || noteLeftIcon) && (\r\n <CardBottomSectionNoteLeftStyles>\r\n {noteLeftIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteLeft}</ComponentXXS>\r\n </CardBottomSectionNoteLeftStyles>\r\n )}\r\n {(noteRight || noteRightIcon) && (\r\n <CardBottomSectionNoteRightStyles>\r\n {noteRightIcon}\r\n <ComponentXXS color={COLORS.generateToken({componentType:'icon', defaultVariant:'subtle'}, theme)} textStyle={ComponentTextStyle.Bold}>{noteRight}</ComponentXXS>\r\n </CardBottomSectionNoteRightStyles>\r\n )}\r\n </CardBottomSectionNotesStyles>}\r\n\r\n {(authorName || logo) && <CardBottomSectionAuthorStyles $disabled={disabled} data-testid={'card-bottomSection-author'}>\r\n <ComponentXXS>{authorName}</ComponentXXS>\r\n {logo}\r\n </CardBottomSectionAuthorStyles>}\r\n\r\n {(actions || leftButton) && <CardBottomSectionButtonRowContainerStyles>\r\n <LeftItemContainer>\r\n {leftButton && renderLeftButton()}\r\n </LeftItemContainer>\r\n\r\n { actions && <RightItemContainer>{actions.map((x, index) => (\r\n <IconButton ref={elRefs[index]}\r\n className=\"card-bottom-section-action-button\"\r\n key={index}\r\n z-index={2000}\r\n disabled={disabled}\r\n variant=\"secondary\"\r\n shape=\"circular\"\r\n action={(e) => {\r\n x.onClick();\r\n }}>\r\n {x.icon}\r\n </IconButton>\r\n ))}\r\n </RightItemContainer>\r\n }\r\n </CardBottomSectionButtonRowContainerStyles>}\r\n </CardBottomSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardBottomSection;\r\n"],"mappings":";;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SACEC,MAAM,EACNC,kBAAkB,EAClBC,YAAY,EACZC,cAAc,EACdC,kBAAkB,EAClBC,qBAAqB,EACrBC,IAAI,QACC,aAAa;AACpB,SAASC,MAA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I,EAAAE,GAAA,CAAAG,IAAA,CAAAE,UAAA;IACJR,OAAO,EAAAG,GAAA,CAAAM,IAAA,CAAAD;EAAA;EAiCPnD,IAAI,EAAA8C,GAAA,CAAAG,IAAA;EAEJ/C,QAAQ,EAAA4C,GAAA,CAAAO;AAAA;AAuNV,eAAenE,iBAAiB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.CardMiddleSectionTagsStyles = exports.CardMiddleSectionContainer = exports.CardMiddleSectionColorBandStyles = exports.CardMiddleSectionCategoryStyles = void 0;
|
|
6
|
+
exports.default = exports.CardMiddleSectionTitle = exports.CardMiddleSectionTagsStyles = exports.CardMiddleSectionContainer = exports.CardMiddleSectionColorBandStyles = exports.CardMiddleSectionCategoryStyles = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
var _index = require("../../index");
|
|
@@ -50,11 +50,23 @@ const CardMiddleSectionCategoryStyles = exports.CardMiddleSectionCategoryStyles
|
|
|
50
50
|
gap: 6px;
|
|
51
51
|
|
|
52
52
|
svg {
|
|
53
|
-
color: ${props => _index.COLORS.
|
|
53
|
+
color: ${props => _index.COLORS.generateToken({
|
|
54
|
+
componentType: 'text',
|
|
55
|
+
defaultVariant: 'subtle'
|
|
56
|
+
}, props.theme)};
|
|
54
57
|
flex-grow: 0;
|
|
55
58
|
flex-shrink: 0;
|
|
56
59
|
}
|
|
57
60
|
`;
|
|
61
|
+
const CardMiddleSectionTitle = exports.CardMiddleSectionTitle = _styledComponents.default.h3`
|
|
62
|
+
${props => (0, _index.ComponentXLStyling)(_index.ComponentTextStyle.Bold, props.$disabled ? _index.COLORS.generateToken({
|
|
63
|
+
componentType: 'text',
|
|
64
|
+
defaultVariant: 'subtle'
|
|
65
|
+
}, props.theme) : _index.COLORS.generateToken({
|
|
66
|
+
componentType: 'text',
|
|
67
|
+
defaultVariant: 'default'
|
|
68
|
+
}, props.theme))}
|
|
69
|
+
`;
|
|
58
70
|
const CardMiddleSection = _ref => {
|
|
59
71
|
let {
|
|
60
72
|
colorBandColor,
|
|
@@ -64,7 +76,8 @@ const CardMiddleSection = _ref => {
|
|
|
64
76
|
description,
|
|
65
77
|
tags,
|
|
66
78
|
row2Tags,
|
|
67
|
-
disabled
|
|
79
|
+
disabled,
|
|
80
|
+
componentId
|
|
68
81
|
} = _ref;
|
|
69
82
|
const theme = (0, _styledComponents.useTheme)();
|
|
70
83
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardMiddleSectionContainer, {
|
|
@@ -76,17 +89,23 @@ const CardMiddleSection = _ref => {
|
|
|
76
89
|
$bottomMargin: Boolean(categoryIcon || categoryLabel),
|
|
77
90
|
children: [categoryIcon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentS, {
|
|
78
91
|
textStyle: _index.ComponentTextStyle.Bold,
|
|
79
|
-
color: _index.COLORS.
|
|
92
|
+
color: _index.COLORS.generateToken({
|
|
93
|
+
componentType: 'text',
|
|
94
|
+
defaultVariant: 'subtle'
|
|
95
|
+
}, theme),
|
|
80
96
|
children: categoryLabel
|
|
81
97
|
})]
|
|
82
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionTitle, {
|
|
99
|
+
id: `${componentId}-title`,
|
|
83
100
|
className: "titleBlock",
|
|
84
|
-
|
|
85
|
-
color: disabled ? _index.COLORS.getColor('neutral_500', theme) : _index.COLORS.getColor('black', theme),
|
|
101
|
+
$disabled: disabled,
|
|
86
102
|
children: title
|
|
87
103
|
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ComponentS, {
|
|
88
104
|
className: "descriptionBlock",
|
|
89
|
-
color: _index.COLORS.
|
|
105
|
+
color: _index.COLORS.generateToken({
|
|
106
|
+
componentType: 'text',
|
|
107
|
+
defaultVariant: 'subtle'
|
|
108
|
+
}, theme),
|
|
90
109
|
children: description
|
|
91
110
|
}), tags && /*#__PURE__*/(0, _jsxRuntime.jsx)(CardMiddleSectionTagsStyles, {
|
|
92
111
|
children: tags.map((x, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Tag, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMiddleSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardMiddleSectionContainer","exports","styled","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","COLORS","
|
|
1
|
+
{"version":3,"file":"CardMiddleSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardMiddleSectionContainer","exports","styled","div","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","COLORS","generateToken","componentType","defaultVariant","theme","CardMiddleSectionTitle","h3","ComponentXLStyling","ComponentTextStyle","Bold","$disabled","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","componentId","useTheme","jsxs","children","jsx","$extraTopMargin","Boolean","$bottomMargin","ComponentS","textStyle","color","id","className","map","x","index","Tag","label","variant","icon","_default"],"sources":["../../../src/Card/VerticalCard/CardMiddleSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport { COLORS, ComponentS, ComponentTextStyle, ComponentXL, ComponentXLStyling, Tag, TagVariants } from '../../index';\r\nimport { ReactNode } from 'react';\r\n\r\nexport interface CardMiddleSectionProps {\r\n /** Color of the band to be shown on the top of middle section. */\r\n colorBandColor?: string;\r\n /** Icon to be shown on the left side of the categoryLabel. */\r\n categoryIcon?: React.ReactNode;\r\n /** Label to be shown at the top part of the middle section. */\r\n categoryLabel?: string;\r\n /** Main title of the Card component. */\r\n title: string;\r\n /** Description of the Card. */\r\n description?: string;\r\n /** Tags to be shown under the description. */\r\n tags?: CardTag[];\r\n /** Second row of tags if needed. */\r\n row2Tags?: CardTag[];\r\n /** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n /** Top level Id of Card component */\r\n componentId?: string;\r\n}\r\n\r\nexport interface CardTag {\r\n label: string;\r\n variant?: TagVariants;\r\n icon?: ReactNode\r\n}\r\n\r\nexport const CardMiddleSectionContainer = styled.div`\r\n display: flex;\r\n flex-grow: 1;\r\n width: calc(100% - 32px);\r\n position: relative;\r\n flex-direction: column;\r\n padding: 16px;\r\n gap: 8px;\r\n\r\n .descriptionBlock {\r\n padding: 2px 0;\r\n }\r\n\r\n .titleBlock {\r\n padding: 2px 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionColorBandStyles = styled.div<{ $color: string }>`\r\n position: absolute;\r\n width: 100%;\r\n top: 0px;\r\n left: 0px;\r\n height: 8px;\r\n background-color: ${(props) => props.$color};\r\n`;\r\n\r\nexport const CardMiddleSectionTagsStyles = styled.div`\r\n display: flex;\r\n flex-direction: row;\r\n padding: 4px 0;\r\n gap: 4px;\r\n flex-wrap: wrap;\r\n`;\r\n\r\nexport const CardMiddleSectionCategoryStyles = styled.div<{ $extraTopMargin: boolean; $bottomMargin: boolean }>`\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n padding: none;\r\n gap: 6px;\r\n\r\n svg {\r\n color: ${props => COLORS.generateToken({ componentType: 'text', defaultVariant: 'subtle' }, props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardMiddleSectionTitle = styled.h3<{ $disabled?: boolean }>`\r\n ${props => ComponentXLStyling(ComponentTextStyle.Bold, props.$disabled \r\n ? COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, props.theme)\r\n : COLORS.generateToken({componentType:'text',defaultVariant:'default'}, props.theme)\r\n )}\r\n`;\r\n\r\nconst CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps> = ({\r\n colorBandColor,\r\n categoryIcon,\r\n categoryLabel,\r\n title,\r\n description,\r\n tags,\r\n row2Tags,\r\n disabled,\r\n componentId\r\n}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\r\n \r\n return (\r\n <CardMiddleSectionContainer data-testid={'card-middleSection'} >\r\n {colorBandColor && <CardMiddleSectionColorBandStyles $color={colorBandColor} />}\r\n {\r\n (categoryIcon || categoryLabel) &&\r\n <CardMiddleSectionCategoryStyles $extraTopMargin={Boolean(colorBandColor)} $bottomMargin={Boolean(categoryIcon || categoryLabel)}>\r\n {categoryIcon}\r\n <ComponentS textStyle={ComponentTextStyle.Bold} color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <CardMiddleSectionTitle \r\n id={`${componentId}-title`} \r\n className=\"titleBlock\"\r\n $disabled={disabled}>\r\n {title}\r\n </CardMiddleSectionTitle>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.generateToken({componentType:'text',defaultVariant:'subtle'}, theme)}>\r\n {description}\r\n </ComponentS>\r\n )}\r\n {tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n {row2Tags && (\r\n <CardMiddleSectionTagsStyles>\r\n {row2Tags.map((x, index) => (\r\n <Tag key={`${x.label}_${index}`}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AACxD,MAAA,CAAA4D,UAAU;MAACI,SAAS,EAAC,kBAAkB;MAACF,KAAK,EAAE/B,aAAM,CAACC,aAAa,CAAC;QAACC,aAAa,EAAC,MAAM;QAACC,cAAc,EAAC;MAAQ,CAAC,EAAEC,KAAK,CAAE;MAAAoB,QAAA,EACzHP;IAAW,CACF,CACb,EACAC,IAAI,iBACH,IAAAhD,WAAA,CAAAuD,GAAA,EAAC3B,2BAA2B;MAAA0B,QAAA,EACzBN,IAAI,CAACgB,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACjB,IAAAlE,WAAA,CAAAuD,GAAA,EAACxD,MAAA,CAAAoE,GAAG;QAA6BC,KAAK,EAAEH,CAAC,CAACG,KAAM;QAACC,OAAO,EAAEJ,CAAC,CAACI,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEL,CAAC,CAACK;MAAK,GAArF,GAAGL,CAAC,CAACG,KAAK,IAAIF,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B,EACAjB,QAAQ,iBACP,IAAAjD,WAAA,CAAAuD,GAAA,EAAC3B,2BAA2B;MAAA0B,QAAA,EACzBL,QAAQ,CAACe,GAAG,CAAC,CAACC,CAAC,EAAEC,KAAK,kBACrB,IAAAlE,WAAA,CAAAuD,GAAA,EAACxD,MAAA,CAAAoE,GAAG;QAA6BC,KAAK,EAAEH,CAAC,CAACG,KAAM;QAACC,OAAO,EAAEJ,CAAC,CAACI,OAAO,IAAI,SAAU;QAACC,IAAI,EAAEL,CAAC,CAACK;MAAK,GAArF,GAAGL,CAAC,CAACG,KAAK,IAAIF,KAAK,EAAoE,CAClG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAAC,IAAAK,QAAA,GAAAjD,OAAA,CAAAf,OAAA,GAEakC,iBAAiB","ignoreList":[]}
|
|
@@ -18,6 +18,8 @@ export interface CardMiddleSectionProps {
|
|
|
18
18
|
row2Tags?: CardTag[];
|
|
19
19
|
/** This property is set by Card component itself and is based on 'disabled' flag of CardProps. */
|
|
20
20
|
disabled?: boolean;
|
|
21
|
+
/** Top level Id of Card component */
|
|
22
|
+
componentId?: string;
|
|
21
23
|
}
|
|
22
24
|
export interface CardTag {
|
|
23
25
|
label: string;
|
|
@@ -33,5 +35,8 @@ export declare const CardMiddleSectionCategoryStyles: import("styled-components/
|
|
|
33
35
|
$extraTopMargin: boolean;
|
|
34
36
|
$bottomMargin: boolean;
|
|
35
37
|
}>> & string;
|
|
38
|
+
export declare const CardMiddleSectionTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, {
|
|
39
|
+
$disabled?: boolean;
|
|
40
|
+
}>> & string;
|
|
36
41
|
declare const CardMiddleSection: React.FunctionComponent<CardMiddleSectionProps>;
|
|
37
42
|
export default CardMiddleSection;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import styled, { useTheme } from 'styled-components';
|
|
3
|
-
import { COLORS, ComponentS, ComponentTextStyle,
|
|
3
|
+
import { COLORS, ComponentS, ComponentTextStyle, ComponentXLStyling, Tag } from '../../index';
|
|
4
4
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
5
|
export const CardMiddleSectionContainer = styled.div`
|
|
6
6
|
display: flex;
|
|
@@ -42,11 +42,23 @@ export const CardMiddleSectionCategoryStyles = styled.div`
|
|
|
42
42
|
gap: 6px;
|
|
43
43
|
|
|
44
44
|
svg {
|
|
45
|
-
color: ${props => COLORS.
|
|
45
|
+
color: ${props => COLORS.generateToken({
|
|
46
|
+
componentType: 'text',
|
|
47
|
+
defaultVariant: 'subtle'
|
|
48
|
+
}, props.theme)};
|
|
46
49
|
flex-grow: 0;
|
|
47
50
|
flex-shrink: 0;
|
|
48
51
|
}
|
|
49
52
|
`;
|
|
53
|
+
export const CardMiddleSectionTitle = styled.h3`
|
|
54
|
+
${props => ComponentXLStyling(ComponentTextStyle.Bold, props.$disabled ? COLORS.generateToken({
|
|
55
|
+
componentType: 'text',
|
|
56
|
+
defaultVariant: 'subtle'
|
|
57
|
+
}, props.theme) : COLORS.generateToken({
|
|
58
|
+
componentType: 'text',
|
|
59
|
+
defaultVariant: 'default'
|
|
60
|
+
}, props.theme))}
|
|
61
|
+
`;
|
|
50
62
|
const CardMiddleSection = _ref => {
|
|
51
63
|
let {
|
|
52
64
|
colorBandColor,
|
|
@@ -56,7 +68,8 @@ const CardMiddleSection = _ref => {
|
|
|
56
68
|
description,
|
|
57
69
|
tags,
|
|
58
70
|
row2Tags,
|
|
59
|
-
disabled
|
|
71
|
+
disabled,
|
|
72
|
+
componentId
|
|
60
73
|
} = _ref;
|
|
61
74
|
const theme = useTheme();
|
|
62
75
|
return /*#__PURE__*/_jsxs(CardMiddleSectionContainer, {
|
|
@@ -68,17 +81,23 @@ const CardMiddleSection = _ref => {
|
|
|
68
81
|
$bottomMargin: Boolean(categoryIcon || categoryLabel),
|
|
69
82
|
children: [categoryIcon, /*#__PURE__*/_jsx(ComponentS, {
|
|
70
83
|
textStyle: ComponentTextStyle.Bold,
|
|
71
|
-
color: COLORS.
|
|
84
|
+
color: COLORS.generateToken({
|
|
85
|
+
componentType: 'text',
|
|
86
|
+
defaultVariant: 'subtle'
|
|
87
|
+
}, theme),
|
|
72
88
|
children: categoryLabel
|
|
73
89
|
})]
|
|
74
|
-
}), /*#__PURE__*/_jsx(
|
|
90
|
+
}), /*#__PURE__*/_jsx(CardMiddleSectionTitle, {
|
|
91
|
+
id: `${componentId}-title`,
|
|
75
92
|
className: "titleBlock",
|
|
76
|
-
|
|
77
|
-
color: disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme),
|
|
93
|
+
$disabled: disabled,
|
|
78
94
|
children: title
|
|
79
95
|
}), description && /*#__PURE__*/_jsx(ComponentS, {
|
|
80
96
|
className: "descriptionBlock",
|
|
81
|
-
color: COLORS.
|
|
97
|
+
color: COLORS.generateToken({
|
|
98
|
+
componentType: 'text',
|
|
99
|
+
defaultVariant: 'subtle'
|
|
100
|
+
}, theme),
|
|
82
101
|
children: description
|
|
83
102
|
}), tags && /*#__PURE__*/_jsx(CardMiddleSectionTagsStyles, {
|
|
84
103
|
children: tags.map((x, index) => /*#__PURE__*/_jsx(Tag, {
|