@flamingo-stack/openframe-frontend-core 0.0.280 → 0.0.281
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/dist/{chunk-PE5AMPHQ.js → chunk-3QMJ6OX6.js} +2 -2
- package/dist/{chunk-ADJKXYCZ.cjs → chunk-DEDJY6TG.cjs} +35 -3
- package/dist/chunk-DEDJY6TG.cjs.map +1 -0
- package/dist/{chunk-23DPR7HU.cjs → chunk-DKHWVF6S.cjs} +10 -10
- package/dist/{chunk-23DPR7HU.cjs.map → chunk-DKHWVF6S.cjs.map} +1 -1
- package/dist/{chunk-CBVCOXC5.cjs → chunk-FAKJMITR.cjs} +25 -25
- package/dist/{chunk-CBVCOXC5.cjs.map → chunk-FAKJMITR.cjs.map} +1 -1
- package/dist/{chunk-KLBB2J7W.js → chunk-GQS4ZRL3.js} +2 -2
- package/dist/{chunk-U72ACGRR.cjs → chunk-HIFAGJQU.cjs} +6 -6
- package/dist/{chunk-U72ACGRR.cjs.map → chunk-HIFAGJQU.cjs.map} +1 -1
- package/dist/{chunk-IIS4LQEO.cjs → chunk-LAXKEA5S.cjs} +34 -34
- package/dist/{chunk-IIS4LQEO.cjs.map → chunk-LAXKEA5S.cjs.map} +1 -1
- package/dist/{chunk-5ZOWHCFN.js → chunk-ODKT35W6.js} +2 -2
- package/dist/{chunk-Y2ZFRZ5Q.js → chunk-PWPRJKCY.js} +2 -2
- package/dist/{chunk-QHTJTSHT.js → chunk-Z4RUSQES.js} +35 -3
- package/dist/chunk-Z4RUSQES.js.map +1 -0
- package/dist/components/chat/chat-ticket-list.d.ts +2 -0
- package/dist/components/chat/chat-ticket-list.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/chat-ticket-item.d.ts +4 -1
- package/dist/components/chat/entity-cards/chat-ticket-item.d.ts.map +1 -1
- package/dist/components/chat/index.cjs +2 -2
- package/dist/components/chat/index.js +1 -1
- package/dist/components/contact/index.cjs +3 -3
- package/dist/components/contact/index.js +2 -2
- package/dist/components/faq/index.cjs +3 -3
- package/dist/components/faq/index.js +2 -2
- package/dist/components/features/index.cjs +2 -2
- package/dist/components/features/index.js +1 -1
- package/dist/components/index.cjs +53 -53
- package/dist/components/index.js +4 -4
- package/dist/components/navigation/index.cjs +2 -2
- package/dist/components/navigation/index.js +1 -1
- package/dist/components/related-content/index.cjs +3 -3
- package/dist/components/related-content/index.js +2 -2
- package/dist/components/tickets/index.cjs +52 -52
- package/dist/components/tickets/index.js +3 -3
- package/dist/components/ui/index.cjs +2 -2
- package/dist/components/ui/index.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/chat/chat-ticket-list.tsx +20 -1
- package/src/components/chat/entity-cards/chat-ticket-item.tsx +32 -2
- package/src/stories/ChatTicketList.stories.tsx +9 -0
- package/dist/chunk-ADJKXYCZ.cjs.map +0 -1
- package/dist/chunk-QHTJTSHT.js.map +0 -1
- /package/dist/{chunk-PE5AMPHQ.js.map → chunk-3QMJ6OX6.js.map} +0 -0
- /package/dist/{chunk-KLBB2J7W.js.map → chunk-GQS4ZRL3.js.map} +0 -0
- /package/dist/{chunk-5ZOWHCFN.js.map → chunk-ODKT35W6.js.map} +0 -0
- /package/dist/{chunk-Y2ZFRZ5Q.js.map → chunk-PWPRJKCY.js.map} +0 -0
|
@@ -5,6 +5,7 @@ import { cn } from '../../../utils/cn'
|
|
|
5
5
|
import { ChevronRight } from 'lucide-react'
|
|
6
6
|
import { TicketStatusTag, resolveStatusTagProps, resolveTicketStatus } from '../../ui/ticket-status-tag'
|
|
7
7
|
import { Tag } from '../../ui/tag'
|
|
8
|
+
import { Skeleton } from '../../ui/skeleton'
|
|
8
9
|
import { WrenchIcon } from '../../icons-v2-generated/household/wrench-icon'
|
|
9
10
|
|
|
10
11
|
export interface ChatTicketItemData {
|
|
@@ -36,12 +37,41 @@ export interface ChatTicketItemData {
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export interface ChatTicketItemProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'onClick'> {
|
|
39
|
-
|
|
40
|
+
/** Optional while `isLoading` — the skeleton placeholder needs no data. */
|
|
41
|
+
ticket?: ChatTicketItemData
|
|
40
42
|
onClick?: (ticketId: string) => void
|
|
43
|
+
/** Render a non-interactive skeleton placeholder sized to a real row. */
|
|
44
|
+
isLoading?: boolean
|
|
41
45
|
}
|
|
42
46
|
|
|
43
47
|
const ChatTicketItem = React.forwardRef<HTMLButtonElement, ChatTicketItemProps>(
|
|
44
|
-
({ className, ticket, onClick, ...props }, ref) => {
|
|
48
|
+
({ className, ticket, onClick, isLoading = false, ...props }, ref) => {
|
|
49
|
+
if (isLoading) {
|
|
50
|
+
return (
|
|
51
|
+
<div
|
|
52
|
+
aria-hidden
|
|
53
|
+
className={cn(
|
|
54
|
+
"flex items-center gap-4 w-full h-20 px-4",
|
|
55
|
+
"bg-ods-card border-b border-ods-border",
|
|
56
|
+
className,
|
|
57
|
+
)}
|
|
58
|
+
>
|
|
59
|
+
<div className="flex flex-col justify-center flex-1 min-w-0 gap-2">
|
|
60
|
+
{/* title line */}
|
|
61
|
+
<Skeleton className="h-5 w-1/2" />
|
|
62
|
+
{/* subtitle line */}
|
|
63
|
+
<Skeleton className="h-4 w-1/3" />
|
|
64
|
+
</div>
|
|
65
|
+
{/* status tag */}
|
|
66
|
+
<Skeleton className="h-7 w-20 rounded-full shrink-0" />
|
|
67
|
+
{/* chevron box */}
|
|
68
|
+
<Skeleton className="size-12 rounded-md shrink-0" />
|
|
69
|
+
</div>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (!ticket) return null
|
|
74
|
+
|
|
45
75
|
const statusTagProps = resolveStatusTagProps({
|
|
46
76
|
status: ticket.status,
|
|
47
77
|
statusKind: ticket.statusKind,
|
|
@@ -194,3 +194,12 @@ export const ScrollFadingCompact: Story = {
|
|
|
194
194
|
},
|
|
195
195
|
decorators: [constrainedDecorator(280)],
|
|
196
196
|
};
|
|
197
|
+
|
|
198
|
+
/** Loading state — skeleton placeholder rows shown while tickets load. */
|
|
199
|
+
export const Loading: Story = {
|
|
200
|
+
args: {
|
|
201
|
+
tickets: [],
|
|
202
|
+
isLoading: true,
|
|
203
|
+
},
|
|
204
|
+
decorators: [constrainedDecorator()],
|
|
205
|
+
};
|