Skip to content

Commit

Permalink
chore: update findable-ui (#2478) (#2537)
Browse files Browse the repository at this point in the history
Co-authored-by: Fran McDade <[email protected]>
  • Loading branch information
frano-m and Fran McDade authored Nov 8, 2024
1 parent dd4d815 commit 850ee16
Show file tree
Hide file tree
Showing 54 changed files with 1,101 additions and 1,649 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FluidPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import { BackPageContentSingleColumn } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/backPageView.styles";
import React from "react";
import { AtlasDatasetsDescription } from "../../../../../../../../content";
import { useAtlas } from "../../../../../../../../contexts/atlasContext";
import { useConfig } from "../../../../../../../../hooks/useConfig";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
} from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import { useAtlas, useAtlasContent } from "contexts/atlasContext";
import React from "react";
import { getIntegratedAtlasesTableColumns } from "../../../../../../../../viewModelBuilders/viewModelBuilders";
import { Table, Toolbar } from "../../../../../../../common/Table/table.styles";
import { SectionText } from "../../../../../../components/Section/section.styles";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Sections } from "@databiosphere/findable-ui/lib/components/common/Sections/sections";
import { useAtlas } from "contexts/atlasContext";
import React, { Fragment } from "react";
import { Fragment } from "react";
import { Coordinators } from "../../../../../../../common/Section/components/Coordinators/coordinators";
import { HCABiologicalNetwork } from "../../../../../../../common/Section/components/HCABiologicalNetwork/HCABiologicalNetwork";
import { Publications } from "../../../../../../../common/Section/components/Publications/publications";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { GridPaperSection } from "@databiosphere/findable-ui/lib/components/common/Section/section.styles";
import { Link } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import React from "react";

const DATA_RELEASE_POLICY_URL =
"https://www.humancellatlas.org/data-release-policy";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { BackPageHero } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero";
import { NETWORKS_ROUTE } from "constants/routes";
import { useAtlas } from "contexts/atlasContext";
import React, { useMemo } from "react";
import { useMemo } from "react";

export const Hero = (): JSX.Element => {
const { atlas, network } = useAtlas();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
} from "constants/routes";
import { useAtlas } from "contexts/atlasContext";
import { useRouter } from "next/router";
import React from "react";

const TABS = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FluidPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import { BackPageContentSingleColumn } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/backPageView.styles";
import React from "react";
import { DatasetsDescription } from "../../../../../../../content";
import { useNetwork } from "../../../../../../../contexts/networkContext";
import { useConfig } from "../../../../../../../hooks/useConfig";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,4 @@ export const SectionContent = styled(DXSectionContent)`
.MuiTypography-root {
text-align: center;
}
.MuiLink-root {
color: inherit;
text-decoration: underline;
&:hover {
text-decoration: none;
}
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
import { Link } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import { TEXT_BODY_400_2_LINES } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React from "react";
import { Network } from "../../../../../../../../../@types/network";
import { NETWORKS_ROUTE } from "../../../../../../../../../constants/routes";
import { getBioNetworkName } from "../../../../../../../../../viewModelBuilders/viewModelBuilders";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from "@databiosphere/findable-ui/lib/components/common/Section/section.styles";
import { TEXT_BODY_LARGE_500 } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React from "react";
import {
useNetwork,
useNetworkContent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TEXT_BODY_400 } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React, { ReactNode } from "react";
import { ReactNode } from "react";

export interface KeyElTypeProps {
children: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Grid } from "@databiosphere/findable-ui/lib/components/common/Grid/grid";
import React, { ReactNode } from "react";
import { ReactNode } from "react";

export interface KeyValuesElTypeProps {
children: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TEXT_HEADING_SMALL } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React, { ReactNode } from "react";
import { ReactNode } from "react";

export interface ValueElTypeProps {
children: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { KeyValuePairs } from "@databiosphere/findable-ui/lib/components/common/KeyValuePairs/keyValuePairs";
import { Sections } from "@databiosphere/findable-ui/lib/components/common/Sections/sections";
import React from "react";
import { useNetwork } from "../../../../../../../contexts/networkContext";
import { getNetworkSummaryKeyValuePairs } from "../../../../../../../viewModelBuilders/viewModelBuilders";
import { Coordinators } from "../../../../../../common/Section/components/Coordinators/coordinators";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useLayoutState } from "@databiosphere/findable-ui/lib/hooks/useLayoutState";
import { useRouter } from "next/router";
import React, { SyntheticEvent, useState } from "react";
import { SyntheticEvent, useState } from "react";
import { Tab, Tabs, TabTitle } from "./outline.styles";

enum TAB_VALUE {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { CardActionArea } from "@databiosphere/findable-ui/lib/components/common
import { CardTitle } from "@databiosphere/findable-ui/lib/components/common/Card/components/CardTitle/cardTitle";
import { Markdown } from "@databiosphere/findable-ui/lib/components/common/Markdown/markdown";
import { FluidPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import React from "react";
import { BICCNPublication } from "../../../../../../../../../@types/network";
import { PublicationDetail } from "../PublicationDetail/publicationDetail";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@ export const Links = styled.div`
display: flex;
flex-direction: column;
gap: 8px;
.MuiLink-root {
color: inherit;
text-decoration: underline;
}
`;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
LinkProps,
} from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import { Chip, Tooltip } from "@mui/material";
import React from "react";
import { Links } from "./publicationDetail.styles";

export interface PublicationDetailProps {
Expand All @@ -29,7 +28,7 @@ export const PublicationDetail = ({
title={
<Links>
{links.map((link, i) => (
<Link key={i} {...link} />
<Link key={i} color="inherit" {...link} />
))}
</Links>
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FluidPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import React, { Fragment } from "react";
import { Fragment } from "react";
import { BICCNPublication } from "../../../../../../../@types/network";
import {
useNetwork,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BackPageHero } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/components/BackPageHero/backPageHero";
import React, { useMemo } from "react";
import { useMemo } from "react";
import { NETWORKS_ROUTE } from "../../../../../../constants/routes";
import { useNetwork } from "../../../../../../contexts/networkContext";
import { HeroTitle } from "../../../../../common/Hero/components/Title/components/HeroTitle/heroTitle";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { StaticImage } from "@databiosphere/findable-ui/lib/components/common/StaticImage/staticImage";
import {
Tab,
Tabs as DXTabs,
Tab,
TabValue,
} from "@databiosphere/findable-ui/lib/components/common/Tabs/tabs";
import { useRouter } from "next/router";
import React from "react";
import { Network } from "../../../../../../@types/network";
import {
NETWORKS_PATTERN,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FluidPaper } from "@databiosphere/findable-ui/lib/components/common/Paper/paper.styles";
import { BackPageContentSingleColumn } from "@databiosphere/findable-ui/lib/components/Layout/components/BackPage/backPageView.styles";
import React from "react";
import { useNetworkList } from "../../../../../../hooks/useNetworkList";
import { getBioNetworksTableColumns } from "../../../../../../viewModelBuilders/viewModelBuilders";
import { DetailViewTable } from "./mainColumn.styles";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {
import { SectionHead } from "../Section/section.styles";
import {
CTAs,
SectionContent,
SectionStayUpToDate as Section,
SectionContent,
} from "./sectionStayUpToDate.styles";

export const SectionStayUpToDate = (): JSX.Element => {
Expand Down
22 changes: 10 additions & 12 deletions components/Layout/components/Content/content.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,23 @@ const image = (props: ThemeProps) => css`
const muiAlert = (props: ThemeProps) => css`
.MuiAlert-root {
margin: 24px 0;
&.MuiAlert-standardWarning {
margin: 16px 0;
}
padding: 24px;
&:last-child {
margin-bottom: 0;
}
.MuiAlert-icon {
padding: 4px 0;
}
.MuiAlert-message {
${textBodyLarge4002Lines(props)};
gap: 16px;
.MuiAlertTitle-root {
${textHeadingSmall(props)};
}
ol > li,
ul > li {
Expand All @@ -86,14 +92,6 @@ const muiAlert = (props: ThemeProps) => css`
}
}
}
.MuiAlert-message:first-of-type {
gap: 16px;
.MuiAlertTitle-root {
${textHeadingSmall(props)};
}
}
}
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ButtonProps as DXButtonProps } from "@databiosphere/findable-ui/lib/components/common/Button/button";
import { ButtonOutline as DXButtonOutline } from "@databiosphere/findable-ui/lib/components/common/Button/components/ButtonOutline/buttonOutline";
import React from "react";

export const ButtonOutline = ({ ...props }: DXButtonProps): JSX.Element => {
return <DXButtonOutline {...props} />;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Button } from "@databiosphere/findable-ui/lib/components/common/Button/button";
import React from "react";

export const ButtonPrimary = ({
...props /* Spread props to allow for Button specific prop overrides. */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { CustomSVGIconProps } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/common/entities";
import { SvgIcon } from "@mui/material";
import React from "react";

/**
* Custom add icon.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { StaticImage } from "@databiosphere/findable-ui/lib/components/common/StaticImage/staticImage";
import { TEXT_HEADING_LARGE } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React from "react";
import { NetworkKey } from "../../../../../../../@types/network";
import { NETWORK_ICONS } from "../../../../../../../constants/networks";
import { Title } from "./heroTitle.styles";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
MetadataValue,
NTagCell,
} from "@databiosphere/findable-ui/lib/components/Index/components/NTagCell/nTagCell";
import React from "react";
import { PinnedNTagCell as Cell } from "./pinnedNTagCell.styles";

export type MetadataValueTuple = [MetadataValue[], MetadataValue[]];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { SectionTitle } from "@databiosphere/findable-ui/lib/components/common/S
import { Link } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import { TEXT_BODY_500 } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React from "react";
import { Coordinator } from "../../../../../@types/network";
import { SectionContent } from "../../section.styles";
import { Section } from "./coordinators.styles";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { SectionTitle } from "@databiosphere/findable-ui/lib/components/common/Section/components/SectionTitle/sectionTitle";
import { GridPaperSection } from "@databiosphere/findable-ui/lib/components/common/Section/section.styles";
import React from "react";
import { Network } from "../../../../../@types/network";
import { NETWORK_ICONS } from "../../../../../constants/networks";
import { NETWORKS_ROUTE } from "../../../../../constants/routes";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { SectionTitle } from "@databiosphere/findable-ui/lib/components/common/Section/components/SectionTitle/sectionTitle";
import { GridPaperSection } from "@databiosphere/findable-ui/lib/components/common/Section/section.styles";
import { Link } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import React from "react";
import { Publication } from "../../../../../@types/network";
import { SectionContent } from "../../section.styles";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
Link,
LinkProps,
} from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import React from "react";
import { SectionContent } from "../../section.styles";
import { Section } from "./references.styles";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
TEXT_BODY_LARGE_500,
} from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React, { ReactNode } from "react";
import { ReactNode } from "react";

export interface DialogContentSectionProps {
children: ReactNode;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from "react";
import { DatasetAsset } from "../../../../../../../../../@types/network";
import {
Dialog,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Link } from "@databiosphere/findable-ui/lib/components/Links/components/Link/link";
import React, { Fragment } from "react";
import { Fragment } from "react";
import { Caption } from "./cxgDownloadCaption.styles";

interface CXGDownloadCaptionProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { formatFileSize } from "@databiosphere/findable-ui/lib/utils/formatFileSize";
import React, { Fragment } from "react";
import { Fragment } from "react";
import { DatasetAsset } from "../../../../../../../../../../../@types/network";
import { FileSize } from "./cxgDownloadFileSize.styles";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
TEXT_BODY_LARGE_500,
} from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React from "react";
import {
CXG_DATASET_FILE_TYPE,
DatasetAsset,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ButtonPrimary } from "@databiosphere/findable-ui/lib/components/common/Button/components/ButtonPrimary/buttonPrimary";
import { ButtonSecondary } from "@databiosphere/findable-ui/lib/components/common/Button/components/ButtonSecondary/buttonSecondary";
import React, { useState } from "react";
import { useState } from "react";
import {
CXG_DATASET_FILE_TYPE,
DatasetAsset,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { AnchorLink } from "@databiosphere/findable-ui/lib/components/common/AnchorLink/anchorLink";
import { TEXT_HEADING_LARGE } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Typography } from "@mui/material";
import React from "react";
import { slugifyHeading } from "../../../../../plugins/common/utils";

export interface HeadingProps {
Expand Down
2 changes: 1 addition & 1 deletion constants/analysisPortals.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AnalysisPortal, ANALYSIS_PORTAL } from "../@types/network";
import { ANALYSIS_PORTAL, AnalysisPortal } from "../@types/network";

/**
* Cell By Gene analysis portal.
Expand Down
2 changes: 1 addition & 1 deletion docs/common/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import matter from "gray-matter";
import { GetStaticPathsResult } from "next/types";
import pathTool, * as path from "path";
import {
NavigationNode,
NAVIGATION_KEY,
NavigationNode,
SlugByFilePaths,
} from "../../site-config/data-portal/dev/navigation/entities";
import { navigation as navigationConfig } from "../../site-config/data-portal/dev/navigation/navigation";
Expand Down
Loading

0 comments on commit 850ee16

Please sign in to comment.