@homebound/beam 2.413.0-alpha.6 → 2.414.0-alpha.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/dist/index.cjs CHANGED
@@ -7575,7 +7575,7 @@ var nonKindGridColumnKeys = [
7575
7575
  "isAction",
7576
7576
  "id",
7577
7577
  "canHide",
7578
- "initVisible",
7578
+ "initHidden",
7579
7579
  "expandColumns",
7580
7580
  "initExpanded",
7581
7581
  "hideOnExpand",
@@ -8635,10 +8635,10 @@ function RowImpl(props) {
8635
8635
  const maybeSticky = (isGridCellContent(maybeContent) && maybeContent.sticky || column2.sticky) ?? void 0;
8636
8636
  const maybeStickyColumnStyles = maybeSticky && columnSizes ? {
8637
8637
  ...Css.sticky.z(zIndices.stickyColumns).bgWhite.$,
8638
- ...maybeSticky === "left" ? Css.left(columnIndex === 0 ? 0 : `calc(${columnSizes.slice(0, columnIndex).join(" + ")})`).$ : {},
8639
- ...maybeSticky === "right" ? Css.right(
8640
- columnIndex + 1 === columnSizes.length ? 0 : `calc(${columnSizes.slice(columnIndex + 1 - columnSizes.length).join(" + ")})`
8641
- ).$ : {}
8638
+ // For flex layouts, all sticky columns should have left/right: 0
8639
+ // The flex layout handles their adjacency based on their widths
8640
+ ...maybeSticky === "left" ? Css.left(0).$ : {},
8641
+ ...maybeSticky === "right" ? Css.right(0).$ : {}
8642
8642
  } : {};
8643
8643
  minStickyLeftOffset += maybeSticky === "left" ? parseInt(columnSizes[columnIndex].replace("px", ""), 10) : 0;
8644
8644
  const cellId = `${row.kind}_${row.id}_${column2.id}`;
@@ -12855,13 +12855,13 @@ function SelectToggle({ id, disabled }) {
12855
12855
  // src/components/Table/utils/columns.tsx
12856
12856
  var import_jsx_runtime80 = require("@emotion/react/jsx-runtime");
12857
12857
  function column(columnDef) {
12858
- return { canHide: true, initVisible: true, ...columnDef };
12858
+ return { canHide: true, initHidden: false, ...columnDef };
12859
12859
  }
12860
12860
  function dateColumn(columnDef) {
12861
- return { canHide: true, initVisible: true, ...columnDef, align: "left" };
12861
+ return { canHide: true, initHidden: false, ...columnDef, align: "left" };
12862
12862
  }
12863
12863
  function numericColumn(columnDef) {
12864
- return { canHide: true, initVisible: true, ...columnDef, align: "right" };
12864
+ return { canHide: true, initHidden: false, ...columnDef, align: "right" };
12865
12865
  }
12866
12866
  function actionColumn(columnDef) {
12867
12867
  return { clientSideSort: false, ...columnDef, align: "center", isAction: true, wrapAction: false };
@@ -13057,7 +13057,7 @@ var ColumnState = class {
13057
13057
  constructor(states, storage, column2) {
13058
13058
  this.states = states;
13059
13059
  this.column = column2;
13060
- this.visible = storage.wasVisible(column2.id) ?? (column2.canHide ? column2.initVisible ?? false : true);
13060
+ this.visible = storage.wasVisible(column2.id) ?? (column2.canHide ? !(column2.initHidden ?? true) : true);
13061
13061
  if (this.visible && (storage.wasExpanded(column2.id) ?? column2.initExpanded)) {
13062
13062
  this.expanded = true;
13063
13063
  this.doExpand();
@@ -16247,14 +16247,27 @@ function Toast() {
16247
16247
  // src/components/Layout/PageHeaderBreadcrumbs.tsx
16248
16248
  var import_react90 = require("react");
16249
16249
  var import_react_router_dom4 = require("react-router-dom");
16250
- var import_jsx_runtime124 = require("@emotion/react/jsx-runtime");
16250
+ var import_jsx_runtime124 = (
16251
+ // Adding index to key to prevent rendering issues when multiple items have the same label
16252
+ require("@emotion/react/jsx-runtime")
16253
+ );
16251
16254
  function PageHeaderBreadcrumbs({ breadcrumb }) {
16252
16255
  const tids = useTestIds({}, "pageHeaderBreadcrumbs");
16253
- const breadcrumbs = Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb];
16254
- return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: Css.df.aic.mbPx(4).$, ...tids, children: breadcrumbs.map((breadcrumb2, i) => /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_react90.Fragment, { children: [
16255
- i > 0 && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { css: Css.smSb.gray700.mr1.ml1.$, children: "/" }),
16256
- /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_react_router_dom4.Link, { to: breadcrumb2.href, css: Css.smSb.gray700.onHover.gray900.$, className: "navLink", ...tids.navLink, children: breadcrumb2.label })
16257
- ] }, `bc-${breadcrumb2.label}`)) });
16256
+ const breadcrumbs = (0, import_react90.useMemo)(() => Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb], [breadcrumb]);
16257
+ const [collapsed, setCollapsed] = (0, import_react90.useState)(true);
16258
+ function renderBreadcrumb(bc, index, hideDivisor) {
16259
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_react90.Fragment, { children: [
16260
+ index > 0 && !hideDivisor && /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("span", { css: Css.smSb.gray700.mx1.myPx(2).$, children: "/" }),
16261
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_react_router_dom4.Link, { to: bc.href, css: Css.smSb.gray700.onHover.gray900.$, className: "navLink", ...tids.navLink, children: bc.label }),
16262
+ bc.right
16263
+ ] }, `${bc.label}-${index}`);
16264
+ }
16265
+ return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { css: Css.df.aic.mbPx(4).$, children: breadcrumbs.length > 3 && collapsed ? /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_jsx_runtime124.Fragment, { children: [
16266
+ renderBreadcrumb(breadcrumbs[0], 0),
16267
+ /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("button", { ...tids.expand, css: Css.gray700.pxPx(8).$, onClick: () => setCollapsed(false), children: "..." }),
16268
+ renderBreadcrumb(breadcrumbs[breadcrumbs.length - 2], breadcrumbs.length - 2, true),
16269
+ renderBreadcrumb(breadcrumbs[breadcrumbs.length - 1], breadcrumbs.length - 1)
16270
+ ] }) : breadcrumbs.map((bc, i) => renderBreadcrumb(bc, i)) });
16258
16271
  }
16259
16272
 
16260
16273
  // src/components/Layout/FormPageLayout.tsx