@the-portland-company/shell 0.2.1 → 0.3.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 +123 -0
- package/dist/chrome.css +102 -0
- package/dist/index.cjs +1387 -219
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +477 -29
- package/dist/index.d.ts +477 -29
- package/dist/index.js +1367 -221
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,128 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.1 — 2026-05-13
|
|
4
|
+
|
|
5
|
+
Closes the last two visual gaps in the shell-v3 chrome vs production.
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Header icon order**: Removed the `devNotesMenu` slot from
|
|
10
|
+
`<Header>`'s icon row. Previously the shell appended DevNotes (the
|
|
11
|
+
"Task" icon) AFTER `headerIconsSlot`, forcing it to the rightmost
|
|
12
|
+
position. That broke production order (Fuel → Stack → Bell → Task →
|
|
13
|
+
Support → Avatar). Apps must now inline DevNotesMenu inside
|
|
14
|
+
`headerIconsSlot` at the position they want. The `devNotesMenu` prop
|
|
15
|
+
on `<ShellChrome>` is still accepted for backward compat but is
|
|
16
|
+
ignored at render time.
|
|
17
|
+
- **Sidebar footer commit info**: Replaced the plain-text
|
|
18
|
+
`"staging v2.34.1 #51e4e3f"` row with a full port of the legacy
|
|
19
|
+
production `CommitCopyButton` (env chip + last-4 SHA + version +
|
|
20
|
+
optional diagnostics icon, plus a second-line byline `| Mon D |
|
|
21
|
+
firstName |`). Clicking the env chip copies the full SHA. Hovering
|
|
22
|
+
shows the full commit message body when `commitLog` is supplied.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
|
|
26
|
+
- `<CommitCopyButton>` — new exported component. Ported from
|
|
27
|
+
`react/app/src/layouts/AuthenticatedLayout.tsx::CommitCopyButton`
|
|
28
|
+
(lines 3017–3284). Accepts `envNode` (pre-rendered chip),
|
|
29
|
+
`environmentLabel` (default styled chip — green/orange/red for
|
|
30
|
+
local/staging/production), `commit`, `version`, `commitDate`,
|
|
31
|
+
`commitAuthor`, `commitLog`, and `onDiagnosticsClick`. Used by the
|
|
32
|
+
shell's `<Sidebar>` footer; also exported for apps that want to mount
|
|
33
|
+
it elsewhere.
|
|
34
|
+
- `ShellFooterValue.envNode?: ReactNode` — pre-rendered chip override
|
|
35
|
+
(useful when the app already has its own `EnvironmentBanner`).
|
|
36
|
+
- `ShellFooterValue.onDiagnosticsClick?: () => void` — gates the
|
|
37
|
+
diagnostics icon. When unset, the icon is omitted.
|
|
38
|
+
|
|
39
|
+
### Doc-only
|
|
40
|
+
|
|
41
|
+
- `ShellProviderProps.support` doc no longer claims the shell renders
|
|
42
|
+
a `<SupportRequestButton />` automatically. It never did — apps wire
|
|
43
|
+
their own support trigger via `headerIconsSlot`.
|
|
44
|
+
|
|
45
|
+
## 0.3.0 — 2026-05-13
|
|
46
|
+
|
|
47
|
+
Visual-parity rebuild. Ports the legacy production sidebar + header chrome
|
|
48
|
+
from `react/app/src/layouts/AuthenticatedLayout.tsx` (lines 1292–4192)
|
|
49
|
+
into the shell so any consuming SPA gets the full Politogy chrome
|
|
50
|
+
without rebuilding from a skeleton.
|
|
51
|
+
|
|
52
|
+
### Added
|
|
53
|
+
|
|
54
|
+
- `<Sidebar />` — full port of legacy `SidebarContent` (3289–4192). Renders
|
|
55
|
+
brand logo, large org logo (when present), `<OrgPill />`,
|
|
56
|
+
`<ModePill />`, the navItems list, and a footer with Privacy / Terms /
|
|
57
|
+
Subscriptions links + commit/version display.
|
|
58
|
+
- `<Header />` — full port of legacy `MobileNav` (2545–2924). Renders
|
|
59
|
+
hamburger (mobile), small brand logo (mobile), page title + breadcrumbs,
|
|
60
|
+
headerActions slot, headerIconsSlot (FuelPopover, alerts, etc.), the
|
|
61
|
+
DevNotesMenu slot, and `<UserMenu />`.
|
|
62
|
+
- `<NavItem />` — full port of legacy `NavItem` (1292–1730). Supports
|
|
63
|
+
top-level rows, accordion children, active-state highlight, mode-aware
|
|
64
|
+
hover gradient, brand icons, regular react-icons, badges, and sub-labels.
|
|
65
|
+
- `<OrgPill />` — port of the sidebar org switcher (3795–3957). New
|
|
66
|
+
primary export; the v0.2.x `<OrgSelector />` export still works as an
|
|
67
|
+
alias.
|
|
68
|
+
- `<ModePill />` — port of the mode selector (3959–4006).
|
|
69
|
+
- `<UserMenu />` (rewrite) — matches the legacy avatar menu (2680–2898).
|
|
70
|
+
Sections: avatar trigger + name/email VStack + chevron; My Profile /
|
|
71
|
+
Continue Onboarding (gated) / Organization Settings; ROLES &
|
|
72
|
+
ORGANIZATIONS (current-org role Badge OR active-role Badge); ACCOUNTS
|
|
73
|
+
(current account indicator + linkedAccounts list with inline remove +
|
|
74
|
+
Add Account); Sign out.
|
|
75
|
+
- `<BrandLogo />` — non-draggable `<img>` that the app supplies the `src`
|
|
76
|
+
for (mode-aware logo asset stays in the app's `public/` directory).
|
|
77
|
+
- `<BrandIcon name={...} />` — `<img>` keyed off `/brand/icons/<name>.svg`
|
|
78
|
+
(with a configurable `basePath`).
|
|
79
|
+
- New chrome contexts and hooks:
|
|
80
|
+
- `useShellMode()` → `{ currentMode, modes, switchMode, getModeConfig }`
|
|
81
|
+
- `useShellNavItems()` → `{ items }`
|
|
82
|
+
- `useShellNavigationPreference()` → `{ showSubMenu }`
|
|
83
|
+
- `useShellRole()` → `{ activeRoleConfig, isSuperAdmin }`
|
|
84
|
+
- `useShellFooter()` → `{ links, version, commit, releaseName, … }`
|
|
85
|
+
- Helpers (public exports): `normalizeHexColor`, `lightenHexColor`,
|
|
86
|
+
`hexToRgba`, `getOrganizationBrandColor`,
|
|
87
|
+
`getOrganizationBadgeLetters`, `getUserDisplayName`.
|
|
88
|
+
- `<ShellChrome>` gained props: `mode`, `navItems`, `navigationPreference`,
|
|
89
|
+
`role`, `footer`, `brandLogoSrc`, `headerIconsSlot`,
|
|
90
|
+
`organizationSettingsHref`, `showContinueOnboarding`,
|
|
91
|
+
`onContinueOnboarding`, `pageTitle`, `breadcrumbs`, `headerActions`.
|
|
92
|
+
- New CSS subpath export: `@the-portland-company/shell/chrome.css` — the
|
|
93
|
+
`:root` design-token CSS variables from `react/app/src/index.css`
|
|
94
|
+
(`--app-color-brand-*`, `--app-btn-*`, `--app-tab-*`, `--mode-*`,
|
|
95
|
+
`--form-control-*`).
|
|
96
|
+
|
|
97
|
+
### Changed
|
|
98
|
+
|
|
99
|
+
- **Breaking:** `<AppLayout>` no longer accepts `headerExtrasSlot`. The
|
|
100
|
+
replacement is the new `headerIconsSlot` field on `<ShellChrome>` (passed
|
|
101
|
+
through context so the `<Header>` can render it in the right place
|
|
102
|
+
inside the icon row). `modalsSlot`, `notificationsSlot`, and
|
|
103
|
+
`overlaySlot` are unchanged. `sidebarFooterSlot` is removed (footer is
|
|
104
|
+
now data-driven via `useShellFooter()`).
|
|
105
|
+
- **Breaking:** `<UserMenu>` was rewritten. The v0.2.x version showed a
|
|
106
|
+
generic Switch-account section; v0.3.0 matches the legacy production
|
|
107
|
+
menu shape. Apps that depended on the old menu strings (`'Switch
|
|
108
|
+
account'`, `'Add account'`) should update to the new strings
|
|
109
|
+
(`'ACCOUNTS'`, `'Add Account'`).
|
|
110
|
+
- `<Sidebar>` no longer takes `entries` / `currentApp` / `footerSlot`
|
|
111
|
+
props — it reads everything from shell contexts.
|
|
112
|
+
- `<Header>` no longer takes `extrasSlot` — it reads
|
|
113
|
+
`headerActions` + `headerIconsSlot` from chrome context.
|
|
114
|
+
|
|
115
|
+
### Compat
|
|
116
|
+
|
|
117
|
+
- `<OrgSelector>` is still exported (now aliased to `<OrgPill>`).
|
|
118
|
+
- All v0.2.x ShellProvider props (`organization`, `linkedAccounts`,
|
|
119
|
+
`support`, `devNotesMenu`, `myProfileHref`) still work.
|
|
120
|
+
|
|
121
|
+
### Peer dependency
|
|
122
|
+
|
|
123
|
+
- Adds `react-icons` `^4 || ^5` (used by `<NavItem>`, `<Header>`,
|
|
124
|
+
`<UserMenu>` for the chevron / hamburger / X icons).
|
|
125
|
+
|
|
3
126
|
## 0.2.1 — 2026-05-13
|
|
4
127
|
|
|
5
128
|
### Added
|
package/dist/chrome.css
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Politogy chrome global CSS variables. Ported verbatim from
|
|
3
|
+
* react/app/src/index.css :root block (2026-05-13). Apps that adopt the
|
|
4
|
+
* shell import this once (typically alongside the view-transitions CSS)
|
|
5
|
+
* so form controls / buttons / tabs / mode colors stay consistent across
|
|
6
|
+
* SPAs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
/* Politogy brand palette — design spec 2026-05-02 */
|
|
11
|
+
--color-race-red: #E63946;
|
|
12
|
+
--color-race-blue: #007BFF;
|
|
13
|
+
--color-tread-yellow: #F2C94C;
|
|
14
|
+
--color-green-flag: #00A651;
|
|
15
|
+
--color-layer-1: #F0F4F7; /* G1 — page background */
|
|
16
|
+
--color-layer-2: #ECEEEF; /* G2 — recessed surfaces */
|
|
17
|
+
--color-layer-3: #FFFFFF; /* White — elevated cards */
|
|
18
|
+
--color-graphite: #2F3136; /* Font 2 — primary body text */
|
|
19
|
+
--color-g4: #929599; /* Font — secondary / muted text */
|
|
20
|
+
--color-g3: #D7DADF; /* Small print + subtle accent borders */
|
|
21
|
+
|
|
22
|
+
/* Form-control sizing + colors */
|
|
23
|
+
--app-field-bg: #ffffff;
|
|
24
|
+
--app-field-border: #e2e8f0;
|
|
25
|
+
--app-field-border-hover: #a0aec0;
|
|
26
|
+
--app-field-focus: #e86a3a;
|
|
27
|
+
--app-floating-label-bg: #ffffff;
|
|
28
|
+
--app-floating-label-top: -9px;
|
|
29
|
+
--app-floating-label-left: 10px;
|
|
30
|
+
--app-floating-label-font-size: 12px;
|
|
31
|
+
--app-floating-label-line-height: 16px;
|
|
32
|
+
--app-floating-label-padding-x: 6px;
|
|
33
|
+
--app-field-radius: 10px;
|
|
34
|
+
--form-control-height: 44px;
|
|
35
|
+
--form-control-radius: 5px;
|
|
36
|
+
--form-control-padding: 12px;
|
|
37
|
+
--form-control-font-size: 14px;
|
|
38
|
+
--form-placeholder-font-size: 14px;
|
|
39
|
+
--form-placeholder-color: #9ca3af;
|
|
40
|
+
--form-value-color: #000000;
|
|
41
|
+
--form-control-border: #cbd5e1;
|
|
42
|
+
--form-control-border-hover: #94a3b8;
|
|
43
|
+
--form-control-focus: #64748b;
|
|
44
|
+
--form-select-icon: #64748b;
|
|
45
|
+
--form-label-left: 10px;
|
|
46
|
+
--form-label-top: 0px;
|
|
47
|
+
--form-label-font-size: 12px;
|
|
48
|
+
|
|
49
|
+
/* Buttons */
|
|
50
|
+
--app-btn-size: var(--form-control-height);
|
|
51
|
+
--app-btn-radius: 10px;
|
|
52
|
+
--app-btn-font-size: 14px;
|
|
53
|
+
--app-btn-primary-bg: #e86a3a;
|
|
54
|
+
--app-btn-primary-bg-hover: #d95f30;
|
|
55
|
+
--app-btn-primary-fg: #ffffff;
|
|
56
|
+
--app-btn-secondary-bg: #ffffff;
|
|
57
|
+
--app-btn-secondary-bg-hover: #f8fafc;
|
|
58
|
+
--app-btn-secondary-fg: #334155;
|
|
59
|
+
--app-btn-secondary-border: #cbd5e1;
|
|
60
|
+
--app-btn-tooltip-bg: #0f172a;
|
|
61
|
+
--app-btn-tooltip-fg: #ffffff;
|
|
62
|
+
|
|
63
|
+
/* Tabs */
|
|
64
|
+
--app-tab-header-bg: #888888;
|
|
65
|
+
--app-tab-row-bg: #f0f4f8;
|
|
66
|
+
--app-tab-content-bg: #f8fafc;
|
|
67
|
+
--app-tab-height: var(--form-control-height);
|
|
68
|
+
--app-tab-icon-size: 18px;
|
|
69
|
+
--app-tab-strip-padding-y: 14px;
|
|
70
|
+
--app-tab-gap: 8px;
|
|
71
|
+
--app-tab-radius: 12px;
|
|
72
|
+
|
|
73
|
+
/* Brand color ramps */
|
|
74
|
+
--app-color-brand-50: #fff5f0;
|
|
75
|
+
--app-color-brand-100: #ffe8dc;
|
|
76
|
+
--app-color-brand-200: #ffd0b8;
|
|
77
|
+
--app-color-brand-300: #ffb088;
|
|
78
|
+
--app-color-brand-400: #ff8c5a;
|
|
79
|
+
--app-color-brand-500: #e86a3a;
|
|
80
|
+
--app-color-brand-600: #cc5429;
|
|
81
|
+
--app-color-brand-700: #a6421f;
|
|
82
|
+
--app-color-brand-800: #803317;
|
|
83
|
+
--app-color-brand-900: #5c2410;
|
|
84
|
+
|
|
85
|
+
/* Gray ramps (for components referencing --app-color-gray-N) */
|
|
86
|
+
--app-color-gray-50: #f7fafc;
|
|
87
|
+
--app-color-gray-100: #edf2f7;
|
|
88
|
+
--app-color-gray-200: #e2e8f0;
|
|
89
|
+
--app-color-gray-300: #cbd5e0;
|
|
90
|
+
--app-color-gray-400: #a0aec0;
|
|
91
|
+
--app-color-gray-500: #718096;
|
|
92
|
+
--app-color-gray-600: #4a5568;
|
|
93
|
+
--app-color-gray-700: #2d3748;
|
|
94
|
+
--app-color-gray-800: #1a202c;
|
|
95
|
+
--app-color-gray-900: #171923;
|
|
96
|
+
|
|
97
|
+
/* Mode-active colors (overwritten by app at mode-switch time) */
|
|
98
|
+
--mode-primary-color: var(--app-color-brand-500);
|
|
99
|
+
--mode-input-border-color: var(--app-color-brand-500);
|
|
100
|
+
--mode-input-hover-border-color: var(--app-color-brand-600);
|
|
101
|
+
--mode-input-focus-shadow-color: var(--app-color-brand-500);
|
|
102
|
+
}
|