@homebound/beam 2.244.0 → 2.244.2

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/README.md CHANGED
@@ -33,7 +33,7 @@ The most concrete manifestation of this is that we want to _provide as few props
33
33
  Fewer props generally means:
34
34
 
35
35
  1. More consistent UX for users (the component cannot behave in N different ways, depending on the page the user sees it on)
36
- 2. Easier usage for client applications (fewer props to know and understand "...should I set this? or not?")
36
+ 2. Easier usage for client applications (fewer props to know and understand "...should I set this or not?")
37
37
  3. Simpler implementation for Beam components and maintainers
38
38
  4. More flexibility to change the internal implementations of Beam components and roll out them relatively easily.
39
39
 
@@ -31,9 +31,9 @@ class MultiFilter extends BaseFilter_1.BaseFilter {
31
31
  setValue(values.length === 0 ? undefined : values);
32
32
  }, values: value || [], hideLabel: true, ...tid[(0, defaultTestId_1.defaultTestId)(this.label)] }));
33
33
  }
34
- const { defaultValue, ...props } = this.props;
34
+ const { defaultValue, nothingSelectedText, ...props } = this.props;
35
35
  return ((0, jsx_runtime_1.jsx)(MultiSelectField_1.MultiSelectField, { ...props, compact: !vertical, label: this.label, values: value || [], labelStyle: inModal ? "hidden" : !inModal && !vertical ? "inline" : "above", sizeToContent: !inModal && !vertical, onSelect: (values) => {
36
36
  setValue(values.length === 0 ? undefined : values);
37
- }, nothingSelectedText: "All", ...this.testId(tid) }));
37
+ }, nothingSelectedText: nothingSelectedText !== null && nothingSelectedText !== void 0 ? nothingSelectedText : "All", ...this.testId(tid) }));
38
38
  }
39
39
  }
@@ -3,10 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RightPaneLayout = void 0;
4
4
  const jsx_runtime_1 = require("@emotion/react/jsx-runtime");
5
5
  const framer_motion_1 = require("framer-motion");
6
+ const react_1 = require("react");
6
7
  const Css_1 = require("../../../Css");
7
8
  const RightPaneContext_1 = require("./RightPaneContext");
8
9
  function RightPaneLayout({ children, paneBgColor = Css_1.Palette.White, paneWidth = 450, }) {
9
- const { isRightPaneOpen, rightPaneContent, clearPane } = (0, RightPaneContext_1.useRightPaneContext)();
10
+ const { isRightPaneOpen, rightPaneContent, clearPane, closePane } = (0, RightPaneContext_1.useRightPaneContext)();
11
+ // Close pane on page unmount because otherwise the next page that has a right pane will show our stale content
12
+ (0, react_1.useEffect)(() => {
13
+ return () => {
14
+ closePane();
15
+ };
16
+ }, []);
10
17
  return ((0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.h100.df.overflowXHidden.$, children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { css: Css_1.Css.w(`calc(100% - ${paneWidth + 24}px)`)
11
18
  .add("transition", "width .2s linear")
12
19
  .h100.mr3.overflowXAuto.if(!isRightPaneOpen).w100.mr0.$, children: children }), (0, jsx_runtime_1.jsx)(framer_motion_1.AnimatePresence, { children: isRightPaneOpen && ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { layout: "position", "data-testid": "rightPaneContent", css: Css_1.Css.bgColor(paneBgColor).h100.wPx(paneWidth).$,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homebound/beam",
3
- "version": "2.244.0",
3
+ "version": "2.244.2",
4
4
  "author": "Homebound",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",