@laerdal/life-react-components 3.5.1-dev.16 → 3.5.1-dev.17
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 +25 -3
- package/dist/Accordion/ContentAccordion.cjs.map +1 -1
- package/dist/Accordion/ContentAccordion.js +25 -3
- package/dist/Accordion/ContentAccordion.js.map +1 -1
- package/dist/Accordion/styles.cjs +29 -3
- package/dist/Accordion/styles.cjs.map +1 -1
- package/dist/Accordion/styles.js +29 -3
- package/dist/Accordion/styles.js.map +1 -1
- package/dist/Banners/Banner.cjs +34 -29
- package/dist/Banners/Banner.cjs.map +1 -1
- package/dist/Banners/Banner.js +34 -29
- package/dist/Banners/Banner.js.map +1 -1
- package/dist/Banners/OverviewBanner.cjs +6 -2
- package/dist/Banners/OverviewBanner.cjs.map +1 -1
- package/dist/Banners/OverviewBanner.js +6 -2
- package/dist/Banners/OverviewBanner.js.map +1 -1
- package/dist/Banners/styles.cjs +29 -29
- package/dist/Banners/styles.cjs.map +1 -1
- package/dist/Banners/styles.d.ts +1 -1
- package/dist/Banners/styles.js +29 -29
- package/dist/Banners/styles.js.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.cjs +4 -2
- package/dist/Breadcrumb/Breadcrumb.cjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.js +4 -2
- package/dist/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/Breadcrumb/styles.cjs +7 -3
- package/dist/Breadcrumb/styles.cjs.map +1 -1
- package/dist/Breadcrumb/styles.js +7 -3
- package/dist/Breadcrumb/styles.js.map +1 -1
- package/dist/Button/BackButton.cjs +12 -2
- package/dist/Button/BackButton.cjs.map +1 -1
- package/dist/Button/BackButton.js +12 -2
- package/dist/Button/BackButton.js.map +1 -1
- package/dist/Button/Button.cjs +28 -28
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.js +28 -28
- package/dist/Button/Button.js.map +1 -1
- package/dist/Button/Iconbutton.cjs +36 -10
- package/dist/Button/Iconbutton.cjs.map +1 -1
- package/dist/Button/Iconbutton.js +36 -10
- package/dist/Button/Iconbutton.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.cjs +12 -2
- package/dist/Card/HorizontalCard/HorizontalCard.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCard.js +12 -2
- package/dist/Card/HorizontalCard/HorizontalCard.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs +8 -2
- package/dist/Card/HorizontalCard/HorizontalCardBody.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardBody.js +8 -2
- package/dist/Card/HorizontalCard/HorizontalCardBody.js.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs +5 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.cjs.map +1 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js +5 -1
- package/dist/Card/HorizontalCard/HorizontalCardThumbnail.js.map +1 -1
- package/dist/Card/VerticalCard/Card.cjs +12 -2
- package/dist/Card/VerticalCard/Card.cjs.map +1 -1
- package/dist/Card/VerticalCard/Card.js +12 -2
- package/dist/Card/VerticalCard/Card.js.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.cjs +16 -7
- package/dist/Card/VerticalCard/CardBottomSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardBottomSection.js +16 -7
- package/dist/Card/VerticalCard/CardBottomSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.cjs +8 -5
- package/dist/Card/VerticalCard/CardMiddleSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardMiddleSection.js +8 -5
- package/dist/Card/VerticalCard/CardMiddleSection.js.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.cjs +6 -3
- package/dist/Card/VerticalCard/CardTopSection.cjs.map +1 -1
- package/dist/Card/VerticalCard/CardTopSection.js +6 -3
- package/dist/Card/VerticalCard/CardTopSection.js.map +1 -1
- package/dist/Chips/ChipStyles.cjs +59 -1
- package/dist/Chips/ChipStyles.cjs.map +1 -1
- package/dist/Chips/ChipStyles.js +59 -1
- package/dist/Chips/ChipStyles.js.map +1 -1
- package/dist/ChipsInput/ChipInputField.cjs +33 -5
- package/dist/ChipsInput/ChipInputField.cjs.map +1 -1
- package/dist/ChipsInput/ChipInputField.js +30 -5
- package/dist/ChipsInput/ChipInputField.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +5 -3
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +5 -3
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +93 -13
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.js +93 -13
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +16 -10
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +16 -10
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +5 -3
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +5 -3
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Footer/Components/FooterBottomLinks.cjs +3 -1
- package/dist/Footer/Components/FooterBottomLinks.cjs.map +1 -1
- package/dist/Footer/Components/FooterBottomLinks.js +3 -1
- package/dist/Footer/Components/FooterBottomLinks.js.map +1 -1
- package/dist/Footer/Components/FooterDropdownLinks.cjs +32 -4
- package/dist/Footer/Components/FooterDropdownLinks.cjs.map +1 -1
- package/dist/Footer/Components/FooterDropdownLinks.js +32 -4
- package/dist/Footer/Components/FooterDropdownLinks.js.map +1 -1
- package/dist/Footer/Components/FooterNavSection.cjs +3 -1
- package/dist/Footer/Components/FooterNavSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNavSection.js +3 -1
- package/dist/Footer/Components/FooterNavSection.js.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs +26 -4
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.cjs.map +1 -1
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js +26 -4
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.js.map +1 -1
- package/dist/Footer/Components/FooterTop.cjs +19 -6
- package/dist/Footer/Components/FooterTop.cjs.map +1 -1
- package/dist/Footer/Components/FooterTop.js +19 -6
- package/dist/Footer/Components/FooterTop.js.map +1 -1
- package/dist/Footer/Footer.cjs +3 -1
- package/dist/Footer/Footer.cjs.map +1 -1
- package/dist/Footer/Footer.js +3 -1
- package/dist/Footer/Footer.js.map +1 -1
- package/dist/Footer/SiteFooter.cjs +8 -2
- package/dist/Footer/SiteFooter.cjs.map +1 -1
- package/dist/Footer/SiteFooter.js +8 -2
- package/dist/Footer/SiteFooter.js.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs +6 -2
- package/dist/GlobalNavigationBar/GlobalNavigationBar.cjs.map +1 -1
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js +6 -2
- package/dist/GlobalNavigationBar/GlobalNavigationBar.js.map +1 -1
- package/dist/GlobalNavigationBar/Logo.cjs +8 -7
- package/dist/GlobalNavigationBar/Logo.cjs.map +1 -1
- package/dist/GlobalNavigationBar/Logo.d.ts +1 -1
- package/dist/GlobalNavigationBar/Logo.js +8 -7
- package/dist/GlobalNavigationBar/Logo.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs +6 -2
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +6 -2
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs +6 -2
- package/dist/GlobalNavigationBar/desktop/MainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/MainMenu.js +6 -2
- package/dist/GlobalNavigationBar/desktop/MainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs +19 -5
- package/dist/GlobalNavigationBar/desktop/UserMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/UserMenu.js +19 -5
- package/dist/GlobalNavigationBar/desktop/UserMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs +42 -8
- package/dist/GlobalNavigationBar/mobile/CommonStyles.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.d.ts +1 -1
- package/dist/GlobalNavigationBar/mobile/CommonStyles.js +42 -8
- package/dist/GlobalNavigationBar/mobile/CommonStyles.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs +3 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js +3 -1
- package/dist/GlobalNavigationBar/mobile/MobileActionContainer.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs +7 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js +7 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs +26 -6
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js +26 -6
- package/dist/GlobalNavigationBar/mobile/MobileMenuContent.js.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.cjs +5 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.cjs.map +1 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js +5 -1
- package/dist/GlobalNavigationBar/mobile/MobileMenuHeader.js.map +1 -1
- package/dist/HyperLink/styling.cjs +32 -2
- package/dist/HyperLink/styling.cjs.map +1 -1
- package/dist/HyperLink/styling.d.ts +2 -2
- package/dist/HyperLink/styling.js +32 -2
- package/dist/HyperLink/styling.js.map +1 -1
- package/dist/InputFields/Checkbox.cjs +29 -3
- package/dist/InputFields/Checkbox.cjs.map +1 -1
- package/dist/InputFields/Checkbox.js +29 -3
- package/dist/InputFields/Checkbox.js.map +1 -1
- package/dist/InputFields/DatepickerField.cjs +97 -5
- package/dist/InputFields/DatepickerField.cjs.map +1 -1
- package/dist/InputFields/DatepickerField.js +94 -5
- package/dist/InputFields/DatepickerField.js.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.cjs +11 -1
- package/dist/InputFields/DatepickerFieldHeader.cjs.map +1 -1
- package/dist/InputFields/DatepickerFieldHeader.js +11 -1
- package/dist/InputFields/DatepickerFieldHeader.js.map +1 -1
- package/dist/InputFields/Label.cjs +25 -4
- package/dist/InputFields/Label.cjs.map +1 -1
- package/dist/InputFields/Label.js +25 -4
- package/dist/InputFields/Label.js.map +1 -1
- package/dist/InputFields/NumberField.cjs +33 -5
- package/dist/InputFields/NumberField.cjs.map +1 -1
- package/dist/InputFields/NumberField.js +33 -5
- package/dist/InputFields/NumberField.js.map +1 -1
- package/dist/InputFields/PasswordField.cjs +3 -2
- package/dist/InputFields/PasswordField.cjs.map +1 -1
- package/dist/InputFields/PasswordField.js +3 -2
- package/dist/InputFields/PasswordField.js.map +1 -1
- package/dist/InputFields/QuickSearch.cjs +12 -5
- package/dist/InputFields/QuickSearch.cjs.map +1 -1
- package/dist/InputFields/QuickSearch.js +12 -5
- package/dist/InputFields/QuickSearch.js.map +1 -1
- package/dist/InputFields/RadioButton.cjs +31 -3
- package/dist/InputFields/RadioButton.cjs.map +1 -1
- package/dist/InputFields/RadioButton.js +31 -3
- package/dist/InputFields/RadioButton.js.map +1 -1
- package/dist/InputFields/RichTextField.cjs +34 -4
- package/dist/InputFields/RichTextField.cjs.map +1 -1
- package/dist/InputFields/RichTextField.js +31 -4
- package/dist/InputFields/RichTextField.js.map +1 -1
- package/dist/InputFields/SearchBar.cjs +6 -2
- package/dist/InputFields/SearchBar.cjs.map +1 -1
- package/dist/InputFields/SearchBar.js +3 -2
- package/dist/InputFields/SearchBar.js.map +1 -1
- package/dist/InputFields/TextField.cjs +4 -2
- package/dist/InputFields/TextField.cjs.map +1 -1
- package/dist/InputFields/TextField.js +4 -2
- package/dist/InputFields/TextField.js.map +1 -1
- package/dist/InputFields/Textarea.cjs +38 -5
- package/dist/InputFields/Textarea.cjs.map +1 -1
- package/dist/InputFields/Textarea.js +38 -5
- package/dist/InputFields/Textarea.js.map +1 -1
- package/dist/InputFields/components/SearchBarInput.cjs +15 -1
- package/dist/InputFields/components/SearchBarInput.cjs.map +1 -1
- package/dist/InputFields/components/SearchBarInput.js +15 -1
- package/dist/InputFields/components/SearchBarInput.js.map +1 -1
- package/dist/InputFields/components/SearchField.cjs +31 -1
- package/dist/InputFields/components/SearchField.cjs.map +1 -1
- package/dist/InputFields/components/SearchField.js +31 -1
- package/dist/InputFields/components/SearchField.js.map +1 -1
- package/dist/InputFields/styling.cjs +50 -13
- package/dist/InputFields/styling.cjs.map +1 -1
- package/dist/InputFields/styling.d.ts +3 -3
- package/dist/InputFields/styling.js +50 -13
- package/dist/InputFields/styling.js.map +1 -1
- package/dist/LinearProgress/LinearProgress.cjs +47 -5
- package/dist/LinearProgress/LinearProgress.cjs.map +1 -1
- package/dist/LinearProgress/LinearProgress.js +47 -5
- package/dist/LinearProgress/LinearProgress.js.map +1 -1
- package/dist/List/ListRow.cjs +19 -1
- package/dist/List/ListRow.cjs.map +1 -1
- package/dist/List/ListRow.js +19 -1
- package/dist/List/ListRow.js.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.cjs +11 -3
- package/dist/LoadingPage/GlobalLoadingPage.cjs.map +1 -1
- package/dist/LoadingPage/GlobalLoadingPage.js +11 -3
- package/dist/LoadingPage/GlobalLoadingPage.js.map +1 -1
- package/dist/MenuItem/MenuItem.cjs +51 -2
- package/dist/MenuItem/MenuItem.cjs.map +1 -1
- package/dist/MenuItem/MenuItem.d.ts +1 -1
- package/dist/MenuItem/MenuItem.js +52 -3
- package/dist/MenuItem/MenuItem.js.map +1 -1
- package/dist/MiniProductCard/MiniProductCard.cjs +21 -6
- package/dist/MiniProductCard/MiniProductCard.cjs.map +1 -1
- package/dist/MiniProductCard/MiniProductCard.d.ts +1 -1
- package/dist/MiniProductCard/MiniProductCard.js +21 -6
- package/dist/MiniProductCard/MiniProductCard.js.map +1 -1
- package/dist/Modals/Modal.cjs +3 -2
- package/dist/Modals/Modal.cjs.map +1 -1
- package/dist/Modals/Modal.js +3 -2
- package/dist/Modals/Modal.js.map +1 -1
- package/dist/Modals/ModalContent.cjs +17 -7
- package/dist/Modals/ModalContent.cjs.map +1 -1
- package/dist/Modals/ModalContent.js +14 -7
- package/dist/Modals/ModalContent.js.map +1 -1
- package/dist/Modals/ModalDialog.cjs +5 -3
- package/dist/Modals/ModalDialog.cjs.map +1 -1
- package/dist/Modals/ModalDialog.js +5 -3
- package/dist/Modals/ModalDialog.js.map +1 -1
- package/dist/Modals/ModalNote.cjs +6 -4
- package/dist/Modals/ModalNote.cjs.map +1 -1
- package/dist/Modals/ModalNote.js +6 -4
- package/dist/Modals/ModalNote.js.map +1 -1
- package/dist/Modals/ModalStyles.cjs +17 -15
- package/dist/Modals/ModalStyles.cjs.map +1 -1
- package/dist/Modals/ModalStyles.d.ts +2 -2
- package/dist/Modals/ModalStyles.js +17 -15
- package/dist/Modals/ModalStyles.js.map +1 -1
- package/dist/NavItem/NavItem.cjs +27 -1
- package/dist/NavItem/NavItem.cjs.map +1 -1
- package/dist/NavItem/NavItem.js +27 -1
- package/dist/NavItem/NavItem.js.map +1 -1
- package/dist/NotificationDot/NotificationDot.cjs +2 -2
- package/dist/NotificationDot/NotificationDot.cjs.map +1 -1
- package/dist/NotificationDot/NotificationDot.js +2 -2
- package/dist/NotificationDot/NotificationDot.js.map +1 -1
- package/dist/Paginator/Paginator.cjs +33 -3
- package/dist/Paginator/Paginator.cjs.map +1 -1
- package/dist/Paginator/Paginator.js +33 -3
- package/dist/Paginator/Paginator.js.map +1 -1
- package/dist/Panel/Panel.cjs +6 -2
- package/dist/Panel/Panel.cjs.map +1 -1
- package/dist/Panel/Panel.js +6 -2
- package/dist/Panel/Panel.js.map +1 -1
- package/dist/Popover/Popover.cjs +7 -4
- package/dist/Popover/Popover.cjs.map +1 -1
- package/dist/Popover/Popover.js +7 -4
- package/dist/Popover/Popover.js.map +1 -1
- package/dist/ProfileButton/ProfileButton.cjs +11 -4
- package/dist/ProfileButton/ProfileButton.cjs.map +1 -1
- package/dist/ProfileButton/ProfileButton.js +11 -4
- package/dist/ProfileButton/ProfileButton.js.map +1 -1
- package/dist/QuizButton/QuizButton.cjs +51 -14
- package/dist/QuizButton/QuizButton.cjs.map +1 -1
- package/dist/QuizButton/QuizButton.js +51 -14
- package/dist/QuizButton/QuizButton.js.map +1 -1
- package/dist/SegmentControl/SegmentControl.cjs +25 -3
- package/dist/SegmentControl/SegmentControl.cjs.map +1 -1
- package/dist/SegmentControl/SegmentControl.js +25 -3
- package/dist/SegmentControl/SegmentControl.js.map +1 -1
- package/dist/SideMenu/SideMenu.cjs +3 -1
- package/dist/SideMenu/SideMenu.cjs.map +1 -1
- package/dist/SideMenu/SideMenu.js +3 -1
- package/dist/SideMenu/SideMenu.js.map +1 -1
- package/dist/SideMenu/SideMenuFooter.cjs +9 -3
- package/dist/SideMenu/SideMenuFooter.cjs.map +1 -1
- package/dist/SideMenu/SideMenuFooter.js +9 -3
- package/dist/SideMenu/SideMenuFooter.js.map +1 -1
- package/dist/SideMenu/SideMenuHeader.cjs +7 -1
- package/dist/SideMenu/SideMenuHeader.cjs.map +1 -1
- package/dist/SideMenu/SideMenuHeader.js +7 -1
- package/dist/SideMenu/SideMenuHeader.js.map +1 -1
- package/dist/SkipToContent/SkipToContent.cjs +6 -2
- package/dist/SkipToContent/SkipToContent.cjs.map +1 -1
- package/dist/SkipToContent/SkipToContent.js +6 -2
- package/dist/SkipToContent/SkipToContent.js.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.cjs +27 -1
- package/dist/Switcher/SwitcherMenuItem.cjs.map +1 -1
- package/dist/Switcher/SwitcherMenuItem.js +27 -1
- package/dist/Switcher/SwitcherMenuItem.js.map +1 -1
- package/dist/Table/TableFooter.cjs +4 -2
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +4 -2
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/Table/TableStyles.cjs +80 -12
- package/dist/Table/TableStyles.cjs.map +1 -1
- package/dist/Table/TableStyles.js +80 -12
- package/dist/Table/TableStyles.js.map +1 -1
- package/dist/Tabs/HorizontalTabs.cjs +36 -2
- package/dist/Tabs/HorizontalTabs.cjs.map +1 -1
- package/dist/Tabs/HorizontalTabs.js +36 -2
- package/dist/Tabs/HorizontalTabs.js.map +1 -1
- package/dist/Tabs/TabLink.cjs +33 -3
- package/dist/Tabs/TabLink.cjs.map +1 -1
- package/dist/Tabs/TabLink.js +33 -3
- package/dist/Tabs/TabLink.js.map +1 -1
- package/dist/Tag/Tag.cjs +25 -1
- package/dist/Tag/Tag.cjs.map +1 -1
- package/dist/Tag/Tag.js +25 -1
- package/dist/Tag/Tag.js.map +1 -1
- package/dist/Tile/Tile.cjs +5 -1
- package/dist/Tile/Tile.cjs.map +1 -1
- package/dist/Tile/Tile.js +5 -1
- package/dist/Tile/Tile.js.map +1 -1
- package/dist/Tile/TileCommonItems.cjs +6 -2
- package/dist/Tile/TileCommonItems.cjs.map +1 -1
- package/dist/Tile/TileCommonItems.js +6 -2
- package/dist/Tile/TileCommonItems.js.map +1 -1
- package/dist/Tile/TileFooter.cjs +3 -1
- package/dist/Tile/TileFooter.cjs.map +1 -1
- package/dist/Tile/TileFooter.js +3 -1
- package/dist/Tile/TileFooter.js.map +1 -1
- package/dist/Tile/TileHeader.cjs +12 -4
- package/dist/Tile/TileHeader.cjs.map +1 -1
- package/dist/Tile/TileHeader.js +9 -4
- package/dist/Tile/TileHeader.js.map +1 -1
- package/dist/Toasters/Toast.cjs +49 -4
- package/dist/Toasters/Toast.cjs.map +1 -1
- package/dist/Toasters/Toast.js +50 -5
- package/dist/Toasters/Toast.js.map +1 -1
- package/dist/Toggles/ToggleButton.cjs +7 -1
- package/dist/Toggles/ToggleButton.cjs.map +1 -1
- package/dist/Toggles/ToggleButton.js +7 -1
- package/dist/Toggles/ToggleButton.js.map +1 -1
- package/dist/Toggles/ToggleSwitch.cjs +3 -2
- package/dist/Toggles/ToggleSwitch.cjs.map +1 -1
- package/dist/Toggles/ToggleSwitch.js +3 -2
- package/dist/Toggles/ToggleSwitch.js.map +1 -1
- package/dist/Toggles/TogglerStyles.cjs +38 -2
- package/dist/Toggles/TogglerStyles.cjs.map +1 -1
- package/dist/Toggles/TogglerStyles.js +38 -2
- package/dist/Toggles/TogglerStyles.js.map +1 -1
- package/dist/Tooltips/TooltipStyles.cjs +10 -8
- package/dist/Tooltips/TooltipStyles.cjs.map +1 -1
- package/dist/Tooltips/TooltipStyles.js +10 -8
- package/dist/Tooltips/TooltipStyles.js.map +1 -1
- package/dist/common/InputStyling.cjs +15 -1
- package/dist/common/InputStyling.cjs.map +1 -1
- package/dist/common/InputStyling.d.ts +1 -1
- package/dist/common/InputStyling.js +15 -1
- package/dist/common/InputStyling.js.map +1 -1
- package/dist/styles/global.cjs +11 -3
- package/dist/styles/global.cjs.map +1 -1
- package/dist/styles/global.js +11 -3
- package/dist/styles/global.js.map +1 -1
- package/dist/styles/index.cjs +9 -1
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.d.ts +1 -1
- package/dist/styles/index.js +9 -1
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/typography.cjs +3 -1
- package/dist/styles/typography.cjs.map +1 -1
- package/dist/styles/typography.d.ts +6 -6
- package/dist/styles/typography.js +3 -1
- package/dist/styles/typography.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMiddleSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","
|
|
1
|
+
{"version":3,"file":"CardMiddleSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_index","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardMiddleSectionContainer","styled","div","_taggedTemplateLiteral2","exports","CardMiddleSectionColorBandStyles","props","$color","CardMiddleSectionTagsStyles","CardMiddleSectionCategoryStyles","COLORS","getColor","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","useTheme","jsxs","children","jsx","extraTopMargin","Boolean","bottomMargin","ComponentS","textStyle","ComponentTextStyle","Bold","color","ComponentXL","className","map","x","index","_x$variant","Tag","label","variant","icon","concat","_x$variant2","_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, 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}\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.getColor('neutral_500', props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\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}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\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.getColor('neutral_500', theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.getColor('neutral_600', 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}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n </CardMiddleSectionContainer>\r\n );\r\n};\r\n\r\nexport default CardMiddleSection;\r\n"],"mappings":";;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,uBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAoG,IAAAG,WAAA,GAAAH,OAAA;AAAA,IAAAI,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,gBAAAK,OAAA,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C,EAAEC,KAAK;QAAA,IAAAO,WAAA;QAAA,oBACrB,IAAAvE,WAAA,CAAAmD,GAAA,EAACpD,MAAA,CAAAmE,GAAG;UAA6BC,KAAK,EAAEJ,CAAC,CAACI,KAAM;UAACC,OAAO,GAAAG,WAAA,GAAER,CAAC,CAACK,OAAO,cAAAG,WAAA,cAAAA,WAAA,GAAI,SAAU;UAACF,IAAI,EAAEN,CAAC,CAACM;QAAK,MAAAC,MAAA,CAAlFP,CAAC,CAACI,KAAK,OAAAG,MAAA,CAAIN,KAAK,CAAoE,CAAC;MAAA,CACnG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAAC,IAAAQ,QAAA,GAEalC,iBAAiB;AAAAT,OAAA,cAAA2C,QAAA","ignoreList":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
2
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import styled from 'styled-components';
|
|
4
|
+
import styled, { useTheme } from 'styled-components';
|
|
5
5
|
import { COLORS, ComponentS, ComponentTextStyle, ComponentXL, Tag } from '../../index';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -10,7 +10,9 @@ export var CardMiddleSectionColorBandStyles = styled.div(_templateObject2 || (_t
|
|
|
10
10
|
return props.$color;
|
|
11
11
|
});
|
|
12
12
|
export var CardMiddleSectionTagsStyles = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n padding: 4px 0;\n gap: 4px;\n flex-wrap: wrap;\n"])));
|
|
13
|
-
export var CardMiddleSectionCategoryStyles = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: none;\n gap: 6px;\n\n svg {\n color: ", ";\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])),
|
|
13
|
+
export var CardMiddleSectionCategoryStyles = styled.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n padding: none;\n gap: 6px;\n\n svg {\n color: ", ";\n flex-grow: 0;\n flex-shrink: 0;\n }\n"])), function (props) {
|
|
14
|
+
return COLORS.getColor('neutral_500', props.theme);
|
|
15
|
+
});
|
|
14
16
|
var CardMiddleSection = function CardMiddleSection(_ref) {
|
|
15
17
|
var colorBandColor = _ref.colorBandColor,
|
|
16
18
|
categoryIcon = _ref.categoryIcon,
|
|
@@ -20,6 +22,7 @@ var CardMiddleSection = function CardMiddleSection(_ref) {
|
|
|
20
22
|
tags = _ref.tags,
|
|
21
23
|
row2Tags = _ref.row2Tags,
|
|
22
24
|
disabled = _ref.disabled;
|
|
25
|
+
var theme = useTheme();
|
|
23
26
|
return /*#__PURE__*/_jsxs(CardMiddleSectionContainer, {
|
|
24
27
|
"data-testid": 'card-middleSection',
|
|
25
28
|
children: [colorBandColor && /*#__PURE__*/_jsx(CardMiddleSectionColorBandStyles, {
|
|
@@ -29,17 +32,17 @@ var CardMiddleSection = function CardMiddleSection(_ref) {
|
|
|
29
32
|
bottomMargin: Boolean(categoryIcon || categoryLabel),
|
|
30
33
|
children: [categoryIcon, /*#__PURE__*/_jsx(ComponentS, {
|
|
31
34
|
textStyle: ComponentTextStyle.Bold,
|
|
32
|
-
color: COLORS.neutral_500,
|
|
35
|
+
color: COLORS.getColor('neutral_500', theme),
|
|
33
36
|
children: categoryLabel
|
|
34
37
|
})]
|
|
35
38
|
}), /*#__PURE__*/_jsx(ComponentXL, {
|
|
36
39
|
className: "titleBlock",
|
|
37
40
|
textStyle: ComponentTextStyle.Bold,
|
|
38
|
-
color: disabled ? COLORS.neutral_500 : COLORS.black,
|
|
41
|
+
color: disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme),
|
|
39
42
|
children: title
|
|
40
43
|
}), description && /*#__PURE__*/_jsx(ComponentS, {
|
|
41
44
|
className: "descriptionBlock",
|
|
42
|
-
color: COLORS.neutral_600,
|
|
45
|
+
color: COLORS.getColor('neutral_600', theme),
|
|
43
46
|
children: description
|
|
44
47
|
}), tags && /*#__PURE__*/_jsx(CardMiddleSectionTagsStyles, {
|
|
45
48
|
children: tags.map(function (x, index) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardMiddleSection.js","names":["React","styled","COLORS","ComponentS","ComponentTextStyle","ComponentXL","Tag","jsx","_jsx","jsxs","_jsxs","CardMiddleSectionContainer","div","_templateObject","_taggedTemplateLiteral","CardMiddleSectionColorBandStyles","_templateObject2","props","$color","CardMiddleSectionTagsStyles","_templateObject3","CardMiddleSectionCategoryStyles","_templateObject4","
|
|
1
|
+
{"version":3,"file":"CardMiddleSection.js","names":["React","styled","useTheme","COLORS","ComponentS","ComponentTextStyle","ComponentXL","Tag","jsx","_jsx","jsxs","_jsxs","CardMiddleSectionContainer","div","_templateObject","_taggedTemplateLiteral","CardMiddleSectionColorBandStyles","_templateObject2","props","$color","CardMiddleSectionTagsStyles","_templateObject3","CardMiddleSectionCategoryStyles","_templateObject4","getColor","theme","CardMiddleSection","_ref","colorBandColor","categoryIcon","categoryLabel","title","description","tags","row2Tags","disabled","children","extraTopMargin","Boolean","bottomMargin","textStyle","Bold","color","className","map","x","index","_x$variant","label","variant","icon","concat","_x$variant2"],"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, 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}\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.getColor('neutral_500', props.theme)};\r\n flex-grow: 0;\r\n flex-shrink: 0;\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}: CardMiddleSectionProps) => {\r\n const theme = useTheme();\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.getColor('neutral_500', theme)}>\r\n {categoryLabel}\r\n </ComponentS>\r\n </CardMiddleSectionCategoryStyles>\r\n }\r\n <ComponentXL className=\"titleBlock\" textStyle={ComponentTextStyle.Bold} color={disabled ? COLORS.getColor('neutral_500', theme) : COLORS.getColor('black', theme)}>\r\n {title}\r\n </ComponentXL>\r\n {description && (\r\n <ComponentS className=\"descriptionBlock\" color={COLORS.getColor('neutral_600', 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}`} label={x.label} variant={x.variant ?? 'neutral'} icon={x.icon} />\r\n ))}\r\n </CardMiddleSectionTagsStyles>\r\n )}\r\n </CardMiddleSectionContainer>\r\n );\r\n};\r\n\r\nexport default CardMiddleSection;\r\n"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAASC,MAAM,EAAEC,UAAU,EAAEC,kBAAkB,EAAEC,WAAW,EAAEC,GAAG,QAAqB,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA4BpG,OAAO,IAAMC,0BAA0B,GAAGX,MAAM,CAACY,GAAG,CAAAC,eAA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AAC,UAACC,CAAC,EAAEC,KAAK;QAAA,IAAAM,WAAA;QAAA,oBACrB3C,IAAA,CAACF,GAAG;UAA6ByC,KAAK,EAAEH,CAAC,CAACG,KAAM;UAACC,OAAO,GAAAG,WAAA,GAAEP,CAAC,CAACI,OAAO,cAAAG,WAAA,cAAAA,WAAA,GAAI,SAAU;UAACF,IAAI,EAAEL,CAAC,CAACK;QAAK,MAAAC,MAAA,CAAlFN,CAAC,CAACG,KAAK,OAAAG,MAAA,CAAIL,KAAK,CAAoE,CAAC;MAAA,CACnG;IAAC,CACyB,CAC9B;EAAA,CACyB,CAAC;AAEjC,CAAC;AAED,eAAepB,iBAAiB","ignoreList":[]}
|
|
@@ -9,7 +9,7 @@ exports["default"] = exports.CardTopSectionTagContainer = exports.CardTopSection
|
|
|
9
9
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
|
-
var _styledComponents =
|
|
12
|
+
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
13
13
|
var _typography = require("../../styles/typography");
|
|
14
14
|
var _Checkbox = _interopRequireDefault(require("../../InputFields/Checkbox"));
|
|
15
15
|
var _Tag = require("../../Tag");
|
|
@@ -33,7 +33,9 @@ var CardTopSectionRibbonContainer = _styledComponents["default"].div(_templateOb
|
|
|
33
33
|
return props.$color;
|
|
34
34
|
});
|
|
35
35
|
exports.CardTopSectionRibbonContainer = CardTopSectionRibbonContainer;
|
|
36
|
-
var CardTopSectionCheckboxContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n\n .checkbox-icon {\n background-color: ", ";\n }\n"])),
|
|
36
|
+
var CardTopSectionCheckboxContainer = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n\n .checkbox-icon {\n background-color: ", ";\n }\n"])), function (props) {
|
|
37
|
+
return _index.COLORS.getColor('white', props.theme);
|
|
38
|
+
});
|
|
37
39
|
exports.CardTopSectionCheckboxContainer = CardTopSectionCheckboxContainer;
|
|
38
40
|
var CardTopSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
39
41
|
var _image$height, _image$fallbackSrc, _image$loader;
|
|
@@ -49,6 +51,7 @@ var CardTopSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
49
51
|
highlightRibbonContentColor = _ref.highlightRibbonContentColor,
|
|
50
52
|
highlightRibbonBgColor = _ref.highlightRibbonBgColor,
|
|
51
53
|
disabled = _ref.disabled;
|
|
54
|
+
var theme = (0, _styledComponents.useTheme)();
|
|
52
55
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardTopSectionContainer, {
|
|
53
56
|
disabled: disabled,
|
|
54
57
|
"data-testid": 'card-topSection',
|
|
@@ -83,7 +86,7 @@ var CardTopSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
83
86
|
}), (highlightRibbonIcon || highlightRibbonText) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(CardTopSectionRibbonContainer, {
|
|
84
87
|
"data-testid": 'card-topSection-ribbon',
|
|
85
88
|
$color: highlightRibbonContentColor !== null && highlightRibbonContentColor !== void 0 ? highlightRibbonContentColor : '',
|
|
86
|
-
$backgroundColor: disabled ? _index.COLORS.neutral_300 : highlightRibbonBgColor !== null && highlightRibbonBgColor !== void 0 ? highlightRibbonBgColor : '',
|
|
89
|
+
$backgroundColor: disabled ? _index.COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor !== null && highlightRibbonBgColor !== void 0 ? highlightRibbonBgColor : '',
|
|
87
90
|
children: [highlightRibbonIcon, highlightRibbonText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.ComponentS, {
|
|
88
91
|
color: highlightRibbonContentColor !== null && highlightRibbonContentColor !== void 0 ? highlightRibbonContentColor : '',
|
|
89
92
|
textStyle: _typography.ComponentTextStyle.Regular,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTopSection.cjs","names":["React","_interopRequireWildcard","require","_styledComponents","_interopRequireDefault","_typography","_Checkbox","_Tag","_index","_Image","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardTopSectionImageContainer","styled","div","_taggedTemplateLiteral2","exports","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","COLORS","white","CardTopSection","forwardRef","_ref","ref","_image$height","_image$fallbackSrc","_image$loader","selected","setSelected","image","tagLabel","tagIcon","_ref$tagVariant","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","jsxs","style","height","children","jsx","ImageWithFallbacks","fallbacks","fallbackSrc","src","alt","loader","width","select","Tag","label","variant","icon","neutral_300","ComponentS","color","textStyle","ComponentTextStyle","Regular","propTypes","_propTypes","bool","func","string","node","shape","isRequired","_default"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${COLORS.white};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.neutral_300 : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>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typography","_Checkbox","_interopRequireDefault","_Tag","_index","_Image","_jsxRuntime","_templateObject","_templateObject2","_templateObject3","_templateObject4","_templateObject5","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CardTopSectionImageContainer","styled","div","_taggedTemplateLiteral2","exports","CardTopSectionTagContainer","CardTopSectionContainer","props","disabled","CardTopSectionRibbonContainer","$backgroundColor","$color","CardTopSectionCheckboxContainer","COLORS","getColor","theme","CardTopSection","forwardRef","_ref","ref","_image$height","_image$fallbackSrc","_image$loader","selected","setSelected","image","tagLabel","tagIcon","_ref$tagVariant","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","useTheme","jsxs","style","height","children","jsx","ImageWithFallbacks","fallbacks","fallbackSrc","src","alt","loader","width","select","Tag","label","variant","icon","ComponentS","color","textStyle","ComponentTextStyle","Regular","propTypes","_propTypes","bool","func","string","node","shape","isRequired","_default"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";;;;;;;;;;AAAA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/taggedTemplateLit
|
|
|
2
2
|
import _pt from "prop-types";
|
|
3
3
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
import styled from 'styled-components';
|
|
5
|
+
import styled, { useTheme } from 'styled-components';
|
|
6
6
|
import { ComponentS, ComponentTextStyle } from '../../styles/typography';
|
|
7
7
|
import Checkbox from '../../InputFields/Checkbox';
|
|
8
8
|
import { Tag } from '../../Tag';
|
|
@@ -20,7 +20,9 @@ export var CardTopSectionRibbonContainer = styled.div(_templateObject4 || (_temp
|
|
|
20
20
|
}, function (props) {
|
|
21
21
|
return props.$color;
|
|
22
22
|
});
|
|
23
|
-
export var CardTopSectionCheckboxContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n\n .checkbox-icon {\n background-color: ", ";\n }\n"])),
|
|
23
|
+
export var CardTopSectionCheckboxContainer = styled.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n\n .checkbox-icon {\n background-color: ", ";\n }\n"])), function (props) {
|
|
24
|
+
return COLORS.getColor('white', props.theme);
|
|
25
|
+
});
|
|
24
26
|
var CardTopSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
25
27
|
var _image$height, _image$fallbackSrc, _image$loader;
|
|
26
28
|
var selected = _ref.selected,
|
|
@@ -35,6 +37,7 @@ var CardTopSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
35
37
|
highlightRibbonContentColor = _ref.highlightRibbonContentColor,
|
|
36
38
|
highlightRibbonBgColor = _ref.highlightRibbonBgColor,
|
|
37
39
|
disabled = _ref.disabled;
|
|
40
|
+
var theme = useTheme();
|
|
38
41
|
return /*#__PURE__*/_jsxs(CardTopSectionContainer, {
|
|
39
42
|
disabled: disabled,
|
|
40
43
|
"data-testid": 'card-topSection',
|
|
@@ -69,7 +72,7 @@ var CardTopSection = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
69
72
|
}), (highlightRibbonIcon || highlightRibbonText) && /*#__PURE__*/_jsxs(CardTopSectionRibbonContainer, {
|
|
70
73
|
"data-testid": 'card-topSection-ribbon',
|
|
71
74
|
$color: highlightRibbonContentColor !== null && highlightRibbonContentColor !== void 0 ? highlightRibbonContentColor : '',
|
|
72
|
-
$backgroundColor: disabled ? COLORS.neutral_300 : highlightRibbonBgColor !== null && highlightRibbonBgColor !== void 0 ? highlightRibbonBgColor : '',
|
|
75
|
+
$backgroundColor: disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor !== null && highlightRibbonBgColor !== void 0 ? highlightRibbonBgColor : '',
|
|
73
76
|
children: [highlightRibbonIcon, highlightRibbonText && /*#__PURE__*/_jsx(ComponentS, {
|
|
74
77
|
color: highlightRibbonContentColor !== null && highlightRibbonContentColor !== void 0 ? highlightRibbonContentColor : '',
|
|
75
78
|
textStyle: ComponentTextStyle.Regular,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardTopSection.js","names":["React","styled","ComponentS","ComponentTextStyle","Checkbox","Tag","COLORS","ImageWithFallbacks","jsx","_jsx","jsxs","_jsxs","CardTopSectionImageContainer","div","_templateObject","_taggedTemplateLiteral","CardTopSectionTagContainer","_templateObject2","CardTopSectionContainer","_templateObject3","props","disabled","CardTopSectionRibbonContainer","_templateObject4","$backgroundColor","$color","CardTopSectionCheckboxContainer","_templateObject5","white","CardTopSection","forwardRef","_ref","ref","_image$height","_image$fallbackSrc","_image$loader","selected","setSelected","image","tagLabel","tagIcon","_ref$tagVariant","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","style","height","children","fallbacks","fallbackSrc","src","alt","loader","width","select","label","variant","icon","neutral_300","color","textStyle","Regular","propTypes","_pt","bool","func","string","node","shape","isRequired"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${COLORS.white};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.neutral_300 : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAM,mBAAmB;AACtC,SAAQC,UAAU,EAAEC,kBAAkB,QAAO,yBAAyB;AACtE,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAAQC,GAAG,QAAoB,WAAW;AAE1C,SAAQC,MAAM,QAAO,aAAa;AAClC,SAAQC,kBAAkB,QAAO,aAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AA2B/C,OAAO,IAAMC,4BAA4B,GAAGX,MAAM,CAACY,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,2PAYrD;AAED,OAAO,IAAMC,0BAA0B,GAAGf,MAAM,CAACY,GAAG,CAAAI,gBAAA,KAAAA,gBAAA,GAAAF,sBAAA,6FAMnD;AAED,OAAO,IAAMG,uBAAuB,GAAGjB,MAAM,CAACY,GAAG,CAAAM,gBAAA,KAAAA,gBAAA,GAAAJ,sBAAA,kFAK7C,UAAAK,KAAK;EAAA,OAAIA,KAAK,CAACC,QAAQ,yDAGpB,EAAE;AAAA,EACR;AAED,OAAO,IAAMC,6BAA6B,GAAG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allbacks","jsx","_jsx","jsxs","_jsxs","CardTopSectionImageContainer","div","_templateObject","_taggedTemplateLiteral","CardTopSectionTagContainer","_templateObject2","CardTopSectionContainer","_templateObject3","props","disabled","CardTopSectionRibbonContainer","_templateObject4","$backgroundColor","$color","CardTopSectionCheckboxContainer","_templateObject5","getColor","theme","CardTopSection","forwardRef","_ref","ref","_image$height","_image$fallbackSrc","_image$loader","selected","setSelected","image","tagLabel","tagIcon","_ref$tagVariant","tagVariant","highlightRibbonIcon","highlightRibbonText","highlightRibbonContentColor","highlightRibbonBgColor","style","height","children","fallbacks","fallbackSrc","src","alt","loader","width","select","label","variant","icon","color","textStyle","Regular","propTypes","_pt","bool","func","string","node","shape","isRequired"],"sources":["../../../src/Card/VerticalCard/CardTopSection.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { useTheme } from 'styled-components';\r\nimport {ComponentS, ComponentTextStyle} from '../../styles/typography';\r\nimport Checkbox from '../../InputFields/Checkbox';\r\nimport {Tag, TagVariants} from '../../Tag';\r\n\r\nimport {COLORS} from '../../index';\r\nimport {ImageWithFallbacks} from \"../../Image\";\r\n\r\nexport interface CardTopSectionProps {\r\n /** Sets initial state of select Checkbox. */\r\n selected?: boolean;\r\n /** If this action is provided, then Checkbox will be shown on the top-right corner of the Card. */\r\n setSelected?: (arg0: boolean) => void;\r\n /** Label shown in the tag in the top-left corner of the Card. */\r\n tagLabel?: string;\r\n /** Icon shown in the tag in the top-left corner of the Card. */\r\n tagIcon?: React.ReactNode;\r\n /** Tag variant shown in the tag in the top-left corner of the Card. */\r\n tagVariant?: TagVariants;\r\n /** Text shown in the Ribbon, under the Image. */\r\n highlightRibbonText?: string;\r\n /** Icon shown in the Ribbon, under the Image. */\r\n highlightRibbonIcon?: React.ReactNode;\r\n /** Content color (text and image) of the Ribbon, under the Image. */\r\n highlightRibbonContentColor?: string;\r\n /** Background color of the Ribbon, shown under the Image. */\r\n highlightRibbonBgColor?: string;\r\n /** Details of the Image shown in the section. */\r\n image?: { src: string; fallbackSrc?: string; alt: string, height?: string; width?: string; loader?: boolean };\r\n /** This property is automatically set in the Card itself and is based on 'disabled' flag of CardProps. */\r\n disabled?: boolean;\r\n}\r\n\r\nexport const CardTopSectionImageContainer = styled.div`\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n height: 100%;\r\n width: 100%;\r\n img{\r\n object-fit: cover;\r\n width: 100%;\r\n height: 100%;\r\n border-top-right-radius: 8px;\r\n border-top-left-radius: 8px;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionTagContainer = styled.div`\r\n position: absolute;\r\n\r\n top: 16px;\r\n left: 16px;\r\n width: calc(100% - 32px);\r\n`;\r\n\r\nexport const CardTopSectionContainer = styled.div<{ disabled?: boolean }>`\r\n position: relative;\r\n width: 100%;\r\n overflow: visible;\r\n\r\n ${props => props.disabled ? `\r\n img, svg {\r\n filter: grayscale(100%);\r\n }` : ''}\r\n`;\r\n\r\nexport const CardTopSectionRibbonContainer = styled.div<{ $color: string; $backgroundColor: string }>`\r\n min-height: calc(40px - 16px);\r\n background-color: ${props => props.$backgroundColor};\r\n width: calc(100% - 32px);\r\n position: absolute;\r\n bottom: 0px;\r\n left: 0px;\r\n padding: 8px 16px 8px 16px;\r\n display: flex;\r\n flex-direction: row;\r\n align-items: center;\r\n gap: 8px;\r\n\r\n svg {\r\n color: ${props => props.$color};\r\n width: 24px;\r\n height: 24px;\r\n flex-grow: 0;\r\n flex-shrink: 0;\r\n }\r\n`;\r\n\r\nexport const CardTopSectionCheckboxContainer = styled.div`\r\n position: absolute;\r\n top: 0;\r\n right: 0;\r\n z-index: 1;\r\n\r\n .checkbox-icon {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n`;\r\n\r\nconst CardTopSection = React.forwardRef(({\r\n selected,\r\n setSelected,\r\n image,\r\n tagLabel,\r\n tagIcon,\r\n tagVariant = 'positive',\r\n highlightRibbonIcon,\r\n highlightRibbonText,\r\n highlightRibbonContentColor,\r\n highlightRibbonBgColor,\r\n disabled\r\n }: CardTopSectionProps, ref: React.Ref<HTMLDivElement>) => {\r\n\r\n const theme = useTheme();\r\n return (\r\n <CardTopSectionContainer disabled={disabled} data-testid={'card-topSection'} style={{height: image?.height ?? 200}}>\r\n {\r\n image &&\r\n <CardTopSectionImageContainer>\r\n <ImageWithFallbacks fallbacks={image.fallbackSrc ?? ''} src={image.src} alt={image.alt} loader={image.loader ?? false} width={image.width} height={image.height}/>\r\n </CardTopSectionImageContainer>\r\n }\r\n {(!!selected || !!setSelected) && (\r\n <CardTopSectionCheckboxContainer data-testid={'card-topSection-checkbox'}>\r\n <Checkbox ref={ref}\r\n disabled={disabled}\r\n select={(selected: boolean) => setSelected && setSelected(selected)}\r\n selected={selected || false}/>\r\n </CardTopSectionCheckboxContainer>\r\n )}\r\n {(tagLabel || tagIcon) && (\r\n <CardTopSectionTagContainer>\r\n <Tag label={tagLabel} variant={tagVariant} icon={tagIcon}/>\r\n </CardTopSectionTagContainer>\r\n )}\r\n {(highlightRibbonIcon || highlightRibbonText) && (\r\n <CardTopSectionRibbonContainer data-testid={'card-topSection-ribbon'} $color={highlightRibbonContentColor ?? ''}\r\n $backgroundColor={disabled ? COLORS.getColor('neutral_300', theme) : highlightRibbonBgColor ?? ''}>\r\n {highlightRibbonIcon}\r\n {highlightRibbonText && (\r\n <ComponentS color={highlightRibbonContentColor ?? ''} textStyle={ComponentTextStyle.Regular}>\r\n {highlightRibbonText}\r\n </ComponentS>\r\n )}\r\n </CardTopSectionRibbonContainer>\r\n )}\r\n </CardTopSectionContainer>\r\n );\r\n});\r\n\r\nexport default CardTopSection;\r\n"],"mappings":";;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,IAAIC,QAAQ,QAAQ,mBAAmB;AACpD,SAAQC,UAAU,EAAEC,kBAAkB,QAAO,yBAAyB;AACtE,OAAOC,QAAQ,MAAM,4BAA4B;AACjD,SAAQC,GAAG,QAAoB,WAAW;AAE1C,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AO,EAAAwB,GAAA,CAAAI,IAAA;EAIPxB,mBAAmB,EAAAoB,GAAA,CAAAG,MAAA;EAEnBxB,mBAAmB,EAAAqB,GAAA,CAAAI,IAAA;EAEnBvB,2BAA2B,EAAAmB,GAAA,CAAAG,MAAA;EAE3BrB,sBAAsB,EAAAkB,GAAA,CAAAG,MAAA;EAEtB7B,KAAK,EAAA0B,GAAA,CAAAK,KAAA;IAAKjB,GAAG,EAAAY,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUnB,WAAW,EAAAa,GAAA,CAAAG,MAAA;IAAWd,GAAG,EAAAW,GAAA,CAAAG,MAAA,CAAAG,UAAA;IAAUtB,MAAM,EAAAgB,GAAA,CAAAG,MAAA;IAAWZ,KAAK,EAAAS,GAAA,CAAAG,MAAA;IAAWb,MAAM,EAAAU,GAAA,CAAAC;EAAA;EAEjG7C,QAAQ,EAAA4C,GAAA,CAAAC;AAAA;AAwHV,eAAepC,cAAc","ignoreList":[]}
|
|
@@ -19,6 +19,64 @@ var ChipContentContainer = _styledComponents["default"].div(_templateObject || (
|
|
|
19
19
|
exports.ChipContentContainer = ChipContentContainer;
|
|
20
20
|
var ChipContent = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n ", "\n\n position: relative;\n display: flex;\n gap: 4px;\n align-items: center;\n min-height: 24px;\n box-sizing: border-box;\n border-radius: 24px;\n padding: 4px 12px;\n\n .chip-icon {\n height: 16px;\n width: 16px;\n border-radius: 50%;\n\n svg {\n height: 16px;\n width: 16px;\n }\n }\n\n .icon-left {\n margin-left: -4px;\n }\n\n .icon-right {\n margin-right: -4px;\n }\n\n .action-right {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 48px;\n width: 48px;\n right: -8px;\n }\n\n &.with-action-right {\n position: relative;\n padding-right: 28px;\n }\n"])), (0, _styles.ComponentXSStyling)(_styles.ComponentTextStyle.Bold, null));
|
|
21
21
|
exports.ChipContent = ChipContent;
|
|
22
|
-
var ChipContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-block;\n cursor: pointer;\n position: relative;\n\n &.medium {\n ", " {\n gap: 6px;\n padding: 10px 16px;\n\n ", "\n .chip-icon {\n height: 20px;\n width: 20px;\n\n svg {\n height: 20px;\n width: 20px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 38px;\n\n .action-right {\n right: -2px;\n }\n }\n }\n\n &.large {\n ", " {\n gap: 8px;\n padding: 12px 20px;\n\n ", "\n .chip-icon {\n height: 24px;\n width: 24px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 48px;\n\n .action-right {\n right: 4px;\n }\n }\n }\n\n &.interactive:focus {\n ", "\n }\n\n &.default {\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:active:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.outline {\n color: ", ";\n\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n }\n }\n\n &.interactive.outline:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n }\n }\n\n &.interactive.outline:active:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n box-shadow: none;\n }\n }\n\n //account for border\n &.small.outline:not(.disabled) {\n ", " {\n padding: 2px 10px;\n }\n }\n\n &.medium.outline:not(.disabled) {\n ", " {\n padding: 8px 14px;\n }\n }\n\n &.large.outline:not(.disabled) {\n ", " {\n padding: 10px 18px;\n }\n }\n\n &.invalid {\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:hover:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:active:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n .action-right:focus {\n ", "\n }\n\n .action-right:hover .chip-icon {\n background-color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n\n &.invalid {\n .action-right:hover .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n pointer-events: none;\n }\n\n ", " {\n border: none !important;\n background-color: ", " !important;\n color: ", " !important;\n }\n }\n"])), ChipContent, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, null), ChipContent, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, null), _styles.focusStyles,
|
|
22
|
+
var ChipContainer = _styledComponents["default"].div(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-block;\n cursor: pointer;\n position: relative;\n\n &.medium {\n ", " {\n gap: 6px;\n padding: 10px 16px;\n\n ", "\n .chip-icon {\n height: 20px;\n width: 20px;\n\n svg {\n height: 20px;\n width: 20px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 38px;\n\n .action-right {\n right: -2px;\n }\n }\n }\n\n &.large {\n ", " {\n gap: 8px;\n padding: 12px 20px;\n\n ", "\n .chip-icon {\n height: 24px;\n width: 24px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 48px;\n\n .action-right {\n right: 4px;\n }\n }\n }\n\n &.interactive:focus {\n ", "\n }\n\n &.default {\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:active:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.outline {\n color: ", ";\n\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n }\n }\n\n &.interactive.outline:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n }\n }\n\n &.interactive.outline:active:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n box-shadow: none;\n }\n }\n\n //account for border\n &.small.outline:not(.disabled) {\n ", " {\n padding: 2px 10px;\n }\n }\n\n &.medium.outline:not(.disabled) {\n ", " {\n padding: 8px 14px;\n }\n }\n\n &.large.outline:not(.disabled) {\n ", " {\n padding: 10px 18px;\n }\n }\n\n &.invalid {\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:hover:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:active:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n .action-right:focus {\n ", "\n }\n\n .action-right:hover .chip-icon {\n background-color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n\n &.invalid {\n .action-right:hover .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n pointer-events: none;\n }\n\n ", " {\n border: none !important;\n background-color: ", " !important;\n color: ", " !important;\n }\n }\n"])), ChipContent, (0, _styles.ComponentSStyling)(_styles.ComponentTextStyle.Bold, null), ChipContent, (0, _styles.ComponentMStyling)(_styles.ComponentTextStyle.Bold, null), _styles.focusStyles, function (props) {
|
|
23
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
24
|
+
}, ChipContent, function (props) {
|
|
25
|
+
return _styles.COLORS.getColor('primary_500', props.theme);
|
|
26
|
+
}, ChipContent, function (props) {
|
|
27
|
+
return _styles.COLORS.getColor('primary_700', props.theme);
|
|
28
|
+
}, ChipContent, function (props) {
|
|
29
|
+
return _styles.COLORS.getColor('primary_800', props.theme);
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return _styles.COLORS.getColor('neutral_600', props.theme);
|
|
32
|
+
}, ChipContent, function (props) {
|
|
33
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
34
|
+
}, function (props) {
|
|
35
|
+
return _styles.COLORS.getColor('neutral_200', props.theme);
|
|
36
|
+
}, ChipContent, function (props) {
|
|
37
|
+
return _styles.COLORS.getColor('primary_20', props.theme);
|
|
38
|
+
}, function (props) {
|
|
39
|
+
return _styles.COLORS.getColor('primary_200', props.theme);
|
|
40
|
+
}, function (props) {
|
|
41
|
+
return _styles.COLORS.getColor('primary_700', props.theme);
|
|
42
|
+
}, ChipContent, function (props) {
|
|
43
|
+
return _styles.COLORS.getColor('primary_100', props.theme);
|
|
44
|
+
}, function (props) {
|
|
45
|
+
return _styles.COLORS.getColor('primary_300', props.theme);
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return _styles.COLORS.getColor('primary_800', props.theme);
|
|
48
|
+
}, ChipContent, ChipContent, ChipContent, ChipContent, function (props) {
|
|
49
|
+
return _styles.COLORS.getColor('critical_100', props.theme);
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return _styles.COLORS.getColor('critical_600', props.theme);
|
|
52
|
+
}, ChipContent, function (props) {
|
|
53
|
+
return _styles.COLORS.getColor('critical_200', props.theme);
|
|
54
|
+
}, function (props) {
|
|
55
|
+
return _styles.COLORS.getColor('critical_700', props.theme);
|
|
56
|
+
}, ChipContent, function (props) {
|
|
57
|
+
return _styles.COLORS.getColor('critical_300', props.theme);
|
|
58
|
+
}, function (props) {
|
|
59
|
+
return _styles.COLORS.getColor('critical_800', props.theme);
|
|
60
|
+
}, _styles.focusStyles, function (props) {
|
|
61
|
+
return _styles.COLORS.getColor('primary_700', props.theme);
|
|
62
|
+
}, function (props) {
|
|
63
|
+
return _styles.COLORS.getColor('primary_800', props.theme);
|
|
64
|
+
}, function (props) {
|
|
65
|
+
return _styles.COLORS.getColor('primary_300', props.theme);
|
|
66
|
+
}, function (props) {
|
|
67
|
+
return _styles.COLORS.getColor('critical_200', props.theme);
|
|
68
|
+
}, function (props) {
|
|
69
|
+
return _styles.COLORS.getColor('critical_700', props.theme);
|
|
70
|
+
}, function (props) {
|
|
71
|
+
return _styles.COLORS.getColor('critical_300', props.theme);
|
|
72
|
+
}, function (props) {
|
|
73
|
+
return _styles.COLORS.getColor('critical_800', props.theme);
|
|
74
|
+
}, function (props) {
|
|
75
|
+
return _styles.COLORS.getColor('primary_300', props.theme);
|
|
76
|
+
}, ChipContentContainer, ChipContent, function (props) {
|
|
77
|
+
return _styles.COLORS.getColor('neutral_100', props.theme);
|
|
78
|
+
}, function (props) {
|
|
79
|
+
return _styles.COLORS.getColor('neutral_300', props.theme);
|
|
80
|
+
});
|
|
23
81
|
exports.ChipContainer = ChipContainer;
|
|
24
82
|
//# sourceMappingURL=ChipStyles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChipStyles.cjs","names":["_styledComponents","_interopRequireDefault","require","_styles","_templateObject","_templateObject2","_templateObject3","ChipContentContainer","styled","div","_taggedTemplateLiteral2","exports","ChipContent","ComponentXSStyling","ComponentTextStyle","Bold","ChipContainer","ComponentSStyling","ComponentMStyling","focusStyles","COLORS","white","primary_500","primary_700","primary_800","neutral_600","neutral_200","primary_20","primary_200","primary_100","primary_300","critical_100","critical_600","critical_200","critical_700","critical_300","critical_800","neutral_100","neutral_300"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${COLORS.white};\r\n\r\n ${ChipContent} {\r\n background-color: ${COLORS.primary_500};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${COLORS.primary_700};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${COLORS.primary_800};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${COLORS.neutral_600};\r\n\r\n ${ChipContent} {\r\n background-color: ${COLORS.white};\r\n border: 2px solid ${COLORS.neutral_200};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${COLORS.primary_20};\r\n border: 2px solid ${COLORS.primary_200};\r\n color: ${COLORS.primary_700};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${COLORS.primary_100};\r\n border: 2px solid ${COLORS.primary_300};\r\n color: ${COLORS.primary_800};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${COLORS.critical_100};\r\n color: ${COLORS.critical_600};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${COLORS.critical_200};\r\n color: ${COLORS.critical_700};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${COLORS.critical_300};\r\n color: ${COLORS.critical_800};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${COLORS.primary_700};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${COLORS.primary_800};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${COLORS.primary_300};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${COLORS.critical_200};\r\n color: ${COLORS.critical_700};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${COLORS.critical_300};\r\n color: ${COLORS.critical_800};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${COLORS.primary_300};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${COLORS.neutral_100} !important;\r\n color: ${COLORS.neutral_300} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":";;;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAA8H,IAAAE,eAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAR9H;AACA;AACA;AAGA;AACA;AACA;AAGO,IAAMC,oBAAoB,GAAGC,4BAAM,CAACC,GAAG,CAAAL,eAAA,KAAAA,eAAA,OAAAM,uBAAA,4GAK7C;AAACC,OAAA,CAAAJ,oBAAA,GAAAA,oBAAA;AAEK,IAAMK,WAAW,GAAGJ,4BAAM,CAACC,GAAG,CAAAJ,gBAAA,KAAAA,gBAAA,OAAAK,uBAAA,wsBACjC,IAAAG,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC,CA4CpD;AAACJ,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAEK,IAAMI,aAAa,GAAGR,4BAAM,CAACC,GAAG,CAAAH,gBAAA,KAAAA,gBAAA,OAAAI,uBAAA,gjGAMjCE,WAAW,EAIT,IAAAK,yBAAiB,EAACH,0B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Default","require","_styles","_templateObject","_templateObject2","_templateObject3","ChipContentContainer","styled","div","_taggedTemplateLiteral2","exports","ChipContent","ComponentXSStyling","ComponentTextStyle","Bold","ChipContainer","ComponentSStyling","ComponentMStyling","focusStyles","props","COLORS","getColor","theme"],"sources":["../../src/Chips/ChipStyles.ts"],"sourcesContent":["/**\r\n * Import third-party libraries.\r\n */\r\nimport styled from 'styled-components';\r\n\r\n/**\r\n * Import custom style properties.\r\n */\r\nimport { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';\r\n\r\nexport const ChipContentContainer = styled.div`\r\n display: flex;\r\n align-items: center;\r\n min-height: 48px;\r\n width: max-content;\r\n`;\r\n\r\nexport const ChipContent = styled.div`\r\n ${ComponentXSStyling(ComponentTextStyle.Bold, null)}\r\n\r\n position: relative;\r\n display: flex;\r\n gap: 4px;\r\n align-items: center;\r\n min-height: 24px;\r\n box-sizing: border-box;\r\n border-radius: 24px;\r\n padding: 4px 12px;\r\n\r\n .chip-icon {\r\n height: 16px;\r\n width: 16px;\r\n border-radius: 50%;\r\n\r\n svg {\r\n height: 16px;\r\n width: 16px;\r\n }\r\n }\r\n\r\n .icon-left {\r\n margin-left: -4px;\r\n }\r\n\r\n .icon-right {\r\n margin-right: -4px;\r\n }\r\n\r\n .action-right {\r\n position: absolute;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 48px;\r\n width: 48px;\r\n right: -8px;\r\n }\r\n\r\n &.with-action-right {\r\n position: relative;\r\n padding-right: 28px;\r\n }\r\n`;\r\n\r\nexport const ChipContainer = styled.div`\r\n display: inline-block;\r\n cursor: pointer;\r\n position: relative;\r\n\r\n &.medium {\r\n ${ChipContent} {\r\n gap: 6px;\r\n padding: 10px 16px;\r\n\r\n ${ComponentSStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 20px;\r\n width: 20px;\r\n\r\n svg {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 38px;\r\n\r\n .action-right {\r\n right: -2px;\r\n }\r\n }\r\n }\r\n\r\n &.large {\r\n ${ChipContent} {\r\n gap: 8px;\r\n padding: 12px 20px;\r\n\r\n ${ComponentMStyling(ComponentTextStyle.Bold, null)}\r\n .chip-icon {\r\n height: 24px;\r\n width: 24px;\r\n\r\n svg {\r\n height: 24px;\r\n width: 24px;\r\n }\r\n }\r\n }\r\n\r\n .with-action-right {\r\n padding-right: 48px;\r\n\r\n .action-right {\r\n right: 4px;\r\n }\r\n }\r\n }\r\n\r\n &.interactive:focus {\r\n ${focusStyles}\r\n }\r\n\r\n &.default {\r\n color: ${props => COLORS.getColor('white', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_500', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.default:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &.outline {\r\n color: ${props => COLORS.getColor('neutral_600', props.theme)};\r\n\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_200', props.theme)};\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.outline:active:not(.action-within) {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n border: 2px solid ${props => COLORS.getColor('primary_300', props.theme)};\r\n color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n box-shadow: none;\r\n }\r\n }\r\n\r\n //account for border\r\n &.small.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 2px 10px;\r\n }\r\n }\r\n\r\n &.medium.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 8px 14px;\r\n }\r\n }\r\n\r\n &.large.outline:not(.disabled) {\r\n ${ChipContent} {\r\n padding: 10px 18px;\r\n }\r\n }\r\n\r\n &.invalid {\r\n ${ChipContent} {\r\n background-color: ${props => COLORS.getColor('critical_100', props.theme)};\r\n color: ${props => COLORS.getColor('critical_600', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:hover:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n }\r\n\r\n &.interactive.invalid:active:not(.action-within) {\r\n ${ChipContent} {\r\n background: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n }\r\n\r\n .action-right:focus {\r\n ${focusStyles}\r\n }\r\n\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n\r\n &.invalid {\r\n .action-right:hover .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_200', props.theme)};\r\n color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n\r\n .action-right:active .chip-icon {\r\n background-color: ${props => COLORS.getColor('critical_300', props.theme)};\r\n color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n .action-right.disabled .chip-icon {\r\n background-color: transparent;\r\n color: ${props => COLORS.getColor('primary_300', props.theme)};\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n ${ChipContentContainer} {\r\n pointer-events: none;\r\n }\r\n\r\n ${ChipContent} {\r\n border: none !important;\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)} !important;\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)} !important;\r\n }\r\n }\r\n`;\r\n"],"mappings":";;;;;;;;AAGA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAA8H,IAAAE,eAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAR9H;AACA;AACA;AAGA;AACA;AACA;AAGO,IAAMC,oBAAoB,GAAGC,4BAAM,CAACC,GAAG,CAAAL,eAAA,KAAAA,eAAA,OAAAM,uBAAA,4GAK7C;AAACC,OAAA,CAAAJ,oBAAA,GAAAA,oBAAA;AAEK,IAAMK,WAAW,GAAGJ,4BAAM,CAACC,GAAG,CAAAJ,gBAAA,KAAAA,gBAAA,OAAAK,uBAAA,wsBACjC,IAAAG,0BAAkB,EAACC,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC,CA4CpD;AAACJ,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAEK,IAAMI,aAAa,GAAGR,4BAAM,CAACC,GAAG,CAAAH,gBAAA,KAAAA,gBAAA,OAAAI,uBAAA,gjGAMjCE,WAAW,EAIT,IAAAK,yBAAiB,EAACH,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC,EAsBlDH,WAAW,EAIT,IAAAM,yBAAiB,EAACJ,0BAAkB,CAACC,IAAI,EAAE,IAAI,CAAC,EAsBlDI,mBAAW,EAIJ,UAAAC,KAAK;EAAA,OAAIC,cAAM,CAACC,QAAQ,CAAC,OAAO,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAErDX,WAAW,EACS,UAAAQ,KAAK;EAAA,OAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAKxEX,WAAW,EAC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AK,CAACG,KAAK,CAAC;AAAA,GAChE,UAAAH,KAAK;EAAA,OAAIC,cAAM,CAACC,QAAQ,CAAC,cAAc,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAKrD,UAAAH,KAAK;EAAA,OAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAO7DhB,oBAAoB,EAIpBK,WAAW,EAES,UAAAQ,KAAK;EAAA,OAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,GAC/D,UAAAH,KAAK;EAAA,OAAIC,cAAM,CAACC,QAAQ,CAAC,aAAa,EAAEF,KAAK,CAACG,KAAK,CAAC;AAAA,EAGlE;AAACZ,OAAA,CAAAK,aAAA,GAAAA,aAAA","ignoreList":[]}
|
package/dist/Chips/ChipStyles.js
CHANGED
|
@@ -11,5 +11,63 @@ import styled from 'styled-components';
|
|
|
11
11
|
import { COLORS, ComponentMStyling, ComponentSStyling, ComponentTextStyle, ComponentXSStyling, focusStyles } from '../styles';
|
|
12
12
|
export var ChipContentContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n min-height: 48px;\n width: max-content;\n"])));
|
|
13
13
|
export var ChipContent = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n\n position: relative;\n display: flex;\n gap: 4px;\n align-items: center;\n min-height: 24px;\n box-sizing: border-box;\n border-radius: 24px;\n padding: 4px 12px;\n\n .chip-icon {\n height: 16px;\n width: 16px;\n border-radius: 50%;\n\n svg {\n height: 16px;\n width: 16px;\n }\n }\n\n .icon-left {\n margin-left: -4px;\n }\n\n .icon-right {\n margin-right: -4px;\n }\n\n .action-right {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 48px;\n width: 48px;\n right: -8px;\n }\n\n &.with-action-right {\n position: relative;\n padding-right: 28px;\n }\n"])), ComponentXSStyling(ComponentTextStyle.Bold, null));
|
|
14
|
-
export var ChipContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n cursor: pointer;\n position: relative;\n\n &.medium {\n ", " {\n gap: 6px;\n padding: 10px 16px;\n\n ", "\n .chip-icon {\n height: 20px;\n width: 20px;\n\n svg {\n height: 20px;\n width: 20px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 38px;\n\n .action-right {\n right: -2px;\n }\n }\n }\n\n &.large {\n ", " {\n gap: 8px;\n padding: 12px 20px;\n\n ", "\n .chip-icon {\n height: 24px;\n width: 24px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 48px;\n\n .action-right {\n right: 4px;\n }\n }\n }\n\n &.interactive:focus {\n ", "\n }\n\n &.default {\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:active:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.outline {\n color: ", ";\n\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n }\n }\n\n &.interactive.outline:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n }\n }\n\n &.interactive.outline:active:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n box-shadow: none;\n }\n }\n\n //account for border\n &.small.outline:not(.disabled) {\n ", " {\n padding: 2px 10px;\n }\n }\n\n &.medium.outline:not(.disabled) {\n ", " {\n padding: 8px 14px;\n }\n }\n\n &.large.outline:not(.disabled) {\n ", " {\n padding: 10px 18px;\n }\n }\n\n &.invalid {\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:hover:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:active:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n .action-right:focus {\n ", "\n }\n\n .action-right:hover .chip-icon {\n background-color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n\n &.invalid {\n .action-right:hover .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n pointer-events: none;\n }\n\n ", " {\n border: none !important;\n background-color: ", " !important;\n color: ", " !important;\n }\n }\n"])), ChipContent, ComponentSStyling(ComponentTextStyle.Bold, null), ChipContent, ComponentMStyling(ComponentTextStyle.Bold, null), focusStyles,
|
|
14
|
+
export var ChipContainer = styled.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n cursor: pointer;\n position: relative;\n\n &.medium {\n ", " {\n gap: 6px;\n padding: 10px 16px;\n\n ", "\n .chip-icon {\n height: 20px;\n width: 20px;\n\n svg {\n height: 20px;\n width: 20px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 38px;\n\n .action-right {\n right: -2px;\n }\n }\n }\n\n &.large {\n ", " {\n gap: 8px;\n padding: 12px 20px;\n\n ", "\n .chip-icon {\n height: 24px;\n width: 24px;\n\n svg {\n height: 24px;\n width: 24px;\n }\n }\n }\n\n .with-action-right {\n padding-right: 48px;\n\n .action-right {\n right: 4px;\n }\n }\n }\n\n &.interactive:focus {\n ", "\n }\n\n &.default {\n color: ", ";\n\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.interactive.default:active:not(.action-within) {\n ", " {\n background-color: ", ";\n }\n }\n\n &.outline {\n color: ", ";\n\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n }\n }\n\n &.interactive.outline:hover:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n }\n }\n\n &.interactive.outline:active:not(.action-within) {\n ", " {\n background-color: ", ";\n border: 2px solid ", ";\n color: ", ";\n box-shadow: none;\n }\n }\n\n //account for border\n &.small.outline:not(.disabled) {\n ", " {\n padding: 2px 10px;\n }\n }\n\n &.medium.outline:not(.disabled) {\n ", " {\n padding: 8px 14px;\n }\n }\n\n &.large.outline:not(.disabled) {\n ", " {\n padding: 10px 18px;\n }\n }\n\n &.invalid {\n ", " {\n background-color: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:hover:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n &.interactive.invalid:active:not(.action-within) {\n ", " {\n background: ", ";\n color: ", ";\n }\n }\n\n .action-right:focus {\n ", "\n }\n\n .action-right:hover .chip-icon {\n background-color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n\n &.invalid {\n .action-right:hover .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right:active .chip-icon {\n background-color: ", ";\n color: ", ";\n }\n\n .action-right.disabled .chip-icon {\n background-color: transparent;\n color: ", ";\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n ", " {\n pointer-events: none;\n }\n\n ", " {\n border: none !important;\n background-color: ", " !important;\n color: ", " !important;\n }\n }\n"])), ChipContent, ComponentSStyling(ComponentTextStyle.Bold, null), ChipContent, ComponentMStyling(ComponentTextStyle.Bold, null), focusStyles, function (props) {
|
|
15
|
+
return COLORS.getColor('white', props.theme);
|
|
16
|
+
}, ChipContent, function (props) {
|
|
17
|
+
return COLORS.getColor('primary_500', props.theme);
|
|
18
|
+
}, ChipContent, function (props) {
|
|
19
|
+
return COLORS.getColor('primary_700', props.theme);
|
|
20
|
+
}, ChipContent, function (props) {
|
|
21
|
+
return COLORS.getColor('primary_800', props.theme);
|
|
22
|
+
}, function (props) {
|
|
23
|
+
return COLORS.getColor('neutral_600', props.theme);
|
|
24
|
+
}, ChipContent, function (props) {
|
|
25
|
+
return COLORS.getColor('white', props.theme);
|
|
26
|
+
}, function (props) {
|
|
27
|
+
return COLORS.getColor('neutral_200', props.theme);
|
|
28
|
+
}, ChipContent, function (props) {
|
|
29
|
+
return COLORS.getColor('primary_20', props.theme);
|
|
30
|
+
}, function (props) {
|
|
31
|
+
return COLORS.getColor('primary_200', props.theme);
|
|
32
|
+
}, function (props) {
|
|
33
|
+
return COLORS.getColor('primary_700', props.theme);
|
|
34
|
+
}, ChipContent, function (props) {
|
|
35
|
+
return COLORS.getColor('primary_100', props.theme);
|
|
36
|
+
}, function (props) {
|
|
37
|
+
return COLORS.getColor('primary_300', props.theme);
|
|
38
|
+
}, function (props) {
|
|
39
|
+
return COLORS.getColor('primary_800', props.theme);
|
|
40
|
+
}, ChipContent, ChipContent, ChipContent, ChipContent, function (props) {
|
|
41
|
+
return COLORS.getColor('critical_100', props.theme);
|
|
42
|
+
}, function (props) {
|
|
43
|
+
return COLORS.getColor('critical_600', props.theme);
|
|
44
|
+
}, ChipContent, function (props) {
|
|
45
|
+
return COLORS.getColor('critical_200', props.theme);
|
|
46
|
+
}, function (props) {
|
|
47
|
+
return COLORS.getColor('critical_700', props.theme);
|
|
48
|
+
}, ChipContent, function (props) {
|
|
49
|
+
return COLORS.getColor('critical_300', props.theme);
|
|
50
|
+
}, function (props) {
|
|
51
|
+
return COLORS.getColor('critical_800', props.theme);
|
|
52
|
+
}, focusStyles, function (props) {
|
|
53
|
+
return COLORS.getColor('primary_700', props.theme);
|
|
54
|
+
}, function (props) {
|
|
55
|
+
return COLORS.getColor('primary_800', props.theme);
|
|
56
|
+
}, function (props) {
|
|
57
|
+
return COLORS.getColor('primary_300', props.theme);
|
|
58
|
+
}, function (props) {
|
|
59
|
+
return COLORS.getColor('critical_200', props.theme);
|
|
60
|
+
}, function (props) {
|
|
61
|
+
return COLORS.getColor('critical_700', props.theme);
|
|
62
|
+
}, function (props) {
|
|
63
|
+
return COLORS.getColor('critical_300', props.theme);
|
|
64
|
+
}, function (props) {
|
|
65
|
+
return COLORS.getColor('critical_800', props.theme);
|
|
66
|
+
}, function (props) {
|
|
67
|
+
return COLORS.getColor('primary_300', props.theme);
|
|
68
|
+
}, ChipContentContainer, ChipContent, function (props) {
|
|
69
|
+
return COLORS.getColor('neutral_100', props.theme);
|
|
70
|
+
}, function (props) {
|
|
71
|
+
return COLORS.getColor('neutral_300', props.theme);
|
|
72
|
+
});
|
|
15
73
|
//# sourceMappingURL=ChipStyles.js.map
|