@flamingo-stack/openframe-frontend-core 0.0.603 → 0.0.604-2095.5819.1

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 (102) hide show
  1. package/dist/{chunk-7UY6JYVX.js → chunk-4LGYBV7U.js} +6 -6
  2. package/dist/{chunk-AR3JII22.cjs → chunk-4Y7LBWRN.cjs} +159 -159
  3. package/dist/{chunk-AR3JII22.cjs.map → chunk-4Y7LBWRN.cjs.map} +1 -1
  4. package/dist/{chunk-AL27OAQB.cjs → chunk-4ZBC4YSQ.cjs} +33 -33
  5. package/dist/{chunk-AL27OAQB.cjs.map → chunk-4ZBC4YSQ.cjs.map} +1 -1
  6. package/dist/{chunk-2SYV7HSV.js → chunk-5QHY4HCC.js} +2 -2
  7. package/dist/{chunk-SJS2AWIB.cjs → chunk-7ADEWG65.cjs} +3 -3
  8. package/dist/{chunk-SJS2AWIB.cjs.map → chunk-7ADEWG65.cjs.map} +1 -1
  9. package/dist/{chunk-FH6O54PG.js → chunk-7CG4N4RV.js} +5 -5
  10. package/dist/{chunk-ZEAV4HB5.cjs → chunk-7EETXACY.cjs} +15 -15
  11. package/dist/{chunk-ZEAV4HB5.cjs.map → chunk-7EETXACY.cjs.map} +1 -1
  12. package/dist/{chunk-Z5H3ITOB.js → chunk-AQGQVYDC.js} +2 -2
  13. package/dist/{chunk-B2NXQOAK.cjs → chunk-BEAO6SUX.cjs} +70 -70
  14. package/dist/{chunk-B2NXQOAK.cjs.map → chunk-BEAO6SUX.cjs.map} +1 -1
  15. package/dist/{chunk-JQ52EWRC.js → chunk-BKZCYRGG.js} +2 -2
  16. package/dist/{chunk-CEA6WLSC.cjs → chunk-C3FIMKT7.cjs} +3 -3
  17. package/dist/{chunk-CEA6WLSC.cjs.map → chunk-C3FIMKT7.cjs.map} +1 -1
  18. package/dist/{chunk-TLXYYGZW.js → chunk-FK5WVAC3.js} +3 -3
  19. package/dist/{chunk-WGQKIMMJ.cjs → chunk-FRRNSQOG.cjs} +25 -25
  20. package/dist/{chunk-WGQKIMMJ.cjs.map → chunk-FRRNSQOG.cjs.map} +1 -1
  21. package/dist/{chunk-A73ORC6C.js → chunk-HONE2UX4.js} +3 -3
  22. package/dist/{chunk-TOUHYL4T.js → chunk-IK2MM26F.js} +5 -5
  23. package/dist/{chunk-SWVHCWLG.js → chunk-JGSEBZYO.js} +28 -4
  24. package/dist/chunk-JGSEBZYO.js.map +1 -0
  25. package/dist/{chunk-HO24BJ5K.cjs → chunk-JIPSQ4P7.cjs} +10 -10
  26. package/dist/{chunk-HO24BJ5K.cjs.map → chunk-JIPSQ4P7.cjs.map} +1 -1
  27. package/dist/{chunk-64BE3OFE.cjs → chunk-JZBRMXB7.cjs} +22 -22
  28. package/dist/{chunk-64BE3OFE.cjs.map → chunk-JZBRMXB7.cjs.map} +1 -1
  29. package/dist/{chunk-BOTY4JJT.cjs → chunk-L77QUPE5.cjs} +4 -4
  30. package/dist/{chunk-BOTY4JJT.cjs.map → chunk-L77QUPE5.cjs.map} +1 -1
  31. package/dist/{chunk-7RAKZ6TW.cjs → chunk-LJMTURDD.cjs} +10 -10
  32. package/dist/{chunk-7RAKZ6TW.cjs.map → chunk-LJMTURDD.cjs.map} +1 -1
  33. package/dist/{chunk-INPMLFLK.js → chunk-MDXSLZML.js} +2 -2
  34. package/dist/{chunk-RJU7L4EC.cjs → chunk-N25MIHYE.cjs} +5 -5
  35. package/dist/{chunk-RJU7L4EC.cjs.map → chunk-N25MIHYE.cjs.map} +1 -1
  36. package/dist/{chunk-F2IZWJET.js → chunk-N6GFOA4J.js} +4 -4
  37. package/dist/{chunk-AYVJRZO3.cjs → chunk-OPNTVPGP.cjs} +43 -43
  38. package/dist/{chunk-AYVJRZO3.cjs.map → chunk-OPNTVPGP.cjs.map} +1 -1
  39. package/dist/{chunk-QJJKDNYS.js → chunk-ORGNII3T.js} +5 -5
  40. package/dist/{chunk-PFG7TJFZ.js → chunk-PLPRL4YX.js} +3 -3
  41. package/dist/{chunk-XPHYCFQ6.js → chunk-RN3DBEWX.js} +2 -2
  42. package/dist/{chunk-KESRJY6J.cjs → chunk-VK743MVL.cjs} +28 -4
  43. package/dist/chunk-VK743MVL.cjs.map +1 -0
  44. package/dist/{chunk-SPLEOBOR.js → chunk-WHHA3LVL.js} +3 -3
  45. package/dist/{chunk-RJJPL2K5.cjs → chunk-WZROKAJT.cjs} +22 -22
  46. package/dist/{chunk-RJJPL2K5.cjs.map → chunk-WZROKAJT.cjs.map} +1 -1
  47. package/dist/{chunk-4SUYR7UP.js → chunk-XATCZQGR.js} +3 -3
  48. package/dist/{chunk-7BYMMJK3.cjs → chunk-YTXKRN6K.cjs} +9 -9
  49. package/dist/{chunk-7BYMMJK3.cjs.map → chunk-YTXKRN6K.cjs.map} +1 -1
  50. package/dist/components/case-studies/index.cjs +9 -9
  51. package/dist/components/case-studies/index.js +3 -3
  52. package/dist/components/chat/entity-cards/chat-ticket-item.d.ts +12 -0
  53. package/dist/components/chat/entity-cards/chat-ticket-item.d.ts.map +1 -1
  54. package/dist/components/chat/index.cjs +2 -2
  55. package/dist/components/chat/index.js +1 -1
  56. package/dist/components/contact/index.cjs +4 -4
  57. package/dist/components/contact/index.js +3 -3
  58. package/dist/components/docs/index.cjs +7 -7
  59. package/dist/components/docs/index.js +6 -6
  60. package/dist/components/embeds/index.cjs +4 -4
  61. package/dist/components/embeds/index.js +3 -3
  62. package/dist/components/faq/index.cjs +4 -4
  63. package/dist/components/faq/index.js +3 -3
  64. package/dist/components/features/index.cjs +3 -3
  65. package/dist/components/features/index.js +2 -2
  66. package/dist/components/help-center-pages/index.cjs +23 -23
  67. package/dist/components/help-center-pages/index.js +14 -14
  68. package/dist/components/index.cjs +38 -38
  69. package/dist/components/index.js +13 -13
  70. package/dist/components/meeting-scheduler/index.cjs +24 -24
  71. package/dist/components/meeting-scheduler/index.js +2 -2
  72. package/dist/components/navigation/index.cjs +6 -6
  73. package/dist/components/navigation/index.js +5 -5
  74. package/dist/components/onboarding-guides/index.cjs +6 -6
  75. package/dist/components/onboarding-guides/index.js +5 -5
  76. package/dist/components/tickets/index.cjs +7 -7
  77. package/dist/components/tickets/index.js +6 -6
  78. package/dist/components/ui/index.cjs +3 -3
  79. package/dist/components/ui/index.js +2 -2
  80. package/dist/index.cjs +7 -7
  81. package/dist/index.js +6 -6
  82. package/package.json +1 -1
  83. package/src/components/chat/__tests__/chat-ticket-item.test.tsx +79 -0
  84. package/src/components/chat/entity-cards/chat-ticket-item.tsx +30 -4
  85. package/src/stories/ChatTicketList.stories.tsx +25 -0
  86. package/dist/chunk-KESRJY6J.cjs.map +0 -1
  87. package/dist/chunk-SWVHCWLG.js.map +0 -1
  88. /package/dist/{chunk-7UY6JYVX.js.map → chunk-4LGYBV7U.js.map} +0 -0
  89. /package/dist/{chunk-2SYV7HSV.js.map → chunk-5QHY4HCC.js.map} +0 -0
  90. /package/dist/{chunk-FH6O54PG.js.map → chunk-7CG4N4RV.js.map} +0 -0
  91. /package/dist/{chunk-Z5H3ITOB.js.map → chunk-AQGQVYDC.js.map} +0 -0
  92. /package/dist/{chunk-JQ52EWRC.js.map → chunk-BKZCYRGG.js.map} +0 -0
  93. /package/dist/{chunk-TLXYYGZW.js.map → chunk-FK5WVAC3.js.map} +0 -0
  94. /package/dist/{chunk-A73ORC6C.js.map → chunk-HONE2UX4.js.map} +0 -0
  95. /package/dist/{chunk-TOUHYL4T.js.map → chunk-IK2MM26F.js.map} +0 -0
  96. /package/dist/{chunk-INPMLFLK.js.map → chunk-MDXSLZML.js.map} +0 -0
  97. /package/dist/{chunk-F2IZWJET.js.map → chunk-N6GFOA4J.js.map} +0 -0
  98. /package/dist/{chunk-QJJKDNYS.js.map → chunk-ORGNII3T.js.map} +0 -0
  99. /package/dist/{chunk-PFG7TJFZ.js.map → chunk-PLPRL4YX.js.map} +0 -0
  100. /package/dist/{chunk-XPHYCFQ6.js.map → chunk-RN3DBEWX.js.map} +0 -0
  101. /package/dist/{chunk-SPLEOBOR.js.map → chunk-WHHA3LVL.js.map} +0 -0
  102. /package/dist/{chunk-4SUYR7UP.js.map → chunk-XATCZQGR.js.map} +0 -0
@@ -27,6 +27,18 @@ export interface ChatTicketItemData {
27
27
  statusColor?: string;
28
28
  category?: string;
29
29
  timeAgo?: string;
30
+ /** Explicit secondary line under the title. When set, it replaces the
31
+ * default `ticketNumber • category • timeAgo` composition verbatim, so
32
+ * the host decides how the reference reads - the Fae client passes
33
+ * `Ticket Number: 165 • 6m ago` (reference labelled but visually
34
+ * secondary). An empty string hides the line. */
35
+ subtitle?: string;
36
+ /** The ticket has activity the customer has not opened yet
37
+ * (Figma fae-chat 1-5592): the secondary line and the chevron switch to
38
+ * the brand yellow, and the line reads the unread notice unless
39
+ * `subtitle` overrides it. The host clears it once the ticket is
40
+ * opened, and the reference line comes back. */
41
+ unread?: boolean;
30
42
  /** When set, renders a "Linked work" chip with a wrench icon next to
31
43
  * the status tag — tells the customer at a glance that an internal
32
44
  * delivery task is in flight for this ticket, even before they
@@ -44,6 +56,8 @@ export interface ChatTicketItemProps extends Omit<ButtonHTMLAttributes<HTMLButto
44
56
  isLoading?: boolean;
45
57
  }
46
58
 
59
+ const UNREAD_NOTICE = 'You have a new unread message';
60
+
47
61
  const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
48
62
  ({ className, ticket, onClick, isLoading = false, ...props }, ref) => {
49
63
  if (isLoading) {
@@ -80,7 +94,8 @@ const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
80
94
  });
81
95
  const isResolved = ticket.statusKind === 'RESOLVED' || resolveTicketStatus(ticket.status) === 'RESOLVED';
82
96
 
83
- const subtitle = [ticket.ticketNumber, ticket.category, ticket.timeAgo].filter(Boolean).join(' \u2022 ');
97
+ const composedSubtitle = [ticket.ticketNumber, ticket.category, ticket.timeAgo].filter(Boolean).join(' \u2022 ');
98
+ const subtitle = ticket.subtitle ?? (ticket.unread ? UNREAD_NOTICE : composedSubtitle);
84
99
 
85
100
  return (
86
101
  <button
@@ -110,7 +125,10 @@ const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
110
125
  {ticket.title}
111
126
  </p>
112
127
  {subtitle && (
113
- <p className="truncate text-ods-text-secondary text-h6" title={subtitle}>
128
+ <p
129
+ className={cn('truncate text-h6', ticket.unread ? 'text-ods-open-yellow' : 'text-ods-text-secondary')}
130
+ title={subtitle}
131
+ >
114
132
  {subtitle}
115
133
  </p>
116
134
  )}
@@ -132,8 +150,16 @@ const ChatTicketItem = forwardRef<HTMLButtonElement, ChatTicketItemProps>(
132
150
  )}
133
151
  {(statusTagProps.status || statusTagProps.label) && <TicketStatusTag {...statusTagProps} />}
134
152
 
135
- <div className="flex size-12 shrink-0 items-center justify-center rounded-md border border-ods-border bg-ods-card">
136
- <ChevronRight className="size-6 text-ods-text-secondary" />
153
+ <div
154
+ data-testid="chat-ticket-item-chevron"
155
+ className={cn(
156
+ 'flex size-12 shrink-0 items-center justify-center rounded-md border',
157
+ ticket.unread ? 'border-ods-open-yellow bg-ods-open-yellow' : 'border-ods-border bg-ods-card',
158
+ )}
159
+ >
160
+ <ChevronRight
161
+ className={cn('size-6', ticket.unread ? 'text-ods-text-on-accent' : 'text-ods-text-secondary')}
162
+ />
137
163
  </div>
138
164
  </button>
139
165
  );
@@ -199,6 +199,31 @@ export const ScrollFadingCompact: Story = {
199
199
  decorators: [constrainedDecorator(280)],
200
200
  };
201
201
 
202
+ const withReference = (ticket: ChatTicketItemData): ChatTicketItemData => ({
203
+ ...ticket,
204
+ subtitle: `Ticket Number: ${ticket.ticketNumber} \u2022 ${ticket.timeAgo}`,
205
+ });
206
+
207
+ /** `subtitle` override: the host owns the secondary line. The Fae client
208
+ * labels the reference so it stays quotable but visually secondary
209
+ * (`Ticket Number: N • time`). */
210
+ export const SubtitleOverride: Story = {
211
+ args: {
212
+ tickets: mockTickets.slice(0, 4).map(withReference),
213
+ },
214
+ decorators: [constrainedDecorator()],
215
+ };
216
+
217
+ /** Unread row (Figma fae-chat 1-5592): the notice replaces the reference
218
+ * line and both the line and the chevron turn brand yellow until the
219
+ * customer opens the ticket. */
220
+ export const Unread: Story = {
221
+ args: {
222
+ tickets: [{ ...mockTickets[0], unread: true }, ...mockTickets.slice(1, 4).map(withReference)],
223
+ },
224
+ decorators: [constrainedDecorator()],
225
+ };
226
+
202
227
  /** Loading state — skeleton placeholder rows shown while tickets load. */
203
228
  export const Loading: Story = {
204
229
  args: {