@backstage/plugin-catalog-react 1.8.1-next.0 → 1.8.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @backstage/plugin-catalog-react
2
2
 
3
+ ## 1.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - aa3feedce10a: Allow specifying screen size when catalog filters are hidden in drawer
8
+ - Updated dependencies
9
+ - @backstage/integration@1.6.0
10
+ - @backstage/core-components@0.13.4
11
+ - @backstage/core-plugin-api@1.5.3
12
+ - @backstage/catalog-client@1.4.3
13
+ - @backstage/catalog-model@1.4.1
14
+ - @backstage/errors@1.2.1
15
+ - @backstage/theme@0.4.1
16
+ - @backstage/types@1.1.0
17
+ - @backstage/version-bridge@1.0.4
18
+ - @backstage/plugin-catalog-common@1.0.15
19
+ - @backstage/plugin-permission-common@0.7.7
20
+ - @backstage/plugin-permission-react@0.4.14
21
+
22
+ ## 1.8.1-next.1
23
+
24
+ ### Patch Changes
25
+
26
+ - aa3feedce10a: Allow specifying screen size when catalog filters are hidden in drawer
27
+
3
28
  ## 1.8.1-next.0
4
29
 
5
30
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage/plugin-catalog-react",
3
- "version": "1.8.1-next.0",
3
+ "version": "1.8.1",
4
4
  "main": "../dist/alpha.esm.js",
5
5
  "module": "../dist/alpha.esm.js",
6
6
  "types": "../dist/alpha.d.ts"
package/dist/index.d.ts CHANGED
@@ -63,6 +63,10 @@ declare const CatalogFilterLayout: {
63
63
  }): JSX.Element;
64
64
  Filters: (props: {
65
65
  children: React.ReactNode;
66
+ options?: {
67
+ drawerBreakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
68
+ drawerAnchor?: 'left' | 'right' | 'top' | 'bottom';
69
+ };
66
70
  }) => JSX.Element;
67
71
  Content: (props: {
68
72
  children: React.ReactNode;
package/dist/index.esm.js CHANGED
@@ -85,12 +85,16 @@ class MockStarredEntitiesApi {
85
85
  }
86
86
 
87
87
  const Filters = (props) => {
88
- const isMidSizeScreen = useMediaQuery(
89
- (theme2) => theme2.breakpoints.down("md")
88
+ var _a, _b;
89
+ const isScreenSmallerThanBreakpoint = useMediaQuery(
90
+ (theme2) => {
91
+ var _a2, _b2;
92
+ return theme2.breakpoints.down((_b2 = (_a2 = props.options) == null ? void 0 : _a2.drawerBreakpoint) != null ? _b2 : "md");
93
+ }
90
94
  );
91
95
  const theme = useTheme();
92
96
  const [filterDrawerOpen, setFilterDrawerOpen] = useState(false);
93
- return isMidSizeScreen ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
97
+ return isScreenSmallerThanBreakpoint ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
94
98
  Button,
95
99
  {
96
100
  style: { marginTop: theme.spacing(1), marginLeft: theme.spacing(1) },
@@ -103,7 +107,7 @@ const Filters = (props) => {
103
107
  {
104
108
  open: filterDrawerOpen,
105
109
  onClose: () => setFilterDrawerOpen(false),
106
- anchor: "left",
110
+ anchor: (_b = (_a = props.options) == null ? void 0 : _a.drawerAnchor) != null ? _b : "left",
107
111
  disableAutoFocus: true,
108
112
  keepMounted: true,
109
113
  variant: "temporary"