@the-portland-company/shell 0.68.0 → 0.69.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 +46 -0
- package/README.md +4 -1
- package/dist/FormColumn-DsNP6NVG.d.cts +21 -0
- package/dist/FormColumn-DsNP6NVG.d.ts +21 -0
- package/dist/app-chrome.cjs +254 -97
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.d.cts +24 -12
- package/dist/app-chrome.d.ts +24 -12
- package/dist/app-chrome.js +73 -15
- package/dist/app-chrome.js.map +1 -1
- package/dist/app-icons.cjs +6 -10
- package/dist/app-icons.cjs.map +1 -1
- package/dist/app-icons.d.cts +6 -6
- package/dist/app-icons.d.ts +6 -6
- package/dist/app-icons.js +6 -10
- package/dist/app-icons.js.map +1 -1
- package/dist/chunk-LPSBSAF3.js +26 -0
- package/dist/chunk-LPSBSAF3.js.map +1 -0
- package/dist/{chunk-ZKYREVCK.js → chunk-WFUWFMCA.js} +195 -123
- package/dist/chunk-WFUWFMCA.js.map +1 -0
- package/dist/index.cjs +68 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +30 -9
- package/dist/index.d.ts +30 -9
- package/dist/index.js +59 -45
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +211 -121
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +56 -29
- package/dist/native.d.ts +56 -29
- package/dist/native.js +2 -1
- package/package.json +1 -1
- package/dist/chunk-ZKYREVCK.js.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { warnDeprecated } from './chunk-LPSBSAF3.js';
|
|
1
2
|
import { readThemeCookie, THEME_STORAGE_KEY, isThemePreference, applyThemePreference, readPendingThemeChoice, writeThemeCookie, clearPendingThemeChoice, markThemeChoicePending } from './chunk-NHBNM5P3.js';
|
|
2
3
|
import { createContext, useRef, useState, useEffect, useContext, useCallback, useMemo, useSyncExternalStore } from 'react';
|
|
3
4
|
import clsx from 'clsx';
|
|
@@ -113,7 +114,7 @@ function useAnyTopBarPanelOpen() {
|
|
|
113
114
|
}
|
|
114
115
|
function TopBarCountBadge({ count }) {
|
|
115
116
|
if (!(count > 0)) return null;
|
|
116
|
-
return /* @__PURE__ */ jsx("span", { className: "absolute -top-[5px] -right-[5px] flex h-4 min-w-4 items-center justify-center rounded-full bg-[color:var(--chrome-danger)] px-1 text-[10px] font-bold leading-4 text-
|
|
117
|
+
return /* @__PURE__ */ jsx("span", { className: "absolute -top-[5px] -right-[5px] flex h-4 min-w-4 items-center justify-center rounded-full bg-[color:var(--chrome-danger)] px-1 text-[10px] font-bold leading-4 text-[#FFFFFF]", children: count > 99 ? "99+" : count });
|
|
117
118
|
}
|
|
118
119
|
function TopBarTooltip({
|
|
119
120
|
title,
|
|
@@ -183,7 +184,7 @@ function NavThemeControl({
|
|
|
183
184
|
onClick: () => onChange(opt.value),
|
|
184
185
|
className: [
|
|
185
186
|
"flex-1 px-3 py-1.5 text-xs font-semibold transition",
|
|
186
|
-
value === opt.value ? "bg-[color:var(--color-accent)] text-
|
|
187
|
+
value === opt.value ? "bg-[color:var(--color-accent)] text-[#FFFFFF]" : "text-[color:var(--muted)] hover:bg-[color:var(--panel)] hover:text-[color:var(--foreground)]"
|
|
187
188
|
].join(" "),
|
|
188
189
|
children: opt.label
|
|
189
190
|
},
|
|
@@ -527,7 +528,7 @@ function LowFuelHint({ lowFuel, orgId }) {
|
|
|
527
528
|
"div",
|
|
528
529
|
{
|
|
529
530
|
role: "status",
|
|
530
|
-
className: "absolute right-0 top-[calc(100%+10px)] z-50 w-60 rounded-lg border border-[color:var(--chrome-danger)] bg-[color:var(--chrome-danger)] px-3 py-2 text-
|
|
531
|
+
className: "absolute right-0 top-[calc(100%+10px)] z-50 w-60 rounded-lg border border-[color:var(--chrome-danger)] bg-[color:var(--chrome-danger)] px-3 py-2 text-[#FFFFFF] shadow-[var(--shadow-soft)]",
|
|
531
532
|
onClick: (e) => e.stopPropagation(),
|
|
532
533
|
children: [
|
|
533
534
|
/* @__PURE__ */ jsx(
|
|
@@ -555,7 +556,7 @@ function LowFuelHint({ lowFuel, orgId }) {
|
|
|
555
556
|
type: "button",
|
|
556
557
|
"aria-label": "Dismiss low fuel notice",
|
|
557
558
|
onClick: dismiss,
|
|
558
|
-
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-
|
|
559
|
+
className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-[#FFFFFF]/90 transition hover:bg-[#FFFFFF]/20",
|
|
559
560
|
children: /* @__PURE__ */ jsx(XGlyph, {})
|
|
560
561
|
}
|
|
561
562
|
)
|
|
@@ -739,7 +740,7 @@ function NewReplyToast({
|
|
|
739
740
|
activate();
|
|
740
741
|
}
|
|
741
742
|
},
|
|
742
|
-
className: "absolute right-[-6px] top-[calc(100%+12px)] z-50 min-w-[240px] max-w-[320px] cursor-pointer rounded-xl bg-[#161616] px-4 py-3 text-
|
|
743
|
+
className: "absolute right-[-6px] top-[calc(100%+12px)] z-50 min-w-[240px] max-w-[320px] cursor-pointer rounded-xl bg-[#161616] px-4 py-3 text-[#FFFFFF] shadow-[var(--shadow-soft)]",
|
|
743
744
|
style: {
|
|
744
745
|
opacity: visible ? 1 : 0,
|
|
745
746
|
transform: visible ? "translateY(0px)" : "translateY(-4px)",
|
|
@@ -763,7 +764,7 @@ function NewReplyToast({
|
|
|
763
764
|
setVisible(false);
|
|
764
765
|
onClose();
|
|
765
766
|
},
|
|
766
|
-
className: "absolute right-2 top-2 flex h-5 w-5 items-center justify-center rounded-full text-
|
|
767
|
+
className: "absolute right-2 top-2 flex h-5 w-5 items-center justify-center rounded-full text-[#FFFFFF] opacity-60 transition hover:bg-[#FFFFFF]/10 hover:opacity-100",
|
|
767
768
|
children: /* @__PURE__ */ jsx(XGlyph, { size: 12 })
|
|
768
769
|
}
|
|
769
770
|
),
|
|
@@ -778,7 +779,7 @@ function NewReplyToast({
|
|
|
778
779
|
setVisible(false);
|
|
779
780
|
onSilence();
|
|
780
781
|
},
|
|
781
|
-
className: "mt-2 inline-flex items-center gap-1 text-[11px] font-semibold text-
|
|
782
|
+
className: "mt-2 inline-flex items-center gap-1 text-[11px] font-semibold text-[#FFFFFF] opacity-60 transition hover:opacity-100",
|
|
782
783
|
children: [
|
|
783
784
|
/* @__PURE__ */ jsx(BellOffGlyph, { size: 12 }),
|
|
784
785
|
"Silence notifications"
|
|
@@ -1151,7 +1152,7 @@ function SupportAction({ orgId } = {}) {
|
|
|
1151
1152
|
{
|
|
1152
1153
|
type: "button",
|
|
1153
1154
|
onClick: close,
|
|
1154
|
-
className: "rounded-full bg-[color:var(--color-accent)] px-4 py-2 text-sm font-semibold text-
|
|
1155
|
+
className: "rounded-full bg-[color:var(--color-accent)] px-4 py-2 text-sm font-semibold text-[#FFFFFF] hover:opacity-90",
|
|
1155
1156
|
children: "Done"
|
|
1156
1157
|
}
|
|
1157
1158
|
) })
|
|
@@ -1211,7 +1212,7 @@ function SupportAction({ orgId } = {}) {
|
|
|
1211
1212
|
type: "button",
|
|
1212
1213
|
onClick: submit,
|
|
1213
1214
|
disabled: !message.trim() || state === "sending",
|
|
1214
|
-
className: "rounded-full bg-[color:var(--color-accent)] px-4 py-2 text-sm font-semibold text-
|
|
1215
|
+
className: "rounded-full bg-[color:var(--color-accent)] px-4 py-2 text-sm font-semibold text-[#FFFFFF] transition hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1215
1216
|
children: state === "sending" ? "Sending\u2026" : "Send request"
|
|
1216
1217
|
}
|
|
1217
1218
|
)
|
|
@@ -1447,7 +1448,7 @@ function SpecOverlayAction({ orgId, orgName } = {}) {
|
|
|
1447
1448
|
"span",
|
|
1448
1449
|
{
|
|
1449
1450
|
className: [
|
|
1450
|
-
"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-normal leading-none text-
|
|
1451
|
+
"absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] font-normal leading-none text-[#FFFFFF]",
|
|
1451
1452
|
status && status.matched ? status.passed ? "bg-[color:var(--chrome-success,#2f855a)]" : "bg-[color:var(--chrome-danger)]" : "bg-[color:var(--muted)]"
|
|
1452
1453
|
].join(" "),
|
|
1453
1454
|
children: badgeLabel
|
|
@@ -2080,6 +2081,24 @@ function envChipClasses(label) {
|
|
|
2080
2081
|
return "bg-[rgba(107,114,128,0.16)] text-[#6b7280]";
|
|
2081
2082
|
}
|
|
2082
2083
|
var ORG_PILL_DEFAULT = "var(--color-accent)";
|
|
2084
|
+
var RailCollapsibleContext = createContext(false);
|
|
2085
|
+
function useRailCollapse() {
|
|
2086
|
+
const collapsible = useContext(RailCollapsibleContext);
|
|
2087
|
+
return (cls) => collapsible ? cls : "";
|
|
2088
|
+
}
|
|
2089
|
+
function OrgIconMark({ org, logoSrc }) {
|
|
2090
|
+
const rc = useRailCollapse();
|
|
2091
|
+
const src = resolveOrgLogoUrl(org.iconUrl) ?? logoSrc;
|
|
2092
|
+
return /* @__PURE__ */ jsx(
|
|
2093
|
+
"span",
|
|
2094
|
+
{
|
|
2095
|
+
"aria-hidden": true,
|
|
2096
|
+
"data-rail-org-mark": "",
|
|
2097
|
+
className: `hidden h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-[5px] bg-[#FFFFFF] text-[11px] font-bold text-neutral-800 ${rc("max-md:flex")}`,
|
|
2098
|
+
children: src ? /* @__PURE__ */ jsx("img", { src, alt: "", className: "max-h-full max-w-full object-contain" }) : (org.name ?? "Org").slice(0, 2).toUpperCase()
|
|
2099
|
+
}
|
|
2100
|
+
);
|
|
2101
|
+
}
|
|
2083
2102
|
function NavSidebar({
|
|
2084
2103
|
pathname,
|
|
2085
2104
|
brand,
|
|
@@ -2092,6 +2111,8 @@ function NavSidebar({
|
|
|
2092
2111
|
onClose
|
|
2093
2112
|
}) {
|
|
2094
2113
|
const Link = linkComponent ?? DefaultLink;
|
|
2114
|
+
const collapsible = !open;
|
|
2115
|
+
const rc = (cls) => collapsible ? cls : "";
|
|
2095
2116
|
const asideRef = useRef(null);
|
|
2096
2117
|
const closeButtonRef = useRef(null);
|
|
2097
2118
|
const previouslyFocusedRef = useRef(null);
|
|
@@ -2158,12 +2179,12 @@ function NavSidebar({
|
|
|
2158
2179
|
setOpenGroup(activeGroupKey);
|
|
2159
2180
|
}, [activeGroupKey]);
|
|
2160
2181
|
const toggleGroup = (key) => setOpenGroup((prev) => prev === key ? null : key);
|
|
2161
|
-
return /* @__PURE__ */ jsxs(
|
|
2182
|
+
return /* @__PURE__ */ jsxs(RailCollapsibleContext.Provider, { value: collapsible, children: [
|
|
2162
2183
|
open ? /* @__PURE__ */ jsx(
|
|
2163
2184
|
"div",
|
|
2164
2185
|
{
|
|
2165
2186
|
"aria-hidden": true,
|
|
2166
|
-
className: "fixed inset-0 z-40 bg-black/40
|
|
2187
|
+
className: "fixed inset-0 z-40 bg-black/40 md:hidden",
|
|
2167
2188
|
onClick: onClose
|
|
2168
2189
|
}
|
|
2169
2190
|
) : null,
|
|
@@ -2176,8 +2197,10 @@ function NavSidebar({
|
|
|
2176
2197
|
"aria-modal": open ? "true" : void 0,
|
|
2177
2198
|
"aria-label": open ? "Navigation" : void 0,
|
|
2178
2199
|
className: clsx(
|
|
2179
|
-
"fixed inset-y-0 left-0
|
|
2180
|
-
|
|
2200
|
+
"fixed inset-y-0 left-0 flex flex-col border-r border-[color:var(--sidebar-line,var(--line))] bg-[color:var(--sidebar-bg,var(--nav-surface))]",
|
|
2201
|
+
// Never hidden: the 64px icon rail below `md`, the full rail from
|
|
2202
|
+
// `md` up, and the full rail as a drawer when expanded below `md`.
|
|
2203
|
+
open ? "z-50 w-[var(--sidebar-width,236px)]" : "z-30 w-[var(--sidebar-collapsed-width,64px)] md:w-[var(--sidebar-width,236px)]"
|
|
2181
2204
|
),
|
|
2182
2205
|
style: { fontFamily: 'var(--font-family, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif)' },
|
|
2183
2206
|
onKeyDown: trapTab,
|
|
@@ -2192,36 +2215,62 @@ function NavSidebar({
|
|
|
2192
2215
|
ref: closeButtonRef,
|
|
2193
2216
|
onClick: onClose,
|
|
2194
2217
|
"aria-label": "Close menu",
|
|
2195
|
-
className: "absolute right-3 top-3 flex h-8 w-8 items-center justify-center rounded-full text-[color:var(--muted)] transition hover:bg-[color:var(--panel-elevated)] hover:text-[color:var(--foreground)]
|
|
2218
|
+
className: "absolute right-3 top-3 flex h-8 w-8 items-center justify-center rounded-full text-[color:var(--muted)] transition hover:bg-[color:var(--panel-elevated)] hover:text-[color:var(--foreground)] md:hidden",
|
|
2196
2219
|
children: /* @__PURE__ */ jsx(CloseIcon, {})
|
|
2197
2220
|
}
|
|
2198
2221
|
) : null,
|
|
2199
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2200
|
-
/* @__PURE__ */
|
|
2222
|
+
/* @__PURE__ */ jsxs("div", { className: `flex flex-shrink-0 flex-col gap-[14px] border-b border-[color:var(--sidebar-line,var(--line))] px-[18px] py-4 ${rc("max-md:items-center max-md:px-[10px]")}`, children: [
|
|
2223
|
+
/* @__PURE__ */ jsxs(
|
|
2201
2224
|
Link,
|
|
2202
2225
|
{
|
|
2203
2226
|
href: brand.homeHref ?? "/",
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2227
|
+
"aria-label": brand.logoAlt ?? brand.title,
|
|
2228
|
+
className: `flex items-center gap-2.5 ${rc("max-md:justify-center")}`,
|
|
2229
|
+
children: [
|
|
2230
|
+
brand.logoSquareSrc ? /* @__PURE__ */ jsx(
|
|
2231
|
+
"img",
|
|
2232
|
+
{
|
|
2233
|
+
src: brand.logoSquareSrc,
|
|
2234
|
+
alt: "",
|
|
2235
|
+
draggable: false,
|
|
2236
|
+
"data-rail-logo": "square",
|
|
2237
|
+
className: `hidden h-8 w-8 object-contain ${rc("max-md:block")}`
|
|
2238
|
+
}
|
|
2239
|
+
) : brand.logoPending ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `hidden h-8 w-8 ${rc("max-md:block")}` }) : null,
|
|
2240
|
+
brand.logoSrc ? /* @__PURE__ */ jsx(
|
|
2241
|
+
"img",
|
|
2242
|
+
{
|
|
2243
|
+
src: brand.logoSrc,
|
|
2244
|
+
alt: brand.logoAlt ?? brand.title,
|
|
2245
|
+
draggable: false,
|
|
2246
|
+
"data-rail-logo": "horizontal",
|
|
2247
|
+
className: `h-[var(--sidebar-brand-logo-height,24px)] w-auto object-contain ${rc("max-md:hidden")}`
|
|
2248
|
+
}
|
|
2249
|
+
) : brand.logoPending ? /* @__PURE__ */ jsx(
|
|
2250
|
+
"span",
|
|
2251
|
+
{
|
|
2252
|
+
"aria-hidden": true,
|
|
2253
|
+
className: `block h-[var(--sidebar-brand-logo-height,24px)] ${rc("max-md:hidden")}`
|
|
2254
|
+
}
|
|
2255
|
+
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2256
|
+
/* @__PURE__ */ jsx(
|
|
2257
|
+
"span",
|
|
2258
|
+
{
|
|
2259
|
+
className: `flex h-9 w-9 items-center justify-center rounded-xl bg-[color:var(--color-accent)] text-base font-black text-[#FFFFFF] shadow-sm ${brand.logoSquareSrc ? rc("max-md:hidden") : ""}`,
|
|
2260
|
+
children: brand.badgeLabel
|
|
2261
|
+
}
|
|
2262
|
+
),
|
|
2263
|
+
/* @__PURE__ */ jsxs("span", { className: `flex flex-col leading-tight ${rc("max-md:hidden")}`, children: [
|
|
2264
|
+
/* @__PURE__ */ jsx("span", { className: "text-base font-extrabold tracking-[-0.01em] text-[color:var(--color-accent)]", children: brand.title }),
|
|
2265
|
+
brand.subtitle ? /* @__PURE__ */ jsx("span", { className: "text-[11px] font-semibold uppercase tracking-[0.16em] text-[color:var(--muted)]", children: brand.subtitle }) : null
|
|
2266
|
+
] })
|
|
2218
2267
|
] })
|
|
2219
|
-
]
|
|
2268
|
+
]
|
|
2220
2269
|
}
|
|
2221
2270
|
),
|
|
2222
|
-
org ? /* @__PURE__ */ jsxs("div", { children: [
|
|
2223
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2224
|
-
org.loading ? /* @__PURE__ */ jsxs("div", { className:
|
|
2271
|
+
org ? /* @__PURE__ */ jsxs("div", { className: rc("max-md:flex max-md:justify-center"), children: [
|
|
2272
|
+
/* @__PURE__ */ jsx("div", { className: `mb-[7px] flex items-center justify-between ${rc("max-md:hidden")}`, children: /* @__PURE__ */ jsx("p", { className: NAV_EYEBROW_CLASS, children: "Organization" }) }),
|
|
2273
|
+
org.loading ? /* @__PURE__ */ jsxs("div", { className: `flex w-full items-center gap-2.5 rounded-md border border-[color:var(--line)] bg-[color:var(--panel-elevated)] px-2.5 py-2 shadow-sm ${rc("max-md:w-auto max-md:border-0 max-md:bg-transparent max-md:p-0 max-md:shadow-none")}`, children: [
|
|
2225
2274
|
/* @__PURE__ */ jsx(
|
|
2226
2275
|
"span",
|
|
2227
2276
|
{
|
|
@@ -2233,7 +2282,7 @@ function NavSidebar({
|
|
|
2233
2282
|
"span",
|
|
2234
2283
|
{
|
|
2235
2284
|
"aria-hidden": true,
|
|
2236
|
-
className:
|
|
2285
|
+
className: `h-4 flex-1 animate-pulse rounded bg-[color:var(--panel)] ${rc("max-md:hidden")}`
|
|
2237
2286
|
}
|
|
2238
2287
|
),
|
|
2239
2288
|
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Loading organization" })
|
|
@@ -2242,9 +2291,11 @@ function NavSidebar({
|
|
|
2242
2291
|
"summary",
|
|
2243
2292
|
{
|
|
2244
2293
|
style: orgCardStyle,
|
|
2245
|
-
|
|
2294
|
+
title: org.name ?? void 0,
|
|
2295
|
+
className: `flex w-full cursor-pointer list-none flex-col overflow-hidden rounded-[5px] border border-[color:var(--sidebar-card-border,var(--sidebar-line,var(--line)))] bg-[color:var(--sidebar-card-bg,var(--panel-elevated))] text-left text-[color:var(--sidebar-text,var(--foreground))] transition hover:bg-[color:var(--sidebar-row-hover-bg,var(--panel))] [&::-webkit-details-marker]:hidden ${rc("max-md:w-auto max-md:items-center max-md:overflow-visible max-md:border-0 max-md:bg-transparent")}`,
|
|
2246
2296
|
children: [
|
|
2247
|
-
/* @__PURE__ */
|
|
2297
|
+
/* @__PURE__ */ jsx(OrgIconMark, { org, logoSrc: orgLogoSrc }),
|
|
2298
|
+
/* @__PURE__ */ jsxs("span", { className: `relative flex h-[var(--sidebar-org-band-height,48px)] w-full items-center justify-center bg-[#FFFFFF] px-3 py-[7px] ${rc("max-md:hidden")}`, children: [
|
|
2248
2299
|
orgLogoSrc ? /* @__PURE__ */ jsx("img", { src: orgLogoSrc, alt: "", className: "max-h-full max-w-[132px] object-contain" }) : org.canUploadLogo ? /* @__PURE__ */ jsx(
|
|
2249
2300
|
"a",
|
|
2250
2301
|
{
|
|
@@ -2256,7 +2307,7 @@ function NavSidebar({
|
|
|
2256
2307
|
) : /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold text-neutral-800", children: org.name ?? "Organization" }),
|
|
2257
2308
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-x-0 bottom-0 h-[3px]", style: { backgroundImage: orgGradient } })
|
|
2258
2309
|
] }),
|
|
2259
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
2310
|
+
/* @__PURE__ */ jsxs("span", { className: `flex w-full min-w-0 items-center justify-between gap-[9px] px-[10px] py-2 ${rc("max-md:hidden")}`, children: [
|
|
2260
2311
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
2261
2312
|
/* @__PURE__ */ jsx(
|
|
2262
2313
|
"span",
|
|
@@ -2273,7 +2324,7 @@ function NavSidebar({
|
|
|
2273
2324
|
]
|
|
2274
2325
|
}
|
|
2275
2326
|
),
|
|
2276
|
-
/* @__PURE__ */ jsxs("div", { className:
|
|
2327
|
+
/* @__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)] ${rc("max-md:right-auto max-md:w-[236px]")}`, children: [
|
|
2277
2328
|
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(
|
|
2278
2329
|
"input",
|
|
2279
2330
|
{
|
|
@@ -2318,7 +2369,7 @@ function NavSidebar({
|
|
|
2318
2369
|
"span",
|
|
2319
2370
|
{
|
|
2320
2371
|
style: { backgroundColor: o.brandColor || ORG_PILL_DEFAULT },
|
|
2321
|
-
className: "flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full text-[10px] font-bold text-
|
|
2372
|
+
className: "flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-full text-[10px] font-bold text-[#FFFFFF]",
|
|
2322
2373
|
children: resolveOrgLogoUrl(o.logoUrl) ? /* @__PURE__ */ jsx(
|
|
2323
2374
|
"img",
|
|
2324
2375
|
{
|
|
@@ -2342,9 +2393,11 @@ function NavSidebar({
|
|
|
2342
2393
|
type: "button",
|
|
2343
2394
|
onClick: org.onClick,
|
|
2344
2395
|
style: orgCardStyle,
|
|
2345
|
-
|
|
2396
|
+
title: org.name ?? void 0,
|
|
2397
|
+
className: `flex w-full flex-col overflow-hidden rounded-[5px] border border-[color:var(--sidebar-card-border,var(--sidebar-line,var(--line)))] bg-[color:var(--sidebar-card-bg,var(--panel-elevated))] text-left text-[color:var(--sidebar-text,var(--foreground))] transition hover:bg-[color:var(--sidebar-row-hover-bg,var(--panel))] ${rc("max-md:w-auto max-md:items-center max-md:overflow-visible max-md:border-0 max-md:bg-transparent")}`,
|
|
2346
2398
|
children: [
|
|
2347
|
-
/* @__PURE__ */
|
|
2399
|
+
/* @__PURE__ */ jsx(OrgIconMark, { org, logoSrc: orgLogoSrc }),
|
|
2400
|
+
/* @__PURE__ */ jsxs("span", { className: `relative flex h-[var(--sidebar-org-band-height,48px)] w-full items-center justify-center bg-[#FFFFFF] px-3 py-[7px] ${rc("max-md:hidden")}`, children: [
|
|
2348
2401
|
orgLogoSrc ? /* @__PURE__ */ jsx("img", { src: orgLogoSrc, alt: "", className: "max-h-full max-w-[132px] object-contain" }) : org.canUploadLogo ? /* @__PURE__ */ jsx(
|
|
2349
2402
|
"a",
|
|
2350
2403
|
{
|
|
@@ -2356,7 +2409,7 @@ function NavSidebar({
|
|
|
2356
2409
|
) : /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold text-neutral-800", children: org.name ?? "Organization" }),
|
|
2357
2410
|
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "absolute inset-x-0 bottom-0 h-[3px]", style: { backgroundImage: orgGradient } })
|
|
2358
2411
|
] }),
|
|
2359
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
2412
|
+
/* @__PURE__ */ jsxs("span", { className: `flex w-full min-w-0 items-center justify-between gap-[9px] px-[10px] py-2 ${rc("max-md:hidden")}`, children: [
|
|
2360
2413
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
|
|
2361
2414
|
/* @__PURE__ */ jsx(
|
|
2362
2415
|
"span",
|
|
@@ -2374,13 +2427,13 @@ function NavSidebar({
|
|
|
2374
2427
|
}
|
|
2375
2428
|
)
|
|
2376
2429
|
] }) : null,
|
|
2377
|
-
mode ? /* @__PURE__ */ jsxs("div", { children: [
|
|
2430
|
+
mode ? /* @__PURE__ */ jsxs("div", { className: rc("max-md:w-full"), children: [
|
|
2378
2431
|
/* @__PURE__ */ jsx(
|
|
2379
2432
|
"div",
|
|
2380
2433
|
{
|
|
2381
2434
|
role: "radiogroup",
|
|
2382
2435
|
"aria-label": "Mode",
|
|
2383
|
-
className:
|
|
2436
|
+
className: `flex w-full items-center gap-1 rounded-lg border border-[color:var(--border-inverse,var(--sidebar-line,var(--line)))] bg-[color:var(--mode-track-bg,var(--panel-elevated))] p-[3px] ${rc("max-md:flex-col max-md:items-stretch")}`,
|
|
2384
2437
|
children: (mode.options && mode.options.length > 0 ? mode.options : [{ id: mode.label, label: mode.label, icon: ModeIcon }]).map(
|
|
2385
2438
|
(opt) => {
|
|
2386
2439
|
const selected = opt.label === mode.label;
|
|
@@ -2402,7 +2455,7 @@ function NavSidebar({
|
|
|
2402
2455
|
disabled: !available,
|
|
2403
2456
|
className: [
|
|
2404
2457
|
"flex flex-1 items-center justify-center rounded-[5px] px-[9px] py-[6px] transition",
|
|
2405
|
-
!available ? "cursor-not-allowed text-[color:var(--sidebar-text-muted,var(--muted))] opacity-35" : selected ? "bg-[color:var(--sidebar-mode-selected-bg,var(--mode-accent,var(--color-accent)))] text-[color:var(--mode-on-accent,white)]" : "text-[color:var(--sidebar-text-muted,var(--muted))] hover:bg-
|
|
2458
|
+
!available ? "cursor-not-allowed text-[color:var(--sidebar-text-muted,var(--muted))] opacity-35" : selected ? "bg-[color:var(--sidebar-mode-selected-bg,var(--mode-accent,var(--color-accent)))] text-[color:var(--mode-on-accent,white)]" : "text-[color:var(--sidebar-text-muted,var(--muted))] hover:bg-[#FFFFFF]/5 hover:text-[color:var(--sidebar-text,var(--foreground))]"
|
|
2406
2459
|
].join(" "),
|
|
2407
2460
|
children: OptIcon ? /* @__PURE__ */ jsx(OptIcon, { size: 15, className: "shrink-0" }) : null
|
|
2408
2461
|
},
|
|
@@ -2412,11 +2465,11 @@ function NavSidebar({
|
|
|
2412
2465
|
)
|
|
2413
2466
|
}
|
|
2414
2467
|
),
|
|
2415
|
-
/* @__PURE__ */ jsx("p", { className:
|
|
2468
|
+
/* @__PURE__ */ jsx("p", { className: `mt-1.5 text-left text-[11px] leading-[1.2] text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))] ${rc("max-md:hidden")}`, children: modeCaption(mode.label) })
|
|
2416
2469
|
] }) : null
|
|
2417
2470
|
] }),
|
|
2418
2471
|
/* @__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: [
|
|
2419
|
-
nav.groupLabel ? /* @__PURE__ */ jsx("p", { className: `${NAV_EYEBROW_CLASS} px-2 pb-1.5 pt-1`, children: nav.groupLabel }) : null,
|
|
2472
|
+
nav.groupLabel ? /* @__PURE__ */ jsx("p", { className: `${NAV_EYEBROW_CLASS} px-2 pb-1.5 pt-1 ${rc("max-md:hidden")}`, children: nav.groupLabel }) : null,
|
|
2420
2473
|
nav.items.map((item, idx) => {
|
|
2421
2474
|
if (item.kind === "section") {
|
|
2422
2475
|
return /* @__PURE__ */ jsx(
|
|
@@ -2482,7 +2535,7 @@ function NavSidebar({
|
|
|
2482
2535
|
);
|
|
2483
2536
|
})
|
|
2484
2537
|
] }) }),
|
|
2485
|
-
footer ? /* @__PURE__ */ jsxs("div", { className:
|
|
2538
|
+
footer ? /* @__PURE__ */ jsxs("div", { className: `relative flex-shrink-0 border-t border-[color:var(--sidebar-line,var(--line))] px-[14px] py-3 ${rc("max-md:px-[10px]")}`, children: [
|
|
2486
2539
|
footer.user ? /* @__PURE__ */ jsx(
|
|
2487
2540
|
NavSidebarUserCard,
|
|
2488
2541
|
{
|
|
@@ -2491,7 +2544,7 @@ function NavSidebar({
|
|
|
2491
2544
|
onSignOut: footer.onSignOut
|
|
2492
2545
|
}
|
|
2493
2546
|
) : null,
|
|
2494
|
-
footer.links && footer.links.length > 0 ? /* @__PURE__ */ jsx("div", { className: `flex flex-wrap items-center gap-[10px] text-[11px] leading-[1.2] ${footer.user ? "mt-3" : ""}`, children: footer.links.map((l) => /* @__PURE__ */ jsx(
|
|
2547
|
+
footer.links && footer.links.length > 0 ? /* @__PURE__ */ jsx("div", { className: `flex flex-wrap items-center gap-[10px] text-[11px] leading-[1.2] ${footer.user ? "mt-3" : ""} ${rc("max-md:hidden")}`, children: footer.links.map((l) => /* @__PURE__ */ jsx(
|
|
2495
2548
|
"a",
|
|
2496
2549
|
{
|
|
2497
2550
|
href: safeHref(l.href),
|
|
@@ -2504,7 +2557,7 @@ function NavSidebar({
|
|
|
2504
2557
|
"div",
|
|
2505
2558
|
{
|
|
2506
2559
|
"data-shell-meta": true,
|
|
2507
|
-
className:
|
|
2560
|
+
className: `mt-1.5 flex flex-col items-start gap-0.5 font-[family-name:var(--font-plex-mono)] text-[10px] text-[color:var(--sidebar-meta-text,var(--sidebar-text))] ${rc("max-md:hidden")}`,
|
|
2508
2561
|
children: [
|
|
2509
2562
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
2510
2563
|
/* @__PURE__ */ jsx(
|
|
@@ -2667,21 +2720,27 @@ function NavActiveRail() {
|
|
|
2667
2720
|
);
|
|
2668
2721
|
}
|
|
2669
2722
|
function NavRowBadge({ value }) {
|
|
2723
|
+
const rc = useRailCollapse();
|
|
2670
2724
|
if (value === void 0 || value === null || value === "") return null;
|
|
2671
|
-
return /* @__PURE__ */ jsx("span", { className:
|
|
2725
|
+
return /* @__PURE__ */ jsx("span", { className: `ml-auto shrink-0 font-[family-name:var(--font-plex-mono,ui-monospace,monospace)] text-[11px] font-semibold leading-none text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))] ${rc("max-md:hidden")}`, children: value });
|
|
2672
2726
|
}
|
|
2673
2727
|
function NavSectionRow({
|
|
2674
2728
|
label,
|
|
2675
2729
|
first,
|
|
2676
2730
|
variant = "top"
|
|
2677
2731
|
}) {
|
|
2732
|
+
const rc = useRailCollapse();
|
|
2733
|
+
const collapsed = variant === "sub" ? "" : first ? rc("max-md:sr-only") : rc(
|
|
2734
|
+
"max-md:mx-2 max-md:my-2 max-md:h-px max-md:overflow-hidden max-md:bg-[color:var(--sidebar-line,var(--line))] max-md:p-0 max-md:text-transparent"
|
|
2735
|
+
);
|
|
2678
2736
|
return /* @__PURE__ */ jsx(
|
|
2679
2737
|
"p",
|
|
2680
2738
|
{
|
|
2681
2739
|
className: [
|
|
2682
2740
|
NAV_EYEBROW_CLASS,
|
|
2683
2741
|
variant === "sub" ? "px-3 pb-0.5" : "px-2 pb-1.5 pt-1",
|
|
2684
|
-
first ? "" : variant === "sub" ? "mt-3" : "mt-[14px]"
|
|
2742
|
+
first ? "" : variant === "sub" ? "mt-3" : "mt-[14px]",
|
|
2743
|
+
collapsed
|
|
2685
2744
|
].join(" "),
|
|
2686
2745
|
children: label
|
|
2687
2746
|
}
|
|
@@ -2693,6 +2752,7 @@ function NavRow({
|
|
|
2693
2752
|
Link,
|
|
2694
2753
|
variant = "top"
|
|
2695
2754
|
}) {
|
|
2755
|
+
const rc = useRailCollapse();
|
|
2696
2756
|
const Icon = item.icon;
|
|
2697
2757
|
const isSub = variant === "sub";
|
|
2698
2758
|
const washActive = variant !== "top";
|
|
@@ -2700,7 +2760,7 @@ function NavRow({
|
|
|
2700
2760
|
const wrapperClasses = [
|
|
2701
2761
|
"group relative block overflow-hidden transition",
|
|
2702
2762
|
isSub ? "rounded-md" : "rounded-[5px]",
|
|
2703
|
-
active ? activeClasses : isSub ? "text-[color:var(--sidebar-text,var(--muted))] hover:text-
|
|
2763
|
+
active ? activeClasses : isSub ? "text-[color:var(--sidebar-text,var(--muted))] hover:text-[#FFFFFF]" : NAV_TOP_INACTIVE_CLASS
|
|
2704
2764
|
].join(" ");
|
|
2705
2765
|
const rowPadding = isSub ? "gap-3 px-3 py-1.5 text-[13px] font-semibold" : NAV_TOP_ROW_CLASS(active);
|
|
2706
2766
|
const iconSize = isSub ? 16 : NAV_TOP_ICON_SIZE;
|
|
@@ -2718,9 +2778,12 @@ function NavRow({
|
|
|
2718
2778
|
}
|
|
2719
2779
|
) : null
|
|
2720
2780
|
) : /* @__PURE__ */ jsx(NavActiveRail, {}),
|
|
2721
|
-
/* @__PURE__ */ jsxs("span", { className: `relative z-10 flex items-center ${rowPadding}`, children: [
|
|
2722
|
-
Icon ? /* @__PURE__ */ jsx(Icon, { size: iconSize, className: `shrink-0 ${iconClass}` }) :
|
|
2723
|
-
|
|
2781
|
+
/* @__PURE__ */ jsxs("span", { className: `relative z-10 flex items-center ${rowPadding} ${rc("max-md:justify-center max-md:px-0")}`, children: [
|
|
2782
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { size: iconSize, className: `shrink-0 ${iconClass}` }) : (
|
|
2783
|
+
// A row with no glyph still needs something on the icon rail.
|
|
2784
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: `hidden text-[11px] font-semibold uppercase ${rc("max-md:inline")}`, children: item.label.slice(0, 2) })
|
|
2785
|
+
),
|
|
2786
|
+
/* @__PURE__ */ jsx("span", { className: `min-w-0 flex-1 truncate ${rc("max-md:hidden")}`, children: item.label }),
|
|
2724
2787
|
/* @__PURE__ */ jsx(NavRowBadge, { value: item.badge })
|
|
2725
2788
|
] })
|
|
2726
2789
|
] });
|
|
@@ -2729,20 +2792,30 @@ function NavRow({
|
|
|
2729
2792
|
"span",
|
|
2730
2793
|
{
|
|
2731
2794
|
"aria-disabled": "true",
|
|
2732
|
-
title: item.disabledTitle,
|
|
2795
|
+
title: item.disabledTitle ?? item.label,
|
|
2733
2796
|
className: `${wrapperClasses} cursor-not-allowed opacity-50`,
|
|
2734
2797
|
children: inner
|
|
2735
2798
|
}
|
|
2736
2799
|
);
|
|
2737
2800
|
}
|
|
2738
2801
|
if (item.onClick && !item.href) {
|
|
2739
|
-
return /* @__PURE__ */ jsx(
|
|
2802
|
+
return /* @__PURE__ */ jsx(
|
|
2803
|
+
"button",
|
|
2804
|
+
{
|
|
2805
|
+
type: "button",
|
|
2806
|
+
onClick: item.onClick,
|
|
2807
|
+
title: item.label,
|
|
2808
|
+
className: `w-full text-left ${wrapperClasses}`,
|
|
2809
|
+
children: inner
|
|
2810
|
+
}
|
|
2811
|
+
);
|
|
2740
2812
|
}
|
|
2741
2813
|
return /* @__PURE__ */ jsx(
|
|
2742
2814
|
Link,
|
|
2743
2815
|
{
|
|
2744
2816
|
href: item.href ?? "#",
|
|
2745
2817
|
"aria-current": active ? "page" : void 0,
|
|
2818
|
+
title: item.label,
|
|
2746
2819
|
className: wrapperClasses,
|
|
2747
2820
|
children: inner
|
|
2748
2821
|
}
|
|
@@ -2757,6 +2830,7 @@ function NavGroup({
|
|
|
2757
2830
|
activeFn,
|
|
2758
2831
|
Link
|
|
2759
2832
|
}) {
|
|
2833
|
+
const rc = useRailCollapse();
|
|
2760
2834
|
const Icon = item.icon;
|
|
2761
2835
|
const headerClasses = [
|
|
2762
2836
|
"group relative block w-full overflow-hidden text-left transition",
|
|
@@ -2773,19 +2847,21 @@ function NavGroup({
|
|
|
2773
2847
|
item.onClick?.();
|
|
2774
2848
|
},
|
|
2775
2849
|
"aria-expanded": open,
|
|
2850
|
+
title: item.label,
|
|
2776
2851
|
className: headerClasses,
|
|
2777
2852
|
children: [
|
|
2778
2853
|
active ? /* @__PURE__ */ jsx(NavActiveRail, {}) : null,
|
|
2779
|
-
/* @__PURE__ */ jsxs("span", { className: `relative z-10 flex items-center ${NAV_TOP_ROW_CLASS(active)}`, children: [
|
|
2854
|
+
/* @__PURE__ */ jsxs("span", { className: `relative z-10 flex items-center ${NAV_TOP_ROW_CLASS(active)} ${rc("max-md:justify-center max-md:px-0")}`, children: [
|
|
2780
2855
|
Icon ? /* @__PURE__ */ jsx(Icon, { size: NAV_TOP_ICON_SIZE, className: "shrink-0 text-current" }) : null,
|
|
2781
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
2856
|
+
/* @__PURE__ */ jsx("span", { className: `min-w-0 flex-1 truncate ${rc("max-md:hidden")}`, children: item.label }),
|
|
2782
2857
|
/* @__PURE__ */ jsx(NavRowBadge, { value: item.badge }),
|
|
2783
2858
|
/* @__PURE__ */ jsx(
|
|
2784
2859
|
ChevronDown,
|
|
2785
2860
|
{
|
|
2786
2861
|
className: [
|
|
2787
2862
|
"shrink-0 opacity-80 transition-transform duration-200",
|
|
2788
|
-
open ? "rotate-180" : ""
|
|
2863
|
+
open ? "rotate-180" : "",
|
|
2864
|
+
rc("max-md:hidden")
|
|
2789
2865
|
].join(" ")
|
|
2790
2866
|
}
|
|
2791
2867
|
)
|
|
@@ -2793,7 +2869,7 @@ function NavGroup({
|
|
|
2793
2869
|
]
|
|
2794
2870
|
}
|
|
2795
2871
|
),
|
|
2796
|
-
open ? /* @__PURE__ */ jsx("div", { className:
|
|
2872
|
+
open ? /* @__PURE__ */ jsx("div", { className: `overflow-hidden rounded-b-md bg-[color:var(--nav-submenu-bg)] p-1 ${rc("max-md:hidden")}`, children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-0.5", children: item.children.map((child, i) => {
|
|
2797
2873
|
if (child.kind === "section") {
|
|
2798
2874
|
return /* @__PURE__ */ jsx(
|
|
2799
2875
|
NavSectionRow,
|
|
@@ -2932,7 +3008,7 @@ function NavTopBar({
|
|
|
2932
3008
|
"aria-label": "Open menu",
|
|
2933
3009
|
"aria-expanded": navOpen ?? false,
|
|
2934
3010
|
"aria-controls": "politogy-nav-drawer",
|
|
2935
|
-
className: `${topBarIconButtonClass("default")} mr-1 shrink-0
|
|
3011
|
+
className: `${topBarIconButtonClass("default")} mr-1 shrink-0 md:hidden`,
|
|
2936
3012
|
children: /* @__PURE__ */ jsx(HamburgerIcon, {})
|
|
2937
3013
|
}
|
|
2938
3014
|
) : null,
|
|
@@ -2979,7 +3055,7 @@ function NavTopBar({
|
|
|
2979
3055
|
themeToggle,
|
|
2980
3056
|
accountMenu === "topbar" ? /* @__PURE__ */ jsxs("details", { "data-nav-details": true, className: "group/acct relative", children: [
|
|
2981
3057
|
/* @__PURE__ */ jsxs("summary", { className: "group/tbtip relative flex cursor-pointer list-none items-center gap-2.5 rounded-full py-1 pl-1 pr-2 transition hover:bg-[color:var(--panel-elevated)] [&::-webkit-details-marker]:hidden", children: [
|
|
2982
|
-
/* @__PURE__ */ jsx("span", { className: "flex h-[var(--topbar-icon-button-size,32px)] w-[var(--topbar-icon-button-size,32px)] items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-accent)] text-xs font-bold text-
|
|
3058
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-[var(--topbar-icon-button-size,32px)] w-[var(--topbar-icon-button-size,32px)] items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-accent)] text-xs font-bold text-[#FFFFFF]", children: user?.avatarUrl || user?.memojiUrl ? /* @__PURE__ */ jsx(
|
|
2983
3059
|
"img",
|
|
2984
3060
|
{
|
|
2985
3061
|
src: user.avatarUrl || user.memojiUrl,
|
|
@@ -3030,7 +3106,8 @@ function NavAccountMenuPanel({
|
|
|
3030
3106
|
onSignOut,
|
|
3031
3107
|
placement
|
|
3032
3108
|
}) {
|
|
3033
|
-
const
|
|
3109
|
+
const rc = useRailCollapse();
|
|
3110
|
+
const wrapper = placement === "above" ? rc("max-md:right-auto max-md:w-64") + " absolute bottom-full left-0 right-0 z-40 mb-2 flex max-h-[calc(100vh-5rem)] flex-col overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 text-[color:var(--foreground)] shadow-[var(--shadow-soft)]" : "absolute right-0 z-30 mt-2 flex max-h-[calc(100vh-5rem)] w-72 flex-col overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]";
|
|
3034
3111
|
return /* @__PURE__ */ jsxs("div", { className: wrapper, children: [
|
|
3035
3112
|
placement === "below" ? /* @__PURE__ */ jsx(TopBarPanelArrow, {}) : null,
|
|
3036
3113
|
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: [
|
|
@@ -3078,7 +3155,7 @@ function NavAccountMenuPanel({
|
|
|
3078
3155
|
},
|
|
3079
3156
|
className: "flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-1 py-1 text-left hover:bg-[color:var(--panel)]",
|
|
3080
3157
|
children: [
|
|
3081
|
-
/* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-accent)] text-[11px] font-bold text-
|
|
3158
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-accent)] text-[11px] font-bold text-[#FFFFFF]", children: a.avatarUrl ? /* @__PURE__ */ jsx("img", { src: a.avatarUrl, alt: "", className: "h-full w-full object-cover" }) : (a.name ?? a.email ?? "?").slice(0, 2).toUpperCase() }),
|
|
3082
3159
|
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col leading-tight", children: [
|
|
3083
3160
|
/* @__PURE__ */ jsx(
|
|
3084
3161
|
"span",
|
|
@@ -3182,19 +3259,20 @@ function NavSidebarUserCard({
|
|
|
3182
3259
|
const displayName = hasRealName ? rawName : user.email ?? "Signed in";
|
|
3183
3260
|
const initials = (hasRealName ? rawName : user.email ?? "P").slice(0, 2).toUpperCase();
|
|
3184
3261
|
const secondary = hasRealName ? user.email || [user.tier, user.role].filter(Boolean).join(" \xB7 ") || "member" : [user.tier, user.role].filter(Boolean).join(" \xB7 ") || "member";
|
|
3262
|
+
const rc = useRailCollapse();
|
|
3185
3263
|
return /* @__PURE__ */ jsxs("details", { "data-nav-details": true, className: "group/acct relative", children: [
|
|
3186
3264
|
/* @__PURE__ */ jsxs(
|
|
3187
3265
|
"summary",
|
|
3188
3266
|
{
|
|
3189
3267
|
"aria-label": "My Account",
|
|
3190
|
-
className:
|
|
3268
|
+
className: `flex w-full cursor-pointer list-none items-center gap-[9px] rounded-[5px] px-1 py-1 text-left transition hover:bg-[color:var(--sidebar-row-hover-bg,var(--panel-elevated))] [&::-webkit-details-marker]:hidden ${rc("max-md:justify-center max-md:px-0")}`,
|
|
3191
3269
|
children: [
|
|
3192
|
-
/* @__PURE__ */ jsx("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[color:var(--sidebar-avatar-bg,var(--color-accent))] text-[11px] font-bold text-
|
|
3193
|
-
/* @__PURE__ */ jsxs("span", { className:
|
|
3270
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[color:var(--sidebar-avatar-bg,var(--color-accent))] text-[11px] font-bold text-[#FFFFFF]", children: user.avatarUrl || user.memojiUrl ? /* @__PURE__ */ jsx("img", { src: user.avatarUrl || user.memojiUrl, alt: "", className: "h-full w-full object-cover" }) : initials }),
|
|
3271
|
+
/* @__PURE__ */ jsxs("span", { className: `flex min-w-0 flex-1 flex-col ${rc("max-md:hidden")}`, children: [
|
|
3194
3272
|
/* @__PURE__ */ jsx("span", { className: "truncate text-[12px] font-semibold leading-[1.2] text-[color:var(--sidebar-text,var(--foreground))]", children: displayName }),
|
|
3195
3273
|
/* @__PURE__ */ jsx("span", { className: "truncate text-[11px] leading-[1.3] text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))]", children: secondary })
|
|
3196
3274
|
] }),
|
|
3197
|
-
/* @__PURE__ */ jsx(ChevronDown, { size: 14, className:
|
|
3275
|
+
/* @__PURE__ */ jsx(ChevronDown, { size: 14, className: `shrink-0 rotate-180 text-[color:var(--sidebar-caption,var(--sidebar-text-muted,var(--muted)))] transition group-open/acct:rotate-0 ${rc("max-md:hidden")}` })
|
|
3198
3276
|
]
|
|
3199
3277
|
}
|
|
3200
3278
|
),
|
|
@@ -3239,7 +3317,7 @@ function NamePromptBubble({ profileHref, placement = "below" }) {
|
|
|
3239
3317
|
"a",
|
|
3240
3318
|
{
|
|
3241
3319
|
href: safeHref(profileHref),
|
|
3242
|
-
className: "rounded-full bg-[color:var(--color-accent)] px-3 py-1 text-xs font-semibold text-
|
|
3320
|
+
className: "rounded-full bg-[color:var(--color-accent)] px-3 py-1 text-xs font-semibold text-[#FFFFFF] hover:opacity-90",
|
|
3243
3321
|
children: "Set name"
|
|
3244
3322
|
}
|
|
3245
3323
|
) : null,
|
|
@@ -3323,7 +3401,7 @@ function NavTopBarActionButton({ action }) {
|
|
|
3323
3401
|
const Glyph = BrandGlyph ?? Icon;
|
|
3324
3402
|
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3325
3403
|
/* @__PURE__ */ jsx(Glyph, { size: TOPBAR_GLYPH_SIZE, className: "text-current" }),
|
|
3326
|
-
typeof action.badge === "number" && action.badge > 0 ? /* @__PURE__ */ jsx("span", { className: "absolute -top-[5px] -right-[5px] flex h-4 min-w-4 items-center justify-center rounded-full bg-[color:var(--chrome-danger,var(--color-accent))] px-1 text-[10px] font-bold leading-4 text-
|
|
3404
|
+
typeof action.badge === "number" && action.badge > 0 ? /* @__PURE__ */ jsx("span", { className: "absolute -top-[5px] -right-[5px] flex h-4 min-w-4 items-center justify-center rounded-full bg-[color:var(--chrome-danger,var(--color-accent))] px-1 text-[10px] font-bold leading-4 text-[#FFFFFF]", children: action.badge }) : null,
|
|
3327
3405
|
/* @__PURE__ */ jsx(TopBarTooltip, { title: action.label, description: action.description })
|
|
3328
3406
|
] });
|
|
3329
3407
|
const isExternal = action.href ? /^https?:\/\//.test(action.href) : false;
|
|
@@ -3350,25 +3428,22 @@ function NavTopBarActionButton({ action }) {
|
|
|
3350
3428
|
}
|
|
3351
3429
|
);
|
|
3352
3430
|
}
|
|
3353
|
-
var
|
|
3431
|
+
var TAB_UNDERLINE_COLOR = "var(--mode-accent, var(--color-accent))";
|
|
3354
3432
|
function NavTabButton({
|
|
3355
3433
|
tab,
|
|
3356
|
-
Link
|
|
3434
|
+
Link,
|
|
3435
|
+
size
|
|
3357
3436
|
}) {
|
|
3358
|
-
const { label,
|
|
3359
|
-
const
|
|
3360
|
-
const
|
|
3361
|
-
const stateClass = disabled ? "cursor-not-allowed border-transparent opacity-
|
|
3362
|
-
const className = `${base} ${stateClass}`;
|
|
3363
|
-
const style = {
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
borderTopRightRadius: "var(--tab-radius, 12px)",
|
|
3369
|
-
...selected ? { background: "var(--tab-content-bg)" } : null
|
|
3370
|
-
};
|
|
3371
|
-
const glyph = /* @__PURE__ */ jsx(Icon, { size: TAB_ICON_SIZE, className: "text-current" });
|
|
3437
|
+
const { label, count, href, onSelect, selected, disabled, disabledTitle } = tab;
|
|
3438
|
+
const base = "-mb-px inline-flex shrink-0 items-center gap-2 border-b-2 font-semibold leading-none transition-colors";
|
|
3439
|
+
const sizeClass = size === "sm" ? "py-2 text-[12px]" : "py-3 text-[13px]";
|
|
3440
|
+
const stateClass = disabled ? "cursor-not-allowed border-transparent text-[color:var(--color-g4,#929599)] opacity-50" : selected ? "text-[color:var(--tab-selected-color,#2F3136)]" : "border-transparent text-[color:var(--color-g4,#929599)] hover:text-[color:var(--tab-hover-color,#2F3136)]";
|
|
3441
|
+
const className = `${base} ${sizeClass} ${stateClass}`;
|
|
3442
|
+
const style = selected && !disabled ? { borderBottomColor: TAB_UNDERLINE_COLOR } : void 0;
|
|
3443
|
+
const content = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
3444
|
+
/* @__PURE__ */ jsx("span", { children: label }),
|
|
3445
|
+
count !== void 0 && count !== null && count !== "" ? /* @__PURE__ */ jsx("span", { className: "rounded-full bg-[color:var(--color-g2,#ECEEEF)] px-1.5 py-0.5 font-[family-name:var(--font-plex-mono,ui-monospace,monospace)] text-[11px] font-semibold leading-none", children: count }) : null
|
|
3446
|
+
] });
|
|
3372
3447
|
if (disabled) {
|
|
3373
3448
|
return /* @__PURE__ */ jsx(
|
|
3374
3449
|
"span",
|
|
@@ -3377,10 +3452,10 @@ function NavTabButton({
|
|
|
3377
3452
|
"aria-selected": false,
|
|
3378
3453
|
"aria-disabled": "true",
|
|
3379
3454
|
"aria-label": label,
|
|
3380
|
-
title,
|
|
3455
|
+
title: disabledTitle,
|
|
3381
3456
|
className,
|
|
3382
3457
|
style,
|
|
3383
|
-
children:
|
|
3458
|
+
children: content
|
|
3384
3459
|
}
|
|
3385
3460
|
);
|
|
3386
3461
|
}
|
|
@@ -3392,10 +3467,9 @@ function NavTabButton({
|
|
|
3392
3467
|
role: "tab",
|
|
3393
3468
|
"aria-selected": selected ? true : false,
|
|
3394
3469
|
"aria-label": label,
|
|
3395
|
-
title,
|
|
3396
3470
|
className,
|
|
3397
3471
|
style,
|
|
3398
|
-
children:
|
|
3472
|
+
children: content
|
|
3399
3473
|
}
|
|
3400
3474
|
);
|
|
3401
3475
|
}
|
|
@@ -3406,11 +3480,10 @@ function NavTabButton({
|
|
|
3406
3480
|
role: "tab",
|
|
3407
3481
|
"aria-selected": selected ? true : false,
|
|
3408
3482
|
"aria-label": label,
|
|
3409
|
-
title,
|
|
3410
3483
|
onClick: onSelect,
|
|
3411
3484
|
className,
|
|
3412
3485
|
style,
|
|
3413
|
-
children:
|
|
3486
|
+
children: content
|
|
3414
3487
|
}
|
|
3415
3488
|
);
|
|
3416
3489
|
}
|
|
@@ -3418,6 +3491,7 @@ function NavTabStrip({
|
|
|
3418
3491
|
tabs,
|
|
3419
3492
|
"aria-label": ariaLabel,
|
|
3420
3493
|
linkComponent,
|
|
3494
|
+
size = "md",
|
|
3421
3495
|
className,
|
|
3422
3496
|
children
|
|
3423
3497
|
}) {
|
|
@@ -3428,24 +3502,14 @@ function NavTabStrip({
|
|
|
3428
3502
|
{
|
|
3429
3503
|
role: "tablist",
|
|
3430
3504
|
"aria-label": ariaLabel,
|
|
3431
|
-
className: [
|
|
3432
|
-
|
|
3505
|
+
className: [
|
|
3506
|
+
"flex items-end gap-[var(--tab-gap,24px)] border-b border-[color:var(--tab-border-color,#D7DADF)]",
|
|
3507
|
+
className
|
|
3508
|
+
].filter(Boolean).join(" "),
|
|
3509
|
+
children: tabs.map((tab) => /* @__PURE__ */ jsx(NavTabButton, { tab, Link, size }, tab.key))
|
|
3433
3510
|
}
|
|
3434
3511
|
),
|
|
3435
|
-
children !== void 0 ? /* @__PURE__ */ jsx(
|
|
3436
|
-
"div",
|
|
3437
|
-
{
|
|
3438
|
-
className: "relative -mt-px border border-[color:var(--line)] p-5",
|
|
3439
|
-
style: {
|
|
3440
|
-
background: "var(--tab-content-bg)",
|
|
3441
|
-
borderTopLeftRadius: 0,
|
|
3442
|
-
borderTopRightRadius: "var(--tab-radius, 12px)",
|
|
3443
|
-
borderBottomLeftRadius: "var(--tab-radius, 12px)",
|
|
3444
|
-
borderBottomRightRadius: "var(--tab-radius, 12px)"
|
|
3445
|
-
},
|
|
3446
|
-
children
|
|
3447
|
-
}
|
|
3448
|
-
) : null
|
|
3512
|
+
children !== void 0 ? /* @__PURE__ */ jsx("div", { className: "pt-5", children }) : null
|
|
3449
3513
|
] });
|
|
3450
3514
|
}
|
|
3451
3515
|
var BETA_BANNER_DEFAULTS = {
|
|
@@ -3553,6 +3617,12 @@ function NavAppShell({
|
|
|
3553
3617
|
children
|
|
3554
3618
|
}) {
|
|
3555
3619
|
useCloseNavDetailsOnOutsideClick();
|
|
3620
|
+
if (contentWrapper === "bare") {
|
|
3621
|
+
warnDeprecated(
|
|
3622
|
+
"contentWrapper",
|
|
3623
|
+
"`contentWrapper: 'bare'` is deprecated: the frame's <main> is fluid and apps must not emit their own page container. Remove the app's PageContainer and drop the prop."
|
|
3624
|
+
);
|
|
3625
|
+
}
|
|
3556
3626
|
const [navOpen, setNavOpen] = useState(false);
|
|
3557
3627
|
useEffect(() => {
|
|
3558
3628
|
setNavOpen(false);
|
|
@@ -3578,7 +3648,7 @@ function NavAppShell({
|
|
|
3578
3648
|
className: "min-h-screen bg-[color:var(--background)] text-[color:var(--foreground)]",
|
|
3579
3649
|
children: [
|
|
3580
3650
|
/* @__PURE__ */ jsx(NavSidebar, { ...sidebar, footer: sidebarFooter, open: navOpen, onClose: () => setNavOpen(false) }),
|
|
3581
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
3651
|
+
/* @__PURE__ */ jsxs("div", { className: "pl-[var(--sidebar-collapsed-width,64px)] md:pl-[var(--sidebar-width,236px)]", children: [
|
|
3582
3652
|
/* @__PURE__ */ jsx(
|
|
3583
3653
|
NavTopBar,
|
|
3584
3654
|
{
|
|
@@ -3589,19 +3659,21 @@ function NavAppShell({
|
|
|
3589
3659
|
}
|
|
3590
3660
|
),
|
|
3591
3661
|
betaBanner ? /* @__PURE__ */ jsx(NavBetaBanner, { ...betaBanner }) : null,
|
|
3592
|
-
topBar.title ? /* @__PURE__ */ jsx("h1", { className: "px-
|
|
3662
|
+
topBar.title ? /* @__PURE__ */ jsx("h1", { className: "px-4 pt-7 text-xl font-semibold text-[color:var(--foreground)] md:px-6", children: topBar.title }) : null,
|
|
3593
3663
|
contentWrapper === "bare" ? /* @__PURE__ */ jsx("div", { "data-shell-content": "", className: topBar.title ? "mt-[22px]" : void 0, children }) : (
|
|
3594
|
-
//
|
|
3595
|
-
//
|
|
3596
|
-
// gutter
|
|
3597
|
-
//
|
|
3598
|
-
//
|
|
3664
|
+
// Brand guidelines "Content width is fluid" + "Content body
|
|
3665
|
+
// padding": `<main>` fills the space beside the rail with ONE
|
|
3666
|
+
// gutter — 24px, or 16px below `md`, horizontally and vertically —
|
|
3667
|
+
// and has no max-width and no centered container. Form and settings
|
|
3668
|
+
// pages constrain themselves with <FormColumn> (960px, left-aligned).
|
|
3669
|
+
// The shell owns the page background and the gutter; an app's own
|
|
3670
|
+
// cards are its own furniture and stay app-owned.
|
|
3599
3671
|
/* @__PURE__ */ jsx(
|
|
3600
3672
|
"main",
|
|
3601
3673
|
{
|
|
3602
3674
|
"data-shell-content": "",
|
|
3603
|
-
className: `min-h-[calc(100vh-63px)] bg-[color:var(--chrome-page-bg,#F4F5F7)] px-6 ${topBar.title ? "
|
|
3604
|
-
children
|
|
3675
|
+
className: `min-h-[calc(100vh-63px)] bg-[color:var(--chrome-page-bg,#F4F5F7)] px-4 pb-4 md:px-6 md:pb-6 ${topBar.title ? "pt-[22px]" : "pt-4 md:pt-6"}`,
|
|
3676
|
+
children
|
|
3605
3677
|
}
|
|
3606
3678
|
)
|
|
3607
3679
|
)
|
|
@@ -3612,5 +3684,5 @@ function NavAppShell({
|
|
|
3612
3684
|
}
|
|
3613
3685
|
|
|
3614
3686
|
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 };
|
|
3615
|
-
//# sourceMappingURL=chunk-
|
|
3616
|
-
//# sourceMappingURL=chunk-
|
|
3687
|
+
//# sourceMappingURL=chunk-WFUWFMCA.js.map
|
|
3688
|
+
//# sourceMappingURL=chunk-WFUWFMCA.js.map
|