@meetreeve/ui 0.18.0 → 0.19.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 CHANGED
@@ -114,6 +114,28 @@ The wordmark↔glyph and inline-actions↔hamburger split is pure CSS — a Tail
114
114
 
115
115
  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
116
 
117
+ ## SiteFooter (DEV-15467)
118
+
119
+ The footer for tenant sites: the tenant's own links, the legal trio, a copyright line, and the small "Made with Reeve" badge.
120
+
121
+ ```tsx
122
+ import Link from "next/link";
123
+ import { SiteFooter } from "@meetreeve/ui";
124
+
125
+ <SiteFooter
126
+ brandName={brandName}
127
+ links={[{ href: "/", label: "Home" }, ...footerPages]}
128
+ showBadge={branding?.powered_by_reeve}
129
+ linkComponent={Link}
130
+ />;
131
+ ```
132
+
133
+ `legal` defaults to Privacy `/privacy`, Terms `/terms`, Cookies `/cookies` (`DEFAULT_LEGAL_LINKS`). The tenant nav row renders only when `links` is non-empty.
134
+
135
+ 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).
136
+
137
+ 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`.
138
+
117
139
  ## BrandGlyph
118
140
 
119
141
  ```tsx
package/dist/index.d.mts CHANGED
@@ -206,6 +206,50 @@ declare function ResponsiveHeader({ brand, search, nav, brandHref, linkComponent
206
206
  */
207
207
  declare function useResponsivePlaceholder(desktop: string, mobile?: string): string;
208
208
 
209
+ interface SiteFooterLink {
210
+ href: string;
211
+ label: string;
212
+ }
213
+ interface SiteFooterProps {
214
+ /** The tenant's brand name, shown in the copyright line. */
215
+ brandName: string;
216
+ /** The tenant's own page links. The row is omitted when empty. */
217
+ links?: readonly SiteFooterLink[];
218
+ /** Legal links. Defaults to the trio every spawned tenant ships (DEV-7232). */
219
+ legal?: readonly SiteFooterLink[];
220
+ /**
221
+ * The platform's white-label switch (`branding.powered_by_reeve`, DEV-7233).
222
+ * Fail-closed: the badge renders unless this is the literal `false`, so a
223
+ * failed fetch, an absent field or a malformed value all keep it on.
224
+ */
225
+ showBadge?: unknown;
226
+ /**
227
+ * Link renderer for `links` and `legal`. Defaults to a bare `"a"`; pass
228
+ * your router's link (e.g. `next/link`) for client-side navigation. The
229
+ * badge is an external link and always renders a plain `<a>`.
230
+ */
231
+ linkComponent?: ElementType;
232
+ className?: string;
233
+ }
234
+ declare const DEFAULT_LEGAL_LINKS: readonly SiteFooterLink[];
235
+ /**
236
+ * SiteFooter (DEV-15467) — the one footer every tenant site renders.
237
+ *
238
+ * Spawned tenant repos are frozen copies of the template, so a footer edit in
239
+ * the template never reaches a live tenant. Shipping the footer from this
240
+ * package means a footer change reaches every tenant as a version bump.
241
+ *
242
+ * A tenant's end member sees only the tenant's brand (epic DEV-15189). The one
243
+ * allowed Reeve mention is the small "Made with Reeve" badge; nothing else in
244
+ * this component may name Reeve, and `site-footer.test.tsx` pins that.
245
+ *
246
+ * Markup follows the template's (marketing) layout footer: an optional tenant
247
+ * nav row, then copyright, the legal nav and the badge. Every link carries the
248
+ * 44px touch-target floor inline (DEV-9652), so it holds even when the host's
249
+ * Tailwind build does not scan this package.
250
+ */
251
+ declare function SiteFooter({ brandName, links, legal, showBadge, linkComponent, className, }: SiteFooterProps): react.JSX.Element;
252
+
209
253
  interface InfoTipProps {
210
254
  /** The explanation the tip reveals. Keep it to a sentence or two. */
211
255
  children: ReactNode;
@@ -955,4 +999,4 @@ interface ConnectorPickerProps {
955
999
  }
956
1000
  declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
957
1001
 
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 };
1002
+ 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
@@ -206,6 +206,50 @@ declare function ResponsiveHeader({ brand, search, nav, brandHref, linkComponent
206
206
  */
207
207
  declare function useResponsivePlaceholder(desktop: string, mobile?: string): string;
208
208
 
209
+ interface SiteFooterLink {
210
+ href: string;
211
+ label: string;
212
+ }
213
+ interface SiteFooterProps {
214
+ /** The tenant's brand name, shown in the copyright line. */
215
+ brandName: string;
216
+ /** The tenant's own page links. The row is omitted when empty. */
217
+ links?: readonly SiteFooterLink[];
218
+ /** Legal links. Defaults to the trio every spawned tenant ships (DEV-7232). */
219
+ legal?: readonly SiteFooterLink[];
220
+ /**
221
+ * The platform's white-label switch (`branding.powered_by_reeve`, DEV-7233).
222
+ * Fail-closed: the badge renders unless this is the literal `false`, so a
223
+ * failed fetch, an absent field or a malformed value all keep it on.
224
+ */
225
+ showBadge?: unknown;
226
+ /**
227
+ * Link renderer for `links` and `legal`. Defaults to a bare `"a"`; pass
228
+ * your router's link (e.g. `next/link`) for client-side navigation. The
229
+ * badge is an external link and always renders a plain `<a>`.
230
+ */
231
+ linkComponent?: ElementType;
232
+ className?: string;
233
+ }
234
+ declare const DEFAULT_LEGAL_LINKS: readonly SiteFooterLink[];
235
+ /**
236
+ * SiteFooter (DEV-15467) — the one footer every tenant site renders.
237
+ *
238
+ * Spawned tenant repos are frozen copies of the template, so a footer edit in
239
+ * the template never reaches a live tenant. Shipping the footer from this
240
+ * package means a footer change reaches every tenant as a version bump.
241
+ *
242
+ * A tenant's end member sees only the tenant's brand (epic DEV-15189). The one
243
+ * allowed Reeve mention is the small "Made with Reeve" badge; nothing else in
244
+ * this component may name Reeve, and `site-footer.test.tsx` pins that.
245
+ *
246
+ * Markup follows the template's (marketing) layout footer: an optional tenant
247
+ * nav row, then copyright, the legal nav and the badge. Every link carries the
248
+ * 44px touch-target floor inline (DEV-9652), so it holds even when the host's
249
+ * Tailwind build does not scan this package.
250
+ */
251
+ declare function SiteFooter({ brandName, links, legal, showBadge, linkComponent, className, }: SiteFooterProps): react.JSX.Element;
252
+
209
253
  interface InfoTipProps {
210
254
  /** The explanation the tip reveals. Keep it to a sentence or two. */
211
255
  children: ReactNode;
@@ -955,4 +999,4 @@ interface ConnectorPickerProps {
955
999
  }
956
1000
  declare function ConnectorPicker({ client, purpose, lens, layout, onConnected, }: ConnectorPickerProps): react.JSX.Element | null;
957
1001
 
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 };
1002
+ 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 };