@homebound/beam 2.128.1 → 2.128.4
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.
|
@@ -77,9 +77,9 @@ function SuperDrawer() {
|
|
|
77
77
|
// Custom transitions settings for the translateX animation
|
|
78
78
|
transition: { ease: "linear", duration: 0.2, delay: 0.2 }, exit: { transition: { ease: "linear", duration: 0.2 }, x: 1040 },
|
|
79
79
|
// Preventing clicks from triggering parent onClick
|
|
80
|
-
onClick: (e) => e.stopPropagation() }, { children: [(0, jsx_runtime_1.jsxs)("header", Object.assign({ css: Css_1.Css.df.p3.bb.bGray200.df.aic.jcsb.$ }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.df.aic.$ }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.xl2Em.gray900.mr2.$ }, testId.title, { ref: drawerHeaderRef }, { children: !modalState.current && (title || null) }), void 0), !modalState.current && (titleLeftContent || null)] }), void 0), !modalState.current && (
|
|
80
|
+
onClick: (e) => e.stopPropagation() }, { children: [(0, jsx_runtime_1.jsxs)("header", Object.assign({ css: Css_1.Css.df.p3.bb.bGray200.df.aic.jcsb.gap2.$ }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.df.aic.$ }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ css: Css_1.Css.xl2Em.gray900.mr2.$ }, testId.title, { ref: drawerHeaderRef }, { children: !modalState.current && (title || null) }), void 0), !modalState.current && (titleLeftContent || null)] }), void 0), !modalState.current && (
|
|
81
81
|
// Forcing height to 32px to match title height
|
|
82
|
-
(0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.df.childGap3.aic.hPx(32).$ }, { children: [titleRightContent || null, (0, jsx_runtime_1.jsx)(components_1.ButtonGroup, Object.assign({ buttons: [
|
|
82
|
+
(0, jsx_runtime_1.jsxs)("div", Object.assign({ css: Css_1.Css.df.childGap3.aic.hPx(32).fs0.$ }, { children: [titleRightContent || null, (0, jsx_runtime_1.jsx)(components_1.ButtonGroup, Object.assign({ buttons: [
|
|
83
83
|
{
|
|
84
84
|
icon: "chevronLeft",
|
|
85
85
|
onClick: () => onPrevClick && onPrevClick(),
|
|
@@ -38,7 +38,13 @@ class RowState {
|
|
|
38
38
|
this.activeRowId = undefined;
|
|
39
39
|
// Make ourselves an observable so that mobx will do caching of .collapseIds so
|
|
40
40
|
// that it'll be a stable identity for GridTable to useMemo against.
|
|
41
|
-
(0, mobx_1.makeAutoObservable)(this,
|
|
41
|
+
(0, mobx_1.makeAutoObservable)(this,
|
|
42
|
+
// We only shallow observe rows so that:
|
|
43
|
+
// a) we don't deeply/needlessly proxy-ize a large Apollo fragment cache, but
|
|
44
|
+
// b) if rows changes, we re-run computeds like getSelectedRows that may need to see the
|
|
45
|
+
// updated _contents_ of a given row, even if our other selected/visible row states don't change.
|
|
46
|
+
// (as any b/c rows is private, so the mapped type doesn't see it)
|
|
47
|
+
{ rows: mobx_1.observable.shallow });
|
|
42
48
|
// Whenever our `visibleRows` change (i.e. via filtering) then we need to re-derive header and parent rows' selected state.
|
|
43
49
|
(0, mobx_1.reaction)(() => [...this.visibleRows.values()].sort(), () => {
|
|
44
50
|
const map = new Map();
|
|
@@ -28,10 +28,10 @@ function Menu(props) {
|
|
|
28
28
|
// Bulk updates of MenuItems below. If we find this to be of sluggish performance, then we can change to be more surgical in our updating.
|
|
29
29
|
// If our list of items change, update the "items" menu section. (key is based on label in `getKey` above)
|
|
30
30
|
(0, react_1.useEffect)(() => tree.update("items", { label: "items", items }), [items]);
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(react_aria_1.FocusScope,
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(react_aria_1.FocusScope, { children: (0, jsx_runtime_1.jsx)("ul", Object.assign({ css: {
|
|
32
32
|
// Using `max-height: inherit` allows us to take advantage of the height set on the overlay container, which updates based on the available space for the overlay within the viewport
|
|
33
33
|
...Css_1.Css.df.fdc.myPx(4).bgWhite.outline0.br4.bshBasic.listReset.maxh("inherit").overflowAuto.$,
|
|
34
34
|
"&:hover, &:focus": Css_1.Css.bshHover.$,
|
|
35
|
-
} }, menuProps, { ref: menuRef }, tid.menu, { children: [...state.collection].map((item) => ((0, jsx_runtime_1.jsx)(MenuSection_1.MenuSectionImpl, Object.assign({ section: item, state: state, onClose: onClose }, tid), item.key))) }), void 0) }
|
|
35
|
+
} }, menuProps, { ref: menuRef }, tid.menu, { children: [...state.collection].map((item) => ((0, jsx_runtime_1.jsx)(MenuSection_1.MenuSectionImpl, Object.assign({ section: item, state: state, onClose: onClose }, tid), item.key))) }), void 0) }, void 0));
|
|
36
36
|
}
|
|
37
37
|
exports.Menu = Menu;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.useComputed = void 0;
|
|
7
|
+
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
7
8
|
const mobx_1 = require("mobx");
|
|
8
9
|
const react_1 = require("react");
|
|
9
|
-
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));
|
|
10
10
|
/** Evaluates a computed function `fn` to a regular value and triggers a re-render whenever it changes. */
|
|
11
11
|
function useComputed(fn, deps) {
|
|
12
12
|
// We always return the useRef value, and use this just to trigger re-renders
|