@databiosphere/findable-ui 41.0.0 → 41.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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +7 -0
- package/lib/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.js +11 -1
- package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.js +2 -1
- package/lib/theme/common/components.js +10 -1
- package/package.json +1 -1
- package/src/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.tsx +13 -2
- package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.tsx +2 -0
- package/src/theme/common/components.ts +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [41.1.0](https://github.com/DataBiosphere/findable-ui/compare/v41.0.0...v41.1.0) (2025-07-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* update data dictionary column filter button size to large ([#603](https://github.com/DataBiosphere/findable-ui/issues/603)) ([#604](https://github.com/DataBiosphere/findable-ui/issues/604)) ([a1d7c76](https://github.com/DataBiosphere/findable-ui/commit/a1d7c76bad1386c7c56bbb4c5f65f9905addc71e))
|
|
9
|
+
|
|
3
10
|
## [41.0.0](https://github.com/DataBiosphere/findable-ui/compare/v40.0.0...v41.0.0) (2025-07-30)
|
|
4
11
|
|
|
5
12
|
|
package/lib/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ButtonGroup, useMediaQuery } from "@mui/material";
|
|
2
2
|
import React from "react";
|
|
3
|
+
import { BUTTON_PROPS } from "../../../../../../styles/common/mui/button";
|
|
3
4
|
import { BUTTON_GROUP_PROPS } from "../../../../../common/ButtonGroup/constants";
|
|
4
5
|
import { ColumnFiltersAdapter } from "../../../../../Filter/components/adapters/tanstack/ColumnFiltersAdapter/columnFiltersAdapter";
|
|
6
|
+
import { Button } from "../../../../../Filter/components/surfaces/drawer/components/Button/button";
|
|
5
7
|
import { Drawer } from "../../../../../Filter/components/surfaces/drawer/Drawer/drawer";
|
|
6
8
|
import { ColumnFilter } from "../../../../../Table/components/TableFeatures/ColumnFilter/columnFilter";
|
|
7
9
|
export const ColumnFilters = ({ table, }) => {
|
|
@@ -12,6 +14,14 @@ export const ColumnFilters = ({ table, }) => {
|
|
|
12
14
|
if (!enableColumnFilters)
|
|
13
15
|
return null;
|
|
14
16
|
if (isDrawer)
|
|
15
|
-
return (React.createElement(ColumnFiltersAdapter, { table: table, renderSurface: (props) => React.createElement(Drawer, { ...props }) }));
|
|
17
|
+
return (React.createElement(ColumnFiltersAdapter, { table: table, renderSurface: (props) => React.createElement(Drawer, { Button: renderButton, ...props }) }));
|
|
16
18
|
return (React.createElement(ButtonGroup, { ...BUTTON_GROUP_PROPS.SECONDARY_OUTLINED }, columnFilters.map((column) => (React.createElement(ColumnFilter, { key: column.id, column: column })))));
|
|
17
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Renders the drawer's open button with the specified size.
|
|
22
|
+
* @param props - Button props.
|
|
23
|
+
* @returns Button.
|
|
24
|
+
*/
|
|
25
|
+
function renderButton(props) {
|
|
26
|
+
return React.createElement(Button, { size: BUTTON_PROPS.SIZE.LARGE, ...props });
|
|
27
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Grid, Typography } from "@mui/material";
|
|
2
2
|
import React, { Fragment, useCallback } from "react";
|
|
3
|
+
import { BUTTON_PROPS } from "../../../../../styles/common/mui/button";
|
|
3
4
|
import { SVG_ICON_PROPS } from "../../../../../styles/common/mui/svgIcon";
|
|
4
5
|
import { TYPOGRAPHY_PROPS } from "../../../../../styles/common/mui/typography";
|
|
5
6
|
import { DropDownIcon } from "../../../../common/Form/components/Select/components/DropDownIcon/dropDownIcon";
|
|
@@ -28,7 +29,7 @@ export const ColumnFilter = ({ Button = StyledButton, className, column, ...prop
|
|
|
28
29
|
column.setFilterValue(updater(value));
|
|
29
30
|
}, [column]);
|
|
30
31
|
return (React.createElement(Fragment, null,
|
|
31
|
-
React.createElement(Button, { disabled: sortedValues.length === 0, endIcon: React.createElement(DropDownIcon, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }), onClick: onOpen, open: open },
|
|
32
|
+
React.createElement(Button, { disabled: sortedValues.length === 0, endIcon: React.createElement(DropDownIcon, { color: SVG_ICON_PROPS.COLOR.INK_LIGHT }), onClick: onOpen, open: open, size: BUTTON_PROPS.SIZE.LARGE },
|
|
32
33
|
React.createElement(Grid, { ...GRID_PROPS },
|
|
33
34
|
getColumnHeader(column),
|
|
34
35
|
React.createElement(FilterCountChip, { count: filterValue.length }))),
|
|
@@ -241,7 +241,16 @@ export const MuiButton = (theme) => {
|
|
|
241
241
|
variants: [
|
|
242
242
|
{
|
|
243
243
|
props: { size: BUTTON_PROPS.SIZE.LARGE },
|
|
244
|
-
style: {
|
|
244
|
+
style: {
|
|
245
|
+
padding: "10px 16px",
|
|
246
|
+
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
247
|
+
".MuiButton-iconSizeLarge": {
|
|
248
|
+
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
249
|
+
".MuiSvgIcon-root": {
|
|
250
|
+
fontSize: "20px",
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
},
|
|
245
254
|
},
|
|
246
255
|
{
|
|
247
256
|
props: { size: BUTTON_PROPS.SIZE.MEDIUM },
|
package/package.json
CHANGED
package/src/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.tsx
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { ButtonGroup, Theme, useMediaQuery } from "@mui/material";
|
|
2
2
|
import { RowData } from "@tanstack/react-table";
|
|
3
|
-
import React from "react";
|
|
3
|
+
import React, { ComponentProps } from "react";
|
|
4
4
|
import { Attribute } from "../../../../../../common/entities";
|
|
5
|
+
import { BUTTON_PROPS } from "../../../../../../styles/common/mui/button";
|
|
5
6
|
import { BUTTON_GROUP_PROPS } from "../../../../../common/ButtonGroup/constants";
|
|
6
7
|
import { ColumnFiltersAdapter } from "../../../../../Filter/components/adapters/tanstack/ColumnFiltersAdapter/columnFiltersAdapter";
|
|
8
|
+
import { Button } from "../../../../../Filter/components/surfaces/drawer/components/Button/button";
|
|
7
9
|
import { Drawer } from "../../../../../Filter/components/surfaces/drawer/Drawer/drawer";
|
|
8
10
|
import { ColumnFilter } from "../../../../../Table/components/TableFeatures/ColumnFilter/columnFilter";
|
|
9
11
|
import { ColumnFiltersProps } from "./types";
|
|
@@ -22,7 +24,7 @@ export const ColumnFilters = <T extends RowData = Attribute>({
|
|
|
22
24
|
return (
|
|
23
25
|
<ColumnFiltersAdapter
|
|
24
26
|
table={table}
|
|
25
|
-
renderSurface={(props) => <Drawer {...props} />}
|
|
27
|
+
renderSurface={(props) => <Drawer Button={renderButton} {...props} />}
|
|
26
28
|
/>
|
|
27
29
|
);
|
|
28
30
|
|
|
@@ -34,3 +36,12 @@ export const ColumnFilters = <T extends RowData = Attribute>({
|
|
|
34
36
|
</ButtonGroup>
|
|
35
37
|
);
|
|
36
38
|
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Renders the drawer's open button with the specified size.
|
|
42
|
+
* @param props - Button props.
|
|
43
|
+
* @returns Button.
|
|
44
|
+
*/
|
|
45
|
+
function renderButton(props: ComponentProps<typeof Button>): JSX.Element {
|
|
46
|
+
return <Button size={BUTTON_PROPS.SIZE.LARGE} {...props} />;
|
|
47
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Grid, Typography } from "@mui/material";
|
|
2
2
|
import { RowData } from "@tanstack/react-table";
|
|
3
3
|
import React, { Fragment, useCallback } from "react";
|
|
4
|
+
import { BUTTON_PROPS } from "../../../../../styles/common/mui/button";
|
|
4
5
|
import { SVG_ICON_PROPS } from "../../../../../styles/common/mui/svgIcon";
|
|
5
6
|
import { TYPOGRAPHY_PROPS } from "../../../../../styles/common/mui/typography";
|
|
6
7
|
import { DropDownIcon } from "../../../../common/Form/components/Select/components/DropDownIcon/dropDownIcon";
|
|
@@ -51,6 +52,7 @@ export const ColumnFilter = <T extends RowData>({
|
|
|
51
52
|
endIcon={<DropDownIcon color={SVG_ICON_PROPS.COLOR.INK_LIGHT} />}
|
|
52
53
|
onClick={onOpen}
|
|
53
54
|
open={open}
|
|
55
|
+
size={BUTTON_PROPS.SIZE.LARGE}
|
|
54
56
|
>
|
|
55
57
|
<Grid {...GRID_PROPS}>
|
|
56
58
|
{getColumnHeader(column)}
|
|
@@ -258,7 +258,16 @@ export const MuiButton = (theme: Theme): Components["MuiButton"] => {
|
|
|
258
258
|
variants: [
|
|
259
259
|
{
|
|
260
260
|
props: { size: BUTTON_PROPS.SIZE.LARGE },
|
|
261
|
-
style: {
|
|
261
|
+
style: {
|
|
262
|
+
padding: "10px 16px",
|
|
263
|
+
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
264
|
+
".MuiButton-iconSizeLarge": {
|
|
265
|
+
// eslint-disable-next-line sort-keys -- disabling key order for readability
|
|
266
|
+
".MuiSvgIcon-root": {
|
|
267
|
+
fontSize: "20px",
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
},
|
|
262
271
|
},
|
|
263
272
|
{
|
|
264
273
|
props: { size: BUTTON_PROPS.SIZE.MEDIUM },
|