BaseChat Bubble
Theme-aware, responsive chat bubble component.
diff --git a/examples/component-showcase/app/pages/components/chat-bubble.wrn b/examples/component-showcase/app/pages/components/chat-bubble.wrn
index ccdfe7a2..bead6e53 100644
--- a/examples/component-showcase/app/pages/components/chat-bubble.wrn
+++ b/examples/component-showcase/app/pages/components/chat-bubble.wrn
@@ -5,7 +5,7 @@ page ChatBubbleDetail {
state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary"
state playground_title = ctx.url.searchParams.get("pg_title") ?? ""
state playground_description = ctx.url.searchParams.get("pg_description") ?? ""
- state playground_items = JSON.parse(ctx.url.searchParams.get("pg_items") ?? "[{\"text\":\"Hi Maya, is the new dashboard ready to review?\",\"direction\":\"incoming\",\"timestamp\":\"10:24\"},{\"text\":\"Yes! I have shared the latest version with you.\",\"direction\":\"outgoing\",\"timestamp\":\"10:25\",\"status\":\"Delivered\"},{\"text\":\"Thanks, I will take a look this afternoon.\",\"direction\":\"incoming\",\"timestamp\":\"10:26\"}]")
+ state playground_items = JSON.parse(ctx.url.searchParams.get("pg_items") ?? "[{\"text\":\"Hi Maya, is the new dashboard ready to review?\",\"direction\":\"incoming\",\"timestamp\":\"10:24\"},{\"text\":\"Yes! I have shared the latest version with you.\",\"direction\":\"outgoing\",\"timestamp\":\"10:25\",\"receipt\":\"read\"},{\"text\":\"Thanks, I will take a look this afternoon.\",\"direction\":\"incoming\",\"timestamp\":\"10:26\"},{\"text\":\"Great. The release notes are attached too.\",\"direction\":\"outgoing\",\"timestamp\":\"10:27\",\"receipt\":\"delivered\"},{\"text\":\"One more screenshot coming up.\",\"direction\":\"outgoing\",\"timestamp\":\"10:28\",\"receipt\":\"sent\"},{\"text\":\"Uploading the final export now.\",\"direction\":\"outgoing\",\"timestamp\":\"10:29\",\"receipt\":\"sending\"},{\"text\":\"Here is the invoice PDF.\",\"direction\":\"outgoing\",\"timestamp\":\"10:30\",\"receipt\":\"failed\",\"status\":\"Not delivered\",\"actionLabel\":\"Retry\"}]")
state playground_oneSided = (ctx.url.searchParams.get("pg_oneSided") ?? "false") === "true"
state playground_showAvatars = (ctx.url.searchParams.get("pg_showAvatars") ?? "false") === "true"
state playground_showMetadata = (ctx.url.searchParams.get("pg_showMetadata") ?? "true") === "true"
@@ -48,12 +48,38 @@ page ChatBubbleDetail {
"text": "Yes! I have shared the latest version with you.",
"direction": "outgoing",
"timestamp": "10:25",
- "status": "Delivered"
+ "receipt": "read"
},
{
"text": "Thanks, I will take a look this afternoon.",
"direction": "incoming",
"timestamp": "10:26"
+
},
+
{
+ "text": "Great. The release notes are attached too.",
+ "direction": "outgoing",
+ "timestamp": "10:27",
+ "receipt": "delivered"
+
},
+
{
+ "text": "One more screenshot coming up.",
+ "direction": "outgoing",
+ "timestamp": "10:28",
+ "receipt": "sent"
+
},
+
{
+ "text": "Uploading the final export now.",
+ "direction": "outgoing",
+ "timestamp": "10:29",
+ "receipt": "sending"
+
},
+
{
+ "text": "Here is the invoice PDF.",
+ "direction": "outgoing",
+ "timestamp": "10:30",
+ "receipt": "failed",
+ "status": "Not delivered",
+ "actionLabel": "Retry"
}
]
view
{
@@ -79,12 +105,38 @@ page ChatBubbleDetail {
"text": "Yes! I have shared the latest version with you.",
"direction": "outgoing",
"timestamp": "10:25",
- "status": "Delivered"
+ "receipt": "read"
},
{
"text": "Thanks, I will take a look this afternoon.",
"direction": "incoming",
"timestamp": "10:26"
+ },
+ {
+ "text": "Great. The release notes are attached too.",
+ "direction": "outgoing",
+ "timestamp": "10:27",
+ "receipt": "delivered"
+ },
+ {
+ "text": "One more screenshot coming up.",
+ "direction": "outgoing",
+ "timestamp": "10:28",
+ "receipt": "sent"
+ },
+ {
+ "text": "Uploading the final export now.",
+ "direction": "outgoing",
+ "timestamp": "10:29",
+ "receipt": "sending"
+ },
+ {
+ "text": "Here is the invoice PDF.",
+ "direction": "outgoing",
+ "timestamp": "10:30",
+ "receipt": "failed",
+ "status": "Not delivered",
+ "actionLabel": "Retry"
}
]
@@ -102,7 +154,7 @@ page ChatBubbleDetail {