@the-portland-company/shell 0.96.1 → 0.97.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.
@@ -1,5 +1,5 @@
1
1
  import { orgIdTail, authBaseUrl } from './chunk-5LO5W7W5.js';
2
- import { PageHeaderView, BreadcrumbBarView, resolveOrgLogoUrl, topBarIconButtonClass, TopBarTooltip, TopBarPanelArrow, NavThemeControl, NAV_DISPLAY_OPTIONS, useTopBarIconSlotGlyph, resolveBrandGlyph, TOPBAR_GLYPH_SIZE, resolveTabGlyph, warnDeprecated, SpeculationRulesScript } from './chunk-5OTXPYZU.js';
2
+ import { PageHeaderView, BreadcrumbBarView, resolveOrgLogoUrl, topBarIconButtonClass, TopBarTooltip, TopBarPanelArrow, NavThemeControl, NAV_DISPLAY_OPTIONS, useTopBarIconSlotGlyph, resolveBrandGlyph, TOPBAR_GLYPH_SIZE, resolveTabGlyph, warnDeprecated, SpeculationRulesScript } from './chunk-VAQNZD37.js';
3
3
  import { readRailPreference, writeRailPreference } from './chunk-7YVJ7HQG.js';
4
4
  import { createContext, useRef, useEffect, useMemo, useState, Fragment as Fragment$1, useContext } from 'react';
5
5
  import clsx from 'clsx';
@@ -241,13 +241,14 @@ function standardPolitogyNav(opts) {
241
241
  });
242
242
  };
243
243
  const accountRows = () => [
244
- { kind: "section", label: "Account" },
244
+ { kind: "section", label: "Account", railHidden: true },
245
245
  // My Profile moved to the Politogy ID account app (auth.politogyvrm.com)
246
246
  // with the retirement of app.politogyvrm.com.
247
- { label: "My profile", icon: icon("circleUser"), href: withOrg(`${AUTH_ORIGIN}my-profile`) },
247
+ { label: "My profile", icon: icon("circleUser"), href: withOrg(`${AUTH_ORIGIN}my-profile`), railHidden: true },
248
248
  {
249
249
  label: "Organization settings",
250
250
  icon: icon("settings"),
251
+ railHidden: true,
251
252
  // Organization settings moved to the standalone Settings app
252
253
  // (settings.politogyvrm.com, Specs/Organization-Settings v12).
253
254
  href: withOrg(`${SETTINGS_ORIGIN}organization-settings`),
@@ -781,6 +782,8 @@ function NavSidebar({
781
782
  ] }) : null,
782
783
  filterOrgs(org.organizations, orgFilter).map((o) => {
783
784
  const selected = o.id === org.id;
785
+ const iconSrc = resolveOrgLogoUrl(o.iconUrl);
786
+ const logoSrc = iconSrc ? void 0 : resolveOrgLogoUrl(o.logoUrl);
784
787
  return /* @__PURE__ */ jsxs(
785
788
  "button",
786
789
  {
@@ -799,12 +802,13 @@ function NavSidebar({
799
802
  /* @__PURE__ */ jsx(
800
803
  "span",
801
804
  {
802
- style: { backgroundColor: o.brandColor || ORG_PILL_DEFAULT },
803
- className: "flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full text-[10px] font-bold text-[#FFFFFF]",
804
- children: resolveOrgLogoUrl(o.logoUrl) ? /* @__PURE__ */ jsx(
805
+ "data-org-option-mark": iconSrc ? "icon" : logoSrc ? "logo" : "initials",
806
+ style: iconSrc ? void 0 : { backgroundColor: o.brandColor || ORG_PILL_DEFAULT },
807
+ className: `flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden text-[10px] font-bold text-[#FFFFFF] ${iconSrc ? "rounded-[4px] bg-[#FFFFFF]" : "rounded-full"}`,
808
+ children: iconSrc ? /* @__PURE__ */ jsx("img", { src: iconSrc, alt: "", className: "max-h-full max-w-full object-contain" }) : logoSrc ? /* @__PURE__ */ jsx(
805
809
  "img",
806
810
  {
807
- src: resolveOrgLogoUrl(o.logoUrl),
811
+ src: logoSrc,
808
812
  alt: "",
809
813
  className: "h-full w-full object-cover"
810
814
  }
@@ -901,7 +905,7 @@ function NavSidebar({
901
905
  ] }),
902
906
  /* @__PURE__ */ jsx("div", { className: "flex flex-1 flex-col overflow-y-auto px-[10px] py-3", children: /* @__PURE__ */ jsxs("nav", { className: "flex flex-col gap-0.5", children: [
903
907
  nav.groupLabel ? /* @__PURE__ */ jsx("p", { className: `${NAV_EYEBROW_CLASS} px-2 pb-1.5 pt-1 ${rc("max-md:hidden")}`, children: nav.groupLabel }) : null,
904
- nav.items.map((item, idx) => {
908
+ nav.items.filter((item) => !item.railHidden).map((item, idx) => {
905
909
  if (item.kind === "section") {
906
910
  return /* @__PURE__ */ jsx(
907
911
  NavSectionRow,
@@ -2027,5 +2031,5 @@ function NavAppShell({
2027
2031
  }
2028
2032
 
2029
2033
  export { BETA_BANNER_DISMISS_KEY, BreadcrumbBar, CAMPAIGN_FEATURE_AVAILABILITY, NavAppShell, NavBetaBanner, NavSidebar, NavTabStrip, NavTopBar, PageHeader, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, shortEnvLabel, shortUserName, standardNavIcons, standardPolitogyNav };
2030
- //# sourceMappingURL=chunk-V2OFN2S2.js.map
2031
- //# sourceMappingURL=chunk-V2OFN2S2.js.map
2034
+ //# sourceMappingURL=chunk-WQR42AGC.js.map
2035
+ //# sourceMappingURL=chunk-WQR42AGC.js.map