@the-portland-company/shell 0.26.0 → 0.27.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ ## 0.27.0 — 2026-07-23
2
+
3
+ VRM native-chrome parity (shell-nav-handoff §1–§3). All three were verified in
4
+ this package's source before changing anything, and all three are additive —
5
+ forms / surveys / polls / contacts behavior is unchanged.
6
+
7
+ ### Added — `NavAppShell contentWrapper`
8
+
9
+ `'padded'` (default) keeps the existing `<main class="px-6 py-7">` + `mx-auto
10
+ max-w-7xl`. `'bare'` renders children directly. VRM wraps every page in the
11
+ shell's own `PageContainer` — which emits its OWN `<main>` and max-width — so
12
+ the default gave it a **nested `<main>`** (invalid HTML) and a doubled gutter on
13
+ Org Settings, Email Broadcast and SMS/MMS Blast.
14
+
15
+ ### Added — nav group headers can navigate as well as expand
16
+
17
+ A group header always toggles; when the item also carries an `onClick`, that now
18
+ runs too, so a parent row can open its section dashboard AND expand in one
19
+ click. Existing apps pass no parent `onClick`, so nothing changes for them.
20
+
21
+ ### Added — `NavItem.disabled` + `NavItem.disabledTitle`
22
+
23
+ Mirrors `NavTab`'s existing contract: a gated row renders as a non-interactive,
24
+ dimmed `aria-disabled` span with its reason as a tooltip. VRM gates Email / SMS
25
+ until setup is complete and previously had no way to express that, so gated rows
26
+ rendered fully clickable.
27
+
1
28
  ## 0.26.0 — 2026-07-23
2
29
 
3
30
  ### Added — `PolitogyAppFrame` data plumbing (so Contacts can adopt it)
@@ -1313,6 +1313,17 @@ function NavRow({
1313
1313
  item.label
1314
1314
  ] })
1315
1315
  ] });
1316
+ if (item.disabled) {
1317
+ return /* @__PURE__ */ jsxRuntime.jsx(
1318
+ "span",
1319
+ {
1320
+ "aria-disabled": "true",
1321
+ title: item.disabledTitle,
1322
+ className: `${wrapperClasses} cursor-not-allowed opacity-50`,
1323
+ children: inner
1324
+ }
1325
+ );
1326
+ }
1316
1327
  if (item.onClick && !item.href) {
1317
1328
  return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", onClick: item.onClick, className: `w-full text-left ${wrapperClasses}`, children: inner });
1318
1329
  }
@@ -1346,7 +1357,10 @@ function NavGroup({
1346
1357
  "button",
1347
1358
  {
1348
1359
  type: "button",
1349
- onClick: onToggle,
1360
+ onClick: () => {
1361
+ onToggle();
1362
+ item.onClick?.();
1363
+ },
1350
1364
  "aria-expanded": open,
1351
1365
  className: headerClasses,
1352
1366
  children: [
@@ -1866,14 +1880,20 @@ function useCloseNavDetailsOnOutsideClick() {
1866
1880
  };
1867
1881
  }, []);
1868
1882
  }
1869
- function NavAppShell({ sidebar, topBar, betaBanner, children }) {
1883
+ function NavAppShell({
1884
+ sidebar,
1885
+ topBar,
1886
+ betaBanner,
1887
+ contentWrapper = "padded",
1888
+ children
1889
+ }) {
1870
1890
  useCloseNavDetailsOnOutsideClick();
1871
1891
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-screen bg-[color:var(--background)] text-[color:var(--foreground)]", children: [
1872
1892
  /* @__PURE__ */ jsxRuntime.jsx(NavSidebar, { ...sidebar }),
1873
1893
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:pl-[240px]", children: [
1874
1894
  /* @__PURE__ */ jsxRuntime.jsx(NavTopBar, { ...topBar }),
1875
1895
  betaBanner ? /* @__PURE__ */ jsxRuntime.jsx(NavBetaBanner, { ...betaBanner }) : null,
1876
- /* @__PURE__ */ jsxRuntime.jsx("main", { className: "px-6 py-7", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-7xl", children }) })
1896
+ contentWrapper === "bare" ? children : /* @__PURE__ */ jsxRuntime.jsx("main", { className: "px-6 py-7", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-7xl", children }) })
1877
1897
  ] })
1878
1898
  ] });
1879
1899
  }