diff --git a/bun.lock b/bun.lock index 85c4171e..cc1f47ee 100644 --- a/bun.lock +++ b/bun.lock @@ -749,7 +749,7 @@ }, "packages/ui": { "name": "@wrnexus/ui", - "version": "0.8.86", + "version": "0.8.87", "dependencies": { "@wrnexus/core": "workspace:*", }, diff --git a/examples/component-showcase/app/pages/base.wrn b/examples/component-showcase/app/pages/base.wrn index 46c41920..e8fe247a 100644 --- a/examples/component-showcase/app/pages/base.wrn +++ b/examples/component-showcase/app/pages/base.wrn @@ -116,7 +116,7 @@ page BaseShowcase {
-
+
Base

Chat 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 {
Live preview
-
+
Component usage.wrn
@@ -117,12 +169,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 { @@ -144,7 +222,7 @@ page ChatBubbleDetail {
Live preview
-
+
Component usage.wrn
@@ -159,12 +237,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 { @@ -186,7 +290,7 @@ page ChatBubbleDetail {
Live preview
-
+
Component usage.wrn
@@ -201,12 +305,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 { diff --git a/examples/component-showcase/app/pages/components/drawer.wrn b/examples/component-showcase/app/pages/components/drawer.wrn index 2036c8e9..0df47a1b 100644 --- a/examples/component-showcase/app/pages/components/drawer.wrn +++ b/examples/component-showcase/app/pages/components/drawer.wrn @@ -179,6 +179,44 @@ page DrawerDetail { <div data-slot="footer"> <div class="showcase-slot">footer slot</div> </div> +</Drawer> +
+ +
+
+
+
Compact

Top notice drawer

Slide a panel down from the top edge for announcements, search, or quick settings.

+ 04 +
+
+
+
Live preview
+

Click the trigger to open the drawer

+

Save your work before the window starts.

+
+
+
Component usage.wrn
+
<Drawer
+  placement="top"
+  size="sm"
+  variant="success"
+  title="Scheduled maintenance"
+  description="The workspace will be read-only on Sunday from 02:00 to 03:00 UTC."
+  icon="icon-[lucide--trash-2]"
+  label="Advanced example"
+  closeLabel="Advanced example"
+  triggerLabel="Open top drawer"
+  triggerIcon="icon-[lucide--panel-top-open]">
+  <div data-slot="trigger">
+    <div class="showcase-slot">trigger slot</div>
+  </div>
+  <div data-slot="header">
+    <div class="showcase-slot">header slot</div>
+  </div>
+  <div class="showcase-overlay-content"><p>Save your work before the window starts.</p></div>
+  <div data-slot="footer">
+    <div class="showcase-slot">footer slot</div>
+  </div>
 </Drawer>
@@ -205,7 +243,7 @@ if (component) registerOutputHandler(component, "cancel", (payload) =>
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
openbooleanfalseNo
defaultOpenbooleanfalseNo
placementstring"right"No
sizestring"md"No
colorstring"primary"No
variantstring"default"No
titlestring"Drawer"No
descriptionstring""No
iconstring""No
labelstring"Drawer"No
closeLabelstring"Close drawer"No
showClosebooleantrueNo
closeOnBackdropbooleantrueNo
closeOnEscapebooleantrueNo
durationnumber260No
overlaybooleantrueNo
scrollablebooleantrueNo
triggerLabelstring""No
triggerIconstring""No
classstring""No