@the-portland-company/shell 0.87.1 → 0.89.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/index.d.cts CHANGED
@@ -1,53 +1,14 @@
1
+ import { P as PageHeaderProps, B as BreadcrumbBarProps, N as NavItem } from './index-CZylXAP4.cjs';
2
+ export { a as Button, b as ButtonProps, c as ButtonSize, d as ButtonVariant, C as Card, e as CardPadding, f as CardProps, g as Checkbox, h as CheckboxProps, i as CommsNotification, j as CommsNotificationKind, F as FileInput, k as FileInputProps, l as FormColumn, H as HeaderTabBar, m as HeaderTabBarItem, I as Input, n as InputProps, o as NotificationsAdapter, p as NotificationsFeed, S as Select, q as SelectProps, T as Textarea, r as TextareaProps, s as createCommsNotificationsAdapter, t as emptyNotificationsFeed, u as normalizeNotificationsFeed } from './index-CZylXAP4.cjs';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
4
  import * as react from 'react';
3
5
  import { ReactNode, CSSProperties } from 'react';
4
- import { N as NavItem } from './index-bfbWLC7_.cjs';
5
- export { C as CommsNotification, a as CommsNotificationKind, F as FormColumn, b as NotificationsAdapter, c as NotificationsFeed, d as createCommsNotificationsAdapter, e as emptyNotificationsFeed, n as normalizeNotificationsFeed } from './index-bfbWLC7_.cjs';
6
6
  import { User, Session, SupabaseClient } from '@supabase/supabase-js';
7
7
  import './theme-preference.cjs';
8
8
 
9
9
  declare const politogyTheme: Record<string, any>;
10
10
 
11
- type CardProps = {
12
- title?: string;
13
- children: ReactNode;
14
- minH?: string | number;
15
- className?: string;
16
- style?: CSSProperties;
17
- [key: string]: unknown;
18
- };
19
- declare function Card({ title, children, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element;
20
-
21
- type BreadcrumbItem$1 = {
22
- label: string;
23
- href?: string;
24
- };
25
- /** The three Modes a page header's eyebrow can announce (Reference/UI-Platform
26
- * → "Per-mode branding"). */
27
- type PageHeaderMode = 'relationship' | 'campaign' | 'petition';
28
- type PageHeaderProps = {
29
- title?: ReactNode;
30
- /**
31
- * The operating Mode this page belongs to. When set, the 11px uppercase
32
- * mode eyebrow ("Relationship mode" / "Campaign mode" / "Petition mode")
33
- * renders above the title by DEFAULT — Reference/UI-Platform → "Page
34
- * header": "Left: an 11px uppercase mode eyebrow ... in the mode color
35
- * (`modes.<mode>.primary`)". Pass `showEyebrow={false}` to suppress it.
36
- */
37
- mode?: PageHeaderMode;
38
- /** Overrides the eyebrow text the `mode` default would produce. */
39
- eyebrow?: string;
40
- /** Set false to suppress the eyebrow even when `mode` is passed. Default true. */
41
- showEyebrow?: boolean;
42
- /** Optional one-line subtitle, 15px G4, directly under the title. */
43
- subtitle?: ReactNode;
44
- breadcrumbs?: BreadcrumbItem$1[];
45
- actions?: ReactNode;
46
- tabBar?: ReactNode;
47
- maxW?: string;
48
- hideSidebar?: boolean;
49
- };
50
- declare function PageHeader({ title, mode, eyebrow, showEyebrow, subtitle, breadcrumbs, actions, tabBar, maxW, hideSidebar, }: PageHeaderProps): react_jsx_runtime.JSX.Element | null;
11
+ declare function PageHeader(props: PageHeaderProps): react_jsx_runtime.JSX.Element;
51
12
 
52
13
  type PageContainerProps = {
53
14
  children: ReactNode;
@@ -65,44 +26,10 @@ type PageContainerProps = {
65
26
  */
66
27
  declare function PageContainer({ children, maxW, px, py, lockHeight, }: PageContainerProps): react_jsx_runtime.JSX.Element;
67
28
 
68
- type BreadcrumbItem = {
69
- label: string;
70
- href?: string;
71
- };
72
- type BreadcrumbBarProps = {
73
- breadcrumbs?: BreadcrumbItem[];
74
- actions?: ReactNode;
75
- maxW?: string;
76
- };
77
- /**
78
- * @deprecated Not for app use. The breadcrumb trail is retired
79
- * (Reference/UI-Platform → Page header): the mode eyebrow, the page title, the
80
- * active left-bar row and the selected tab already say where the user is.
81
- * Warns in development.
82
- */
83
- declare function BreadcrumbBar({ breadcrumbs, actions, maxW, }: BreadcrumbBarProps): react_jsx_runtime.JSX.Element | null;
84
-
85
- type HeaderTabBarItem = {
86
- id: string;
87
- label: string;
88
- icon: ReactNode;
89
- disabled?: boolean;
90
- };
91
- type HeaderTabBarProps = {
92
- items: HeaderTabBarItem[];
93
- activeId: string;
94
- onChange: (id: string) => void;
95
- className?: string;
96
- ariaLabel?: string;
97
- };
98
29
  /**
99
- * @deprecated Use `NavTabStrip` from `@the-portland-company/shell/native` —
100
- * the ONE canonical page tab strip (underlined text tabs with a 2px underline
101
- * in the mode color, Brand guideline "Tabs are an underlined strip").
102
- * `HeaderTabBar` is icon-only and filled, cannot render link tabs, and needs
103
- * Chakra. Warns in development.
30
+ * @deprecated Not for app use. See `BreadcrumbBarView`.
104
31
  */
105
- declare function HeaderTabBar({ items, activeId, onChange, className, ariaLabel, }: HeaderTabBarProps): react_jsx_runtime.JSX.Element;
32
+ declare function BreadcrumbBar(props: BreadcrumbBarProps): react_jsx_runtime.JSX.Element;
106
33
 
107
34
  declare function GlobalUiIdProvider(): null;
108
35
 
@@ -667,4 +594,4 @@ declare function SpeculationRulesScript({ items }: {
667
594
  items: NavItem[];
668
595
  }): null;
669
596
 
670
- export { type AppRegistryEntry, BrandIcon, BrandLogo, BreadcrumbBar, Card, GlobalUiIdProvider, HeaderTabBar, type HeaderTabBarItem, type NavSpeculationRules, PageContainer, PageHeader, type ShellActiveRoleConfig, type ShellAuthStatus, type ShellAuthValue, ShellChromeContext, type ShellChromeValue, ShellFooterContext, type ShellFooterLink, type ShellFooterValue, type ShellInjectedAuth, type ShellLinkedAccount, ShellLinkedAccountsContext, type ShellLinkedAccountsValue, type ShellModeConfig, ShellModeContext, type ShellModeValue, type ShellNavItem, ShellNavItemsContext, type ShellNavItemsValue, ShellNavigationPreferenceContext, type ShellNavigationPreferenceValue, ShellOrgContext, type ShellOrganization, type ShellOrganizationValue, ShellProvider, type ShellProviderProps, ShellRoleContext, type ShellRoleValue, type ShellSlots, type ShellSupportContext, ShellSupportProviderContext, type ShellSupportValue, type ShellUser, SpeculationRulesScript, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, getOrganizationBadgeLetters, getOrganizationBrandColor, getUserDisplayName, hexToRgba, lightenHexColor, normalizeHexColor, politogyTheme, registerShellPrecache, useAppRegistry, useCurrentApp, useShellAuth, useShellChrome, useShellFooter, useShellLinkedAccounts, useShellMode, useShellNavItems, useShellNavigationPreference, useShellOrganization, useShellRole, useShellSupport };
597
+ export { type AppRegistryEntry, BrandIcon, BrandLogo, BreadcrumbBar, GlobalUiIdProvider, type NavSpeculationRules, PageContainer, PageHeader, type ShellActiveRoleConfig, type ShellAuthStatus, type ShellAuthValue, ShellChromeContext, type ShellChromeValue, ShellFooterContext, type ShellFooterLink, type ShellFooterValue, type ShellInjectedAuth, type ShellLinkedAccount, ShellLinkedAccountsContext, type ShellLinkedAccountsValue, type ShellModeConfig, ShellModeContext, type ShellModeValue, type ShellNavItem, ShellNavItemsContext, type ShellNavItemsValue, ShellNavigationPreferenceContext, type ShellNavigationPreferenceValue, ShellOrgContext, type ShellOrganization, type ShellOrganizationValue, ShellProvider, type ShellProviderProps, ShellRoleContext, type ShellRoleValue, type ShellSlots, type ShellSupportContext, ShellSupportProviderContext, type ShellSupportValue, type ShellUser, SpeculationRulesScript, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, getOrganizationBadgeLetters, getOrganizationBrandColor, getUserDisplayName, hexToRgba, lightenHexColor, normalizeHexColor, politogyTheme, registerShellPrecache, useAppRegistry, useCurrentApp, useShellAuth, useShellChrome, useShellFooter, useShellLinkedAccounts, useShellMode, useShellNavItems, useShellNavigationPreference, useShellOrganization, useShellRole, useShellSupport };
package/dist/index.d.ts CHANGED
@@ -1,53 +1,14 @@
1
+ import { P as PageHeaderProps, B as BreadcrumbBarProps, N as NavItem } from './index-DwkSyAip.js';
2
+ export { a as Button, b as ButtonProps, c as ButtonSize, d as ButtonVariant, C as Card, e as CardPadding, f as CardProps, g as Checkbox, h as CheckboxProps, i as CommsNotification, j as CommsNotificationKind, F as FileInput, k as FileInputProps, l as FormColumn, H as HeaderTabBar, m as HeaderTabBarItem, I as Input, n as InputProps, o as NotificationsAdapter, p as NotificationsFeed, S as Select, q as SelectProps, T as Textarea, r as TextareaProps, s as createCommsNotificationsAdapter, t as emptyNotificationsFeed, u as normalizeNotificationsFeed } from './index-DwkSyAip.js';
1
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
4
  import * as react from 'react';
3
5
  import { ReactNode, CSSProperties } from 'react';
4
- import { N as NavItem } from './index-C31E7M9l.js';
5
- export { C as CommsNotification, a as CommsNotificationKind, F as FormColumn, b as NotificationsAdapter, c as NotificationsFeed, d as createCommsNotificationsAdapter, e as emptyNotificationsFeed, n as normalizeNotificationsFeed } from './index-C31E7M9l.js';
6
6
  import { User, Session, SupabaseClient } from '@supabase/supabase-js';
7
7
  import './theme-preference.js';
8
8
 
9
9
  declare const politogyTheme: Record<string, any>;
10
10
 
11
- type CardProps = {
12
- title?: string;
13
- children: ReactNode;
14
- minH?: string | number;
15
- className?: string;
16
- style?: CSSProperties;
17
- [key: string]: unknown;
18
- };
19
- declare function Card({ title, children, minH, className, style, ...props }: CardProps): react_jsx_runtime.JSX.Element;
20
-
21
- type BreadcrumbItem$1 = {
22
- label: string;
23
- href?: string;
24
- };
25
- /** The three Modes a page header's eyebrow can announce (Reference/UI-Platform
26
- * → "Per-mode branding"). */
27
- type PageHeaderMode = 'relationship' | 'campaign' | 'petition';
28
- type PageHeaderProps = {
29
- title?: ReactNode;
30
- /**
31
- * The operating Mode this page belongs to. When set, the 11px uppercase
32
- * mode eyebrow ("Relationship mode" / "Campaign mode" / "Petition mode")
33
- * renders above the title by DEFAULT — Reference/UI-Platform → "Page
34
- * header": "Left: an 11px uppercase mode eyebrow ... in the mode color
35
- * (`modes.<mode>.primary`)". Pass `showEyebrow={false}` to suppress it.
36
- */
37
- mode?: PageHeaderMode;
38
- /** Overrides the eyebrow text the `mode` default would produce. */
39
- eyebrow?: string;
40
- /** Set false to suppress the eyebrow even when `mode` is passed. Default true. */
41
- showEyebrow?: boolean;
42
- /** Optional one-line subtitle, 15px G4, directly under the title. */
43
- subtitle?: ReactNode;
44
- breadcrumbs?: BreadcrumbItem$1[];
45
- actions?: ReactNode;
46
- tabBar?: ReactNode;
47
- maxW?: string;
48
- hideSidebar?: boolean;
49
- };
50
- declare function PageHeader({ title, mode, eyebrow, showEyebrow, subtitle, breadcrumbs, actions, tabBar, maxW, hideSidebar, }: PageHeaderProps): react_jsx_runtime.JSX.Element | null;
11
+ declare function PageHeader(props: PageHeaderProps): react_jsx_runtime.JSX.Element;
51
12
 
52
13
  type PageContainerProps = {
53
14
  children: ReactNode;
@@ -65,44 +26,10 @@ type PageContainerProps = {
65
26
  */
66
27
  declare function PageContainer({ children, maxW, px, py, lockHeight, }: PageContainerProps): react_jsx_runtime.JSX.Element;
67
28
 
68
- type BreadcrumbItem = {
69
- label: string;
70
- href?: string;
71
- };
72
- type BreadcrumbBarProps = {
73
- breadcrumbs?: BreadcrumbItem[];
74
- actions?: ReactNode;
75
- maxW?: string;
76
- };
77
- /**
78
- * @deprecated Not for app use. The breadcrumb trail is retired
79
- * (Reference/UI-Platform → Page header): the mode eyebrow, the page title, the
80
- * active left-bar row and the selected tab already say where the user is.
81
- * Warns in development.
82
- */
83
- declare function BreadcrumbBar({ breadcrumbs, actions, maxW, }: BreadcrumbBarProps): react_jsx_runtime.JSX.Element | null;
84
-
85
- type HeaderTabBarItem = {
86
- id: string;
87
- label: string;
88
- icon: ReactNode;
89
- disabled?: boolean;
90
- };
91
- type HeaderTabBarProps = {
92
- items: HeaderTabBarItem[];
93
- activeId: string;
94
- onChange: (id: string) => void;
95
- className?: string;
96
- ariaLabel?: string;
97
- };
98
29
  /**
99
- * @deprecated Use `NavTabStrip` from `@the-portland-company/shell/native` —
100
- * the ONE canonical page tab strip (underlined text tabs with a 2px underline
101
- * in the mode color, Brand guideline "Tabs are an underlined strip").
102
- * `HeaderTabBar` is icon-only and filled, cannot render link tabs, and needs
103
- * Chakra. Warns in development.
30
+ * @deprecated Not for app use. See `BreadcrumbBarView`.
104
31
  */
105
- declare function HeaderTabBar({ items, activeId, onChange, className, ariaLabel, }: HeaderTabBarProps): react_jsx_runtime.JSX.Element;
32
+ declare function BreadcrumbBar(props: BreadcrumbBarProps): react_jsx_runtime.JSX.Element;
106
33
 
107
34
  declare function GlobalUiIdProvider(): null;
108
35
 
@@ -667,4 +594,4 @@ declare function SpeculationRulesScript({ items }: {
667
594
  items: NavItem[];
668
595
  }): null;
669
596
 
670
- export { type AppRegistryEntry, BrandIcon, BrandLogo, BreadcrumbBar, Card, GlobalUiIdProvider, HeaderTabBar, type HeaderTabBarItem, type NavSpeculationRules, PageContainer, PageHeader, type ShellActiveRoleConfig, type ShellAuthStatus, type ShellAuthValue, ShellChromeContext, type ShellChromeValue, ShellFooterContext, type ShellFooterLink, type ShellFooterValue, type ShellInjectedAuth, type ShellLinkedAccount, ShellLinkedAccountsContext, type ShellLinkedAccountsValue, type ShellModeConfig, ShellModeContext, type ShellModeValue, type ShellNavItem, ShellNavItemsContext, type ShellNavItemsValue, ShellNavigationPreferenceContext, type ShellNavigationPreferenceValue, ShellOrgContext, type ShellOrganization, type ShellOrganizationValue, ShellProvider, type ShellProviderProps, ShellRoleContext, type ShellRoleValue, type ShellSlots, type ShellSupportContext, ShellSupportProviderContext, type ShellSupportValue, type ShellUser, SpeculationRulesScript, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, getOrganizationBadgeLetters, getOrganizationBrandColor, getUserDisplayName, hexToRgba, lightenHexColor, normalizeHexColor, politogyTheme, registerShellPrecache, useAppRegistry, useCurrentApp, useShellAuth, useShellChrome, useShellFooter, useShellLinkedAccounts, useShellMode, useShellNavItems, useShellNavigationPreference, useShellOrganization, useShellRole, useShellSupport };
597
+ export { type AppRegistryEntry, BrandIcon, BrandLogo, BreadcrumbBar, GlobalUiIdProvider, type NavSpeculationRules, PageContainer, PageHeader, type ShellActiveRoleConfig, type ShellAuthStatus, type ShellAuthValue, ShellChromeContext, type ShellChromeValue, ShellFooterContext, type ShellFooterLink, type ShellFooterValue, type ShellInjectedAuth, type ShellLinkedAccount, ShellLinkedAccountsContext, type ShellLinkedAccountsValue, type ShellModeConfig, ShellModeContext, type ShellModeValue, type ShellNavItem, ShellNavItemsContext, type ShellNavItemsValue, ShellNavigationPreferenceContext, type ShellNavigationPreferenceValue, ShellOrgContext, type ShellOrganization, type ShellOrganizationValue, ShellProvider, type ShellProviderProps, ShellRoleContext, type ShellRoleValue, type ShellSlots, type ShellSupportContext, ShellSupportProviderContext, type ShellSupportValue, type ShellUser, SpeculationRulesScript, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, getOrganizationBadgeLetters, getOrganizationBrandColor, getUserDisplayName, hexToRgba, lightenHexColor, normalizeHexColor, politogyTheme, registerShellPrecache, useAppRegistry, useCurrentApp, useShellAuth, useShellChrome, useShellFooter, useShellLinkedAccounts, useShellMode, useShellNavItems, useShellNavigationPreference, useShellOrganization, useShellRole, useShellSupport };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { warnDeprecated, TopBarTooltip } from './chunk-PRZP2SB6.js';
2
- export { FormColumn, SpeculationRulesScript, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, emptyNotificationsFeed, normalizeNotificationsFeed } from './chunk-PRZP2SB6.js';
1
+ import { PageHeaderView, warnDeprecated, BreadcrumbBarView } from './chunk-J23MTK56.js';
2
+ export { Button_default as Button, Card, Checkbox_default as Checkbox, FileInput_default as FileInput, FormColumn, HeaderTabBar, Input_default as Input, Select_default as Select, SpeculationRulesScript, Textarea_default as Textarea, buildNavSpeculationRules, buildSpeculationRules, collectSiblingAppUrls, createCommsNotificationsAdapter, emptyNotificationsFeed, normalizeNotificationsFeed } from './chunk-J23MTK56.js';
3
3
  import { readResolvedTheme } from './chunk-BHRVZPZ7.js';
4
4
  import { extendTheme, ChakraProvider, useColorMode } from '@chakra-ui/react';
5
- import { jsxs, jsx } from 'react/jsx-runtime';
6
5
  import { Link, useLocation } from 'react-router-dom';
6
+ import { jsx, jsxs } from 'react/jsx-runtime';
7
7
  import clsx from 'clsx';
8
8
  import { createContext, useEffect, useState, useMemo, useContext } from 'react';
9
9
 
@@ -762,6 +762,12 @@ var components = {
762
762
  };
763
763
 
764
764
  // src/theme/index.ts
765
+ var SHELL_FIELD_MARKER = "data-shell-field";
766
+ var nativeFieldSelector = (state) => {
767
+ const own = `:not([${SHELL_FIELD_MARKER}])`;
768
+ const input = `input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"])${own}${state}`;
769
+ return `${input}, textarea${own}${state}, select${own}${state}`;
770
+ };
765
771
  var config = {
766
772
  initialColorMode: "light",
767
773
  useSystemColorMode: false
@@ -785,13 +791,13 @@ var styles = {
785
791
  "--mode-input-focus-shadow-color": "var(--app-color-brand-500)"
786
792
  },
787
793
  // Ensure non-Chakra/native text-like inputs follow mode border colors as well.
788
- 'input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]), textarea, select': {
794
+ [nativeFieldSelector("")]: {
789
795
  borderColor: "var(--mode-input-border-color)"
790
796
  },
791
- 'input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):hover, textarea:hover, select:hover': {
797
+ [nativeFieldSelector(":hover")]: {
792
798
  borderColor: "var(--mode-input-hover-border-color)"
793
799
  },
794
- 'input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="color"]):focus, textarea:focus, select:focus': {
800
+ [nativeFieldSelector(":focus")]: {
795
801
  borderColor: "var(--mode-primary-color)",
796
802
  boxShadow: "0 0 0 1px var(--mode-input-focus-shadow-color)"
797
803
  }
@@ -827,116 +833,12 @@ var politogyTheme = extendTheme({
827
833
  full: "9999px"
828
834
  }
829
835
  });
830
- function Card({
831
- title,
832
- children,
833
- minH,
834
- className,
835
- style,
836
- ...props
837
- }) {
838
- return /* @__PURE__ */ jsxs(
839
- "div",
836
+ function PageHeader(props) {
837
+ return /* @__PURE__ */ jsx(
838
+ PageHeaderView,
840
839
  {
841
- className: `rounded-lg border border-slate-200 bg-white p-6 shadow-sm ${className || ""}`,
842
- style: { minHeight: minH, ...style },
843
840
  ...props,
844
- children: [
845
- title && /* @__PURE__ */ jsx("h3", { className: "mb-4 text-lg font-semibold", children: title }),
846
- children
847
- ]
848
- }
849
- );
850
- }
851
- var MODE_EYEBROW_LABEL = {
852
- relationship: "Relationship mode",
853
- campaign: "Campaign mode",
854
- petition: "Petition mode"
855
- };
856
- var resolveMaxWidthClass = (maxW) => {
857
- if (maxW === "full") return "max-w-none";
858
- if (maxW === "container.lg") return "max-w-6xl";
859
- if (maxW === "container.md") return "max-w-5xl";
860
- return "max-w-7xl";
861
- };
862
- function PageHeader({
863
- title,
864
- mode,
865
- eyebrow,
866
- showEyebrow = true,
867
- subtitle,
868
- breadcrumbs = [],
869
- actions = null,
870
- tabBar = null,
871
- maxW = "full",
872
- hideSidebar = false
873
- }) {
874
- const maxWClass = resolveMaxWidthClass(maxW);
875
- const titleText = typeof title === "string" ? title.trim() : "";
876
- const normalizedTitle = titleText.toLowerCase();
877
- const breadcrumbsWithoutCurrent = [...breadcrumbs];
878
- const last = breadcrumbsWithoutCurrent[breadcrumbsWithoutCurrent.length - 1];
879
- if (breadcrumbsWithoutCurrent.length > 1 && normalizedTitle && last && last.label.trim().toLowerCase() === normalizedTitle) {
880
- breadcrumbsWithoutCurrent.pop();
881
- }
882
- const eyebrowText = showEyebrow ? eyebrow ?? (mode ? MODE_EYEBROW_LABEL[mode] : void 0) : void 0;
883
- if (!title && !eyebrowText && breadcrumbsWithoutCurrent.length === 0 && !actions && !tabBar) {
884
- return null;
885
- }
886
- return /* @__PURE__ */ jsxs(
887
- "div",
888
- {
889
- style: { backgroundColor: "var(--app-tab-header-bg, #888888)" },
890
- className: clsx("text-slate-100", tabBar ? "pt-3 pb-0" : "py-3 border-b border-gray-200", {
891
- "md:ml-60": !hideSidebar
892
- }),
893
- children: [
894
- /* @__PURE__ */ jsx("div", { className: clsx("w-full px-4", maxWClass), children: /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-nowrap items-start justify-between gap-4", children: [
895
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
896
- eyebrowText ? /* @__PURE__ */ jsx(
897
- "div",
898
- {
899
- className: "truncate text-[11px] font-bold uppercase leading-[1.2] tracking-[0.09em]",
900
- style: { color: "var(--mode-accent, var(--color-accent, #E63946))" },
901
- children: eyebrowText
902
- }
903
- ) : null,
904
- title ? /* @__PURE__ */ jsx("div", { className: "min-w-0", children: /* @__PURE__ */ jsx(
905
- "div",
906
- {
907
- className: "truncate font-bold text-white",
908
- style: {
909
- fontFamily: "var(--font-family, ui-sans-serif, system-ui, sans-serif)",
910
- fontSize: "var(--type-h2-size, 1.875rem)",
911
- lineHeight: "var(--type-h2-line-height, 1.25)"
912
- },
913
- children: title
914
- }
915
- ) }) : null,
916
- subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-1 truncate text-[15px] text-[color:var(--color-g4,#929599)]", children: subtitle }) : null,
917
- breadcrumbsWithoutCurrent.length > 0 ? /* @__PURE__ */ jsx(
918
- "nav",
919
- {
920
- "aria-label": "Breadcrumb",
921
- className: clsx("min-w-0 text-slate-100", title ? "mt-1" : ""),
922
- 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(
923
- "li",
924
- {
925
- className: "flex min-w-0 flex-shrink-0 items-center gap-2",
926
- children: [
927
- index > 0 ? /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: ">" }) : null,
928
- item.href ? /* @__PURE__ */ jsx(Link, { to: item.href, className: "truncate text-slate-100 hover:underline", children: item.label }) : /* @__PURE__ */ jsx("span", { className: "truncate text-slate-100", children: item.label })
929
- ]
930
- },
931
- `${item.label}-${index}`
932
- )) })
933
- }
934
- ) : null
935
- ] }),
936
- actions ? /* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: actions }) : null
937
- ] }) }),
938
- tabBar ? /* @__PURE__ */ jsx("div", { className: "m-0 w-full px-0", style: { backgroundColor: "transparent" }, children: tabBar }) : null
939
- ]
841
+ renderCrumbLink: (href, label, className) => /* @__PURE__ */ jsx(Link, { to: href, className, children: label })
940
842
  }
941
843
  );
942
844
  }
@@ -982,97 +884,12 @@ function PageContainer({
982
884
  }
983
885
  );
984
886
  }
985
- function BreadcrumbBar({
986
- breadcrumbs = [],
987
- actions = null,
988
- maxW = "full"
989
- }) {
990
- warnDeprecated(
991
- "BreadcrumbBar",
992
- "<BreadcrumbBar> is deprecated for apps: the breadcrumb trail is retired. Use the page header (mode eyebrow + title) instead."
993
- );
994
- if ((!breadcrumbs || breadcrumbs.length === 0) && !actions) {
995
- return null;
996
- }
997
- const maxWClass = maxW === "full" ? "max-w-none" : maxW === "container.xl" ? "max-w-7xl" : maxW === "container.lg" ? "max-w-6xl" : maxW === "container.md" ? "max-w-5xl" : "max-w-7xl";
887
+ function BreadcrumbBar(props) {
998
888
  return /* @__PURE__ */ jsx(
999
- "div",
889
+ BreadcrumbBarView,
1000
890
  {
1001
- className: "ml-0 border-b border-gray-200 px-4 py-3 md:ml-60",
1002
- style: { backgroundColor: "var(--app-tab-header-bg, #888888)" },
1003
- children: /* @__PURE__ */ jsx("div", { className: clsx("mx-auto w-full px-0", maxWClass), children: /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center justify-between", children: [
1004
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", children: /* @__PURE__ */ jsx("ol", { className: "flex items-center gap-2 text-sm text-slate-100", children: breadcrumbs.map((item, index) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2", children: [
1005
- index > 0 ? /* @__PURE__ */ jsx("span", { className: "text-gray-400", children: ">" }) : null,
1006
- item.href ? /* @__PURE__ */ jsx(Link, { to: item.href, className: "text-slate-100 hover:underline", children: item.label }) : /* @__PURE__ */ jsx("span", { className: "text-slate-100", children: item.label })
1007
- ] }, index)) }) }),
1008
- actions && /* @__PURE__ */ jsx("div", { children: actions })
1009
- ] }) })
1010
- }
1011
- );
1012
- }
1013
- function HeaderTabBar({
1014
- items,
1015
- activeId,
1016
- onChange,
1017
- className,
1018
- ariaLabel = "Tabs"
1019
- }) {
1020
- warnDeprecated(
1021
- "HeaderTabBar",
1022
- "<HeaderTabBar> is deprecated: use <NavTabStrip> from @the-portland-company/shell/native, the canonical page tab strip."
1023
- );
1024
- return /* @__PURE__ */ jsx(
1025
- "div",
1026
- {
1027
- role: "tablist",
1028
- "aria-label": ariaLabel,
1029
- className: clsx(
1030
- // Header-wide tab strip: background + bottom border only (no outer box).
1031
- // Left-aligned and fluid: the container spans the full content width,
1032
- // the tabs keep their natural width packed from the left (Global-Rules
1033
- // "Tabs & UI Styling": the strip spans the full width of the content
1034
- // area; tabs keep their natural width, left-aligned. Spencer 2026-10-11:
1035
- // all apps, all tabs, all screens). No mx-auto / justify-center /
1036
- // fixed width on the container.
1037
- "app-header-tab-bar m-0 flex w-full justify-start bg-slate-100 p-0",
1038
- "border-b border-slate-200",
1039
- className
1040
- ),
1041
- children: items.map((item, idx) => {
1042
- const isActive = item.id === activeId;
1043
- const isDisabled = Boolean(item.disabled);
1044
- return /* @__PURE__ */ jsxs(
1045
- "button",
1046
- {
1047
- type: "button",
1048
- role: "tab",
1049
- "aria-selected": isActive,
1050
- "aria-label": item.label,
1051
- disabled: isDisabled,
1052
- onClick: () => onChange(item.id),
1053
- className: clsx(
1054
- // `group/tbtip relative` powers the shared <TopBarTooltip>.
1055
- // Natural width (no flex-1 stretch); 40px square hit area for the
1056
- // icon-only tab so the strip stays tappable.
1057
- "group/tbtip app-header-tab-button relative inline-flex h-10 min-w-10 items-center justify-center px-3",
1058
- "transition-colors",
1059
- "rounded-none",
1060
- idx === 0 ? "rounded-tl-lg" : null,
1061
- idx === items.length - 1 ? "rounded-tr-lg" : null,
1062
- isActive ? "text-white" : "bg-transparent text-slate-600 hover:bg-white/60 hover:text-slate-900",
1063
- isDisabled ? "cursor-not-allowed opacity-50" : null
1064
- ),
1065
- style: {
1066
- background: isActive ? "var(--mode-primary-color, var(--app-btn-primary-bg))" : void 0
1067
- },
1068
- children: [
1069
- /* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center text-[14px] leading-none", children: item.icon }),
1070
- isDisabled ? null : /* @__PURE__ */ jsx(TopBarTooltip, { title: item.label })
1071
- ]
1072
- },
1073
- item.id
1074
- );
1075
- })
891
+ ...props,
892
+ renderCrumbLink: (href, label, className) => /* @__PURE__ */ jsx(Link, { to: href, className, children: label })
1076
893
  }
1077
894
  );
1078
895
  }
@@ -1511,6 +1328,6 @@ async function registerShellPrecache(opts = {}) {
1511
1328
  }
1512
1329
  }
1513
1330
 
1514
- export { BrandIcon, BrandLogo, BreadcrumbBar, Card, GlobalUiIdProvider, HeaderTabBar, PageContainer, PageHeader, ShellChromeContext, ShellFooterContext, ShellLinkedAccountsContext, ShellModeContext, ShellNavItemsContext, ShellNavigationPreferenceContext, ShellOrgContext, ShellProvider, ShellRoleContext, ShellSupportProviderContext, getOrganizationBadgeLetters, getOrganizationBrandColor, getUserDisplayName, hexToRgba, lightenHexColor, normalizeHexColor, politogyTheme, registerShellPrecache, useAppRegistry, useCurrentApp, useShellAuth, useShellChrome, useShellFooter, useShellLinkedAccounts, useShellMode, useShellNavItems, useShellNavigationPreference, useShellOrganization, useShellRole, useShellSupport };
1331
+ export { BrandIcon, BrandLogo, BreadcrumbBar, GlobalUiIdProvider, PageContainer, PageHeader, ShellChromeContext, ShellFooterContext, ShellLinkedAccountsContext, ShellModeContext, ShellNavItemsContext, ShellNavigationPreferenceContext, ShellOrgContext, ShellProvider, ShellRoleContext, ShellSupportProviderContext, getOrganizationBadgeLetters, getOrganizationBrandColor, getUserDisplayName, hexToRgba, lightenHexColor, normalizeHexColor, politogyTheme, registerShellPrecache, useAppRegistry, useCurrentApp, useShellAuth, useShellChrome, useShellFooter, useShellLinkedAccounts, useShellMode, useShellNavItems, useShellNavigationPreference, useShellOrganization, useShellRole, useShellSupport };
1515
1332
  //# sourceMappingURL=index.js.map
1516
1333
  //# sourceMappingURL=index.js.map