@the-portland-company/shell 0.2.1 → 0.3.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 +81 -0
- package/dist/chrome.css +102 -0
- package/dist/index.cjs +1155 -219
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +410 -28
- package/dist/index.d.ts +410 -28
- package/dist/index.js +1136 -221
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,86 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.0 — 2026-05-13
|
|
4
|
+
|
|
5
|
+
Visual-parity rebuild. Ports the legacy production sidebar + header chrome
|
|
6
|
+
from `react/app/src/layouts/AuthenticatedLayout.tsx` (lines 1292–4192)
|
|
7
|
+
into the shell so any consuming SPA gets the full Politogy chrome
|
|
8
|
+
without rebuilding from a skeleton.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- `<Sidebar />` — full port of legacy `SidebarContent` (3289–4192). Renders
|
|
13
|
+
brand logo, large org logo (when present), `<OrgPill />`,
|
|
14
|
+
`<ModePill />`, the navItems list, and a footer with Privacy / Terms /
|
|
15
|
+
Subscriptions links + commit/version display.
|
|
16
|
+
- `<Header />` — full port of legacy `MobileNav` (2545–2924). Renders
|
|
17
|
+
hamburger (mobile), small brand logo (mobile), page title + breadcrumbs,
|
|
18
|
+
headerActions slot, headerIconsSlot (FuelPopover, alerts, etc.), the
|
|
19
|
+
DevNotesMenu slot, and `<UserMenu />`.
|
|
20
|
+
- `<NavItem />` — full port of legacy `NavItem` (1292–1730). Supports
|
|
21
|
+
top-level rows, accordion children, active-state highlight, mode-aware
|
|
22
|
+
hover gradient, brand icons, regular react-icons, badges, and sub-labels.
|
|
23
|
+
- `<OrgPill />` — port of the sidebar org switcher (3795–3957). New
|
|
24
|
+
primary export; the v0.2.x `<OrgSelector />` export still works as an
|
|
25
|
+
alias.
|
|
26
|
+
- `<ModePill />` — port of the mode selector (3959–4006).
|
|
27
|
+
- `<UserMenu />` (rewrite) — matches the legacy avatar menu (2680–2898).
|
|
28
|
+
Sections: avatar trigger + name/email VStack + chevron; My Profile /
|
|
29
|
+
Continue Onboarding (gated) / Organization Settings; ROLES &
|
|
30
|
+
ORGANIZATIONS (current-org role Badge OR active-role Badge); ACCOUNTS
|
|
31
|
+
(current account indicator + linkedAccounts list with inline remove +
|
|
32
|
+
Add Account); Sign out.
|
|
33
|
+
- `<BrandLogo />` — non-draggable `<img>` that the app supplies the `src`
|
|
34
|
+
for (mode-aware logo asset stays in the app's `public/` directory).
|
|
35
|
+
- `<BrandIcon name={...} />` — `<img>` keyed off `/brand/icons/<name>.svg`
|
|
36
|
+
(with a configurable `basePath`).
|
|
37
|
+
- New chrome contexts and hooks:
|
|
38
|
+
- `useShellMode()` → `{ currentMode, modes, switchMode, getModeConfig }`
|
|
39
|
+
- `useShellNavItems()` → `{ items }`
|
|
40
|
+
- `useShellNavigationPreference()` → `{ showSubMenu }`
|
|
41
|
+
- `useShellRole()` → `{ activeRoleConfig, isSuperAdmin }`
|
|
42
|
+
- `useShellFooter()` → `{ links, version, commit, releaseName, … }`
|
|
43
|
+
- Helpers (public exports): `normalizeHexColor`, `lightenHexColor`,
|
|
44
|
+
`hexToRgba`, `getOrganizationBrandColor`,
|
|
45
|
+
`getOrganizationBadgeLetters`, `getUserDisplayName`.
|
|
46
|
+
- `<ShellChrome>` gained props: `mode`, `navItems`, `navigationPreference`,
|
|
47
|
+
`role`, `footer`, `brandLogoSrc`, `headerIconsSlot`,
|
|
48
|
+
`organizationSettingsHref`, `showContinueOnboarding`,
|
|
49
|
+
`onContinueOnboarding`, `pageTitle`, `breadcrumbs`, `headerActions`.
|
|
50
|
+
- New CSS subpath export: `@the-portland-company/shell/chrome.css` — the
|
|
51
|
+
`:root` design-token CSS variables from `react/app/src/index.css`
|
|
52
|
+
(`--app-color-brand-*`, `--app-btn-*`, `--app-tab-*`, `--mode-*`,
|
|
53
|
+
`--form-control-*`).
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- **Breaking:** `<AppLayout>` no longer accepts `headerExtrasSlot`. The
|
|
58
|
+
replacement is the new `headerIconsSlot` field on `<ShellChrome>` (passed
|
|
59
|
+
through context so the `<Header>` can render it in the right place
|
|
60
|
+
inside the icon row). `modalsSlot`, `notificationsSlot`, and
|
|
61
|
+
`overlaySlot` are unchanged. `sidebarFooterSlot` is removed (footer is
|
|
62
|
+
now data-driven via `useShellFooter()`).
|
|
63
|
+
- **Breaking:** `<UserMenu>` was rewritten. The v0.2.x version showed a
|
|
64
|
+
generic Switch-account section; v0.3.0 matches the legacy production
|
|
65
|
+
menu shape. Apps that depended on the old menu strings (`'Switch
|
|
66
|
+
account'`, `'Add account'`) should update to the new strings
|
|
67
|
+
(`'ACCOUNTS'`, `'Add Account'`).
|
|
68
|
+
- `<Sidebar>` no longer takes `entries` / `currentApp` / `footerSlot`
|
|
69
|
+
props — it reads everything from shell contexts.
|
|
70
|
+
- `<Header>` no longer takes `extrasSlot` — it reads
|
|
71
|
+
`headerActions` + `headerIconsSlot` from chrome context.
|
|
72
|
+
|
|
73
|
+
### Compat
|
|
74
|
+
|
|
75
|
+
- `<OrgSelector>` is still exported (now aliased to `<OrgPill>`).
|
|
76
|
+
- All v0.2.x ShellProvider props (`organization`, `linkedAccounts`,
|
|
77
|
+
`support`, `devNotesMenu`, `myProfileHref`) still work.
|
|
78
|
+
|
|
79
|
+
### Peer dependency
|
|
80
|
+
|
|
81
|
+
- Adds `react-icons` `^4 || ^5` (used by `<NavItem>`, `<Header>`,
|
|
82
|
+
`<UserMenu>` for the chevron / hamburger / X icons).
|
|
83
|
+
|
|
3
84
|
## 0.2.1 — 2026-05-13
|
|
4
85
|
|
|
5
86
|
### 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
|
+
}
|