@upbound/monarch-blocks 0.14.0 → 0.15.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.
@@ -53,7 +53,13 @@ function PageHeaderTitle(_a) {
53
53
  }
54
54
  function PageHeaderDescription(_a) {
55
55
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
56
- return /* @__PURE__ */ jsx("p", __spreadValues({ "data-slot": "page-header-description", className: cn("text-body text-muted-foreground", className) }, props));
56
+ return /* @__PURE__ */ jsx(
57
+ "p",
58
+ __spreadValues({
59
+ "data-slot": "page-header-description",
60
+ className: cn("text-body text-muted-foreground max-w-160", className)
61
+ }, props)
62
+ );
57
63
  }
58
64
  function PageHeaderMeta(_a) {
59
65
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/lib/utils.ts","../src/page-header.tsx"],"sourcesContent":["export { cn } from '@upbound/monarch-core/utils';\n\nexport function sortBy<T>(items: T[], getKey: (item: T) => string): T[] {\n return [...items].sort((a, b) => getKey(a).localeCompare(getKey(b)));\n}\n","import { cn } from '@/lib/utils';\n\nfunction PageHeader({ className, children, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"page-header\" className={cn('flex w-full items-start justify-between gap-4', className)} {...props}>\n {children}\n </div>\n );\n}\n\nfunction PageHeaderAvatar({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-avatar\" className={cn('shrink-0 self-center', className)} {...props} />;\n}\n\nfunction PageHeaderContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-content\" className={cn('flex flex-1 flex-col gap-1', className)} {...props} />;\n}\n\nfunction PageHeaderTitle({ className, ...props }: React.ComponentProps<'h1'>) {\n return <h1 data-slot=\"page-header-title\" className={cn('text-h1 text-foreground', className)} {...props} />;\n}\n\nfunction PageHeaderDescription({ className, ...props }: React.ComponentProps<'p'>) {\n return (\n <p data-slot=\"page-header-description\" className={cn('text-body text-muted-foreground', className)} {...props} />\n );\n}\n\nfunction PageHeaderMeta({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"page-header-meta\"\n className={cn(\n 'text-body text-muted-foreground flex flex-wrap items-center gap-4',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--icon-default)\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction PageHeaderActions({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-actions\" className={cn('flex items-center gap-2', className)} {...props} />;\n}\n\nfunction PageHeaderTabs({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-tabs\" className={cn('border-b', className)} {...props} />;\n}\n\nexport {\n PageHeader,\n PageHeaderAvatar,\n PageHeaderContent,\n PageHeaderTitle,\n PageHeaderDescription,\n PageHeaderMeta,\n PageHeaderActions,\n PageHeaderTabs,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU;;;ACIf;AAFJ,SAAS,WAAW,IAAgE;AAAhE,eAAE,aAAW,SAFjC,IAEoB,IAA0B,kBAA1B,IAA0B,CAAxB,aAAW;AAC/B,SACE,oBAAC,sCAAI,aAAU,eAAc,WAAW,GAAG,iDAAiD,SAAS,KAAO,QAA3G,EACE,WACH;AAEJ;AAEA,SAAS,iBAAiB,IAAsD;AAAtD,eAAE,YAV5B,IAU0B,IAAgB,kBAAhB,IAAgB,CAAd;AAC1B,SAAO,oBAAC,wBAAI,aAAU,sBAAqB,WAAW,GAAG,wBAAwB,SAAS,KAAO,MAAO;AAC1G;AAEA,SAAS,kBAAkB,IAAsD;AAAtD,eAAE,YAd7B,IAc2B,IAAgB,kBAAhB,IAAgB,CAAd;AAC3B,SAAO,oBAAC,wBAAI,aAAU,uBAAsB,WAAW,GAAG,8BAA8B,SAAS,KAAO,MAAO;AACjH;AAEA,SAAS,gBAAgB,IAAqD;AAArD,eAAE,YAlB3B,IAkByB,IAAgB,kBAAhB,IAAgB,CAAd;AACzB,SAAO,oBAAC,uBAAG,aAAU,qBAAoB,WAAW,GAAG,2BAA2B,SAAS,KAAO,MAAO;AAC3G;AAEA,SAAS,sBAAsB,IAAoD;AAApD,eAAE,YAtBjC,IAsB+B,IAAgB,kBAAhB,IAAgB,CAAd;AAC/B,SACE,oBAAC,sBAAE,aAAU,2BAA0B,WAAW,GAAG,mCAAmC,SAAS,KAAO,MAAO;AAEnH;AAEA,SAAS,eAAe,IAAsD;AAAtD,eAAE,YA5B1B,IA4BwB,IAAgB,kBAAhB,IAAgB,CAAd;AACxB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,OACI;AAAA,EACN;AAEJ;AAEA,SAAS,kBAAkB,IAAsD;AAAtD,eAAE,YA1C7B,IA0C2B,IAAgB,kBAAhB,IAAgB,CAAd;AAC3B,SAAO,oBAAC,wBAAI,aAAU,uBAAsB,WAAW,GAAG,2BAA2B,SAAS,KAAO,MAAO;AAC9G;AAEA,SAAS,eAAe,IAAsD;AAAtD,eAAE,YA9C1B,IA8CwB,IAAgB,kBAAhB,IAAgB,CAAd;AACxB,SAAO,oBAAC,wBAAI,aAAU,oBAAmB,WAAW,GAAG,YAAY,SAAS,KAAO,MAAO;AAC5F;","names":[]}
1
+ {"version":3,"sources":["../src/lib/utils.ts","../src/page-header.tsx"],"sourcesContent":["export { cn } from '@upbound/monarch-core/utils';\n\nexport function sortBy<T>(items: T[], getKey: (item: T) => string): T[] {\n return [...items].sort((a, b) => getKey(a).localeCompare(getKey(b)));\n}\n","import { cn } from '@/lib/utils';\n\nfunction PageHeader({ className, children, ...props }: React.ComponentProps<'div'>) {\n return (\n <div data-slot=\"page-header\" className={cn('flex w-full items-start justify-between gap-4', className)} {...props}>\n {children}\n </div>\n );\n}\n\nfunction PageHeaderAvatar({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-avatar\" className={cn('shrink-0 self-center', className)} {...props} />;\n}\n\nfunction PageHeaderContent({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-content\" className={cn('flex flex-1 flex-col gap-1', className)} {...props} />;\n}\n\nfunction PageHeaderTitle({ className, ...props }: React.ComponentProps<'h1'>) {\n return <h1 data-slot=\"page-header-title\" className={cn('text-h1 text-foreground', className)} {...props} />;\n}\n\nfunction PageHeaderDescription({ className, ...props }: React.ComponentProps<'p'>) {\n // Capped at 640px so a long description wraps at a readable line length on wide pages.\n return (\n <p\n data-slot=\"page-header-description\"\n className={cn('text-body text-muted-foreground max-w-160', className)}\n {...props}\n />\n );\n}\n\nfunction PageHeaderMeta({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"page-header-meta\"\n className={cn(\n 'text-body text-muted-foreground flex flex-wrap items-center gap-4',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-(--icon-default)\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction PageHeaderActions({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-actions\" className={cn('flex items-center gap-2', className)} {...props} />;\n}\n\nfunction PageHeaderTabs({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"page-header-tabs\" className={cn('border-b', className)} {...props} />;\n}\n\nexport {\n PageHeader,\n PageHeaderAvatar,\n PageHeaderContent,\n PageHeaderTitle,\n PageHeaderDescription,\n PageHeaderMeta,\n PageHeaderActions,\n PageHeaderTabs,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU;;;ACIf;AAFJ,SAAS,WAAW,IAAgE;AAAhE,eAAE,aAAW,SAFjC,IAEoB,IAA0B,kBAA1B,IAA0B,CAAxB,aAAW;AAC/B,SACE,oBAAC,sCAAI,aAAU,eAAc,WAAW,GAAG,iDA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AACxB,SAAO,oBAAC,wBAAI,aAAU,oBAAmB,WAAW,GAAG,YAAY,SAAS,KAAO,MAAO;AAC5F;","names":[]}
@@ -19,9 +19,9 @@ interface RelativeTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElemen
19
19
  }
20
20
  /**
21
21
  * Displays a timestamp as a live-updating relative string ("5 minutes ago",
22
- * "yesterday", "on Nov 18") with the absolute date in a tooltip.
22
+ * "yesterday", "Nov 18") with the absolute date in a tooltip.
23
23
  *
24
- * Falls back to an absolute "on [Month Day]" format for dates older than 30 days
24
+ * Falls back to an absolute "[Month Day]" format for dates older than 30 days
25
25
  * so that stale timestamps remain legible at a glance.
26
26
  *
27
27
  * @see https://design.upbound.io/components/date-and-time
@@ -67,7 +67,7 @@ function formatRelativeDefault(date, locale) {
67
67
  if (hrs2 < 24) return `in ${hrs2} hour${hrs2 === 1 ? "" : "s"}`;
68
68
  if (days2 < 7) return `in ${days2} day${days2 === 1 ? "" : "s"}`;
69
69
  if (days2 < 30) return `in ${Math.floor(days2 / 7)} week${Math.floor(days2 / 7) === 1 ? "" : "s"}`;
70
- return `on ${date.toLocaleDateString(locale, __spreadValues({
70
+ return `${date.toLocaleDateString(locale, __spreadValues({
71
71
  month: "short",
72
72
  day: "numeric"
73
73
  }, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
@@ -83,7 +83,7 @@ function formatRelativeDefault(date, locale) {
83
83
  if (days < 7) return `${days} days ago`;
84
84
  if (days < 14) return "last week";
85
85
  if (days < 30) return `${Math.floor(days / 7)} weeks ago`;
86
- return `on ${date.toLocaleDateString(locale, __spreadValues({
86
+ return `${date.toLocaleDateString(locale, __spreadValues({
87
87
  month: "short",
88
88
  day: "numeric"
89
89
  }, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
@@ -101,7 +101,7 @@ function formatRelativeCompact(date, locale) {
101
101
  if (hrs2 < 24) return `in ${hrs2}h`;
102
102
  if (days2 < 7) return `in ${days2}d`;
103
103
  if (days2 < 30) return `in ${Math.floor(days2 / 7)}w`;
104
- return `on ${date.toLocaleDateString(locale, __spreadValues({
104
+ return `${date.toLocaleDateString(locale, __spreadValues({
105
105
  month: "short",
106
106
  day: "numeric"
107
107
  }, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
@@ -115,7 +115,7 @@ function formatRelativeCompact(date, locale) {
115
115
  if (hrs < 24) return `${hrs}h ago`;
116
116
  if (days < 7) return `${days}d ago`;
117
117
  if (days < 30) return `${Math.floor(days / 7)}w ago`;
118
- return `on ${date.toLocaleDateString(locale, __spreadValues({
118
+ return `${date.toLocaleDateString(locale, __spreadValues({
119
119
  month: "short",
120
120
  day: "numeric"
121
121
  }, date.getFullYear() !== now.getFullYear() ? { year: "numeric" } : {}))}`;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/relative-time.tsx","../src/lib/utils.ts","../src/hooks/use-mounted.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@upbound/monarch-core';\nimport { cn } from '@/lib/utils';\nimport { useMounted } from '@/hooks/use-mounted';\n\n// ── Format helpers ─────────────────────────────────────────────────────────────\n//\n// `locale` is `undefined` (browser/runtime default — the viewer's actual\n// locale, per Monarch's \"use locale-aware formatting\" content principle) once\n// mounted client-side, and a fixed `'en-US'` for the server-rendered/first-\n// paint value — the server can't know the viewer's locale ahead of time, and\n// passing a locale that differs between server and client render would\n// hydration-mismatch. Callers gate this via `useMounted()` below, so the\n// locale-aware value replaces the fixed one right after mount (see\n// RelativeTime/AbsoluteTimestamp).\n\n/** Returns a human-readable relative label for `date` vs now. */\nfunction formatRelativeDefault(date: Date, locale: string | undefined): string {\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n\n // Future dates\n if (diffMs < 0) {\n const abs = Math.abs(diffMs);\n const mins = Math.floor(abs / 60000);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n if (abs < 60000) return 'just now';\n if (mins < 60) return `in ${mins} minute${mins === 1 ? '' : 's'}`;\n if (hrs < 24) return `in ${hrs} hour${hrs === 1 ? '' : 's'}`;\n if (days < 7) return `in ${days} day${days === 1 ? '' : 's'}`;\n if (days < 30) return `in ${Math.floor(days / 7)} week${Math.floor(days / 7) === 1 ? '' : 's'}`;\n return `on ${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n }\n\n // Past dates\n const secs = Math.floor(diffMs / 1000);\n const mins = Math.floor(secs / 60);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n\n if (secs < 60) return 'just now';\n if (mins < 60) return `${mins} minute${mins === 1 ? '' : 's'} ago`;\n if (hrs < 24) return `${hrs} hour${hrs === 1 ? '' : 's'} ago`;\n if (days === 1) return 'yesterday';\n if (days < 7) return `${days} days ago`;\n if (days < 14) return 'last week';\n if (days < 30) return `${Math.floor(days / 7)} weeks ago`;\n\n // > 30 days: fall back to absolute date\n return `on ${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n}\n\n/**\n * Compact relative label — abbreviates units for tight horizontal space\n * (tables, KPI cards). Preserves \"ago\", \"in\", \"on\", and \"just now\" so\n * directionality and reference points stay legible at a glance.\n */\nfunction formatRelativeCompact(date: Date, locale: string | undefined): string {\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n\n // Future dates\n if (diffMs < 0) {\n const abs = Math.abs(diffMs);\n const mins = Math.floor(abs / 60000);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n if (abs < 60000) return 'just now';\n if (mins < 60) return `in ${mins}m`;\n if (hrs < 24) return `in ${hrs}h`;\n if (days < 7) return `in ${days}d`;\n if (days < 30) return `in ${Math.floor(days / 7)}w`;\n return `on ${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n }\n\n // Past dates\n const secs = Math.floor(diffMs / 1000);\n const mins = Math.floor(secs / 60);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n\n if (secs < 60) return 'just now';\n if (mins < 60) return `${mins}m ago`;\n if (hrs < 24) return `${hrs}h ago`;\n if (days < 7) return `${days}d ago`;\n if (days < 30) return `${Math.floor(days / 7)}w ago`;\n\n return `on ${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n}\n\nfunction formatRelative(date: Date, variant: 'default' | 'compact', locale: string | undefined): string {\n return variant === 'compact' ? formatRelativeCompact(date, locale) : formatRelativeDefault(date, locale);\n}\n\n/** Returns the update interval in ms appropriate for the current age. */\nfunction updateInterval(date: Date): number {\n const diffMs = Math.abs(Date.now() - date.getTime());\n const diffMin = diffMs / 60000;\n if (diffMin < 60) return 60_000; // update every minute while < 1 hour old\n if (diffMin < 1440) return 300_000; // every 5 min while < 1 day old\n return 3_600_000; // every hour otherwise\n}\n\n/** Formats an absolute tooltip title. */\nfunction absoluteTitle(date: Date, locale: string | undefined): string {\n return date.toLocaleString(locale, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short',\n });\n}\n\n// ── Component ──────────────────────────────────────────────────────────────────\n\nexport interface RelativeTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime' | 'title'> {\n /**\n * The timestamp to display. Accepts a `Date`, ISO string, or unix milliseconds.\n */\n date: Date | string | number;\n /**\n * Format variant. `default` produces full-word output (\"5 minutes ago\",\n * \"yesterday\"). `compact` abbreviates units (\"5m ago\", \"1d ago\") for tight\n * horizontal space like tables, KPI cards, or inline metadata.\n */\n variant?: 'default' | 'compact';\n /**\n * Override the tooltip shown on hover. Defaults to the full localized\n * absolute date-time string (e.g. \"Monday, January 20, 2025 at 3:22 PM PST\").\n */\n title?: string;\n}\n\n/**\n * Displays a timestamp as a live-updating relative string (\"5 minutes ago\",\n * \"yesterday\", \"on Nov 18\") with the absolute date in a tooltip.\n *\n * Falls back to an absolute \"on [Month Day]\" format for dates older than 30 days\n * so that stale timestamps remain legible at a glance.\n *\n * @see https://design.upbound.io/components/date-and-time\n */\nexport function RelativeTime({ date, variant = 'default', title, className, ...props }: RelativeTimeProps) {\n const d = React.useMemo(() => new Date(date), [date]);\n const mounted = useMounted();\n // Fixed locale for the server-rendered/first-paint value (the server can't\n // know the viewer's locale); the viewer's actual locale once mounted.\n const locale = mounted ? undefined : 'en-US';\n\n const [label, setLabel] = React.useState<string>(() => formatRelative(d, variant, locale));\n\n React.useEffect(() => {\n // Re-compute immediately on mount (picks up the viewer's real locale, and\n // avoids the relative label going stale)\n setLabel(formatRelative(d, variant, locale));\n\n const schedule = () => {\n const id = window.setInterval(() => {\n setLabel(formatRelative(d, variant, locale));\n }, updateInterval(d));\n return id;\n };\n const id = schedule();\n return () => window.clearInterval(id);\n }, [d, variant, locale]);\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <time dateTime={d.toISOString()} className={cn('tabular-nums', className)} {...props}>\n {label}\n </time>\n </TooltipTrigger>\n <TooltipContent>{title ?? absoluteTitle(d, locale)}</TooltipContent>\n </Tooltip>\n );\n}\n\n// ── Absolute Timestamp ────────────────────────────────────────────────────────\n\n/** Formats am/pm per Content Principles: lowercase, space before, no periods. */\nfunction formatAmPm(date: Date, options: Intl.DateTimeFormatOptions, locale: string | undefined): string {\n const parts = new Intl.DateTimeFormat(locale, options).formatToParts(date);\n let result = '';\n for (const part of parts) {\n if (part.type === 'dayPeriod') {\n result += part.value.toLowerCase().replace(/\\./g, '');\n } else {\n result += part.value;\n }\n }\n return result;\n}\n\nfunction formatAbsolute(date: Date, variant: string, end: Date | undefined, locale: string | undefined): string {\n switch (variant) {\n case 'deadline': {\n const weekday = date.toLocaleDateString(locale, { weekday: 'short' });\n const datePart = date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const timePart = formatAmPm(date, { hour: 'numeric', minute: '2-digit' }, locale);\n const tz = date.toLocaleTimeString(locale, { timeZoneName: 'short' }).split(' ').pop() ?? '';\n return `${weekday}, ${datePart} \\u00b7 ${timePart} ${tz}`;\n }\n case 'log': {\n const datePart = date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const timePart = formatAmPm(date, { hour: 'numeric', minute: '2-digit' }, locale);\n const tz = date.toLocaleTimeString(locale, { timeZoneName: 'short' }).split(' ').pop() ?? '';\n return `${datePart}, ${timePart} ${tz}`;\n }\n case 'range': {\n if (!end) return date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const startYear = date.getFullYear();\n const endYear = end.getFullYear();\n if (startYear === endYear) {\n const start = date.toLocaleDateString(locale, { month: 'short', day: 'numeric' });\n const endStr = end.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n return `${start} \\u2013 ${endStr}`;\n }\n const start = date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const endStr = end.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n return `${start} \\u2013 ${endStr}`;\n }\n case 'date':\n default:\n return date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n }\n}\n\nexport interface AbsoluteTimestampProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** The timestamp to display. */\n date: Date | string | number;\n /** Format variant matching the Content Principles absolute timestamp table. */\n variant?: 'deadline' | 'log' | 'date' | 'range';\n /** End date for range variant. */\n end?: Date | string | number;\n}\n\n/**\n * Formats a date as an absolute timestamp following the Content Principles.\n * Use for deadlines, certificate expiry, audit logs, and date-only displays.\n */\nexport function AbsoluteTimestamp({ date, variant = 'date', end, className, ...props }: AbsoluteTimestampProps) {\n const d = React.useMemo(() => new Date(date), [date]);\n const e = React.useMemo(() => (end ? new Date(end) : undefined), [end]);\n const mounted = useMounted();\n // Fixed locale for the server-rendered/first-paint value (the server can't\n // know the viewer's locale); the viewer's actual locale once mounted.\n const locale = mounted ? undefined : 'en-US';\n\n return (\n <time\n dateTime={d.toISOString()}\n title={absoluteTitle(d, locale)}\n className={cn('tabular-nums', className)}\n {...props}\n >\n {formatAbsolute(d, variant, e, locale)}\n </time>\n );\n}\n\n// ── Elapsed Time ──────────────────────────────────────────────────────────────\n\nfunction formatElapsed(totalSeconds: number, variant: string): string {\n const days = Math.floor(totalSeconds / 86400);\n const hours = Math.floor((totalSeconds % 86400) / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = Math.floor(totalSeconds % 60);\n\n switch (variant) {\n case 'expanded': {\n const parts: string[] = [];\n if (days > 0) parts.push(`${days} day${days === 1 ? '' : 's'}`);\n if (hours > 0) parts.push(`${hours} hour${hours === 1 ? '' : 's'}`);\n if (minutes > 0) parts.push(`${minutes} minute${minutes === 1 ? '' : 's'}`);\n if (seconds > 0 || parts.length === 0) parts.push(`${seconds} second${seconds === 1 ? '' : 's'}`);\n return parts.join(', ');\n }\n case 'long': {\n if (days > 0) return `${days}d ${hours}h`;\n if (hours > 0) return `${hours}h ${minutes}m`;\n return `${minutes}m`;\n }\n case 'compact':\n default: {\n if (days > 0) return `${days}d ${hours}h`;\n if (hours > 0) return `${hours}h ${minutes}m ${seconds}s`;\n if (minutes > 0) return `${minutes}m ${seconds}s`;\n return `${seconds}s`;\n }\n }\n}\n\nexport interface ElapsedTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** Total elapsed seconds. Ignored if startedAt is provided. */\n seconds?: number;\n /** Format variant matching the Content Principles elapsed time table. */\n variant?: 'compact' | 'expanded' | 'long';\n /** Live-tick every second for active operations. */\n live?: boolean;\n /** Compute elapsed from a start time instead of a fixed seconds value. */\n startedAt?: Date | string | number;\n}\n\n/**\n * Formats a duration as elapsed time following the Content Principles.\n * Use for reconciliation loops, build jobs, health checks, and running operations.\n */\nexport function ElapsedTime({\n seconds: secondsProp,\n variant = 'compact',\n live = false,\n startedAt,\n className,\n ...props\n}: ElapsedTimeProps) {\n const startDate = React.useMemo(() => (startedAt ? new Date(startedAt) : undefined), [startedAt]);\n\n const computeSeconds = React.useCallback(() => {\n if (startDate) return Math.floor((Date.now() - startDate.getTime()) / 1000);\n return secondsProp ?? 0;\n }, [startDate, secondsProp]);\n\n const [elapsed, setElapsed] = React.useState(computeSeconds);\n\n React.useEffect(() => {\n setElapsed(computeSeconds());\n\n if (!live && !startDate) return;\n\n const id = window.setInterval(() => {\n setElapsed(computeSeconds());\n }, 1000);\n return () => window.clearInterval(id);\n }, [live, startDate, computeSeconds]);\n\n const iso = `PT${elapsed}S`;\n\n return (\n <time dateTime={iso} className={cn('tabular-nums', className)} {...props}>\n {formatElapsed(elapsed, variant)}\n </time>\n );\n}\n","export { cn } from '@upbound/monarch-core/utils';\n\nexport function sortBy<T>(items: T[], getKey: (item: T) => string): T[] {\n return [...items].sort((a, b) => getKey(a).localeCompare(getKey(b)));\n}\n","import { useSyncExternalStore } from 'react';\n\nfunction subscribe() {\n return () => {};\n}\n\n/**\n * Returns `false` on the server and during initial client hydration, then\n * `true` once mounted — for values that are only valid client-side (e.g. the\n * viewer's actual `Intl` locale, vs. a fixed locale used for the server-\n * rendered/first-paint value) without a hydration mismatch. Implemented via\n * `useSyncExternalStore` rather than `useEffect` + `setState` — the latter\n * works, but re-derives the same \"true\" value on every mount and trips\n * `react-hooks/set-state-in-effect` since there's no actual subscription.\n */\nexport function useMounted() {\n return useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,SAAS,gBAAgB,sBAAsB;;;ACHxD,SAAS,UAAU;;;ACAnB,SAAS,4BAA4B;AAErC,SAAS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pB,eAAW,eAAe,CAAC;AAE3B,QAAI,CAAC,QAAQ,CAAC,UAAW;AAEzB,UAAM,KAAK,OAAO,YAAY,MAAM;AAClC,iBAAW,eAAe,CAAC;AAAA,IAC7B,GAAG,GAAI;AACP,WAAO,MAAM,OAAO,cAAc,EAAE;AAAA,EACtC,GAAG,CAAC,MAAM,WAAW,cAAc,CAAC;AAEpC,QAAM,MAAM,KAAK,OAAO;AAExB,SACE,oBAAC,uCAAK,UAAU,KAAK,WAAW,GAAG,gBAAgB,SAAS,KAAO,QAAlE,EACE,wBAAc,SAAS,OAAO,IACjC;AAEJ;","names":["mins","hrs","days","id","start","endStr"]}
1
+ {"version":3,"sources":["../src/relative-time.tsx","../src/lib/utils.ts","../src/hooks/use-mounted.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@upbound/monarch-core';\nimport { cn } from '@/lib/utils';\nimport { useMounted } from '@/hooks/use-mounted';\n\n// ── Format helpers ─────────────────────────────────────────────────────────────\n//\n// `locale` is `undefined` (browser/runtime default — the viewer's actual\n// locale, per Monarch's \"use locale-aware formatting\" content principle) once\n// mounted client-side, and a fixed `'en-US'` for the server-rendered/first-\n// paint value — the server can't know the viewer's locale ahead of time, and\n// passing a locale that differs between server and client render would\n// hydration-mismatch. Callers gate this via `useMounted()` below, so the\n// locale-aware value replaces the fixed one right after mount (see\n// RelativeTime/AbsoluteTimestamp).\n\n/** Returns a human-readable relative label for `date` vs now. */\nfunction formatRelativeDefault(date: Date, locale: string | undefined): string {\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n\n // Future dates\n if (diffMs < 0) {\n const abs = Math.abs(diffMs);\n const mins = Math.floor(abs / 60000);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n if (abs < 60000) return 'just now';\n if (mins < 60) return `in ${mins} minute${mins === 1 ? '' : 's'}`;\n if (hrs < 24) return `in ${hrs} hour${hrs === 1 ? '' : 's'}`;\n if (days < 7) return `in ${days} day${days === 1 ? '' : 's'}`;\n if (days < 30) return `in ${Math.floor(days / 7)} week${Math.floor(days / 7) === 1 ? '' : 's'}`;\n return `${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n }\n\n // Past dates\n const secs = Math.floor(diffMs / 1000);\n const mins = Math.floor(secs / 60);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n\n if (secs < 60) return 'just now';\n if (mins < 60) return `${mins} minute${mins === 1 ? '' : 's'} ago`;\n if (hrs < 24) return `${hrs} hour${hrs === 1 ? '' : 's'} ago`;\n if (days === 1) return 'yesterday';\n if (days < 7) return `${days} days ago`;\n if (days < 14) return 'last week';\n if (days < 30) return `${Math.floor(days / 7)} weeks ago`;\n\n // > 30 days: fall back to absolute date\n return `${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n}\n\n/**\n * Compact relative label — abbreviates units for tight horizontal space\n * (tables, KPI cards). Preserves \"ago\", \"in\", and \"just now\" so\n * directionality and reference points stay legible at a glance.\n */\nfunction formatRelativeCompact(date: Date, locale: string | undefined): string {\n const now = new Date();\n const diffMs = now.getTime() - date.getTime();\n\n // Future dates\n if (diffMs < 0) {\n const abs = Math.abs(diffMs);\n const mins = Math.floor(abs / 60000);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n if (abs < 60000) return 'just now';\n if (mins < 60) return `in ${mins}m`;\n if (hrs < 24) return `in ${hrs}h`;\n if (days < 7) return `in ${days}d`;\n if (days < 30) return `in ${Math.floor(days / 7)}w`;\n return `${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n }\n\n // Past dates\n const secs = Math.floor(diffMs / 1000);\n const mins = Math.floor(secs / 60);\n const hrs = Math.floor(mins / 60);\n const days = Math.floor(hrs / 24);\n\n if (secs < 60) return 'just now';\n if (mins < 60) return `${mins}m ago`;\n if (hrs < 24) return `${hrs}h ago`;\n if (days < 7) return `${days}d ago`;\n if (days < 30) return `${Math.floor(days / 7)}w ago`;\n\n return `${date.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n ...(date.getFullYear() !== now.getFullYear() ? { year: 'numeric' } : {}),\n })}`;\n}\n\nfunction formatRelative(date: Date, variant: 'default' | 'compact', locale: string | undefined): string {\n return variant === 'compact' ? formatRelativeCompact(date, locale) : formatRelativeDefault(date, locale);\n}\n\n/** Returns the update interval in ms appropriate for the current age. */\nfunction updateInterval(date: Date): number {\n const diffMs = Math.abs(Date.now() - date.getTime());\n const diffMin = diffMs / 60000;\n if (diffMin < 60) return 60_000; // update every minute while < 1 hour old\n if (diffMin < 1440) return 300_000; // every 5 min while < 1 day old\n return 3_600_000; // every hour otherwise\n}\n\n/** Formats an absolute tooltip title. */\nfunction absoluteTitle(date: Date, locale: string | undefined): string {\n return date.toLocaleString(locale, {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n hour: 'numeric',\n minute: '2-digit',\n timeZoneName: 'short',\n });\n}\n\n// ── Component ──────────────────────────────────────────────────────────────────\n\nexport interface RelativeTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime' | 'title'> {\n /**\n * The timestamp to display. Accepts a `Date`, ISO string, or unix milliseconds.\n */\n date: Date | string | number;\n /**\n * Format variant. `default` produces full-word output (\"5 minutes ago\",\n * \"yesterday\"). `compact` abbreviates units (\"5m ago\", \"1d ago\") for tight\n * horizontal space like tables, KPI cards, or inline metadata.\n */\n variant?: 'default' | 'compact';\n /**\n * Override the tooltip shown on hover. Defaults to the full localized\n * absolute date-time string (e.g. \"Monday, January 20, 2025 at 3:22 PM PST\").\n */\n title?: string;\n}\n\n/**\n * Displays a timestamp as a live-updating relative string (\"5 minutes ago\",\n * \"yesterday\", \"Nov 18\") with the absolute date in a tooltip.\n *\n * Falls back to an absolute \"[Month Day]\" format for dates older than 30 days\n * so that stale timestamps remain legible at a glance.\n *\n * @see https://design.upbound.io/components/date-and-time\n */\nexport function RelativeTime({ date, variant = 'default', title, className, ...props }: RelativeTimeProps) {\n const d = React.useMemo(() => new Date(date), [date]);\n const mounted = useMounted();\n // Fixed locale for the server-rendered/first-paint value (the server can't\n // know the viewer's locale); the viewer's actual locale once mounted.\n const locale = mounted ? undefined : 'en-US';\n\n const [label, setLabel] = React.useState<string>(() => formatRelative(d, variant, locale));\n\n React.useEffect(() => {\n // Re-compute immediately on mount (picks up the viewer's real locale, and\n // avoids the relative label going stale)\n setLabel(formatRelative(d, variant, locale));\n\n const schedule = () => {\n const id = window.setInterval(() => {\n setLabel(formatRelative(d, variant, locale));\n }, updateInterval(d));\n return id;\n };\n const id = schedule();\n return () => window.clearInterval(id);\n }, [d, variant, locale]);\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <time dateTime={d.toISOString()} className={cn('tabular-nums', className)} {...props}>\n {label}\n </time>\n </TooltipTrigger>\n <TooltipContent>{title ?? absoluteTitle(d, locale)}</TooltipContent>\n </Tooltip>\n );\n}\n\n// ── Absolute Timestamp ────────────────────────────────────────────────────────\n\n/** Formats am/pm per Content Principles: lowercase, space before, no periods. */\nfunction formatAmPm(date: Date, options: Intl.DateTimeFormatOptions, locale: string | undefined): string {\n const parts = new Intl.DateTimeFormat(locale, options).formatToParts(date);\n let result = '';\n for (const part of parts) {\n if (part.type === 'dayPeriod') {\n result += part.value.toLowerCase().replace(/\\./g, '');\n } else {\n result += part.value;\n }\n }\n return result;\n}\n\nfunction formatAbsolute(date: Date, variant: string, end: Date | undefined, locale: string | undefined): string {\n switch (variant) {\n case 'deadline': {\n const weekday = date.toLocaleDateString(locale, { weekday: 'short' });\n const datePart = date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const timePart = formatAmPm(date, { hour: 'numeric', minute: '2-digit' }, locale);\n const tz = date.toLocaleTimeString(locale, { timeZoneName: 'short' }).split(' ').pop() ?? '';\n return `${weekday}, ${datePart} \\u00b7 ${timePart} ${tz}`;\n }\n case 'log': {\n const datePart = date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const timePart = formatAmPm(date, { hour: 'numeric', minute: '2-digit' }, locale);\n const tz = date.toLocaleTimeString(locale, { timeZoneName: 'short' }).split(' ').pop() ?? '';\n return `${datePart}, ${timePart} ${tz}`;\n }\n case 'range': {\n if (!end) return date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const startYear = date.getFullYear();\n const endYear = end.getFullYear();\n if (startYear === endYear) {\n const start = date.toLocaleDateString(locale, { month: 'short', day: 'numeric' });\n const endStr = end.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n return `${start} \\u2013 ${endStr}`;\n }\n const start = date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n const endStr = end.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n return `${start} \\u2013 ${endStr}`;\n }\n case 'date':\n default:\n return date.toLocaleDateString(locale, { month: 'short', day: 'numeric', year: 'numeric' });\n }\n}\n\nexport interface AbsoluteTimestampProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** The timestamp to display. */\n date: Date | string | number;\n /** Format variant matching the Content Principles absolute timestamp table. */\n variant?: 'deadline' | 'log' | 'date' | 'range';\n /** End date for range variant. */\n end?: Date | string | number;\n}\n\n/**\n * Formats a date as an absolute timestamp following the Content Principles.\n * Use for deadlines, certificate expiry, audit logs, and date-only displays.\n */\nexport function AbsoluteTimestamp({ date, variant = 'date', end, className, ...props }: AbsoluteTimestampProps) {\n const d = React.useMemo(() => new Date(date), [date]);\n const e = React.useMemo(() => (end ? new Date(end) : undefined), [end]);\n const mounted = useMounted();\n // Fixed locale for the server-rendered/first-paint value (the server can't\n // know the viewer's locale); the viewer's actual locale once mounted.\n const locale = mounted ? undefined : 'en-US';\n\n return (\n <time\n dateTime={d.toISOString()}\n title={absoluteTitle(d, locale)}\n className={cn('tabular-nums', className)}\n {...props}\n >\n {formatAbsolute(d, variant, e, locale)}\n </time>\n );\n}\n\n// ── Elapsed Time ──────────────────────────────────────────────────────────────\n\nfunction formatElapsed(totalSeconds: number, variant: string): string {\n const days = Math.floor(totalSeconds / 86400);\n const hours = Math.floor((totalSeconds % 86400) / 3600);\n const minutes = Math.floor((totalSeconds % 3600) / 60);\n const seconds = Math.floor(totalSeconds % 60);\n\n switch (variant) {\n case 'expanded': {\n const parts: string[] = [];\n if (days > 0) parts.push(`${days} day${days === 1 ? '' : 's'}`);\n if (hours > 0) parts.push(`${hours} hour${hours === 1 ? '' : 's'}`);\n if (minutes > 0) parts.push(`${minutes} minute${minutes === 1 ? '' : 's'}`);\n if (seconds > 0 || parts.length === 0) parts.push(`${seconds} second${seconds === 1 ? '' : 's'}`);\n return parts.join(', ');\n }\n case 'long': {\n if (days > 0) return `${days}d ${hours}h`;\n if (hours > 0) return `${hours}h ${minutes}m`;\n return `${minutes}m`;\n }\n case 'compact':\n default: {\n if (days > 0) return `${days}d ${hours}h`;\n if (hours > 0) return `${hours}h ${minutes}m ${seconds}s`;\n if (minutes > 0) return `${minutes}m ${seconds}s`;\n return `${seconds}s`;\n }\n }\n}\n\nexport interface ElapsedTimeProps extends Omit<React.TimeHTMLAttributes<HTMLTimeElement>, 'dateTime'> {\n /** Total elapsed seconds. Ignored if startedAt is provided. */\n seconds?: number;\n /** Format variant matching the Content Principles elapsed time table. */\n variant?: 'compact' | 'expanded' | 'long';\n /** Live-tick every second for active operations. */\n live?: boolean;\n /** Compute elapsed from a start time instead of a fixed seconds value. */\n startedAt?: Date | string | number;\n}\n\n/**\n * Formats a duration as elapsed time following the Content Principles.\n * Use for reconciliation loops, build jobs, health checks, and running operations.\n */\nexport function ElapsedTime({\n seconds: secondsProp,\n variant = 'compact',\n live = false,\n startedAt,\n className,\n ...props\n}: ElapsedTimeProps) {\n const startDate = React.useMemo(() => (startedAt ? new Date(startedAt) : undefined), [startedAt]);\n\n const computeSeconds = React.useCallback(() => {\n if (startDate) return Math.floor((Date.now() - startDate.getTime()) / 1000);\n return secondsProp ?? 0;\n }, [startDate, secondsProp]);\n\n const [elapsed, setElapsed] = React.useState(computeSeconds);\n\n React.useEffect(() => {\n setElapsed(computeSeconds());\n\n if (!live && !startDate) return;\n\n const id = window.setInterval(() => {\n setElapsed(computeSeconds());\n }, 1000);\n return () => window.clearInterval(id);\n }, [live, startDate, computeSeconds]);\n\n const iso = `PT${elapsed}S`;\n\n return (\n <time dateTime={iso} className={cn('tabular-nums', className)} {...props}>\n {formatElapsed(elapsed, variant)}\n </time>\n );\n}\n","export { cn } from '@upbound/monarch-core/utils';\n\nexport function sortBy<T>(items: T[], getKey: (item: T) => string): T[] {\n return [...items].sort((a, b) => getKey(a).localeCompare(getKey(b)));\n}\n","import { useSyncExternalStore } from 'react';\n\nfunction subscribe() {\n return () => {};\n}\n\n/**\n * Returns `false` on the server and during initial client hydration, then\n * `true` once mounted — for values that are only valid client-side (e.g. the\n * viewer's actual `Intl` locale, vs. a fixed locale used for the server-\n * rendered/first-paint value) without a hydration mismatch. Implemented via\n * `useSyncExternalStore` rather than `useEffect` + `setState` — the latter\n * works, but re-derives the same \"true\" value on every mount and trips\n * `react-hooks/set-state-in-effect` since there's no actual subscription.\n */\nexport function useMounted() {\n return useSyncExternalStore(\n subscribe,\n () => true,\n () => false,\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,YAAY,WAAW;AACvB,SAAS,SAAS,gBAAgB,sBAAsB;;;ACHxD,SAAS,UAAU;;;ACAnB,SAAS,4BAA4B;AAErC,SAAS,YAAY;AACnB,SAAO,MAAM;AAAA,EAAC;AAChB;AAWO,SAAS,aAAa;AAC3B,SAAO;AAAA,IACL;AAAA,IACA,MAAM;AAAA,IACN,MA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C;AAAA,IAC7B,GAAG,GAAI;AACP,WAAO,MAAM,OAAO,cAAc,EAAE;AAAA,EACtC,GAAG,CAAC,MAAM,WAAW,cAAc,CAAC;AAEpC,QAAM,MAAM,KAAK,OAAO;AAExB,SACE,oBAAC,uCAAK,UAAU,KAAK,WAAW,GAAG,gBAAgB,SAAS,KAAO,QAAlE,EACE,wBAAc,SAAS,OAAO,IACjC;AAEJ;","names":["mins","hrs","days","id","start","endStr"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upbound/monarch-blocks",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Upbound's design system — composed components.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -48,7 +48,7 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@tanstack/react-table": "^9.3.1",
51
- "@upbound/monarch-core": "^0.17.0",
51
+ "@upbound/monarch-core": "^0.18.0",
52
52
  "radix-ui": "^1.6.7",
53
53
  "react-day-picker": "^10.0.2",
54
54
  "reactflow": "11.11.4",