wally-ui 1.16.0 → 1.17.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 +0 -0
- package/package.json +2 -2
- package/playground/showcase/src/app/components/combobox/combobox-content/combobox-content.css +33 -0
- package/playground/showcase/src/app/components/combobox/combobox-content/combobox-content.ts +1 -1
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-content/dropdown-menu-content.html +1 -1
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-content/dropdown-menu-content.ts +13 -2
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-content/dropdown-menu-sub-content.html +1 -1
- package/playground/showcase/src/app/components/dropdown-menu/dropdown-menu-sub-content/dropdown-menu-sub-content.ts +5 -6
- package/playground/showcase/src/app/pages/documentation/components/combobox-docs/combobox-docs.component.html +1 -1
- package/playground/showcase/src/app/pages/documentation/components/components.html +27 -0
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.examples.ts +23 -1
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.html +635 -206
- package/playground/showcase/src/app/pages/documentation/components/dropdown-menu-docs/dropdown-menu-docs.ts +1 -0
package/dist/cli.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wally-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "About Where’s Wally? Right here — bringing you ready-to-use Angular components with Wally-UI. Stop searching, start building.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"wally": "dist/cli.js"
|
|
@@ -58,4 +58,4 @@
|
|
|
58
58
|
"commander": "^14.0.1",
|
|
59
59
|
"fs-extra": "^11.3.2"
|
|
60
60
|
}
|
|
61
|
-
}
|
|
61
|
+
}
|
package/playground/showcase/src/app/components/combobox/combobox-content/combobox-content.css
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
[role="listbox"] {
|
|
2
|
+
scrollbar-width: thin;
|
|
3
|
+
scrollbar-color: #d4d4d4 transparent;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
[role="listbox"]::-webkit-scrollbar {
|
|
7
|
+
width: 8px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
[role="listbox"]::-webkit-scrollbar-track {
|
|
11
|
+
background: transparent;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
[role="listbox"]::-webkit-scrollbar-thumb {
|
|
15
|
+
background: #d4d4d4;
|
|
16
|
+
border-radius: 4px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.dark [role="listbox"] {
|
|
20
|
+
scrollbar-color: #525252 #1b1b1b;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.dark [role="listbox"]::-webkit-scrollbar-track {
|
|
24
|
+
background: #1b1b1b;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.dark [role="listbox"]::-webkit-scrollbar-thumb {
|
|
28
|
+
background: #525252;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.dark [role="listbox"]::-webkit-scrollbar-thumb:hover {
|
|
32
|
+
background: #737373;
|
|
33
|
+
}
|
package/playground/showcase/src/app/components/combobox/combobox-content/combobox-content.ts
CHANGED
|
@@ -30,7 +30,7 @@ export class ComboboxContent {
|
|
|
30
30
|
|
|
31
31
|
positionClasses = computed(() => {
|
|
32
32
|
const position = this.calculatedPosition();
|
|
33
|
-
const scrollClasses = 'max-h-96 overflow-y-auto';
|
|
33
|
+
const scrollClasses = 'max-h-60 sm:max-h-80 md:max-h-96 overflow-y-auto';
|
|
34
34
|
|
|
35
35
|
const positionMap = {
|
|
36
36
|
bottom: 'top-full mt-2 left-0',
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
(mouseenter)="onMouseEnter()"
|
|
4
4
|
(mouseleave)="onMouseLeave()"
|
|
5
|
-
[class]="'absolute bg-white dark:bg-[#1b1b1b] dark:border-neutral-700 rounded-xl shadow-2xl border border-neutral-300 min-w-72 z-50 transition-all duration-200 ease-out ' + positionClasses()"
|
|
5
|
+
[class]="'absolute bg-white dark:bg-[#1b1b1b] dark:border-neutral-700 rounded-xl shadow-2xl border border-neutral-300 min-w-48 sm:min-w-56 md:min-w-64 lg:min-w-72 max-w-[calc(100vw-2rem)] z-50 transition-all duration-200 ease-out ' + positionClasses()"
|
|
6
6
|
role="menu">
|
|
7
7
|
<ng-content></ng-content>
|
|
8
8
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, computed, effect, ElementRef, input, signal } from '@angular/core';
|
|
1
|
+
import { Component, computed, effect, ElementRef, HostListener, input, signal } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
import { DropdownMenuService } from '../dropdown-menu.service';
|
|
4
4
|
|
|
@@ -43,6 +43,17 @@ export class DropdownMenuContent {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Recalculates position on window resize to maintain optimal placement
|
|
48
|
+
*/
|
|
49
|
+
@HostListener('window:resize')
|
|
50
|
+
onResize(): void {
|
|
51
|
+
if (this.dropdownMenuService.isOpen()) {
|
|
52
|
+
const bestPosition = this.calculateBestPosition();
|
|
53
|
+
this.calculatedPosition.set(bestPosition);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
46
57
|
/**
|
|
47
58
|
* Measures available space around the trigger element in all directions.
|
|
48
59
|
* @returns Object containing trigger dimensions and available space, or null if trigger not found
|
|
@@ -135,7 +146,7 @@ export class DropdownMenuContent {
|
|
|
135
146
|
if (!menuElement) {
|
|
136
147
|
return {
|
|
137
148
|
height: 200,
|
|
138
|
-
width: 224
|
|
149
|
+
width: Math.min(224, window.innerWidth - 32)
|
|
139
150
|
};
|
|
140
151
|
}
|
|
141
152
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div
|
|
3
3
|
(mouseenter)="onMouseEnter()"
|
|
4
4
|
(mouseleave)="onMouseLeave()"
|
|
5
|
-
[class]="'absolute bg-white dark:bg-[#1b1b1b] rounded-xl shadow-2xl border border-neutral-300 dark:border-neutral-700 min-w-56 z-50 transition-all duration-200 ease-out ' + positionClasses()"
|
|
5
|
+
[class]="'absolute bg-white dark:bg-[#1b1b1b] rounded-xl shadow-2xl border border-neutral-300 dark:border-neutral-700 min-w-40 sm:min-w-48 md:min-w-56 max-w-[calc(100vw-2rem)] z-50 transition-all duration-200 ease-out ' + positionClasses()"
|
|
6
6
|
role="menu">
|
|
7
7
|
<ng-content></ng-content>
|
|
8
8
|
</div>
|
|
@@ -17,10 +17,10 @@ export class DropdownMenuSubContent {
|
|
|
17
17
|
const position = this.calculatedPosition();
|
|
18
18
|
|
|
19
19
|
const positionMap = {
|
|
20
|
-
right: 'top-0 left-full
|
|
21
|
-
left: 'top-0 right-full
|
|
22
|
-
bottom: 'left-0 top-full
|
|
23
|
-
top: 'left-0 bottom-full
|
|
20
|
+
right: 'top-0 left-full',
|
|
21
|
+
left: 'top-0 right-full',
|
|
22
|
+
bottom: 'left-0 top-full',
|
|
23
|
+
top: 'left-0 bottom-full'
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
return positionMap[position];
|
|
@@ -111,7 +111,7 @@ export class DropdownMenuSubContent {
|
|
|
111
111
|
if (!menuElement) {
|
|
112
112
|
return {
|
|
113
113
|
height: 200,
|
|
114
|
-
width: 224
|
|
114
|
+
width: Math.min(224, window.innerWidth - 32)
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
|
|
@@ -125,7 +125,6 @@ export class DropdownMenuSubContent {
|
|
|
125
125
|
|
|
126
126
|
onMouseEnter(): void {
|
|
127
127
|
this.subService.setHoveringContent(true);
|
|
128
|
-
this.subService.open();
|
|
129
128
|
}
|
|
130
129
|
|
|
131
130
|
onMouseLeave(): void {
|
|
@@ -152,6 +152,33 @@
|
|
|
152
152
|
</a>
|
|
153
153
|
</article>
|
|
154
154
|
|
|
155
|
+
<!-- Combobox Component -->
|
|
156
|
+
<article class="group border-b-2 border-neutral-300 dark:border-neutral-700 last:border-b-0" role="article"
|
|
157
|
+
aria-labelledby="combobox-heading">
|
|
158
|
+
<a href="/documentation/components/combobox"
|
|
159
|
+
class="block px-4 py-4 sm:py-5 bg-white dark:bg-[#0a0a0a] hover:bg-[#0a0a0a] dark:hover:bg-white transition-all duration-150 cursor-pointer"
|
|
160
|
+
aria-label="Navigate to Combobox component documentation with search, multi-select support, keyboard navigation, and intelligent viewport-aware positioning">
|
|
161
|
+
<div class="flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3">
|
|
162
|
+
<div class="flex-1">
|
|
163
|
+
<div class="flex items-center gap-3 mb-2">
|
|
164
|
+
<h3 id="combobox-heading"
|
|
165
|
+
class="text-base sm:text-lg font-bold text-[#0a0a0a] dark:text-white group-hover:text-white dark:group-hover:text-[#0a0a0a] uppercase tracking-wide transition-colors duration-150">
|
|
166
|
+
<span aria-hidden="true">>_ </span>Combobox
|
|
167
|
+
</h3>
|
|
168
|
+
<span class="text-[10px] font-bold bg-blue-500 text-white px-2 py-1 uppercase tracking-wider"
|
|
169
|
+
aria-label="Status: New Component">
|
|
170
|
+
NEW
|
|
171
|
+
</span>
|
|
172
|
+
</div>
|
|
173
|
+
<p
|
|
174
|
+
class="text-xs sm:text-sm text-neutral-600 dark:text-neutral-400 group-hover:text-neutral-300 dark:group-hover:text-neutral-600 transition-colors duration-150">
|
|
175
|
+
Flexible combobox with search, multi-select support, keyboard navigation, and intelligent viewport-aware positioning. Features input and custom trigger modes, item grouping, virtual scrolling, and zero external dependencies.
|
|
176
|
+
</p>
|
|
177
|
+
</div>
|
|
178
|
+
</div>
|
|
179
|
+
</a>
|
|
180
|
+
</article>
|
|
181
|
+
|
|
155
182
|
<!-- Dropdown Menu Component -->
|
|
156
183
|
<article class="group border-b-2 border-neutral-300 dark:border-neutral-700 last:border-b-0" role="article"
|
|
157
184
|
aria-labelledby="dropdown-menu-heading">
|
|
@@ -400,5 +400,27 @@ export class ExampleComponent {
|
|
|
400
400
|
Close
|
|
401
401
|
</wally-dropdown-menu-item>
|
|
402
402
|
</wally-dropdown-menu-content>
|
|
403
|
-
</wally-dropdown-menu
|
|
403
|
+
</wally-dropdown-menu>`,
|
|
404
|
+
|
|
405
|
+
centeredPosition: `<!-- Centralized trigger to test responsive positioning -->
|
|
406
|
+
<div class="flex justify-center items-center min-h-[400px]">
|
|
407
|
+
<wally-dropdown-menu>
|
|
408
|
+
<wally-dropdown-menu-trigger>
|
|
409
|
+
<wally-button variant="outline">Centered Menu</wally-button>
|
|
410
|
+
</wally-dropdown-menu-trigger>
|
|
411
|
+
|
|
412
|
+
<wally-dropdown-menu-content>
|
|
413
|
+
<wally-dropdown-menu-item (click)="onProfile()">
|
|
414
|
+
Profile
|
|
415
|
+
</wally-dropdown-menu-item>
|
|
416
|
+
<wally-dropdown-menu-item (click)="onSettings()">
|
|
417
|
+
Settings
|
|
418
|
+
</wally-dropdown-menu-item>
|
|
419
|
+
<wally-dropdown-menu-separator></wally-dropdown-menu-separator>
|
|
420
|
+
<wally-dropdown-menu-item (click)="onLogout()">
|
|
421
|
+
Log out
|
|
422
|
+
</wally-dropdown-menu-item>
|
|
423
|
+
</wally-dropdown-menu-content>
|
|
424
|
+
</wally-dropdown-menu>
|
|
425
|
+
</div>`
|
|
404
426
|
};
|