@databiosphere/findable-ui 40.0.0 → 41.0.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.
Files changed (201) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +22 -0
  3. package/lib/common/entities.d.ts +8 -0
  4. package/lib/common/entities.js +4 -1
  5. package/lib/components/DataDictionary/components/Description/description.js +2 -2
  6. package/lib/components/DataDictionary/components/Description/description.styles.d.ts +1 -1
  7. package/lib/components/DataDictionary/components/Description/description.styles.js +2 -2
  8. package/lib/components/DataDictionary/components/Entity/entity.styles.js +5 -0
  9. package/lib/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.js +4 -1
  10. package/lib/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.js +6 -1
  11. package/lib/components/DataDictionary/components/Filters/filters.styles.js +0 -5
  12. package/lib/components/DataDictionary/components/Filters/stories/constants.d.ts +1 -0
  13. package/lib/components/DataDictionary/components/Filters/stories/constants.js +1 -0
  14. package/lib/components/DataDictionary/components/Filters/stories/filters.stories.js +9 -3
  15. package/lib/components/DataDictionary/components/Filters/stories/utils.d.ts +7 -0
  16. package/lib/components/DataDictionary/components/Filters/stories/utils.js +12 -0
  17. package/lib/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.js +2 -2
  18. package/lib/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.js +6 -2
  19. package/lib/components/DataDictionary/components/Layout/components/OutlineLayout/outlineLayout.styles.js +2 -2
  20. package/lib/components/DataDictionary/components/Layout/components/TitleLayout/titleLayout.styles.js +6 -2
  21. package/lib/components/DataDictionary/components/Table/table.js +7 -4
  22. package/lib/components/DataDictionary/components/Table/table.styles.d.ts +1 -1
  23. package/lib/components/DataDictionary/components/Table/table.styles.js +2 -2
  24. package/lib/components/DataDictionary/components/Title/title.styles.js +2 -2
  25. package/lib/components/DataDictionary/dataDictionary.styles.d.ts +0 -1
  26. package/lib/components/DataDictionary/dataDictionary.styles.js +8 -8
  27. package/lib/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.js +2 -2
  28. package/lib/components/Filter/components/Filter/filter.d.ts +3 -2
  29. package/lib/components/Filter/components/Filter/filter.js +13 -11
  30. package/lib/components/Filter/components/Filter/filter.styles.d.ts +3 -5
  31. package/lib/components/Filter/components/Filter/filter.styles.js +16 -19
  32. package/lib/components/Filter/components/Filter/stories/args.js +3 -2
  33. package/lib/components/Filter/components/FilterLabel/filterLabel.d.ts +3 -1
  34. package/lib/components/Filter/components/FilterLabel/filterLabel.js +3 -3
  35. package/lib/components/Filter/components/FilterLabel/filterLabel.stories.d.ts +3 -1
  36. package/lib/components/Filter/components/FilterLabel/filterLabel.stories.js +2 -0
  37. package/lib/components/Filter/components/FilterLabel/filterLabel.styles.d.ts +3 -6
  38. package/lib/components/Filter/components/FilterLabel/filterLabel.styles.js +16 -13
  39. package/lib/components/Filter/components/FilterList/filterList.styles.d.ts +1 -1
  40. package/lib/components/Filter/components/FilterList/filterList.styles.js +1 -1
  41. package/lib/components/Filter/components/FilterMenu/filterMenu.d.ts +3 -2
  42. package/lib/components/Filter/components/FilterMenu/filterMenu.js +11 -11
  43. package/lib/components/Filter/components/FilterMenu/filterMenu.stories.d.ts +3 -2
  44. package/lib/components/Filter/components/FilterMenu/filterMenu.stories.js +2 -1
  45. package/lib/components/Filter/components/FilterMenu/filterMenu.styles.d.ts +2 -6
  46. package/lib/components/Filter/components/FilterMenu/filterMenu.styles.js +7 -17
  47. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.d.ts +3 -1
  48. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.js +3 -3
  49. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.styles.d.ts +3 -2
  50. package/lib/components/Filter/components/FilterMenuSearch/filterMenuSearch.styles.js +9 -5
  51. package/lib/components/Filter/components/FilterRange/filterRange.d.ts +1 -1
  52. package/lib/components/Filter/components/FilterRange/filterRange.js +7 -8
  53. package/lib/components/Filter/components/FilterRange/filterRange.styles.d.ts +2 -1
  54. package/lib/components/Filter/components/FilterRange/filterRange.styles.js +20 -16
  55. package/lib/components/Filter/components/FilterRange/stories/args.js +2 -1
  56. package/lib/components/Filter/components/FilterRange/types.d.ts +2 -1
  57. package/lib/components/Filter/components/Filters/filters.d.ts +5 -2
  58. package/lib/components/Filter/components/Filters/filters.js +7 -8
  59. package/lib/components/Filter/components/Filters/filters.styles.d.ts +6 -5
  60. package/lib/components/Filter/components/Filters/filters.styles.js +11 -11
  61. package/lib/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.js +2 -2
  62. package/lib/components/Filter/components/VariableSizeList/VariableSizeList.d.ts +3 -2
  63. package/lib/components/Filter/components/VariableSizeList/VariableSizeList.js +9 -8
  64. package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/columnFiltersAdapter.d.ts +3 -0
  65. package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/columnFiltersAdapter.js +24 -0
  66. package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/types.d.ts +6 -0
  67. package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/types.js +1 -0
  68. package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/utils.d.ts +14 -0
  69. package/lib/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/utils.js +67 -0
  70. package/lib/components/Filter/components/controls/Controls/controls.d.ts +6 -0
  71. package/lib/components/Filter/components/controls/Controls/controls.js +14 -0
  72. package/lib/components/Filter/components/controls/Controls/controls.styles.d.ts +7 -0
  73. package/lib/components/Filter/components/controls/Controls/controls.styles.js +9 -0
  74. package/lib/components/Filter/components/surfaces/drawer/Drawer/constants.d.ts +2 -0
  75. package/lib/components/Filter/components/surfaces/drawer/Drawer/constants.js +5 -0
  76. package/lib/components/Filter/components/surfaces/drawer/Drawer/drawer.d.ts +2 -0
  77. package/lib/components/Filter/components/surfaces/drawer/Drawer/drawer.js +17 -0
  78. package/lib/components/Filter/components/surfaces/drawer/Drawer/drawer.styles.d.ts +3 -0
  79. package/lib/components/Filter/components/surfaces/drawer/Drawer/drawer.styles.js +19 -0
  80. package/lib/components/Filter/components/surfaces/drawer/Drawer/types.d.ts +7 -0
  81. package/lib/components/Filter/components/surfaces/drawer/Drawer/types.js +1 -0
  82. package/lib/components/Filter/components/surfaces/drawer/components/Button/button.d.ts +7 -0
  83. package/lib/components/Filter/components/surfaces/drawer/components/Button/button.js +16 -0
  84. package/lib/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.d.ts +6 -0
  85. package/lib/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.js +14 -0
  86. package/lib/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.styles.d.ts +5 -0
  87. package/lib/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.styles.js +12 -0
  88. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/constants.d.ts +3 -0
  89. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/constants.js +9 -0
  90. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.d.ts +6 -0
  91. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.js +13 -0
  92. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.styles.d.ts +5 -0
  93. package/lib/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.styles.js +9 -0
  94. package/lib/components/Filter/components/surfaces/types.d.ts +11 -0
  95. package/lib/components/Filter/components/surfaces/types.js +5 -0
  96. package/lib/components/Filter/components/views/select/SelectListItem/selectListItem.d.ts +3 -0
  97. package/lib/components/Filter/components/views/select/SelectListItem/selectListItem.js +9 -0
  98. package/lib/components/Filter/components/views/select/SelectListItem/types.d.ts +12 -0
  99. package/lib/components/Filter/components/views/select/SelectListItem/types.js +1 -0
  100. package/lib/components/Filter/components/views/select/components/Checkbox/checkbox.d.ts +3 -0
  101. package/lib/components/Filter/components/views/select/components/Checkbox/checkbox.js +7 -0
  102. package/lib/components/Filter/components/views/select/components/ListItemButton/listItemButton.d.ts +7 -0
  103. package/lib/components/Filter/components/views/select/components/ListItemButton/listItemButton.js +5 -0
  104. package/lib/components/Filter/components/views/select/components/ListItemButton/listItemButton.styles.d.ts +5 -0
  105. package/lib/components/Filter/components/views/select/components/ListItemButton/listItemButton.styles.js +11 -0
  106. package/lib/components/Filter/components/views/select/components/ListItemText/components/Count/count.d.ts +3 -0
  107. package/lib/components/Filter/components/views/select/components/ListItemText/components/Count/count.js +6 -0
  108. package/lib/components/Filter/components/views/select/components/ListItemText/components/Term/term.d.ts +3 -0
  109. package/lib/components/Filter/components/views/select/components/ListItemText/components/Term/term.js +6 -0
  110. package/lib/components/Filter/components/views/select/components/ListItemText/listItemText.d.ts +3 -0
  111. package/lib/components/Filter/components/views/select/components/ListItemText/listItemText.js +26 -0
  112. package/lib/components/Filter/components/views/select/components/ListItemText/listItemText.styles.d.ts +3 -0
  113. package/lib/components/Filter/components/views/select/components/ListItemText/listItemText.styles.js +12 -0
  114. package/lib/components/Table/components/TableFeatures/ColumnFilter/columnFilter.js +23 -8
  115. package/lib/components/Table/components/TableFeatures/ColumnFilter/constants.js +5 -0
  116. package/lib/components/common/Button/constants.js +4 -0
  117. package/lib/components/common/Drawer/provider/provider.d.ts +2 -4
  118. package/lib/components/common/Drawer/provider/provider.js +4 -2
  119. package/lib/components/common/Drawer/provider/types.d.ts +5 -1
  120. package/lib/hooks/useCategoryFilter.d.ts +2 -2
  121. package/lib/styles/common/mixins/breakpoints.d.ts +2 -0
  122. package/lib/styles/common/mixins/breakpoints.js +2 -0
  123. package/lib/styles/common/mui/typography.js +2 -0
  124. package/lib/utils/typeGuards.d.ts +6 -0
  125. package/lib/utils/typeGuards.js +8 -0
  126. package/lib/views/ExploreView/exploreView.js +4 -1
  127. package/package.json +1 -1
  128. package/src/common/entities.ts +10 -0
  129. package/src/components/DataDictionary/components/Description/description.styles.ts +2 -2
  130. package/src/components/DataDictionary/components/Description/description.tsx +3 -6
  131. package/src/components/DataDictionary/components/Entity/entity.styles.ts +5 -0
  132. package/src/components/DataDictionary/components/Filters/components/ColumnFilterTags/columnFilterTags.tsx +4 -1
  133. package/src/components/DataDictionary/components/Filters/components/ColumnFilters/columnFilters.tsx +12 -1
  134. package/src/components/DataDictionary/components/Filters/filters.styles.ts +0 -5
  135. package/src/components/DataDictionary/components/Filters/stories/constants.ts +2 -0
  136. package/src/components/DataDictionary/components/Filters/stories/filters.stories.tsx +11 -4
  137. package/src/components/DataDictionary/components/Filters/stories/utils.ts +15 -0
  138. package/src/components/DataDictionary/components/Layout/components/EntitiesLayout/entitiesLayout.styles.ts +2 -2
  139. package/src/components/DataDictionary/components/Layout/components/FiltersLayout/filtersLayout.styles.ts +9 -2
  140. package/src/components/DataDictionary/components/Layout/components/OutlineLayout/outlineLayout.styles.ts +2 -2
  141. package/src/components/DataDictionary/components/Layout/components/TitleLayout/titleLayout.styles.ts +9 -2
  142. package/src/components/DataDictionary/components/Table/table.styles.ts +2 -2
  143. package/src/components/DataDictionary/components/Table/table.tsx +8 -4
  144. package/src/components/DataDictionary/components/Title/title.styles.ts +2 -2
  145. package/src/components/DataDictionary/dataDictionary.styles.ts +11 -9
  146. package/src/components/Detail/components/Table/components/TableRows/components/CollapsableRows/collapsableRows.tsx +1 -1
  147. package/src/components/Filter/components/Filter/filter.styles.ts +18 -20
  148. package/src/components/Filter/components/Filter/filter.tsx +17 -19
  149. package/src/components/Filter/components/Filter/stories/args.ts +3 -2
  150. package/src/components/Filter/components/FilterLabel/filterLabel.stories.tsx +2 -0
  151. package/src/components/Filter/components/FilterLabel/filterLabel.styles.ts +20 -19
  152. package/src/components/Filter/components/FilterLabel/filterLabel.tsx +7 -3
  153. package/src/components/Filter/components/FilterList/filterList.styles.ts +1 -1
  154. package/src/components/Filter/components/FilterMenu/filterMenu.stories.tsx +2 -1
  155. package/src/components/Filter/components/FilterMenu/filterMenu.styles.ts +9 -18
  156. package/src/components/Filter/components/FilterMenu/filterMenu.tsx +15 -19
  157. package/src/components/Filter/components/FilterMenuSearch/filterMenuSearch.styles.ts +11 -5
  158. package/src/components/Filter/components/FilterMenuSearch/filterMenuSearch.tsx +5 -1
  159. package/src/components/Filter/components/FilterRange/filterRange.styles.ts +25 -19
  160. package/src/components/Filter/components/FilterRange/filterRange.tsx +8 -12
  161. package/src/components/Filter/components/FilterRange/stories/args.ts +2 -1
  162. package/src/components/Filter/components/FilterRange/types.ts +2 -1
  163. package/src/components/Filter/components/Filters/filters.styles.ts +16 -16
  164. package/src/components/Filter/components/Filters/filters.tsx +19 -13
  165. package/src/components/Filter/components/SearchAllFilters/components/VariableSizeList/VariableSizeList.tsx +2 -2
  166. package/src/components/Filter/components/VariableSizeList/VariableSizeList.tsx +10 -9
  167. package/src/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/columnFiltersAdapter.tsx +44 -0
  168. package/src/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/types.ts +7 -0
  169. package/src/components/Filter/components/adapters/tanstack/ColumnFiltersAdapter/utils.ts +90 -0
  170. package/src/components/Filter/components/controls/Controls/controls.styles.ts +10 -0
  171. package/src/components/Filter/components/controls/Controls/controls.tsx +31 -0
  172. package/src/components/Filter/components/surfaces/drawer/Drawer/constants.ts +7 -0
  173. package/src/components/Filter/components/surfaces/drawer/Drawer/drawer.styles.ts +20 -0
  174. package/src/components/Filter/components/surfaces/drawer/Drawer/drawer.tsx +46 -0
  175. package/src/components/Filter/components/surfaces/drawer/Drawer/types.ts +11 -0
  176. package/src/components/Filter/components/surfaces/drawer/components/Button/button.tsx +40 -0
  177. package/src/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.styles.ts +13 -0
  178. package/src/components/Filter/components/surfaces/drawer/components/ButtonBase/buttonBase.tsx +25 -0
  179. package/src/components/Filter/components/surfaces/drawer/components/IconButton/constants.ts +12 -0
  180. package/src/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.styles.ts +10 -0
  181. package/src/components/Filter/components/surfaces/drawer/components/IconButton/iconButton.tsx +28 -0
  182. package/src/components/Filter/components/surfaces/types.ts +13 -0
  183. package/src/components/Filter/components/views/select/SelectListItem/selectListItem.tsx +19 -0
  184. package/src/components/Filter/components/views/select/SelectListItem/types.ts +14 -0
  185. package/src/components/Filter/components/views/select/components/Checkbox/checkbox.tsx +19 -0
  186. package/src/components/Filter/components/views/select/components/ListItemButton/listItemButton.styles.ts +12 -0
  187. package/src/components/Filter/components/views/select/components/ListItemButton/listItemButton.tsx +25 -0
  188. package/src/components/Filter/components/views/select/components/ListItemText/components/Count/count.tsx +20 -0
  189. package/src/components/Filter/components/views/select/components/ListItemText/components/Term/term.tsx +19 -0
  190. package/src/components/Filter/components/views/select/components/ListItemText/listItemText.styles.ts +13 -0
  191. package/src/components/Filter/components/views/select/components/ListItemText/listItemText.tsx +48 -0
  192. package/src/components/Table/components/TableFeatures/ColumnFilter/columnFilter.tsx +34 -35
  193. package/src/components/Table/components/TableFeatures/ColumnFilter/constants.ts +5 -0
  194. package/src/components/common/Button/constants.ts +4 -0
  195. package/src/components/common/Drawer/provider/provider.tsx +7 -8
  196. package/src/components/common/Drawer/provider/types.ts +6 -4
  197. package/src/hooks/useCategoryFilter.ts +2 -1
  198. package/src/styles/common/mixins/breakpoints.ts +6 -0
  199. package/src/styles/common/mui/typography.ts +2 -0
  200. package/src/utils/typeGuards.ts +8 -0
  201. package/src/views/ExploreView/exploreView.tsx +4 -0
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "40.0.0"
2
+ ".": "41.0.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # Changelog
2
2
 
3
+ ## [41.0.0](https://github.com/DataBiosphere/findable-ui/compare/v40.0.0...v41.0.0) (2025-07-30)
4
+
5
+
6
+ ### ⚠ BREAKING CHANGES
7
+
8
+ * create filter drawer component ([#597](https://github.com/DataBiosphere/findable-ui/issues/597)) (#598)
9
+
10
+ ### Features
11
+
12
+ * add primary text to button constants ([#588](https://github.com/DataBiosphere/findable-ui/issues/588)) ([#589](https://github.com/DataBiosphere/findable-ui/issues/589)) ([2d708cc](https://github.com/DataBiosphere/findable-ui/commit/2d708cc710159f5539330509b2e6beca10b2fa88))
13
+ * create filter button component ([#592](https://github.com/DataBiosphere/findable-ui/issues/592)) ([#594](https://github.com/DataBiosphere/findable-ui/issues/594)) ([b30098a](https://github.com/DataBiosphere/findable-ui/commit/b30098a4a5f12e9dd5c5aed8526ecb8077015ac2))
14
+ * create filter drawer component ([#597](https://github.com/DataBiosphere/findable-ui/issues/597)) ([#598](https://github.com/DataBiosphere/findable-ui/issues/598)) ([8352876](https://github.com/DataBiosphere/findable-ui/commit/8352876fd1934e9d0877ce4a97c01eaf8a60c295))
15
+ * create select filter item component ([#595](https://github.com/DataBiosphere/findable-ui/issues/595)) ([#596](https://github.com/DataBiosphere/findable-ui/issues/596)) ([b63e3bb](https://github.com/DataBiosphere/findable-ui/commit/b63e3bb793396e5ec220f2f9e85097a0fdeddd52))
16
+ * make data dictionary table row-collapse for smaller viewports ([#600](https://github.com/DataBiosphere/findable-ui/issues/600)) ([#601](https://github.com/DataBiosphere/findable-ui/issues/601)) ([88d0490](https://github.com/DataBiosphere/findable-ui/commit/88d0490bc8b659020f20abb5c1abd3136829d74b))
17
+ * update data dictionary smaller viewport navigation and search bar layouts ([#583](https://github.com/DataBiosphere/findable-ui/issues/583)) ([#584](https://github.com/DataBiosphere/findable-ui/issues/584)) ([20b9a53](https://github.com/DataBiosphere/findable-ui/commit/20b9a53cdc390fe85bfdf82845e7d6964f4d0cc3))
18
+
19
+
20
+ ### Code Refactoring
21
+
22
+ * columnfilter menu list prop component to be "div" rather than "ul" ([#590](https://github.com/DataBiosphere/findable-ui/issues/590)) ([#591](https://github.com/DataBiosphere/findable-ui/issues/591)) ([c504b99](https://github.com/DataBiosphere/findable-ui/commit/c504b99936b74b4f7e05b18ac69e2eef8336264d))
23
+ * drawerprovider to expose onClose via render prop ([#585](https://github.com/DataBiosphere/findable-ui/issues/585)) ([#587](https://github.com/DataBiosphere/findable-ui/issues/587)) ([2107c41](https://github.com/DataBiosphere/findable-ui/commit/2107c41545fbad344077f6c87bf1b27d2ac21a22))
24
+
3
25
  ## [40.0.0](https://github.com/DataBiosphere/findable-ui/compare/v39.1.0...v40.0.0) (2025-07-24)
4
26
 
5
27
 
@@ -19,6 +19,14 @@ export interface Attribute {
19
19
  * Filterable metadata keys.
20
20
  */
21
21
  export type CategoryKey = string;
22
+ /**
23
+ * Clear all filters key.
24
+ */
25
+ export declare const CLEAR_ALL: "CLEAR_ALL";
26
+ /**
27
+ * Clear all filters type.
28
+ */
29
+ export type ClearAll = typeof CLEAR_ALL;
22
30
  /**
23
31
  * View model of category tag.
24
32
  */
@@ -1 +1,4 @@
1
- export {};
1
+ /**
2
+ * Clear all filters key.
3
+ */
4
+ export const CLEAR_ALL = "CLEAR_ALL";
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
- import { StyledMarkdownRenderer, StyledRoundedPaper, } from "./description.styles";
2
+ import { StyledFluidPaper, StyledMarkdownRenderer } from "./description.styles";
3
3
  export const Description = ({ description, }) => {
4
4
  if (!description)
5
5
  return null;
6
- return (React.createElement(StyledRoundedPaper, { elevation: 0 },
6
+ return (React.createElement(StyledFluidPaper, { elevation: 0 },
7
7
  React.createElement(StyledMarkdownRenderer, { value: description })));
8
8
  };
@@ -1,4 +1,4 @@
1
- export declare const StyledRoundedPaper: import("@emotion/styled").StyledComponent<import("../../../types").BaseComponentProps & import("@mui/material").PaperOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1
+ export declare const StyledFluidPaper: import("@emotion/styled").StyledComponent<import("../../../types").BaseComponentProps & import("@mui/material").PaperOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
3
3
  }, "style" | "className" | "classes" | "children" | "sx" | "elevation" | "square" | "variant"> & {
4
4
  component?: React.ElementType;
@@ -2,9 +2,9 @@ import styled from "@emotion/styled";
2
2
  import { PALETTE } from "../../../../styles/common/constants/palette";
3
3
  import { mediaTabletDown, mediaTabletUp, } from "../../../../styles/common/mixins/breakpoints";
4
4
  import { textHeadingSmall } from "../../../../styles/common/mixins/fonts";
5
- import { RoundedPaper } from "../../../common/Paper/components/RoundedPaper/roundedPaper";
5
+ import { FluidPaper } from "../../../common/Paper/components/FluidPaper/fluidPaper";
6
6
  import { MarkdownRenderer } from "../../../MarkdownRenderer/markdownRenderer";
7
- export const StyledRoundedPaper = styled(RoundedPaper) `
7
+ export const StyledFluidPaper = styled(FluidPaper) `
8
8
  padding: 20px;
9
9
 
10
10
  ${mediaTabletDown} {
@@ -1,7 +1,12 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { Typography } from "@mui/material";
3
+ import { mediaTabletDown } from "../../../../styles/common/mixins/breakpoints";
3
4
  export const StyledTypography = styled(Typography) `
4
5
  &:hover a {
5
6
  opacity: 1;
6
7
  }
8
+
9
+ ${mediaTabletDown} {
10
+ margin: 0 16px;
11
+ }
7
12
  `;
@@ -1,4 +1,4 @@
1
- import { Button } from "@mui/material";
1
+ import { Button, useMediaQuery } from "@mui/material";
2
2
  import React from "react";
3
3
  import { BUTTON_PROPS } from "../../../../../../styles/common/mui/button";
4
4
  import { ColumnFilterTag } from "../../../../../Table/components/TableFeatures/ColumnFilter/components/ColumnFilterTag/columnFilterTag";
@@ -7,8 +7,11 @@ import { GRID_PROPS } from "./constants";
7
7
  export const ColumnFilterTags = ({ className, table, }) => {
8
8
  const { getAllColumns, resetColumnFilters } = table;
9
9
  const columns = getAllColumns().filter((column) => column.getIsFiltered());
10
+ const isDrawer = useMediaQuery((theme) => theme.breakpoints.down(820));
10
11
  if (columns.length === 0)
11
12
  return null;
13
+ if (isDrawer)
14
+ return null;
12
15
  return (React.createElement(StyledGrid, { className: className, ...GRID_PROPS },
13
16
  columns.map((column) => (React.createElement(ColumnFilterTag, { key: column.id, column: column }))),
14
17
  React.createElement(Button, { onClick: () => resetColumnFilters(true), variant: BUTTON_PROPS.VARIANT.TEXT }, "Clear all")));
@@ -1,12 +1,17 @@
1
- import { ButtonGroup } from "@mui/material";
1
+ import { ButtonGroup, useMediaQuery } from "@mui/material";
2
2
  import React from "react";
3
3
  import { BUTTON_GROUP_PROPS } from "../../../../../common/ButtonGroup/constants";
4
+ import { ColumnFiltersAdapter } from "../../../../../Filter/components/adapters/tanstack/ColumnFiltersAdapter/columnFiltersAdapter";
5
+ import { Drawer } from "../../../../../Filter/components/surfaces/drawer/Drawer/drawer";
4
6
  import { ColumnFilter } from "../../../../../Table/components/TableFeatures/ColumnFilter/columnFilter";
5
7
  export const ColumnFilters = ({ table, }) => {
6
8
  const columns = table.getAllColumns();
7
9
  const columnFilters = columns.filter((column) => column.getCanFilter());
8
10
  const enableColumnFilters = table.options.enableColumnFilters;
11
+ const isDrawer = useMediaQuery((theme) => theme.breakpoints.down(820));
9
12
  if (!enableColumnFilters)
10
13
  return null;
14
+ if (isDrawer)
15
+ return (React.createElement(ColumnFiltersAdapter, { table: table, renderSurface: (props) => React.createElement(Drawer, { ...props }) }));
11
16
  return (React.createElement(ButtonGroup, { ...BUTTON_GROUP_PROPS.SECONDARY_OUTLINED }, columnFilters.map((column) => (React.createElement(ColumnFilter, { key: column.id, column: column })))));
12
17
  };
@@ -1,13 +1,8 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { Grid } from "@mui/material";
3
- import { mediaTabletDown } from "../../../../styles/common/mixins/breakpoints";
4
3
  export const StyledGrid = styled(Grid) `
5
4
  align-items: center;
6
5
  display: grid;
7
6
  gap: 16px;
8
7
  grid-template-columns: 1fr auto;
9
-
10
- ${mediaTabletDown} {
11
- grid-template-columns: 1fr;
12
- }
13
8
  `;
@@ -3,3 +3,4 @@ export declare const BIONETWORK: PartialColumn;
3
3
  export declare const DESCRIPTION: PartialColumn;
4
4
  export declare const EXAMPLE: PartialColumn;
5
5
  export declare const REQUIRED: PartialColumn;
6
+ export declare const COLUMNS: PartialColumn[];
@@ -39,3 +39,4 @@ export const REQUIRED = {
39
39
  ]),
40
40
  id: "required",
41
41
  };
42
+ export const COLUMNS = [DESCRIPTION, REQUIRED, BIONETWORK, EXAMPLE];
@@ -3,8 +3,9 @@ import { action } from "@storybook/addon-actions";
3
3
  import { functionalUpdate } from "@tanstack/react-table";
4
4
  import React from "react";
5
5
  import { Filters } from "../filters";
6
- import { BIONETWORK, DESCRIPTION, EXAMPLE, REQUIRED } from "./constants";
6
+ import { COLUMNS } from "./constants";
7
7
  import { useFilterStore, useGlobalFilterStore } from "./hook";
8
+ import { buildColumnFilters } from "./utils";
8
9
  const meta = {
9
10
  component: Filters,
10
11
  decorators: [
@@ -16,6 +17,8 @@ export default meta;
16
17
  const DefaultStory = () => {
17
18
  const { filterStore, setFilterStore } = useFilterStore();
18
19
  const { globalFilter, setGlobalFilter } = useGlobalFilterStore();
20
+ // Builds column filters from filter store.
21
+ const columnFilters = buildColumnFilters(filterStore);
19
22
  const makeColumn = (column) => ({
20
23
  ...column,
21
24
  getFilterValue: () => filterStore[column.id],
@@ -27,9 +30,12 @@ const DefaultStory = () => {
27
30
  return next;
28
31
  },
29
32
  });
33
+ // Make the columns.
34
+ const columns = COLUMNS.map(makeColumn);
30
35
  const table = {
31
- getAllColumns: () => [DESCRIPTION, REQUIRED, BIONETWORK, EXAMPLE].map(makeColumn),
32
- getState: () => ({ globalFilter }),
36
+ getAllColumns: () => columns,
37
+ getColumn: (columnId) => columns.find(({ id }) => id === columnId),
38
+ getState: () => ({ columnFilters, globalFilter }),
33
39
  options: { enableColumnFilters: true, enableGlobalFilter: true },
34
40
  setGlobalFilter,
35
41
  };
@@ -0,0 +1,7 @@
1
+ import { ColumnFiltersState } from "@tanstack/react-table";
2
+ /**
3
+ * Builds column filters from filter store.
4
+ * @param filterStore - The filter store.
5
+ * @returns The column filters.
6
+ */
7
+ export declare function buildColumnFilters(filterStore: Record<string, unknown>): ColumnFiltersState;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Builds column filters from filter store.
3
+ * @param filterStore - The filter store.
4
+ * @returns The column filters.
5
+ */
6
+ export function buildColumnFilters(filterStore) {
7
+ return Object.entries(filterStore).reduce((acc, [id, value]) => {
8
+ if (!value)
9
+ return acc;
10
+ return [...acc, { id, value }];
11
+ }, []);
12
+ }
@@ -1,5 +1,5 @@
1
1
  import styled from "@emotion/styled";
2
- import { mediaTabletDown } from "../../../../../../styles/common/mixins/breakpoints";
2
+ import { bpDown1024 } from "../../../../../../styles/common/mixins/breakpoints";
3
3
  import { LAYOUT_SPACING } from "../../constants";
4
4
  const PB = LAYOUT_SPACING.CONTENT_PADDING_BOTTOM; /* bottom padding */
5
5
  const PT = LAYOUT_SPACING.CONTENT_PADDING_TOP; /* top padding */
@@ -12,7 +12,7 @@ export const Layout = styled("div") `
12
12
  padding-top: ${({ top }) => top}px;
13
13
  z-index: 1; /* not required, but helpful in that the entities are always on top */
14
14
 
15
- ${mediaTabletDown} {
15
+ ${bpDown1024} {
16
16
  grid-column: 1;
17
17
  grid-row: auto;
18
18
  padding-top: ${PT}px;
@@ -1,6 +1,6 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { PALETTE } from "../../../../../../styles/common/constants/palette";
3
- import { mediaTabletDown } from "../../../../../../styles/common/mixins/breakpoints";
3
+ import { bpDown1024, mediaTabletDown, } from "../../../../../../styles/common/mixins/breakpoints";
4
4
  import { LAYOUT_SPACING } from "../../constants";
5
5
  const PB = LAYOUT_SPACING.FILTERS_PADDING_BOTTOM; /* bottom padding */
6
6
  const PT = LAYOUT_SPACING.FILTERS_PADDING_TOP; /* top padding */
@@ -18,10 +18,14 @@ export const Layout = styled("div") `
18
18
  top: 0;
19
19
  z-index: 2; /* required, filters should be on top of entities */
20
20
 
21
- ${mediaTabletDown} {
21
+ ${bpDown1024} {
22
22
  grid-column: 1;
23
23
  grid-row: auto;
24
24
  padding-top: ${PT}px;
25
25
  position: relative;
26
26
  }
27
+
28
+ ${mediaTabletDown} {
29
+ margin: 0 16px;
30
+ }
27
31
  `;
@@ -1,5 +1,5 @@
1
1
  import styled from "@emotion/styled";
2
- import { mediaTabletDown } from "../../../../../../styles/common/mixins/breakpoints";
2
+ import { bpDown1024 } from "../../../../../../styles/common/mixins/breakpoints";
3
3
  import { LAYOUT_SPACING } from "../../constants";
4
4
  const PB = LAYOUT_SPACING.CONTENT_PADDING_BOTTOM; /* bottom padding */
5
5
  const PT = LAYOUT_SPACING.OUTLINE_PADDING_TOP; /* top padding */
@@ -15,7 +15,7 @@ export const Layout = styled("div") `
15
15
  position: sticky;
16
16
  top: 0;
17
17
 
18
- ${mediaTabletDown} {
18
+ ${bpDown1024} {
19
19
  display: none;
20
20
  }
21
21
  `;
@@ -1,5 +1,5 @@
1
1
  import styled from "@emotion/styled";
2
- import { mediaTabletDown } from "../../../../../../styles/common/mixins/breakpoints";
2
+ import { bpDown1024, mediaTabletDown, } from "../../../../../../styles/common/mixins/breakpoints";
3
3
  export const Layout = styled("div") `
4
4
  grid-column: 1 / -1;
5
5
  grid-row: 1;
@@ -9,9 +9,13 @@ export const Layout = styled("div") `
9
9
  top: 0;
10
10
  z-index: 4;
11
11
 
12
- ${mediaTabletDown} {
12
+ ${bpDown1024} {
13
13
  grid-column: 1;
14
14
  grid-row: auto;
15
15
  position: relative;
16
16
  }
17
+
18
+ ${mediaTabletDown} {
19
+ margin: 0 16px;
20
+ }
17
21
  `;
@@ -1,15 +1,18 @@
1
1
  import { TableContainer } from "@mui/material";
2
2
  import React from "react";
3
+ import { useBreakpoint } from "../../../../hooks/useBreakpoint";
3
4
  import { TableBody } from "../../../Detail/components/Table/components/TableBody/tableBody";
4
5
  import { ROW_DIRECTION } from "../../../Table/common/entities";
5
6
  import { TableHead } from "../../../Table/components/TableHead/tableHead";
6
7
  import { GridTable } from "../../../Table/table.styles";
7
8
  import { getColumnTrackSizing } from "../../../TableCreator/options/columnTrackSizing/utils";
8
- import { StyledRoundedPaper } from "./table.styles";
9
+ import { StyledFluidPaper } from "./table.styles";
9
10
  export const Table = ({ row, table, }) => {
10
- return (React.createElement(StyledRoundedPaper, { elevation: 0 },
11
+ const { smDown } = useBreakpoint();
12
+ const rowDirection = smDown ? ROW_DIRECTION.VERTICAL : ROW_DIRECTION.DEFAULT;
13
+ return (React.createElement(StyledFluidPaper, { elevation: 0 },
11
14
  React.createElement(TableContainer, null,
12
- React.createElement(GridTable, { gridTemplateColumns: getColumnTrackSizing(table.getVisibleFlatColumns()) },
15
+ React.createElement(GridTable, { collapsable: true, gridTemplateColumns: getColumnTrackSizing(table.getVisibleFlatColumns()) },
13
16
  React.createElement(TableHead, { tableInstance: table }),
14
- React.createElement(TableBody, { rowDirection: ROW_DIRECTION.DEFAULT, rows: row.getLeafRows(), tableInstance: table })))));
17
+ React.createElement(TableBody, { rowDirection: rowDirection, rows: row.getLeafRows(), tableInstance: table })))));
15
18
  };
@@ -1,4 +1,4 @@
1
- export declare const StyledRoundedPaper: import("@emotion/styled").StyledComponent<import("../../../types").BaseComponentProps & import("@mui/material").PaperOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1
+ export declare const StyledFluidPaper: import("@emotion/styled").StyledComponent<import("../../../types").BaseComponentProps & import("@mui/material").PaperOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLDivElement | 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<HTMLDivElement> | null | undefined;
3
3
  }, "style" | "className" | "classes" | "children" | "sx" | "elevation" | "square" | "variant"> & {
4
4
  component?: React.ElementType;
@@ -1,7 +1,7 @@
1
1
  import styled from "@emotion/styled";
2
2
  import { PALETTE } from "../../../../styles/common/constants/palette";
3
- import { RoundedPaper } from "../../../common/Paper/components/RoundedPaper/roundedPaper";
4
- export const StyledRoundedPaper = styled(RoundedPaper) `
3
+ import { FluidPaper } from "../../../common/Paper/components/FluidPaper/fluidPaper";
4
+ export const StyledFluidPaper = styled(FluidPaper) `
5
5
  background-color: ${PALETTE.SMOKE_MAIN};
6
6
  display: grid;
7
7
  gap: 1px;
@@ -1,5 +1,5 @@
1
1
  import styled from "@emotion/styled";
2
- import { mediaTabletDown } from "../../../../styles/common/mixins/breakpoints";
2
+ import { bpDown820 } from "../../../../styles/common/mixins/breakpoints";
3
3
  import { Title } from "../../../common/Title/title";
4
4
  export const StyledTitle = styled(Title) `
5
5
  & {
@@ -9,7 +9,7 @@ export const StyledTitle = styled(Title) `
9
9
  line-height: 42px;
10
10
  margin: 24px 0 8px;
11
11
 
12
- ${mediaTabletDown} {
12
+ ${bpDown820} {
13
13
  font-size: 26px;
14
14
  line-height: 34px;
15
15
  }
@@ -1,4 +1,3 @@
1
- export declare const grid: import("@emotion/react").SerializedStyles;
2
1
  export declare const View: import("@emotion/styled").StyledComponent<{
3
2
  theme?: import("@emotion/react").Theme;
4
3
  as?: React.ElementType;
@@ -1,19 +1,19 @@
1
- import { css } from "@emotion/react";
2
1
  import styled from "@emotion/styled";
3
- import { mediaTabletDown } from "../../styles/common/mixins/breakpoints";
4
- export const grid = css `
2
+ import { bpDown1024, mediaTabletDown, } from "../../styles/common/mixins/breakpoints";
3
+ export const View = styled("div") `
5
4
  column-gap: 24px;
6
5
  display: grid;
7
- grid-template-columns: 242px 1fr;
8
- `;
9
- export const View = styled("div") `
10
- ${grid};
11
6
  flex: 1;
7
+ grid-template-columns: 242px 1fr;
12
8
  margin: 0 24px;
13
9
  position: relative;
14
10
 
15
- ${mediaTabletDown} {
11
+ ${bpDown1024} {
16
12
  grid-template-columns: 1fr;
17
13
  margin: 0 16px;
18
14
  }
15
+
16
+ ${mediaTabletDown} {
17
+ margin: 0;
18
+ }
19
19
  `;
@@ -8,8 +8,8 @@ export const CollapsableRows = ({ rows: leafOrSubRows, tableInstance, }) => {
8
8
  const { rows } = getRowModel();
9
9
  useCollapsableRows(tableInstance);
10
10
  return (React.createElement(Fragment, null, (leafOrSubRows || rows).map((row) => {
11
- if (row.depth > 0)
12
- return null; // Hide sub rows.
11
+ if (row.depth > 0 && !leafOrSubRows)
12
+ return null; // Hide sub rows that are not already leaf or sub rows.
13
13
  return (React.createElement(StyledTableRow, { key: row.id, id: row.id, isPreview: row.getIsPreview() },
14
14
  React.createElement(CollapsableCell, { isDisabled: isCollapsableRowDisabled(tableInstance), row: row })));
15
15
  })));
@@ -2,13 +2,14 @@ import { ReactNode } from "react";
2
2
  import { CategoryView } from "../../../../common/categories/views/types";
3
3
  import { TrackFilterOpenedFunction } from "../../../../config/entities";
4
4
  import { OnFilterFn } from "../../../../hooks/useCategoryFilter";
5
+ import { SURFACE_TYPE } from "../surfaces/types";
5
6
  export interface FilterProps {
6
7
  categorySection?: string;
7
8
  categoryView: CategoryView;
8
9
  closeAncestor?: () => void;
9
- isFilterDrawer: boolean;
10
10
  onFilter: OnFilterFn;
11
+ surfaceType: SURFACE_TYPE;
11
12
  tags?: ReactNode;
12
13
  trackFilterOpened?: TrackFilterOpenedFunction;
13
14
  }
14
- export declare const Filter: ({ categorySection, categoryView, closeAncestor, isFilterDrawer, onFilter, tags, trackFilterOpened, }: FilterProps) => JSX.Element;
15
+ export declare const Filter: ({ categorySection, categoryView, closeAncestor, onFilter, surfaceType, tags, trackFilterOpened, }: FilterProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- import { CloseRounded } from "@mui/icons-material";
2
1
  import { Grow } from "@mui/material";
3
2
  import React, { useState } from "react";
4
3
  import { isRangeCategoryView } from "../../../../common/categories/views/range/typeGuards";
@@ -6,8 +5,10 @@ import { TEST_IDS } from "../../../../tests/testIds";
6
5
  import { FilterLabel } from "../FilterLabel/filterLabel";
7
6
  import { FilterMenu } from "../FilterMenu/filterMenu";
8
7
  import { FilterRange } from "../FilterRange/filterRange";
8
+ import { IconButton } from "../surfaces/drawer/components/IconButton/iconButton";
9
+ import { SURFACE_TYPE } from "../surfaces/types";
9
10
  import { DrawerTransition } from "./components/DrawerTransition/drawerTransition";
10
- import { FilterPopover, IconButton } from "./filter.styles";
11
+ import { StyledPopover } from "./filter.styles";
11
12
  /**
12
13
  * Filter component.
13
14
  * TODO(cc) refactor: build tags from categoryView for selected values.
@@ -20,14 +21,15 @@ const DEFAULT_SLOT_PROPS = {
20
21
  const DRAWER_SLOT_PROPS = {
21
22
  paper: { elevation: 0 },
22
23
  };
23
- export const Filter = ({ categorySection, categoryView, closeAncestor, isFilterDrawer, onFilter, tags, trackFilterOpened, }) => {
24
+ export const Filter = ({ categorySection, categoryView, closeAncestor, onFilter, surfaceType, tags, trackFilterOpened, }) => {
24
25
  const [isOpen, setIsOpen] = useState(false);
25
26
  const [position, setPosition] = useState(DEFAULT_POSITION);
26
- const anchorPosition = isFilterDrawer ? DEFAULT_POSITION : position;
27
- const slotProps = isFilterDrawer ? DRAWER_SLOT_PROPS : DEFAULT_SLOT_PROPS;
28
- const TransitionComponent = isFilterDrawer ? DrawerTransition : Grow;
27
+ const isDrawer = surfaceType === SURFACE_TYPE.DRAWER;
28
+ const anchorPosition = isDrawer ? DEFAULT_POSITION : position;
29
+ const slotProps = isDrawer ? DRAWER_SLOT_PROPS : DEFAULT_SLOT_PROPS;
30
+ const TransitionComponent = isDrawer ? DrawerTransition : Grow;
29
31
  const transitionDuration = isOpen ? 250 : 300;
30
- const TransitionDuration = isFilterDrawer ? transitionDuration : undefined;
32
+ const TransitionDuration = isDrawer ? transitionDuration : undefined;
31
33
  const isRangeView = isRangeCategoryView(categoryView);
32
34
  /**
33
35
  * Closes filter popover.
@@ -57,9 +59,9 @@ export const Filter = ({ categorySection, categoryView, closeAncestor, isFilterD
57
59
  trackFilterOpened?.({ category: categoryView.key });
58
60
  };
59
61
  return (React.createElement(React.Fragment, null,
60
- React.createElement(FilterLabel, { annotation: categoryView.annotation, count: isRangeView ? undefined : categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter }),
61
- React.createElement(FilterPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", "data-testid": TEST_IDS.FILTER_POPOVER, marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, slots: { transition: TransitionComponent }, transitionDuration: TransitionDuration },
62
- isOpen && isFilterDrawer && (React.createElement(IconButton, { Icon: CloseRounded, onClick: onCloseFilters, size: "medium" })),
63
- isRangeView ? (React.createElement(FilterRange, { categoryKey: categoryView.key, categoryLabel: categoryView.label, categorySection: categorySection, isFilterDrawer: isFilterDrawer, max: categoryView.max, min: categoryView.min, selectedMax: categoryView.selectedMax, selectedMin: categoryView.selectedMin, onCloseFilter: onCloseFilter, onFilter: onFilter, unit: categoryView.unit })) : (React.createElement(FilterMenu, { categoryKey: categoryView.key, categoryLabel: categoryView.label, categorySection: categorySection, isFilterDrawer: isFilterDrawer, onCloseFilter: onCloseFilter, onFilter: onFilter, values: categoryView.values }))),
62
+ React.createElement(FilterLabel, { annotation: categoryView.annotation, count: isRangeView ? undefined : categoryView.values.length, disabled: categoryView.isDisabled, isOpen: isOpen, label: categoryView.label, onClick: onOpenFilter, surfaceType: surfaceType }),
63
+ React.createElement(StyledPopover, { anchorPosition: anchorPosition, anchorReference: "anchorPosition", "data-testid": TEST_IDS.FILTER_POPOVER, marginThreshold: 0, onClose: onCloseFilters, open: isOpen, slotProps: slotProps, slots: { transition: TransitionComponent }, surfaceType: surfaceType, transitionDuration: TransitionDuration },
64
+ isDrawer && React.createElement(IconButton, { onClick: onCloseFilters }),
65
+ isRangeView ? (React.createElement(FilterRange, { categoryKey: categoryView.key, categoryLabel: categoryView.label, categorySection: categorySection, max: categoryView.max, min: categoryView.min, selectedMax: categoryView.selectedMax, selectedMin: categoryView.selectedMin, onCloseFilter: onCloseFilter, onFilter: onFilter, surfaceType: surfaceType, unit: categoryView.unit })) : (React.createElement(FilterMenu, { categoryKey: categoryView.key, categoryLabel: categoryView.label, categorySection: categorySection, onCloseFilter: onCloseFilter, onFilter: onFilter, surfaceType: surfaceType, values: categoryView.values }))),
64
66
  tags));
65
67
  };
@@ -1,6 +1,4 @@
1
- export declare const FilterPopover: import("@emotion/styled").StyledComponent<import("@mui/material").PopoverProps & {
1
+ import { FilterProps } from "./filter";
2
+ export declare const StyledPopover: import("@emotion/styled").StyledComponent<import("@mui/material").PopoverProps & {
2
3
  theme?: import("@emotion/react").Theme;
3
- }, {}, {}>;
4
- export declare const IconButton: import("@emotion/styled").StyledComponent<import("../../../common/IconButton/iconButton").IconButtonProps & {
5
- theme?: import("@emotion/react").Theme;
6
- }, {}, {}>;
4
+ } & Pick<FilterProps, "surfaceType">, {}, {}>;
@@ -1,26 +1,23 @@
1
+ import { css } from "@emotion/react";
1
2
  import styled from "@emotion/styled";
2
3
  import { Popover } from "@mui/material";
3
- import { mediaDesktopSmallDown } from "../../../../styles/common/mixins/breakpoints";
4
- import { smokeLight, white } from "../../../../styles/common/mixins/colors";
5
- import { IconButton as DXIconButton } from "../../../common/IconButton/iconButton";
6
- export const FilterPopover = styled(Popover) `
4
+ import { PALETTE } from "../../../../styles/common/constants/palette";
5
+ import { SURFACE_TYPE } from "../surfaces/types";
6
+ export const StyledPopover = styled(Popover, {
7
+ shouldForwardProp: (prop) => prop !== "surfaceType",
8
+ }) `
7
9
  .MuiPaper-menu {
8
10
  margin: 4px 0;
9
11
  }
10
12
 
11
- ${mediaDesktopSmallDown} {
12
- .MuiPaper-root {
13
- background-color: ${smokeLight};
14
- height: 100%;
15
- margin: 0;
16
- max-height: 100%;
17
- overflow: visible; // required; allows backdrop button to render outside of drawer container.
18
- }
19
- }
20
- `;
21
- export const IconButton = styled(DXIconButton) `
22
- color: ${white};
23
- left: calc(100% + 4px);
24
- position: absolute;
25
- top: 4px;
13
+ ${({ surfaceType }) => surfaceType === SURFACE_TYPE.DRAWER &&
14
+ css `
15
+ .MuiPaper-root {
16
+ background-color: ${PALETTE.SMOKE_LIGHT};
17
+ height: 100%;
18
+ margin: 0;
19
+ max-height: 100%;
20
+ overflow: visible; // required; allows backdrop button to render outside of drawer container.
21
+ }
22
+ `}
26
23
  `;
@@ -1,9 +1,10 @@
1
1
  import { fn } from "@storybook/test";
2
2
  import { DONOR_COUNT, GENUS_SPECIES } from "../../Filters/stories/constants";
3
+ import { SURFACE_TYPE } from "../../surfaces/types";
3
4
  export const SELECT_ARGS = {
4
5
  categoryView: GENUS_SPECIES,
5
- isFilterDrawer: false,
6
6
  onFilter: fn(),
7
+ surfaceType: SURFACE_TYPE.MENU,
7
8
  };
8
9
  export const DISABLED_SELECT_ARGS = {
9
10
  ...SELECT_ARGS,
@@ -14,6 +15,6 @@ export const DISABLED_SELECT_ARGS = {
14
15
  };
15
16
  export const RANGE_ARGS = {
16
17
  categoryView: DONOR_COUNT,
17
- isFilterDrawer: false,
18
18
  onFilter: fn(),
19
+ surfaceType: SURFACE_TYPE.MENU,
19
20
  };
@@ -1,5 +1,6 @@
1
1
  import { MouseEvent } from "react";
2
2
  import { DataDictionaryAnnotation } from "../../../../common/entities";
3
+ import { SURFACE_TYPE } from "../surfaces/types";
3
4
  export interface FilterLabelProps {
4
5
  annotation?: DataDictionaryAnnotation;
5
6
  count?: number;
@@ -7,5 +8,6 @@ export interface FilterLabelProps {
7
8
  isOpen: boolean;
8
9
  label: string;
9
10
  onClick: (event: MouseEvent<HTMLButtonElement>) => void;
11
+ surfaceType: SURFACE_TYPE;
10
12
  }
11
- export declare const FilterLabel: ({ annotation, count, disabled, isOpen, label, onClick, }: FilterLabelProps) => JSX.Element;
13
+ export declare const FilterLabel: ({ annotation, count, disabled, isOpen, label, onClick, surfaceType, }: FilterLabelProps) => JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { ArrowDropDownRounded } from "@mui/icons-material";
2
2
  import React from "react";
3
3
  import { Tooltip } from "../../../DataDictionary/components/Tooltip/tooltip";
4
- import { FilterLabel as Label } from "./filterLabel.styles";
5
- export const FilterLabel = ({ annotation, count, disabled = false, isOpen, label, onClick, }) => {
4
+ import { StyledButton } from "./filterLabel.styles";
5
+ export const FilterLabel = ({ annotation, count, disabled = false, isOpen, label, onClick, surfaceType, }) => {
6
6
  const filterLabel = count ? `${label}\xa0(${count})` : label; // When the count is present, a non-breaking space is used to prevent it from being on its own line
7
7
  return (React.createElement(Tooltip, { description: annotation?.description, title: annotation?.label },
8
- React.createElement(Label, { color: "inherit", disabled: disabled, endIcon: React.createElement(ArrowDropDownRounded, { fontSize: "small" }), fullWidth: true, isOpen: isOpen, onClick: onClick }, filterLabel)));
8
+ React.createElement(StyledButton, { color: "inherit", disabled: disabled, endIcon: React.createElement(ArrowDropDownRounded, { fontSize: "small" }), fullWidth: true, isOpen: isOpen, onClick: onClick, surfaceType: surfaceType }, filterLabel)));
9
9
  };
@@ -1,5 +1,6 @@
1
1
  import { StoryObj } from "@storybook/react";
2
2
  import React from "react";
3
+ import { SURFACE_TYPE } from "../surfaces/types";
3
4
  declare const meta: {
4
5
  argTypes: {
5
6
  count: {
@@ -15,7 +16,7 @@ declare const meta: {
15
16
  control: "text";
16
17
  };
17
18
  };
18
- component: ({ annotation, count, disabled, isOpen, label, onClick, }: import("./filterLabel").FilterLabelProps) => JSX.Element;
19
+ component: ({ annotation, count, disabled, isOpen, label, onClick, surfaceType, }: import("./filterLabel").FilterLabelProps) => JSX.Element;
19
20
  decorators: ((Story: import("@storybook/core/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
20
21
  annotation?: import("../../../../common/entities").DataDictionaryAnnotation | undefined;
21
22
  count?: number | undefined;
@@ -23,6 +24,7 @@ declare const meta: {
23
24
  isOpen: boolean;
24
25
  label: string;
25
26
  onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
27
+ surfaceType: SURFACE_TYPE;
26
28
  }>) => JSX.Element)[];
27
29
  title: string;
28
30
  };