@databiosphere/findable-ui 46.1.2 → 47.0.2
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/.eslintrc.json +2 -1
- package/.github/copilot-instructions.md +176 -0
- package/.github/workflows/release-please.yml +8 -4
- package/.github/workflows/run-checks.yml +2 -2
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +33 -0
- package/README.md +4 -10
- package/docs/TRUSTED_PUBLISHING.md +133 -0
- package/lib/common/utils.js +1 -1
- package/lib/components/DataDictionary/components/Table/columns/columnDef.d.ts +6 -0
- package/lib/components/DataDictionary/components/Table/columns/columnDef.js +33 -0
- package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.d.ts +5 -0
- package/lib/components/DataDictionary/components/Table/columns/columnIdentifier.js +5 -0
- package/lib/components/DataDictionary/components/Table/columns/types.d.ts +2 -0
- package/lib/components/DataDictionary/components/Table/columns/types.js +1 -0
- package/lib/components/DataDictionary/components/Table/components/BasicCell/types.d.ts +4 -0
- package/lib/components/DataDictionary/components/Table/components/BasicCell/types.js +1 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.d.ts +4 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/hook.js +23 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/types.d.ts +8 -0
- package/lib/components/DataDictionary/hooks/UseDataDictionary/types.js +1 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/hook.d.ts +2 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/hook.js +10 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/types.d.ts +7 -0
- package/lib/components/DataDictionary/hooks/UseLayoutSpacing/types.js +1 -0
- package/lib/components/Detail/components/Table/components/TableHead/tableHead.d.ts +8 -0
- package/lib/components/Detail/components/Table/components/TableHead/tableHead.js +36 -0
- package/lib/components/Filter/components/Filter/filter.stories.d.ts +25 -0
- package/lib/components/Filter/components/Filter/filter.stories.js +42 -0
- package/lib/components/Filter/components/FilterTag/filterTag.stories.d.ts +16 -0
- package/lib/components/Filter/components/FilterTag/filterTag.stories.js +17 -0
- package/lib/components/Filter/components/Filters/filters.stories.d.ts +6 -0
- package/lib/components/Filter/components/Filters/filters.stories.js +91 -0
- package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.d.ts +3 -0
- package/lib/components/Filter/components/SearchAllFilters/components/AutocompletePopper/autocompletePopper.styles.js +15 -0
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.d.ts +6 -0
- package/lib/components/Filter/components/SearchAllFilters/searchAllFilters.stories.js +82 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.d.ts +1 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/components/SearchCloseButton/searchCloseButton.js +14 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.d.ts +2 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.js +12 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.d.ts +5 -0
- package/lib/components/Filter/components/SearchAllFiltersSearch/searchAllFiltersSearch.styles.js +34 -0
- package/lib/components/Index/components/Cell/cell.d.ts +7 -0
- package/lib/components/Index/components/Cell/cell.js +10 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.js +20 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/chartView.styles.js +12 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.d.ts +10 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/constants.js +10 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/plot.js +91 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.d.ts +132 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/barX/utils.js +230 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.js +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/chart.styles.js +29 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.d.ts +4 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/args.js +70 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.d.ts +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/stories/chart.stories.js +18 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/components/Chart/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.d.ts +7 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/hooks/UseChartView/useChartView.js +11 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/args.js +97 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/stories/chartView.stories.js +15 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/utils.d.ts +14 -0
- package/lib/components/Index/components/EntitiesView/components/ChartView/utils.js +23 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/entityList.js +14 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.d.ts +6 -0
- package/lib/components/Index/components/EntitiesView/components/EntityList/types.js +1 -0
- package/lib/components/Index/components/EntitiesView/constants.d.ts +1 -0
- package/lib/components/Index/components/EntitiesView/constants.js +1 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.js +15 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.d.ts +3 -0
- package/lib/components/Index/components/EntitiesView/entitiesView.styles.js +20 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.d.ts +2 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/hook.js +14 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.d.ts +13 -0
- package/lib/components/Index/components/EntitiesView/hooks/UseEntitiesView/types.js +5 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/stories/entitiesView.stories.js +50 -0
- package/lib/components/Index/components/EntitiesView/types.d.ts +8 -0
- package/lib/components/Index/components/EntitiesView/types.js +1 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.d.ts +1 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.js +13 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.d.ts +3 -0
- package/lib/components/Index/components/Hero/components/ExportButton/exportButton.styles.js +13 -0
- package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.d.ts +6 -0
- package/lib/components/Index/components/Hero/components/Summaries/stories/summaries.stories.js +14 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.d.ts +9 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.js +12 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.d.ts +13 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.stories.js +18 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.d.ts +7 -0
- package/lib/components/Index/components/Hero/components/Summaries/summaries.styles.js +26 -0
- package/lib/components/Index/components/Hero/hero.d.ts +11 -0
- package/lib/components/Index/components/Hero/hero.js +12 -0
- package/lib/components/Index/components/Hero/hero.stories.d.ts +23 -0
- package/lib/components/Index/components/Hero/hero.stories.js +22 -0
- package/lib/components/Index/components/Hero/hero.styles.d.ts +16 -0
- package/lib/components/Index/components/Hero/hero.styles.js +44 -0
- package/lib/components/Index/components/Hero/stories/hero.stories.d.ts +6 -0
- package/lib/components/Index/components/Hero/stories/hero.stories.js +16 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.d.ts +8 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.js +57 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.d.ts +4 -0
- package/lib/components/Index/components/NTag/components/Tooltip/tooltip.styles.js +10 -0
- package/lib/components/Index/components/NTag/nTag.d.ts +10 -0
- package/lib/components/Index/components/NTag/nTag.js +8 -0
- package/lib/components/Index/components/NTagCell/nTagCell.d.ts +11 -0
- package/lib/components/Index/components/NTagCell/nTagCell.js +29 -0
- package/lib/components/Index/components/NTagCell/nTagCell.stories.d.ts +5 -0
- package/lib/components/Index/components/NTagCell/nTagCell.stories.js +16 -0
- package/lib/components/Index/components/Tabs/common/utils.d.ts +8 -0
- package/lib/components/Index/components/Tabs/common/utils.js +19 -0
- package/lib/components/Index/components/Tabs/tabs.d.ts +1 -0
- package/lib/components/Index/components/Tabs/tabs.js +20 -0
- package/lib/components/Index/components/TitleCell/titleCell.d.ts +6 -0
- package/lib/components/Index/components/TitleCell/titleCell.js +10 -0
- package/lib/components/Index/components/TitleCell/titleCell.styles.d.ts +3 -0
- package/lib/components/Index/components/TitleCell/titleCell.styles.js +6 -0
- package/lib/components/Index/index.stories.d.ts +6 -0
- package/lib/components/Index/index.stories.js +26 -0
- package/lib/components/Index/stories/index.stories.d.ts +6 -0
- package/lib/components/Index/stories/index.stories.js +17 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.d.ts +6 -0
- package/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero.stories.js +10 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.d.ts +5 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/AuthenticationMenu/authenticationMenu.stories.js +29 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.d.ts +6 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.js +13 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.d.ts +36 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Authentication/components/RequestAuthentication/requestAuthentication.styles.js +9 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.d.ts +5 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.js +10 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.d.ts +36 -0
- package/lib/components/Layout/components/Header/components/Content/components/Actions/components/Search/components/SearchButton/searchButton.styles.js +9 -0
- package/lib/components/Layout/components/Header/hooks/useMeasureHeader.d.ts +5 -0
- package/lib/components/Layout/components/Header/hooks/useMeasureHeader.js +19 -0
- package/lib/components/Layout/components/Outline/common/constants.d.ts +2 -0
- package/lib/components/Layout/components/Outline/common/constants.js +1 -0
- package/lib/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.js +1 -1
- package/lib/components/Login/login.stories.d.ts +6 -0
- package/lib/components/Login/login.stories.js +31 -0
- package/lib/components/Redirect/redirect.js +6 -1
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.d.ts +16 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.js +28 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.d.ts +5 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.stories.js +46 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.d.ts +3 -0
- package/lib/components/Table/components/CheckboxMenu/checkboxMenu.styles.js +21 -0
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.d.ts +6 -0
- package/lib/components/Table/components/DownloadEntityResults/downloadEntityResults.js +17 -0
- package/lib/components/Table/components/EntityViewToggle/entityViewToggle.d.ts +2 -0
- package/lib/components/Table/components/EntityViewToggle/entityViewToggle.js +37 -0
- package/lib/components/Table/components/Pagination/pagination.d.ts +9 -0
- package/lib/components/Table/components/Pagination/pagination.js +19 -0
- package/lib/components/Table/components/Pagination/pagination.stories.d.ts +28 -0
- package/lib/components/Table/components/Pagination/pagination.stories.js +24 -0
- package/lib/components/Table/components/Pagination/pagination.styles.d.ts +4 -0
- package/lib/components/Table/components/Pagination/pagination.styles.js +15 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.d.ts +3 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/constants.js +3 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.d.ts +8 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/hook.js +18 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/types.d.ts +4 -0
- package/lib/components/Table/components/TableBody/hooks/virtualizer/types.js +1 -0
- package/lib/components/Table/components/TableBody/utils.d.ts +12 -0
- package/lib/components/Table/components/TableBody/utils.js +17 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.d.ts +3 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/stories/types.js +1 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/types.d.ts +3 -0
- package/lib/components/Table/components/TableCell/components/MarkdownCell/types.js +1 -0
- package/lib/components/TableCreator/common/constants.d.ts +6 -0
- package/lib/components/TableCreator/common/constants.js +19 -0
- package/lib/components/TableCreator/common/entities.d.ts +5 -0
- package/lib/components/TableCreator/common/entities.js +1 -0
- package/lib/components/TableCreator/tableCreator.styles.d.ts +4 -0
- package/lib/components/TableCreator/tableCreator.styles.js +4 -0
- package/lib/components/common/Alert/alert.stories.d.ts +6 -0
- package/lib/components/common/Alert/alert.stories.js +36 -0
- package/lib/components/common/Alert/components/AlertText/alertText.styles.d.ts +4 -0
- package/lib/components/common/Alert/components/AlertText/alertText.styles.js +19 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.d.ts +7 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.js +5 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.d.ts +3 -0
- package/lib/components/common/Banner/components/BannerPrimary/bannerPrimary.styles.js +19 -0
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.d.ts +10 -0
- package/lib/components/common/Banner/components/DismissibleBanner/dismissibleBanner.js +16 -0
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.d.ts +3 -0
- package/lib/components/common/Banner/components/SessionTimeout/sessionTimeout.styles.js +21 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.d.ts +3 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.js +6 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.styles.d.ts +7 -0
- package/lib/components/common/Button/components/LoginButton/loginButton.styles.js +11 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.d.ts +5 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.js +10 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.d.ts +3 -0
- package/lib/components/common/IconButton/components/LoadingIconButton/loadingIconButton.stories.js +9 -0
- package/lib/components/common/ToggleButtonGroup/toggleButtonGroup.js +2 -1
- package/lib/hooks/useAuthentication/common/constants.d.ts +4 -0
- package/lib/hooks/useAuthentication/common/constants.js +19 -0
- package/lib/hooks/useAuthentication/common/entities.d.ts +25 -0
- package/lib/hooks/useAuthentication/common/entities.js +11 -0
- package/lib/hooks/useAuthentication/common/utils.d.ts +15 -0
- package/lib/hooks/useAuthentication/common/utils.js +25 -0
- package/lib/hooks/useAuthentication/useAuthentication.d.ts +6 -0
- package/lib/hooks/useAuthentication/useAuthentication.js +9 -0
- package/lib/hooks/useAuthentication/useAuthenticationComplete.d.ts +6 -0
- package/lib/hooks/useAuthentication/useAuthenticationComplete.js +55 -0
- package/lib/hooks/useAuthentication/useAuthenticationForm.d.ts +20 -0
- package/lib/hooks/useAuthentication/useAuthenticationForm.js +88 -0
- package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.d.ts +18 -0
- package/lib/hooks/useAuthentication/useAuthenticationNIHExpiry.js +50 -0
- package/lib/hooks/useAuthentication/useAuthenticationStatus.d.ts +20 -0
- package/lib/hooks/useAuthentication/useAuthenticationStatus.js +32 -0
- package/lib/hooks/useAuthentication/useFetchGoogleProfile.d.ts +21 -0
- package/lib/hooks/useAuthentication/useFetchGoogleProfile.js +41 -0
- package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.d.ts +18 -0
- package/lib/hooks/useAuthentication/useFetchTerraNIHProfile.js +62 -0
- package/lib/hooks/useAuthentication/useFetchTerraProfile.d.ts +24 -0
- package/lib/hooks/useAuthentication/useFetchTerraProfile.js +62 -0
- package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.d.ts +15 -0
- package/lib/hooks/useAuthentication/useFetchTerraTermsOfService.js +62 -0
- package/lib/hooks/useAuthentication/useTokenClient.d.ts +11 -0
- package/lib/hooks/useAuthentication/useTokenClient.js +29 -0
- package/lib/hooks/useAuthenticationConfig.d.ts +6 -0
- package/lib/hooks/useAuthenticationConfig.js +14 -0
- package/lib/hooks/useCategoryConfigs.d.ts +6 -0
- package/lib/hooks/useCategoryConfigs.js +17 -0
- package/lib/hooks/useEntityListRelatedView.d.ts +15 -0
- package/lib/hooks/useEntityListRelatedView.js +62 -0
- package/lib/hooks/useExploreMode.d.ts +14 -0
- package/lib/hooks/useExploreMode.js +20 -0
- package/lib/hooks/useFileLocation.js +1 -1
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.d.ts +15 -0
- package/lib/hooks/useFileManifest/common/buildFileManifestRequestURL.js +27 -0
- package/lib/hooks/useFileManifest/useFileManifestURL.d.ts +5 -0
- package/lib/hooks/useFileManifest/useFileManifestURL.js +11 -0
- package/lib/hooks/useFileManifest/useRequestFileManifest.d.ts +9 -0
- package/lib/hooks/useFileManifest/useRequestFileManifest.js +37 -0
- package/lib/hooks/useLayoutState.d.ts +6 -0
- package/lib/hooks/useLayoutState.js +9 -0
- package/lib/hooks/useMenu.d.ts +10 -0
- package/lib/hooks/useMenu.js +17 -0
- package/lib/hooks/useMenuWithPosition.d.ts +14 -0
- package/lib/hooks/useMenuWithPosition.js +33 -0
- package/lib/hooks/useScroll.d.ts +10 -0
- package/lib/hooks/useScroll.js +12 -0
- package/lib/hooks/useSessionTimeout.d.ts +11 -0
- package/lib/hooks/useSessionTimeout.js +28 -0
- package/lib/providers/authentication.d.ts +51 -0
- package/lib/providers/authentication.js +110 -0
- package/lib/providers/layoutState.d.ts +40 -0
- package/lib/providers/layoutState.js +47 -0
- package/lib/styles/common/mixins/colors.d.ts +25 -0
- package/lib/styles/common/mixins/colors.js +32 -0
- package/lib/styles/common/mixins/fonts.d.ts +16 -0
- package/lib/styles/common/mixins/fonts.js +30 -0
- package/lib/styles/common/mixins/shadows.d.ts +3 -0
- package/lib/styles/common/mixins/shadows.js +4 -0
- package/lib/styles/common/mui/palette.d.ts +47 -0
- package/lib/styles/common/mui/palette.js +47 -0
- package/lib/theme/common/entities.d.ts +6 -0
- package/lib/theme/common/entities.js +1 -0
- package/package.json +15 -13
- package/src/common/utils.ts +1 -1
- package/src/components/Links/components/Link/components/ExploreViewLink/exploreViewLink.tsx +1 -1
- package/src/components/Redirect/redirect.tsx +5 -1
- package/src/components/common/ToggleButtonGroup/toggleButtonGroup.tsx +1 -1
- package/src/hooks/useFileLocation.ts +1 -1
- package/types/data-explorer-ui.d.ts +7 -6
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Checkbox, ListItem, ListItemButton, ListItemText, } from "@mui/material";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { ButtonTextPrimary } from "../../../common/Button/components/ButtonTextPrimary/buttonTextPrimary";
|
|
4
|
+
import { DropdownButton } from "../../../common/Button/components/DropdownButton/dropdownButton";
|
|
5
|
+
import { CheckedIcon } from "../../../common/CustomIcon/components/CheckedIcon/checkedIcon";
|
|
6
|
+
import { UncheckedIcon } from "../../../common/CustomIcon/components/UncheckedIcon/uncheckedIcon";
|
|
7
|
+
import { Menu } from "./checkboxMenu.styles";
|
|
8
|
+
export const CheckboxMenu = ({ label: buttonLabel, onReset, options, }) => {
|
|
9
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
10
|
+
const open = Boolean(anchorEl);
|
|
11
|
+
const onOpenMenu = (event) => {
|
|
12
|
+
setAnchorEl(event.currentTarget);
|
|
13
|
+
};
|
|
14
|
+
const onCloseMenu = () => {
|
|
15
|
+
setAnchorEl(null);
|
|
16
|
+
};
|
|
17
|
+
return (React.createElement(React.Fragment, null,
|
|
18
|
+
React.createElement(DropdownButton, { onClick: onOpenMenu, open: open }, buttonLabel),
|
|
19
|
+
React.createElement(Menu, { anchorEl: anchorEl, anchorOrigin: { horizontal: "right", vertical: "bottom" }, onClose: onCloseMenu, open: open, slotProps: { paper: { variant: "menu" } }, transformOrigin: {
|
|
20
|
+
horizontal: "right",
|
|
21
|
+
vertical: "top",
|
|
22
|
+
} },
|
|
23
|
+
options.map(({ checked, disabled = false, label, onChange, value }) => (React.createElement(ListItemButton, { disabled: disabled, key: value, onClick: onChange, role: undefined },
|
|
24
|
+
React.createElement(Checkbox, { checked: checked, checkedIcon: React.createElement(CheckedIcon, null), disabled: disabled, icon: React.createElement(UncheckedIcon, null) }),
|
|
25
|
+
React.createElement(ListItemText, { disableTypography: true, primary: React.createElement("span", null, label) })))),
|
|
26
|
+
React.createElement(ListItem, { component: "div" },
|
|
27
|
+
React.createElement(ButtonTextPrimary, { onClick: onReset }, "Reset")))));
|
|
28
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentMeta } from "@storybook/react";
|
|
2
|
+
import { CheckboxMenu } from "./checkboxMenu";
|
|
3
|
+
declare const _default: ComponentMeta<typeof CheckboxMenu>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const CheckboxMenuStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("./checkboxMenu").CheckboxMenuProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CheckboxMenu } from "./checkboxMenu";
|
|
3
|
+
export default {
|
|
4
|
+
argTypes: {
|
|
5
|
+
label: { control: "text" },
|
|
6
|
+
onReset: { control: { disabled: true } },
|
|
7
|
+
options: { control: "array" },
|
|
8
|
+
},
|
|
9
|
+
component: CheckboxMenu,
|
|
10
|
+
title: "Components/Common/Menu/CheckboxMenu",
|
|
11
|
+
};
|
|
12
|
+
const CheckboxMenuTemplate = (args) => (React.createElement(CheckboxMenu, { ...args }));
|
|
13
|
+
const onChange = () => {
|
|
14
|
+
// onChange function
|
|
15
|
+
};
|
|
16
|
+
const onReset = () => {
|
|
17
|
+
// onReset function
|
|
18
|
+
};
|
|
19
|
+
export const CheckboxMenuStory = CheckboxMenuTemplate.bind({});
|
|
20
|
+
CheckboxMenuStory.args = {
|
|
21
|
+
label: "Options",
|
|
22
|
+
onReset: onReset,
|
|
23
|
+
options: [
|
|
24
|
+
{
|
|
25
|
+
checked: true,
|
|
26
|
+
disabled: true,
|
|
27
|
+
label: "Item 1",
|
|
28
|
+
onChange,
|
|
29
|
+
value: "item_1",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
checked: false,
|
|
33
|
+
disabled: false,
|
|
34
|
+
label: "Item 2",
|
|
35
|
+
onChange,
|
|
36
|
+
value: "item_2",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
checked: true,
|
|
40
|
+
disabled: false,
|
|
41
|
+
label: "Item 3",
|
|
42
|
+
onChange,
|
|
43
|
+
value: "item_3",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Menu as MMenu } from "@mui/material";
|
|
3
|
+
export const Menu = styled(MMenu) `
|
|
4
|
+
.MuiPaper-menu {
|
|
5
|
+
margin: 4px 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// List item button
|
|
9
|
+
.MuiListItemButton-root {
|
|
10
|
+
gap: 8px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// List item
|
|
14
|
+
.MuiListItem-root {
|
|
15
|
+
padding: 10px 16px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.MuiListItemButton-root.Mui-disabled {
|
|
19
|
+
opacity: 1;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Row, RowData } from "@tanstack/react-table";
|
|
2
|
+
export interface DownloadEntityResultsProps<T extends RowData> {
|
|
3
|
+
entityName: string;
|
|
4
|
+
rows: Row<T>[];
|
|
5
|
+
}
|
|
6
|
+
export declare const DownloadEntityResults: <T extends RowData>({ entityName, rows, }: DownloadEntityResultsProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ButtonSecondary } from "../../../common/Button/components/ButtonSecondary/buttonSecondary";
|
|
3
|
+
import { FileDownloadButton } from "../../../common/Button/components/FileDownloadButton/fileDownloadButton";
|
|
4
|
+
import { DownloadIcon } from "../../../common/CustomIcon/components/DownloadIcon/downloadIcon";
|
|
5
|
+
import { generateDownloadBlob } from "../../common/utils";
|
|
6
|
+
export const DownloadEntityResults = ({ entityName, rows, }) => {
|
|
7
|
+
const [fileUrl, setFileUrl] = React.useState(undefined);
|
|
8
|
+
const onDownload = () => {
|
|
9
|
+
const blob = generateDownloadBlob(rows);
|
|
10
|
+
if (blob) {
|
|
11
|
+
setFileUrl(window.URL.createObjectURL(blob));
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
return (React.createElement(React.Fragment, null,
|
|
15
|
+
React.createElement(ButtonSecondary, { onClick: () => onDownload(), StartIcon: DownloadIcon }, "Download TSV"),
|
|
16
|
+
React.createElement(FileDownloadButton, { fileName: `${entityName}.tsv`, fileUrl: fileUrl })));
|
|
17
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.EntityViewToggle = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const useExploreState_1 = require("../../../../hooks/useExploreState");
|
|
9
|
+
const exploreState_1 = require("../../../../providers/exploreState");
|
|
10
|
+
const toggleButtonGroup_1 = require("../../../common/ToggleButtonGroup/toggleButtonGroup");
|
|
11
|
+
const EntityViewToggle = () => {
|
|
12
|
+
const { exploreDispatch } = (0, useExploreState_1.useExploreState)();
|
|
13
|
+
const toggleButtons = [
|
|
14
|
+
{
|
|
15
|
+
label: "Exact Match",
|
|
16
|
+
onToggle: () => onChange(exploreState_1.ENTITY_VIEW.EXACT),
|
|
17
|
+
value: exploreState_1.ENTITY_VIEW.EXACT,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
label: "Related Match",
|
|
21
|
+
onToggle: () => onChange(exploreState_1.ENTITY_VIEW.RELATED),
|
|
22
|
+
value: exploreState_1.ENTITY_VIEW.RELATED,
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Callback fired when toggle button value changes.
|
|
27
|
+
* @param entityView - Entity list view.
|
|
28
|
+
*/
|
|
29
|
+
const onChange = (entityView) => {
|
|
30
|
+
exploreDispatch({
|
|
31
|
+
payload: entityView,
|
|
32
|
+
type: exploreState_1.ExploreActionKind.ToggleEntityView,
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
return react_1.default.createElement(toggleButtonGroup_1.ToggleButtonGroup, { toggleButtons: toggleButtons });
|
|
36
|
+
};
|
|
37
|
+
exports.EntityViewToggle = EntityViewToggle;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
canNextPage?: boolean;
|
|
3
|
+
canPreviousPage?: boolean;
|
|
4
|
+
currentPage: number;
|
|
5
|
+
onNextPage: () => void;
|
|
6
|
+
onPreviousPage: () => void;
|
|
7
|
+
totalPage: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const Pagination: ({ canNextPage, canPreviousPage, currentPage, onNextPage, onPreviousPage, totalPage, }: PaginationProps) => JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EastRounded, WestRounded } from "@mui/icons-material";
|
|
2
|
+
import { Typography } from "@mui/material";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { TEST_IDS } from "../../../../tests/testIds";
|
|
5
|
+
import { IconButton } from "../../../common/IconButton/iconButton";
|
|
6
|
+
import { Stack } from "../../../common/Stack/stack";
|
|
7
|
+
import { Pagination as TablePagination } from "./pagination.styles";
|
|
8
|
+
export const Pagination = ({ canNextPage = true, canPreviousPage = true, currentPage, onNextPage, onPreviousPage, totalPage, }) => {
|
|
9
|
+
return (React.createElement(TablePagination, { "data-testid": TEST_IDS.TABLE_PAGINATION },
|
|
10
|
+
React.createElement("div", { "data-testid": TEST_IDS.TABLE_PAGINATION_PAGE },
|
|
11
|
+
React.createElement(Typography, { variant: "text-body-400" }, "Page "),
|
|
12
|
+
React.createElement(Typography, { variant: "text-body-500" },
|
|
13
|
+
currentPage,
|
|
14
|
+
" of ",
|
|
15
|
+
totalPage)),
|
|
16
|
+
React.createElement(Stack, { direction: "row", gap: 2 },
|
|
17
|
+
React.createElement(IconButton, { color: "secondary", disabled: !canPreviousPage, Icon: WestRounded, onClick: onPreviousPage }),
|
|
18
|
+
React.createElement(IconButton, { color: "secondary", disabled: !canNextPage, Icon: EastRounded, onClick: onNextPage }))));
|
|
19
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StoryObj } from "@storybook/react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
argTypes: {
|
|
4
|
+
canNextPage: {
|
|
5
|
+
control: "boolean";
|
|
6
|
+
};
|
|
7
|
+
canPreviousPage: {
|
|
8
|
+
control: "boolean";
|
|
9
|
+
};
|
|
10
|
+
currentPage: {
|
|
11
|
+
control: "number";
|
|
12
|
+
};
|
|
13
|
+
onNextPage: {
|
|
14
|
+
action: string;
|
|
15
|
+
};
|
|
16
|
+
onPreviousPage: {
|
|
17
|
+
action: string;
|
|
18
|
+
};
|
|
19
|
+
totalPage: {
|
|
20
|
+
control: "number";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
component: ({ canNextPage, canPreviousPage, currentPage, onNextPage, onPreviousPage, totalPage, }: import("./pagination").PaginationProps) => JSX.Element;
|
|
24
|
+
title: string;
|
|
25
|
+
};
|
|
26
|
+
export default meta;
|
|
27
|
+
type Story = StoryObj<typeof meta>;
|
|
28
|
+
export declare const PaginationStory: Story;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Pagination } from "./pagination";
|
|
2
|
+
const meta = {
|
|
3
|
+
argTypes: {
|
|
4
|
+
canNextPage: { control: "boolean" },
|
|
5
|
+
canPreviousPage: { control: "boolean" },
|
|
6
|
+
currentPage: { control: "number" },
|
|
7
|
+
onNextPage: { action: "nextPage" },
|
|
8
|
+
onPreviousPage: { action: "previousPage" },
|
|
9
|
+
totalPage: { control: "number" },
|
|
10
|
+
},
|
|
11
|
+
component: Pagination,
|
|
12
|
+
title: "Components/Table",
|
|
13
|
+
};
|
|
14
|
+
export default meta;
|
|
15
|
+
export const PaginationStory = {
|
|
16
|
+
args: {
|
|
17
|
+
canNextPage: true,
|
|
18
|
+
canPreviousPage: false,
|
|
19
|
+
currentPage: 1,
|
|
20
|
+
onNextPage: () => { },
|
|
21
|
+
onPreviousPage: () => { },
|
|
22
|
+
totalPage: 25,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { TABLET } from "../../../../theme/common/breakpoints";
|
|
3
|
+
export const Pagination = styled.div `
|
|
4
|
+
align-items: center;
|
|
5
|
+
background-color: ${({ theme }) => theme.palette.common.white};
|
|
6
|
+
color: ${({ theme }) => theme.palette.ink.main};
|
|
7
|
+
display: flex;
|
|
8
|
+
gap: 16px;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
padding: 20px;
|
|
11
|
+
|
|
12
|
+
${({ theme }) => theme.breakpoints.up(TABLET)} {
|
|
13
|
+
justify-content: flex-start;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Row, RowData } from "@tanstack/react-table";
|
|
2
|
+
import { UseVirtualizer } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* A hook to create and manage TanStack window virtualizer for table rows.
|
|
5
|
+
* @param rows - Rows.
|
|
6
|
+
* @returns An object containing the virtualizer instance, which manages the visible rows.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useVirtualizer<T extends RowData>(rows: Row<T>[]): UseVirtualizer;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useWindowVirtualizer } from "@tanstack/react-virtual";
|
|
2
|
+
import { useCallback } from "react";
|
|
3
|
+
import { VIRTUALIZER_OPTIONS } from "./constants";
|
|
4
|
+
/**
|
|
5
|
+
* A hook to create and manage TanStack window virtualizer for table rows.
|
|
6
|
+
* @param rows - Rows.
|
|
7
|
+
* @returns An object containing the virtualizer instance, which manages the visible rows.
|
|
8
|
+
*/
|
|
9
|
+
export function useVirtualizer(rows) {
|
|
10
|
+
const estimateSize = useCallback(() => 100, []);
|
|
11
|
+
const count = rows.length;
|
|
12
|
+
const virtualizer = useWindowVirtualizer({
|
|
13
|
+
...VIRTUALIZER_OPTIONS,
|
|
14
|
+
count,
|
|
15
|
+
estimateSize,
|
|
16
|
+
});
|
|
17
|
+
return { virtualizer };
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Row, RowData, Table } from "@tanstack/react-table";
|
|
2
|
+
import { ROW_DIRECTION } from "../../common/entities";
|
|
3
|
+
/**
|
|
4
|
+
* Filters and returns the appropriate rows for a virtualized table based on row direction
|
|
5
|
+
* and grouping state.
|
|
6
|
+
* Rows are filtered if `ROW_DIRECTION` is `VERTICAL` and the table is grouped.
|
|
7
|
+
* @param table - Table.
|
|
8
|
+
* @param rows - Rows.
|
|
9
|
+
* @param rowDirection - Row direction.
|
|
10
|
+
* @returns Rows based on the provided row direction and table grouping state.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getAllVirtualizedRows<T extends RowData>(table: Table<T>, rows: Row<T>[], rowDirection: ROW_DIRECTION): Row<T>[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ROW_DIRECTION } from "../../common/entities";
|
|
2
|
+
/**
|
|
3
|
+
* Filters and returns the appropriate rows for a virtualized table based on row direction
|
|
4
|
+
* and grouping state.
|
|
5
|
+
* Rows are filtered if `ROW_DIRECTION` is `VERTICAL` and the table is grouped.
|
|
6
|
+
* @param table - Table.
|
|
7
|
+
* @param rows - Rows.
|
|
8
|
+
* @param rowDirection - Row direction.
|
|
9
|
+
* @returns Rows based on the provided row direction and table grouping state.
|
|
10
|
+
*/
|
|
11
|
+
export function getAllVirtualizedRows(table, rows, rowDirection) {
|
|
12
|
+
if (rowDirection === ROW_DIRECTION.DEFAULT)
|
|
13
|
+
return rows;
|
|
14
|
+
if (table.getState().grouping.length === 0)
|
|
15
|
+
return rows;
|
|
16
|
+
return rows.filter(({ getIsGrouped }) => getIsGrouped());
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { RowSelectionCell } from "../../Table/components/TableCell/components/RowSelectionCell/rowSelectionCell";
|
|
2
|
+
export const ACCESSOR_KEYS = {
|
|
3
|
+
SELECT: "select",
|
|
4
|
+
};
|
|
5
|
+
export const COLUMN_CONFIGS = {
|
|
6
|
+
SELECT: {
|
|
7
|
+
columnPinned: false,
|
|
8
|
+
columnVisible: false,
|
|
9
|
+
componentConfig: { component: RowSelectionCell },
|
|
10
|
+
disableHiding: true,
|
|
11
|
+
disableSorting: true,
|
|
12
|
+
header: ACCESSOR_KEYS.SELECT,
|
|
13
|
+
id: ACCESSOR_KEYS.SELECT,
|
|
14
|
+
meta: {
|
|
15
|
+
header: "",
|
|
16
|
+
},
|
|
17
|
+
width: "max-content",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
export const TableCreator = styled.div `
|
|
3
|
+
position: relative; // Required; when the table mounts, the loading element should not transition in and therefore to position the loading element correctly, the parent container must be styled with position relative.
|
|
4
|
+
`;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Alert } from "./alert";
|
|
2
|
+
export default {
|
|
3
|
+
argTypes: {
|
|
4
|
+
children: {
|
|
5
|
+
control: "text",
|
|
6
|
+
description: "Inner text",
|
|
7
|
+
},
|
|
8
|
+
color: {
|
|
9
|
+
description: "Color of alert",
|
|
10
|
+
},
|
|
11
|
+
icon: {
|
|
12
|
+
control: "text",
|
|
13
|
+
description: "Top left icon. If provided will replace severity.",
|
|
14
|
+
},
|
|
15
|
+
severity: {
|
|
16
|
+
description: "Top left predefined icon. Combine with color.",
|
|
17
|
+
},
|
|
18
|
+
title: {
|
|
19
|
+
control: "text",
|
|
20
|
+
description: "Highlighted text",
|
|
21
|
+
},
|
|
22
|
+
variant: {
|
|
23
|
+
description: "Type of the alert",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
component: Alert,
|
|
27
|
+
title: "Components/Common/Alert",
|
|
28
|
+
};
|
|
29
|
+
export const AlertStory = {
|
|
30
|
+
args: {
|
|
31
|
+
children: "Something certainly happened",
|
|
32
|
+
color: "warning",
|
|
33
|
+
severity: "warning",
|
|
34
|
+
title: "Ouch!",
|
|
35
|
+
},
|
|
36
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
export const AlertText = styled.div `
|
|
3
|
+
ul {
|
|
4
|
+
padding-left: 24px;
|
|
5
|
+
margin: 8px 0;
|
|
6
|
+
|
|
7
|
+
li {
|
|
8
|
+
margin: 4px 0;
|
|
9
|
+
|
|
10
|
+
&:last-child {
|
|
11
|
+
margin-bottom: 0;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
*:last-child {
|
|
17
|
+
margin-bottom: 0;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AlertProps as MAlertProps } from "@mui/material";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export interface BannerPrimaryProps extends MAlertProps {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const BannerPrimary: ({ children, className, ...props }: BannerPrimaryProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Alert } from "./bannerPrimary.styles";
|
|
3
|
+
export const BannerPrimary = ({ children, className, ...props /* Spread props to allow for Mui AlertProps specific prop overrides. */ }) => {
|
|
4
|
+
return (React.createElement(Alert, { className: className, color: "primary", elevation: 0, icon: false, variant: "standard", ...props }, children));
|
|
5
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { Alert as MAlert } from "@mui/material";
|
|
3
|
+
import { primaryMain, white } from "../../../../../styles/common/mixins/colors";
|
|
4
|
+
import { textBodySmall400 } from "../../../../../styles/common/mixins/fonts";
|
|
5
|
+
export const Alert = styled(MAlert) `
|
|
6
|
+
border-radius: 0;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
padding: 8px;
|
|
9
|
+
|
|
10
|
+
&.MuiAlert-standardPrimary {
|
|
11
|
+
background-color: ${primaryMain};
|
|
12
|
+
color: ${white};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.MuiAlert-message {
|
|
16
|
+
${textBodySmall400};
|
|
17
|
+
text-align: center;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AlertProps as MAlertProps } from "@mui/material";
|
|
2
|
+
import { ElementType, ReactNode } from "react";
|
|
3
|
+
export interface CookieBannerProps extends MAlertProps {
|
|
4
|
+
Alert?: ElementType;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
open: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const DismissibleBanner: ({ Alert, className, children, onDismiss, open, ...props }: CookieBannerProps) => JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Fade, Alert as MAlert, } from "@mui/material";
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
export const DismissibleBanner = ({ Alert = MAlert /* Requires forwardRef to be used as a child of Fade. */, className, children, onDismiss, open, ...props /* Spread props to allow for Mui AlertProps specific prop overrides. */ }) => {
|
|
4
|
+
const [isIn, setIsIn] = useState(false);
|
|
5
|
+
// Callback fired when the component requests to be closed.
|
|
6
|
+
const onClose = () => {
|
|
7
|
+
onDismiss?.();
|
|
8
|
+
setIsIn(false);
|
|
9
|
+
};
|
|
10
|
+
// Sets the open state.
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
setIsIn(open);
|
|
13
|
+
}, [open]);
|
|
14
|
+
return (React.createElement(Fade, { in: isIn, unmountOnExit: true },
|
|
15
|
+
React.createElement(Alert, { className: className, onClose: onClose, ...props }, children)));
|
|
16
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import styled from "@emotion/styled";
|
|
2
|
+
import { mediaDesktopUp } from "../../../../../styles/common/mixins/breakpoints";
|
|
3
|
+
import { BannerPrimary } from "../BannerPrimary/bannerPrimary";
|
|
4
|
+
export const Banner = styled(BannerPrimary) `
|
|
5
|
+
gap: 12px;
|
|
6
|
+
padding: 8px 12px;
|
|
7
|
+
|
|
8
|
+
${mediaDesktopUp} {
|
|
9
|
+
padding: 8px 16px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.MuiAlert-message {
|
|
13
|
+
align-self: center;
|
|
14
|
+
flex: 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.MuiAlert-action {
|
|
18
|
+
margin: -8px;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LoginButton as Button, LoginButtonText } from "./loginButton.styles";
|
|
3
|
+
export const LoginButton = ({ children, ...props }) => {
|
|
4
|
+
return (React.createElement(Button, { fullWidth: true, ...props },
|
|
5
|
+
React.createElement(LoginButtonText, null, children)));
|
|
6
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const LoginButton: import("@emotion/styled").StyledComponent<Omit<import("../../button").ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement> & {
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
}, {}, {}>;
|
|
4
|
+
export declare const LoginButtonText: import("@emotion/styled").StyledComponent<{
|
|
5
|
+
theme?: import("@emotion/react").Theme;
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|