wally-ui 1.12.1 → 1.13.0
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/cli.js +8 -5
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/playground/showcase/src/app/app.routes.server.ts +4 -0
- package/playground/showcase/src/app/components/ai/ai-composer/ai-composer.html +164 -31
- package/playground/showcase/src/app/components/ai/ai-composer/ai-composer.ts +25 -3
- package/playground/showcase/src/app/components/ai/ai-prompt-input/ai-prompt-input.html +1 -1
- package/playground/showcase/src/app/components/badge/badge.css +0 -0
- package/playground/showcase/src/app/components/badge/badge.html +3 -0
- package/playground/showcase/src/app/components/badge/badge.ts +24 -0
- package/playground/showcase/src/app/components/button/button.html +1 -3
- package/playground/showcase/src/app/components/button/button.ts +4 -4
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-content/dropdown-menu-content.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-content/dropdown-menu-content.html +9 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-content/dropdown-menu-content.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-content/dropdown-menu-content.ts +167 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-group/dropdown-menu-group.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-group/dropdown-menu-group.html +5 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-group/dropdown-menu-group.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-group/dropdown-menu-group.ts +10 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-item/dropdown-menu-item.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-item/dropdown-menu-item.html +6 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-item/dropdown-menu-item.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-item/dropdown-menu-item.ts +37 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-label/dropdown-menu-label.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-label/dropdown-menu-label.html +3 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-label/dropdown-menu-label.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-label/dropdown-menu-label.ts +11 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-portal/dropdown-menu-portal.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-portal/dropdown-menu-portal.html +1 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-portal/dropdown-menu-portal.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-portal/dropdown-menu-portal.ts +11 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-separator/dropdown-menu-separator.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-separator/dropdown-menu-separator.html +1 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-separator/dropdown-menu-separator.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-separator/dropdown-menu-separator.ts +11 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub/dropdown-menu-sub.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub/dropdown-menu-sub.html +3 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub/dropdown-menu-sub.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub/dropdown-menu-sub.ts +16 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-content/dropdown-menu-sub-content.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-content/dropdown-menu-sub-content.html +9 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-content/dropdown-menu-sub-content.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-content/dropdown-menu-sub-content.ts +31 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.html +13 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-trigger/dropdown-menu-sub-trigger.ts +40 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub.service.spec.ts +16 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub.service.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-trigger/dropdown-menu-trigger.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-trigger/dropdown-menu-trigger.html +8 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-trigger/dropdown-menu-trigger.spec.ts +23 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-trigger/dropdown-menu-trigger.ts +55 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu.css +0 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu.html +3 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu.service.spec.ts +16 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu.service.ts +31 -0
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu.ts +69 -0
- package/playground/showcase/src/app/components/tooltip/tooltip.ts +195 -80
- package/playground/showcase/src/app/pages/documentation/components/components.html +110 -51
- package/playground/showcase/src/app/pages/documentation/components/components.routes.ts +4 -0
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.css +1 -0
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.examples.ts +404 -0
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.html +612 -0
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.ts +127 -0
- package/playground/showcase/src/app/pages/home/home.html +10 -6
|
@@ -0,0 +1,612 @@
|
|
|
1
|
+
<main class="min-h-dvh bg-white dark:bg-[#0a0a0a] font-mono" role="main">
|
|
2
|
+
<div class="max-w-4xl mx-auto px-4 py-8 sm:px-6 md:px-8">
|
|
3
|
+
|
|
4
|
+
<!-- Breadcrumb Navigation -->
|
|
5
|
+
<nav class="mb-8" aria-label="Breadcrumb navigation">
|
|
6
|
+
<wally-breadcrumb [items]="breadcrumbItems"></wally-breadcrumb>
|
|
7
|
+
</nav>
|
|
8
|
+
|
|
9
|
+
<!-- Header -->
|
|
10
|
+
<header class="mb-12" role="banner">
|
|
11
|
+
<h1 id="page-title" class="text-3xl sm:text-4xl font-bold text-[#0a0a0a] dark:text-white mb-4 uppercase">
|
|
12
|
+
<span aria-hidden="true">>_ </span>Dropdown Menu
|
|
13
|
+
</h1>
|
|
14
|
+
<p
|
|
15
|
+
class="text-sm sm:text-base text-neutral-700 dark:text-neutral-300 border-l-2 border-neutral-300 dark:border-neutral-700 pl-4 leading-relaxed">
|
|
16
|
+
A composable dropdown menu component inspired by Radix UI and shadcn/ui. Features click and hover modes,
|
|
17
|
+
nested submenus, keyboard navigation, viewport-aware positioning, and full accessibility support.
|
|
18
|
+
</p>
|
|
19
|
+
</header>
|
|
20
|
+
|
|
21
|
+
<!-- AI Assistant Links -->
|
|
22
|
+
<div class="flex flex-wrap gap-0 mt-6 mb-12 border-2 border-neutral-300 dark:border-neutral-700" role="list"
|
|
23
|
+
aria-label="Open documentation in AI coding assistants">
|
|
24
|
+
<a [href]="claudeUrl" target="_blank"
|
|
25
|
+
class="group flex-1 min-w-[200px] flex items-center justify-center gap-2 px-4 py-3 bg-white dark:bg-[#0a0a0a] border-b-2 sm:border-b-0 sm:border-r-2 border-neutral-300 dark:border-neutral-700 hover:bg-[#0a0a0a] dark:hover:bg-white transition-all duration-150 cursor-pointer"
|
|
26
|
+
rel="noopener noreferrer" role="listitem"
|
|
27
|
+
aria-label="Open Dropdown Menu component documentation in Claude AI assistant (opens in new tab)">
|
|
28
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
29
|
+
class="size-5 text-[#0a0a0a] dark:text-neutral-400 group-hover:text-white dark:group-hover:text-[#0a0a0a] transition-colors duration-150"
|
|
30
|
+
viewBox="0 0 24 24" aria-hidden="true">
|
|
31
|
+
<path fill="currentColor"
|
|
32
|
+
d="m4.714 15.956l4.718-2.648l.079-.23l-.08-.128h-.23l-.79-.048l-2.695-.073l-2.337-.097l-2.265-.122l-.57-.121l-.535-.704l.055-.353l.48-.321l.685.06l1.518.104l2.277.157l1.651.098l2.447.255h.389l.054-.158l-.133-.097l-.103-.098l-2.356-1.596l-2.55-1.688l-1.336-.972l-.722-.491L2 6.223l-.158-1.008l.656-.722l.88.06l.224.061l.893.686l1.906 1.476l2.49 1.833l.364.304l.146-.104l.018-.072l-.164-.274l-1.354-2.446l-1.445-2.49l-.644-1.032l-.17-.619a3 3 0 0 1-.103-.729L6.287.133L6.7 0l.995.134l.42.364l.619 1.415L9.735 4.14l1.555 3.03l.455.898l.243.832l.09.255h.159V9.01l.127-1.706l.237-2.095l.23-2.695l.08-.76l.376-.91l.747-.492l.583.28l.48.685l-.067.444l-.286 1.851l-.558 2.903l-.365 1.942h.213l.243-.242l.983-1.306l1.652-2.064l.728-.82l.85-.904l.547-.431h1.032l.759 1.129l-.34 1.166l-1.063 1.347l-.88 1.142l-1.263 1.7l-.79 1.36l.074.11l.188-.02l2.853-.606l1.542-.28l1.84-.315l.832.388l.09.395l-.327.807l-1.967.486l-2.307.462l-3.436.813l-.043.03l.049.061l1.548.146l.662.036h1.62l3.018.225l.79.522l.473.638l-.08.485l-1.213.62l-1.64-.389l-3.825-.91l-1.31-.329h-.183v.11l1.093 1.068l2.003 1.81l2.508 2.33l.127.578l-.321.455l-.34-.049l-2.204-1.657l-.85-.747l-1.925-1.62h-.127v.17l.443.649l2.343 3.521l.122 1.08l-.17.353l-.607.213l-.668-.122l-1.372-1.924l-1.415-2.168l-1.141-1.943l-.14.08l-.674 7.254l-.316.37l-.728.28l-.607-.461l-.322-.747l.322-1.476l.388-1.924l.316-1.53l.285-1.9l.17-.632l-.012-.042l-.14.018l-1.432 1.967l-2.18 2.945l-1.724 1.845l-.413.164l-.716-.37l.066-.662l.401-.589l2.386-3.036l1.439-1.882l.929-1.086l-.006-.158h-.055L4.138 18.56l-1.13.146l-.485-.456l.06-.746l.231-.243l1.907-1.312Z" />
|
|
33
|
+
</svg>
|
|
34
|
+
<span
|
|
35
|
+
class="text-xs sm:text-sm font-medium text-[#0a0a0a] dark:text-neutral-400 group-hover:text-white dark:group-hover:text-[#0a0a0a] transition-colors duration-150">
|
|
36
|
+
Open in Claude
|
|
37
|
+
</span>
|
|
38
|
+
</a>
|
|
39
|
+
|
|
40
|
+
<a [href]="chatGptUrl" target="_blank"
|
|
41
|
+
class="group flex-1 min-w-[200px] flex items-center justify-center gap-2 px-4 py-3 bg-white dark:bg-[#0a0a0a] hover:bg-[#0a0a0a] dark:hover:bg-white transition-all duration-150 cursor-pointer"
|
|
42
|
+
rel="noopener noreferrer" role="listitem"
|
|
43
|
+
aria-label="Open Dropdown Menu component documentation in ChatGPT AI assistant (opens in new tab)">
|
|
44
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
45
|
+
class="size-5 text-[#0a0a0a] dark:text-neutral-400 group-hover:text-white dark:group-hover:text-[#0a0a0a] transition-colors duration-150"
|
|
46
|
+
viewBox="0 0 48 48" aria-hidden="true">
|
|
47
|
+
<path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
|
|
48
|
+
d="M18.38 27.94v-14.4l11.19-6.46c6.2-3.58 17.3 5.25 12.64 13.33" />
|
|
49
|
+
<path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
|
|
50
|
+
d="m18.38 20.94l12.47-7.2l11.19 6.46c6.2 3.58 4.1 17.61-5.23 17.61" />
|
|
51
|
+
<path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
|
|
52
|
+
d="m24.44 17.44l12.47 7.2v12.93c0 7.16-13.2 12.36-17.86 4.28" />
|
|
53
|
+
<path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
|
|
54
|
+
d="M30.5 21.2v14.14L19.31 41.8c-6.2 3.58-17.3-5.25-12.64-13.33" />
|
|
55
|
+
<path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
|
|
56
|
+
d="m30.5 27.94l-12.47 7.2l-11.19-6.46c-6.21-3.59-4.11-17.61 5.22-17.61" />
|
|
57
|
+
<path fill="none" stroke="currentColor" stroke-width="3" stroke-linejoin="round"
|
|
58
|
+
d="m24.44 31.44l-12.47-7.2V11.31c0-7.16 13.2-12.36 17.86-4.28" />
|
|
59
|
+
</svg>
|
|
60
|
+
<span
|
|
61
|
+
class="text-xs sm:text-sm font-medium text-[#0a0a0a] dark:text-neutral-400 group-hover:text-white dark:group-hover:text-[#0a0a0a] transition-colors duration-150">
|
|
62
|
+
Open in ChatGPT
|
|
63
|
+
</span>
|
|
64
|
+
</a>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- Installation -->
|
|
68
|
+
<section id="installation" class="mb-12" aria-labelledby="installation-heading">
|
|
69
|
+
<h2 id="installation-heading"
|
|
70
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
71
|
+
[ Installation ]
|
|
72
|
+
</h2>
|
|
73
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3">
|
|
74
|
+
<pre><code [innerHTML]="installationCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
75
|
+
</div>
|
|
76
|
+
</section>
|
|
77
|
+
|
|
78
|
+
<!-- Import -->
|
|
79
|
+
<section id="import" class="mb-12" aria-labelledby="import-heading">
|
|
80
|
+
<h2 id="import-heading"
|
|
81
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
82
|
+
[ Import ]
|
|
83
|
+
</h2>
|
|
84
|
+
<div class="space-y-3">
|
|
85
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3">
|
|
86
|
+
<pre><code [innerHTML]="importCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
87
|
+
</div>
|
|
88
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3">
|
|
89
|
+
<pre><code [innerHTML]="componentImportCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</section>
|
|
93
|
+
|
|
94
|
+
<!-- Basic Usage -->
|
|
95
|
+
<section id="basic-usage" class="mb-12" aria-labelledby="basic-usage-heading">
|
|
96
|
+
<h2 id="basic-usage-heading"
|
|
97
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
98
|
+
[ Basic Usage ]
|
|
99
|
+
</h2>
|
|
100
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3 mb-4">
|
|
101
|
+
<pre><code [innerHTML]="basicUsageCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
102
|
+
</div>
|
|
103
|
+
<div class="p-8 border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-[#0a0a0a]" role="img"
|
|
104
|
+
aria-label="Live preview of basic dropdown menu">
|
|
105
|
+
<wally-dropdown-menu>
|
|
106
|
+
<wally-dropdown-menu-trigger>
|
|
107
|
+
<wally-button variant="outline">Open Menu</wally-button>
|
|
108
|
+
</wally-dropdown-menu-trigger>
|
|
109
|
+
|
|
110
|
+
<wally-dropdown-menu-content>
|
|
111
|
+
<wally-dropdown-menu-item (click)="onProfile()">
|
|
112
|
+
Profile
|
|
113
|
+
</wally-dropdown-menu-item>
|
|
114
|
+
<wally-dropdown-menu-item (click)="onSettings()">
|
|
115
|
+
Settings
|
|
116
|
+
</wally-dropdown-menu-item>
|
|
117
|
+
<wally-dropdown-menu-item (click)="onLogout()">
|
|
118
|
+
Log out
|
|
119
|
+
</wally-dropdown-menu-item>
|
|
120
|
+
</wally-dropdown-menu-content>
|
|
121
|
+
</wally-dropdown-menu>
|
|
122
|
+
</div>
|
|
123
|
+
</section>
|
|
124
|
+
|
|
125
|
+
<!-- Component Architecture -->
|
|
126
|
+
<section id="architecture" class="mb-12" aria-labelledby="architecture-heading">
|
|
127
|
+
<h2 id="architecture-heading"
|
|
128
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
129
|
+
[ Component Architecture ]
|
|
130
|
+
</h2>
|
|
131
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 mb-4 leading-relaxed">
|
|
132
|
+
Dropdown Menu follows a composable architecture inspired by Radix UI and shadcn/ui. Each part is a separate
|
|
133
|
+
component that can be composed together for maximum flexibility.
|
|
134
|
+
</p>
|
|
135
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-4">
|
|
136
|
+
<pre class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"><code>wally-dropdown-menu Container (provides service)
|
|
137
|
+
├── wally-dropdown-menu-trigger Clickable element
|
|
138
|
+
└── wally-dropdown-menu-content Menu container
|
|
139
|
+
├── wally-dropdown-menu-label Section header
|
|
140
|
+
├── wally-dropdown-menu-separator Divider
|
|
141
|
+
├── wally-dropdown-menu-group Group wrapper
|
|
142
|
+
├── wally-dropdown-menu-item Menu item
|
|
143
|
+
└── wally-dropdown-menu-sub Submenu container
|
|
144
|
+
├── wally-dropdown-menu-sub-trigger
|
|
145
|
+
└── wally-dropdown-menu-sub-content</code></pre>
|
|
146
|
+
</div>
|
|
147
|
+
</section>
|
|
148
|
+
|
|
149
|
+
<!-- Advanced Examples -->
|
|
150
|
+
<section id="advanced-examples" class="mb-12" aria-labelledby="advanced-examples-heading">
|
|
151
|
+
<h2 id="advanced-examples-heading"
|
|
152
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
153
|
+
[ Advanced Examples ]
|
|
154
|
+
</h2>
|
|
155
|
+
|
|
156
|
+
<!-- With Label -->
|
|
157
|
+
<article class="mb-8" aria-labelledby="with-label-heading">
|
|
158
|
+
<h3 id="with-label-heading"
|
|
159
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-3 uppercase">
|
|
160
|
+
<span aria-hidden="true">> </span>With Label and Separator
|
|
161
|
+
</h3>
|
|
162
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 mb-3 leading-relaxed">
|
|
163
|
+
Use labels to organize sections and separators to create visual hierarchy.
|
|
164
|
+
</p>
|
|
165
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3 mb-4">
|
|
166
|
+
<pre><code [innerHTML]="withLabelCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
167
|
+
</div>
|
|
168
|
+
<div class="p-8 border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-[#0a0a0a]" role="img"
|
|
169
|
+
aria-label="Live preview of dropdown menu with label and separator">
|
|
170
|
+
<wally-dropdown-menu>
|
|
171
|
+
<wally-dropdown-menu-trigger>
|
|
172
|
+
<wally-button variant="outline">Account</wally-button>
|
|
173
|
+
</wally-dropdown-menu-trigger>
|
|
174
|
+
|
|
175
|
+
<wally-dropdown-menu-content>
|
|
176
|
+
<wally-dropdown-menu-label>
|
|
177
|
+
My Account
|
|
178
|
+
</wally-dropdown-menu-label>
|
|
179
|
+
<wally-dropdown-menu-separator></wally-dropdown-menu-separator>
|
|
180
|
+
<wally-dropdown-menu-item (click)="onProfile()">
|
|
181
|
+
Profile
|
|
182
|
+
</wally-dropdown-menu-item>
|
|
183
|
+
<wally-dropdown-menu-item (click)="onBilling()">
|
|
184
|
+
Billing
|
|
185
|
+
</wally-dropdown-menu-item>
|
|
186
|
+
</wally-dropdown-menu-content>
|
|
187
|
+
</wally-dropdown-menu>
|
|
188
|
+
</div>
|
|
189
|
+
</article>
|
|
190
|
+
|
|
191
|
+
<!-- With Icons -->
|
|
192
|
+
<article class="mb-8" aria-labelledby="with-icons-heading">
|
|
193
|
+
<h3 id="with-icons-heading"
|
|
194
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-3 uppercase">
|
|
195
|
+
<span aria-hidden="true">> </span>With Icons
|
|
196
|
+
</h3>
|
|
197
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 mb-3 leading-relaxed">
|
|
198
|
+
Add icons to menu items for better visual recognition.
|
|
199
|
+
</p>
|
|
200
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3 mb-4">
|
|
201
|
+
<pre><code [innerHTML]="withIconsCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
202
|
+
</div>
|
|
203
|
+
<div class="p-8 border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-[#0a0a0a]" role="img"
|
|
204
|
+
aria-label="Live preview of dropdown menu with icons">
|
|
205
|
+
<wally-dropdown-menu>
|
|
206
|
+
<wally-dropdown-menu-trigger>
|
|
207
|
+
<wally-button variant="outline">
|
|
208
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
|
209
|
+
stroke="currentColor" class="size-5">
|
|
210
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
211
|
+
d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" />
|
|
212
|
+
</svg>
|
|
213
|
+
Profile
|
|
214
|
+
</wally-button>
|
|
215
|
+
</wally-dropdown-menu-trigger>
|
|
216
|
+
|
|
217
|
+
<wally-dropdown-menu-content>
|
|
218
|
+
<wally-dropdown-menu-item (click)="onProfile()">
|
|
219
|
+
<div class="flex items-center gap-3">
|
|
220
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
|
221
|
+
stroke="currentColor" class="size-5">
|
|
222
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
223
|
+
d="M17.982 18.725A7.488 7.488 0 0 0 12 15.75a7.488 7.488 0 0 0-5.982 2.975m11.963 0a9 9 0 1 0-11.963 0m11.963 0A8.966 8.966 0 0 1 12 21a8.966 8.966 0 0 1-5.982-2.275M15 9.75a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
224
|
+
</svg>
|
|
225
|
+
<span>Account</span>
|
|
226
|
+
</div>
|
|
227
|
+
</wally-dropdown-menu-item>
|
|
228
|
+
<wally-dropdown-menu-item (click)="onSettings()">
|
|
229
|
+
<div class="flex items-center gap-3">
|
|
230
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
|
231
|
+
stroke="currentColor" class="size-5">
|
|
232
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
233
|
+
d="M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 0 1 1.37.49l1.296 2.247a1.125 1.125 0 0 1-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 0 1 0 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 0 1-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 0 1-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 0 1-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 0 1-1.369-.49l-1.297-2.247a1.125 1.125 0 0 1 .26-1.431l1.004-.827c.292-.240.437-.613.43-.991a6.932 6.932 0 0 1 0-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 0 1-.26-1.43l1.297-2.247a1.125 1.125 0 0 1 1.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28Z" />
|
|
234
|
+
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z" />
|
|
235
|
+
</svg>
|
|
236
|
+
<span>Settings</span>
|
|
237
|
+
</div>
|
|
238
|
+
</wally-dropdown-menu-item>
|
|
239
|
+
</wally-dropdown-menu-content>
|
|
240
|
+
</wally-dropdown-menu>
|
|
241
|
+
</div>
|
|
242
|
+
</article>
|
|
243
|
+
|
|
244
|
+
<!-- With Submenus -->
|
|
245
|
+
<article class="mb-8" aria-labelledby="with-submenus-heading">
|
|
246
|
+
<h3 id="with-submenus-heading"
|
|
247
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-3 uppercase">
|
|
248
|
+
<span aria-hidden="true">> </span>With Submenus
|
|
249
|
+
</h3>
|
|
250
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 mb-3 leading-relaxed">
|
|
251
|
+
Create nested menus for complex navigation structures. Hover over submenu triggers to open.
|
|
252
|
+
</p>
|
|
253
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3 mb-4">
|
|
254
|
+
<pre><code [innerHTML]="withSubmenusCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
255
|
+
</div>
|
|
256
|
+
<div class="p-8 border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-[#0a0a0a]" role="img"
|
|
257
|
+
aria-label="Live preview of dropdown menu with nested submenus">
|
|
258
|
+
<wally-dropdown-menu>
|
|
259
|
+
<wally-dropdown-menu-trigger>
|
|
260
|
+
<wally-button variant="outline">Options</wally-button>
|
|
261
|
+
</wally-dropdown-menu-trigger>
|
|
262
|
+
|
|
263
|
+
<wally-dropdown-menu-content>
|
|
264
|
+
<wally-dropdown-menu-item (click)="onEdit()">
|
|
265
|
+
Edit
|
|
266
|
+
</wally-dropdown-menu-item>
|
|
267
|
+
<wally-dropdown-menu-item (click)="onDuplicate()">
|
|
268
|
+
Duplicate
|
|
269
|
+
</wally-dropdown-menu-item>
|
|
270
|
+
|
|
271
|
+
<wally-dropdown-menu-separator></wally-dropdown-menu-separator>
|
|
272
|
+
|
|
273
|
+
<wally-dropdown-menu-sub>
|
|
274
|
+
<wally-dropdown-menu-sub-trigger>
|
|
275
|
+
<div class="flex items-center gap-3">
|
|
276
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
|
277
|
+
stroke="currentColor" class="size-5">
|
|
278
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
279
|
+
d="M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z" />
|
|
280
|
+
</svg>
|
|
281
|
+
<span>Share</span>
|
|
282
|
+
</div>
|
|
283
|
+
</wally-dropdown-menu-sub-trigger>
|
|
284
|
+
|
|
285
|
+
<wally-dropdown-menu-sub-content>
|
|
286
|
+
<wally-dropdown-menu-item (click)="onShareEmail()">
|
|
287
|
+
Email
|
|
288
|
+
</wally-dropdown-menu-item>
|
|
289
|
+
<wally-dropdown-menu-item (click)="onShareLink()">
|
|
290
|
+
Copy Link
|
|
291
|
+
</wally-dropdown-menu-item>
|
|
292
|
+
<wally-dropdown-menu-item (click)="onShareSocial()">
|
|
293
|
+
Social Media
|
|
294
|
+
</wally-dropdown-menu-item>
|
|
295
|
+
</wally-dropdown-menu-sub-content>
|
|
296
|
+
</wally-dropdown-menu-sub>
|
|
297
|
+
|
|
298
|
+
<wally-dropdown-menu-separator></wally-dropdown-menu-separator>
|
|
299
|
+
|
|
300
|
+
<wally-dropdown-menu-item (click)="onDelete()">
|
|
301
|
+
Delete
|
|
302
|
+
</wally-dropdown-menu-item>
|
|
303
|
+
</wally-dropdown-menu-content>
|
|
304
|
+
</wally-dropdown-menu>
|
|
305
|
+
</div>
|
|
306
|
+
</article>
|
|
307
|
+
|
|
308
|
+
<!-- Hover Mode -->
|
|
309
|
+
<article class="mb-8" aria-labelledby="hover-mode-heading">
|
|
310
|
+
<h3 id="hover-mode-heading"
|
|
311
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-3 uppercase">
|
|
312
|
+
<span aria-hidden="true">> </span>Hover Trigger Mode
|
|
313
|
+
</h3>
|
|
314
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 mb-3 leading-relaxed">
|
|
315
|
+
Set <code class="text-blue-600 dark:text-blue-400">triggerMode="hover"</code> to open on hover instead of
|
|
316
|
+
click. Useful for navigation menus.
|
|
317
|
+
</p>
|
|
318
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3 mb-4">
|
|
319
|
+
<pre><code [innerHTML]="hoverModeCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
320
|
+
</div>
|
|
321
|
+
<div class="p-8 border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-[#0a0a0a]" role="img"
|
|
322
|
+
aria-label="Live preview of dropdown menu with hover trigger mode">
|
|
323
|
+
<wally-dropdown-menu [triggerMode]="'hover'">
|
|
324
|
+
<wally-dropdown-menu-trigger>
|
|
325
|
+
<wally-button variant="ghost">Hover Me</wally-button>
|
|
326
|
+
</wally-dropdown-menu-trigger>
|
|
327
|
+
|
|
328
|
+
<wally-dropdown-menu-content>
|
|
329
|
+
<wally-dropdown-menu-item (click)="onProfile()">
|
|
330
|
+
Profile
|
|
331
|
+
</wally-dropdown-menu-item>
|
|
332
|
+
<wally-dropdown-menu-item (click)="onSettings()">
|
|
333
|
+
Settings
|
|
334
|
+
</wally-dropdown-menu-item>
|
|
335
|
+
</wally-dropdown-menu-content>
|
|
336
|
+
</wally-dropdown-menu>
|
|
337
|
+
</div>
|
|
338
|
+
</article>
|
|
339
|
+
|
|
340
|
+
<!-- Destructive Actions -->
|
|
341
|
+
<article class="mb-8" aria-labelledby="destructive-heading">
|
|
342
|
+
<h3 id="destructive-heading"
|
|
343
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-3 uppercase">
|
|
344
|
+
<span aria-hidden="true">> </span>Destructive Actions
|
|
345
|
+
</h3>
|
|
346
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 mb-3 leading-relaxed">
|
|
347
|
+
Style dangerous actions with red text to indicate destructive behavior.
|
|
348
|
+
</p>
|
|
349
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3 mb-4">
|
|
350
|
+
<pre><code [innerHTML]="destructiveActionCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
351
|
+
</div>
|
|
352
|
+
<div class="p-8 border-2 border-neutral-300 dark:border-neutral-700 bg-white dark:bg-[#0a0a0a]" role="img"
|
|
353
|
+
aria-label="Live preview of dropdown menu with destructive action">
|
|
354
|
+
<wally-dropdown-menu>
|
|
355
|
+
<wally-dropdown-menu-trigger>
|
|
356
|
+
<wally-button variant="ghost">
|
|
357
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5"
|
|
358
|
+
stroke="currentColor" class="size-5">
|
|
359
|
+
<path stroke-linecap="round" stroke-linejoin="round"
|
|
360
|
+
d="M12 6.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 12.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5ZM12 18.75a.75.75 0 1 1 0-1.5.75.75 0 0 1 0 1.5Z" />
|
|
361
|
+
</svg>
|
|
362
|
+
</wally-button>
|
|
363
|
+
</wally-dropdown-menu-trigger>
|
|
364
|
+
|
|
365
|
+
<wally-dropdown-menu-content>
|
|
366
|
+
<wally-dropdown-menu-item (click)="onEdit()">
|
|
367
|
+
Edit
|
|
368
|
+
</wally-dropdown-menu-item>
|
|
369
|
+
<wally-dropdown-menu-item (click)="onDuplicate()">
|
|
370
|
+
Duplicate
|
|
371
|
+
</wally-dropdown-menu-item>
|
|
372
|
+
<wally-dropdown-menu-separator></wally-dropdown-menu-separator>
|
|
373
|
+
<wally-dropdown-menu-item (click)="onArchive()">
|
|
374
|
+
Archive
|
|
375
|
+
</wally-dropdown-menu-item>
|
|
376
|
+
<wally-dropdown-menu-separator></wally-dropdown-menu-separator>
|
|
377
|
+
<wally-dropdown-menu-item (click)="onDelete()">
|
|
378
|
+
<span class="text-red-600 dark:text-red-400">Delete</span>
|
|
379
|
+
</wally-dropdown-menu-item>
|
|
380
|
+
</wally-dropdown-menu-content>
|
|
381
|
+
</wally-dropdown-menu>
|
|
382
|
+
</div>
|
|
383
|
+
</article>
|
|
384
|
+
</section>
|
|
385
|
+
|
|
386
|
+
<!-- API Reference -->
|
|
387
|
+
<section id="api-reference" class="mb-12" aria-labelledby="api-heading">
|
|
388
|
+
<h2 id="api-heading"
|
|
389
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
390
|
+
[ API Reference ]
|
|
391
|
+
</h2>
|
|
392
|
+
|
|
393
|
+
<!-- DropdownMenu Props -->
|
|
394
|
+
<article class="mb-8" aria-labelledby="dropdown-menu-props-heading">
|
|
395
|
+
<h3 id="dropdown-menu-props-heading"
|
|
396
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-4 uppercase">
|
|
397
|
+
<span aria-hidden="true">> </span>DropdownMenu Props
|
|
398
|
+
</h3>
|
|
399
|
+
<div class="bg-white dark:bg-[#0f0f0f] border-2 border-neutral-300 dark:border-neutral-800 overflow-hidden">
|
|
400
|
+
<div class="overflow-x-auto">
|
|
401
|
+
<table class="w-full text-sm">
|
|
402
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
403
|
+
<tr>
|
|
404
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Property</th>
|
|
405
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Type</th>
|
|
406
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Default</th>
|
|
407
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Description</th>
|
|
408
|
+
</tr>
|
|
409
|
+
</thead>
|
|
410
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
411
|
+
<tr>
|
|
412
|
+
<td class="p-4 font-mono text-blue-600 dark:text-blue-400">triggerMode</td>
|
|
413
|
+
<td class="p-4 font-mono text-purple-600 dark:text-purple-400">'click' | 'hover'</td>
|
|
414
|
+
<td class="p-4 font-mono text-green-600 dark:text-green-400">'click'</td>
|
|
415
|
+
<td class="p-4 text-gray-700 dark:text-gray-300">How the dropdown opens - on click or hover</td>
|
|
416
|
+
</tr>
|
|
417
|
+
</tbody>
|
|
418
|
+
</table>
|
|
419
|
+
</div>
|
|
420
|
+
</div>
|
|
421
|
+
</article>
|
|
422
|
+
|
|
423
|
+
<!-- DropdownMenuContent Props -->
|
|
424
|
+
<article class="mb-8" aria-labelledby="content-props-heading">
|
|
425
|
+
<h3 id="content-props-heading"
|
|
426
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-4 uppercase">
|
|
427
|
+
<span aria-hidden="true">> </span>DropdownMenuContent Props
|
|
428
|
+
</h3>
|
|
429
|
+
<div class="bg-white dark:bg-[#0f0f0f] border-2 border-neutral-300 dark:border-neutral-800 overflow-hidden">
|
|
430
|
+
<div class="overflow-x-auto">
|
|
431
|
+
<table class="w-full text-sm">
|
|
432
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
433
|
+
<tr>
|
|
434
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Property</th>
|
|
435
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Type</th>
|
|
436
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Default</th>
|
|
437
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Description</th>
|
|
438
|
+
</tr>
|
|
439
|
+
</thead>
|
|
440
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
441
|
+
<tr>
|
|
442
|
+
<td class="p-4 font-mono text-blue-600 dark:text-blue-400">position</td>
|
|
443
|
+
<td class="p-4 font-mono text-purple-600 dark:text-purple-400">'top' | 'bottom' | 'left' | 'right'
|
|
444
|
+
</td>
|
|
445
|
+
<td class="p-4 font-mono text-green-600 dark:text-green-400">'bottom'</td>
|
|
446
|
+
<td class="p-4 text-gray-700 dark:text-gray-300">Preferred position. Auto-adjusts if no space
|
|
447
|
+
available</td>
|
|
448
|
+
</tr>
|
|
449
|
+
</tbody>
|
|
450
|
+
</table>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
</article>
|
|
454
|
+
|
|
455
|
+
<!-- DropdownMenuItem Props -->
|
|
456
|
+
<article class="mb-8" aria-labelledby="item-props-heading">
|
|
457
|
+
<h3 id="item-props-heading"
|
|
458
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-4 uppercase">
|
|
459
|
+
<span aria-hidden="true">> </span>DropdownMenuItem Props & Events
|
|
460
|
+
</h3>
|
|
461
|
+
<div class="bg-white dark:bg-[#0f0f0f] border-2 border-neutral-300 dark:border-neutral-800 overflow-hidden mb-4">
|
|
462
|
+
<div class="overflow-x-auto">
|
|
463
|
+
<table class="w-full text-sm">
|
|
464
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
465
|
+
<tr>
|
|
466
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Property</th>
|
|
467
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Type</th>
|
|
468
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Default</th>
|
|
469
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Description</th>
|
|
470
|
+
</tr>
|
|
471
|
+
</thead>
|
|
472
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
473
|
+
<tr>
|
|
474
|
+
<td class="p-4 font-mono text-blue-600 dark:text-blue-400">disabled</td>
|
|
475
|
+
<td class="p-4 font-mono text-purple-600 dark:text-purple-400">boolean</td>
|
|
476
|
+
<td class="p-4 font-mono text-green-600 dark:text-green-400">false</td>
|
|
477
|
+
<td class="p-4 text-gray-700 dark:text-gray-300">Disables the menu item</td>
|
|
478
|
+
</tr>
|
|
479
|
+
<tr>
|
|
480
|
+
<td class="p-4 font-mono text-blue-600 dark:text-blue-400">(click)</td>
|
|
481
|
+
<td class="p-4 font-mono text-purple-600 dark:text-purple-400">OutputEmitterRef<void></td>
|
|
482
|
+
<td class="p-4 font-mono text-green-600 dark:text-green-400">-</td>
|
|
483
|
+
<td class="p-4 text-gray-700 dark:text-gray-300">Emitted when item is clicked. Menu closes
|
|
484
|
+
automatically</td>
|
|
485
|
+
</tr>
|
|
486
|
+
</tbody>
|
|
487
|
+
</table>
|
|
488
|
+
</div>
|
|
489
|
+
</div>
|
|
490
|
+
</article>
|
|
491
|
+
|
|
492
|
+
<!-- DropdownMenuGroup Props -->
|
|
493
|
+
<article class="mb-8" aria-labelledby="group-props-heading">
|
|
494
|
+
<h3 id="group-props-heading"
|
|
495
|
+
class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-4 uppercase">
|
|
496
|
+
<span aria-hidden="true">> </span>DropdownMenuGroup Props
|
|
497
|
+
</h3>
|
|
498
|
+
<div class="bg-white dark:bg-[#0f0f0f] border-2 border-neutral-300 dark:border-neutral-800 overflow-hidden">
|
|
499
|
+
<div class="overflow-x-auto">
|
|
500
|
+
<table class="w-full text-sm">
|
|
501
|
+
<thead class="bg-gray-50 dark:bg-gray-900">
|
|
502
|
+
<tr>
|
|
503
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Property</th>
|
|
504
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Type</th>
|
|
505
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Default</th>
|
|
506
|
+
<th class="text-left p-4 font-medium text-gray-900 dark:text-gray-100">Description</th>
|
|
507
|
+
</tr>
|
|
508
|
+
</thead>
|
|
509
|
+
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
|
|
510
|
+
<tr>
|
|
511
|
+
<td class="p-4 font-mono text-blue-600 dark:text-blue-400">ariaLabel</td>
|
|
512
|
+
<td class="p-4 font-mono text-purple-600 dark:text-purple-400">string</td>
|
|
513
|
+
<td class="p-4 font-mono text-green-600 dark:text-green-400">''</td>
|
|
514
|
+
<td class="p-4 text-gray-700 dark:text-gray-300">Accessible label for screen readers</td>
|
|
515
|
+
</tr>
|
|
516
|
+
</tbody>
|
|
517
|
+
</table>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
</article>
|
|
521
|
+
</section>
|
|
522
|
+
|
|
523
|
+
<!-- Features -->
|
|
524
|
+
<section id="features" class="mb-12" aria-labelledby="features-heading">
|
|
525
|
+
<h2 id="features-heading"
|
|
526
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
527
|
+
[ Key Features ]
|
|
528
|
+
</h2>
|
|
529
|
+
<div class="space-y-4">
|
|
530
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
531
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
532
|
+
<span aria-hidden="true">> </span>Composable Architecture
|
|
533
|
+
</h3>
|
|
534
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
535
|
+
Build complex menus by composing small, focused components. Full control over HTML structure and styling.
|
|
536
|
+
</p>
|
|
537
|
+
</article>
|
|
538
|
+
|
|
539
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
540
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
541
|
+
<span aria-hidden="true">> </span>Viewport-Aware Positioning
|
|
542
|
+
</h3>
|
|
543
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
544
|
+
Automatically adjusts position to stay within viewport. Detects available space and chooses optimal
|
|
545
|
+
placement.
|
|
546
|
+
</p>
|
|
547
|
+
</article>
|
|
548
|
+
|
|
549
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
550
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
551
|
+
<span aria-hidden="true">> </span>Click Outside to Close
|
|
552
|
+
</h3>
|
|
553
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
554
|
+
Automatically closes when clicking outside. Uses efficient event delegation for performance.
|
|
555
|
+
</p>
|
|
556
|
+
</article>
|
|
557
|
+
|
|
558
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
559
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
560
|
+
<span aria-hidden="true">> </span>Hover Support with Smart Delays
|
|
561
|
+
</h3>
|
|
562
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
563
|
+
200ms delay before opening prevents accidental triggers. 100-300ms close delay allows smooth mouse
|
|
564
|
+
movement.
|
|
565
|
+
</p>
|
|
566
|
+
</article>
|
|
567
|
+
|
|
568
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
569
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
570
|
+
<span aria-hidden="true">> </span>Nested Submenus
|
|
571
|
+
</h3>
|
|
572
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
573
|
+
Unlimited nesting depth. Each submenu has independent state management. Opens on hover with smooth
|
|
574
|
+
transitions.
|
|
575
|
+
</p>
|
|
576
|
+
</article>
|
|
577
|
+
|
|
578
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
579
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
580
|
+
<span aria-hidden="true">> </span>Full Accessibility
|
|
581
|
+
</h3>
|
|
582
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
583
|
+
ARIA roles (menu, menuitem, group). Proper focus management. Screen reader announcements. Semantic HTML
|
|
584
|
+
structure.
|
|
585
|
+
</p>
|
|
586
|
+
</article>
|
|
587
|
+
|
|
588
|
+
<article class="border-2 border-neutral-300 dark:border-neutral-700 p-4">
|
|
589
|
+
<h3 class="text-sm sm:text-base font-bold text-[#0a0a0a] dark:text-white mb-2 uppercase">
|
|
590
|
+
<span aria-hidden="true">> </span>Smooth Animations
|
|
591
|
+
</h3>
|
|
592
|
+
<p class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 leading-relaxed">
|
|
593
|
+
Tailwind CSS transitions for fade-in effects. 200ms duration with ease-out timing. GPU-accelerated
|
|
594
|
+
transforms.
|
|
595
|
+
</p>
|
|
596
|
+
</article>
|
|
597
|
+
</div>
|
|
598
|
+
</section>
|
|
599
|
+
|
|
600
|
+
<!-- Component TypeScript -->
|
|
601
|
+
<section id="component-ts" class="mb-12" aria-labelledby="component-ts-heading">
|
|
602
|
+
<h2 id="component-ts-heading"
|
|
603
|
+
class="text-[10px] sm:text-xs text-neutral-500 dark:text-neutral-500 uppercase tracking-wider mb-4">
|
|
604
|
+
[ Component TypeScript Example ]
|
|
605
|
+
</h2>
|
|
606
|
+
<div class="bg-neutral-100 dark:bg-[#121212] border border-neutral-300 dark:border-neutral-700 p-3">
|
|
607
|
+
<pre><code [innerHTML]="componentTsCode" class="text-xs sm:text-sm text-[#0a0a0a] dark:text-white"></code></pre>
|
|
608
|
+
</div>
|
|
609
|
+
</section>
|
|
610
|
+
|
|
611
|
+
</div>
|
|
612
|
+
</main>
|