@flamingo-stack/openframe-frontend-core 0.0.763 → 0.0.765

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.
Files changed (72) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{chunk-G5NCY5IE.cjs → chunk-2OPYWMAV.cjs} +72 -72
  3. package/dist/{chunk-UUBHKQOH.cjs → chunk-2Y36SQSZ.cjs} +6 -6
  4. package/dist/{chunk-J4P47JHM.cjs → chunk-3FC6AKEJ.cjs} +7 -7
  5. package/dist/{chunk-TQPQKBBL.cjs → chunk-74ALTXXC.cjs} +34 -34
  6. package/dist/{chunk-3JUIDOHB.cjs → chunk-B3W7RCQF.cjs} +38 -38
  7. package/dist/{chunk-PE26VSWT.cjs → chunk-BIA77I6B.cjs} +8 -2
  8. package/dist/{chunk-ZUF5WDGE.cjs → chunk-BVA7YX4P.cjs} +22 -22
  9. package/dist/{chunk-IUIDZS6W.cjs → chunk-FMH2DYBC.cjs} +345 -322
  10. package/dist/{chunk-LUNXHJ53.cjs → chunk-JB424IQK.cjs} +22 -22
  11. package/dist/{chunk-AXGTRPF6.cjs → chunk-L2V7K7RR.cjs} +11 -11
  12. package/dist/{chunk-66FQUWKF.cjs → chunk-MDB65HQC.cjs} +27 -27
  13. package/dist/{chunk-QCO32MEE.cjs → chunk-NJS7FQRW.cjs} +4 -4
  14. package/dist/{chunk-4NGXJA3V.cjs → chunk-PERN37KO.cjs} +4 -4
  15. package/dist/{chunk-IJMPXTGV.cjs → chunk-PYK4ZSEZ.cjs} +6 -6
  16. package/dist/{chunk-6XCE2VLH.cjs → chunk-QQ7LKNNP.cjs} +3 -3
  17. package/dist/{chunk-O2VRIGDI.cjs → chunk-RQQVN7LC.cjs} +48 -48
  18. package/dist/{chunk-CEJDHCFZ.cjs → chunk-T5FRANE6.cjs} +21 -21
  19. package/dist/{chunk-RM6AHNM4.cjs → chunk-UI2TLQWA.cjs} +2 -2
  20. package/dist/{chunk-SU3EXXVC.cjs → chunk-VLJFAGMR.cjs} +12 -12
  21. package/dist/{chunk-2IFCRPNP.cjs → chunk-WA4X55XY.cjs} +10 -1
  22. package/dist/{chunk-E4LA4BEH.cjs → chunk-ZCU2PYCW.cjs} +9 -9
  23. package/dist/{cloud-tenants-4AGSRBJ2.cjs → cloud-tenants-6PSTDE3F.cjs} +7 -7
  24. package/dist/components/case-studies/index.cjs +17 -17
  25. package/dist/components/chat/index.cjs +4 -4
  26. package/dist/components/contact/index.cjs +8 -8
  27. package/dist/components/docs/index.cjs +11 -11
  28. package/dist/components/embeds/index.cjs +8 -8
  29. package/dist/components/faq/index.cjs +9 -9
  30. package/dist/components/features/index.cjs +7 -7
  31. package/dist/components/help-center-pages/index.cjs +65 -65
  32. package/dist/components/index.cjs +43 -41
  33. package/dist/components/meeting-scheduler/index.cjs +32 -32
  34. package/dist/components/navigation/index.cjs +10 -10
  35. package/dist/components/onboarding-guides/index.cjs +10 -10
  36. package/dist/components/product-demo/index.cjs +9 -9
  37. package/dist/components/tickets/index.cjs +12 -12
  38. package/dist/components/ui/date-picker.d.ts.map +1 -1
  39. package/dist/components/ui/date-picker.js +2 -2
  40. package/dist/components/ui/device-card.d.ts.map +1 -1
  41. package/dist/components/ui/device-card.js +3 -2
  42. package/dist/components/ui/index.cjs +9 -7
  43. package/dist/components/ui/index.d.ts +1 -0
  44. package/dist/components/ui/index.d.ts.map +1 -1
  45. package/dist/components/ui/index.js +1 -0
  46. package/dist/components/ui/page-actions.d.ts +2 -1
  47. package/dist/components/ui/page-actions.d.ts.map +1 -1
  48. package/dist/components/ui/page-actions.js +10 -1
  49. package/dist/components/ui/super-user-banner-view.d.ts +24 -0
  50. package/dist/components/ui/super-user-banner-view.d.ts.map +1 -0
  51. package/dist/components/ui/super-user-banner-view.js +28 -0
  52. package/dist/{devices-FKRZIBJP.cjs → devices-O5PZ4IR6.cjs} +8 -8
  53. package/dist/{embeddable-chat-HWQSP3DY.cjs → embeddable-chat-YFUCVDMV.cjs} +69 -69
  54. package/dist/index.cjs +13 -11
  55. package/dist/{knowledge-25CBYZ7E.cjs → knowledge-4OU73KTO.cjs} +8 -8
  56. package/dist/{logs-HQ7NDBVV.cjs → logs-R6ZH32UU.cjs} +15 -15
  57. package/dist/{policies-2RV2CQD3.cjs → policies-XN4TDX3G.cjs} +11 -11
  58. package/dist/{remote-session-F72S6I7J.cjs → remote-session-7NSC7DI5.cjs} +4 -4
  59. package/dist/{scripts-32EM4WDI.cjs → scripts-53VHKMY3.cjs} +14 -14
  60. package/dist/{software-update-WVIARIUG.cjs → software-update-KLJSMAUM.cjs} +11 -11
  61. package/dist/{tickets-board-4PBXPSGJ.cjs → tickets-board-DXMF7IKL.cjs} +7 -7
  62. package/dist/utils/date-utils.d.ts +7 -2
  63. package/dist/utils/date-utils.d.ts.map +1 -1
  64. package/dist/utils/date-utils.js +8 -3
  65. package/dist/utils/index.cjs +7 -2
  66. package/package.json +1 -1
  67. package/src/components/ui/date-picker.tsx +6 -3
  68. package/src/components/ui/device-card.tsx +5 -6
  69. package/src/components/ui/index.ts +1 -0
  70. package/src/components/ui/page-actions.tsx +26 -2
  71. package/src/components/ui/super-user-banner-view.tsx +52 -0
  72. package/src/utils/date-utils.ts +17 -8
@@ -0,0 +1,52 @@
1
+ 'use client';
2
+
3
+ import { cn } from '../../utils/cn';
4
+ import { AlertTriangleIcon } from '../icons-v2-generated';
5
+ import { AnnouncementBarView } from './announcement-bar-view';
6
+ import { Tag } from './tag';
7
+
8
+ export interface SuperUserBannerViewProps {
9
+ /** The tenant whose data is on screen - never the super tenant the session belongs to. */
10
+ tenantName: string;
11
+ /**
12
+ * Trailing environment chip ("Production environment"). Omit it where the
13
+ * host has no environment to name; the strip then ends at the text.
14
+ */
15
+ environmentLabel?: string;
16
+ className?: string;
17
+ }
18
+
19
+ /**
20
+ * The strip a super user sees over every page while looking at a tenant that
21
+ * is not their own: who you are acting as, and whose data it is. Props-only;
22
+ * the host decides when it shows (a super user session) and what it names
23
+ * (the tenant of the current host, not the one on `/me`).
24
+ *
25
+ * A skin over `AnnouncementBarView` rather than a strip of its own: the slots,
26
+ * the one-line truncation and the touch-width behaviour are that bar's. What
27
+ * this adds is the design's error surface - error-secondary fill, an error
28
+ * rule along the bottom, the triangle in error, the role in error and the
29
+ * tenant in primary text at body scale - and the environment chip at the end.
30
+ */
31
+ export function SuperUserBannerView({ tenantName, environmentLabel, className }: SuperUserBannerViewProps) {
32
+ return (
33
+ <AnnouncementBarView
34
+ className={cn('shrink-0 border-b border-ods-error bg-ods-error-secondary text-ods-text-primary', className)}
35
+ contentClassName="gap-[var(--spacing-system-s)] py-[var(--spacing-system-m)] pl-[var(--spacing-system-m)]"
36
+ startAdornment={<AlertTriangleIcon className="size-6 shrink-0 text-ods-error" aria-hidden="true" />}
37
+ title={
38
+ <p className="mb-0 min-w-0 max-w-full truncate text-h4">
39
+ <span className="text-ods-error">Super user access: </span>
40
+ <span>{tenantName}</span>
41
+ </p>
42
+ }
43
+ endAdornment={
44
+ // Below `md` the chip would take the width the tenant name needs, and
45
+ // the name is the point of the strip: the chip waits for `md`.
46
+ environmentLabel ? (
47
+ <Tag variant="critical" label={environmentLabel} className="uppercase max-md:hidden" />
48
+ ) : undefined
49
+ }
50
+ />
51
+ );
52
+ }
@@ -6,7 +6,7 @@
6
6
  * stated explicitly — never by a local `toLocale*` call or hand-built string.
7
7
  */
8
8
 
9
- import { formatDateWithTimezone } from './format';
9
+ import { formatDateWithTimezone, VIEWER_TIMEZONE } from './format';
10
10
 
11
11
  /** `mediumDateTime`'s fields, spread so a caller's own options still override. */
12
12
  const ZONED_DATE_FIELDS_MEDIUM_DATETIME: Intl.DateTimeFormatOptions = {
@@ -19,7 +19,8 @@ const ZONED_DATE_FIELDS_MEDIUM_DATETIME: Intl.DateTimeFormatOptions = {
19
19
 
20
20
  /**
21
21
  * Relative display label for a ticket timestamp (ISO string).
22
- * < 1 min → "Just now" | 1-59 min → "X min ago" | 1-23 h → "X hour(s) ago" | 24+ h → "MM/DD/YYYY"
22
+ * < 1 min → "Just now" | 1-59 min → "X min ago" | 1-23 h → "X hour(s) ago" | 24+ h → the
23
+ * calendar day as the viewer writes it (`03/20/2026` in en-US, `20/03/2026` in en-AU).
23
24
  */
24
25
  export function formatTicketRelativeTime(iso: string): string {
25
26
  const now = new Date();
@@ -31,17 +32,25 @@ export function formatTicketRelativeTime(iso: string): string {
31
32
  if (diffMin < 60) return `${diffMin} min ago`;
32
33
  const diffHours = Math.floor(diffMin / 60);
33
34
  if (diffHours < 24) return diffHours === 1 ? '1 hour ago' : `${diffHours} hours ago`;
34
- // UTC-pinned through the one renderer — see `formatDateWithTimezone`.
35
- return formatDateWithTimezone(date, null, 'numeric');
35
+ // The label already depends on the viewer's clock (`now`), so it is client-only
36
+ // by nature: the day is theirs too, in their zone and locale.
37
+ return formatDateWithTimezone(date, VIEWER_TIMEZONE, 'numeric', { viewerLocale: true });
36
38
  }
37
39
 
38
40
  /**
39
- * Full tooltip timestamp in "MM/DD/YYYY, H:MM AM/PM" format.
41
+ * Full tooltip timestamp for a ticket — the numeric date and the clock in the
42
+ * viewer's own zone and locale (`03/20/2026, 1:05 PM` in en-US,
43
+ * `20/03/2026, 13:05` in en-AU). A ticket's "created at" is read by the person
44
+ * looking at it, not by a server, so it is not UTC-pinned like content dates.
45
+ * The locale's own 12/24-hour convention applies — no `hour12` is forced.
40
46
  */
41
47
  export function formatTicketFullTimestamp(iso: string): string {
42
- // UTC-pinned through the one renderer — see `formatDateWithTimezone`. This was
43
- // a hand-assembled `MM/DD/YYYY, H:MM AM` built from `getUTC*` getters.
44
- return formatDateWithTimezone(iso, null, 'numericDateTime');
48
+ return formatDateWithTimezone(
49
+ iso,
50
+ VIEWER_TIMEZONE,
51
+ { year: 'numeric', month: '2-digit', day: '2-digit', hour: 'numeric', minute: '2-digit' },
52
+ { viewerLocale: true },
53
+ );
45
54
  }
46
55
 
47
56
  /**