Refresh UI components and showcase; release updated framework packages
This commit is contained in:
1 parent
d800228585
commit
c77f5e1cec
293 files changed
+22544
-35778
No files matched your search
@@ -4,7 +4,7 @@ page ContextMenuDetail {
|
||||
state playground_items = JSON.parse(ctx.url.searchParams.get("pg_items") ?? "[{\"label\":\"Open dashboard\",\"description\":\"View the operational workspace\",\"value\":\"dashboard\",\"icon\":\"icon-[lucide--layout-dashboard]\"},{\"label\":\"Share record\",\"value\":\"share\",\"icon\":\"icon-[lucide--share-2]\",\"shortcut\":\"Ctrl S\"},{\"type\":\"divider\"},{\"label\":\"Delete record\",\"value\":\"delete\",\"icon\":\"icon-[lucide--trash-2]\",\"danger\":true}]")
|
||||
state playground_open = (ctx.url.searchParams.get("pg_open") ?? "false") === "true"
|
||||
state playground_defaultOpen = (ctx.url.searchParams.get("pg_defaultOpen") ?? "false") === "true"
|
||||
state playground_trigger = ctx.url.searchParams.get("pg_trigger") ?? "click"
|
||||
state playground_trigger = ctx.url.searchParams.get("pg_trigger") ?? "contextmenu"
|
||||
state playground_placement = ctx.url.searchParams.get("pg_placement") ?? "pointer"
|
||||
state playground_align = ctx.url.searchParams.get("pg_align") ?? "start"
|
||||
state playground_size = ctx.url.searchParams.get("pg_size") ?? "default"
|
||||
@@ -44,128 +44,133 @@ page ContextMenuDetail {
|
||||
<div class="playground-preview-source" data-playground-preview><ContextMenu items='{playground_items}' open='{playground_open}' defaultOpen='{playground_defaultOpen}' trigger='{playground_trigger}' placement='{playground_placement}' align='{playground_align}' size='{playground_size}' color='{playground_color}' variant='{playground_variant}' title='{playground_title}' description='{playground_description}' label='{playground_label}' closeOnSelect='{playground_closeOnSelect}' closeOnOutside='{playground_closeOnOutside}' disabled='{playground_disabled}' minWidth='{playground_minWidth}' maxWidth='{playground_maxWidth}' class='{playground_class}'><div data-slot="trigger"><div class="showcase-context-target">Right-click for contextual actions</div></div></ContextMenu></div>
|
||||
<section class="playground-code" aria-label="Current component code">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component code</span><button type="button" data-playground-copy><span class="icon-[lucide--copy] size-4" aria-hidden="true"></span>Copy</button></header>
|
||||
<pre><code data-playground-code><ContextMenu
|
||||
items='[
|
||||
<span>{</span>
|
||||
"id": "context-menu-0-1",
|
||||
"key": "context-menu-0-1",
|
||||
"value": "primary",
|
||||
"label": "Primary workflow",
|
||||
"title": "Primary workflow",
|
||||
"description": "A clean default configuration for everyday product interfaces.",
|
||||
"text": "A configurable sample message.",
|
||||
"href": "#context-menu-demo",
|
||||
"actionHref": "#context-menu-demo",
|
||||
"actionLabel": "View details",
|
||||
"icon": "icon-[lucide--sparkles]",
|
||||
"iconClass": "icon-[lucide--sparkles]",
|
||||
"variant": "primary",
|
||||
"status": "Active",
|
||||
"time": "09:30",
|
||||
"current": true,
|
||||
"selected": true,
|
||||
"checked": true,
|
||||
"disabled": false,
|
||||
"outgoing": false,
|
||||
"open": true,
|
||||
"number": 1,
|
||||
"count": 16,
|
||||
"percentage": 72,
|
||||
"color": "#7c3aed",
|
||||
"target": "_self",
|
||||
"ariaLabel": "Open primary workflow 1",
|
||||
"items": [
|
||||
<span>{</span>
|
||||
"label": "Nested option A",
|
||||
"value": "nested-a"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Nested option B",
|
||||
"value": "nested-b"
|
||||
<span>}</span>
|
||||
],
|
||||
"links": [
|
||||
<span>{</span>
|
||||
"label": "Documentation",
|
||||
"href": "#documentation"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "API reference",
|
||||
"href": "#api-reference"
|
||||
<span>}</span>
|
||||
],
|
||||
"values": [
|
||||
"Included",
|
||||
"Standard"
|
||||
]
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"id": "context-menu-0-2",
|
||||
"key": "context-menu-0-2",
|
||||
"value": "secondary",
|
||||
"label": "Additional option",
|
||||
"title": "Supporting example",
|
||||
"description": "A clean default configuration for everyday product interfaces.",
|
||||
"text": "Another configurable message.",
|
||||
"href": "#context-menu-demo",
|
||||
"actionHref": "#context-menu-demo",
|
||||
"actionLabel": "View details",
|
||||
"icon": "icon-[lucide--sparkles]",
|
||||
"iconClass": "icon-[lucide--sparkles]",
|
||||
"variant": "primary",
|
||||
"status": "Active",
|
||||
"time": "09:30",
|
||||
"current": false,
|
||||
"selected": false,
|
||||
"checked": false,
|
||||
"disabled": false,
|
||||
"outgoing": true,
|
||||
"open": true,
|
||||
"number": 2,
|
||||
"count": 32,
|
||||
"percentage": 72,
|
||||
"color": "#7c3aed",
|
||||
"target": "_self",
|
||||
"ariaLabel": "Open primary workflow 2",
|
||||
"items": [
|
||||
<span>{</span>
|
||||
"label": "Nested option A",
|
||||
"value": "nested-a"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Nested option B",
|
||||
"value": "nested-b"
|
||||
<span>}</span>
|
||||
],
|
||||
"links": [
|
||||
<span>{</span>
|
||||
"label": "Documentation",
|
||||
"href": "#documentation"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "API reference",
|
||||
"href": "#api-reference"
|
||||
<span>}</span>
|
||||
],
|
||||
"values": [
|
||||
"Included",
|
||||
"Standard"
|
||||
]
|
||||
<span>}</span>
|
||||
]'
|
||||
title="Context Menu example"
|
||||
description="A polished default context menu for a modern application."
|
||||
label="Context Menu">
|
||||
<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 data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu></code></pre>
|
||||
<pre><code data-playground-code>page ContextMenuExample <span>{</span>
|
||||
state items = [
|
||||
<span>{</span>
|
||||
"id": "context-menu-0-1",
|
||||
"key": "context-menu-0-1",
|
||||
"value": "primary",
|
||||
"label": "Primary workflow",
|
||||
"title": "Primary workflow",
|
||||
"description": "A clean default configuration for everyday product interfaces.",
|
||||
"text": "A configurable sample message.",
|
||||
"href": "#context-menu-demo",
|
||||
"actionHref": "#context-menu-demo",
|
||||
"actionLabel": "View details",
|
||||
"icon": "icon-[lucide--sparkles]",
|
||||
"iconClass": "icon-[lucide--sparkles]",
|
||||
"variant": "primary",
|
||||
"status": "Active",
|
||||
"time": "09:30",
|
||||
"current": true,
|
||||
"selected": true,
|
||||
"checked": true,
|
||||
"disabled": false,
|
||||
"outgoing": false,
|
||||
"open": true,
|
||||
"number": 1,
|
||||
"count": 16,
|
||||
"percentage": 72,
|
||||
"color": "#7c3aed",
|
||||
"target": "_self",
|
||||
"ariaLabel": "Open primary workflow 1",
|
||||
"items": [
|
||||
<span>{</span>
|
||||
"label": "Nested option A",
|
||||
"value": "nested-a"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Nested option B",
|
||||
"value": "nested-b"
|
||||
<span>}</span>
|
||||
],
|
||||
"links": [
|
||||
<span>{</span>
|
||||
"label": "Documentation",
|
||||
"href": "#documentation"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "API reference",
|
||||
"href": "#api-reference"
|
||||
<span>}</span>
|
||||
],
|
||||
"values": [
|
||||
"Included",
|
||||
"Standard"
|
||||
]
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"id": "context-menu-0-2",
|
||||
"key": "context-menu-0-2",
|
||||
"value": "secondary",
|
||||
"label": "Additional option",
|
||||
"title": "Supporting example",
|
||||
"description": "A clean default configuration for everyday product interfaces.",
|
||||
"text": "Another configurable message.",
|
||||
"href": "#context-menu-demo",
|
||||
"actionHref": "#context-menu-demo",
|
||||
"actionLabel": "View details",
|
||||
"icon": "icon-[lucide--sparkles]",
|
||||
"iconClass": "icon-[lucide--sparkles]",
|
||||
"variant": "primary",
|
||||
"status": "Active",
|
||||
"time": "09:30",
|
||||
"current": false,
|
||||
"selected": false,
|
||||
"checked": false,
|
||||
"disabled": false,
|
||||
"outgoing": true,
|
||||
"open": true,
|
||||
"number": 2,
|
||||
"count": 32,
|
||||
"percentage": 72,
|
||||
"color": "#7c3aed",
|
||||
"target": "_self",
|
||||
"ariaLabel": "Open primary workflow 2",
|
||||
"items": [
|
||||
<span>{</span>
|
||||
"label": "Nested option A",
|
||||
"value": "nested-a"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Nested option B",
|
||||
"value": "nested-b"
|
||||
<span>}</span>
|
||||
],
|
||||
"links": [
|
||||
<span>{</span>
|
||||
"label": "Documentation",
|
||||
"href": "#documentation"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "API reference",
|
||||
"href": "#api-reference"
|
||||
<span>}</span>
|
||||
],
|
||||
"values": [
|
||||
"Included",
|
||||
"Standard"
|
||||
]
|
||||
<span>}</span>
|
||||
]
|
||||
view <span>{</span>
|
||||
<ContextMenu
|
||||
items="<span>{</span>items<span>}</span>"
|
||||
title="Context Menu example"
|
||||
description="A polished default context menu for a modern application."
|
||||
label="Context Menu">
|
||||
<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 data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu>
|
||||
<span>}</span>
|
||||
<span>}</span></code></pre>
|
||||
</section>
|
||||
<div class="playground-status" data-playground-status aria-live="polite"></div>
|
||||
<div class="playground-event-log" data-playground-event-log aria-live="polite"><strong>Event output</strong><span>Interact with the preview to inspect the typed <code>payload</code>.</span></div>
|
||||
@@ -194,7 +199,7 @@ page ContextMenuDetail {
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
}
|
||||
]</textarea><em data-playground-error></em></label><label class="playground-toggle" for="playground-context-menu-open"><span><strong>open</strong><small>boolean</small></span><input id="playground-context-menu-open" name="pg_open" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-context-menu-defaultOpen"><span><strong>default Open</strong><small>boolean</small></span><input id="playground-context-menu-defaultOpen" name="pg_defaultOpen" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-context-menu-trigger"><span><strong>trigger</strong><small>string</small></span><select id="playground-context-menu-trigger" name="pg_trigger"><option value="click" selected>click</option><option value="contextmenu">contextmenu</option><option value="both">both</option><option value="manual">manual</option><option value="hover">hover</option><option value="focus">focus</option></select></label><label class="playground-field" for="playground-context-menu-placement"><span><strong>placement</strong><small>string</small></span><select id="playground-context-menu-placement" name="pg_placement"><option value="pointer" selected>pointer</option><option value="top-start">top-start</option><option value="top-end">top-end</option><option value="bottom-start">bottom-start</option><option value="bottom-end">bottom-end</option><option value="top">top</option><option value="right">right</option><option value="right-start">right-start</option><option value="right-end">right-end</option><option value="bottom">bottom</option><option value="left">left</option><option value="left-start">left-start</option><option value="left-end">left-end</option></select></label><label class="playground-field" for="playground-context-menu-align"><span><strong>align</strong><small>string</small></span><select id="playground-context-menu-align" name="pg_align"><option value="start" selected>start</option><option value="center">center</option><option value="end">end</option><option value="left">left</option><option value="right">right</option><option value="stretch">stretch</option></select></label><label class="playground-field" for="playground-context-menu-size"><span><strong>size</strong><small>string</small></span><select id="playground-context-menu-size" name="pg_size"><option value="default" selected>default</option><option value="sm">sm</option><option value="lg">lg</option><option value="xs">xs</option><option value="md">md</option><option value="xl">xl</option><option value="icon">icon</option><option value="icon-xs">icon-xs</option><option value="icon-sm">icon-sm</option><option value="icon-lg">icon-lg</option></select></label><label class="playground-field" for="playground-context-menu-color"><span><strong>color</strong><small>string</small></span><select id="playground-context-menu-color" name="pg_color"><option value="primary" selected>primary</option><option value="secondary">secondary</option><option value="success">success</option><option value="warning">warning</option><option value="danger">danger</option><option value="info">info</option></select></label><label class="playground-field" for="playground-context-menu-variant"><span><strong>variant</strong><small>string</small></span><select id="playground-context-menu-variant" name="pg_variant"><option value="raised" selected>raised</option><option value="default">default</option><option value="soft">soft</option><option value="outline">outline</option></select></label><label class="playground-field" for="playground-context-menu-title"><span><strong>title</strong><small>string</small></span><input id="playground-context-menu-title" name="pg_title" type="text" value="Context Menu example" /></label><label class="playground-field" for="playground-context-menu-description"><span><strong>description</strong><small>string</small></span><input id="playground-context-menu-description" name="pg_description" type="text" value="A polished default context menu for a modern application." /></label><label class="playground-field" for="playground-context-menu-label"><span><strong>label</strong><small>string</small></span><input id="playground-context-menu-label" name="pg_label" type="text" value="Context Menu" /></label><label class="playground-toggle" for="playground-context-menu-closeOnSelect"><span><strong>close On Select</strong><small>boolean</small></span><input id="playground-context-menu-closeOnSelect" name="pg_closeOnSelect" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-context-menu-closeOnOutside"><span><strong>close On Outside</strong><small>boolean</small></span><input id="playground-context-menu-closeOnOutside" name="pg_closeOnOutside" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></labLine truncated
|
||||
]</textarea><em data-playground-error></em></label><label class="playground-toggle" for="playground-context-menu-open"><span><strong>open</strong><small>boolean</small></span><input id="playground-context-menu-open" name="pg_open" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-context-menu-defaultOpen"><span><strong>default Open</strong><small>boolean</small></span><input id="playground-context-menu-defaultOpen" name="pg_defaultOpen" type="checkbox" value="true" data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-field" for="playground-context-menu-trigger"><span><strong>trigger</strong><small>string</small></span><select id="playground-context-menu-trigger" name="pg_trigger"><option value="contextmenu" selected>contextmenu</option><option value="click">click</option><option value="both">both</option><option value="manual">manual</option><option value="hover">hover</option><option value="focus">focus</option></select></label><label class="playground-field" for="playground-context-menu-placement"><span><strong>placement</strong><small>string</small></span><select id="playground-context-menu-placement" name="pg_placement"><option value="pointer" selected>pointer</option><option value="top-start">top-start</option><option value="top-end">top-end</option><option value="bottom-start">bottom-start</option><option value="bottom-end">bottom-end</option><option value="top">top</option><option value="right">right</option><option value="right-start">right-start</option><option value="right-end">right-end</option><option value="bottom">bottom</option><option value="left">left</option><option value="left-start">left-start</option><option value="left-end">left-end</option></select></label><label class="playground-field" for="playground-context-menu-align"><span><strong>align</strong><small>string</small></span><select id="playground-context-menu-align" name="pg_align"><option value="start" selected>start</option><option value="center">center</option><option value="end">end</option><option value="left">left</option><option value="right">right</option><option value="stretch">stretch</option></select></label><label class="playground-field" for="playground-context-menu-size"><span><strong>size</strong><small>string</small></span><select id="playground-context-menu-size" name="pg_size"><option value="default" selected>default</option><option value="sm">sm</option><option value="lg">lg</option><option value="xs">xs</option><option value="md">md</option><option value="xl">xl</option><option value="icon">icon</option><option value="icon-xs">icon-xs</option><option value="icon-sm">icon-sm</option><option value="icon-lg">icon-lg</option></select></label><label class="playground-field" for="playground-context-menu-color"><span><strong>color</strong><small>string</small></span><select id="playground-context-menu-color" name="pg_color"><option value="primary" selected>primary</option><option value="secondary">secondary</option><option value="success">success</option><option value="warning">warning</option><option value="danger">danger</option><option value="info">info</option></select></label><label class="playground-field" for="playground-context-menu-variant"><span><strong>variant</strong><small>string</small></span><select id="playground-context-menu-variant" name="pg_variant"><option value="raised" selected>raised</option><option value="default">default</option><option value="soft">soft</option><option value="outline">outline</option></select></label><label class="playground-field" for="playground-context-menu-title"><span><strong>title</strong><small>string</small></span><input id="playground-context-menu-title" name="pg_title" type="text" value="Context Menu example" /></label><label class="playground-field" for="playground-context-menu-description"><span><strong>description</strong><small>string</small></span><input id="playground-context-menu-description" name="pg_description" type="text" value="A polished default context menu for a modern application." /></label><label class="playground-field" for="playground-context-menu-label"><span><strong>label</strong><small>string</small></span><input id="playground-context-menu-label" name="pg_label" type="text" value="Context Menu" /></label><label class="playground-toggle" for="playground-context-menu-closeOnSelect"><span><strong>close On Select</strong><small>boolean</small></span><input id="playground-context-menu-closeOnSelect" name="pg_closeOnSelect" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></label><label class="playground-toggle" for="playground-context-menu-closeOnOutside"><span><strong>close On Outside</strong><small>boolean</small></span><input id="playground-context-menu-closeOnOutside" name="pg_closeOnOutside" type="checkbox" value="true" checked data-playground-boolean /><i aria-hidden="true"></i></labLine truncated
|
||||
</form>
|
||||
</div>
|
||||
</section>
|
||||
@@ -214,43 +219,48 @@ page ContextMenuDetail {
|
||||
</div>
|
||||
<section class="demo-code" aria-label="Right-click record actions usage">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
||||
<pre><code><ContextMenu
|
||||
items='[
|
||||
<span>{</span>
|
||||
"label": "Open dashboard",
|
||||
"description": "View the operational workspace",
|
||||
"value": "dashboard",
|
||||
"icon": "icon-[lucide--layout-dashboard]"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Share record",
|
||||
"value": "share",
|
||||
"icon": "icon-[lucide--share-2]",
|
||||
"shortcut": "Ctrl S"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"type": "divider"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Delete record",
|
||||
"value": "delete",
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
<span>}</span>
|
||||
]'
|
||||
title="Record actions"
|
||||
description="Right-click the target surface"
|
||||
label="Context Menu">
|
||||
<div data-slot="trigger">
|
||||
<div class="showcase-context-target">Right-click for contextual actions</div>
|
||||
</div>
|
||||
<div data-slot="header">
|
||||
<div class="showcase-slot">header slot</div>
|
||||
</div>
|
||||
<div data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu></code></pre>
|
||||
<pre><code>page ContextMenuExample <span>{</span>
|
||||
state items = [
|
||||
<span>{</span>
|
||||
"label": "Open dashboard",
|
||||
"description": "View the operational workspace",
|
||||
"value": "dashboard",
|
||||
"icon": "icon-[lucide--layout-dashboard]"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Share record",
|
||||
"value": "share",
|
||||
"icon": "icon-[lucide--share-2]",
|
||||
"shortcut": "Ctrl S"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"type": "divider"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Delete record",
|
||||
"value": "delete",
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
<span>}</span>
|
||||
]
|
||||
view <span>{</span>
|
||||
<ContextMenu
|
||||
items="<span>{</span>items<span>}</span>"
|
||||
title="Record actions"
|
||||
description="Right-click the target surface"
|
||||
label="Context Menu">
|
||||
<div data-slot="trigger">
|
||||
<div class="showcase-context-target">Right-click for contextual actions</div>
|
||||
</div>
|
||||
<div data-slot="header">
|
||||
<div class="showcase-slot">header slot</div>
|
||||
</div>
|
||||
<div data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu>
|
||||
<span>}</span>
|
||||
<span>}</span></code></pre>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
@@ -267,48 +277,53 @@ page ContextMenuDetail {
|
||||
</div>
|
||||
<section class="demo-code" aria-label="Click-triggered compact menu usage">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
||||
<pre><code><ContextMenu
|
||||
items='[
|
||||
<span>{</span>
|
||||
"label": "Open dashboard",
|
||||
"description": "View the operational workspace",
|
||||
"value": "dashboard",
|
||||
"icon": "icon-[lucide--layout-dashboard]"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Share record",
|
||||
"value": "share",
|
||||
"icon": "icon-[lucide--share-2]",
|
||||
"shortcut": "Ctrl S"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"type": "divider"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Delete record",
|
||||
"value": "delete",
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
<span>}</span>
|
||||
]'
|
||||
trigger="click"
|
||||
align="center"
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
title="Quick actions"
|
||||
description="A compact configuration for dashboards and dense product surfaces."
|
||||
label="Compact example"
|
||||
minWidth="12rem">
|
||||
<div data-slot="trigger">
|
||||
<button type="button" class="showcase-action">Open quick actions</button>
|
||||
</div>
|
||||
<div data-slot="header">
|
||||
<div class="showcase-slot">header slot</div>
|
||||
</div>
|
||||
<div data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu></code></pre>
|
||||
<pre><code>page ContextMenuExample <span>{</span>
|
||||
state items = [
|
||||
<span>{</span>
|
||||
"label": "Open dashboard",
|
||||
"description": "View the operational workspace",
|
||||
"value": "dashboard",
|
||||
"icon": "icon-[lucide--layout-dashboard]"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Share record",
|
||||
"value": "share",
|
||||
"icon": "icon-[lucide--share-2]",
|
||||
"shortcut": "Ctrl S"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"type": "divider"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Delete record",
|
||||
"value": "delete",
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
<span>}</span>
|
||||
]
|
||||
view <span>{</span>
|
||||
<ContextMenu
|
||||
items="<span>{</span>items<span>}</span>"
|
||||
trigger="click"
|
||||
align="center"
|
||||
size="sm"
|
||||
variant="secondary"
|
||||
title="Quick actions"
|
||||
description="A compact configuration for dashboards and dense product surfaces."
|
||||
label="Compact example"
|
||||
minWidth="12rem">
|
||||
<div data-slot="trigger">
|
||||
<button type="button" class="showcase-action">Open quick actions</button>
|
||||
</div>
|
||||
<div data-slot="header">
|
||||
<div class="showcase-slot">header slot</div>
|
||||
</div>
|
||||
<div data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu>
|
||||
<span>}</span>
|
||||
<span>}</span></code></pre>
|
||||
</section>
|
||||
</div>
|
||||
</article>
|
||||
@@ -325,48 +340,53 @@ page ContextMenuDetail {
|
||||
</div>
|
||||
<section class="demo-code" aria-label="Pointer and keyboard menu usage">
|
||||
<header><span><span class="icon-[lucide--code-2] size-4" aria-hidden="true"></span>Component usage</span><small>.wrn</small></header>
|
||||
<pre><code><ContextMenu
|
||||
items='[
|
||||
<span>{</span>
|
||||
"label": "Open dashboard",
|
||||
"description": "View the operational workspace",
|
||||
"value": "dashboard",
|
||||
"icon": "icon-[lucide--layout-dashboard]"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Share record",
|
||||
"value": "share",
|
||||
"icon": "icon-[lucide--share-2]",
|
||||
"shortcut": "Ctrl S"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"type": "divider"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Delete record",
|
||||
"value": "delete",
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
<span>}</span>
|
||||
]'
|
||||
trigger="both"
|
||||
placement="bottom-start"
|
||||
align="end"
|
||||
size="lg"
|
||||
variant="soft"
|
||||
title="Accessible actions"
|
||||
description="A richer configuration demonstrating additional content and hierarchy."
|
||||
label="Advanced example">
|
||||
<div data-slot="trigger">
|
||||
<button type="button" class="showcase-action">Click, press Enter, or right-click</button>
|
||||
</div>
|
||||
<div data-slot="header">
|
||||
<div class="showcase-slot">header slot</div>
|
||||
</div>
|
||||
<div data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu></code></pre>
|
||||
<pre><code>page ContextMenuExample <span>{</span>
|
||||
state items = [
|
||||
<span>{</span>
|
||||
"label": "Open dashboard",
|
||||
"description": "View the operational workspace",
|
||||
"value": "dashboard",
|
||||
"icon": "icon-[lucide--layout-dashboard]"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Share record",
|
||||
"value": "share",
|
||||
"icon": "icon-[lucide--share-2]",
|
||||
"shortcut": "Ctrl S"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"type": "divider"
|
||||
<span>}</span>,
|
||||
<span>{</span>
|
||||
"label": "Delete record",
|
||||
"value": "delete",
|
||||
"icon": "icon-[lucide--trash-2]",
|
||||
"danger": true
|
||||
<span>}</span>
|
||||
]
|
||||
view <span>{</span>
|
||||
<ContextMenu
|
||||
items="<span>{</span>items<span>}</span>"
|
||||
trigger="both"
|
||||
placement="bottom-start"
|
||||
align="end"
|
||||
size="lg"
|
||||
variant="soft"
|
||||
title="Accessible actions"
|
||||
description="A richer configuration demonstrating additional content and hierarchy."
|
||||
label="Advanced example">
|
||||
<div data-slot="trigger">
|
||||
<button type="button" class="showcase-action">Click, press Enter, or right-click</button>
|
||||
</div>
|
||||
<div data-slot="header">
|
||||
<div class="showcase-slot">header slot</div>
|
||||
</div>
|
||||
<div data-slot="footer">
|
||||
<div class="showcase-slot">footer slot</div>
|
||||
</div>
|
||||
</ContextMenu>
|
||||
<span>}</span>
|
||||
<span>}</span></code></pre>
|
||||
</section>
|
||||
</div>
|
||||
</article></div></section>
|
||||
|
||||
Reference in new issue
Block a user