@laerdal/life-react-components 3.5.1-dev.15 → 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 +51 -41
- package/dist/Button/Button.cjs.map +1 -1
- package/dist/Button/Button.js +51 -41
- 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/colors.cjs +6 -1
- package/dist/styles/colors.cjs.map +1 -1
- package/dist/styles/colors.d.ts +1 -0
- package/dist/styles/colors.js +6 -1
- package/dist/styles/colors.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":"Button.js","names":["React","styled","LoadingIndicator","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","COLORS","focusStyles","invertedFocusStyles","Size","defaultOnMouseDownHandler","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","getBorderRadius","flatEdge","radius","concat","ButtonContentContainer","div","_templateObject","_taggedTemplateLiteral","ButtonPrimaryStyled","button","_templateObject2","props","size","Large","Bold","colorTheme","primary_800","white","Small","accent1","primary","width","Medium","iconOnly","accent1_700","primary_100","primary_700","primary_600","accent1_800","primary_200","invertFocus","undefined","neutral_100","neutral_300","ButtonSecondaryStyled","_templateObject3","primary_300","ButtonTertiaryStyled","_templateObject4","primary_500","accent1_20","primary_20","accent1_100","ButtonPositiveStyled","_templateObject5","correct_500","correct_700","correct_800","ButtonCriticalStyled","_templateObject6","critical_500","critical_700","critical_800","Button","forwardRef","_ref","ref","_ref$children","children","_ref$variant","variant","_ref$type","type","_ref$size","_ref$width","testId","disabled","icon","_objectWithoutProperties","_excluded","loading","renderProps","_excluded2","renderContent","className","ButtonStyled","_objectSpread","onMouseDown","propTypes","_pt","oneOf","bool","oneOfType","string","node"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { css } from 'styled-components';\r\nimport { LoadingIndicator } from '../LoadingIndicator';\r\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport { COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { Size, Testable } from '../types';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\n\r\nconst getBorderRadius = (flatEdge: string | undefined, radius: number) => {\r\n switch (flatEdge) {\r\n case 'left':\r\n return `0px ${radius}px ${radius}px 0px`;\r\n\r\n case 'right':\r\n return `${radius}px 0px 0px ${radius}px`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}px`;\r\n }\r\n};\r\n\r\nexport const ButtonContentContainer = styled.div`\r\n min-width: 64px;\r\n`;\r\n\r\nexport const ButtonPrimaryStyled = styled.button<ButtonProps & {iconOnly: boolean}>`\r\n border: none;\r\n background-color: transparent;\r\n cursor: pointer;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n box-sizing: border-box;\r\n min-height: ${(props) => (props.size === Size.Large ? '56px' : '48px')};\r\n &.loading-state {\r\n cursor: wait;\r\n }\r\n ${ButtonContentContainer} {\r\n ${(props) =>\r\n props.size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, props?.colorTheme === 'dark' ? COLORS.primary_800 : COLORS.white)\r\n : props.size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, props?.colorTheme === 'dark' ? COLORS.primary_800 : COLORS.white)\r\n : ComponentMStyling(ComponentTextStyle.Bold, props?.colorTheme === 'dark' ? COLORS.primary_800 : COLORS.white)};\r\n\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1 : props?.colorTheme === 'dark' ? COLORS.white : COLORS.primary)};\r\n border-radius: ${(props) => getBorderRadius(props.flatEdge, 8)};\r\n\r\n width: ${(props) => props.width};\r\n position: relative;\r\n\r\n min-height: ${(props) => (props.size === Size.Large ? '56px' : props.size === Size.Small ? '32px' : '40px')};\r\n\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: ${(props) => (props.size === Size.Large ? '14px 16px' : props.size === Size.Small ? '6px 8px' : '8px 12px')};\r\n\r\n span.icon:not(.loading) {\r\n pointer-events: none;\r\n }\r\n\r\n span.loading {\r\n opacity: 0;\r\n }\r\n\r\n .icon {\r\n margin: ${(props) => (props.size === Size.Medium ? props.iconOnly ? '-2px -8px' : '' : (props.size === Size.Small ? props.iconOnly ? '-2px -6px' : '' : '' ))};\r\n width: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n height: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n svg {\r\n width: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')} !important;\r\n height: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')} !important;\r\n }\r\n }\r\n\r\n .label {\r\n margin: 0 4px;\r\n }\r\n\r\n div {\r\n position: absolute;\r\n width: 100%;\r\n svg {\r\n height: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n width: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'dark' ? COLORS.primary : COLORS.white)};\r\n }\r\n }\r\n }\r\n }\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_700 : props?.colorTheme === 'dark' ? COLORS.primary_100 : COLORS.primary_700)};\r\n color: ${(props) => (props?.colorTheme === 'dark' ? COLORS.primary_600 : COLORS.white)};\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_800 : props?.colorTheme === 'dark' ? COLORS.primary_200 : COLORS.primary_800)};\r\n color: ${(props) => (props?.colorTheme === 'dark' ? COLORS.primary_800 : COLORS.white)};\r\n }\r\n\r\n &:focus,\r\n &.focus-state {\r\n ${(props) => (props.invertFocus || (props.invertFocus === undefined && props.colorTheme === 'dark') ? invertedFocusStyles : focusStyles)}\r\n }\r\n &:disabled,\r\n &.disabled-state {\r\n cursor: not-allowed;\r\n }\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n pointer-events: none;\r\n background-color: ${(props) => (props.colorTheme === 'dark' ? COLORS.primary_700 : COLORS.neutral_100)};\r\n color: ${(props) => (props.colorTheme === 'dark' ? COLORS.primary_800 : COLORS.neutral_300)};\r\n }\r\n`;\r\n\r\nexport const ButtonSecondaryStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n ${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1 : props?.colorTheme === 'dark' ? COLORS.white : COLORS.primary)};\r\n background-color: transparent;\r\n div svg path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1 : COLORS.primary)};\r\n }\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1 : props?.colorTheme === 'dark' ? COLORS.white : COLORS.primary)};\r\n \r\n padding: ${(props) => (props.size === Size.Large ? '12px 16px' : props.size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_700 : props?.colorTheme === 'dark' ? COLORS.primary_200 : COLORS.primary_700)};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_700 : props?.colorTheme === 'dark' ? COLORS.primary_200 : COLORS.primary_700)};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_700 : COLORS.primary_700)};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_800 : props?.colorTheme === 'dark' ? COLORS.primary_300 : COLORS.primary_800)};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_800 : props?.colorTheme === 'dark' ? COLORS.primary_300 : COLORS.primary_800)};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_800 : props?.colorTheme === 'dark' ? COLORS.white : COLORS.primary_800)};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: transparent;\r\n color: ${(props) => (props?.colorTheme === 'dark' ? COLORS.primary_700 : COLORS.neutral_300)};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props?.colorTheme === 'dark' ? COLORS.primary_700 : COLORS.neutral_100)};\r\n }\r\n`;\r\n\r\nexport const ButtonTertiaryStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1 : props.colorTheme === 'dark' ? COLORS.white : COLORS.primary_500)};\r\n background-color: transparent;\r\n\r\n div svg path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1 : props.colorTheme === 'dark' ? COLORS.white : COLORS.primary_500)};\r\n }\r\n\r\n padding: ${(props) => (props.size === Size.Large ? '12px 16px' : props.size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_20 : props.colorTheme === 'dark' ? COLORS.primary_700 : COLORS.primary_20)};\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_700 : props.colorTheme === 'dark' ? COLORS.white : COLORS.primary_700)};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_700 : props.colorTheme === 'dark' ? COLORS.white : COLORS.primary_700)};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_100 : props.colorTheme === 'dark' ? COLORS.primary_600 : COLORS.primary_100)};\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_800 : props.colorTheme === 'dark' ? COLORS.white : COLORS.primary_800)};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.accent1_800 : props.colorTheme === 'dark' ? COLORS.white : COLORS.primary_800)};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: transparent !important;\r\n color: ${() => COLORS.primary_700};\r\n border-color: transparent !important;\r\n }\r\n`;\r\n\r\nexport const ButtonPositiveStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n ${ButtonContentContainer} {\r\n color: white;\r\n background-color: ${() => COLORS.correct_500};\r\n }\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${() => COLORS.correct_700};\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${() => COLORS.correct_800};\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: ${() => COLORS.neutral_100};\r\n color: ${() => COLORS.neutral_300};\r\n }\r\n`;\r\n\r\nexport const ButtonCriticalStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n ${ButtonContentContainer} {\r\n color: white;\r\n background-color: ${COLORS.critical_500};\r\n }\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${COLORS.critical_700};\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${COLORS.critical_800};\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: ${COLORS.neutral_100};\r\n color: ${COLORS.neutral_300}; \r\n }\r\n`;\r\n\r\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n /** Look and feel variant of the component. Defaults to 'primary'. */\r\n variant?: 'primary' | 'secondary' | 'tertiary' | 'positive' | 'critical';\r\n /** Can be used in order to remove rounded corners on right or left edge of the button. Used by 'DualFunctionButton'. Defaults to 'undefined' */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** Size of the component. Small, Medium or Large. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Color theme altering of the component. By default there is no altering applied. */\r\n colorTheme?: 'teal' | 'dark';\r\n /** Allows using inverted colors for outlining focus rect. Shown when component focused by keyboard. */\r\n invertFocus?: boolean;\r\n /** Can be used to set custom value for width style. Value is set for 'ButtonContent' container. */\r\n width?: 'auto' | string;\r\n /** If set, then 'opacity' of children container will be set to 0, and loading indicator will be shown. */\r\n loading?: boolean;\r\n /** TestId. Will be set to the top level button component. */\r\n testId?: string;\r\n /** Icon that will be shown on the left of the children. */\r\n icon?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Button component\r\n */\r\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\r\n ({ children = '', variant = 'primary', type = 'button', size = Size.Medium, width = 'auto', testId, disabled, flatEdge, icon, ...props }, ref) => {\r\n // Let's filter out properties that we don't need to render.\r\n const { loading, ...renderProps } = props;\r\n\r\n const renderContent = () => (\r\n <>\r\n {icon && <span className={(children ? 'extramargin ' : '') + (loading ? 'icon loading' : 'icon')}>{icon}</span>}\r\n {children && <span className={loading ? 'label loading' : 'label'}>{children}</span>}\r\n {loading && <LoadingIndicator />}\r\n </>\r\n );\r\n\r\n let ButtonStyled = ButtonPrimaryStyled;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonStyled = ButtonSecondaryStyled;\r\n break;\r\n case 'tertiary':\r\n ButtonStyled = ButtonTertiaryStyled;\r\n break;\r\n case 'positive':\r\n ButtonStyled = ButtonPositiveStyled;\r\n break;\r\n case 'critical':\r\n ButtonStyled = ButtonCriticalStyled;\r\n break;\r\n }\r\n\r\n return (\r\n <ButtonStyled\r\n {...renderProps}\r\n ref={ref}\r\n disabled={disabled}\r\n iconOnly={!children}\r\n type={type}\r\n size={size}\r\n flatEdge={flatEdge}\r\n width={width}\r\n data-testid={testId}\r\n className={props.loading ? 'loading-state ' + props.className : ' ' + props.className}\r\n onMouseDown={defaultOnMouseDownHandler}>\r\n <ButtonContentContainer>{renderContent()}</ButtonContentContainer>\r\n </ButtonStyled>\r\n );\r\n },\r\n);\r\n\r\nexport default Button;\r\n"],"mappings":";;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAe,mBAAmB;AAC/C,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,WAAW;AACvG,SAASC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACpE,SAASC,IAAI,QAAkB,UAAU;AACzC,SAASC,yBAAyB,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEtD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,QAA4B,EAAEC,MAAc,EAAK;EACxE,QAAQD,QAAQ;IACd,KAAK,MAAM;MACT,cAAAE,MAAA,CAAcD,MAAM,SAAAC,MAAA,CAAMD,MAAM;IAElC,KAAK,OAAO;MACV,UAAAC,MAAA,CAAUD,MAAM,iBAAAC,MAAA,CAAcD,MAAM;IAEtC,KAAK,MAAM;IACX;MACE,UAAAC,MAAA,CAAUD,MAAM;EACpB;AACF,CAAC;AAED,OAAO,IAAME,sBAAsB,GAAGrB,MAAM,CAACsB,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,s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AU;EAMxEjE,UAAU,EAAAgE,GAAA,CAAAC,KAAA,EAAG,MAAM,EAAG,MAAM;EAE5BlD,WAAW,EAAAiD,GAAA,CAAAE,IAAA;EAEX5D,KAAK,EAAA0D,GAAA,CAAAG,SAAA,EAAAH,GAAA,CAAAC,KAAA,EAAG,MAAM,IAAAD,GAAA,CAAAI,MAAA;EAEdb,OAAO,EAAAS,GAAA,CAAAE,IAAA;EAEPhB,MAAM,EAAAc,GAAA,CAAAI,MAAA;EAENhB,IAAI,EAAAY,GAAA,CAAAK;AAAA;AAsDN,eAAe/B,MAAM","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Button.js","names":["React","styled","LoadingIndicator","ComponentLStyling","ComponentMStyling","ComponentSStyling","ComponentTextStyle","COLORS","focusStyles","invertedFocusStyles","Size","defaultOnMouseDownHandler","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","getBorderRadius","flatEdge","radius","concat","ButtonContentContainer","div","_templateObject","_taggedTemplateLiteral","ButtonPrimaryStyled","button","_templateObject2","props","size","Large","Bold","colorTheme","getColor","theme","Small","width","Medium","iconOnly","invertFocus","undefined","ButtonSecondaryStyled","_templateObject3","ButtonTertiaryStyled","_templateObject4","ButtonPositiveStyled","_templateObject5","ButtonCriticalStyled","_templateObject6","Button","forwardRef","_ref","ref","_ref$children","children","_ref$variant","variant","_ref$type","type","_ref$size","_ref$width","testId","disabled","icon","_objectWithoutProperties","_excluded","loading","renderProps","_excluded2","renderContent","className","ButtonStyled","_objectSpread","onMouseDown","propTypes","_pt","oneOf","bool","oneOfType","string","node"],"sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport styled, { css } from 'styled-components';\r\nimport { LoadingIndicator } from '../LoadingIndicator';\r\nimport { ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentTextStyle } from '../styles';\r\nimport { COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { Size, Testable } from '../types';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\n\r\nconst getBorderRadius = (flatEdge: string | undefined, radius: number) => {\r\n switch (flatEdge) {\r\n case 'left':\r\n return `0px ${radius}px ${radius}px 0px`;\r\n\r\n case 'right':\r\n return `${radius}px 0px 0px ${radius}px`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}px`;\r\n }\r\n};\r\n\r\nexport const ButtonContentContainer = styled.div`\r\n min-width: 64px;\r\n`;\r\n\r\nexport const ButtonPrimaryStyled = styled.button<ButtonProps & {iconOnly: boolean}>`\r\n border: none;\r\n background-color: transparent;\r\n cursor: pointer;\r\n padding: 0;\r\n margin: 0;\r\n position: relative;\r\n box-sizing: border-box;\r\n min-height: ${(props) => (props.size === Size.Large ? '56px' : '48px')};\r\n &.loading-state {\r\n cursor: wait;\r\n }\r\n ${ButtonContentContainer} {\r\n ${(props) =>\r\n props.size === Size.Large\r\n ? ComponentLStyling(ComponentTextStyle.Bold, props?.colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.getColor('white', props.theme))\r\n : props.size === Size.Small\r\n ? ComponentSStyling(ComponentTextStyle.Bold, props?.colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.getColor('white', props.theme))\r\n : ComponentMStyling(ComponentTextStyle.Bold, props?.colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.getColor('white', props.theme))};\r\n\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary', props.theme))};\r\n border-radius: ${(props) => getBorderRadius(props.flatEdge, 8)};\r\n\r\n width: ${(props) => props.width};\r\n position: relative;\r\n\r\n min-height: ${(props) => (props.size === Size.Large ? '56px' : props.size === Size.Small ? '32px' : '40px')};\r\n\r\n box-sizing: border-box;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n padding: ${(props) => (props.size === Size.Large ? '14px 16px' : props.size === Size.Small ? '6px 8px' : '8px 12px')};\r\n\r\n span.icon:not(.loading) {\r\n pointer-events: none;\r\n }\r\n\r\n span.loading {\r\n opacity: 0;\r\n }\r\n\r\n .icon {\r\n margin: ${(props) => (props.size === Size.Medium ? props.iconOnly ? '-2px -8px' : '' : (props.size === Size.Small ? props.iconOnly ? '-2px -6px' : '' : '' ))};\r\n width: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n height: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n svg {\r\n width: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')} !important;\r\n height: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')} !important;\r\n }\r\n }\r\n\r\n .label {\r\n margin: 0 4px;\r\n }\r\n\r\n div {\r\n position: absolute;\r\n width: 100%;\r\n svg {\r\n height: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n width: ${(props) => (props.size === Size.Large ? '28px' : props.size === Size.Small ? '20px' : '24px')};\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'dark' ? COLORS.getColor('primary', props.theme) : COLORS.getColor('white', props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('primary_100', props.theme) : COLORS.getColor('primary_700', props.theme))};\r\n color: ${(props) => (props?.colorTheme === 'dark' ? COLORS.getColor('primary_600', props.theme) : COLORS.getColor('white', props.theme))};\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.getColor('primary_800', props.theme))};\r\n color: ${(props) => (props?.colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.getColor('white', props.theme))};\r\n }\r\n\r\n &:focus,\r\n &.focus-state {\r\n ${(props) => (props.invertFocus || (props.invertFocus === undefined && props.colorTheme === 'dark') ? invertedFocusStyles : focusStyles)}\r\n }\r\n &:disabled,\r\n &.disabled-state {\r\n cursor: not-allowed;\r\n }\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n pointer-events: none;\r\n background-color: ${(props) => (props.colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.getColor('neutral_100', props.theme))};\r\n color: ${(props) => (props.colorTheme === 'dark' ? COLORS.getColor('primary_800', props.theme) : COLORS.getColor('neutral_300', props.theme))};\r\n }\r\n`;\r\n\r\nexport const ButtonSecondaryStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n ${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary', props.theme))};\r\n background-color: transparent;\r\n div svg path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : COLORS.getColor('primary', props.theme))};\r\n }\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary', props.theme))};\r\n \r\n padding: ${(props) => (props.size === Size.Large ? '12px 16px' : props.size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.getColor('primary_700', props.theme))};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('primary_200', props.theme) : COLORS.getColor('primary_700', props.theme))};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : COLORS.getColor('primary_700', props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('primary_300', props.theme) : COLORS.getColor('primary_800', props.theme))};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('primary_300', props.theme) : COLORS.getColor('primary_800', props.theme))};\r\n \r\n background-color: transparent;\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props?.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_800', props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: transparent;\r\n color: ${(props) => (props?.colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.getColor('neutral_300', props.theme))};\r\n box-shadow: inset 0 0 0 2px ${(props) => (props?.colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.getColor('neutral_100', props.theme))};\r\n }\r\n`;\r\n\r\nexport const ButtonTertiaryStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n${ButtonContentContainer} {\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_500', props.theme))};\r\n background-color: transparent;\r\n\r\n div svg path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_500', props.theme))};\r\n }\r\n\r\n padding: ${(props) => (props.size === Size.Large ? '12px 16px' : props.size === Size.Small ? '4px 8px' : '6px 12px')};\r\n }\r\n\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_20', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('primary_700', props.theme) : COLORS.getColor('primary_20', props.theme))};\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_700', props.theme))};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_700', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_700', props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_100', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('primary_600', props.theme) : COLORS.getColor('primary_100', props.theme))};\r\n color: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_800', props.theme))};\r\n\r\n div {\r\n svg {\r\n path {\r\n fill: ${(props) => (props.colorTheme === 'teal' ? COLORS.getColor('accent1_800', props.theme) : props.colorTheme === 'dark' ? COLORS.getColor('white', props.theme) : COLORS.getColor('primary_800', props.theme))};\r\n }\r\n }\r\n }\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: transparent !important;\r\n color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n border-color: transparent !important;\r\n }\r\n`;\r\n\r\nexport const ButtonPositiveStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n ${ButtonContentContainer} {\r\n color: white;\r\n background-color: ${props => COLORS.getColor('correct_500', props.theme)};\r\n }\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('correct_700', props.theme)};\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('correct_800', props.theme)};\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n`;\r\n\r\nexport const ButtonCriticalStyled = styled(ButtonPrimaryStyled)<ButtonProps>`\r\n ${ButtonContentContainer} {\r\n color: white;\r\n background-color: ${props => COLORS.getColor('critical_500', props.theme)};\r\n }\r\n &:hover > ${ButtonContentContainer},\r\n &.hover-state > ${ButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('critical_700', props.theme)};\r\n }\r\n &:active > ${ButtonContentContainer},\r\n &.active-state > ${ButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('critical_800', props.theme)};\r\n }\r\n\r\n &:disabled > ${ButtonContentContainer},\r\n &.disabled-state > ${ButtonContentContainer} {\r\n background-color: ${props => COLORS.getColor('neutral_100', props.theme)};\r\n color: ${props => COLORS.getColor('neutral_300', props.theme)}; \r\n }\r\n`;\r\n\r\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\r\n /** Look and feel variant of the component. Defaults to 'primary'. */\r\n variant?: 'primary' | 'secondary' | 'tertiary' | 'positive' | 'critical';\r\n /** Can be used in order to remove rounded corners on right or left edge of the button. Used by 'DualFunctionButton'. Defaults to 'undefined' */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** Size of the component. Small, Medium or Large. Defaults to 'medium' */\r\n size?: Size.Small | Size.Medium | Size.Large;\r\n /** Color theme altering of the component. By default there is no altering applied. */\r\n colorTheme?: 'teal' | 'dark';\r\n /** Allows using inverted colors for outlining focus rect. Shown when component focused by keyboard. */\r\n invertFocus?: boolean;\r\n /** Can be used to set custom value for width style. Value is set for 'ButtonContent' container. */\r\n width?: 'auto' | string;\r\n /** If set, then 'opacity' of children container will be set to 0, and loading indicator will be shown. */\r\n loading?: boolean;\r\n /** TestId. Will be set to the top level button component. */\r\n testId?: string;\r\n /** Icon that will be shown on the left of the children. */\r\n icon?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * Button component\r\n */\r\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\r\n ({ children = '', variant = 'primary', type = 'button', size = Size.Medium, width = 'auto', testId, disabled, flatEdge, icon, ...props }, ref) => {\r\n // Let's filter out properties that we don't need to render.\r\n const { loading, ...renderProps } = props;\r\n\r\n const renderContent = () => (\r\n <>\r\n {icon && <span className={(children ? 'extramargin ' : '') + (loading ? 'icon loading' : 'icon')}>{icon}</span>}\r\n {children && <span className={loading ? 'label loading' : 'label'}>{children}</span>}\r\n {loading && <LoadingIndicator />}\r\n </>\r\n );\r\n\r\n let ButtonStyled = ButtonPrimaryStyled;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonStyled = ButtonSecondaryStyled;\r\n break;\r\n case 'tertiary':\r\n ButtonStyled = ButtonTertiaryStyled;\r\n break;\r\n case 'positive':\r\n ButtonStyled = ButtonPositiveStyled;\r\n break;\r\n case 'critical':\r\n ButtonStyled = ButtonCriticalStyled;\r\n break;\r\n }\r\n\r\n return (\r\n <ButtonStyled\r\n {...renderProps}\r\n ref={ref}\r\n disabled={disabled}\r\n iconOnly={!children}\r\n type={type}\r\n size={size}\r\n flatEdge={flatEdge}\r\n width={width}\r\n data-testid={testId}\r\n className={props.loading ? 'loading-state ' + props.className : ' ' + props.className}\r\n onMouseDown={defaultOnMouseDownHandler}>\r\n <ButtonContentContainer>{renderContent()}</ButtonContentContainer>\r\n </ButtonStyled>\r\n );\r\n },\r\n);\r\n\r\nexport default Button;\r\n"],"mappings":";;;;;;;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAOC,MAAM,MAAe,mBAAmB;AAC/C,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,iBAAiB,EAAEC,iBAAiB,EAAEC,iBAAiB,EAAEC,kBAAkB,QAAQ,WAAW;AACvG,SAASC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACpE,SAASC,IAAI,QAAkB,UAAU;AACzC,SAASC,yBAAyB,QAAQ,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,QAAA,IAAAC,SAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEtD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,QAA4B,EAAEC,MAAc,EAAK;EACxE,QAAQD,QAAQ;IACd,KAAK,MAAM;MACT,cAAAE,MAAA,CAAcD,MAAM,SAAAC,MAAA,CAAMD,MAAM;IAElC,KAAK,OAAO;MACV,UAAAC,MAAA,CAAUD,MAAM,iBAAAC,MAAA,CAAcD,MAAM;IAEtC,KAAK,MAAM;IACX;MACE,UAAAC,MAAA,CAAUD,MAAM;EACpB;AACF,CAAC;AAED,OAAO,IAAME,sBAAsB,GAAGrB,MAAM,CAACsB,GAAG,CAAAC,eAAA,KAAAA,eAAA,GAAAC,sBAAA,8BAE/C;AAED,OAAO,IAAMC,mBAAmB,GAAGzB,MAAM,CAAC0B,MAAM,CAAAC,gBAAA,KAAAA,gBAAA,GAAAH,sBAAA,47CAQhC,UAACI,KAAK;EAAA,OAAMA,KAAK,CAACC,IAAI,KAAKpB,IAAI,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SAAS,GAAG,GAAG,GAAG1C,KAAK,CAAC0C,SAAU;IACtFG,WAAW,EAAE/D,yBAA0B;IAAA4C,QAAA,eACvC1C,IAAA,CAACS,sBAAsB;MAAAiC,QAAA,EAAEe,aAAa,CAAC;IAAC,CAAyB;EAAC,EACtD,CAAC;AAEnB,CACF,CAAC;AAACpB,MAAA,CAAAyB,SAAA;EApEAlB,OAAO,EAAAmB,GAAA,CAAAC,KAAA,EAAG,SAAS,EAAG,WAAW,EAAG,UAAU,EAAG,UAAU,EAAG,UAAU;EAMxE5C,UAAU,EAAA2C,GAAA,CAAAC,KAAA,EAAG,MAAM,EAAG,MAAM;EAE5BrC,WAAW,EAAAoC,GAAA,CAAAE,IAAA;EAEXzC,KAAK,EAAAuC,GAAA,CAAAG,SAAA,EAAAH,GAAA,CAAAC,KAAA,EAAG,MAAM,IAAAD,GAAA,CAAAI,MAAA;EAEdb,OAAO,EAAAS,GAAA,CAAAE,IAAA;EAEPhB,MAAM,EAAAc,GAAA,CAAAI,MAAA;EAENhB,IAAI,EAAAY,GAAA,CAAAK;AAAA;AAsDN,eAAe/B,MAAM","ignoreList":[]}
|
|
@@ -47,22 +47,48 @@ var IconButtonStyled = _styledComponents["default"].button(_templateObject2 || (
|
|
|
47
47
|
});
|
|
48
48
|
exports.IconButtonStyled = IconButtonStyled;
|
|
49
49
|
var IconButtonStyledPrimary = (0, _styledComponents["default"])(IconButtonStyled)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n &:hover:not(:disabled),\n &.hover-state {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
|
|
50
|
-
return props.useTransparentBackground ? 'transparent' : _styles.COLORS.primary_500;
|
|
50
|
+
return props.useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('primary_500', props.theme);
|
|
51
51
|
}, function (props) {
|
|
52
|
-
return props.iconColor || _styles.COLORS.white;
|
|
52
|
+
return props.iconColor || _styles.COLORS.getColor('white', props.theme);
|
|
53
53
|
}, function (props) {
|
|
54
|
-
return props.iconColor || _styles.COLORS.white;
|
|
55
|
-
}, IconButtonContentStyles,
|
|
54
|
+
return props.iconColor || _styles.COLORS.getColor('white', props.theme);
|
|
55
|
+
}, IconButtonContentStyles, function (props) {
|
|
56
|
+
return _styles.COLORS.getColor('primary_700', props.theme);
|
|
57
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
58
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
59
|
+
}, IconButtonContentStyles, function (props) {
|
|
60
|
+
return _styles.COLORS.getColor('primary_800', props.theme);
|
|
61
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
62
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
63
|
+
}, IconButtonContentStyles, function (props) {
|
|
64
|
+
return _styles.COLORS.getColor('neutral_200', props.theme);
|
|
65
|
+
}, function (props) {
|
|
66
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
67
|
+
}, function (props) {
|
|
68
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
69
|
+
});
|
|
56
70
|
exports.IconButtonStyledPrimary = IconButtonStyledPrimary;
|
|
57
71
|
var IconButtonStyledSecondary = (0, _styledComponents["default"])(IconButtonStyled)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n\n\n &:hover:not(:disabled) {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
|
|
58
|
-
return props.useTransparentBackground ? 'transparent' : _styles.COLORS.white;
|
|
72
|
+
return props.useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('white', props.theme);
|
|
59
73
|
}, function (props) {
|
|
60
|
-
return props.iconColor || _styles.COLORS.neutral_600;
|
|
74
|
+
return props.iconColor || _styles.COLORS.getColor('neutral_600', props.theme);
|
|
61
75
|
}, function (props) {
|
|
62
|
-
return props.iconColor || _styles.COLORS.neutral_600;
|
|
63
|
-
}, IconButtonContentStyles,
|
|
64
|
-
return
|
|
65
|
-
},
|
|
76
|
+
return props.iconColor || _styles.COLORS.getColor('neutral_600', props.theme);
|
|
77
|
+
}, IconButtonContentStyles, function (props) {
|
|
78
|
+
return _styles.COLORS.getColor('primary_20', props.theme);
|
|
79
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
80
|
+
return _styles.COLORS.getColor('primary_700', props.theme);
|
|
81
|
+
}, IconButtonContentStyles, function (props) {
|
|
82
|
+
return _styles.COLORS.getColor('primary_100', props.theme);
|
|
83
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
84
|
+
return _styles.COLORS.getColor('primary_800', props.theme);
|
|
85
|
+
}, IconButtonContentStyles, function (props) {
|
|
86
|
+
return props.useTransparentBackground ? 'transparent' : _styles.COLORS.getColor('white', props.theme);
|
|
87
|
+
}, function (props) {
|
|
88
|
+
return _styles.COLORS.getColor('neutral_300', props.theme);
|
|
89
|
+
}, function (props) {
|
|
90
|
+
return _styles.COLORS.getColor('neutral_300', props.theme);
|
|
91
|
+
});
|
|
66
92
|
exports.IconButtonStyledSecondary = IconButtonStyledSecondary;
|
|
67
93
|
var IconButton = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
|
|
68
94
|
var id = _ref.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Iconbutton.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_styles","_common","_TooltipWrapper","_jsxRuntime","_excluded","_templateObject","_templateObject2","_templateObject3","_templateObject4","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getBorderRadius","props","borderRadius","concat","getBorderRadiusStyle","radius","flatEdge","IconButtonContentStyles","styled","div","_taggedTemplateLiteral2","exports","IconButtonStyled","button","unsetIconSize","invertFocus","invertedFocusStyles","focusStyles","IconButtonStyledPrimary","useTransparentBackground","COLORS","primary_500","iconColor","white","primary_700","primary_800","neutral_200","IconButtonStyledSecondary","neutral_600","primary_20","primary_100","neutral_300","IconButton","React","forwardRef","_ref","ref","id","variant","shape","action","children","disabled","tabIndex","type","hidden","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties2","render","ButtonVariant","jsx","onClick","event","stopPropagation","onMouseDown","defaultOnMouseDownHandler","undefined","propTypes","_propTypes","oneOf","func","isRequired","bool","string","number","node","_default"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (props: HeaderItemProps) => (props.borderRadius ? `${props.borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = (props: HeaderItemProps) => {\r\n const radius = getBorderRadius(props);\r\n switch (props.flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<HeaderItemProps>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.borderRadius ? `${props.borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${getBorderRadiusStyle};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.primary_500)};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.white};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.white};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${COLORS.primary_700};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.white};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${COLORS.primary_800};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.white};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${COLORS.neutral_200};\r\n }\r\n svg {\r\n path {\r\n fill: ${COLORS.white};\r\n }\r\n fill: ${COLORS.white};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.white)};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.neutral_600};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.neutral_600};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${COLORS.primary_20};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.primary_700};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${COLORS.primary_100};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.primary_800};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.white)};\r\n }\r\n svg {\r\n path {\r\n fill: ${COLORS.neutral_300};\r\n }\r\n fill: ${COLORS.neutral_300};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n useTransparentBackground={useTransparentBackground}\r\n iconColor={iconColor}\r\n unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,SAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SA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B,WAAW,EAAE,CAACV,YAAY,GAAGW,iCAAyB,GAAGC,SAAU;MACnEd,MAAM,EAAEA,MAAO;MACf9B,WAAW,EAAEA;IAAY,GACrBkC,IAAI;MAAAR,QAAA,eACR,IAAApE,WAAA,CAAAgF,GAAA,EAAC9C,uBAAuB;QAAAkC,QAAA,EAAEA;MAAQ,CAA0B;IAAC,EAChD,CAAC;EAClB,CAAC;EAEH,OAAO,CAACO,OAAO,GACXG,MAAM,CAAC,CAAC,gBAER,IAAA9E,WAAA,CAAAgF,GAAA,EAACjF,eAAA,WAAc,EAAAoB,aAAA,CAAAA,aAAA,KAAKwD,OAAO;IAAAP,QAAA,EACxBU,MAAM,CAAC;EAAC,EACK,CACjB;AACL,CACF,CAAC;AAACxC,OAAA,CAAAqB,UAAA,GAAAA,UAAA;AAAAA,UAAA,CAAA4B,SAAA;EA7FAtB,OAAO,EAAAuB,UAAA,YAAAC,KAAA,EAAG,SAAS,EAAG,WAAW;EAEjCvB,KAAK,EAAAsB,UAAA,YAAAC,KAAA,EAAG,QAAQ,EAAG,UAAU;EAE7BtB,MAAM,EAAAqB,UAAA,YAAAE,IAAA,CAAAC,UAAA;EAIN7C,wBAAwB,EAAA0C,UAAA,YAAAI,IAAA;EAExB3C,SAAS,EAAAuC,UAAA,YAAAK,MAAA;EAETpD,aAAa,EAAA+C,UAAA,YAAAI,IAAA;EAEb/D,YAAY,EAAA2D,UAAA,YAAAM,MAAA;EAEZ1B,QAAQ,EAAAoB,UAAA,YAAAO,IAAA;EAERrD,WAAW,EAAA8C,UAAA,YAAAI,IAAA;EAEXlB,YAAY,EAAAc,UAAA,YAAAI;AAAA;AAAA,IAAAI,QAAA,GA2ECrC,UAAU;AAAArB,OAAA,cAAA0D,QAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Iconbutton.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_styles","_common","_TooltipWrapper","_jsxRuntime","_excluded","_templateObject","_templateObject2","_templateObject3","_templateObject4","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","getBorderRadius","props","borderRadius","concat","getBorderRadiusStyle","radius","flatEdge","IconButtonContentStyles","styled","div","_taggedTemplateLiteral2","exports","IconButtonStyled","button","unsetIconSize","invertFocus","invertedFocusStyles","focusStyles","IconButtonStyledPrimary","useTransparentBackground","COLORS","getColor","theme","iconColor","IconButtonStyledSecondary","IconButton","React","forwardRef","_ref","ref","id","variant","shape","action","children","disabled","tabIndex","type","hidden","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties2","render","ButtonVariant","jsx","onClick","event","stopPropagation","onMouseDown","defaultOnMouseDownHandler","undefined","propTypes","_propTypes","oneOf","func","isRequired","bool","string","number","node","_default"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (props: HeaderItemProps) => (props.borderRadius ? `${props.borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = (props: HeaderItemProps) => {\r\n const radius = getBorderRadius(props);\r\n switch (props.flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<HeaderItemProps>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.borderRadius ? `${props.borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${getBorderRadiusStyle};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n useTransparentBackground={useTransparentBackground}\r\n iconColor={iconColor}\r\n unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,eAAA,GAAAL,sBAAA,CAAAC,OAAA;AAAwD,IAAAK,WAAA,GAAAL,OAAA;AAAA,IAAAM,SAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA,EAAAC,gBAAA,EAAAC,gBAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,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|
|
|
38
38
|
return props.invertFocus ? invertedFocusStyles : focusStyles;
|
|
39
39
|
});
|
|
40
40
|
export var IconButtonStyledPrimary = styled(IconButtonStyled)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n &:hover:not(:disabled),\n &.hover-state {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
|
|
41
|
-
return props.useTransparentBackground ? 'transparent' : COLORS.primary_500;
|
|
41
|
+
return props.useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme);
|
|
42
42
|
}, function (props) {
|
|
43
|
-
return props.iconColor || COLORS.white;
|
|
43
|
+
return props.iconColor || COLORS.getColor('white', props.theme);
|
|
44
44
|
}, function (props) {
|
|
45
|
-
return props.iconColor || COLORS.white;
|
|
46
|
-
}, IconButtonContentStyles,
|
|
45
|
+
return props.iconColor || COLORS.getColor('white', props.theme);
|
|
46
|
+
}, IconButtonContentStyles, function (props) {
|
|
47
|
+
return COLORS.getColor('primary_700', props.theme);
|
|
48
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
49
|
+
return COLORS.getColor('white', props.theme);
|
|
50
|
+
}, IconButtonContentStyles, function (props) {
|
|
51
|
+
return COLORS.getColor('primary_800', props.theme);
|
|
52
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
53
|
+
return COLORS.getColor('white', props.theme);
|
|
54
|
+
}, IconButtonContentStyles, function (props) {
|
|
55
|
+
return COLORS.getColor('neutral_200', props.theme);
|
|
56
|
+
}, function (props) {
|
|
57
|
+
return COLORS.getColor('white', props.theme);
|
|
58
|
+
}, function (props) {
|
|
59
|
+
return COLORS.getColor('white', props.theme);
|
|
60
|
+
});
|
|
47
61
|
export var IconButtonStyledSecondary = styled(IconButtonStyled)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", " {\n background-color: ", ";\n\n svg {\n fill: ", ";\n path {\n fill: ", ";\n }\n }\n }\n\n\n &:hover:not(:disabled) {\n ", " {\n background-color: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n &:active:not(:disabled),\n &.active-state {\n ", " {\n background: ", ";\n }\n ", " svg path,\n ", " svg {\n fill: ", ";\n }\n }\n\n &:disabled {\n ", " {\n background-color: ", ";\n }\n svg {\n path {\n fill: ", ";\n }\n fill: ", ";\n }\n }\n"])), IconButtonContentStyles, function (props) {
|
|
48
|
-
return props.useTransparentBackground ? 'transparent' : COLORS.white;
|
|
62
|
+
return props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme);
|
|
49
63
|
}, function (props) {
|
|
50
|
-
return props.iconColor || COLORS.neutral_600;
|
|
64
|
+
return props.iconColor || COLORS.getColor('neutral_600', props.theme);
|
|
51
65
|
}, function (props) {
|
|
52
|
-
return props.iconColor || COLORS.neutral_600;
|
|
53
|
-
}, IconButtonContentStyles,
|
|
54
|
-
return
|
|
55
|
-
},
|
|
66
|
+
return props.iconColor || COLORS.getColor('neutral_600', props.theme);
|
|
67
|
+
}, IconButtonContentStyles, function (props) {
|
|
68
|
+
return COLORS.getColor('primary_20', props.theme);
|
|
69
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
70
|
+
return COLORS.getColor('primary_700', props.theme);
|
|
71
|
+
}, IconButtonContentStyles, function (props) {
|
|
72
|
+
return COLORS.getColor('primary_100', props.theme);
|
|
73
|
+
}, IconButtonContentStyles, IconButtonContentStyles, function (props) {
|
|
74
|
+
return COLORS.getColor('primary_800', props.theme);
|
|
75
|
+
}, IconButtonContentStyles, function (props) {
|
|
76
|
+
return props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme);
|
|
77
|
+
}, function (props) {
|
|
78
|
+
return COLORS.getColor('neutral_300', props.theme);
|
|
79
|
+
}, function (props) {
|
|
80
|
+
return COLORS.getColor('neutral_300', props.theme);
|
|
81
|
+
});
|
|
56
82
|
export var IconButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
57
83
|
var id = _ref.id,
|
|
58
84
|
variant = _ref.variant,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Iconbutton.js","names":["React","styled","COLORS","focusStyles","invertedFocusStyles","defaultOnMouseDownHandler","TooltipWrapper","jsx","_jsx","getBorderRadius","props","borderRadius","concat","getBorderRadiusStyle","radius","flatEdge","IconButtonContentStyles","div","_templateObject","_taggedTemplateLiteral","IconButtonStyled","button","_templateObject2","unsetIconSize","invertFocus","IconButtonStyledPrimary","_templateObject3","useTransparentBackground","primary_500","iconColor","white","primary_700","primary_800","neutral_200","IconButtonStyledSecondary","_templateObject4","neutral_600","primary_20","primary_100","neutral_300","IconButton","forwardRef","_ref","ref","id","variant","shape","action","children","disabled","tabIndex","type","hidden","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties","_excluded","render","ButtonVariant","_objectSpread","onClick","event","stopPropagation","onMouseDown","undefined","propTypes","_pt","oneOf","func","isRequired","bool","string","number","node"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (props: HeaderItemProps) => (props.borderRadius ? `${props.borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = (props: HeaderItemProps) => {\r\n const radius = getBorderRadius(props);\r\n switch (props.flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<HeaderItemProps>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.borderRadius ? `${props.borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${getBorderRadiusStyle};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.primary_500)};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.white};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.white};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${COLORS.primary_700};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.white};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${COLORS.primary_800};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.white};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${COLORS.neutral_200};\r\n }\r\n svg {\r\n path {\r\n fill: ${COLORS.white};\r\n }\r\n fill: ${COLORS.white};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.white)};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.neutral_600};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.neutral_600};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${COLORS.primary_20};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.primary_700};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${COLORS.primary_100};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${COLORS.primary_800};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.white)};\r\n }\r\n svg {\r\n path {\r\n fill: ${COLORS.neutral_300};\r\n }\r\n fill: ${COLORS.neutral_300};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n useTransparentBackground={useTransparentBackground}\r\n iconColor={iconColor}\r\n unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !tooltip\r\n ? render()\r\n : (\r\n <TooltipWrapper {...tooltip}>\r\n {render()}\r\n </TooltipWrapper>\r\n );\r\n },\r\n);\r\n\r\nexport default IconButton;\r\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAAsBC,MAAM,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,WAAW;AACjF,SAASC,yBAAyB,QAAQ,WAAW;AAGrD,OAAOC,cAAc,MAAM,4BAA4B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAcxD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,KAAsB;EAAA,OAAMA,KAAK,CAACC,YAAY,MAAAC,MAAA,CAAMF,KAAK,CAACC,YAAY,UAAO,KAAK;AAAA,CAAC;AAE5G,IAAME,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIH,KAAsB,EAAK;EACvD,IAAMI,MAAM,GAAGL,eAAe,CAACC,KAAK,CAAC;EACrC,QAAQA,KAAK,CAACK,QAAQ;IACpB,KAAK,MAAM;MACT,cAAAH,MAAA,CAAcE,MAAM,OAAAF,MAAA,CAAIE,MAAM;IAEhC,KAAK,OAAO;MACV,UAAAF,MAAA,CAAUE,MAAM,eAAAF,MAAA,CAAYE,MAAM;IAEpC,KAAK,MAAM;IACX;MACE,UAAAF,MAAA,CAAUE,MAAM;EACpB;AACF,CAAC;AAED,OAAO,IAAME,uBAAuB,GAAG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,KAAK,UAAU,GAAG,EAAE,GAAG,CAAE;MAC5DmB,WAAW,EAAE,CAACX,YAAY,GAAGjD,yBAAyB,GAAG6D,SAAU;MACnEd,MAAM,EAAEA,MAAO;MACf5B,WAAW,EAAEA;IAAY,GACrBgC,IAAI;MAAAR,QAAA,eACRxC,IAAA,CAACQ,uBAAuB;QAAAgC,QAAA,EAAEA;MAAQ,CAA0B;IAAC,EAChD,CAAC;EAClB,CAAC;EAEH,OAAO,CAACO,OAAO,GACXI,MAAM,CAAC,CAAC,gBAERnD,IAAA,CAACF,cAAc,EAAAuD,aAAA,CAAAA,aAAA,KAAKN,OAAO;IAAAP,QAAA,EACxBW,MAAM,CAAC;EAAC,EACK,CACjB;AACL,CACF,CAAC;AAACnB,UAAA,CAAA2B,SAAA;EA7FAtB,OAAO,EAAAuB,GAAA,CAAAC,KAAA,EAAG,SAAS,EAAG,WAAW;EAEjCvB,KAAK,EAAAsB,GAAA,CAAAC,KAAA,EAAG,QAAQ,EAAG,UAAU;EAE7BtB,MAAM,EAAAqB,GAAA,CAAAE,IAAA,CAAAC,UAAA;EAIN5C,wBAAwB,EAAAyC,GAAA,CAAAI,IAAA;EAExB3C,SAAS,EAAAuC,GAAA,CAAAK,MAAA;EAETlD,aAAa,EAAA6C,GAAA,CAAAI,IAAA;EAEb7D,YAAY,EAAAyD,GAAA,CAAAM,MAAA;EAEZ1B,QAAQ,EAAAoB,GAAA,CAAAO,IAAA;EAERnD,WAAW,EAAA4C,GAAA,CAAAI,IAAA;EAEXlB,YAAY,EAAAc,GAAA,CAAAI;AAAA;AA2Ed,eAAehC,UAAU","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Iconbutton.js","names":["React","styled","COLORS","focusStyles","invertedFocusStyles","defaultOnMouseDownHandler","TooltipWrapper","jsx","_jsx","getBorderRadius","props","borderRadius","concat","getBorderRadiusStyle","radius","flatEdge","IconButtonContentStyles","div","_templateObject","_taggedTemplateLiteral","IconButtonStyled","button","_templateObject2","unsetIconSize","invertFocus","IconButtonStyledPrimary","_templateObject3","useTransparentBackground","getColor","theme","iconColor","IconButtonStyledSecondary","_templateObject4","IconButton","forwardRef","_ref","ref","id","variant","shape","action","children","disabled","tabIndex","type","hidden","dataTestId","focusOnClick","tooltip","rest","_objectWithoutProperties","_excluded","render","ButtonVariant","_objectSpread","onClick","event","stopPropagation","onMouseDown","undefined","propTypes","_pt","oneOf","func","isRequired","bool","string","number","node"],"sources":["../../src/Button/Iconbutton.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled from 'styled-components';\r\n\r\nimport { BREAKPOINTS, COLORS, focusStyles, invertedFocusStyles } from '../styles';\r\nimport { defaultOnMouseDownHandler } from '../common';\r\nimport { Testable } from '../types';\r\nimport {TooltipProps} from \"../Tooltips/TooltipTypes\";\r\nimport TooltipWrapper from \"../Tooltips/TooltipWrapper\";\r\n\r\nexport interface HeaderItemProps {\r\n inMobileMenu?: boolean;\r\n useTransparentBackground?: boolean;\r\n iconColor?: string;\r\n unsetIconSize?: boolean;\r\n borderRadius?: number;\r\n shape?: string;\r\n flatEdge?: string;\r\n invertFocus?: boolean;\r\n shouldNotInteract?: boolean;\r\n}\r\n\r\nconst getBorderRadius = (props: HeaderItemProps) => (props.borderRadius ? `${props.borderRadius}px` : '4px');\r\n\r\nconst getBorderRadiusStyle = (props: HeaderItemProps) => {\r\n const radius = getBorderRadius(props);\r\n switch (props.flatEdge) {\r\n case 'left':\r\n return `0px ${radius} ${radius} 0px`;\r\n\r\n case 'right':\r\n return `${radius} 0px 0px ${radius}`;\r\n\r\n case 'none':\r\n default:\r\n return `${radius}`;\r\n }\r\n};\r\n\r\nexport const IconButtonContentStyles = styled.div``;\r\n\r\nexport const IconButtonStyled = styled.button<HeaderItemProps>`\r\n border-width: 0;\r\n cursor: pointer;\r\n height: 48px;\r\n width: 48px;\r\n background: transparent;\r\n position: relative;\r\n display: block;\r\n\r\n border-radius: ${(props) => (props.borderRadius ? `${props.borderRadius}px` : '4px')};\r\n ${IconButtonContentStyles} {\r\n height: 36px;\r\n width: 36px;\r\n border-radius: ${getBorderRadiusStyle};\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n svg {\r\n height: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n width: ${(props) => (props.unsetIconSize ? 'unset' : '24px')};\r\n padding: 0;\r\n }\r\n }\r\n &:only-child {\r\n margin: 0;\r\n }\r\n &:disabled {\r\n cursor: not-allowed;\r\n }\r\n\r\n &:focus {\r\n ${(props) => (props.invertFocus ? invertedFocusStyles : focusStyles)}\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledPrimary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('primary_500', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n }\r\n &:hover:not(:disabled),\r\n &.hover-state {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('white', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport const IconButtonStyledSecondary = styled(IconButtonStyled)`\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n\r\n svg {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n path {\r\n fill: ${(props) => props.iconColor || COLORS.getColor('neutral_600', props.theme)};\r\n }\r\n }\r\n }\r\n\r\n\r\n &:hover:not(:disabled) {\r\n ${IconButtonContentStyles} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_700', props.theme)};\r\n }\r\n }\r\n &:active:not(:disabled),\r\n &.active-state {\r\n ${IconButtonContentStyles} {\r\n background: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n ${IconButtonContentStyles} svg path,\r\n ${IconButtonContentStyles} svg {\r\n fill: ${props => COLORS.getColor('primary_800', props.theme)};\r\n }\r\n }\r\n\r\n &:disabled {\r\n ${IconButtonContentStyles} {\r\n background-color: ${(props) => (props.useTransparentBackground ? 'transparent' : COLORS.getColor('white', props.theme))};\r\n }\r\n svg {\r\n path {\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n fill: ${props => COLORS.getColor('neutral_300', props.theme)};\r\n }\r\n }\r\n`;\r\n\r\nexport interface IconButtonProps extends Testable, Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'onMouseDown'> {\r\n /** Variant of the button. Defaults to 'primary' */\r\n variant?: 'primary' | 'secondary';\r\n /** Shape of the button. Defaults to 'square' */\r\n shape?: 'square' | 'circular';\r\n /** Action that will get executed when button is clicked. */\r\n action: (event?: React.MouseEvent<HTMLButtonElement>) => void;\r\n /** Allows removing rounded corners on one of the edges of the button. */\r\n flatEdge?: 'right' | 'left' | 'none' | undefined;\r\n /** If set background filling color of the button will be transparent. */\r\n useTransparentBackground?: boolean;\r\n /** Custom fill color for SVG icon. */\r\n iconColor?: string;\r\n /** If set then the width and height of SVG icon will be set to 'unset', otherwise will be set to '24px' */\r\n unsetIconSize?: boolean;\r\n /** Sets border radius of the button. */\r\n borderRadius?: number;\r\n /** Content (icon) to show in the button. */\r\n children?: React.ReactNode;\r\n /** Invert color scheme of focus framing. */\r\n invertFocus?: boolean;\r\n /** If this flag is set, then blurs current focus, as a result will focus current IconButton when user clicks it. */\r\n focusOnClick?: boolean;\r\n /** Details of the tooltip to show. */\r\n tooltip?: Omit<TooltipProps, 'tabIndex'>;\r\n}\r\n\r\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\r\n (\r\n {\r\n id,\r\n variant,\r\n shape,\r\n action,\r\n children,\r\n useTransparentBackground,\r\n disabled,\r\n iconColor,\r\n unsetIconSize,\r\n tabIndex,\r\n flatEdge,\r\n borderRadius,\r\n type,\r\n hidden,\r\n invertFocus,\r\n dataTestId,\r\n focusOnClick,\r\n tooltip,\r\n ...rest\r\n }: IconButtonProps,\r\n ref,\r\n ) => {\r\n\r\n const render = () => {\r\n // Let's render button\r\n\r\n let ButtonVariant = IconButtonStyledPrimary;\r\n switch (variant) {\r\n case 'secondary':\r\n ButtonVariant = IconButtonStyledSecondary;\r\n break;\r\n }\r\n\r\n return <ButtonVariant\r\n id={id}\r\n type={type ?? 'button'}\r\n data-testid={dataTestId}\r\n flatEdge={flatEdge}\r\n ref={ref}\r\n onClick={(event: React.MouseEvent<HTMLButtonElement>) => {\r\n event.stopPropagation();\r\n action(event);\r\n }}\r\n disabled={disabled}\r\n useTransparentBackground={useTransparentBackground}\r\n iconColor={iconColor}\r\n unsetIconSize={unsetIconSize}\r\n tabIndex={tabIndex}\r\n borderRadius={borderRadius || shape === 'circular' ? 18 : 0}\r\n onMouseDown={!focusOnClick ? defaultOnMouseDownHandler : undefined}\r\n hidden={hidden}\r\n invertFocus={invertFocus}\r\n {...rest}>\r\n <IconButtonContentStyles>{children}</IconButtonContentStyles>\r\n </ButtonVariant>;\r\n }\r\n\r\n return !t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,CAA0B;IAAC,EAChD,CAAC;EAClB,CAAC;EAEH,OAAO,CAACO,OAAO,GACXI,MAAM,CAAC,CAAC,gBAER5C,IAAA,CAACF,cAAc,EAAAgD,aAAA,CAAAA,aAAA,KAAKN,OAAO;IAAAP,QAAA,EACxBW,MAAM,CAAC;EAAC,EACK,CACjB;AACL,CACF,CAAC;AAACnB,UAAA,CAAA2B,SAAA;EA7FAtB,OAAO,EAAAuB,GAAA,CAAAC,KAAA,EAAG,SAAS,EAAG,WAAW;EAEjCvB,KAAK,EAAAsB,GAAA,CAAAC,KAAA,EAAG,QAAQ,EAAG,UAAU;EAE7BtB,MAAM,EAAAqB,GAAA,CAAAE,IAAA,CAAAC,UAAA;EAINrC,wBAAwB,EAAAkC,GAAA,CAAAI,IAAA;EAExBnC,SAAS,EAAA+B,GAAA,CAAAK,MAAA;EAET3C,aAAa,EAAAsC,GAAA,CAAAI,IAAA;EAEbtD,YAAY,EAAAkD,GAAA,CAAAM,MAAA;EAEZ1B,QAAQ,EAAAoB,GAAA,CAAAO,IAAA;EAER5C,WAAW,EAAAqC,GAAA,CAAAI,IAAA;EAEXlB,YAAY,EAAAc,GAAA,CAAAI;AAAA;AA2Ed,eAAehC,UAAU","ignoreList":[]}
|
|
@@ -21,9 +21,19 @@ var _excluded = ["title", "description", "tags", "progress", "icon", "variant",
|
|
|
21
21
|
var _templateObject, _templateObject2;
|
|
22
22
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
23
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
|
-
var HorizontalCardContentContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: flex;\n flex: 1;\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: 8px;\n"])),
|
|
24
|
+
var HorizontalCardContentContainer = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n display: flex;\n flex: 1;\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: 8px;\n"])), function (props) {
|
|
25
|
+
return _styles.COLORS.getColor('white', props.theme);
|
|
26
|
+
});
|
|
25
27
|
exports.HorizontalCardContentContainer = HorizontalCardContentContainer;
|
|
26
|
-
var HorizontalCardContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex: 1;\n\n &.outline {\n ", " {\n box-shadow: inset 0 0 0 1px ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n\n &.clickable {\n cursor: pointer;\n\n &:hover:not(.action-within):not(.disabled) {\n &.outline {\n ", " {\n background-color: ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n }\n\n &:active:not(.action-within):not(.disabled) {\n &.outline {\n ", " {\n background-color: ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n }\n\n &:focus {\n ", "\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n\n &.outline {\n ", " {\n box-shadow: inset 0 0 0 1px ", ";\n }\n }\n }\n"])), HorizontalCardContentContainer,
|
|
28
|
+
var HorizontalCardContainer = _styledComponents["default"].div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex: 1;\n\n &.outline {\n ", " {\n box-shadow: inset 0 0 0 1px ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n\n &.clickable {\n cursor: pointer;\n\n &:hover:not(.action-within):not(.disabled) {\n &.outline {\n ", " {\n background-color: ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n }\n\n &:active:not(.action-within):not(.disabled) {\n &.outline {\n ", " {\n background-color: ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n }\n\n &:focus {\n ", "\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n\n &.outline {\n ", " {\n box-shadow: inset 0 0 0 1px ", ";\n }\n }\n }\n"])), HorizontalCardContentContainer, function (props) {
|
|
29
|
+
return _styles.COLORS.getColor('neutral_200', props.theme);
|
|
30
|
+
}, HorizontalCardContentContainer, _styles.BOXSHADOWS.BOXSHADOW_L1, HorizontalCardContentContainer, function (props) {
|
|
31
|
+
return _styles.COLORS.getColor('primary_20', props.theme);
|
|
32
|
+
}, HorizontalCardContentContainer, _styles.BOXSHADOWS.BOXSHADOW_L3, HorizontalCardContentContainer, function (props) {
|
|
33
|
+
return _styles.COLORS.getColor('primary_100', props.theme);
|
|
34
|
+
}, HorizontalCardContentContainer, _styles.BOXSHADOWS.BOXSHADOW_L2, _styles.focusStyles, HorizontalCardContentContainer, _styles.BOXSHADOWS.BOXSHADOW_L1, HorizontalCardContentContainer, function (props) {
|
|
35
|
+
return _styles.COLORS.getColor('neutral_100', props.theme);
|
|
36
|
+
});
|
|
27
37
|
exports.HorizontalCardContainer = HorizontalCardContainer;
|
|
28
38
|
var HorizontalCard = function HorizontalCard(_ref) {
|
|
29
39
|
var title = _ref.title,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HorizontalCard.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_styles","_HorizontalCardThumbnail","_HorizontalCardBody","_HorizontalCardActions","_common","_jsxRuntime","_excluded","_templateObject","_templateObject2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","HorizontalCardContentContainer","styled","div","_taggedTemplateLiteral2","COLORS","white","exports","HorizontalCardContainer","neutral_200","BOXSHADOWS","BOXSHADOW_L1","primary_20","BOXSHADOW_L3","primary_100","BOXSHADOW_L2","focusStyles","neutral_100","HorizontalCard","_ref","title","description","tags","progress","icon","_ref$variant","variant","image","action","actions","disabled","className","dataTestId","rest","_objectWithoutProperties2","_React$useState","React","useState","_React$useState2","_slicedToArray2","actionsRefs","setActionsRefs","containerRef","useRef","useActionWithin","cls","concat","handleClick","handleButtonPress","key","jsx","ref","tabIndex","onKeyDown","onClick","onMouseDown","defaultOnMouseDownHandler","children","jsxs","HorizontalCardThumbnail","HorizontalCardBody","HorizontalCardActions","instance","_default"],"sources":["../../../src/Card/HorizontalCard/HorizontalCard.tsx"],"sourcesContent":["import React, {useEffect} from 'react';\r\nimport {HorizontalCardProps} from './types';\r\nimport styled from 'styled-components';\r\nimport {BOXSHADOWS, COLORS, focusStyles} from '../../styles';\r\nimport {HorizontalCardThumbnail} from './HorizontalCardThumbnail';\r\nimport {HorizontalCardBody} from './HorizontalCardBody';\r\nimport {HorizontalCardActions} from './HorizontalCardActions';\r\nimport {defaultOnMouseDownHandler, useActionWithin} from '../../common';\r\n\r\nexport const HorizontalCardContentContainer = styled.div`\r\n position: relative;\r\n display: flex;\r\n flex: 1;\r\n flex-direction: row;\r\n align-items: center;\r\n background-color: ${COLORS.white};\r\n border-radius: 8px;\r\n`;\r\n\r\nexport const HorizontalCardContainer = styled.div`\r\n display: flex;\r\n flex: 1;\r\n\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_200};\r\n }\r\n }\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L1};\r\n }\r\n }\r\n\r\n &.clickable {\r\n cursor: pointer;\r\n\r\n &:hover:not(.action-within):not(.disabled) {\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n background-color: ${COLORS.primary_20};\r\n }\r\n }\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L3};\r\n }\r\n }\r\n }\r\n\r\n &:active:not(.action-within):not(.disabled) {\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n background-color: ${COLORS.primary_100};\r\n }\r\n }\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n }\r\n }\r\n }\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L1};\r\n }\r\n }\r\n\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: inset 0 0 0 1px ${COLORS.neutral_100};\r\n }\r\n }\r\n }\r\n`;\r\n\r\nexport const HorizontalCard: React.FunctionComponent<HorizontalCardProps> = ({\r\n title,\r\n description,\r\n tags,\r\n progress,\r\n icon,\r\n variant = 'outline',\r\n image,\r\n action,\r\n actions,\r\n disabled,\r\n className,\r\n dataTestId,\r\n ...rest\r\n }) => {\r\n\r\n const [actionsRefs, setActionsRefs] = React.useState<React.RefObject<HTMLButtonElement>[]>([]);\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n\r\n useActionWithin(containerRef, actionsRefs);\r\n\r\n const cls = `${variant} ${action ? 'clickable' : ''} ${disabled ? 'disabled' : ''} ${className || ''}`;\r\n\r\n const handleClick = () => {\r\n !disabled && action && action();\r\n }\r\n\r\n const handleButtonPress = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n e.key === 'Enter' && handleClick();\r\n };\r\n\r\n return (\r\n <HorizontalCardContainer ref={containerRef}\r\n tabIndex={action && !disabled ? 0 : -1}\r\n className={cls}\r\n onKeyDown={handleButtonPress}\r\n onClick={handleClick}\r\n onMouseDown={defaultOnMouseDownHandler}>\r\n <HorizontalCardContentContainer\r\n onMouseDown={defaultOnMouseDownHandler}\r\n data-testid={dataTestId}\r\n {...rest}>\r\n\r\n <HorizontalCardThumbnail image={image}\r\n icon={icon}/>\r\n\r\n <HorizontalCardBody title={title}\r\n description={description}\r\n tags={tags}\r\n progress={progress}/>\r\n\r\n <HorizontalCardActions ref={instance => setActionsRefs(instance ?? [])}\r\n actions={actions}\r\n disabled={disabled}/>\r\n\r\n </HorizontalCardContentContainer>\r\n </HorizontalCardContainer>\r\n )\r\n};\r\n\r\nexport default HorizontalCard;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAwE,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,SAAA;AAAA,IAAAC,eAAA,EAAAC,gBAAA;AAAA,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAA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EAAE,CAAC;QAAA,CAAC;QAChDjC,OAAO,EAAEA,OAAQ;QACjBC,QAAQ,EAAEA;MAAS,CAAC,CAAC;IAAA,EAEd;EAAC,CACV,CAAC;AAE9B,CAAC;AAACvB,OAAA,CAAAW,cAAA,GAAAA,cAAA;AAAA,IAAA6C,QAAA,GAEa7C,cAAc;AAAAX,OAAA,cAAAwD,QAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"HorizontalCard.cjs","names":["_react","_interopRequireDefault","require","_styledComponents","_styles","_HorizontalCardThumbnail","_HorizontalCardBody","_HorizontalCardActions","_common","_jsxRuntime","_excluded","_templateObject","_templateObject2","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","defineProperty","HorizontalCardContentContainer","styled","div","_taggedTemplateLiteral2","props","COLORS","getColor","theme","exports","HorizontalCardContainer","BOXSHADOWS","BOXSHADOW_L1","BOXSHADOW_L3","BOXSHADOW_L2","focusStyles","HorizontalCard","_ref","title","description","tags","progress","icon","_ref$variant","variant","image","action","actions","disabled","className","dataTestId","rest","_objectWithoutProperties2","_React$useState","React","useState","_React$useState2","_slicedToArray2","actionsRefs","setActionsRefs","containerRef","useRef","useActionWithin","cls","concat","handleClick","handleButtonPress","key","jsx","ref","tabIndex","onKeyDown","onClick","onMouseDown","defaultOnMouseDownHandler","children","jsxs","HorizontalCardThumbnail","HorizontalCardBody","HorizontalCardActions","instance","_default"],"sources":["../../../src/Card/HorizontalCard/HorizontalCard.tsx"],"sourcesContent":["import React, {useEffect} from 'react';\r\nimport {HorizontalCardProps} from './types';\r\nimport styled from 'styled-components';\r\nimport {BOXSHADOWS, COLORS, focusStyles} from '../../styles';\r\nimport {HorizontalCardThumbnail} from './HorizontalCardThumbnail';\r\nimport {HorizontalCardBody} from './HorizontalCardBody';\r\nimport {HorizontalCardActions} from './HorizontalCardActions';\r\nimport {defaultOnMouseDownHandler, useActionWithin} from '../../common';\r\n\r\nexport const HorizontalCardContentContainer = styled.div`\r\n position: relative;\r\n display: flex;\r\n flex: 1;\r\n flex-direction: row;\r\n align-items: center;\r\n background-color: ${props => COLORS.getColor('white', props.theme)};\r\n border-radius: 8px;\r\n`;\r\n\r\nexport const HorizontalCardContainer = styled.div`\r\n display: flex;\r\n flex: 1;\r\n\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: inset 0 0 0 1px ${props => COLORS.getColor('neutral_200', props.theme)};\r\n }\r\n }\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L1};\r\n }\r\n }\r\n\r\n &.clickable {\r\n cursor: pointer;\r\n\r\n &:hover:not(.action-within):not(.disabled) {\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n background-color: ${props => COLORS.getColor('primary_20', props.theme)};\r\n }\r\n }\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L3};\r\n }\r\n }\r\n }\r\n\r\n &:active:not(.action-within):not(.disabled) {\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n background-color: ${props => COLORS.getColor('primary_100', props.theme)};\r\n }\r\n }\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L2};\r\n }\r\n }\r\n }\r\n\r\n &:focus {\r\n ${focusStyles}\r\n }\r\n }\r\n\r\n &.disabled {\r\n cursor: not-allowed;\r\n\r\n &.elevated {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: ${BOXSHADOWS.BOXSHADOW_L1};\r\n }\r\n }\r\n\r\n &.outline {\r\n ${HorizontalCardContentContainer} {\r\n box-shadow: inset 0 0 0 1px ${props => COLORS.getColor('neutral_100', props.theme)};\r\n }\r\n }\r\n }\r\n`;\r\n\r\nexport const HorizontalCard: React.FunctionComponent<HorizontalCardProps> = ({\r\n title,\r\n description,\r\n tags,\r\n progress,\r\n icon,\r\n variant = 'outline',\r\n image,\r\n action,\r\n actions,\r\n disabled,\r\n className,\r\n dataTestId,\r\n ...rest\r\n }) => {\r\n\r\n const [actionsRefs, setActionsRefs] = React.useState<React.RefObject<HTMLButtonElement>[]>([]);\r\n const containerRef = React.useRef<HTMLDivElement>(null);\r\n\r\n useActionWithin(containerRef, actionsRefs);\r\n\r\n const cls = `${variant} ${action ? 'clickable' : ''} ${disabled ? 'disabled' : ''} ${className || ''}`;\r\n\r\n const handleClick = () => {\r\n !disabled && action && action();\r\n }\r\n\r\n const handleButtonPress = (e: React.KeyboardEvent<HTMLDivElement>) => {\r\n e.key === 'Enter' && handleClick();\r\n };\r\n\r\n return (\r\n <HorizontalCardContainer ref={containerRef}\r\n tabIndex={action && !disabled ? 0 : -1}\r\n className={cls}\r\n onKeyDown={handleButtonPress}\r\n onClick={handleClick}\r\n onMouseDown={defaultOnMouseDownHandler}>\r\n <HorizontalCardContentContainer\r\n onMouseDown={defaultOnMouseDownHandler}\r\n data-testid={dataTestId}\r\n {...rest}>\r\n\r\n <HorizontalCardThumbnail image={image}\r\n icon={icon}/>\r\n\r\n <HorizontalCardBody title={title}\r\n description={description}\r\n tags={tags}\r\n progress={progress}/>\r\n\r\n <HorizontalCardActions ref={instance => setActionsRefs(instance ?? [])}\r\n actions={actions}\r\n disabled={disabled}/>\r\n\r\n </HorizontalCardContentContainer>\r\n </HorizontalCardContainer>\r\n )\r\n};\r\n\r\nexport default HorizontalCard;\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AACA,IAAAM,OAA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CAAE;IACvCC,SAAS,EAAEc,GAAI;IACfQ,SAAS,EAAEL,iBAAkB;IAC7BM,OAAO,EAAEP,WAAY;IACrBQ,WAAW,EAAEC,iCAA0B;IAAAC,QAAA,eAChD,IAAA/E,WAAA,CAAAgF,IAAA,EAACvD,8BAA8B,EAAAR,aAAA,CAAAA,aAAA;MACtB4D,WAAW,EAAEC,iCAA0B;MACvC,eAAaxB;IAAW,GACpBC,IAAI;MAAAwB,QAAA,gBAEf,IAAA/E,WAAA,CAAAwE,GAAA,EAAC5E,wBAAA,CAAAqF,uBAAuB;QAAChC,KAAK,EAAEA,KAAM;QACbH,IAAI,EAAEA;MAAK,CAAC,CAAC,eAEtC,IAAA9C,WAAA,CAAAwE,GAAA,EAAC3E,mBAAA,CAAAqF,kBAAkB;QAACxC,KAAK,EAAEA,KAAM;QACbC,WAAW,EAAEA,WAAY;QACzBC,IAAI,EAAEA,IAAK;QACXC,QAAQ,EAAEA;MAAS,CAAC,CAAC,eAEzC,IAAA7C,WAAA,CAAAwE,GAAA,EAAC1E,sBAAA,CAAAqF,qBAAqB;QAACV,GAAG,EAAE,SAAAA,IAAAW,QAAQ;UAAA,OAAIrB,cAAc,CAACqB,QAAQ,aAARA,QAAQ,cAARA,QAAQ,GAAI,EAAE,CAAC;QAAA,CAAC;QAChDjC,OAAO,EAAEA,OAAQ;QACjBC,QAAQ,EAAEA;MAAS,CAAC,CAAC;IAAA,EAEd;EAAC,CACV,CAAC;AAE9B,CAAC;AAACnB,OAAA,CAAAO,cAAA,GAAAA,cAAA;AAAA,IAAA6C,QAAA,GAEa7C,cAAc;AAAAP,OAAA,cAAAoD,QAAA","ignoreList":[]}
|
|
@@ -15,8 +15,18 @@ import { HorizontalCardActions } from './HorizontalCardActions';
|
|
|
15
15
|
import { defaultOnMouseDownHandler, useActionWithin } from '../../common';
|
|
16
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
18
|
-
export var HorizontalCardContentContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex: 1;\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: 8px;\n"])),
|
|
19
|
-
|
|
18
|
+
export var HorizontalCardContentContainer = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: relative;\n display: flex;\n flex: 1;\n flex-direction: row;\n align-items: center;\n background-color: ", ";\n border-radius: 8px;\n"])), function (props) {
|
|
19
|
+
return COLORS.getColor('white', props.theme);
|
|
20
|
+
});
|
|
21
|
+
export var HorizontalCardContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex: 1;\n\n &.outline {\n ", " {\n box-shadow: inset 0 0 0 1px ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n\n &.clickable {\n cursor: pointer;\n\n &:hover:not(.action-within):not(.disabled) {\n &.outline {\n ", " {\n background-color: ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n }\n\n &:active:not(.action-within):not(.disabled) {\n &.outline {\n ", " {\n background-color: ", ";\n }\n }\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n }\n\n &:focus {\n ", "\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n &.elevated {\n ", " {\n box-shadow: ", ";\n }\n }\n\n &.outline {\n ", " {\n box-shadow: inset 0 0 0 1px ", ";\n }\n }\n }\n"])), HorizontalCardContentContainer, function (props) {
|
|
22
|
+
return COLORS.getColor('neutral_200', props.theme);
|
|
23
|
+
}, HorizontalCardContentContainer, BOXSHADOWS.BOXSHADOW_L1, HorizontalCardContentContainer, function (props) {
|
|
24
|
+
return COLORS.getColor('primary_20', props.theme);
|
|
25
|
+
}, HorizontalCardContentContainer, BOXSHADOWS.BOXSHADOW_L3, HorizontalCardContentContainer, function (props) {
|
|
26
|
+
return COLORS.getColor('primary_100', props.theme);
|
|
27
|
+
}, HorizontalCardContentContainer, BOXSHADOWS.BOXSHADOW_L2, focusStyles, HorizontalCardContentContainer, BOXSHADOWS.BOXSHADOW_L1, HorizontalCardContentContainer, function (props) {
|
|
28
|
+
return COLORS.getColor('neutral_100', props.theme);
|
|
29
|
+
});
|
|
20
30
|
export var HorizontalCard = function HorizontalCard(_ref) {
|
|
21
31
|
var title = _ref.title,
|
|
22
32
|
description = _ref.description,
|