@the-portland-company/shell 0.65.1 → 0.66.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/dist/app-chrome.cjs +69 -49
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +1 -1
- package/dist/{chunk-NRKRUM5B.js → chunk-SMZ5VNVH.js} +71 -51
- package/dist/chunk-SMZ5VNVH.js.map +1 -0
- package/dist/native.cjs +69 -49
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +18 -0
- package/dist/native.d.ts +18 -0
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-NRKRUM5B.js.map +0 -1
package/dist/app-chrome.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { broadcastLogout, watchLogout } from './chunk-LL6LSJAH.js';
|
|
3
|
-
import { clearBetaBannerDismissal, standardPolitogyNav, isNavItemActive, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SpecOverlayAction, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-
|
|
3
|
+
import { clearBetaBannerDismissal, standardPolitogyNav, isNavItemActive, NavAppShell, NavChromeProvider, FuelAction, NavDisplayAction, TopBarWidgetSlot, SpecOverlayAction, SupportAction, NotificationsAction, useChromeMe, useThemePreference, useNavChromeFetcher, useChromeOrgs } from './chunk-SMZ5VNVH.js';
|
|
4
4
|
import './chunk-JHIFJZ73.js';
|
|
5
5
|
import { NAV_DISPLAY_DEFAULT, resolveNavDisplay, isNavDisplayPreference, writeNavDisplayCookie, writeNavDisplayLocal, NAV_DISPLAY_STORAGE_KEY, readNavDisplayCookie } from './chunk-6UHJV2FH.js';
|
|
6
6
|
import { resolveActiveOrg, isOrgId, writeActiveOrgCookie, ACTIVE_ORG_QUERY_PARAM, readActiveOrgCookie } from './chunk-W2HITMV5.js';
|
|
@@ -2121,8 +2121,8 @@ function NavSidebar({
|
|
|
2121
2121
|
};
|
|
2122
2122
|
const activeFn = nav.isActive ?? isNavItemActive;
|
|
2123
2123
|
const ModeIcon = mode?.icon;
|
|
2124
|
-
const orgBg = org?.brandColor || ORG_PILL_DEFAULT;
|
|
2125
2124
|
const orgLogoSrc = resolveOrgLogoUrl(org?.logoUrl);
|
|
2125
|
+
const orgGradient = org?.brandColor ? `linear-gradient(to right, ${org.brandColor}, ${org.brandColorSecondary || org.brandColor})` : "linear-gradient(to right, #007BFF, #A54B7A, #E63946)";
|
|
2126
2126
|
const activeGroupKey = useMemo(() => {
|
|
2127
2127
|
for (let i = 0; i < nav.items.length; i++) {
|
|
2128
2128
|
const item = nav.items[i];
|
|
@@ -2218,29 +2218,33 @@ function NavSidebar({
|
|
|
2218
2218
|
),
|
|
2219
2219
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading organization" })
|
|
2220
2220
|
] }) : org.organizations && org.organizations.length > 0 && org.onSwitch ? /* @__PURE__ */ jsxs("details", { "data-nav-details": true, className: "group relative", children: [
|
|
2221
|
-
/* @__PURE__ */ jsxs("summary", { className: "flex w-full cursor-pointer list-none
|
|
2222
|
-
/* @__PURE__ */ jsxs("span", { className: "flex
|
|
2223
|
-
/* @__PURE__ */ jsx(
|
|
2224
|
-
"
|
|
2221
|
+
/* @__PURE__ */ jsxs("summary", { className: "flex w-full cursor-pointer list-none flex-col overflow-hidden rounded-[5px] border border-[color:var(--line)] bg-[color:var(--panel-elevated)] text-left text-[color:var(--foreground)] shadow-sm transition hover:bg-[color:var(--panel)] [&::-webkit-details-marker]:hidden", children: [
|
|
2222
|
+
/* @__PURE__ */ jsxs("span", { className: "relative flex h-[70px] w-full items-center justify-center bg-white px-3", children: [
|
|
2223
|
+
orgLogoSrc ? /* @__PURE__ */ jsx("img", { src: orgLogoSrc, alt: "", className: "max-h-[70px] max-w-full object-contain" }) : org.canUploadLogo ? /* @__PURE__ */ jsx(
|
|
2224
|
+
"a",
|
|
2225
2225
|
{
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2226
|
+
href: org.uploadLogoHref ?? "#",
|
|
2227
|
+
onClick: (e) => e.stopPropagation(),
|
|
2228
|
+
className: "text-xs font-semibold text-[color:var(--color-accent)] underline",
|
|
2229
|
+
children: "Upload logo"
|
|
2229
2230
|
}
|
|
2230
|
-
),
|
|
2231
|
+
) : /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold text-neutral-800", children: org.name ?? "Organization" }),
|
|
2232
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-x-0 bottom-0 h-[3px]", style: { backgroundImage: orgGradient } })
|
|
2233
|
+
] }),
|
|
2234
|
+
/* @__PURE__ */ jsxs("span", { className: "flex w-full min-w-0 items-center justify-between gap-2 px-2.5 py-2", children: [
|
|
2231
2235
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
2232
2236
|
/* @__PURE__ */ jsx(
|
|
2233
2237
|
"span",
|
|
2234
2238
|
{
|
|
2235
2239
|
title: org.name ?? void 0,
|
|
2236
|
-
className: "truncate text-
|
|
2240
|
+
className: "truncate text-[13px] font-semibold",
|
|
2237
2241
|
children: org.name ?? "No organizations"
|
|
2238
2242
|
}
|
|
2239
2243
|
),
|
|
2240
2244
|
org.id && !org.loading ? /* @__PURE__ */ jsx(OrgIdCopyButton, { id: org.id }) : null
|
|
2241
|
-
] })
|
|
2242
|
-
|
|
2243
|
-
|
|
2245
|
+
] }),
|
|
2246
|
+
/* @__PURE__ */ jsx(ChevronDown, {})
|
|
2247
|
+
] })
|
|
2244
2248
|
] }),
|
|
2245
2249
|
/* @__PURE__ */ jsxs("div", { className: "absolute left-0 right-0 z-40 mt-1 max-h-[min(60vh,520px)] overflow-y-auto rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]", children: [
|
|
2246
2250
|
shouldShowOrgFilter(org.organizations.length) ? /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-[color:var(--panel-elevated)] px-2 pb-1 pt-1", children: /* @__PURE__ */ jsx(
|
|
@@ -2310,60 +2314,76 @@ function NavSidebar({
|
|
|
2310
2314
|
{
|
|
2311
2315
|
type: "button",
|
|
2312
2316
|
onClick: org.onClick,
|
|
2313
|
-
className: "flex w-full
|
|
2317
|
+
className: "flex w-full flex-col overflow-hidden rounded-[5px] border border-[color:var(--line)] bg-[color:var(--panel-elevated)] text-left text-[color:var(--foreground)] shadow-sm transition hover:bg-[color:var(--panel)]",
|
|
2314
2318
|
children: [
|
|
2315
|
-
/* @__PURE__ */ jsxs("span", { className: "flex
|
|
2316
|
-
/* @__PURE__ */ jsx(
|
|
2317
|
-
"
|
|
2319
|
+
/* @__PURE__ */ jsxs("span", { className: "relative flex h-[70px] w-full items-center justify-center bg-white px-3", children: [
|
|
2320
|
+
orgLogoSrc ? /* @__PURE__ */ jsx("img", { src: orgLogoSrc, alt: "", className: "max-h-[70px] max-w-full object-contain" }) : org.canUploadLogo ? /* @__PURE__ */ jsx(
|
|
2321
|
+
"a",
|
|
2318
2322
|
{
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2323
|
+
href: org.uploadLogoHref ?? "#",
|
|
2324
|
+
onClick: (e) => e.stopPropagation(),
|
|
2325
|
+
className: "text-xs font-semibold text-[color:var(--color-accent)] underline",
|
|
2326
|
+
children: "Upload logo"
|
|
2322
2327
|
}
|
|
2323
|
-
),
|
|
2328
|
+
) : /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold text-neutral-800", children: org.name ?? "Organization" }),
|
|
2329
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-x-0 bottom-0 h-[3px]", style: { backgroundImage: orgGradient } })
|
|
2330
|
+
] }),
|
|
2331
|
+
/* @__PURE__ */ jsxs("span", { className: "flex w-full min-w-0 items-center justify-between gap-2 px-2.5 py-2", children: [
|
|
2324
2332
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
2325
2333
|
/* @__PURE__ */ jsx(
|
|
2326
2334
|
"span",
|
|
2327
2335
|
{
|
|
2328
2336
|
title: org.name ?? void 0,
|
|
2329
|
-
className: "truncate text-
|
|
2337
|
+
className: "truncate text-[13px] font-semibold",
|
|
2330
2338
|
children: org.name ?? "No organizations"
|
|
2331
2339
|
}
|
|
2332
2340
|
),
|
|
2333
2341
|
org.id && !org.loading ? /* @__PURE__ */ jsx(OrgIdCopyButton, { id: org.id }) : null
|
|
2334
|
-
] })
|
|
2335
|
-
|
|
2336
|
-
|
|
2342
|
+
] }),
|
|
2343
|
+
/* @__PURE__ */ jsx(ChevronDown, {})
|
|
2344
|
+
] })
|
|
2337
2345
|
]
|
|
2338
2346
|
}
|
|
2339
2347
|
)
|
|
2340
2348
|
] }) : null,
|
|
2341
2349
|
mode ? /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
2342
|
-
/* @__PURE__ */ jsx(
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2350
|
+
/* @__PURE__ */ jsx(
|
|
2351
|
+
"div",
|
|
2352
|
+
{
|
|
2353
|
+
role: "radiogroup",
|
|
2354
|
+
"aria-label": "Mode",
|
|
2355
|
+
className: "flex items-center justify-start gap-0.5 rounded-lg border border-[color:var(--border-inverse,var(--line))] bg-[color:var(--mode-track-bg,var(--panel-elevated))] p-[3px]",
|
|
2356
|
+
children: (mode.options && mode.options.length > 0 ? mode.options : [{ id: mode.label, label: mode.label, icon: ModeIcon }]).map(
|
|
2357
|
+
(opt) => {
|
|
2358
|
+
const selected = opt.label === mode.label;
|
|
2359
|
+
const OptIcon = opt.icon;
|
|
2360
|
+
const available = opt.available ?? true;
|
|
2361
|
+
const title = !available ? opt.unavailableTooltip ?? `${opt.label} isn't active for this organization.` : opt.label;
|
|
2362
|
+
return /* @__PURE__ */ jsx(
|
|
2363
|
+
"button",
|
|
2364
|
+
{
|
|
2365
|
+
type: "button",
|
|
2366
|
+
role: "radio",
|
|
2367
|
+
title,
|
|
2368
|
+
"aria-label": title,
|
|
2369
|
+
"aria-checked": selected,
|
|
2370
|
+
"aria-current": selected ? "true" : void 0,
|
|
2371
|
+
onClick: () => {
|
|
2372
|
+
if (available && !selected) mode.onSelect?.(opt.id);
|
|
2373
|
+
},
|
|
2374
|
+
disabled: !available,
|
|
2375
|
+
className: [
|
|
2376
|
+
"flex h-9 items-center justify-center rounded px-[9px] py-[6px] transition",
|
|
2377
|
+
!available ? "cursor-not-allowed text-[color:var(--sidebar-text-muted,var(--muted))] opacity-35" : selected ? "bg-[color:var(--mode-accent,var(--color-accent))] text-[color:var(--mode-on-accent,white)] shadow-sm" : "text-[color:var(--sidebar-text-muted,var(--muted))] hover:bg-white/5 hover:text-[color:var(--sidebar-text,var(--foreground))]"
|
|
2378
|
+
].join(" "),
|
|
2379
|
+
children: OptIcon ? /* @__PURE__ */ jsx(OptIcon, { size: 15, className: "shrink-0" }) : null
|
|
2380
|
+
},
|
|
2381
|
+
opt.id
|
|
2382
|
+
);
|
|
2383
|
+
}
|
|
2384
|
+
)
|
|
2365
2385
|
}
|
|
2366
|
-
)
|
|
2386
|
+
),
|
|
2367
2387
|
/* @__PURE__ */ jsx("p", { className: "mt-1.5 text-center text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--sidebar-text-muted,var(--muted))]", children: mode.label })
|
|
2368
2388
|
] }) : null,
|
|
2369
2389
|
/* @__PURE__ */ jsxs("nav", { className: "flex flex-col gap-1", children: [
|
|
@@ -3437,5 +3457,5 @@ function NavAppShell({
|
|
|
3437
3457
|
}
|
|
3438
3458
|
|
|
3439
3459
|
export { BETA_BANNER_DISMISS_KEY, CAMPAIGN_FEATURE_AVAILABILITY, CORE_APP_ORIGIN, CORE_BILLING_PATH, FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SPECS_ORIGIN, SpecOverlayAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, clearBetaBannerDismissal, envChipClasses, isNavItemActive, resolveOrgLogoUrl, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeFetcher, useThemePreference };
|
|
3440
|
-
//# sourceMappingURL=chunk-
|
|
3441
|
-
//# sourceMappingURL=chunk-
|
|
3460
|
+
//# sourceMappingURL=chunk-SMZ5VNVH.js.map
|
|
3461
|
+
//# sourceMappingURL=chunk-SMZ5VNVH.js.map
|