@the-portland-company/shell 0.96.0 → 0.96.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.
@@ -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-537NZZVP.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';
@@ -781,6 +781,8 @@ function NavSidebar({
781
781
  ] }) : null,
782
782
  filterOrgs(org.organizations, orgFilter).map((o) => {
783
783
  const selected = o.id === org.id;
784
+ const iconSrc = resolveOrgLogoUrl(o.iconUrl);
785
+ const logoSrc = iconSrc ? void 0 : resolveOrgLogoUrl(o.logoUrl);
784
786
  return /* @__PURE__ */ jsxs(
785
787
  "button",
786
788
  {
@@ -799,12 +801,13 @@ function NavSidebar({
799
801
  /* @__PURE__ */ jsx(
800
802
  "span",
801
803
  {
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(
804
+ "data-org-option-mark": iconSrc ? "icon" : logoSrc ? "logo" : "initials",
805
+ style: iconSrc ? void 0 : { backgroundColor: o.brandColor || ORG_PILL_DEFAULT },
806
+ 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"}`,
807
+ children: iconSrc ? /* @__PURE__ */ jsx("img", { src: iconSrc, alt: "", className: "max-h-full max-w-full object-contain" }) : logoSrc ? /* @__PURE__ */ jsx(
805
808
  "img",
806
809
  {
807
- src: resolveOrgLogoUrl(o.logoUrl),
810
+ src: logoSrc,
808
811
  alt: "",
809
812
  className: "h-full w-full object-cover"
810
813
  }
@@ -976,6 +979,7 @@ function NavSidebar({
976
979
  "a",
977
980
  {
978
981
  href: safeHref(l.href),
982
+ ...l.external ? { target: "_blank", rel: "noopener noreferrer" } : {},
979
983
  className: "text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))] hover:text-[color:var(--sidebar-text,var(--foreground))] hover:underline",
980
984
  children: l.label
981
985
  }
@@ -2026,5 +2030,5 @@ function NavAppShell({
2026
2030
  }
2027
2031
 
2028
2032
  export { BETA_BANNER_DISMISS_KEY, BreadcrumbBar, CAMPAIGN_FEATURE_AVAILABILITY, NavAppShell, NavBetaBanner, NavSidebar, NavTabStrip, NavTopBar, PageHeader, clearBetaBannerDismissal, envChipClasses, isNavItemActive, modeIdFromLabel, shortEnvLabel, shortUserName, standardNavIcons, standardPolitogyNav };
2029
- //# sourceMappingURL=chunk-QGNJLKT5.js.map
2030
- //# sourceMappingURL=chunk-QGNJLKT5.js.map
2033
+ //# sourceMappingURL=chunk-SKXBGQ33.js.map
2034
+ //# sourceMappingURL=chunk-SKXBGQ33.js.map