@the-portland-company/shell 0.89.0 → 0.90.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 +13 -0
- package/README.md +2 -1
- package/dist/app-chrome.d.cts +1 -1
- package/dist/app-chrome.d.ts +1 -1
- package/dist/app-chrome.js +3 -3
- package/dist/{chunk-SJDFAK5R.js → chunk-LZ5TLJDG.js} +4 -10
- package/dist/chunk-LZ5TLJDG.js.map +1 -0
- package/dist/{chunk-J23MTK56.js → chunk-VBDI7UZS.js} +46 -59
- package/dist/chunk-VBDI7UZS.js.map +1 -0
- package/dist/{index-DwkSyAip.d.ts → index-C3jzqN9K.d.ts} +4 -2
- package/dist/{index-CZylXAP4.d.cts → index-CaMJSRDb.d.cts} +4 -2
- package/dist/index.cjs +46 -65
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -10
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +30 -49
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +1 -1
- package/dist/native.d.ts +1 -1
- package/dist/native.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-J23MTK56.js.map +0 -1
- package/dist/chunk-SJDFAK5R.js.map +0 -1
|
@@ -72,6 +72,21 @@ function Card({
|
|
|
72
72
|
function FormColumn({ children, className }) {
|
|
73
73
|
return /* @__PURE__ */ jsx("div", { "data-shell-form-column": "", className: clsx("w-full max-w-[960px]", className), children });
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
// src/lib/deprecation.ts
|
|
77
|
+
var warned = /* @__PURE__ */ new Set();
|
|
78
|
+
function isDev() {
|
|
79
|
+
try {
|
|
80
|
+
return typeof process !== "undefined" && process.env?.NODE_ENV !== "production";
|
|
81
|
+
} catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function warnDeprecated(key, message) {
|
|
86
|
+
if (!isDev() || warned.has(key)) return;
|
|
87
|
+
warned.add(key);
|
|
88
|
+
console.warn(`[@the-portland-company/shell] ${message}`);
|
|
89
|
+
}
|
|
75
90
|
var VARIANT_CLASS = {
|
|
76
91
|
primary: "border border-transparent bg-[color:var(--app-btn-primary-bg,var(--color-accent))] text-[color:var(--app-btn-primary-fg,var(--color-white))] hover:bg-[color:var(--app-btn-primary-bg-hover,var(--color-accent-hover))]",
|
|
77
92
|
secondary: "border border-[color:var(--app-btn-secondary-border,var(--color-border))] bg-[color:var(--app-btn-secondary-bg,var(--color-white))] text-[color:var(--app-btn-secondary-fg,var(--color-text))] hover:bg-[color:var(--app-btn-secondary-bg-hover,var(--color-bg))]",
|
|
@@ -377,21 +392,6 @@ var FileInput = forwardRef(function FileInput2({ label, helperText, error, inval
|
|
|
377
392
|
);
|
|
378
393
|
});
|
|
379
394
|
var FileInput_default = FileInput;
|
|
380
|
-
|
|
381
|
-
// src/lib/deprecation.ts
|
|
382
|
-
var warned = /* @__PURE__ */ new Set();
|
|
383
|
-
function isDev() {
|
|
384
|
-
try {
|
|
385
|
-
return typeof process !== "undefined" && process.env?.NODE_ENV !== "production";
|
|
386
|
-
} catch {
|
|
387
|
-
return false;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
function warnDeprecated(key, message) {
|
|
391
|
-
if (!isDev() || warned.has(key)) return;
|
|
392
|
-
warned.add(key);
|
|
393
|
-
console.warn(`[@the-portland-company/shell] ${message}`);
|
|
394
|
-
}
|
|
395
395
|
function useTopBarIconSlotGlyph(slot) {
|
|
396
396
|
const [name, setName] = useState(null);
|
|
397
397
|
useEffect(() => {
|
|
@@ -2490,60 +2490,65 @@ var MODE_EYEBROW_LABEL = {
|
|
|
2490
2490
|
campaign: "Campaign mode",
|
|
2491
2491
|
petition: "Petition mode"
|
|
2492
2492
|
};
|
|
2493
|
-
var
|
|
2494
|
-
if (maxW === "full") return "max-w-none";
|
|
2495
|
-
if (maxW === "container.lg") return "max-w-6xl";
|
|
2496
|
-
if (maxW === "container.md") return "max-w-5xl";
|
|
2497
|
-
return "max-w-7xl";
|
|
2498
|
-
};
|
|
2493
|
+
var EMAIL_PATTERN = /[^\s@]+@[^\s@]+\.[^\s@]+/;
|
|
2499
2494
|
function PageHeaderView({
|
|
2500
|
-
renderCrumbLink,
|
|
2501
2495
|
title,
|
|
2502
2496
|
mode,
|
|
2503
2497
|
eyebrow,
|
|
2504
2498
|
showEyebrow = true,
|
|
2505
2499
|
subtitle,
|
|
2506
|
-
breadcrumbs
|
|
2500
|
+
breadcrumbs,
|
|
2507
2501
|
actions = null,
|
|
2508
2502
|
tabBar = null,
|
|
2509
|
-
maxW
|
|
2503
|
+
maxW,
|
|
2510
2504
|
hideSidebar = false
|
|
2511
2505
|
}) {
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2506
|
+
if (breadcrumbs !== void 0) {
|
|
2507
|
+
warnDeprecated(
|
|
2508
|
+
"PageHeader.breadcrumbs",
|
|
2509
|
+
'<PageHeader breadcrumbs> is deprecated and renders nothing: the breadcrumb trail is retired (Reference/UI-Platform \u2192 "Page header"). Remove the prop.'
|
|
2510
|
+
);
|
|
2511
|
+
}
|
|
2512
|
+
if (maxW !== void 0) {
|
|
2513
|
+
warnDeprecated(
|
|
2514
|
+
"PageHeader.maxW",
|
|
2515
|
+
"<PageHeader maxW> is deprecated and ignored: the header spans its container. Use <FormColumn> (960px) or the fluid frame for page width."
|
|
2516
|
+
);
|
|
2517
|
+
}
|
|
2518
|
+
if (typeof title === "string" && EMAIL_PATTERN.test(title) || typeof subtitle === "string" && EMAIL_PATTERN.test(subtitle)) {
|
|
2519
|
+
warnDeprecated(
|
|
2520
|
+
"PageHeader.email",
|
|
2521
|
+
`<PageHeader> title/subtitle contains an email address. The user's email never appears in the page header (Reference/UI-Platform \u2192 "Page header"); identity lives in the left bar footer.`
|
|
2522
|
+
);
|
|
2519
2523
|
}
|
|
2520
2524
|
const eyebrowText = showEyebrow ? eyebrow ?? (mode ? MODE_EYEBROW_LABEL[mode] : void 0) : void 0;
|
|
2521
|
-
if (!title && !eyebrowText &&
|
|
2525
|
+
if (!title && !eyebrowText && !actions && !tabBar) {
|
|
2522
2526
|
return null;
|
|
2523
2527
|
}
|
|
2524
2528
|
return /* @__PURE__ */ jsxs(
|
|
2525
2529
|
"div",
|
|
2526
2530
|
{
|
|
2527
|
-
|
|
2528
|
-
className: clsx("text-
|
|
2531
|
+
"data-shell-page-header": "",
|
|
2532
|
+
className: clsx("pt-[22px] text-[color:var(--color-text,#2F3136)]", tabBar ? "pb-0" : "pb-4", {
|
|
2529
2533
|
"md:ml-60": !hideSidebar
|
|
2530
2534
|
}),
|
|
2531
2535
|
children: [
|
|
2532
|
-
/* @__PURE__ */ jsx("div", { className:
|
|
2536
|
+
/* @__PURE__ */ jsx("div", { className: "w-full px-4 md:px-6", children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-nowrap items-start justify-between gap-4", children: [
|
|
2533
2537
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2534
2538
|
eyebrowText ? /* @__PURE__ */ jsx(
|
|
2535
2539
|
"div",
|
|
2536
2540
|
{
|
|
2537
2541
|
className: "truncate text-[11px] font-bold uppercase leading-[1.2] tracking-[0.09em]",
|
|
2538
|
-
style: { color: "var(--mode-accent, var(--color-accent, #E63946))" },
|
|
2542
|
+
style: { color: "var(--color-accent-fg, var(--mode-accent, var(--color-accent, #E63946)))" },
|
|
2539
2543
|
children: eyebrowText
|
|
2540
2544
|
}
|
|
2541
2545
|
) : null,
|
|
2542
2546
|
title ? /* @__PURE__ */ jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsx(
|
|
2543
|
-
"
|
|
2547
|
+
"h1",
|
|
2544
2548
|
{
|
|
2545
|
-
className: "truncate font-bold
|
|
2549
|
+
className: "m-0 truncate font-bold",
|
|
2546
2550
|
style: {
|
|
2551
|
+
color: "var(--color-text, #2F3136)",
|
|
2547
2552
|
fontFamily: "var(--font-family, ui-sans-serif, system-ui, sans-serif)",
|
|
2548
2553
|
fontSize: "var(--type-h2-size, 1.875rem)",
|
|
2549
2554
|
lineHeight: "var(--type-h2-line-height, 1.25)"
|
|
@@ -2551,25 +2556,7 @@ function PageHeaderView({
|
|
|
2551
2556
|
children: title
|
|
2552
2557
|
}
|
|
2553
2558
|
) }) : null,
|
|
2554
|
-
subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-1 truncate text-[15px] text-[color:var(--color-g4,#
|
|
2555
|
-
breadcrumbsWithoutCurrent.length > 0 ? /* @__PURE__ */ jsx(
|
|
2556
|
-
"nav",
|
|
2557
|
-
{
|
|
2558
|
-
"aria-label": "Breadcrumb",
|
|
2559
|
-
className: clsx("min-w-0 text-slate-100", title ? "mt-1" : ""),
|
|
2560
|
-
children: /* @__PURE__ */ jsx("ol", { className: "flex flex-nowrap items-center gap-2 overflow-hidden text-sm text-gray-600", children: breadcrumbsWithoutCurrent.map((item, index) => /* @__PURE__ */ jsxs(
|
|
2561
|
-
"li",
|
|
2562
|
-
{
|
|
2563
|
-
className: "flex min-w-0 flex-shrink-0 items-center gap-2",
|
|
2564
|
-
children: [
|
|
2565
|
-
index > 0 ? /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: ">" }) : null,
|
|
2566
|
-
item.href ? renderCrumbLink(item.href, item.label, "truncate text-slate-100 hover:underline") : /* @__PURE__ */ jsx("span", { className: "truncate text-slate-100", children: item.label })
|
|
2567
|
-
]
|
|
2568
|
-
},
|
|
2569
|
-
`${item.label}-${index}`
|
|
2570
|
-
)) })
|
|
2571
|
-
}
|
|
2572
|
-
) : null
|
|
2559
|
+
subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-1 truncate text-[15px] text-[color:var(--color-g4,#58657A)]", children: subtitle }) : null
|
|
2573
2560
|
] }),
|
|
2574
2561
|
actions ? /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: actions }) : null
|
|
2575
2562
|
] }) }),
|
|
@@ -2609,5 +2596,5 @@ function BreadcrumbBarView({
|
|
|
2609
2596
|
}
|
|
2610
2597
|
|
|
2611
2598
|
export { BreadcrumbBarView, Button_default, CORE_APP_ORIGIN, CORE_BILLING_PATH, CREDIT_TYPE_LABELS, CREDIT_TYPE_ORDER, Card, Checkbox_default, CreditsAction, FileInput_default, FormColumn, FuelAction, HeaderTabBar, Input_default, NAV_DISPLAY_OPTIONS, NavChromeProvider, NavDisplayAction, NavThemeControl, NotificationsAction, PageHeaderView, SPECS_ORIGIN, Select_default, SpecOverlayAction, SpeculationRulesScript, SupportAction, TOPBAR_GLYPH_SIZE, Textarea_default, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, creditGaugeRatio, creditStateWord, creditTooltipLine, creditsAriaLabel, creditsIconState, emptyNotificationsFeed, normalizeNotificationsFeed, resolveBrandGlyph, resolveOrgLogoUrl, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeDedupedFetch, useNavChromeFetcher, useThemePreference, useTopBarIconSlotGlyph, warnDeprecated };
|
|
2612
|
-
//# sourceMappingURL=chunk-
|
|
2613
|
-
//# sourceMappingURL=chunk-
|
|
2599
|
+
//# sourceMappingURL=chunk-VBDI7UZS.js.map
|
|
2600
|
+
//# sourceMappingURL=chunk-VBDI7UZS.js.map
|