@the-portland-company/shell 0.75.0 → 0.75.1
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 +8 -0
- package/dist/app-chrome.cjs +8 -8
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +6 -6
- package/dist/app-chrome.js.map +1 -1
- package/dist/chrome.css +22 -2
- package/dist/{chunk-QUXD4PZ7.js → chunk-AQMSMAK2.js} +10 -8
- package/dist/chunk-AQMSMAK2.js.map +1 -0
- package/dist/index.cjs +33 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +33 -3
- package/dist/index.js.map +1 -1
- package/dist/native.cjs +8 -6
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +6 -3
- package/dist/native.d.ts +6 -3
- package/dist/native.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-QUXD4PZ7.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -802,7 +802,7 @@ var SYSTEM_MONO = 'SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "
|
|
|
802
802
|
var fonts = {
|
|
803
803
|
heading: `var(--font-family, ${SYSTEM_SANS})`,
|
|
804
804
|
body: `var(--font-family, ${SYSTEM_SANS})`,
|
|
805
|
-
mono: `var(--
|
|
805
|
+
mono: `var(--font-mono, ${SYSTEM_MONO})`
|
|
806
806
|
};
|
|
807
807
|
var politogyTheme = react.extendTheme({
|
|
808
808
|
config,
|
|
@@ -851,6 +851,11 @@ function Card({
|
|
|
851
851
|
function FormColumn({ children, className }) {
|
|
852
852
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-form-column": "", className: clsx2__default.default("w-full max-w-[960px]", className), children });
|
|
853
853
|
}
|
|
854
|
+
var MODE_EYEBROW_LABEL = {
|
|
855
|
+
relationship: "Relationship mode",
|
|
856
|
+
campaign: "Campaign mode",
|
|
857
|
+
petition: "Petition mode"
|
|
858
|
+
};
|
|
854
859
|
var resolveMaxWidthClass = (maxW) => {
|
|
855
860
|
if (maxW === "full") return "max-w-none";
|
|
856
861
|
if (maxW === "container.lg") return "max-w-6xl";
|
|
@@ -859,6 +864,10 @@ var resolveMaxWidthClass = (maxW) => {
|
|
|
859
864
|
};
|
|
860
865
|
function PageHeader({
|
|
861
866
|
title,
|
|
867
|
+
mode,
|
|
868
|
+
eyebrow,
|
|
869
|
+
showEyebrow = true,
|
|
870
|
+
subtitle,
|
|
862
871
|
breadcrumbs = [],
|
|
863
872
|
actions = null,
|
|
864
873
|
tabBar = null,
|
|
@@ -873,7 +882,8 @@ function PageHeader({
|
|
|
873
882
|
if (breadcrumbsWithoutCurrent.length > 1 && normalizedTitle && last && last.label.trim().toLowerCase() === normalizedTitle) {
|
|
874
883
|
breadcrumbsWithoutCurrent.pop();
|
|
875
884
|
}
|
|
876
|
-
|
|
885
|
+
const eyebrowText = showEyebrow ? eyebrow ?? (mode ? MODE_EYEBROW_LABEL[mode] : void 0) : void 0;
|
|
886
|
+
if (!title && !eyebrowText && breadcrumbsWithoutCurrent.length === 0 && !actions && !tabBar) {
|
|
877
887
|
return null;
|
|
878
888
|
}
|
|
879
889
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -886,7 +896,27 @@ function PageHeader({
|
|
|
886
896
|
children: [
|
|
887
897
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: clsx2__default.default("w-full px-4", maxWClass), children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full flex-nowrap items-start justify-between gap-4", children: [
|
|
888
898
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
889
|
-
|
|
899
|
+
eyebrowText ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
900
|
+
"div",
|
|
901
|
+
{
|
|
902
|
+
className: "truncate text-[11px] font-bold uppercase leading-[1.2] tracking-[0.09em]",
|
|
903
|
+
style: { color: "var(--mode-accent, var(--color-accent, #E63946))" },
|
|
904
|
+
children: eyebrowText
|
|
905
|
+
}
|
|
906
|
+
) : null,
|
|
907
|
+
title ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
908
|
+
"div",
|
|
909
|
+
{
|
|
910
|
+
className: "truncate font-bold text-white",
|
|
911
|
+
style: {
|
|
912
|
+
fontFamily: "var(--font-family, ui-sans-serif, system-ui, sans-serif)",
|
|
913
|
+
fontSize: "var(--type-h2-size, 1.875rem)",
|
|
914
|
+
lineHeight: "var(--type-h2-line-height, 1.25)"
|
|
915
|
+
},
|
|
916
|
+
children: title
|
|
917
|
+
}
|
|
918
|
+
) }) : null,
|
|
919
|
+
subtitle ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 truncate text-[15px] text-[color:var(--color-g4,#929599)]", children: subtitle }) : null,
|
|
890
920
|
breadcrumbsWithoutCurrent.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
891
921
|
"nav",
|
|
892
922
|
{
|