@databiosphere/findable-ui 50.5.0 → 50.6.0

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.
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "50.5.0"
2
+ ".": "50.6.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [50.6.0](https://github.com/DataBiosphere/findable-ui/compare/v50.5.0...v50.6.0) (2026-04-02)
4
+
5
+
6
+ ### Features
7
+
8
+ * add disabled prop with coming soon chip to exportmethod ([#861](https://github.com/DataBiosphere/findable-ui/issues/861)) ([#862](https://github.com/DataBiosphere/findable-ui/issues/862)) ([3fa93b2](https://github.com/DataBiosphere/findable-ui/commit/3fa93b26afbf4c7c4f86c2527d1d05af495fb343))
9
+
3
10
  ## [50.5.0](https://github.com/DataBiosphere/findable-ui/compare/v50.4.0...v50.5.0) (2026-04-02)
4
11
 
5
12
 
@@ -0,0 +1,2 @@
1
+ import { ChipProps } from "@mui/material";
2
+ export declare const CHIP_PROPS: Partial<ChipProps>;
@@ -0,0 +1,6 @@
1
+ import { CHIP_PROPS as MUI_CHIP_PROPS } from "../../../../styles/common/mui/chip";
2
+ export const CHIP_PROPS = {
3
+ color: MUI_CHIP_PROPS.COLOR.DEFAULT,
4
+ label: "Coming Soon",
5
+ variant: MUI_CHIP_PROPS.VARIANT.STATUS,
6
+ };
@@ -1,6 +1,7 @@
1
1
  import { JSX, ReactNode } from "react";
2
2
  import { TrackingProps } from "../../../types";
3
3
  export interface ExportMethodProps extends TrackingProps {
4
+ comingSoon?: boolean;
4
5
  description: ReactNode;
5
6
  footnote?: ReactNode;
6
7
  icon?: ReactNode;
@@ -8,4 +9,4 @@ export interface ExportMethodProps extends TrackingProps {
8
9
  route: string;
9
10
  title: string;
10
11
  }
11
- export declare const ExportMethod: ({ description, footnote, icon, isAccessible, route, title, trackingId, }: ExportMethodProps) => JSX.Element;
12
+ export declare const ExportMethod: ({ comingSoon, description, footnote, icon, isAccessible, route, title, trackingId, }: ExportMethodProps) => JSX.Element;
@@ -1,14 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ChevronRightRounded } from "@mui/icons-material";
3
- import { CardActionArea, CardActions, CardContent, Stack, Tooltip, Typography, } from "@mui/material";
3
+ import { CardActionArea, CardActions, CardContent, Chip, Stack, Tooltip, Typography, } from "@mui/material";
4
4
  import Link from "next/link";
5
5
  import { useDownloadStatus } from "../../../../hooks/useDownloadStatus";
6
6
  import { STACK_PROPS } from "../../../../styles/common/mui/stack";
7
7
  import { SVG_ICON_PROPS } from "../../../../styles/common/mui/svgIcon";
8
8
  import { TYPOGRAPHY_PROPS } from "../../../../styles/common/mui/typography";
9
9
  import { FluidPaper } from "../../../common/Paper/components/FluidPaper/fluidPaper";
10
+ import { CHIP_PROPS } from "./constants";
10
11
  import { StyledCard } from "./exportMethod.styles";
11
- export const ExportMethod = ({ description, footnote, icon, isAccessible = true, route, title, trackingId, }) => {
12
- const { disabled, message } = useDownloadStatus();
13
- return (_jsx(Tooltip, { arrow: true, title: message, children: _jsxs(StyledCard, { component: FluidPaper, elevation: 1, children: [_jsx(CardActionArea, { "aria-label": title, component: Link, disabled: disabled || !isAccessible, href: route, id: trackingId }), _jsxs(CardContent, { children: [_jsxs(Stack, { alignItems: STACK_PROPS.ALIGN_ITEMS.FLEX_START, direction: STACK_PROPS.DIRECTION.ROW, gap: 2, useFlexGap: true, children: [icon, _jsx(Typography, { component: "h3", variant: TYPOGRAPHY_PROPS.VARIANT.HEADING_XSMALL, children: title })] }), _jsx(Typography, { component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.BODY_400_2_LINES, children: description }), footnote && (_jsx(Typography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.BODY_SMALL_400_2_LINES, children: footnote }))] }), _jsx(CardActions, { children: _jsx(ChevronRightRounded, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }) })] }) }));
12
+ export const ExportMethod = ({ comingSoon, description, footnote, icon, isAccessible = true, route, title, trackingId, }) => {
13
+ const { disabled: downloadStatusDisabled, message } = useDownloadStatus();
14
+ const disabled = comingSoon || downloadStatusDisabled || !isAccessible;
15
+ return (_jsx(Tooltip, { arrow: true, title: message, children: _jsxs(StyledCard, { component: FluidPaper, disabled: disabled, elevation: 1, children: [_jsx(CardActionArea, { "aria-label": title, component: Link, disabled: disabled, href: route, id: trackingId }), _jsxs(CardContent, { children: [_jsxs(Stack, { alignItems: STACK_PROPS.ALIGN_ITEMS.FLEX_START, direction: STACK_PROPS.DIRECTION.ROW, gap: 2, useFlexGap: true, children: [icon, _jsx(Typography, { component: "h3", variant: TYPOGRAPHY_PROPS.VARIANT.HEADING_XSMALL, children: title })] }), _jsx(Typography, { component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.BODY_400_2_LINES, children: description }), footnote && (_jsx(Typography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.BODY_SMALL_400_2_LINES, children: footnote }))] }), _jsx(CardActions, { children: comingSoon ? (_jsx(Chip, { ...CHIP_PROPS })) : (_jsx(ChevronRightRounded, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT })) })] }) }));
14
16
  };
@@ -1,2 +1,8 @@
1
- import { Card } from "@mui/material";
2
- export declare const StyledCard: typeof Card;
1
+ import { CardProps } from "@mui/material";
2
+ interface Props extends CardProps {
3
+ disabled?: boolean;
4
+ }
5
+ export declare const StyledCard: import("@emotion/styled").StyledComponent<import("@mui/material").CardOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style" | "className" | "classes" | "children" | "sx" | "square" | "elevation" | "variant" | "raised"> & {
6
+ theme?: import("@emotion/react").Theme;
7
+ } & Props, {}, {}>;
8
+ export {};
@@ -2,7 +2,10 @@ import styled from "@emotion/styled";
2
2
  import { Card } from "@mui/material";
3
3
  import { PALETTE } from "../../../../styles/common/constants/palette";
4
4
  import { sectionPadding } from "../../../common/Section/section.styles";
5
- export const StyledCard = styled(Card) `
5
+ export const StyledCard = styled(Card, {
6
+ shouldForwardProp: (prop) => prop !== "disabled",
7
+ }) `
8
+ background-color: ${({ disabled }) => (disabled ? PALETTE.SMOKE_LIGHTEST : PALETTE.COMMON_WHITE)};
6
9
  ${sectionPadding};
7
10
  display: grid;
8
11
  gap: 16px;
@@ -13,11 +16,6 @@ export const StyledCard = styled(Card) `
13
16
  inset: 0;
14
17
  position: absolute; /* covers entire card */
15
18
  text-decoration: none;
16
-
17
- &.Mui-disabled {
18
- background-color: ${PALETTE.COMMON_WHITE};
19
- opacity: 0.6;
20
- }
21
19
  }
22
20
 
23
21
  .MuiCardContent-root {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "50.5.0",
3
+ "version": "50.6.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -0,0 +1,8 @@
1
+ import { ChipProps } from "@mui/material";
2
+ import { CHIP_PROPS as MUI_CHIP_PROPS } from "../../../../styles/common/mui/chip";
3
+
4
+ export const CHIP_PROPS: Partial<ChipProps> = {
5
+ color: MUI_CHIP_PROPS.COLOR.DEFAULT,
6
+ label: "Coming Soon",
7
+ variant: MUI_CHIP_PROPS.VARIANT.STATUS,
8
+ };
@@ -1,9 +1,16 @@
1
1
  import styled from "@emotion/styled";
2
- import { Card } from "@mui/material";
2
+ import { Card, CardProps } from "@mui/material";
3
3
  import { PALETTE } from "../../../../styles/common/constants/palette";
4
4
  import { sectionPadding } from "../../../common/Section/section.styles";
5
5
 
6
- export const StyledCard = styled(Card)`
6
+ interface Props extends CardProps {
7
+ disabled?: boolean;
8
+ }
9
+
10
+ export const StyledCard = styled(Card, {
11
+ shouldForwardProp: (prop) => prop !== "disabled",
12
+ })<Props>`
13
+ background-color: ${({ disabled }) => (disabled ? PALETTE.SMOKE_LIGHTEST : PALETTE.COMMON_WHITE)};
7
14
  ${sectionPadding};
8
15
  display: grid;
9
16
  gap: 16px;
@@ -14,11 +21,6 @@ export const StyledCard = styled(Card)`
14
21
  inset: 0;
15
22
  position: absolute; /* covers entire card */
16
23
  text-decoration: none;
17
-
18
- &.Mui-disabled {
19
- background-color: ${PALETTE.COMMON_WHITE};
20
- opacity: 0.6;
21
- }
22
24
  }
23
25
 
24
26
  .MuiCardContent-root {
@@ -37,4 +39,4 @@ export const StyledCard = styled(Card)`
37
39
  .MuiCardActions-root {
38
40
  padding: 0;
39
41
  }
40
- ` as typeof Card;
42
+ `;
@@ -3,6 +3,7 @@ import {
3
3
  CardActionArea,
4
4
  CardActions,
5
5
  CardContent,
6
+ Chip,
6
7
  Stack,
7
8
  Tooltip,
8
9
  Typography,
@@ -15,9 +16,11 @@ import { SVG_ICON_PROPS } from "../../../../styles/common/mui/svgIcon";
15
16
  import { TYPOGRAPHY_PROPS } from "../../../../styles/common/mui/typography";
16
17
  import { FluidPaper } from "../../../common/Paper/components/FluidPaper/fluidPaper";
17
18
  import { TrackingProps } from "../../../types";
19
+ import { CHIP_PROPS } from "./constants";
18
20
  import { StyledCard } from "./exportMethod.styles";
19
21
 
20
22
  export interface ExportMethodProps extends TrackingProps {
23
+ comingSoon?: boolean;
21
24
  description: ReactNode;
22
25
  footnote?: ReactNode;
23
26
  icon?: ReactNode;
@@ -27,6 +30,7 @@ export interface ExportMethodProps extends TrackingProps {
27
30
  }
28
31
 
29
32
  export const ExportMethod = ({
33
+ comingSoon,
30
34
  description,
31
35
  footnote,
32
36
  icon,
@@ -35,14 +39,15 @@ export const ExportMethod = ({
35
39
  title,
36
40
  trackingId,
37
41
  }: ExportMethodProps): JSX.Element => {
38
- const { disabled, message } = useDownloadStatus();
42
+ const { disabled: downloadStatusDisabled, message } = useDownloadStatus();
43
+ const disabled = comingSoon || downloadStatusDisabled || !isAccessible;
39
44
  return (
40
45
  <Tooltip arrow title={message}>
41
- <StyledCard component={FluidPaper} elevation={1}>
46
+ <StyledCard component={FluidPaper} disabled={disabled} elevation={1}>
42
47
  <CardActionArea
43
48
  aria-label={title}
44
49
  component={Link}
45
- disabled={disabled || !isAccessible}
50
+ disabled={disabled}
46
51
  href={route}
47
52
  id={trackingId}
48
53
  />
@@ -78,7 +83,11 @@ export const ExportMethod = ({
78
83
  )}
79
84
  </CardContent>
80
85
  <CardActions>
81
- <ChevronRightRounded color={SVG_ICON_PROPS.COLOR.INK_LIGHT} />
86
+ {comingSoon ? (
87
+ <Chip {...CHIP_PROPS} />
88
+ ) : (
89
+ <ChevronRightRounded color={SVG_ICON_PROPS.COLOR.INK_LIGHT} />
90
+ )}
82
91
  </CardActions>
83
92
  </StyledCard>
84
93
  </Tooltip>