@meetreeve/ui 0.18.1 → 0.20.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/README.md +24 -0
- package/dist/index.d.mts +55 -1
- package/dist/index.d.ts +55 -1
- package/dist/index.js +318 -165
- package/dist/index.mjs +316 -165
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -100,6 +100,8 @@ import { ResponsiveHeader } from "@meetreeve/ui";
|
|
|
100
100
|
/>;
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
Pass `wordmark` (and optionally `wordmarkDark`) on `brand` when the brand has a real wordmark image: the header shows it in place of the glyph and text name at md and up, and below md its `favicon` bare, or the glyph when there is none (DEV-16425).
|
|
104
|
+
|
|
103
105
|
Search is the primary slot — always inline, floored at a minimum width from `@meetreeve/ui/tokens`. Under width pressure everything ELSE collapses first: the wordmark drops to glyph-only, secondary controls fold into a hamburger disclosure below `md`.
|
|
104
106
|
|
|
105
107
|
### CSS container-query collapse (DEV-4260)
|
|
@@ -114,6 +116,28 @@ The wordmark↔glyph and inline-actions↔hamburger split is pure CSS — a Tail
|
|
|
114
116
|
|
|
115
117
|
to your `globals.css` (adjust the relative path to your app). See `reeve-tenant-frontend`'s `src/app/globals.css` for the existing precedent. Without this, `ResponsiveHeader`'s container-variant classes (and `AppSidebar`'s) never make it into your compiled CSS, and the header renders as if `display: none` applied everywhere.
|
|
116
118
|
|
|
119
|
+
## SiteFooter (DEV-15467)
|
|
120
|
+
|
|
121
|
+
The footer for tenant sites: the tenant's own links, the legal trio, a copyright line, and the small "Made with Reeve" badge.
|
|
122
|
+
|
|
123
|
+
```tsx
|
|
124
|
+
import Link from "next/link";
|
|
125
|
+
import { SiteFooter } from "@meetreeve/ui";
|
|
126
|
+
|
|
127
|
+
<SiteFooter
|
|
128
|
+
brandName={brandName}
|
|
129
|
+
links={[{ href: "/", label: "Home" }, ...footerPages]}
|
|
130
|
+
showBadge={branding?.powered_by_reeve}
|
|
131
|
+
linkComponent={Link}
|
|
132
|
+
/>;
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`legal` defaults to Privacy `/privacy`, Terms `/terms`, Cookies `/cookies` (`DEFAULT_LEGAL_LINKS`). The tenant nav row renders only when `links` is non-empty.
|
|
136
|
+
|
|
137
|
+
The badge is **fail-closed** (DEV-7233): it renders unless `showBadge` is the literal `false`, so pass the platform's `branding.powered_by_reeve` through unchanged and a failed fetch or malformed value keeps it on. It is the only Reeve mention in the footer; a tenant's end member otherwise sees only the tenant's brand (DEV-15189).
|
|
138
|
+
|
|
139
|
+
Every link carries the 44px touch-target floor as an inline style. Layout classes need the `@source` line from ResponsiveHeader above. The main entry is a `"use client"` bundle, so from a Server Component pass only serializable props, or render `SiteFooter` from a client file when you need `linkComponent`.
|
|
140
|
+
|
|
117
141
|
## BrandGlyph
|
|
118
142
|
|
|
119
143
|
```tsx
|
package/dist/index.d.mts
CHANGED
|
@@ -22,6 +22,16 @@ interface Brand {
|
|
|
22
22
|
favicon?: string | null;
|
|
23
23
|
/** Wider brand logo URL (second cascade step, rendered `object-contain`). */
|
|
24
24
|
logo?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Full wordmark image URL (DEV-16425). When set, `ResponsiveHeader` shows it
|
|
27
|
+
* in place of the glyph + text lockup at md and up; below md it shows
|
|
28
|
+
* `favicon` bare (no contrast tile), or the glyph when there is no favicon.
|
|
29
|
+
* Supply a tightly cropped image — it renders at the text wordmark's 20px
|
|
30
|
+
* line height.
|
|
31
|
+
*/
|
|
32
|
+
wordmark?: string | null;
|
|
33
|
+
/** Wordmark for dark backgrounds, shown under the `dark` variant. Falls back to `wordmark`. */
|
|
34
|
+
wordmarkDark?: string | null;
|
|
25
35
|
/** Override the deterministic monogram letter colour. */
|
|
26
36
|
color?: string | null;
|
|
27
37
|
/**
|
|
@@ -206,6 +216,50 @@ declare function ResponsiveHeader({ brand, search, nav, brandHref, linkComponent
|
|
|
206
216
|
*/
|
|
207
217
|
declare function useResponsivePlaceholder(desktop: string, mobile?: string): string;
|
|
208
218
|
|
|
219
|
+
interface SiteFooterLink {
|
|
220
|
+
href: string;
|
|
221
|
+
label: string;
|
|
222
|
+
}
|
|
223
|
+
interface SiteFooterProps {
|
|
224
|
+
/** The tenant's brand name, shown in the copyright line. */
|
|
225
|
+
brandName: string;
|
|
226
|
+
/** The tenant's own page links. The row is omitted when empty. */
|
|
227
|
+
links?: readonly SiteFooterLink[];
|
|
228
|
+
/** Legal links. Defaults to the trio every spawned tenant ships (DEV-7232). */
|
|
229
|
+
legal?: readonly SiteFooterLink[];
|
|
230
|
+
/**
|
|
231
|
+
* The platform's white-label switch (`branding.powered_by_reeve`, DEV-7233).
|
|
232
|
+
* Fail-closed: the badge renders unless this is the literal `false`, so a
|
|
233
|
+
* failed fetch, an absent field or a malformed value all keep it on.
|
|
234
|
+
*/
|
|
235
|
+
showBadge?: unknown;
|
|
236
|
+
/**
|
|
237
|
+
* Link renderer for `links` and `legal`. Defaults to a bare `"a"`; pass
|
|
238
|
+
* your router's link (e.g. `next/link`) for client-side navigation. The
|
|
239
|
+
* badge is an external link and always renders a plain `<a>`.
|
|
240
|
+
*/
|
|
241
|
+
linkComponent?: ElementType;
|
|
242
|
+
className?: string;
|
|
243
|
+
}
|
|
244
|
+
declare const DEFAULT_LEGAL_LINKS: readonly SiteFooterLink[];
|
|
245
|
+
/**
|
|
246
|
+
* SiteFooter (DEV-15467) — the one footer every tenant site renders.
|
|
247
|
+
*
|
|
248
|
+
* Spawned tenant repos are frozen copies of the template, so a footer edit in
|
|
249
|
+
* the template never reaches a live tenant. Shipping the footer from this
|
|
250
|
+
* package means a footer change reaches every tenant as a version bump.
|
|
251
|
+
*
|
|
252
|
+
* A tenant's end member sees only the tenant's brand (epic DEV-15189). The one
|
|
253
|
+
* allowed Reeve mention is the small "Made with Reeve" badge; nothing else in
|
|
254
|
+
* this component may name Reeve, and `site-footer.test.tsx` pins that.
|
|
255
|
+
*
|
|
256
|
+
* Markup follows the template's (marketing) layout footer: an optional tenant
|
|
257
|
+
* nav row, then copyright, the legal nav and the badge. Every link carries the
|
|
258
|
+
* 44px touch-target floor inline (DEV-9652), so it holds even when the host's
|
|
259
|
+
* Tailwind build does not scan this package.
|
|
260
|
+
*/
|
|
261
|
+
declare function SiteFooter({ brandName, links, legal, showBadge, linkComponent, className, }: SiteFooterProps): react.JSX.Element;
|
|
262
|
+
|
|
209
263
|
interface InfoTipProps {
|
|
210
264
|
/** The explanation the tip reveals. Keep it to a sentence or two. */
|
|
211
265
|
children: ReactNode;
|
|
@@ -955,4 +1009,4 @@ interface ConnectorPickerProps {
|
|
|
955
1009
|
}
|
|
956
1010
|
declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
|
|
957
1011
|
|
|
958
|
-
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
|
1012
|
+
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, DEFAULT_LEGAL_LINKS, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, SiteFooter, type SiteFooterLink, type SiteFooterProps, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,16 @@ interface Brand {
|
|
|
22
22
|
favicon?: string | null;
|
|
23
23
|
/** Wider brand logo URL (second cascade step, rendered `object-contain`). */
|
|
24
24
|
logo?: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Full wordmark image URL (DEV-16425). When set, `ResponsiveHeader` shows it
|
|
27
|
+
* in place of the glyph + text lockup at md and up; below md it shows
|
|
28
|
+
* `favicon` bare (no contrast tile), or the glyph when there is no favicon.
|
|
29
|
+
* Supply a tightly cropped image — it renders at the text wordmark's 20px
|
|
30
|
+
* line height.
|
|
31
|
+
*/
|
|
32
|
+
wordmark?: string | null;
|
|
33
|
+
/** Wordmark for dark backgrounds, shown under the `dark` variant. Falls back to `wordmark`. */
|
|
34
|
+
wordmarkDark?: string | null;
|
|
25
35
|
/** Override the deterministic monogram letter colour. */
|
|
26
36
|
color?: string | null;
|
|
27
37
|
/**
|
|
@@ -206,6 +216,50 @@ declare function ResponsiveHeader({ brand, search, nav, brandHref, linkComponent
|
|
|
206
216
|
*/
|
|
207
217
|
declare function useResponsivePlaceholder(desktop: string, mobile?: string): string;
|
|
208
218
|
|
|
219
|
+
interface SiteFooterLink {
|
|
220
|
+
href: string;
|
|
221
|
+
label: string;
|
|
222
|
+
}
|
|
223
|
+
interface SiteFooterProps {
|
|
224
|
+
/** The tenant's brand name, shown in the copyright line. */
|
|
225
|
+
brandName: string;
|
|
226
|
+
/** The tenant's own page links. The row is omitted when empty. */
|
|
227
|
+
links?: readonly SiteFooterLink[];
|
|
228
|
+
/** Legal links. Defaults to the trio every spawned tenant ships (DEV-7232). */
|
|
229
|
+
legal?: readonly SiteFooterLink[];
|
|
230
|
+
/**
|
|
231
|
+
* The platform's white-label switch (`branding.powered_by_reeve`, DEV-7233).
|
|
232
|
+
* Fail-closed: the badge renders unless this is the literal `false`, so a
|
|
233
|
+
* failed fetch, an absent field or a malformed value all keep it on.
|
|
234
|
+
*/
|
|
235
|
+
showBadge?: unknown;
|
|
236
|
+
/**
|
|
237
|
+
* Link renderer for `links` and `legal`. Defaults to a bare `"a"`; pass
|
|
238
|
+
* your router's link (e.g. `next/link`) for client-side navigation. The
|
|
239
|
+
* badge is an external link and always renders a plain `<a>`.
|
|
240
|
+
*/
|
|
241
|
+
linkComponent?: ElementType;
|
|
242
|
+
className?: string;
|
|
243
|
+
}
|
|
244
|
+
declare const DEFAULT_LEGAL_LINKS: readonly SiteFooterLink[];
|
|
245
|
+
/**
|
|
246
|
+
* SiteFooter (DEV-15467) — the one footer every tenant site renders.
|
|
247
|
+
*
|
|
248
|
+
* Spawned tenant repos are frozen copies of the template, so a footer edit in
|
|
249
|
+
* the template never reaches a live tenant. Shipping the footer from this
|
|
250
|
+
* package means a footer change reaches every tenant as a version bump.
|
|
251
|
+
*
|
|
252
|
+
* A tenant's end member sees only the tenant's brand (epic DEV-15189). The one
|
|
253
|
+
* allowed Reeve mention is the small "Made with Reeve" badge; nothing else in
|
|
254
|
+
* this component may name Reeve, and `site-footer.test.tsx` pins that.
|
|
255
|
+
*
|
|
256
|
+
* Markup follows the template's (marketing) layout footer: an optional tenant
|
|
257
|
+
* nav row, then copyright, the legal nav and the badge. Every link carries the
|
|
258
|
+
* 44px touch-target floor inline (DEV-9652), so it holds even when the host's
|
|
259
|
+
* Tailwind build does not scan this package.
|
|
260
|
+
*/
|
|
261
|
+
declare function SiteFooter({ brandName, links, legal, showBadge, linkComponent, className, }: SiteFooterProps): react.JSX.Element;
|
|
262
|
+
|
|
209
263
|
interface InfoTipProps {
|
|
210
264
|
/** The explanation the tip reveals. Keep it to a sentence or two. */
|
|
211
265
|
children: ReactNode;
|
|
@@ -955,4 +1009,4 @@ interface ConnectorPickerProps {
|
|
|
955
1009
|
}
|
|
956
1010
|
declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
|
|
957
1011
|
|
|
958
|
-
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|
|
1012
|
+
export { type AppRungItem, AppSidebar, type AppSidebarBrand, type AppSidebarModuleDef, type AppSidebarProps, type AppSidebarTopItem, type Brand, BrandGlyph, type BrandGlyphProps, type ConnectableAccess, type ConnectableCapability, type ConnectableEntry, type ConnectableTransport, type ConnectionKind, type ConnectorConnectionHealth, type ConnectorCredentialField, type ConnectorCredentialTestResult, type ConnectorGrant, type ConnectorGrantInput, type ConnectorGranteeType, type ConnectorGuideStep, ConnectorPicker, type ConnectorPickerClient, type ConnectorPickerLens, type ConnectorPickerProps, type ConnectorRoleOption, type ConnectorSetupGuide, type ContextOrgGroup, ContextSwitcher, type ContextSwitcherItem, type ContextSwitcherProps, DEFAULT_LEGAL_LINKS, type FallbackModuleDef, Flyout, type FlyoutChild, type FlyoutProps, GLYPH_CANVAS_FILL, type GroupRungItem, HOVER_CLOSE_DELAY_MS, HOVER_SWITCH_DELAY_MS, type HeaderNavItem, InfoTip, type InfoTipProps, LOCKUP_GAP, LOCKUP_ROW, MARK_CAP_RATIO, MARK_WEIGHT, type OrgConnectPolicy, REEVE_ACCENT, ResponsiveHeader, type ResponsiveHeaderProps, type RungItem, type SidebarLadder, type SidebarLadderParsed, type SidebarRung, SiteFooter, type SiteFooterLink, type SiteFooterProps, type UseLadderRungOptions, WORDMARK_WEIGHT, accessLabel, deriveFallbackLadder, faviconUrl, groupByOrg, reconcileLadder, resolveLadder, useLadderRung, useResponsivePlaceholder, zSidebarLadder };
|