@databiosphere/findable-ui 42.0.1 → 42.1.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
- ".": "42.0.1"
2
+ ".": "42.1.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [42.1.0](https://github.com/DataBiosphere/findable-ui/compare/v42.0.1...v42.1.0) (2025-08-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * create typography to css helper function ([#625](https://github.com/DataBiosphere/findable-ui/issues/625)) ([#626](https://github.com/DataBiosphere/findable-ui/issues/626)) ([2a78f7a](https://github.com/DataBiosphere/findable-ui/commit/2a78f7aa256617f9f1f058b2979849e865a668a0))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * fix category group filter label line height ([#627](https://github.com/DataBiosphere/findable-ui/issues/627)) ([#628](https://github.com/DataBiosphere/findable-ui/issues/628)) ([3bb93ce](https://github.com/DataBiosphere/findable-ui/commit/3bb93ce6f8cd4ad316d08809626638b45e238b56))
14
+ * fix pagination summary spacing ([#623](https://github.com/DataBiosphere/findable-ui/issues/623)) ([#624](https://github.com/DataBiosphere/findable-ui/issues/624)) ([b1bfd1f](https://github.com/DataBiosphere/findable-ui/commit/b1bfd1f6c4f1a7d53524ec8d584a97b9cd1dbe83))
15
+ * revert typography theme styles ([#630](https://github.com/DataBiosphere/findable-ui/issues/630)) ([#631](https://github.com/DataBiosphere/findable-ui/issues/631)) ([e9f037b](https://github.com/DataBiosphere/findable-ui/commit/e9f037b8e5c759533f7cb491e7b080c5496f6474))
16
+
3
17
  ## [42.0.1](https://github.com/DataBiosphere/findable-ui/compare/v42.0.0...v42.0.1) (2025-08-12)
4
18
 
5
19
 
@@ -53,7 +53,7 @@ export const Filters = ({ categoryFilters, className, disabled = false, onFilter
53
53
  }, [windowHeight]);
54
54
  return (React.createElement(FilterList, { className: className, "data-testid": TEST_IDS.FILTERS, disabled: disabled, height: height, ref: filterListRef, surfaceType: surfaceType }, categoryFilters.map(({ categoryViews, label }, i) => (React.createElement(Fragment, { key: i },
55
55
  i !== 0 && React.createElement(Divider, null),
56
- label && (React.createElement(StyledTypography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, variant: TYPOGRAPHY_PROPS.VARIANT.UPPERCASE_500 }, label)),
56
+ label && (React.createElement(StyledTypography, { color: TYPOGRAPHY_PROPS.COLOR.INK_LIGHT, component: "div", variant: TYPOGRAPHY_PROPS.VARIANT.UPPERCASE_500 }, label)),
57
57
  categoryViews.map((categoryView) => (React.createElement(Filter, { key: categoryView.key, categorySection: label, categoryView: categoryView, closeAncestor: onClose, onFilter: onFilter, surfaceType: surfaceType, trackFilterOpened: trackFilterOpened, tags: renderFilterTags(categoryView, onFilter) }))))))));
58
58
  };
59
59
  /**
@@ -1,3 +1,4 @@
1
+ import { Typography } from "@mui/material";
1
2
  import { FiltersProps } from "./filters";
2
3
  interface Props {
3
4
  height: number;
@@ -6,9 +7,5 @@ export declare const Filters: import("@emotion/styled").StyledComponent<{
6
7
  theme?: import("@emotion/react").Theme;
7
8
  as?: React.ElementType;
8
9
  } & Props & Pick<FiltersProps, "disabled" | "surfaceType">, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const StyledTypography: import("@emotion/styled").StyledComponent<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
10
- ref?: ((instance: HTMLSpanElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLSpanElement> | null | undefined;
11
- }, "p" | "style" | "order" | "bottom" | "height" | "left" | "right" | "top" | "width" | "className" | "classes" | "children" | "sx" | "color" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "boxSizing" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "visibility" | "whiteSpace" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint" | "align" | "variant" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
12
- theme?: import("@emotion/react").Theme;
13
- }, {}, {}>;
10
+ export declare const StyledTypography: typeof Typography;
14
11
  export {};
@@ -6,10 +6,13 @@ export const PaginationSummary = ({ firstResult, lastResult, totalResult, }) =>
6
6
  return (React.createElement(Fade, { in: totalResult > 0, unmountOnExit: true },
7
7
  React.createElement("div", { "data-testid": TEST_IDS.TABLE_PAGINATION_RESULTS },
8
8
  React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.BODY_400 }, "Results"),
9
+ " ",
9
10
  React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.BODY_SMALL_500 },
10
11
  firstResult,
11
12
  " - ",
12
13
  lastResult),
14
+ " ",
13
15
  React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.BODY_400 }, "of"),
16
+ " ",
14
17
  React.createElement(Typography, { variant: TYPOGRAPHY_PROPS.VARIANT.BODY_SMALL_500 }, totalResult))));
15
18
  };
@@ -0,0 +1,8 @@
1
+ import { SerializedStyles } from "@emotion/react";
2
+ import { ThemeProps } from "../../../theme/types";
3
+ /**
4
+ * Returns typography style for the given variant.
5
+ * @param variant - Typography variant key from the theme configuration.
6
+ * @returns Typography styles.
7
+ */
8
+ export declare function typographyToCSS(variant: keyof ThemeProps["theme"]["typography"]): (props: ThemeProps) => SerializedStyles;
@@ -0,0 +1,11 @@
1
+ import { css } from "@emotion/react";
2
+ /**
3
+ * Returns typography style for the given variant.
4
+ * @param variant - Typography variant key from the theme configuration.
5
+ * @returns Typography styles.
6
+ */
7
+ export function typographyToCSS(variant) {
8
+ return (props) => {
9
+ return css(props.theme.typography[variant]);
10
+ };
11
+ }
@@ -57,9 +57,11 @@ const heading = (theme) => ({
57
57
  fontFamily: "Inter",
58
58
  fontSize: "20px",
59
59
  fontWeight: 500,
60
+ letterSpacing: "-0.2px",
60
61
  lineHeight: "28px",
61
62
  [bpUpSm({ theme })]: {
62
63
  fontSize: "24px",
64
+ letterSpacing: "-0.4px",
63
65
  lineHeight: "32px",
64
66
  },
65
67
  });
@@ -67,9 +69,11 @@ const headingLarge = (theme) => ({
67
69
  fontFamily: "Inter",
68
70
  fontSize: "24px",
69
71
  fontWeight: 500,
72
+ letterSpacing: "-0.4px",
70
73
  lineHeight: "32px",
71
74
  [bpUpSm({ theme })]: {
72
- fontSize: "32px",
75
+ fontSize: "30px",
76
+ letterSpacing: "-0.8px",
73
77
  lineHeight: "40px",
74
78
  },
75
79
  });
@@ -80,6 +84,7 @@ const headingSmall = (theme) => ({
80
84
  lineHeight: "26px",
81
85
  [bpUpSm({ theme })]: {
82
86
  fontSize: "20px",
87
+ letterSpacing: "-0.2px",
83
88
  lineHeight: "28px",
84
89
  },
85
90
  });
@@ -91,8 +96,8 @@ const headingXLarge = (theme) => ({
91
96
  lineHeight: "40px",
92
97
  [bpUpSm({ theme })]: {
93
98
  fontSize: "40px",
94
- letterSpacing: "-0.4px",
95
- lineHeight: "48px",
99
+ letterSpacing: "-1.4px",
100
+ lineHeight: "56px",
96
101
  },
97
102
  });
98
103
  const headingXSmall = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databiosphere/findable-ui",
3
- "version": "42.0.1",
3
+ "version": "42.1.0",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
@@ -42,4 +42,4 @@ export const Filters = styled("div")<
42
42
 
43
43
  export const StyledTypography = styled(Typography)`
44
44
  padding: 8px;
45
- `;
45
+ ` as typeof Typography;
@@ -103,6 +103,7 @@ export const Filters = ({
103
103
  {label && (
104
104
  <StyledTypography
105
105
  color={TYPOGRAPHY_PROPS.COLOR.INK_LIGHT}
106
+ component="div"
106
107
  variant={TYPOGRAPHY_PROPS.VARIANT.UPPERCASE_500}
107
108
  >
108
109
  {label}
@@ -19,11 +19,11 @@ export const PaginationSummary = ({
19
19
  <div data-testid={TEST_IDS.TABLE_PAGINATION_RESULTS}>
20
20
  <Typography variant={TYPOGRAPHY_PROPS.VARIANT.BODY_400}>
21
21
  Results
22
- </Typography>
22
+ </Typography>{" "}
23
23
  <Typography variant={TYPOGRAPHY_PROPS.VARIANT.BODY_SMALL_500}>
24
24
  {firstResult} - {lastResult}
25
- </Typography>
26
- <Typography variant={TYPOGRAPHY_PROPS.VARIANT.BODY_400}>of</Typography>
25
+ </Typography>{" "}
26
+ <Typography variant={TYPOGRAPHY_PROPS.VARIANT.BODY_400}>of</Typography>{" "}
27
27
  <Typography variant={TYPOGRAPHY_PROPS.VARIANT.BODY_SMALL_500}>
28
28
  {totalResult}
29
29
  </Typography>
@@ -0,0 +1,15 @@
1
+ import { css, SerializedStyles } from "@emotion/react";
2
+ import { ThemeProps } from "../../../theme/types";
3
+
4
+ /**
5
+ * Returns typography style for the given variant.
6
+ * @param variant - Typography variant key from the theme configuration.
7
+ * @returns Typography styles.
8
+ */
9
+ export function typographyToCSS(
10
+ variant: keyof ThemeProps["theme"]["typography"]
11
+ ) {
12
+ return (props: ThemeProps): SerializedStyles => {
13
+ return css(props.theme.typography[variant]);
14
+ };
15
+ }
@@ -72,9 +72,11 @@ const heading = (theme: Theme): TypographyStyle => ({
72
72
  fontFamily: "Inter",
73
73
  fontSize: "20px",
74
74
  fontWeight: 500,
75
+ letterSpacing: "-0.2px",
75
76
  lineHeight: "28px",
76
77
  [bpUpSm({ theme })]: {
77
78
  fontSize: "24px",
79
+ letterSpacing: "-0.4px",
78
80
  lineHeight: "32px",
79
81
  },
80
82
  });
@@ -83,9 +85,11 @@ const headingLarge = (theme: Theme): TypographyStyle => ({
83
85
  fontFamily: "Inter",
84
86
  fontSize: "24px",
85
87
  fontWeight: 500,
88
+ letterSpacing: "-0.4px",
86
89
  lineHeight: "32px",
87
90
  [bpUpSm({ theme })]: {
88
- fontSize: "32px",
91
+ fontSize: "30px",
92
+ letterSpacing: "-0.8px",
89
93
  lineHeight: "40px",
90
94
  },
91
95
  });
@@ -97,6 +101,7 @@ const headingSmall = (theme: Theme): TypographyStyle => ({
97
101
  lineHeight: "26px",
98
102
  [bpUpSm({ theme })]: {
99
103
  fontSize: "20px",
104
+ letterSpacing: "-0.2px",
100
105
  lineHeight: "28px",
101
106
  },
102
107
  });
@@ -109,8 +114,8 @@ const headingXLarge = (theme: Theme): TypographyStyle => ({
109
114
  lineHeight: "40px",
110
115
  [bpUpSm({ theme })]: {
111
116
  fontSize: "40px",
112
- letterSpacing: "-0.4px",
113
- lineHeight: "48px",
117
+ letterSpacing: "-1.4px",
118
+ lineHeight: "56px",
114
119
  },
115
120
  });
116
121