@ojiepermana/angular-navigation 22.0.41 → 22.0.43
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.
|
@@ -391,7 +391,7 @@ class NavigationItemContentComponent {
|
|
|
391
391
|
...(ngDevMode ? [{ debugName: "subtitleClasses" }] : /* istanbul ignore next */ []));
|
|
392
392
|
compactFallbackClasses = computed(() => cn('inline-flex h-5 min-w-5 items-center justify-center text-xs font-semibold uppercase'), /* @ts-ignore */
|
|
393
393
|
...(ngDevMode ? [{ debugName: "compactFallbackClasses" }] : /* istanbul ignore next */ []));
|
|
394
|
-
defaultBadgeClasses = computed(() => cn('ml-auto inline-flex h-5 shrink-0 items-center rounded-full px-2
|
|
394
|
+
defaultBadgeClasses = computed(() => cn('nav-badge ml-auto inline-flex h-5 shrink-0 items-center rounded-full px-2', this.active() ? 'bg-background text-foreground' : 'bg-muted text-muted-foreground'), /* @ts-ignore */
|
|
395
395
|
...(ngDevMode ? [{ debugName: "defaultBadgeClasses" }] : /* istanbul ignore next */ []));
|
|
396
396
|
defaultIconSize = computed(() => (this.usesStraightVerticalSurface() ? 18 : 16), /* @ts-ignore */
|
|
397
397
|
...(ngDevMode ? [{ debugName: "defaultIconSize" }] : /* istanbul ignore next */ []));
|
|
@@ -594,10 +594,10 @@ class NavigationItemComponent {
|
|
|
594
594
|
this.nav.closeDrawer(this.navId());
|
|
595
595
|
}
|
|
596
596
|
leafClasses(active) {
|
|
597
|
-
return cn('NavigationItem group/nav inline-flex min-w-0 items-center rounded-md
|
|
597
|
+
return cn('NavigationItem nav-text group/nav inline-flex min-w-0 items-center rounded-md font-medium transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', this.orientation() === 'horizontal' && this.level() === 0 ? 'h-9 px-3 py-2' : 'w-full px-3 py-1.5 text-left', this.orientation() === 'horizontal' && this.level() === 0 ? 'gap-3' : 'gap-1.5', this.compact() && 'h-10 w-10 justify-center gap-0 px-0 text-center', this.interactiveStateClasses(active), this.item().disabled && 'pointer-events-none opacity-50', this.item().classes?.wrapper, this.itemClass());
|
|
598
598
|
}
|
|
599
599
|
triggerClasses(active) {
|
|
600
|
-
return cn('nav-trigger group/nav inline-flex min-w-0 items-center rounded-md
|
|
600
|
+
return cn('nav-trigger nav-text group/nav inline-flex min-w-0 items-center rounded-md font-medium transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', this.orientation() === 'horizontal' && this.level() === 0 ? 'h-9 px-3 py-2' : 'w-full px-3 py-1.5 text-left', this.orientation() === 'horizontal' && this.level() === 0 ? 'gap-3' : 'gap-1.5', this.compact() && 'h-10 w-10 justify-center gap-0 px-0 text-center', this.interactiveStateClasses(active), this.item().classes?.wrapper, this.itemClass());
|
|
601
601
|
}
|
|
602
602
|
interactiveStateClasses(active) {
|
|
603
603
|
const showsNestedActiveConnector = active &&
|
|
@@ -626,7 +626,7 @@ class NavigationItemComponent {
|
|
|
626
626
|
return cn(this.orientation() === 'horizontal' && this.level() === 0 ? 'mx-1 h-5 w-px' : 'my-2 w-full px-2');
|
|
627
627
|
}
|
|
628
628
|
groupHeadingClasses() {
|
|
629
|
-
return cn('px-3 py-2 text-
|
|
629
|
+
return cn('nav-heading px-3 py-2 text-muted-foreground', this.item().classes?.title);
|
|
630
630
|
}
|
|
631
631
|
childListClasses() {
|
|
632
632
|
const isGroupedBranch = this.item().type === 'group' || this.item().type === 'mega';
|
|
@@ -1245,7 +1245,7 @@ class NavigationDockbarMenuComponent {
|
|
|
1245
1245
|
return this.nav.isItemActive(entry, this.activeIds(), this.activeUrl());
|
|
1246
1246
|
}
|
|
1247
1247
|
triggerClasses(entry) {
|
|
1248
|
-
return cn('group/nav inline-flex h-10 w-10 items-center justify-center rounded-md
|
|
1248
|
+
return cn('nav-text group/nav inline-flex h-10 w-10 items-center justify-center rounded-md font-medium transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', this.isGroupOpen(entry)
|
|
1249
1249
|
? 'bg-accent text-accent-foreground'
|
|
1250
1250
|
: this.isGroupActive(entry)
|
|
1251
1251
|
? 'font-semibold text-foreground'
|
|
@@ -1632,7 +1632,7 @@ class NavigationEntryGridComponent {
|
|
|
1632
1632
|
return cn('m-0 grid list-none grid-cols-1 gap-1 p-0', columns >= 2 && 'sm:grid-cols-2', columns >= 3 && 'md:grid-cols-3', columns >= 4 && 'lg:grid-cols-4');
|
|
1633
1633
|
}
|
|
1634
1634
|
entryClasses(item, active) {
|
|
1635
|
-
return cn('group/nav flex w-full items-center gap-3 px-3 py-2.5 text-left
|
|
1635
|
+
return cn('group/nav nav-text flex w-full items-center gap-3 px-3 py-2.5 text-left transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring', this.isBorderRail()
|
|
1636
1636
|
? cn('rounded-none', active ? 'text-primary' : 'text-foreground hover:text-primary')
|
|
1637
1637
|
: cn('rounded-lg', active
|
|
1638
1638
|
? 'bg-accent text-accent-foreground'
|
|
@@ -1649,7 +1649,7 @@ class NavigationEntryGridComponent {
|
|
|
1649
1649
|
return cn('text-current', item.classes?.icon);
|
|
1650
1650
|
}
|
|
1651
1651
|
entryTitleClasses(item, active) {
|
|
1652
|
-
return cn('block truncate
|
|
1652
|
+
return cn('block truncate font-medium', this.isBorderRail() ? 'text-current' : 'text-foreground', active && 'font-semibold', item.classes?.title);
|
|
1653
1653
|
}
|
|
1654
1654
|
entrySubtitleClasses(item) {
|
|
1655
1655
|
return cn('mt-0.5 block truncate text-xs text-muted-foreground', item.classes?.subtitle);
|
|
@@ -1838,7 +1838,7 @@ class NavigationEntryGridComponent {
|
|
|
1838
1838
|
<span
|
|
1839
1839
|
[class]="
|
|
1840
1840
|
badge.classes ??
|
|
1841
|
-
'inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-
|
|
1841
|
+
'nav-badge inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground'
|
|
1842
1842
|
"
|
|
1843
1843
|
>{{ badge.title }}</span
|
|
1844
1844
|
>
|
|
@@ -2027,7 +2027,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.3", ngImpor
|
|
|
2027
2027
|
<span
|
|
2028
2028
|
[class]="
|
|
2029
2029
|
badge.classes ??
|
|
2030
|
-
'inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-
|
|
2030
|
+
'nav-badge inline-flex h-5 shrink-0 items-center self-center rounded-full bg-muted px-2 text-muted-foreground'
|
|
2031
2031
|
"
|
|
2032
2032
|
>{{ badge.title }}</span
|
|
2033
2033
|
>
|
|
@@ -2261,17 +2261,17 @@ class NavigationFlyoutMenuComponent {
|
|
|
2261
2261
|
const iconOnly = this.showIconOnly();
|
|
2262
2262
|
const base = 'nav-trigger group/nav inline-flex min-w-0 items-center font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring';
|
|
2263
2263
|
if (this.variant() === 'link') {
|
|
2264
|
-
return cn(base, 'text
|
|
2264
|
+
return cn(base, 'nav-text underline-offset-4 hover:underline',
|
|
2265
2265
|
// Icon-only tetap punya target ≥ 36px (WCAG 2.5.8) walau tanpa chrome tautan.
|
|
2266
2266
|
iconOnly ? 'h-9 w-9 justify-center gap-0' : 'gap-1.5', this.isOpen() ? 'text-primary underline' : 'text-primary/90 hover:text-primary', this.itemClass());
|
|
2267
2267
|
}
|
|
2268
2268
|
if (this.variant() === 'plain') {
|
|
2269
|
-
return cn(base, 'gap-2 rounded-md text
|
|
2269
|
+
return cn(base, 'gap-2 rounded-md nav-text', iconOnly ? 'h-9 w-9 justify-center' : 'h-9 px-3 py-2', this.isOpen()
|
|
2270
2270
|
? 'bg-accent text-accent-foreground'
|
|
2271
2271
|
: 'text-foreground/80 hover:bg-accent hover:text-accent-foreground', this.itemClass());
|
|
2272
2272
|
}
|
|
2273
2273
|
// button (pil, default)
|
|
2274
|
-
return cn(base, 'h-10 gap-2 rounded-full border border-[hsl(var(--border)/var(--opacity-60))] bg-background px-4 py-2 text
|
|
2274
|
+
return cn(base, 'h-10 gap-2 rounded-full border border-[hsl(var(--border)/var(--opacity-60))] bg-background px-4 py-2 nav-text shadow-sm', iconOnly && 'w-10 justify-center gap-0 px-0', this.isBorderRail()
|
|
2275
2275
|
? this.isOpen()
|
|
2276
2276
|
? 'text-primary'
|
|
2277
2277
|
: 'text-foreground/80 hover:text-primary'
|
|
@@ -2317,7 +2317,7 @@ class NavigationFlyoutMenuComponent {
|
|
|
2317
2317
|
// `-my-2 self-stretch` untuk membatalkan `py-2` row; tombol `h-full` mengisi penuh
|
|
2318
2318
|
// sehingga sisinya rata dengan border row — sudut pada sisi border dibuat siku
|
|
2319
2319
|
// agar menyambung (bawah di mode top, atas di mode bottom).
|
|
2320
|
-
'nav-trigger group/nav inline-flex h-full min-h-9 min-w-0 items-center gap-2 rounded-md px-3
|
|
2320
|
+
'nav-trigger nav-text group/nav inline-flex h-full min-h-9 min-w-0 items-center gap-2 rounded-md px-3 font-medium transition-colors', this.isBottom() ? 'rounded-t-none' : 'rounded-b-none', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', this.isBorderRail()
|
|
2321
2321
|
? this.isBranchOpen(item) || this.isItemActive(item)
|
|
2322
2322
|
? 'rounded-none text-primary'
|
|
2323
2323
|
: 'rounded-none text-foreground/80 hover:text-primary'
|
|
@@ -2769,7 +2769,7 @@ class NavigationHorizontalComponent {
|
|
|
2769
2769
|
return cn(this.groupClass(), item.classes?.container);
|
|
2770
2770
|
}
|
|
2771
2771
|
triggerClasses(item) {
|
|
2772
|
-
return cn('nav-trigger group/nav inline-flex min-w-0 items-center gap-3 rounded-md
|
|
2772
|
+
return cn('nav-trigger nav-text group/nav inline-flex min-w-0 items-center gap-3 rounded-md font-medium transition-colors', 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50', 'h-9 px-3 py-2', this.compact() && 'w-10 justify-center px-0', this.isBorderRail()
|
|
2773
2773
|
? this.isPanelOpen(item) || this.isItemActive(item)
|
|
2774
2774
|
? 'rounded-none text-primary'
|
|
2775
2775
|
: 'rounded-none text-foreground/80 hover:text-primary'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ojiepermana/angular-navigation",
|
|
3
|
-
"version": "22.0.
|
|
3
|
+
"version": "22.0.43",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/edsis/angular.git"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@angular/common": ">=22.0.0",
|
|
14
14
|
"@angular/core": ">=22.0.0",
|
|
15
15
|
"@angular/router": ">=22.0.0",
|
|
16
|
-
"@ojiepermana/angular-component": "^22.0.
|
|
16
|
+
"@ojiepermana/angular-component": "^22.0.43",
|
|
17
17
|
"rxjs": ">=7.8.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|