@laerdal/life-react-components 3.5.1-dev.11 → 3.5.1-dev.13
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/AccordionMenu.d.ts +15 -0
- package/dist/Accordion/ContentAccordion.d.ts +14 -0
- package/dist/AuthPage/AuthPage.d.ts +2 -2
- package/dist/Banners/Banner.d.ts +24 -3
- package/dist/Banners/OverviewBanner.d.ts +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.ts +8 -1
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +2 -0
- package/dist/Button/BackButton.d.ts +7 -0
- package/dist/Button/Button.d.ts +29 -10
- package/dist/Button/DualFunctionButton.d.ts +10 -0
- package/dist/Button/Iconbutton.d.ts +17 -11
- package/dist/Card/HorizontalCard/types.d.ts +13 -3
- package/dist/Card/VerticalCard/Card.d.ts +8 -1
- package/dist/Card/VerticalCard/CardBottomSection.d.ts +11 -0
- package/dist/Card/VerticalCard/CardMiddleSection.d.ts +8 -0
- package/dist/Card/VerticalCard/CardTopSection.d.ts +11 -0
- package/dist/Chips/ChipTypes.d.ts +35 -1
- package/dist/ChipsInput/ChipDropdownInput.d.ts +9 -1
- package/dist/ChipsInput/index.d.ts +1 -0
- package/dist/Dropdown/BasicDropdown.d.ts +76 -0
- package/dist/Dropdown/CommonStyling.d.ts +0 -1
- package/dist/Dropdown/DropdownButtonTypes.d.ts +28 -1
- package/dist/Dropdown/DropdownContent.d.ts +10 -1
- package/dist/Dropdown/DropdownFilter.d.ts +18 -1
- package/dist/Footer/Components/FooterBottomLinks.d.ts +2 -2
- package/dist/Footer/Components/FooterDropdownLinks.d.ts +2 -2
- package/dist/Footer/Components/FooterNavSection.d.ts +2 -2
- package/dist/Footer/Components/FooterNewsletterAndSocialSection.d.ts +2 -2
- package/dist/Footer/Components/FooterTop.d.ts +2 -2
- package/dist/Footer/Footer.d.ts +2 -2
- package/dist/Footer/SiteFooter.d.ts +1 -1
- package/dist/GlobalNavigationBar/__tests__/GlobalNavigationBar.tests.js +299 -0
- package/dist/GlobalNavigationBar/__tests__/Logo.tests.js +26 -0
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +2 -2
- package/dist/GlobalNavigationBar/desktop/UserMenu.d.ts +2 -2
- package/dist/GlobalNavigationBar/mobile/MobileMenu.d.ts +2 -2
- package/dist/GlobalNavigationBar/types.d.ts +5 -1
- package/dist/HyperLink/HyperLink.d.ts +7 -0
- package/dist/Image/ImageWithFallbacks.d.ts +1 -1
- package/dist/InputFields/DatepickerField.d.ts +39 -1
- package/dist/InputFields/DatepickerFieldHeader.d.ts +5 -2
- package/dist/InputFields/NumberField.d.ts +46 -17
- package/dist/InputFields/PasswordField.d.ts +73 -1
- package/dist/InputFields/QuickSearch.d.ts +12 -0
- package/dist/InputFields/RadioButton.d.ts +26 -2
- package/dist/InputFields/RichTextField.d.ts +57 -0
- package/dist/InputFields/SearchBar.d.ts +64 -0
- package/dist/InputFields/TextField.d.ts +113 -1
- package/dist/InputFields/types.d.ts +39 -1
- package/dist/LinearProgress/LinearProgress.d.ts +6 -0
- package/dist/List/ListRow.d.ts +17 -4
- package/dist/List/__tests__/ListRow.tests.js +51 -0
- package/dist/LoadingIndicator/LoadingIndicator.d.ts +6 -3
- package/dist/LoadingPage/GlobalLoadingPage.d.ts +1 -1
- package/dist/MenuItem/MenuItem.d.ts +7 -1
- package/dist/MiniProductCard/MiniProductCard.d.ts +2 -2
- package/dist/Modals/Modal.d.ts +4 -4
- package/dist/Modals/ModalContainer.d.ts +1 -1
- package/dist/Modals/ModalContent.d.ts +1 -1
- package/dist/Modals/ModalDialog.d.ts +14 -4
- package/dist/NavItem/NavItem.d.ts +1 -1
- package/dist/NavItem/NestedNavItem.d.ts +20 -2
- package/dist/NotificationDot/NotificationDot.d.ts +10 -0
- package/dist/Paginator/Paginator.d.ts +18 -4
- package/dist/Panel/Panel.d.ts +24 -6
- package/dist/Popover/Popover.d.ts +80 -12
- package/dist/ProfileButton/ProfileButton.d.ts +31 -3
- package/dist/QuizButton/QuizButton.d.ts +25 -1
- package/dist/SegmentControl/SegmentControl.d.ts +25 -2
- package/dist/SegmentControl/index.d.ts +2 -2
- package/dist/SideMenu/SideMenuBody.d.ts +2 -2
- package/dist/SideMenu/SideMenuFooter.d.ts +2 -2
- package/dist/SideMenu/SideMenuHeader.d.ts +2 -2
- package/dist/Switcher/MobileSwitcherMenu.d.ts +1 -1
- package/dist/Switcher/SwitcherMenuItem.d.ts +2 -2
- package/dist/Switcher/__tests__/SwitcherMenuItem.js +53 -0
- package/dist/Table/TableTypes.d.ts +130 -0
- package/dist/Tabs/HorizontalTabs.d.ts +14 -3
- package/dist/Tabs/TabLink.d.ts +1 -1
- package/dist/Tabs/VerticalTabs.d.ts +30 -2
- package/dist/Tabs/__tests__/TabLink.tests.js +83 -0
- package/dist/Tabs/__tests__/Tablist.tests.js +78 -0
- package/dist/Tabs/index.d.ts +1 -1
- package/dist/Tag/Tag.d.ts +3 -0
- package/dist/Tile/TileCommonItems.d.ts +2 -2
- package/dist/Toasters/Toast.d.ts +9 -1
- package/dist/Toggles/ToggleButton.d.ts +5 -0
- package/dist/Toggles/TogglerTypes.d.ts +7 -0
- package/dist/Tooltips/TooltipOverflow.d.ts +1 -1
- package/dist/Tooltips/TooltipStyles.d.ts +2 -1
- package/dist/Tooltips/TooltipTypes.d.ts +10 -0
- package/dist/Tooltips/TooltipWrapper.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/src/Accordion/AccordionItem.js +47 -0
- package/dist/src/Accordion/AccordionMenu.js +66 -0
- package/dist/src/Accordion/ContentAccordion.js +107 -0
- package/dist/src/Accordion/index.js +7 -0
- package/dist/src/Accordion/styles.js +12 -0
- package/dist/src/AuthPage/AuthPage.d.ts +1 -1
- package/dist/src/AuthPage/AuthPage.js +29 -0
- package/dist/src/AuthPage/ScreenSetsContainer.js +9 -0
- package/dist/src/AuthPage/index.js +4 -0
- package/dist/src/Banners/Banner.d.ts +2 -2
- package/dist/src/Banners/Banner.js +112 -0
- package/dist/src/Banners/OverviewBanner.d.ts +1 -1
- package/dist/src/Banners/OverviewBanner.js +39 -0
- package/dist/src/Banners/index.js +4 -0
- package/dist/src/Banners/styles.js +55 -0
- package/dist/src/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/dist/src/Breadcrumb/Breadcrumb.js +67 -0
- package/dist/src/Breadcrumb/BreadcrumbItem.js +1 -0
- package/dist/src/Breadcrumb/index.js +4 -0
- package/dist/src/Breadcrumb/styles.js +24 -0
- package/dist/src/Button/BackButton.js +45 -0
- package/dist/src/Button/Button.js +87 -0
- package/dist/src/Button/DualFunctionButton.js +71 -0
- package/dist/src/Button/Iconbutton.js +70 -0
- package/dist/src/Button/index.js +8 -0
- package/dist/src/Card/HorizontalCard/HorizontalCard.js +55 -0
- package/dist/src/Card/HorizontalCard/HorizontalCardActions.d.ts +1 -1
- package/dist/src/Card/HorizontalCard/HorizontalCardActions.js +39 -0
- package/dist/src/Card/HorizontalCard/HorizontalCardBody.d.ts +1 -1
- package/dist/src/Card/HorizontalCard/HorizontalCardBody.js +23 -0
- package/dist/src/Card/HorizontalCard/HorizontalCardThumbnail.d.ts +1 -1
- package/dist/src/Card/HorizontalCard/HorizontalCardThumbnail.js +21 -0
- package/dist/src/Card/HorizontalCard/index.js +4 -0
- package/dist/src/Card/HorizontalCard/types.d.ts +5 -5
- package/dist/src/Card/HorizontalCard/types.js +1 -0
- package/dist/src/Card/VerticalCard/Card.js +61 -0
- package/dist/src/Card/VerticalCard/CardBottomSection.js +45 -0
- package/dist/src/Card/VerticalCard/CardMiddleSection.js +32 -0
- package/dist/src/Card/VerticalCard/CardTopSection.js +33 -0
- package/dist/src/Card/VerticalCard/index.js +7 -0
- package/dist/src/Card/index.js +2 -0
- package/dist/src/Chips/ActionChip.js +45 -0
- package/dist/src/Chips/ChipStyles.js +16 -0
- package/dist/src/Chips/ChipTypes.d.ts +1 -1
- package/dist/src/Chips/ChipTypes.js +1 -0
- package/dist/src/Chips/ChoiceChips.js +70 -0
- package/dist/src/Chips/FilterChip.js +49 -0
- package/dist/src/Chips/InputChip.js +71 -0
- package/dist/src/Chips/index.js +6 -0
- package/dist/src/ChipsInput/ChipDropdownInput.js +230 -0
- package/dist/src/ChipsInput/ChipInput.js +99 -0
- package/dist/src/ChipsInput/ChipInputField.js +114 -0
- package/dist/src/ChipsInput/ChipInputTypes.js +1 -0
- package/dist/src/ChipsInput/index.js +2 -0
- package/dist/src/Dropdown/BasicDropdown.d.ts +3 -3
- package/dist/src/Dropdown/BasicDropdown.js +153 -0
- package/dist/src/Dropdown/CommonStyling.js +24 -0
- package/dist/src/Dropdown/DropdownButton.js +107 -0
- package/dist/src/Dropdown/DropdownButtonTypes.d.ts +3 -3
- package/dist/src/Dropdown/DropdownButtonTypes.js +1 -0
- package/dist/src/Dropdown/DropdownContent.js +339 -0
- package/dist/src/Dropdown/DropdownFilter.js +161 -0
- package/dist/src/Dropdown/index.js +8 -0
- package/dist/src/Footer/Components/FooterBottomLinks.js +20 -0
- package/dist/src/Footer/Components/FooterDropdownLinks.js +25 -0
- package/dist/src/Footer/Components/FooterNavSection.js +32 -0
- package/dist/src/Footer/Components/FooterNewsletterAndSocialSection.js +42 -0
- package/dist/src/Footer/Components/FooterTop.js +34 -0
- package/dist/src/Footer/Footer.js +17 -0
- package/dist/src/Footer/SiteFooter.js +57 -0
- package/dist/src/Footer/index.js +2 -0
- package/dist/src/GlobalNavigationBar/GlobalNavigationBar.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/GlobalNavigationBar.js +93 -0
- package/dist/src/GlobalNavigationBar/Logo.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/Logo.js +33 -0
- package/dist/src/GlobalNavigationBar/__tests__/GlobalNavigationBar.tests.js +299 -0
- package/dist/src/GlobalNavigationBar/__tests__/Logo.tests.js +26 -0
- package/dist/src/GlobalNavigationBar/desktop/DesktopActions.js +88 -0
- package/dist/src/GlobalNavigationBar/desktop/ExtendedMainMenu.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/desktop/ExtendedMainMenu.js +42 -0
- package/dist/src/GlobalNavigationBar/desktop/MainMenu.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/desktop/MainMenu.js +175 -0
- package/dist/src/GlobalNavigationBar/desktop/RightSideNav.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/desktop/RightSideNav.js +46 -0
- package/dist/src/GlobalNavigationBar/desktop/SubMenu.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/desktop/SubMenu.js +131 -0
- package/dist/src/GlobalNavigationBar/desktop/UserMenu.js +90 -0
- package/dist/src/GlobalNavigationBar/index.js +3 -0
- package/dist/src/GlobalNavigationBar/mobile/CommonStyles.js +28 -0
- package/dist/src/GlobalNavigationBar/mobile/MobileActionContainer.js +18 -0
- package/dist/src/GlobalNavigationBar/mobile/MobileMenu.d.ts +1 -1
- package/dist/src/GlobalNavigationBar/mobile/MobileMenu.js +94 -0
- package/dist/src/GlobalNavigationBar/mobile/MobileMenuContent.js +89 -0
- package/dist/src/GlobalNavigationBar/mobile/MobileMenuHeader.js +108 -0
- package/dist/src/GlobalNavigationBar/types.d.ts +8 -8
- package/dist/src/GlobalNavigationBar/types.js +1 -0
- package/dist/src/GlobalNavigationBar/utils.js +7 -0
- package/dist/src/HyperLink/HyperLink.js +36 -0
- package/dist/src/HyperLink/index.js +3 -0
- package/dist/src/HyperLink/styling.js +9 -0
- package/dist/src/Image/ImageWithFallbacks.d.ts +1 -1
- package/dist/src/Image/ImageWithFallbacks.js +87 -0
- package/dist/src/Image/index.js +2 -0
- package/dist/src/InputFields/Checkbox.js +65 -0
- package/dist/src/InputFields/DatepickerField.d.ts +1 -1
- package/dist/src/InputFields/DatepickerField.js +237 -0
- package/dist/src/InputFields/DatepickerFieldHeader.js +45 -0
- package/dist/src/InputFields/Label.d.ts +1 -1
- package/dist/src/InputFields/Label.js +83 -0
- package/dist/src/InputFields/NumberField.js +194 -0
- package/dist/src/InputFields/PasswordField.d.ts +1 -1
- package/dist/src/InputFields/PasswordField.js +60 -0
- package/dist/src/InputFields/QuickSearch.d.ts +1 -1
- package/dist/src/InputFields/QuickSearch.js +92 -0
- package/dist/src/InputFields/RadioButton.d.ts +1 -1
- package/dist/src/InputFields/RadioButton.js +54 -0
- package/dist/src/InputFields/ResponsiveComponentWrapper.d.ts +1 -1
- package/dist/src/InputFields/ResponsiveComponentWrapper.js +24 -0
- package/dist/src/InputFields/RichTextField.js +83 -0
- package/dist/src/InputFields/SearchBar.d.ts +1 -1
- package/dist/src/InputFields/SearchBar.js +63 -0
- package/dist/src/InputFields/TextField.d.ts +1 -1
- package/dist/src/InputFields/TextField.js +51 -0
- package/dist/src/InputFields/Textarea.js +65 -0
- package/dist/src/InputFields/components/SearchBarInput.d.ts +1 -1
- package/dist/src/InputFields/components/SearchBarInput.js +26 -0
- package/dist/src/InputFields/components/SearchField.js +44 -0
- package/dist/src/InputFields/index.js +13 -0
- package/dist/src/InputFields/styling.js +33 -0
- package/dist/src/InputFields/types.d.ts +2 -2
- package/dist/src/InputFields/types.js +2 -0
- package/dist/src/Layouts/index.js +25 -0
- package/dist/src/LinearProgress/LinearProgress.js +78 -0
- package/dist/src/LinearProgress/index.js +3 -0
- package/dist/src/List/ListRow.js +83 -0
- package/dist/src/List/__tests__/ListRow.tests.js +51 -0
- package/dist/src/List/index.js +2 -0
- package/dist/src/LoadingIndicator/LoadingIndicator.d.ts +1 -1
- package/dist/src/LoadingIndicator/LoadingIndicator.js +26 -0
- package/dist/src/LoadingIndicator/index.js +1 -0
- package/dist/src/LoadingPage/GlobalLoadingPage.js +26 -0
- package/dist/src/LoadingPage/index.js +1 -0
- package/dist/src/MenuItem/MenuItem.d.ts +1 -1
- package/dist/src/MenuItem/MenuItem.js +60 -0
- package/dist/src/MenuItem/index.js +1 -0
- package/dist/src/MiniProductCard/MiniProductCard.d.ts +1 -1
- package/dist/src/MiniProductCard/MiniProductCard.js +30 -0
- package/dist/src/MiniProductCard/index.js +1 -0
- package/dist/src/Modals/Modal.d.ts +1 -1
- package/dist/src/Modals/Modal.js +38 -0
- package/dist/src/Modals/ModalContainer.d.ts +2 -2
- package/dist/src/Modals/ModalContainer.js +130 -0
- package/dist/src/Modals/ModalContent.js +159 -0
- package/dist/src/Modals/ModalDialog.js +166 -0
- package/dist/src/Modals/ModalNote.js +27 -0
- package/dist/src/Modals/ModalStyles.js +55 -0
- package/dist/src/Modals/ModalTypes.d.ts +2 -2
- package/dist/src/Modals/ModalTypes.js +1 -0
- package/dist/src/Modals/index.js +6 -0
- package/dist/src/NavItem/NavItem.d.ts +1 -1
- package/dist/src/NavItem/NavItem.js +26 -0
- package/dist/src/NavItem/NestedNavItem.js +18 -0
- package/dist/src/NavItem/index.js +1 -0
- package/dist/src/NotificationDot/NotificationDot.js +17 -0
- package/dist/src/NotificationDot/index.js +1 -0
- package/dist/src/Paginator/Paginator.js +77 -0
- package/dist/src/Paginator/index.js +2 -0
- package/dist/src/Panel/Panel.d.ts +1 -1
- package/dist/src/Panel/Panel.js +82 -0
- package/dist/src/Panel/index.js +1 -0
- package/dist/src/Popover/Popover.js +101 -0
- package/dist/src/Popover/index.js +1 -0
- package/dist/src/ProfileButton/ProfileButton.d.ts +2 -2
- package/dist/src/ProfileButton/ProfileButton.js +52 -0
- package/dist/src/ProfileButton/index.js +1 -0
- package/dist/src/QuizButton/QuizButton.d.ts +1 -1
- package/dist/src/QuizButton/QuizButton.js +53 -0
- package/dist/src/QuizButton/index.js +1 -0
- package/dist/src/SegmentControl/SegmentControl.js +57 -0
- package/dist/src/SegmentControl/index.js +2 -0
- package/dist/src/Services/functions.js +11 -0
- package/dist/src/SideMenu/SideMenu.js +43 -0
- package/dist/src/SideMenu/SideMenuBody.js +24 -0
- package/dist/src/SideMenu/SideMenuFooter.js +43 -0
- package/dist/src/SideMenu/SideMenuHeader.js +46 -0
- package/dist/src/SideMenu/index.js +2 -0
- package/dist/src/SideMenu/types.d.ts +3 -3
- package/dist/src/SideMenu/types.js +1 -0
- package/dist/src/SkipToContent/SkipToContent.d.ts +1 -1
- package/dist/src/SkipToContent/SkipToContent.js +17 -0
- package/dist/src/SkipToContent/index.js +1 -0
- package/dist/src/Switcher/MobileCustomMenuContent.js +26 -0
- package/dist/src/Switcher/MobileSwitcherMenu.js +21 -0
- package/dist/src/Switcher/SwitcherMenuItem.js +18 -0
- package/dist/src/Switcher/__tests__/SwitcherMenuItem.js +53 -0
- package/dist/src/Switcher/index.js +3 -0
- package/dist/src/Table/Table.js +292 -0
- package/dist/src/Table/TableBody.js +116 -0
- package/dist/src/Table/TableFooter.js +41 -0
- package/dist/src/Table/TableHeaders.js +26 -0
- package/dist/src/Table/TableStyles.js +46 -0
- package/dist/src/Table/TableTypes.d.ts +4 -4
- package/dist/src/Table/TableTypes.js +2 -0
- package/dist/src/Table/index.js +3 -0
- package/dist/src/Tabs/HorizontalTabs.js +122 -0
- package/dist/src/Tabs/TabLink.js +76 -0
- package/dist/src/Tabs/Tabs.d.ts +1 -1
- package/dist/src/Tabs/Tabs.js +62 -0
- package/dist/src/Tabs/VerticalTabs.js +13 -0
- package/dist/src/Tabs/__tests__/TabLink.tests.js +83 -0
- package/dist/src/Tabs/__tests__/Tablist.tests.js +78 -0
- package/dist/src/Tabs/index.js +3 -0
- package/dist/src/Tag/Tag.d.ts +2 -2
- package/dist/src/Tag/Tag.js +41 -0
- package/dist/src/Tag/index.js +1 -0
- package/dist/src/Tile/Tile.js +43 -0
- package/dist/src/Tile/TileBody.js +15 -0
- package/dist/src/Tile/TileCommonItems.js +75 -0
- package/dist/src/Tile/TileFooter.js +19 -0
- package/dist/src/Tile/TileHeader.js +57 -0
- package/dist/src/Tile/TileTypes.d.ts +8 -8
- package/dist/src/Tile/TileTypes.js +1 -0
- package/dist/src/Tile/index.js +3 -0
- package/dist/src/Toasters/Toast.d.ts +2 -2
- package/dist/src/Toasters/Toast.js +166 -0
- package/dist/src/Toasters/ToastContext.d.ts +2 -2
- package/dist/src/Toasters/ToastContext.js +69 -0
- package/dist/src/Toasters/index.js +4 -0
- package/dist/src/Toggles/ToggleButton.js +48 -0
- package/dist/src/Toggles/ToggleSwitch.js +65 -0
- package/dist/src/Toggles/TogglerStyles.js +17 -0
- package/dist/src/Toggles/TogglerTypes.js +1 -0
- package/dist/src/Toggles/index.js +3 -0
- package/dist/src/Tooltips/TooltipOverflow.js +71 -0
- package/dist/src/Tooltips/TooltipStyles.d.ts +1 -1
- package/dist/src/Tooltips/TooltipStyles.js +41 -0
- package/dist/src/Tooltips/TooltipTypes.js +1 -0
- package/dist/src/Tooltips/TooltipWrapper.js +65 -0
- package/dist/src/Tooltips/index.js +3 -0
- package/dist/src/assets/index.d.ts +1 -1
- package/dist/src/assets/index.js +41 -0
- package/dist/src/common/ActionWithin.js +25 -0
- package/dist/src/common/ClickOutside.js +20 -0
- package/dist/src/common/EventHandlers.js +8 -0
- package/dist/src/common/FocusOutside.js +20 -0
- package/dist/src/common/FocusVisible.d.ts +1 -1
- package/dist/src/common/FocusVisible.js +75 -0
- package/dist/src/common/InputStyling.js +8 -0
- package/dist/src/common/NavigationHelper.js +18 -0
- package/dist/src/common/ScrollableContainer.js +22 -0
- package/dist/src/common/StackState.js +10 -0
- package/dist/src/common/index.js +6 -0
- package/dist/src/icons/contenticons/Adaptive.js +31 -0
- package/dist/src/icons/contenticons/Add.js +31 -0
- package/dist/src/icons/contenticons/Adult.js +31 -0
- package/dist/src/icons/contenticons/AedNoShockAdvised.js +31 -0
- package/dist/src/icons/contenticons/AedPads.js +31 -0
- package/dist/src/icons/contenticons/AedPadsCorrect.js +31 -0
- package/dist/src/icons/contenticons/AedPadsError.js +31 -0
- package/dist/src/icons/contenticons/AedShockAdvised.js +31 -0
- package/dist/src/icons/contenticons/Ambulance.js +31 -0
- package/dist/src/icons/contenticons/Assignments.js +31 -0
- package/dist/src/icons/contenticons/Attention.js +31 -0
- package/dist/src/icons/contenticons/AutomaticMode.js +31 -0
- package/dist/src/icons/contenticons/AwardWinningPerson.js +31 -0
- package/dist/src/icons/contenticons/Biohazard.js +31 -0
- package/dist/src/icons/contenticons/Bleeding.js +31 -0
- package/dist/src/icons/contenticons/Book.js +31 -0
- package/dist/src/icons/contenticons/Buildings.js +31 -0
- package/dist/src/icons/contenticons/CPRCall.js +31 -0
- package/dist/src/icons/contenticons/CPRCycles.js +31 -0
- package/dist/src/icons/contenticons/CPRTraining.js +31 -0
- package/dist/src/icons/contenticons/Calendar.js +31 -0
- package/dist/src/icons/contenticons/Call.js +31 -0
- package/dist/src/icons/contenticons/Certificate.js +31 -0
- package/dist/src/icons/contenticons/ChestCompressionFraction.js +31 -0
- package/dist/src/icons/contenticons/Child.js +31 -0
- package/dist/src/icons/contenticons/Cleaning.js +31 -0
- package/dist/src/icons/contenticons/ClinicalFindings.js +31 -0
- package/dist/src/icons/contenticons/Cloud.js +31 -0
- package/dist/src/icons/contenticons/CloudAttension.js +31 -0
- package/dist/src/icons/contenticons/CloudChecked.js +31 -0
- package/dist/src/icons/contenticons/CloudDownload.js +31 -0
- package/dist/src/icons/contenticons/CloudLocked.js +31 -0
- package/dist/src/icons/contenticons/CloudNoConnection.js +31 -0
- package/dist/src/icons/contenticons/CloudSyncing.js +31 -0
- package/dist/src/icons/contenticons/CloudUpload.js +31 -0
- package/dist/src/icons/contenticons/Code.js +31 -0
- package/dist/src/icons/contenticons/CoffeeBreak.js +31 -0
- package/dist/src/icons/contenticons/Contact.js +31 -0
- package/dist/src/icons/contenticons/ContactInfo.js +31 -0
- package/dist/src/icons/contenticons/Cookie.js +31 -0
- package/dist/src/icons/contenticons/CountAloud.js +31 -0
- package/dist/src/icons/contenticons/Dashboard.js +31 -0
- package/dist/src/icons/contenticons/Data.js +31 -0
- package/dist/src/icons/contenticons/DecisionFlow.js +31 -0
- package/dist/src/icons/contenticons/Defribilator.js +31 -0
- package/dist/src/icons/contenticons/DefribilatorMonitor.js +31 -0
- package/dist/src/icons/contenticons/Depth.js +31 -0
- package/dist/src/icons/contenticons/Desktop.js +31 -0
- package/dist/src/icons/contenticons/DeviceChecked.js +31 -0
- package/dist/src/icons/contenticons/Dispatcher.js +31 -0
- package/dist/src/icons/contenticons/Doctor.js +31 -0
- package/dist/src/icons/contenticons/DocumentChecked.js +31 -0
- package/dist/src/icons/contenticons/Download.js +31 -0
- package/dist/src/icons/contenticons/ELearning.js +31 -0
- package/dist/src/icons/contenticons/EMSRescuer.js +31 -0
- package/dist/src/icons/contenticons/ESimulation.js +31 -0
- package/dist/src/icons/contenticons/Edit.js +31 -0
- package/dist/src/icons/contenticons/Educator.js +31 -0
- package/dist/src/icons/contenticons/Elderly.js +31 -0
- package/dist/src/icons/contenticons/Embryo.js +31 -0
- package/dist/src/icons/contenticons/EventLog.js +31 -0
- package/dist/src/icons/contenticons/Faq.js +31 -0
- package/dist/src/icons/contenticons/Female.js +31 -0
- package/dist/src/icons/contenticons/FirstAid.js +31 -0
- package/dist/src/icons/contenticons/Geriatric.js +31 -0
- package/dist/src/icons/contenticons/GiftCard.js +31 -0
- package/dist/src/icons/contenticons/Goals.js +31 -0
- package/dist/src/icons/contenticons/Grid.js +31 -0
- package/dist/src/icons/contenticons/GuidedTour.js +31 -0
- package/dist/src/icons/contenticons/HandPlacement.js +31 -0
- package/dist/src/icons/contenticons/HandPlacementCorrect.js +31 -0
- package/dist/src/icons/contenticons/HandPlacementIncorrect.js +31 -0
- package/dist/src/icons/contenticons/HeadTilt.js +31 -0
- package/dist/src/icons/contenticons/Heart.js +31 -0
- package/dist/src/icons/contenticons/HeartPulse.js +31 -0
- package/dist/src/icons/contenticons/HeartShock.js +31 -0
- package/dist/src/icons/contenticons/Help.js +31 -0
- package/dist/src/icons/contenticons/Hierarchy.js +31 -0
- package/dist/src/icons/contenticons/Hospital.js +31 -0
- package/dist/src/icons/contenticons/Hospitalized.js +31 -0
- package/dist/src/icons/contenticons/House.js +31 -0
- package/dist/src/icons/contenticons/Infant.js +31 -0
- package/dist/src/icons/contenticons/Information.js +31 -0
- package/dist/src/icons/contenticons/Injustice.js +31 -0
- package/dist/src/icons/contenticons/Institute.js +31 -0
- package/dist/src/icons/contenticons/Justice.js +31 -0
- package/dist/src/icons/contenticons/Laptop.js +31 -0
- package/dist/src/icons/contenticons/Leaflet.js +31 -0
- package/dist/src/icons/contenticons/Learner.js +31 -0
- package/dist/src/icons/contenticons/Levels.js +31 -0
- package/dist/src/icons/contenticons/LevelsDecreasing.js +31 -0
- package/dist/src/icons/contenticons/LevelsIncreasing.js +31 -0
- package/dist/src/icons/contenticons/LevelsStarred.js +31 -0
- package/dist/src/icons/contenticons/Maintenance.js +31 -0
- package/dist/src/icons/contenticons/Male.js +31 -0
- package/dist/src/icons/contenticons/Manikin.js +31 -0
- package/dist/src/icons/contenticons/ManikinCorrect.js +31 -0
- package/dist/src/icons/contenticons/ManikinError.js +31 -0
- package/dist/src/icons/contenticons/ManualMode.js +31 -0
- package/dist/src/icons/contenticons/MapPoint.js +31 -0
- package/dist/src/icons/contenticons/MaskLeak.js +31 -0
- package/dist/src/icons/contenticons/MedicalHistory.js +31 -0
- package/dist/src/icons/contenticons/MedicalRecord.js +31 -0
- package/dist/src/icons/contenticons/Medication.js +31 -0
- package/dist/src/icons/contenticons/Metronome.js +31 -0
- package/dist/src/icons/contenticons/MoodHappy.js +31 -0
- package/dist/src/icons/contenticons/MoodIndifferent.js +31 -0
- package/dist/src/icons/contenticons/MoodSad.js +31 -0
- package/dist/src/icons/contenticons/MoodVeryHappy.js +31 -0
- package/dist/src/icons/contenticons/MoodVerySad.js +31 -0
- package/dist/src/icons/contenticons/Newborn.js +31 -0
- package/dist/src/icons/contenticons/NoInterruption.js +31 -0
- package/dist/src/icons/contenticons/Note.js +31 -0
- package/dist/src/icons/contenticons/Pain.js +31 -0
- package/dist/src/icons/contenticons/Patient.js +31 -0
- package/dist/src/icons/contenticons/PatientAssignment.js +31 -0
- package/dist/src/icons/contenticons/PatientMonitor.js +31 -0
- package/dist/src/icons/contenticons/PatientStretcher.js +31 -0
- package/dist/src/icons/contenticons/PatientTransfer.js +31 -0
- package/dist/src/icons/contenticons/PatientTreatment.js +31 -0
- package/dist/src/icons/contenticons/Person.js +31 -0
- package/dist/src/icons/contenticons/PhysiologicalModel.js +31 -0
- package/dist/src/icons/contenticons/PieChart.js +31 -0
- package/dist/src/icons/contenticons/Pill.js +31 -0
- package/dist/src/icons/contenticons/Pregnant.js +31 -0
- package/dist/src/icons/contenticons/Print.js +31 -0
- package/dist/src/icons/contenticons/ProvidersOrders.js +31 -0
- package/dist/src/icons/contenticons/Pulse.js +31 -0
- package/dist/src/icons/contenticons/RQICart.js +31 -0
- package/dist/src/icons/contenticons/Rate.js +31 -0
- package/dist/src/icons/contenticons/RateTooFast.js +31 -0
- package/dist/src/icons/contenticons/RateTooSlow.js +31 -0
- package/dist/src/icons/contenticons/Recoil.js +31 -0
- package/dist/src/icons/contenticons/Ruler.js +31 -0
- package/dist/src/icons/contenticons/Screens.js +31 -0
- package/dist/src/icons/contenticons/Search.js +31 -0
- package/dist/src/icons/contenticons/Sepsis.js +31 -0
- package/dist/src/icons/contenticons/Settings.js +31 -0
- package/dist/src/icons/contenticons/Shock.js +31 -0
- package/dist/src/icons/contenticons/ShockAdvised.js +31 -0
- package/dist/src/icons/contenticons/ShockAutomated.js +31 -0
- package/dist/src/icons/contenticons/ShockNotAdvised.js +31 -0
- package/dist/src/icons/contenticons/Sleep.js +31 -0
- package/dist/src/icons/contenticons/Smartphone.js +31 -0
- package/dist/src/icons/contenticons/Speech.js +31 -0
- package/dist/src/icons/contenticons/SpeechBubble.js +31 -0
- package/dist/src/icons/contenticons/SpeechBubbles.js +31 -0
- package/dist/src/icons/contenticons/Star.js +31 -0
- package/dist/src/icons/contenticons/Stethoscope.js +31 -0
- package/dist/src/icons/contenticons/Stock.js +31 -0
- package/dist/src/icons/contenticons/Stopwatch.js +31 -0
- package/dist/src/icons/contenticons/Suitcase.js +31 -0
- package/dist/src/icons/contenticons/SwitchCamera.js +31 -0
- package/dist/src/icons/contenticons/SwitchRoles.js +31 -0
- package/dist/src/icons/contenticons/Tablet.js +31 -0
- package/dist/src/icons/contenticons/Talking.js +31 -0
- package/dist/src/icons/contenticons/TargetGroup.js +31 -0
- package/dist/src/icons/contenticons/TaskTrainer.js +31 -0
- package/dist/src/icons/contenticons/TeamLead.js +31 -0
- package/dist/src/icons/contenticons/TeamWork.js +31 -0
- package/dist/src/icons/contenticons/Terms.js +31 -0
- package/dist/src/icons/contenticons/TimelineReview.js +31 -0
- package/dist/src/icons/contenticons/Translation.js +31 -0
- package/dist/src/icons/contenticons/Trophy.js +31 -0
- package/dist/src/icons/contenticons/Trophy1st.js +31 -0
- package/dist/src/icons/contenticons/Trophy2nd.js +31 -0
- package/dist/src/icons/contenticons/Trophy3rd.js +31 -0
- package/dist/src/icons/contenticons/TrophyStar.js +31 -0
- package/dist/src/icons/contenticons/Truck.js +31 -0
- package/dist/src/icons/contenticons/TwoRescuerCPR.js +31 -0
- package/dist/src/icons/contenticons/USB.js +31 -0
- package/dist/src/icons/contenticons/Ultrasound.js +31 -0
- package/dist/src/icons/contenticons/VentilationLungs.js +31 -0
- package/dist/src/icons/contenticons/VentilationPressure.js +31 -0
- package/dist/src/icons/contenticons/VentilationVolume.js +31 -0
- package/dist/src/icons/contenticons/Video.js +31 -0
- package/dist/src/icons/contenticons/VideoRecording.js +31 -0
- package/dist/src/icons/contenticons/Visibility.js +31 -0
- package/dist/src/icons/contenticons/VitalSigns.js +31 -0
- package/dist/src/icons/contenticons/index.js +179 -0
- package/dist/src/icons/index.d.ts +1 -1
- package/dist/src/icons/index.js +45 -0
- package/dist/src/icons/systemicons/Accessibility.js +31 -0
- package/dist/src/icons/systemicons/Add.js +31 -0
- package/dist/src/icons/systemicons/AddUser.js +31 -0
- package/dist/src/icons/systemicons/Adult.js +31 -0
- package/dist/src/icons/systemicons/AedPads.js +31 -0
- package/dist/src/icons/systemicons/AedPadsCorrect.js +31 -0
- package/dist/src/icons/systemicons/AedPadsError.js +31 -0
- package/dist/src/icons/systemicons/Archive.js +31 -0
- package/dist/src/icons/systemicons/ArrowCollapse.js +31 -0
- package/dist/src/icons/systemicons/ArrowDropDown.js +31 -0
- package/dist/src/icons/systemicons/ArrowDropLeft.js +31 -0
- package/dist/src/icons/systemicons/ArrowDropRight.js +31 -0
- package/dist/src/icons/systemicons/ArrowDropUp.js +31 -0
- package/dist/src/icons/systemicons/ArrowExpand.js +31 -0
- package/dist/src/icons/systemicons/ArrowLineDown.js +31 -0
- package/dist/src/icons/systemicons/ArrowLineLeft.js +31 -0
- package/dist/src/icons/systemicons/ArrowLineRight.js +31 -0
- package/dist/src/icons/systemicons/ArrowLineUp.js +31 -0
- package/dist/src/icons/systemicons/ArrowStopLeft.js +31 -0
- package/dist/src/icons/systemicons/ArrowStopRight.js +31 -0
- package/dist/src/icons/systemicons/Assignments.js +31 -0
- package/dist/src/icons/systemicons/Asterisk.js +31 -0
- package/dist/src/icons/systemicons/Attachment.js +31 -0
- package/dist/src/icons/systemicons/Attention.js +31 -0
- package/dist/src/icons/systemicons/AudioDescriptionOn.js +31 -0
- package/dist/src/icons/systemicons/BackwardsFiveSec.js +31 -0
- package/dist/src/icons/systemicons/Battery0.js +31 -0
- package/dist/src/icons/systemicons/Battery1.js +31 -0
- package/dist/src/icons/systemicons/Battery2.js +31 -0
- package/dist/src/icons/systemicons/Battery3.js +31 -0
- package/dist/src/icons/systemicons/Battery4.js +31 -0
- package/dist/src/icons/systemicons/Battery5.js +31 -0
- package/dist/src/icons/systemicons/Battery6.js +31 -0
- package/dist/src/icons/systemicons/BatteryFull.js +31 -0
- package/dist/src/icons/systemicons/Bluetooth.js +31 -0
- package/dist/src/icons/systemicons/Book.js +31 -0
- package/dist/src/icons/systemicons/BookmarkAdd.js +31 -0
- package/dist/src/icons/systemicons/BookmarkCollection.js +31 -0
- package/dist/src/icons/systemicons/BookmarkOff.js +31 -0
- package/dist/src/icons/systemicons/BookmarkOn.js +31 -0
- package/dist/src/icons/systemicons/Bullet.js +31 -0
- package/dist/src/icons/systemicons/Calendar.js +31 -0
- package/dist/src/icons/systemicons/CheckMark.js +31 -0
- package/dist/src/icons/systemicons/CheckboxOff.js +31 -0
- package/dist/src/icons/systemicons/CheckboxOn.js +31 -0
- package/dist/src/icons/systemicons/CheckboxSemi.js +31 -0
- package/dist/src/icons/systemicons/ChevronDown.js +31 -0
- package/dist/src/icons/systemicons/ChevronLeft.js +31 -0
- package/dist/src/icons/systemicons/ChevronRight.js +31 -0
- package/dist/src/icons/systemicons/ChevronUp.js +31 -0
- package/dist/src/icons/systemicons/Child.js +31 -0
- package/dist/src/icons/systemicons/Clear.js +31 -0
- package/dist/src/icons/systemicons/Close.js +31 -0
- package/dist/src/icons/systemicons/ClosedCaptionOn.js +31 -0
- package/dist/src/icons/systemicons/Cloud.js +31 -0
- package/dist/src/icons/systemicons/CloudAttention.js +31 -0
- package/dist/src/icons/systemicons/CloudCheck.js +31 -0
- package/dist/src/icons/systemicons/CloudDownload.js +31 -0
- package/dist/src/icons/systemicons/CloudLocked.js +31 -0
- package/dist/src/icons/systemicons/CloudNoConnection.js +31 -0
- package/dist/src/icons/systemicons/CloudSyncing.js +31 -0
- package/dist/src/icons/systemicons/CloudUpload.js +31 -0
- package/dist/src/icons/systemicons/CoffeeBreak.js +31 -0
- package/dist/src/icons/systemicons/Copy.js +31 -0
- package/dist/src/icons/systemicons/Dashboard.js +31 -0
- package/dist/src/icons/systemicons/DecisionFlow.js +31 -0
- package/dist/src/icons/systemicons/Delete.js +31 -0
- package/dist/src/icons/systemicons/Document.js +31 -0
- package/dist/src/icons/systemicons/Download.js +31 -0
- package/dist/src/icons/systemicons/DragHandle.js +31 -0
- package/dist/src/icons/systemicons/DragIndicator.js +31 -0
- package/dist/src/icons/systemicons/Edit.js +31 -0
- package/dist/src/icons/systemicons/Educator.js +31 -0
- package/dist/src/icons/systemicons/Equals.js +31 -0
- package/dist/src/icons/systemicons/EventLog.js +31 -0
- package/dist/src/icons/systemicons/Export.js +31 -0
- package/dist/src/icons/systemicons/ExportCVS.js +31 -0
- package/dist/src/icons/systemicons/ExportDoc.js +31 -0
- package/dist/src/icons/systemicons/ExportEXL.js +31 -0
- package/dist/src/icons/systemicons/ExportJpg.js +31 -0
- package/dist/src/icons/systemicons/ExportPDF.js +31 -0
- package/dist/src/icons/systemicons/ExportPNG.js +31 -0
- package/dist/src/icons/systemicons/ExtendTextArea.js +31 -0
- package/dist/src/icons/systemicons/Facebook.js +31 -0
- package/dist/src/icons/systemicons/Filter.js +31 -0
- package/dist/src/icons/systemicons/Flickr.js +31 -0
- package/dist/src/icons/systemicons/Forward.js +31 -0
- package/dist/src/icons/systemicons/ForwardFiveSec.js +31 -0
- package/dist/src/icons/systemicons/ForwardSlash.js +31 -0
- package/dist/src/icons/systemicons/Fullscreen.js +31 -0
- package/dist/src/icons/systemicons/FullscreenExit.js +31 -0
- package/dist/src/icons/systemicons/GearSettings.js +31 -0
- package/dist/src/icons/systemicons/GridView.js +31 -0
- package/dist/src/icons/systemicons/Group.js +31 -0
- package/dist/src/icons/systemicons/GuidedTour.js +31 -0
- package/dist/src/icons/systemicons/HeartShock.js +31 -0
- package/dist/src/icons/systemicons/Help.js +31 -0
- package/dist/src/icons/systemicons/Hierarchy.js +31 -0
- package/dist/src/icons/systemicons/History.js +31 -0
- package/dist/src/icons/systemicons/Home.js +31 -0
- package/dist/src/icons/systemicons/Image.js +31 -0
- package/dist/src/icons/systemicons/Infant.js +31 -0
- package/dist/src/icons/systemicons/Information.js +31 -0
- package/dist/src/icons/systemicons/Institute.js +31 -0
- package/dist/src/icons/systemicons/Keyboard.js +31 -0
- package/dist/src/icons/systemicons/Language.js +31 -0
- package/dist/src/icons/systemicons/Learner.js +31 -0
- package/dist/src/icons/systemicons/Legend.js +31 -0
- package/dist/src/icons/systemicons/Legend1Circle.js +31 -0
- package/dist/src/icons/systemicons/Legend2Triangle.js +31 -0
- package/dist/src/icons/systemicons/Legend3Star.js +31 -0
- package/dist/src/icons/systemicons/Legend4Square.js +31 -0
- package/dist/src/icons/systemicons/Legend5Diamond.js +31 -0
- package/dist/src/icons/systemicons/Legend6Nabla.js +31 -0
- package/dist/src/icons/systemicons/Legend7Pentagon.js +31 -0
- package/dist/src/icons/systemicons/Legend8Rectangle.js +31 -0
- package/dist/src/icons/systemicons/LegendStrokeDashed.js +31 -0
- package/dist/src/icons/systemicons/LegendStrokeSolid.js +31 -0
- package/dist/src/icons/systemicons/LikeOff.js +31 -0
- package/dist/src/icons/systemicons/LikeOn.js +31 -0
- package/dist/src/icons/systemicons/Link.js +31 -0
- package/dist/src/icons/systemicons/LinkedIn.js +31 -0
- package/dist/src/icons/systemicons/ListView.js +31 -0
- package/dist/src/icons/systemicons/LoadingMedium.js +8 -0
- package/dist/src/icons/systemicons/LoadingSmall.js +8 -0
- package/dist/src/icons/systemicons/LockedOff.js +31 -0
- package/dist/src/icons/systemicons/LockedOn.js +31 -0
- package/dist/src/icons/systemicons/Login.js +31 -0
- package/dist/src/icons/systemicons/Logout.js +31 -0
- package/dist/src/icons/systemicons/Loop.js +31 -0
- package/dist/src/icons/systemicons/Mail.js +31 -0
- package/dist/src/icons/systemicons/Manikin.js +31 -0
- package/dist/src/icons/systemicons/MapPoint.js +31 -0
- package/dist/src/icons/systemicons/Menu.js +31 -0
- package/dist/src/icons/systemicons/Metronome.js +31 -0
- package/dist/src/icons/systemicons/Microphone.js +31 -0
- package/dist/src/icons/systemicons/Minus.js +31 -0
- package/dist/src/icons/systemicons/MoreHorizontal.js +31 -0
- package/dist/src/icons/systemicons/MoreVertical.js +31 -0
- package/dist/src/icons/systemicons/Notification.js +31 -0
- package/dist/src/icons/systemicons/NotificationNew.js +31 -0
- package/dist/src/icons/systemicons/OpenFolder.js +31 -0
- package/dist/src/icons/systemicons/OpenNewWindow.js +31 -0
- package/dist/src/icons/systemicons/OverView.js +31 -0
- package/dist/src/icons/systemicons/Pause.js +31 -0
- package/dist/src/icons/systemicons/PieChart.js +31 -0
- package/dist/src/icons/systemicons/Pin.js +31 -0
- package/dist/src/icons/systemicons/Play.js +31 -0
- package/dist/src/icons/systemicons/PlayList.js +31 -0
- package/dist/src/icons/systemicons/PlayOutline.js +31 -0
- package/dist/src/icons/systemicons/PlaybackSpeed.js +31 -0
- package/dist/src/icons/systemicons/Plus.js +31 -0
- package/dist/src/icons/systemicons/PointDown.js +31 -0
- package/dist/src/icons/systemicons/PointLeft.js +31 -0
- package/dist/src/icons/systemicons/PointRight.js +31 -0
- package/dist/src/icons/systemicons/PointUp.js +31 -0
- package/dist/src/icons/systemicons/Print.js +31 -0
- package/dist/src/icons/systemicons/RadioButtonOff.js +31 -0
- package/dist/src/icons/systemicons/RadioButtonOn.js +31 -0
- package/dist/src/icons/systemicons/Record.js +31 -0
- package/dist/src/icons/systemicons/Refresh.js +31 -0
- package/dist/src/icons/systemicons/Replay.js +31 -0
- package/dist/src/icons/systemicons/Rewind.js +31 -0
- package/dist/src/icons/systemicons/SUN.js +31 -0
- package/dist/src/icons/systemicons/Save.js +31 -0
- package/dist/src/icons/systemicons/Search.js +31 -0
- package/dist/src/icons/systemicons/SendTo.js +31 -0
- package/dist/src/icons/systemicons/Share.js +31 -0
- package/dist/src/icons/systemicons/Shock.js +31 -0
- package/dist/src/icons/systemicons/ShockAdvised.js +31 -0
- package/dist/src/icons/systemicons/ShockAutomated.js +31 -0
- package/dist/src/icons/systemicons/ShockNotAdvised.js +31 -0
- package/dist/src/icons/systemicons/ShoppingCart.js +31 -0
- package/dist/src/icons/systemicons/SkipForward.js +31 -0
- package/dist/src/icons/systemicons/Sort.js +31 -0
- package/dist/src/icons/systemicons/SpeechBuble.js +31 -0
- package/dist/src/icons/systemicons/StarFilled.js +31 -0
- package/dist/src/icons/systemicons/StarOutlined.js +31 -0
- package/dist/src/icons/systemicons/Stop.js +31 -0
- package/dist/src/icons/systemicons/Support.js +31 -0
- package/dist/src/icons/systemicons/SwitchApp.js +31 -0
- package/dist/src/icons/systemicons/Team.js +31 -0
- package/dist/src/icons/systemicons/TechnicalWarning.js +31 -0
- package/dist/src/icons/systemicons/ThumbsDown.js +31 -0
- package/dist/src/icons/systemicons/ThumbsUp.js +31 -0
- package/dist/src/icons/systemicons/Time.js +31 -0
- package/dist/src/icons/systemicons/TimeLimited.js +31 -0
- package/dist/src/icons/systemicons/Timeline.js +31 -0
- package/dist/src/icons/systemicons/Tip.js +31 -0
- package/dist/src/icons/systemicons/Transcript.js +31 -0
- package/dist/src/icons/systemicons/Translation.js +31 -0
- package/dist/src/icons/systemicons/Twitter.js +31 -0
- package/dist/src/icons/systemicons/Upload.js +31 -0
- package/dist/src/icons/systemicons/Usb.js +31 -0
- package/dist/src/icons/systemicons/User.js +31 -0
- package/dist/src/icons/systemicons/Video.js +31 -0
- package/dist/src/icons/systemicons/VisibleOff.js +31 -0
- package/dist/src/icons/systemicons/VisibleOn.js +31 -0
- package/dist/src/icons/systemicons/VolumeDown.js +31 -0
- package/dist/src/icons/systemicons/VolumeOff.js +31 -0
- package/dist/src/icons/systemicons/VolumeUp.js +31 -0
- package/dist/src/icons/systemicons/Youtube.js +31 -0
- package/dist/src/icons/systemicons/Zoom.js +31 -0
- package/dist/src/icons/systemicons/ZoomOut.js +31 -0
- package/dist/src/icons/systemicons/index.js +204 -0
- package/dist/src/index.js +45 -0
- package/dist/src/styles/breakpoints.js +6 -0
- package/dist/src/styles/colors.d.ts +0 -1
- package/dist/src/styles/colors.js +89 -0
- package/dist/src/styles/focus-styles.js +9 -0
- package/dist/src/styles/global.js +13 -0
- package/dist/src/styles/index.d.ts +2 -1
- package/dist/src/styles/index.js +20 -0
- package/dist/src/styles/overwritecolors.d.ts +2 -0
- package/dist/src/styles/overwritecolors.js +12 -0
- package/dist/src/styles/shadowstyles.js +7 -0
- package/dist/src/styles/typography.d.ts +1 -1
- package/dist/src/styles/typography.js +130 -0
- package/dist/src/styles/z-indexes.js +16 -0
- package/dist/src/types.js +51 -0
- package/dist/src/utils/utils.js +3 -0
- package/dist/stories/Accordion/AccordionMenu.stories.d.ts +1 -1
- package/dist/stories/Accordion/AccordionMenu.stories.js +153 -0
- package/dist/stories/Accordion/ContentAccordion.stories.d.ts +1 -1
- package/dist/stories/Accordion/ContentAccordion.stories.js +234 -0
- package/dist/stories/AuthPage.stories.js +88 -0
- package/dist/stories/Banner.stories.d.ts +1 -1
- package/dist/stories/Banner.stories.js +107 -0
- package/dist/stories/Breadcrumb.stories.d.ts +1 -1
- package/dist/stories/Breadcrumb.stories.js +151 -0
- package/dist/stories/Button/BackButton.stories.d.ts +1 -1
- package/dist/stories/Button/BackButton.stories.js +32 -0
- package/dist/stories/Button/Button.stories.d.ts +1 -1
- package/dist/stories/Button/Button.stories.js +499 -0
- package/dist/stories/Button/DualFunctionButton.stories.d.ts +1 -1
- package/dist/stories/Button/DualFunctionButton.stories.js +374 -0
- package/dist/stories/Button/IconButton.stories.d.ts +1 -1
- package/dist/stories/Button/IconButton.stories.js +81 -0
- package/dist/stories/Card/Card.stories.d.ts +1 -1
- package/dist/stories/Card/Card.stories.js +710 -0
- package/dist/stories/Card/HorizontalCard.stories.d.ts +1 -1
- package/dist/stories/Card/HorizontalCard.stories.js +116 -0
- package/dist/stories/Chip/ActionChip.stories.d.ts +1 -1
- package/dist/stories/Chip/ActionChip.stories.js +69 -0
- package/dist/stories/Chip/ChoiceChip.stories.d.ts +1 -1
- package/dist/stories/Chip/ChoiceChip.stories.js +43 -0
- package/dist/stories/Chip/FilterChip.stories.d.ts +1 -1
- package/dist/stories/Chip/FilterChip.stories.js +68 -0
- package/dist/stories/Chip/InputChip.stories.d.ts +1 -1
- package/dist/stories/Chip/InputChip.stories.js +94 -0
- package/dist/stories/Dropdown/BasicDropdown.stories.d.ts +1 -1
- package/dist/stories/Dropdown/BasicDropdown.stories.js +122 -0
- package/dist/stories/Dropdown/ButtonDropdown.stories.d.ts +1 -1
- package/dist/stories/Dropdown/ButtonDropdown.stories.js +165 -0
- package/dist/stories/Dropdown/DropdownFilter.stories.d.ts +1 -1
- package/dist/stories/Dropdown/DropdownFilter.stories.js +81 -0
- package/dist/stories/Footer.stories.js +95 -0
- package/dist/stories/GlobalLoadingPage.stories.js +10 -0
- package/dist/stories/GlobalNavigationBar.stories.js +477 -0
- package/dist/stories/HorizontalTabs.stories.d.ts +1 -1
- package/dist/stories/HorizontalTabs.stories.js +161 -0
- package/dist/stories/Icon.stories.js +86 -0
- package/dist/stories/InputFields/CheckboxDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/CheckboxDemo.stories.js +63 -0
- package/dist/stories/InputFields/ChipInputField.stories.d.ts +1 -1
- package/dist/stories/InputFields/ChipInputField.stories.js +195 -0
- package/dist/stories/InputFields/DatepickerDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/DatepickerDemo.stories.js +54 -0
- package/dist/stories/InputFields/FormDemo.stories.js +47 -0
- package/dist/stories/InputFields/NumberFieldDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/NumberFieldDemo.stories.js +147 -0
- package/dist/stories/InputFields/PasswordDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/PasswordDemo.stories.js +52 -0
- package/dist/stories/InputFields/QuickSearchDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/QuickSearchDemo.stories.js +78 -0
- package/dist/stories/InputFields/RadioButtonDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/RadioButtonDemo.stories.js +52 -0
- package/dist/stories/InputFields/RichTextFieldDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/RichTextFieldDemo.stories.js +74 -0
- package/dist/stories/InputFields/SearchBarDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/SearchBarDemo.stories.js +108 -0
- package/dist/stories/InputFields/TextFieldDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/TextFieldDemo.stories.js +113 -0
- package/dist/stories/InputFields/TextareaDemo.stories.d.ts +1 -1
- package/dist/stories/InputFields/TextareaDemo.stories.js +80 -0
- package/dist/stories/Layout.stories.js +15 -0
- package/dist/stories/LinearProgress.stories.d.ts +1 -1
- package/dist/stories/LinearProgress.stories.js +69 -0
- package/dist/stories/List.stories.d.ts +1 -1
- package/dist/stories/List.stories.js +290 -0
- package/dist/stories/LoadingIndicator.stories.d.ts +1 -1
- package/dist/stories/LoadingIndicator.stories.js +24 -0
- package/dist/stories/MenuItem.stories.d.ts +1 -1
- package/dist/stories/MenuItem.stories.js +101 -0
- package/dist/stories/ModalContent.stories.js +468 -0
- package/dist/stories/ModalDialog.stories.js +862 -0
- package/dist/stories/NavItem.stories.d.ts +1 -1
- package/dist/stories/NavItem.stories.js +18 -0
- package/dist/stories/Notification.stories.d.ts +1 -1
- package/dist/stories/Notification.stories.js +30 -0
- package/dist/stories/Paginator.stories.d.ts +1 -1
- package/dist/stories/Paginator.stories.js +27 -0
- package/dist/stories/Popover.stories.js +836 -0
- package/dist/stories/ProfileButton.stories.d.ts +1 -1
- package/dist/stories/ProfileButton.stories.js +56 -0
- package/dist/stories/QuizButton.stories.d.ts +1 -1
- package/dist/stories/QuizButton.stories.js +128 -0
- package/dist/stories/Scrollbar.stories.js +70 -0
- package/dist/stories/SegmentControl.stories.d.ts +1 -1
- package/dist/stories/SegmentControl.stories.js +89 -0
- package/dist/stories/ShadowStyles.stories.js +24 -0
- package/dist/stories/SideMenu.stories.js +149 -0
- package/dist/stories/Switcher.stories.js +17 -0
- package/dist/stories/Tables.stories.js +436 -0
- package/dist/stories/Tabs.stories.js +92 -0
- package/dist/stories/Tag.stories.d.ts +1 -1
- package/dist/stories/Tag.stories.js +52 -0
- package/dist/stories/Tile.stories.d.ts +1 -1
- package/dist/stories/Tile.stories.js +1618 -0
- package/dist/stories/Toast.stories.d.ts +1 -1
- package/dist/stories/Toast.stories.js +294 -0
- package/dist/stories/ToggleButton.stories.d.ts +1 -1
- package/dist/stories/ToggleButton.stories.js +74 -0
- package/dist/stories/ToggleSwitch.stories.d.ts +1 -1
- package/dist/stories/ToggleSwitch.stories.js +94 -0
- package/dist/stories/Tooltip.stories.d.ts +1 -1
- package/dist/stories/Tooltip.stories.js +88 -0
- package/dist/stories/Typography.stories.js +130 -0
- package/dist/stories/color.stories.js +272 -0
- package/dist/styles/colors.cjs +1 -11
- package/dist/styles/colors.cjs.map +1 -1
- package/dist/styles/colors.js +0 -9
- package/dist/styles/colors.js.map +1 -1
- package/dist/styles/global.d.ts +1 -1
- package/dist/styles/index.cjs +3 -5
- package/dist/styles/index.cjs.map +1 -1
- package/dist/styles/index.d.ts +2 -1
- package/dist/styles/index.js +2 -1
- package/dist/styles/index.js.map +1 -1
- package/dist/styles/overwritecolors.cjs +20 -0
- package/dist/styles/overwritecolors.cjs.map +1 -0
- package/dist/styles/overwritecolors.d.ts +3 -0
- package/dist/styles/overwritecolors.js +12 -0
- package/dist/styles/overwritecolors.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
var __assign = (this && this.__assign) || function () {
|
|
17
|
+
__assign = Object.assign || function(t) {
|
|
18
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
+
s = arguments[i];
|
|
20
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
+
t[p] = s[p];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
};
|
|
25
|
+
return __assign.apply(this, arguments);
|
|
26
|
+
};
|
|
27
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
+
var t = {};
|
|
29
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
+
t[p] = s[p];
|
|
31
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
+
t[p[i]] = s[p[i]];
|
|
35
|
+
}
|
|
36
|
+
return t;
|
|
37
|
+
};
|
|
38
|
+
import { LoadingIndicator } from '..';
|
|
39
|
+
import React from 'react';
|
|
40
|
+
var ImageWithFallbacks = /** @class */ (function (_super) {
|
|
41
|
+
__extends(ImageWithFallbacks, _super);
|
|
42
|
+
function ImageWithFallbacks(props) {
|
|
43
|
+
var _this = this;
|
|
44
|
+
var _a, _b;
|
|
45
|
+
_this = _super.call(this, props) || this;
|
|
46
|
+
_this.state = {
|
|
47
|
+
src: props.src,
|
|
48
|
+
fallbackIndex: 0,
|
|
49
|
+
fallbacks: (_b = (_a = _this.props.fallbacks) === null || _a === void 0 ? void 0 : _a.split('|')) !== null && _b !== void 0 ? _b : [],
|
|
50
|
+
loaded: false,
|
|
51
|
+
};
|
|
52
|
+
return _this;
|
|
53
|
+
}
|
|
54
|
+
ImageWithFallbacks.prototype.componentDidUpdate = function (prevProps) {
|
|
55
|
+
var _a, _b;
|
|
56
|
+
if (prevProps.src !== this.props.src && prevProps.fallbacks !== this.props.fallbacks) {
|
|
57
|
+
this.setState({
|
|
58
|
+
src: this.props.src,
|
|
59
|
+
fallbackIndex: 0,
|
|
60
|
+
fallbacks: (_b = (_a = this.props.fallbacks) === null || _a === void 0 ? void 0 : _a.split('|')) !== null && _b !== void 0 ? _b : [],
|
|
61
|
+
loaded: false,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
ImageWithFallbacks.prototype.onError = function () {
|
|
66
|
+
if (this.state.fallbackIndex > this.state.fallbacks.length) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.setState({
|
|
70
|
+
src: this.state.fallbacks[this.state.fallbackIndex],
|
|
71
|
+
fallbackIndex: this.state.fallbackIndex + 1,
|
|
72
|
+
fallbacks: this.state.fallbacks,
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
ImageWithFallbacks.prototype.onLoad = function () {
|
|
76
|
+
this.setState(__assign(__assign({}, this.state), { loaded: true }));
|
|
77
|
+
};
|
|
78
|
+
ImageWithFallbacks.prototype.render = function () {
|
|
79
|
+
var _this = this;
|
|
80
|
+
var _a = this.props, src = _a.src, alt = _a.alt, fallbacks = _a.fallbacks, loader = _a.loader, loading = _a.loading, rest = __rest(_a, ["src", "alt", "fallbacks", "loader", "loading"]);
|
|
81
|
+
return (React.createElement(React.Fragment, null,
|
|
82
|
+
React.createElement("img", __assign({ src: this.state.src, onError: function () { return _this.onError(); }, onChange: function () { return _this.onLoad(); }, onLoad: function () { return _this.onLoad(); }, alt: this.props.alt }, rest)),
|
|
83
|
+
this.props.loader && !this.state.loaded && React.createElement(LoadingIndicator, { id: "imgWithFallbackLoadingIndicator" })));
|
|
84
|
+
};
|
|
85
|
+
return ImageWithFallbacks;
|
|
86
|
+
}(React.Component));
|
|
87
|
+
export default ImageWithFallbacks;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import * as React from 'react';
|
|
28
|
+
import styled from 'styled-components';
|
|
29
|
+
import { SystemIcons } from '../icons';
|
|
30
|
+
import { COLORS, ComponentTextStyle, focusStyles } from '../styles';
|
|
31
|
+
import { Size } from '../types';
|
|
32
|
+
import { ComponentLStyling, ComponentMStyling, ComponentSStyling } from '../styles/typography';
|
|
33
|
+
import { defaultOnMouseDownHandler } from '../common';
|
|
34
|
+
export var StyledCheckBox = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n width: 100%;\n min-height: 48px;\n min-width: 48px;\n\n ", "\n cursor: pointer;\n\n color: ", ";\n\n .pointerTransparent {\n pointer-events: none;\n }\n\n .checkbox-icon {\n margin: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n height: 36px;\n min-width: 36px;\n border-radius: 50%;\n\n svg {\n color: ", ";\n }\n }\n\n .checkbox-label {\n user-select: none;\n cursor: inherit;\n }\n\n &.small {\n ", "\n .checkbox-label {\n padding-top: 14px;\n }\n }\n\n &.medium {\n ", "\n .checkbox-label {\n padding-top: 12px;\n }\n }\n\n &.large {\n ", "\n .checkbox-label {\n padding-top: 12px;\n }\n }\n\n &:not(.disabled):not(.readonly):focus {\n ", "\n }\n\n &:not(.disabled):not(.readonly):hover {\n .checkbox-icon {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n }\n }\n\n &:not(.disabled):not(.readonly):active {\n .checkbox-icon {\n background: ", ";\n\n svg {\n color: ", ";\n }\n }\n }\n\n &.readonly {\n cursor: inherit;\n\n .checkbox-icon,\n .checkbox-label {\n pointer-events: none;\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n color: ", ";\n\n .checkbox-icon,\n .checkbox-label {\n pointer-events: none;\n }\n\n .checkbox-icon {\n background-color: ", ";\n }\n\n .checkbox-icon svg {\n color: ", ";\n }\n }\n\n &.dropdown-hover:not(.disabled) {\n .checkbox-icon {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n }\n }\n"], ["\n display: flex;\n width: 100%;\n min-height: 48px;\n min-width: 48px;\n\n ", "\n cursor: pointer;\n\n color: ", ";\n\n .pointerTransparent {\n pointer-events: none;\n }\n\n .checkbox-icon {\n margin: 6px;\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n height: 36px;\n min-width: 36px;\n border-radius: 50%;\n\n svg {\n color: ", ";\n }\n }\n\n .checkbox-label {\n user-select: none;\n cursor: inherit;\n }\n\n &.small {\n ", "\n .checkbox-label {\n padding-top: 14px;\n }\n }\n\n &.medium {\n ", "\n .checkbox-label {\n padding-top: 12px;\n }\n }\n\n &.large {\n ", "\n .checkbox-label {\n padding-top: 12px;\n }\n }\n\n &:not(.disabled):not(.readonly):focus {\n ", "\n }\n\n &:not(.disabled):not(.readonly):hover {\n .checkbox-icon {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n }\n }\n\n &:not(.disabled):not(.readonly):active {\n .checkbox-icon {\n background: ", ";\n\n svg {\n color: ", ";\n }\n }\n }\n\n &.readonly {\n cursor: inherit;\n\n .checkbox-icon,\n .checkbox-label {\n pointer-events: none;\n }\n }\n\n &.disabled {\n cursor: not-allowed;\n\n color: ", ";\n\n .checkbox-icon,\n .checkbox-label {\n pointer-events: none;\n }\n\n .checkbox-icon {\n background-color: ", ";\n }\n\n .checkbox-icon svg {\n color: ", ";\n }\n }\n\n &.dropdown-hover:not(.disabled) {\n .checkbox-icon {\n background-color: ", ";\n\n svg {\n color: ", ";\n }\n }\n }\n"])), function (props) { return (props.margin ? "margin: ".concat(props.margin, ";") : ''); }, COLORS.black, function (props) { return (props.selected ? COLORS.primary_500 : props.invalid ? COLORS.critical_400 : COLORS.neutral_600); }, ComponentSStyling(ComponentTextStyle.Regular, COLORS.black), ComponentMStyling(ComponentTextStyle.Regular, COLORS.black), ComponentLStyling(ComponentTextStyle.Regular, COLORS.black), focusStyles, COLORS.primary_20, COLORS.primary_700, COLORS.primary_100, COLORS.primary_800, COLORS.neutral_300, COLORS.white, COLORS.neutral_300, COLORS.primary_20, COLORS.primary_700);
|
|
35
|
+
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
36
|
+
var id = _a.id, selected = _a.selected, select = _a.select, label = _a.label, invalid = _a.invalid, iconPointerEventsTransparent = _a.iconPointerEventsTransparent, disabled = _a.disabled, margin = _a.margin, size = _a.size, semiSelected = _a.semiSelected, children = _a.children, readOnly = _a.readOnly, tabIndexVal = _a.tabIndexVal, dataTestId = _a.dataTestId, className = _a.className, rest = __rest(_a, ["id", "selected", "select", "label", "invalid", "iconPointerEventsTransparent", "disabled", "margin", "size", "semiSelected", "children", "readOnly", "tabIndexVal", "dataTestId", "className"]);
|
|
37
|
+
var onKeyPress = function (e) {
|
|
38
|
+
if (e.keyCode === 13 && !disabled && !readOnly) {
|
|
39
|
+
select && select(!selected);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
var handleClick = function (e) {
|
|
43
|
+
if (disabled || readOnly) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (select) {
|
|
47
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
48
|
+
select(!selected);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
size = size !== null && size !== void 0 ? size : Size.Medium;
|
|
52
|
+
var cls = "".concat(size, " ").concat(className || '', " ").concat(disabled ? ' disabled' : '', " ").concat(readOnly ? ' readonly' : '');
|
|
53
|
+
return (React.createElement(StyledCheckBox, __assign({ key: id, ref: ref, disabled: disabled, className: cls, "aria-checked": selected, selected: selected, tabIndex: disabled || readOnly ? -1 : (tabIndexVal ? tabIndexVal : 0), invalid: invalid, margin: margin, onClick: handleClick, onKeyDown: onKeyPress, onMouseDown: defaultOnMouseDownHandler }, rest),
|
|
54
|
+
React.createElement("div", { id: id, "data-testid": dataTestId, className: 'checkbox-icon' }, selected
|
|
55
|
+
? React.createElement(SystemIcons.CheckboxOn, { className: iconPointerEventsTransparent ? 'pointerTransparent' : '', size: "24px" })
|
|
56
|
+
: semiSelected
|
|
57
|
+
? React.createElement(SystemIcons.CheckboxSemi, { className: iconPointerEventsTransparent ? 'pointerTransparent' : '', size: "24px" })
|
|
58
|
+
: React.createElement(SystemIcons.CheckboxOff, { className: iconPointerEventsTransparent ? 'pointerTransparent' : '', size: "24px" })),
|
|
59
|
+
label &&
|
|
60
|
+
(React.createElement("label", { className: 'checkbox-label', htmlFor: id }, label)),
|
|
61
|
+
!label &&
|
|
62
|
+
React.createElement("label", { className: 'checkbox-label', htmlFor: id }, children)));
|
|
63
|
+
});
|
|
64
|
+
export default Checkbox;
|
|
65
|
+
var templateObject_1;
|
|
@@ -7,7 +7,7 @@ import { Testable } from '../types';
|
|
|
7
7
|
/**
|
|
8
8
|
* Add custom types.
|
|
9
9
|
*/
|
|
10
|
-
export type DatepickerFieldProps = Testable & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'size' | 'onBlur'> & {
|
|
10
|
+
export declare type DatepickerFieldProps = Testable & Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'value' | 'size' | 'onBlur'> & {
|
|
11
11
|
/** Optional. Selected date. Defaults to current date */
|
|
12
12
|
value?: Date;
|
|
13
13
|
/** Optional. Handler to be called when selected date was changed. */
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Import react libraries.
|
|
29
|
+
*/
|
|
30
|
+
import React from 'react';
|
|
31
|
+
/**
|
|
32
|
+
* Import third-party libraries.
|
|
33
|
+
*/
|
|
34
|
+
import styled from 'styled-components';
|
|
35
|
+
import DatePicker from 'react-datepicker';
|
|
36
|
+
import en from 'date-fns/locale/en-GB';
|
|
37
|
+
import dayjs from 'dayjs';
|
|
38
|
+
import advancedFormat from 'dayjs/plugin/advancedFormat';
|
|
39
|
+
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
40
|
+
dayjs.extend(advancedFormat);
|
|
41
|
+
dayjs.extend(quarterOfYear);
|
|
42
|
+
/**
|
|
43
|
+
* Import custom components.
|
|
44
|
+
*/
|
|
45
|
+
import COLORS from '../styles/colors';
|
|
46
|
+
import { SystemIcons } from '../icons';
|
|
47
|
+
import { DatepickerFieldHeader } from './DatepickerFieldHeader';
|
|
48
|
+
import { ComponentTextStyle, focusStyles, scrollBarStyling } from '../styles';
|
|
49
|
+
import TooltipOverflow from '../Tooltips/TooltipOverflow';
|
|
50
|
+
/**
|
|
51
|
+
* Import custom styles.
|
|
52
|
+
*/
|
|
53
|
+
import { ErrorMessage, InputFieldStyling, InputWrapper } from './styling';
|
|
54
|
+
import 'react-datepicker/dist/react-datepicker.css';
|
|
55
|
+
import { ComponentMStyling, ComponentSStyling } from '../styles';
|
|
56
|
+
import { Z_INDEXES } from '../styles';
|
|
57
|
+
import { useFocusVisibleRef } from '../common';
|
|
58
|
+
import { Size } from '../types';
|
|
59
|
+
/**
|
|
60
|
+
* Add custom styles.
|
|
61
|
+
*/
|
|
62
|
+
var DatePickerContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .react-datepicker-popper {\n z-index: ", ";\n }\n\n .react-datepicker-popper[data-placement^=bottom] {\n padding-top: 0px;\n }\n\n \n .react-datepicker-popper[data-placement^=top] {\n padding-bottom: 0px;\n }\n\n > div {\n display: block;\n\n ", "\n .react-datepicker {\n box-sizing: border-box;\n box-shadow: 0px 2px 4px rgb(0 0 0 / 15%);\n border: 1px solid #e5e5e5;\n }\n .react-datepicker__input-container{\n z-index: 0;\n }\n\n .react-datepicker__navigation {\n line-height: normal;\n text-indent: inherit;\n border: none;\n border-radius: 4px;\n height: 48px;\n width: 48px;\n outline: none;\n margin: 0px;\n color: transparent;\n\n &:hover {\n background: ", ";\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n }\n\n &:focus {\n ", "\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n }\n\n &::before {\n text-align: center;\n display: inline-block;\n content: '';\n height: 32px;\n width: 32px;\n vertical-align: middle;\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n }\n\n .react-datepicker__month-container,\n .react-datepicker__year--container {\n width: 336px;\n }\n\n .react-datepicker__month {\n margin: 0px;\n }\n\n .react-datepicker__triangle {\n left: 50% !important;\n display: none;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] {\n margin-top: 0;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle {\n border-bottom-color: ", ";\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ", ";\n background: ", ";\n height: ", ";\n padding-top: 0px;\n }\n\n .react-datepicker-year-header {\n height: 48px;\n line-height: 48px !important;\n align-items: center;\n\n ", "\n }\n\n .react-datepicker__current-month {\n height: 48px;\n display: inline-flex;\n align-items: center;\n margin-right: 5px;\n\n ", "\n }\n\n .react-datepicker__year {\n max-height: 300px;\n overflow-y: scroll;\n\n ", "\n }\n\n .react-datepicker__quarter-wrapper{\n width: 100%;\n display: flex;\n align-content: space-evenly;\n flex-wrap: wrap;\n align-items: center;\n gap: 20px;\n }\n\n .react-datepicker__year-wrapper {\n max-width: 100%;\n justify-content: space-around;\n }\n\n .react-datepicker__navigation-icon {\n display: none;\n }\n\n .react-datepicker__day-name {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n margin: 0px;\n width: 48px;\n\n ", "\n }\n\n \n\n .react-datepicker__year-text {\n background: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-top: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n\n ", "\n &.react-datepicker__year-text--disabled {\n display: none;\n }\n\n &.react-datepicker__day--keyboard-selected {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &.react-datepicker__year-text--selected {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .react-datepicker__day, .react-datepicker__quarter-text {\n background: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n height: 40px;\n width: 40px;\n margin: 4px;\n\n ", "\n &.react-datepicker__day--keyboard-selected, .react-datepicker__quarter-text--keyboard-selected {\n color: ", ";\n background: ", ";\n flex-grow: 1;\n font-weight: 400;\n border: none;\n }\n\n &.react-datepicker__quarter--selected {\n color: ", " !important;\n flex-grow: 1;\n background: ", " !important;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &.react-datepicker__day--selected {\n color: ", " !important;\n background: ", " !important;\n }\n\n &.react-datepicker__day--today {\n border-radius: 0.3rem;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n ", "\n }\n }\n }\n }\n"], ["\n .react-datepicker-popper {\n z-index: ", ";\n }\n\n .react-datepicker-popper[data-placement^=bottom] {\n padding-top: 0px;\n }\n\n \n .react-datepicker-popper[data-placement^=top] {\n padding-bottom: 0px;\n }\n\n > div {\n display: block;\n\n ", "\n .react-datepicker {\n box-sizing: border-box;\n box-shadow: 0px 2px 4px rgb(0 0 0 / 15%);\n border: 1px solid #e5e5e5;\n }\n .react-datepicker__input-container{\n z-index: 0;\n }\n\n .react-datepicker__navigation {\n line-height: normal;\n text-indent: inherit;\n border: none;\n border-radius: 4px;\n height: 48px;\n width: 48px;\n outline: none;\n margin: 0px;\n color: transparent;\n\n &:hover {\n background: ", ";\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23215369' /%3E%3C/svg%3E\");\n }\n }\n\n &:focus {\n ", "\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23163746' /%3E%3C/svg%3E\");\n }\n }\n\n &::before {\n text-align: center;\n display: inline-block;\n content: '';\n height: 32px;\n width: 32px;\n vertical-align: middle;\n }\n\n &.react-datepicker__navigation--next::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M9.24214 19.8807C8.85113 19.4907 8.85034 18.8575 9.24038 18.4665L15.5184 12.1727L9.24037 5.87895C8.85034 5.48794 8.85113 4.85478 9.24214 4.46474C9.63315 4.0747 10.2663 4.07549 10.6564 4.46651L17.6389 11.4665C18.0282 11.8568 18.0282 12.4886 17.6389 12.879L10.6564 19.879C10.2663 20.27 9.63316 20.2708 9.24214 19.8807Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n\n &.react-datepicker__navigation--previous::before {\n background-image: url(\"data:image/svg+xml,%3Csvg style='width: 32px; height: 32px;' viewBox='0 0 25 25' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fillRule='evenodd' clipRule='evenodd' d='M15.1975 4.46474C15.5885 4.85478 15.5893 5.48794 15.1993 5.87895L8.92124 12.1727L15.1993 18.4665C15.5893 18.8575 15.5885 19.4907 15.1975 19.8807C14.8065 20.2708 14.1734 20.27 13.7833 19.879L6.8008 12.879C6.41145 12.4886 6.41145 11.8568 6.8008 11.4665L13.7833 4.46651C14.1734 4.0755 14.8065 4.0747 15.1975 4.46474Z' fill='%23666666' /%3E%3C/svg%3E\");\n }\n }\n\n .react-datepicker__month-container,\n .react-datepicker__year--container {\n width: 336px;\n }\n\n .react-datepicker__month {\n margin: 0px;\n }\n\n .react-datepicker__triangle {\n left: 50% !important;\n display: none;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] {\n margin-top: 0;\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle {\n border-bottom-color: ", ";\n }\n\n .react-datepicker__header {\n border-bottom: 1px solid ", ";\n background: ", ";\n height: ", ";\n padding-top: 0px;\n }\n\n .react-datepicker-year-header {\n height: 48px;\n line-height: 48px !important;\n align-items: center;\n\n ", "\n }\n\n .react-datepicker__current-month {\n height: 48px;\n display: inline-flex;\n align-items: center;\n margin-right: 5px;\n\n ", "\n }\n\n .react-datepicker__year {\n max-height: 300px;\n overflow-y: scroll;\n\n ", "\n }\n\n .react-datepicker__quarter-wrapper{\n width: 100%;\n display: flex;\n align-content: space-evenly;\n flex-wrap: wrap;\n align-items: center;\n gap: 20px;\n }\n\n .react-datepicker__year-wrapper {\n max-width: 100%;\n justify-content: space-around;\n }\n\n .react-datepicker__navigation-icon {\n display: none;\n }\n\n .react-datepicker__day-name {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n height: 48px;\n margin: 0px;\n width: 48px;\n\n ", "\n }\n\n \n\n .react-datepicker__year-text {\n background: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n margin-top: 20px;\n padding-top: 10px;\n padding-bottom: 10px;\n\n ", "\n &.react-datepicker__year-text--disabled {\n display: none;\n }\n\n &.react-datepicker__day--keyboard-selected {\n color: ", ";\n background: ", ";\n font-weight: 400;\n border: none;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &.react-datepicker__year-text--selected {\n color: ", " !important;\n background: ", " !important;\n }\n }\n\n .react-datepicker__day, .react-datepicker__quarter-text {\n background: ", ";\n border: none;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n flex-grow: 1;\n height: 40px;\n width: 40px;\n margin: 4px;\n\n ", "\n &.react-datepicker__day--keyboard-selected, .react-datepicker__quarter-text--keyboard-selected {\n color: ", ";\n background: ", ";\n flex-grow: 1;\n font-weight: 400;\n border: none;\n }\n\n &.react-datepicker__quarter--selected {\n color: ", " !important;\n flex-grow: 1;\n background: ", " !important;\n }\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n ", "\n }\n\n &.react-datepicker__day--selected {\n color: ", " !important;\n background: ", " !important;\n }\n\n &.react-datepicker__day--today {\n border-radius: 0.3rem;\n color: ", ";\n background: ", ";\n\n &:hover {\n color: ", ";\n background: ", ";\n }\n\n &:focus {\n ", "\n }\n }\n }\n }\n"])), Z_INDEXES.dropdown, function (props) { return (props.margin ? "margin: ".concat(props.margin, ";") : ''); }, COLORS.primary_20, focusStyles, COLORS.neutral_20, COLORS.neutral_200, COLORS.neutral_20, function (props) { return (!props.yearPicker ? '96px' : '54px'); }, ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600), ComponentSStyling(ComponentTextStyle.Bold, COLORS.neutral_600), scrollBarStyling(Size.Small), ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), COLORS.white, ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), COLORS.neutral_600, COLORS.white, COLORS.primary_700, COLORS.primary_20, focusStyles, COLORS.white, COLORS.primary_500, COLORS.white, ComponentMStyling(ComponentTextStyle.Regular, COLORS.neutral_600), COLORS.neutral_600, COLORS.white, COLORS.white, COLORS.primary_500, COLORS.primary_700, COLORS.primary_20, focusStyles, COLORS.white, COLORS.primary_500, COLORS.neutral_700, COLORS.neutral_100, COLORS.primary_700, COLORS.primary_20, focusStyles);
|
|
63
|
+
var IconWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n pointer-events: none;\n position: absolute;\n left: 16px;\n width: 24px;\n height: 24px;\n z-index: ", ";\n"], ["\n pointer-events: none;\n position: absolute;\n left: 16px;\n width: 24px;\n height: 24px;\n z-index: ", ";\n"])), +Z_INDEXES.focus + 1);
|
|
64
|
+
var DatepickerRow = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n align-items: center;\n"], ["\n display: flex;\n flex-direction: row;\n align-items: center;\n"])));
|
|
65
|
+
var StyledInputFieldStyling = styled(InputFieldStyling)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding-left: 48px !important;\n \n &::placeholder {\n color: ", ";\n }\n\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n }\n\n &:active,\n &.open {\n box-shadow: inset 0px 0px 0px 2px ", ";\n background-color: ", ";\n color: ", ";\n\n ::placeholder {\n color: ", ";\n }\n }\n \n &:disabled {\n background-color: ", ";\n }\n\n & ~ ", "{\n color: ", ";\n }\n\n &:hover ~ ", " {\n color: ", ";\n }\n\n &:active ~ ", ", &.open ~ ", " {\n color: ", ";\n }\n\n &[tabindex='-1'] ~ ", " {\n color: ", ";\n }\n"], ["\n padding-left: 48px !important;\n \n &::placeholder {\n color: ", ";\n }\n\n &:focus:not(.focus-visible) {\n box-shadow: inset 0px 0px 0px 2px ", ";\n }\n\n &:hover {\n box-shadow: inset 0px 0px 0px 2px ", ";\n\n ::placeholder {\n color: ", ";\n }\n\n cursor: pointer;\n background-color: ", ";\n color: ", ";\n }\n\n &:active,\n &.open {\n box-shadow: inset 0px 0px 0px 2px ", ";\n background-color: ", ";\n color: ", ";\n\n ::placeholder {\n color: ", ";\n }\n }\n \n &:disabled {\n background-color: ", ";\n }\n\n & ~ ", "{\n color: ", ";\n }\n\n &:hover ~ ", " {\n color: ", ";\n }\n\n &:active ~ ", ", &.open ~ ", " {\n color: ", ";\n }\n\n &[tabindex='-1'] ~ ", " {\n color: ", ";\n }\n"])), COLORS.neutral_500, COLORS.primary_300, COLORS.primary_200, COLORS.primary_700, COLORS.primary_20, COLORS.primary_700, COLORS.primary_300, COLORS.primary_100, COLORS.primary_800, COLORS.primary_800, COLORS.white, IconWrapper, COLORS.neutral_600, IconWrapper, COLORS.primary_700, IconWrapper, IconWrapper, COLORS.primary_800, IconWrapper, COLORS.neutral_300);
|
|
66
|
+
var quarterComponentsClassPrefix = 'react-datepicker__quarter-';
|
|
67
|
+
var DatepickerField = React.forwardRef(function (_a, ref) {
|
|
68
|
+
var disabled = _a.disabled, readOnly = _a.readOnly, onChange = _a.onChange, invalid = _a.invalid, value = _a.value, validationMessage = _a.validationMessage, dateFormat = _a.dateFormat, autoComplete = _a.autoComplete, placeholder = _a.placeholder, required = _a.required, yearPicker = _a.yearPicker, yearsBeforeCurrentDate = _a.yearsBeforeCurrentDate, yearsAfterCurrentDate = _a.yearsAfterCurrentDate, margin = _a.margin, overflowTooltipPosition = _a.overflowTooltipPosition, onBlur = _a.onBlur, showQuarterYearPicker = _a.showQuarterYearPicker, id = _a.id, dataTestId = _a.dataTestId, rest = __rest(_a, ["disabled", "readOnly", "onChange", "invalid", "value", "validationMessage", "dateFormat", "autoComplete", "placeholder", "required", "yearPicker", "yearsBeforeCurrentDate", "yearsAfterCurrentDate", "margin", "overflowTooltipPosition", "onBlur", "showQuarterYearPicker", "id", "dataTestId"]);
|
|
69
|
+
// Globally used variables within the component
|
|
70
|
+
var inputRef = useFocusVisibleRef();
|
|
71
|
+
var datepickerRef = React.useRef(null);
|
|
72
|
+
var focusedQuarterRef = React.useRef(1);
|
|
73
|
+
var _b = React.useState(-1), activeMonthPage = _b[0], setActiveMonthPage = _b[1];
|
|
74
|
+
var _c = React.useState(false), yearPickerMode = _c[0], setYearPickerMode = _c[1];
|
|
75
|
+
var _d = React.useState(null), openAt = _d[0], setOpenAt = _d[1];
|
|
76
|
+
// 'open' flag is used only for tracking current state of the dropdown,
|
|
77
|
+
// for explicitly opening/closing the picker we are using 'datepickerRef.current.setOpen'
|
|
78
|
+
var _e = React.useState(false), open = _e[0], setOpen = _e[1];
|
|
79
|
+
var getFormattedValue = function () {
|
|
80
|
+
if (showQuarterYearPicker) {
|
|
81
|
+
var val = dayjs(value);
|
|
82
|
+
return val.year() + ', Q' + val.quarter();
|
|
83
|
+
}
|
|
84
|
+
else
|
|
85
|
+
return dayjs(value).format(dateFormat ? dateFormat : 'MMMM Do, YYYY');
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Format the date in a specific way.
|
|
89
|
+
*/
|
|
90
|
+
React.useEffect(function () {
|
|
91
|
+
if (value)
|
|
92
|
+
inputRef.current.value = getFormattedValue();
|
|
93
|
+
}, [value]);
|
|
94
|
+
function getQuarterItem(classname) {
|
|
95
|
+
return document.getElementsByClassName(quarterComponentsClassPrefix + classname)[0];
|
|
96
|
+
}
|
|
97
|
+
React.useEffect(function () {
|
|
98
|
+
var _a;
|
|
99
|
+
if (yearPickerMode) {
|
|
100
|
+
//unfortunately, since there are no refs, and year pickers is rendered not by our code, but by 'react-datepicker'
|
|
101
|
+
//we have to touch DOM directly
|
|
102
|
+
var selectedDate = document.getElementsByClassName('react-datepicker__year-text--selected')[0];
|
|
103
|
+
var dropdownParent = (_a = selectedDate === null || selectedDate === void 0 ? void 0 : selectedDate.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
104
|
+
if (selectedDate && dropdownParent)
|
|
105
|
+
dropdownParent.scrollTop = selectedDate.offsetTop - 2 * selectedDate.offsetHeight;
|
|
106
|
+
}
|
|
107
|
+
}, [yearPickerMode]);
|
|
108
|
+
React.useEffect(function () {
|
|
109
|
+
if (showQuarterYearPicker && open) {
|
|
110
|
+
var wrapper_1 = getQuarterItem('wrapper');
|
|
111
|
+
var handler_1 = function (event) {
|
|
112
|
+
switch (event.key) {
|
|
113
|
+
case ' ':
|
|
114
|
+
case 'Enter':
|
|
115
|
+
var currentQ = getQuarterItem(focusedQuarterRef.current + '');
|
|
116
|
+
currentQ.click();
|
|
117
|
+
break;
|
|
118
|
+
case 'ArrowLeft':
|
|
119
|
+
if (focusedQuarterRef.current > 1) {
|
|
120
|
+
var currentQ_1 = getQuarterItem(focusedQuarterRef.current + '');
|
|
121
|
+
var previousQ = getQuarterItem((focusedQuarterRef.current - 1) + '');
|
|
122
|
+
if (previousQ) {
|
|
123
|
+
currentQ_1.tabIndex = -1;
|
|
124
|
+
previousQ.tabIndex = 0;
|
|
125
|
+
previousQ.focus();
|
|
126
|
+
focusedQuarterRef.current = focusedQuarterRef.current - 1;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
130
|
+
case 'ArrowRight':
|
|
131
|
+
if (focusedQuarterRef.current < 4) {
|
|
132
|
+
var currentQ_2 = getQuarterItem(focusedQuarterRef.current + '');
|
|
133
|
+
var nextQ = getQuarterItem((focusedQuarterRef.current + 1) + '');
|
|
134
|
+
if (nextQ) {
|
|
135
|
+
currentQ_2.tabIndex = -1;
|
|
136
|
+
nextQ.tabIndex = 0;
|
|
137
|
+
nextQ.focus();
|
|
138
|
+
focusedQuarterRef.current = focusedQuarterRef.current + 1;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
wrapper_1.addEventListener('keydown', handler_1);
|
|
145
|
+
//unfortunately since there are no efs, and quarter picker is rendered not by our code, but by 'react-datepicker'
|
|
146
|
+
//we have to touch DOM directly
|
|
147
|
+
var selectedQuarter = getQuarterItem('-selected');
|
|
148
|
+
if (selectedQuarter) {
|
|
149
|
+
for (var i = 1; i < 5; i++) {
|
|
150
|
+
if (selectedQuarter.innerText.includes('Q' + i)) {
|
|
151
|
+
focusedQuarterRef.current = i;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
selectedQuarter.setAttribute("tabIndex", "0");
|
|
156
|
+
}
|
|
157
|
+
else {
|
|
158
|
+
var firstQuarter = getQuarterItem('1');
|
|
159
|
+
if (firstQuarter) {
|
|
160
|
+
focusedQuarterRef.current = 1;
|
|
161
|
+
firstQuarter.setAttribute("tabIndex", "0");
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return function () {
|
|
165
|
+
wrapper_1.removeEventListener('keydown', handler_1);
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
}, [showQuarterYearPicker, open]);
|
|
169
|
+
//we have to manually reopen the calendar when needed, to guarantee that datepicker will show selected date after year selection
|
|
170
|
+
//otherwise after year selection datepicker will show January month of the selected year
|
|
171
|
+
React.useEffect(function () {
|
|
172
|
+
if (openAt) {
|
|
173
|
+
datepickerRef.current.setOpen(true);
|
|
174
|
+
//setOpenAt(null);
|
|
175
|
+
}
|
|
176
|
+
}, [openAt]);
|
|
177
|
+
React.useImperativeHandle(ref, function () { return inputRef.current; }, [inputRef]);
|
|
178
|
+
var handleCalendarClose = function () {
|
|
179
|
+
var _a;
|
|
180
|
+
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
181
|
+
setOpen(false);
|
|
182
|
+
};
|
|
183
|
+
var handleCalendarOpen = function () {
|
|
184
|
+
if (openAt)
|
|
185
|
+
setOpenAt(null);
|
|
186
|
+
setOpen(true);
|
|
187
|
+
};
|
|
188
|
+
var maxDate = new Date(value && new Date(value) > new Date() ? new Date(value) : new Date());
|
|
189
|
+
maxDate.setFullYear(maxDate.getFullYear() + (yearsAfterCurrentDate !== null && yearsAfterCurrentDate !== void 0 ? yearsAfterCurrentDate : 50));
|
|
190
|
+
//itemsNumber - controls number of year select options generated in the dropdown
|
|
191
|
+
//items related to dates higher than 'maxDate' will be hidden, thus to avoid creating hundreds of invisible divs, we divide by 5
|
|
192
|
+
var minDate = new Date(value && new Date(value) < new Date() ? new Date(value) : new Date());
|
|
193
|
+
var itemsNumber = Math.round((minDate.getFullYear() - (yearsBeforeCurrentDate !== null && yearsBeforeCurrentDate !== void 0 ? yearsBeforeCurrentDate : 15)) / 5);
|
|
194
|
+
var handleKeyDown = function (e) {
|
|
195
|
+
if (e.key === 'Escape' || e.key === 'Esc')
|
|
196
|
+
datepickerRef.current.setOpen(false);
|
|
197
|
+
};
|
|
198
|
+
var handleBlur = function (e) {
|
|
199
|
+
// @ts-ignore
|
|
200
|
+
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
201
|
+
onBlur && onBlur(e);
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
var iconSize = 24;
|
|
205
|
+
return (React.createElement(React.Fragment, null,
|
|
206
|
+
React.createElement(DatePickerContainer, { quarterPicker: showQuarterYearPicker, "data-testid": dataTestId, yearPicker: yearPickerMode, margin: margin || '', onBlur: handleBlur },
|
|
207
|
+
React.createElement(DatePicker, { ref: datepickerRef, onCalendarOpen: handleCalendarOpen, onCalendarClose: handleCalendarClose, onKeyDown: handleKeyDown, id: id, onClickOutside: function () { return datepickerRef.current.setOpen(false); }, onChange: function (e) {
|
|
208
|
+
if (onChange) {
|
|
209
|
+
if (yearPickerMode) {
|
|
210
|
+
var newDate = new Date();
|
|
211
|
+
newDate.setFullYear(e.getFullYear());
|
|
212
|
+
newDate.setMonth(activeMonthPage);
|
|
213
|
+
setOpenAt(newDate);
|
|
214
|
+
}
|
|
215
|
+
else
|
|
216
|
+
onChange(e);
|
|
217
|
+
}
|
|
218
|
+
if (yearPickerMode)
|
|
219
|
+
setYearPickerMode(false);
|
|
220
|
+
}, disabled: disabled || readOnly, locale: en, showQuarterYearPicker: showQuarterYearPicker, dateFormat: showQuarterYearPicker ? "yyyy, QQQ" : undefined, showYearPicker: yearPickerMode,
|
|
221
|
+
//we manipulate 'yearItemNumber' and 'maxDate' to guarantee number of year select options shown before and after selected year
|
|
222
|
+
yearItemNumber: yearPickerMode ? itemsNumber : undefined, maxDate: yearPickerMode ? maxDate : undefined, selected: value, openToDate: openAt !== null && openAt !== void 0 ? openAt : undefined, preventOpenOnFocus: true, shouldCloseOnSelect: true, renderCustomHeader: yearPicker
|
|
223
|
+
? function (params) {
|
|
224
|
+
return React.createElement(DatepickerFieldHeader, __assign(__assign({}, params), { setActiveMonthPage: setActiveMonthPage, customHeaderCount: 0, yearPickerMode: yearPickerMode, setYearPickerMode: setYearPickerMode }), null);
|
|
225
|
+
}
|
|
226
|
+
: undefined, customInput: React.createElement(InputWrapper, { disabled: disabled, readOnly: readOnly },
|
|
227
|
+
React.createElement(DatepickerRow, null,
|
|
228
|
+
React.createElement(StyledInputFieldStyling, __assign({ ref: inputRef, type: "text", name: "datepicker", onKeyDown: function (e) { return e.key === 'Enter' && datepickerRef.current.setOpen(true); }, className: (invalid ? 'invalid' : '' + (open ? ' open' : '')), tabIndex: disabled || readOnly ? -1 : 0, onFocus: function (e) { var _a; return (_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.setSelectionRange(0, 0); }, autoComplete: autoComplete, placeholder: placeholder, extraRightPadding: iconSize, disabled: disabled, readOnly: true, suppressReadOnlyStyles: !readOnly, required: required }, rest)),
|
|
229
|
+
React.createElement(IconWrapper, null,
|
|
230
|
+
React.createElement(SystemIcons.Calendar, { size: "24" }))),
|
|
231
|
+
!open && React.createElement(TooltipOverflow, { position: overflowTooltipPosition, input: inputRef, withArrow: true, maxWidth: "100%", size: Size.Small, align: 'end' }, getFormattedValue())) })),
|
|
232
|
+
validationMessage && (React.createElement(ErrorMessage, null,
|
|
233
|
+
React.createElement(SystemIcons.TechnicalWarning, { color: COLORS.critical_400 }),
|
|
234
|
+
React.createElement("span", null, validationMessage)))));
|
|
235
|
+
});
|
|
236
|
+
export default DatepickerField;
|
|
237
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Import react libraries.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { SystemIcons } from '../icons';
|
|
10
|
+
import styled from 'styled-components';
|
|
11
|
+
import { CommonInteractionStyling } from '../common';
|
|
12
|
+
import { COLORS } from '../styles';
|
|
13
|
+
var HeaderLabelContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ", ";\n }\n\n ", "\n\n &:hover {\n div {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n }\n\n &:active {\n div {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding-left: 10px;\n cursor: pointer;\n\n button {\n background: transparent;\n padding: 0px;\n width: auto;\n }\n\n svg {\n color: ", ";\n }\n\n ", "\n\n &:hover {\n div {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n }\n\n &:active {\n div {\n color: ", " !important;\n }\n svg {\n color: ", ";\n }\n }\n"])), COLORS.neutral_600, CommonInteractionStyling, COLORS.primary_600, COLORS.primary_600, COLORS.primary_600, COLORS.primary_600);
|
|
14
|
+
export var DatepickerFieldHeader = function (_a) {
|
|
15
|
+
var date = _a.date, decreaseMonth = _a.decreaseMonth, increaseMonth = _a.increaseMonth, prevMonthButtonDisabled = _a.prevMonthButtonDisabled, nextMonthButtonDisabled = _a.nextMonthButtonDisabled, setYearPickerMode = _a.setYearPickerMode, yearPickerMode = _a.yearPickerMode, setActiveMonthPage = _a.setActiveMonthPage;
|
|
16
|
+
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
|
|
17
|
+
var handleDecreaseMonth = function () {
|
|
18
|
+
var previousMonth = date.getMonth() - 1;
|
|
19
|
+
if (previousMonth < 0)
|
|
20
|
+
previousMonth = months.length - 1;
|
|
21
|
+
setActiveMonthPage(previousMonth);
|
|
22
|
+
decreaseMonth();
|
|
23
|
+
};
|
|
24
|
+
var handleIncreaseMonth = function () {
|
|
25
|
+
var nextMonth = date.getMonth() + 1;
|
|
26
|
+
if (nextMonth >= months.length - 1)
|
|
27
|
+
nextMonth = 0;
|
|
28
|
+
setActiveMonthPage(nextMonth);
|
|
29
|
+
increaseMonth();
|
|
30
|
+
};
|
|
31
|
+
React.useEffect(function () {
|
|
32
|
+
setActiveMonthPage(date.getMonth());
|
|
33
|
+
}, [date]);
|
|
34
|
+
return (React.createElement(React.Fragment, null,
|
|
35
|
+
React.createElement("div", { style: {
|
|
36
|
+
display: 'flex',
|
|
37
|
+
justifyContent: 'center',
|
|
38
|
+
} },
|
|
39
|
+
!yearPickerMode && (React.createElement("button", { type: "button", className: "react-datepicker__navigation react-datepicker__navigation--previous", onClick: handleDecreaseMonth, disabled: prevMonthButtonDisabled })),
|
|
40
|
+
React.createElement(HeaderLabelContainer, { onClick: function () { return setYearPickerMode(!yearPickerMode); } },
|
|
41
|
+
React.createElement("div", { className: "react-datepicker__current-month" }, "".concat(months[date.getMonth()], " ").concat(date.getFullYear())),
|
|
42
|
+
yearPickerMode ? React.createElement(SystemIcons.ArrowDropUp, { size: "24px" }) : React.createElement(SystemIcons.ArrowDropDown, { size: "24px" })),
|
|
43
|
+
!yearPickerMode && (React.createElement("button", { type: "button", className: "react-datepicker__navigation react-datepicker__navigation--next", onClick: handleIncreaseMonth, disabled: nextMonthButtonDisabled })))));
|
|
44
|
+
};
|
|
45
|
+
var templateObject_1;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Import React libraries.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
/**
|
|
10
|
+
* Import custom styles.
|
|
11
|
+
*/
|
|
12
|
+
import { BREAKPOINTS, COLORS } from '../styles';
|
|
13
|
+
import { Size } from '../types';
|
|
14
|
+
/**
|
|
15
|
+
* Import third-party libraries.
|
|
16
|
+
*/
|
|
17
|
+
import styled from 'styled-components';
|
|
18
|
+
import { ComponentXS, ComponentXSStyling, ComponentXXS, ComponentXXSStyling, TypographyBase } from '../styles/typography';
|
|
19
|
+
import { SystemIcons } from '../icons';
|
|
20
|
+
// Add component-specific styles.
|
|
21
|
+
var Label = styled.label(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n\n ", " {\n ", "\n }\n\n &.small {\n ", "\n }\n &.medium {\n ", "\n }\n\n pointer-events: none;\n"], ["\n ", "\n\n ", " {\n ", "\n }\n\n &.small {\n ", "\n }\n &.medium {\n ", "\n }\n\n pointer-events: none;\n"])), ComponentXXSStyling(1, COLORS.neutral_500), BREAKPOINTS.MEDIUM, ComponentXSStyling(1, COLORS.neutral_500), ComponentXXSStyling(1, COLORS.neutral_500), ComponentXSStyling(1, COLORS.neutral_500));
|
|
22
|
+
var LabelRow = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n height: 16px;\n margin-bottom: 4px;\n"], ["\n display: flex;\n align-items: flex-start;\n height: 16px;\n margin-bottom: 4px;\n"])));
|
|
23
|
+
var CopyContainer = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-left: auto;\n\n &:visited:not(.disabled) {\n ", "\n {\n color: ", ";\n }\n }\n\n &:hover:not(.disabled),\n &.hover-state:not(.disabled) {\n ", "\n {\n color: ", ";\n text-decoration-line: underline;\n }\n }\n\n &:focus:not(.disabled),\n &.focus-state:not(.disabled) {\n ", "\n {\n color: ", ";\n background-color: white;\n text-decoration-line: underline;\n }\n }\n\n &:active:not(.disabled),\n &.active-state:not(.disabled) {\n ", "\n {\n color: ", ";\n background-color: white;\n text-decoration-line: underline;\n }\n }\n\n &:not(.disabled)\n {\n ", "\n {\n outline: none;\n padding: 2px 0;\n text-decoration-style: solid;\n text-decoration-line: none;\n font-weight: 700;\n color: ", ";\n }\n }\n\n &.disabled\n {\n ", "\n {\n outline: none;\n padding: 2px 0;\n text-decoration-style: solid;\n text-decoration-line: none;\n font-weight: 700;\n color: ", ";\n }\n }\n cursor: pointer;\n"], ["\n margin-left: auto;\n\n &:visited:not(.disabled) {\n ", "\n {\n color: ", ";\n }\n }\n\n &:hover:not(.disabled),\n &.hover-state:not(.disabled) {\n ", "\n {\n color: ", ";\n text-decoration-line: underline;\n }\n }\n\n &:focus:not(.disabled),\n &.focus-state:not(.disabled) {\n ", "\n {\n color: ", ";\n background-color: white;\n text-decoration-line: underline;\n }\n }\n\n &:active:not(.disabled),\n &.active-state:not(.disabled) {\n ", "\n {\n color: ", ";\n background-color: white;\n text-decoration-line: underline;\n }\n }\n\n &:not(.disabled)\n {\n ", "\n {\n outline: none;\n padding: 2px 0;\n text-decoration-style: solid;\n text-decoration-line: none;\n font-weight: 700;\n color: ", ";\n }\n }\n\n &.disabled\n {\n ", "\n {\n outline: none;\n padding: 2px 0;\n text-decoration-style: solid;\n text-decoration-line: none;\n font-weight: 700;\n color: ", ";\n }\n }\n cursor: pointer;\n"])), TypographyBase, COLORS.primary_800, TypographyBase, COLORS.primary_700, TypographyBase, COLORS.primary_700, TypographyBase, COLORS.primary_700, TypographyBase, COLORS.primary_600, TypographyBase, COLORS.neutral_300);
|
|
24
|
+
var LabelRowInner = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n align-items: center;\n"], ["\n display: flex;\n flex-direction: row;\n width: 100%;\n height: 100%;\n align-items: center;\n"])));
|
|
25
|
+
var CopyState;
|
|
26
|
+
(function (CopyState) {
|
|
27
|
+
CopyState[CopyState["Disabled"] = 0] = "Disabled";
|
|
28
|
+
CopyState[CopyState["Available"] = 1] = "Available";
|
|
29
|
+
CopyState[CopyState["Copied"] = 2] = "Copied";
|
|
30
|
+
})(CopyState || (CopyState = {}));
|
|
31
|
+
var InputLabel = function (_a) {
|
|
32
|
+
var inputId = _a.inputId, text = _a.text, size = _a.size, margin = _a.margin, requiredProp = _a.required, showCopyButton = _a.showCopyButton;
|
|
33
|
+
// Globally used variables within the component
|
|
34
|
+
var _b = React.useState(false), required = _b[0], setRequired = _b[1];
|
|
35
|
+
var _c = React.useState(CopyState.Available), copyState = _c[0], setCopyState = _c[1];
|
|
36
|
+
/**
|
|
37
|
+
* Checks if field is set as required and we have to mark it accordingly.
|
|
38
|
+
*/
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
var _a;
|
|
41
|
+
if (requiredProp === undefined) {
|
|
42
|
+
if (((_a = document.getElementById(inputId)) === null || _a === void 0 ? void 0 : _a.getAttribute('required')) === '') {
|
|
43
|
+
setRequired(true);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
setRequired(false);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else
|
|
50
|
+
setRequired(Boolean(requiredProp));
|
|
51
|
+
}, []);
|
|
52
|
+
/**
|
|
53
|
+
* Triggers a click element on a specific element.
|
|
54
|
+
* @param id - ID of the element which needs to be clicked.
|
|
55
|
+
*/
|
|
56
|
+
var onTriggerClick = function (id) {
|
|
57
|
+
var _a;
|
|
58
|
+
(_a = document.getElementById(id)) === null || _a === void 0 ? void 0 : _a.click();
|
|
59
|
+
};
|
|
60
|
+
var copyInputClick = function (e) {
|
|
61
|
+
var _a;
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
if (copyState == CopyState.Copied)
|
|
64
|
+
return;
|
|
65
|
+
var val = (_a = document.getElementById(inputId)) === null || _a === void 0 ? void 0 : _a.value;
|
|
66
|
+
if (val) {
|
|
67
|
+
window.navigator.clipboard.writeText(val);
|
|
68
|
+
setCopyState(CopyState.Copied);
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
setCopyState(CopyState.Available);
|
|
71
|
+
}, 1000);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
return (React.createElement(LabelRow, { margin: margin },
|
|
75
|
+
React.createElement(LabelRowInner, { size: size },
|
|
76
|
+
React.createElement(Label, { htmlFor: inputId, onClick: function () { return onTriggerClick(inputId); }, className: size || '' }, text),
|
|
77
|
+
required && React.createElement(SystemIcons.Asterisk, { size: "16px", color: COLORS.critical_500 }),
|
|
78
|
+
showCopyButton &&
|
|
79
|
+
React.createElement(CopyContainer, { className: copyState != CopyState.Available ? "disabled" : "", onClick: copyInputClick }, size == Size.Medium ? React.createElement(ComponentXS, null, copyState == CopyState.Copied ? 'Copied' : 'Copy') :
|
|
80
|
+
React.createElement(ComponentXXS, null, copyState == CopyState.Copied ? 'Copied' : 'Copy')))));
|
|
81
|
+
};
|
|
82
|
+
export default InputLabel;
|
|
83
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|