@egose/shadcn-theme-ng 0.0.28 → 0.2.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/README.md +130 -13
- package/accordion/README.md +376 -34
- package/accordion/fesm2022/accordion.mjs +27 -39
- package/alert/README.md +343 -34
- package/alert/fesm2022/alert.mjs +47 -47
- package/alert-dialog/README.md +471 -5
- package/alert-dialog/fesm2022/alert-dialog.mjs +47 -47
- package/aspect-ratio/README.md +272 -5
- package/aspect-ratio/fesm2022/aspect-ratio.mjs +9 -9
- package/autocomplete/README.md +473 -34
- package/autocomplete/fesm2022/autocomplete.mjs +53 -71
- package/avatar/README.md +357 -5
- package/avatar/fesm2022/avatar.mjs +32 -32
- package/badge/README.md +289 -34
- package/badge/fesm2022/badge.mjs +57 -57
- package/basic-alert/README.md +324 -34
- package/basic-alert/fesm2022/basic-alert.mjs +6 -18
- package/breadcrumb/README.md +406 -5
- package/breadcrumb/fesm2022/breadcrumb.mjs +33 -39
- package/button/README.md +453 -34
- package/button/fesm2022/button.mjs +147 -219
- package/button/types/button.d.ts +7 -10
- package/button-group/README.md +318 -5
- package/button-group/fesm2022/button-group.mjs +20 -20
- package/calendar/README.md +328 -34
- package/calendar/fesm2022/calendar.mjs +29 -743
- package/card/README.md +331 -5
- package/card/fesm2022/card.mjs +33 -33
- package/carousel/README.md +333 -5
- package/carousel/fesm2022/carousel.mjs +39 -78
- package/checkbox/README.md +291 -34
- package/checkbox/fesm2022/checkbox.mjs +20 -58
- package/checkbox/types/checkbox.d.ts +5 -4
- package/collapsible/README.md +332 -5
- package/collapsible/fesm2022/collapsible.mjs +15 -15
- package/combobox/README.md +507 -5
- package/combobox/fesm2022/combobox.mjs +91 -224
- package/command/README.md +435 -5
- package/command/fesm2022/command.mjs +49 -109
- package/confirmation-dialog/README.md +272 -34
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +15 -40
- package/confirmation-dialog/types/confirmation-dialog.d.ts +8 -4
- package/context-menu/README.md +366 -5
- package/context-menu/fesm2022/context-menu.mjs +9 -9
- package/date-picker/README.md +436 -34
- package/date-picker/fesm2022/date-picker.mjs +64 -267
- package/date-picker/types/date-picker.d.ts +7 -3
- package/dialog/README.md +419 -34
- package/dialog/fesm2022/dialog.mjs +45 -71
- package/drawer/README.md +395 -5
- package/drawer/fesm2022/drawer.mjs +44 -54
- package/dropdown-menu/README.md +417 -5
- package/dropdown-menu/fesm2022/dropdown-menu.mjs +82 -70
- package/dropdown-menu/types/dropdown-menu.d.ts +4 -0
- package/empty/README.md +329 -5
- package/empty/fesm2022/empty.mjs +30 -30
- package/field/README.md +385 -5
- package/field/fesm2022/field.mjs +56 -72
- package/form-checkbox/README.md +283 -34
- package/form-checkbox/fesm2022/form-checkbox.mjs +25 -85
- package/form-checkbox/types/form-checkbox.d.ts +7 -1
- package/form-date-picker/README.md +293 -34
- package/form-date-picker/fesm2022/form-date-picker.mjs +31 -84
- package/form-date-picker/types/form-date-picker.d.ts +7 -1
- package/form-field/README.md +327 -34
- package/form-field/fesm2022/form-field.mjs +33 -19
- package/form-field/types/form-field.d.ts +28 -20
- package/form-field-simple/README.md +311 -34
- package/form-field-simple/fesm2022/form-field-simple.mjs +4 -4
- package/form-searchable-multiselect/README.md +332 -34
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +31 -91
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +7 -1
- package/form-select/README.md +321 -34
- package/form-select/fesm2022/form-select.mjs +32 -149
- package/form-select/types/form-select.d.ts +7 -1
- package/form-text-input/README.md +342 -34
- package/form-text-input/fesm2022/form-text-input.mjs +35 -149
- package/form-text-input/types/form-text-input.d.ts +9 -12
- package/form-textarea/README.md +318 -34
- package/form-textarea/fesm2022/form-textarea.mjs +34 -109
- package/form-textarea/types/form-textarea.d.ts +8 -1
- package/hover-card/README.md +256 -5
- package/hover-card/fesm2022/hover-card.mjs +19 -19
- package/icon/README.md +210 -34
- package/icon/fesm2022/icon.mjs +8 -8
- package/input/README.md +240 -34
- package/input/fesm2022/input.mjs +17 -12
- package/input/types/input.d.ts +2 -1
- package/input-group/README.md +335 -5
- package/input-group/fesm2022/input-group.mjs +34 -34
- package/input-otp/README.md +375 -5
- package/input-otp/fesm2022/input-otp.mjs +26 -26
- package/item/README.md +385 -5
- package/item/fesm2022/item.mjs +53 -53
- package/kbd/README.md +291 -5
- package/kbd/fesm2022/kbd.mjs +12 -12
- package/label/README.md +243 -34
- package/label/fesm2022/label.mjs +10 -10
- package/label/types/label.d.ts +1 -1
- package/layout-simple/README.md +174 -44
- package/layout-simple/fesm2022/layout-simple.mjs +508 -603
- package/layout-simple/types/layout-simple.d.ts +179 -128
- package/menu/README.md +418 -0
- package/menu/fesm2022/menu.mjs +455 -0
- package/menu/package.json +24 -0
- package/menu/types/menu.d.ts +137 -0
- package/menubar/README.md +343 -5
- package/menubar/fesm2022/menubar.mjs +13 -13
- package/native-select/README.md +323 -5
- package/native-select/fesm2022/native-select.mjs +19 -19
- package/navigation-menu/README.md +369 -5
- package/navigation-menu/fesm2022/navigation-menu.mjs +35 -47
- package/package.json +183 -154
- package/pagination/README.md +388 -5
- package/pagination/fesm2022/pagination.mjs +45 -331
- package/popover/README.md +302 -34
- package/popover/fesm2022/popover.mjs +30 -30
- package/progress/README.md +311 -5
- package/progress/fesm2022/progress.mjs +13 -13
- package/radio-group/README.md +335 -34
- package/radio-group/fesm2022/radio-group.mjs +26 -19
- package/radio-group/types/radio-group.d.ts +1 -1
- package/resizable/README.md +269 -5
- package/resizable/fesm2022/resizable.mjs +18 -26
- package/scroll-area/README.md +233 -5
- package/scroll-area/fesm2022/scroll-area.mjs +9 -9
- package/searchable-multiselect/README.md +294 -34
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +28 -117
- package/searchable-multiselect/types/searchable-multiselect.d.ts +8 -2
- package/select/README.md +408 -34
- package/select/fesm2022/select.mjs +71 -111
- package/select/types/select.d.ts +3 -1
- package/separator/README.md +193 -34
- package/separator/fesm2022/separator.mjs +9 -9
- package/separator/types/separator.d.ts +1 -1
- package/sheet/README.md +282 -34
- package/sheet/fesm2022/sheet.mjs +41 -53
- package/sidebar/README.md +457 -5
- package/sidebar/fesm2022/sidebar.mjs +125 -227
- package/skeleton/README.md +217 -5
- package/skeleton/fesm2022/skeleton.mjs +9 -9
- package/slider/README.md +273 -5
- package/slider/fesm2022/slider.mjs +10 -80
- package/sonner/README.md +317 -34
- package/sonner/fesm2022/sonner.mjs +13 -13
- package/spinner/README.md +255 -34
- package/spinner/fesm2022/spinner.mjs +11 -11
- package/switch/README.md +281 -34
- package/switch/fesm2022/switch.mjs +13 -15
- package/table/README.md +423 -5
- package/table/fesm2022/table.mjs +41 -41
- package/tabs/README.md +382 -34
- package/tabs/fesm2022/tabs.mjs +35 -111
- package/textarea/README.md +282 -5
- package/textarea/fesm2022/textarea.mjs +9 -9
- package/toggle/README.md +270 -5
- package/toggle/fesm2022/toggle.mjs +13 -13
- package/toggle-group/README.md +340 -5
- package/toggle-group/fesm2022/toggle-group.mjs +13 -13
- package/toggle-group/types/toggle-group.d.ts +13 -7
- package/tooltip/README.md +240 -34
- package/tooltip/fesm2022/tooltip.mjs +14 -14
- package/typography/README.md +271 -5
- package/typography/fesm2022/typography.mjs +53 -53
- package/typography/types/typography.d.ts +19 -19
- package/utils/README.md +274 -34
- package/utils/fesm2022/utils.mjs +68 -44
- package/accordion/fesm2022/accordion.mjs.map +0 -1
- package/alert/fesm2022/alert.mjs.map +0 -1
- package/alert-dialog/fesm2022/alert-dialog.mjs.map +0 -1
- package/aspect-ratio/fesm2022/aspect-ratio.mjs.map +0 -1
- package/autocomplete/fesm2022/autocomplete.mjs.map +0 -1
- package/avatar/fesm2022/avatar.mjs.map +0 -1
- package/badge/fesm2022/badge.mjs.map +0 -1
- package/basic-alert/fesm2022/basic-alert.mjs.map +0 -1
- package/breadcrumb/fesm2022/breadcrumb.mjs.map +0 -1
- package/button/fesm2022/button.mjs.map +0 -1
- package/button-group/fesm2022/button-group.mjs.map +0 -1
- package/calendar/fesm2022/calendar.mjs.map +0 -1
- package/card/fesm2022/card.mjs.map +0 -1
- package/carousel/fesm2022/carousel.mjs.map +0 -1
- package/checkbox/fesm2022/checkbox.mjs.map +0 -1
- package/collapsible/fesm2022/collapsible.mjs.map +0 -1
- package/combobox/fesm2022/combobox.mjs.map +0 -1
- package/command/fesm2022/command.mjs.map +0 -1
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs.map +0 -1
- package/context-menu/fesm2022/context-menu.mjs.map +0 -1
- package/date-picker/fesm2022/date-picker.mjs.map +0 -1
- package/dialog/fesm2022/dialog.mjs.map +0 -1
- package/drawer/fesm2022/drawer.mjs.map +0 -1
- package/dropdown-menu/fesm2022/dropdown-menu.mjs.map +0 -1
- package/empty/fesm2022/empty.mjs.map +0 -1
- package/field/fesm2022/field.mjs.map +0 -1
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +0 -1
- package/form-date-picker/fesm2022/form-date-picker.mjs.map +0 -1
- package/form-field/fesm2022/form-field.mjs.map +0 -1
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +0 -1
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +0 -1
- package/form-select/fesm2022/form-select.mjs.map +0 -1
- package/form-text-input/fesm2022/form-text-input.mjs.map +0 -1
- package/form-textarea/fesm2022/form-textarea.mjs.map +0 -1
- package/hover-card/fesm2022/hover-card.mjs.map +0 -1
- package/icon/fesm2022/icon.mjs.map +0 -1
- package/input/fesm2022/input.mjs.map +0 -1
- package/input-group/fesm2022/input-group.mjs.map +0 -1
- package/input-otp/fesm2022/input-otp.mjs.map +0 -1
- package/item/fesm2022/item.mjs.map +0 -1
- package/kbd/fesm2022/kbd.mjs.map +0 -1
- package/label/fesm2022/label.mjs.map +0 -1
- package/layout-simple/fesm2022/layout-simple.mjs.map +0 -1
- package/menubar/fesm2022/menubar.mjs.map +0 -1
- package/native-select/fesm2022/native-select.mjs.map +0 -1
- package/navigation-menu/fesm2022/navigation-menu.mjs.map +0 -1
- package/pagination/fesm2022/pagination.mjs.map +0 -1
- package/popover/fesm2022/popover.mjs.map +0 -1
- package/progress/fesm2022/progress.mjs.map +0 -1
- package/radio-group/fesm2022/radio-group.mjs.map +0 -1
- package/resizable/fesm2022/resizable.mjs.map +0 -1
- package/scroll-area/fesm2022/scroll-area.mjs.map +0 -1
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs.map +0 -1
- package/select/fesm2022/select.mjs.map +0 -1
- package/separator/fesm2022/separator.mjs.map +0 -1
- package/sheet/fesm2022/sheet.mjs.map +0 -1
- package/sidebar/fesm2022/sidebar.mjs.map +0 -1
- package/skeleton/fesm2022/skeleton.mjs.map +0 -1
- package/slider/fesm2022/slider.mjs.map +0 -1
- package/sonner/fesm2022/sonner.mjs.map +0 -1
- package/spinner/fesm2022/spinner.mjs.map +0 -1
- package/switch/fesm2022/switch.mjs.map +0 -1
- package/table/fesm2022/table.mjs.map +0 -1
- package/tabs/fesm2022/tabs.mjs.map +0 -1
- package/textarea/fesm2022/textarea.mjs.map +0 -1
- package/toggle/fesm2022/toggle.mjs.map +0 -1
- package/toggle-group/fesm2022/toggle-group.mjs.map +0 -1
- package/tooltip/fesm2022/tooltip.mjs.map +0 -1
- package/typography/fesm2022/typography.mjs.map +0 -1
- package/utils/fesm2022/utils.mjs.map +0 -1
|
@@ -1,11 +1,375 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Navigation Menu (`@egose/shadcn-theme-ng/navigation-menu`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Site-navigation bar with dropdown content panels (shadcn/ui `navigation-menu` equivalent). Thin shadcn styling directives/components over the spartan-ng `BrnNavigationMenu` brain family: the bar itself plus list/item/trigger/link/content/portal pieces. Use it for marketing/docs headers where top-level entries either link somewhere or open a rich panel — as opposed to `menubar` (action menus) or `dropdown-menu` (single-button menus).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Ships as `@egose/shadcn-theme-ng/navigation-menu` and `@egose/shadcn-theme-ng-tw/navigation-menu` (tw: variant). See the [package README](../../README.md) for installation, peer dependencies, Tailwind setup, and testing. Do not publish this project directory independently.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
# Plain Tailwind (no prefix):
|
|
11
|
+
npm install @egose/shadcn-theme-ng
|
|
12
|
+
|
|
13
|
+
# Or the tw:-prefixed variant:
|
|
14
|
+
npm install @egose/shadcn-theme-ng-tw
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Peer dependencies are inherited from the package root (see [package README](../../README.md)). This subpath itself declares `@angular/common`, `@angular/core`, `@spartan-ng/brain` as peers plus a `tslib` runtime dependency; at runtime it also uses `@ng-icons/lucide` (`lucideChevronDown`). No extra install step is needed beyond the package install above.
|
|
18
|
+
|
|
19
|
+
## Imports
|
|
20
|
+
|
|
21
|
+
Real exported symbols (from `src/public-api.ts`):
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import {
|
|
25
|
+
HlmNavigationMenu, // directive: nav[hlmNavigationMenu]
|
|
26
|
+
HlmNavigationMenuList, // directive: ul[hlmNavigationMenuList]
|
|
27
|
+
HlmNavigationMenuItem, // directive: li[hlmNavigationMenuItem]
|
|
28
|
+
HlmNavigationMenuTrigger, // component: button[hlmNavigationMenuTrigger]
|
|
29
|
+
HlmNavigationMenuContent, // directive: [hlmNavigationMenuContent],hlm-navigation-menu-content
|
|
30
|
+
HlmNavigationMenuPortal, // directive: [hlmNavigationMenuPortal]
|
|
31
|
+
HlmNavigationMenuLink, // directive: a[hlmNavigationMenuLink]
|
|
32
|
+
HlmNavigationMenuImports, // all seven above
|
|
33
|
+
HlmNavigationMenuModule, // NgModule wrapping HlmNavigationMenuImports
|
|
34
|
+
} from '@egose/shadcn-theme-ng/navigation-menu';
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Standalone usage:
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
import { Component } from '@angular/core';
|
|
41
|
+
import { HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
42
|
+
|
|
43
|
+
@Component({
|
|
44
|
+
selector: 'app-demo',
|
|
45
|
+
standalone: true,
|
|
46
|
+
imports: [...HlmNavigationMenuImports],
|
|
47
|
+
template: `
|
|
48
|
+
<nav hlmNavigationMenu>
|
|
49
|
+
<ul hlmNavigationMenuList>
|
|
50
|
+
<li hlmNavigationMenuItem>
|
|
51
|
+
<a hlmNavigationMenuLink routerLink="/">Home</a>
|
|
52
|
+
</li>
|
|
53
|
+
</ul>
|
|
54
|
+
</nav>
|
|
55
|
+
`,
|
|
56
|
+
})
|
|
57
|
+
export class DemoComponent {}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
NgModule usage:
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
import { NgModule } from '@angular/core';
|
|
64
|
+
import { HlmNavigationMenuModule } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
65
|
+
|
|
66
|
+
@NgModule({ imports: [HlmNavigationMenuModule] })
|
|
67
|
+
export class DemoModule {}
|
|
11
68
|
```
|
|
69
|
+
|
|
70
|
+
For the `tw:` build, swap the specifier to `@egose/shadcn-theme-ng-tw/navigation-menu`. Symbol names are identical.
|
|
71
|
+
|
|
72
|
+
## Anatomy / Structure
|
|
73
|
+
|
|
74
|
+
```html
|
|
75
|
+
<nav hlmNavigationMenu>
|
|
76
|
+
<ul hlmNavigationMenuList>
|
|
77
|
+
<!-- plain link -->
|
|
78
|
+
<li hlmNavigationMenuItem>
|
|
79
|
+
<a hlmNavigationMenuLink routerLink="/docs">Docs</a>
|
|
80
|
+
</li>
|
|
81
|
+
|
|
82
|
+
<!-- trigger + dropdown panel -->
|
|
83
|
+
<li hlmNavigationMenuItem>
|
|
84
|
+
<button hlmNavigationMenuTrigger>Products</button>
|
|
85
|
+
<!-- panel content: style with the content directive … -->
|
|
86
|
+
<div hlmNavigationMenuContent>
|
|
87
|
+
<a hlmNavigationMenuLink routerLink="/products/a">Product A</a>
|
|
88
|
+
<a hlmNavigationMenuLink routerLink="/products/b">Product B</a>
|
|
89
|
+
</div>
|
|
90
|
+
<!-- … and project it through the brain portal -->
|
|
91
|
+
<ng-container *hlmNavigationMenuPortal />
|
|
92
|
+
</li>
|
|
93
|
+
</ul>
|
|
94
|
+
</nav>
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
> Check the spartan-ng `BrnNavigationMenu` docs for the exact content/portal wiring in your installed version; the selectors above are the shadcn styling layer. The common shape is: trigger toggles state, `hlmNavigationMenuContent` styles the floating panel, and `*hlmNavigationMenuPortal` outlets the brain content.
|
|
98
|
+
|
|
99
|
+
| Class | Selector | Element | Role |
|
|
100
|
+
| -------------------------- | -------------------------------------------------------- | ----------------- | ---------------------------------------------------------- |
|
|
101
|
+
| `HlmNavigationMenu` | `nav[hlmNavigationMenu]` | `<nav>` only | Root; `BrnNavigationMenu` host |
|
|
102
|
+
| `HlmNavigationMenuList` | `ul[hlmNavigationMenuList]` | `<ul>` only | Horizontal list (`BrnNavigationMenuList`) |
|
|
103
|
+
| `HlmNavigationMenuItem` | `li[hlmNavigationMenuItem]` | `<li>` only | Item wrapper (`BrnNavigationMenuItem`) |
|
|
104
|
+
| `HlmNavigationMenuTrigger` | `button[hlmNavigationMenuTrigger]` | `<button>` only | Dropdown trigger with chevron (`BrnNavigationMenuTrigger`) |
|
|
105
|
+
| `HlmNavigationMenuLink` | `a[hlmNavigationMenuLink]` | `<a>` only | Styled nav link (`BrnNavigationMenuLink`) |
|
|
106
|
+
| `HlmNavigationMenuContent` | `[hlmNavigationMenuContent],hlm-navigation-menu-content` | any / element | Panel styling + `--nav-offset` |
|
|
107
|
+
| `HlmNavigationMenuPortal` | `[hlmNavigationMenuPortal]` | structural anchor | Projects `BrnNavigationMenuContent` |
|
|
108
|
+
|
|
109
|
+
## API reference
|
|
110
|
+
|
|
111
|
+
| Selector | Inputs (incl. host-directive passthroughs) | Outputs | Notes |
|
|
112
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------- | --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
|
113
|
+
| `nav[hlmNavigationMenu]` | `value`, `delayDuration`, `skipDelayDuration`, `orientation`, `openOn` (all via `BrnNavigationMenu`) | `valueChange` (via `BrnNavigationMenu`) | No shadcn inputs of its own |
|
|
114
|
+
| `ul[hlmNavigationMenuList]` | — | — | `gap-0 flex flex-1 list-none items-center justify-center`; stacks when `data-[orientation=vertical]` |
|
|
115
|
+
| `li[hlmNavigationMenuItem]` | `id` (via `BrnNavigationMenuItem`) | — | `relative has-[:focus]:z-10 data-active:z-10` |
|
|
116
|
+
| `button[hlmNavigationMenuTrigger]` | `align` (via `BrnNavigationMenuTrigger`) | — | Renders `<ng-content>` + `lucideChevronDown` that rotates when the trigger/item is open (`group-data-open` / `group-data-popup-open`) |
|
|
117
|
+
| `a[hlmNavigationMenuLink]` | `active` (via `BrnNavigationMenuLink`) | — | `data-[active=true]` active treatment |
|
|
118
|
+
| `[hlmNavigationMenuContent]` | `navOffset: number` (default `1.5`, number coercion) → `[style.--nav-offset]` | — | Animation/motion classes keyed off `data-[motion]` + `data-[orientation]`; panel chrome (`bg-popover rounded-lg shadow ring-1`) |
|
|
119
|
+
| `[hlmNavigationMenuPortal]` | `context`, `class` (via `BrnPopoverContent`-style `BrnNavigationMenuContent` host) | — | No shadcn inputs; pure projection directive |
|
|
120
|
+
|
|
121
|
+
No methods or signals are declared on any of these classes; behavior lives in the brain directives.
|
|
122
|
+
|
|
123
|
+
## Examples
|
|
124
|
+
|
|
125
|
+
### 1. Basic bar with links + one dropdown
|
|
126
|
+
|
|
127
|
+
```ts
|
|
128
|
+
import { Component } from '@angular/core';
|
|
129
|
+
import { RouterLink } from '@angular/router';
|
|
130
|
+
import { HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
131
|
+
|
|
132
|
+
@Component({
|
|
133
|
+
selector: 'app-nav-basic',
|
|
134
|
+
standalone: true,
|
|
135
|
+
imports: [RouterLink, ...HlmNavigationMenuImports],
|
|
136
|
+
template: `
|
|
137
|
+
<nav hlmNavigationMenu>
|
|
138
|
+
<ul hlmNavigationMenuList>
|
|
139
|
+
<li hlmNavigationMenuItem>
|
|
140
|
+
<a hlmNavigationMenuLink routerLink="/">Home</a>
|
|
141
|
+
</li>
|
|
142
|
+
<li hlmNavigationMenuItem>
|
|
143
|
+
<button hlmNavigationMenuTrigger>Products</button>
|
|
144
|
+
<div hlmNavigationMenuContent>
|
|
145
|
+
<a hlmNavigationMenuLink routerLink="/products/a">Product A</a>
|
|
146
|
+
<a hlmNavigationMenuLink routerLink="/products/b">Product B</a>
|
|
147
|
+
</div>
|
|
148
|
+
</li>
|
|
149
|
+
<li hlmNavigationMenuItem>
|
|
150
|
+
<a hlmNavigationMenuLink routerLink="/pricing">Pricing</a>
|
|
151
|
+
</li>
|
|
152
|
+
</ul>
|
|
153
|
+
</nav>
|
|
154
|
+
`,
|
|
155
|
+
})
|
|
156
|
+
export class NavBasicComponent {}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### 2. Active link state
|
|
160
|
+
|
|
161
|
+
```ts
|
|
162
|
+
import { Component } from '@angular/core';
|
|
163
|
+
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
164
|
+
import { HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
165
|
+
|
|
166
|
+
@Component({
|
|
167
|
+
selector: 'app-nav-active',
|
|
168
|
+
standalone: true,
|
|
169
|
+
imports: [RouterLink, RouterLinkActive, ...HlmNavigationMenuImports],
|
|
170
|
+
template: `
|
|
171
|
+
<nav hlmNavigationMenu>
|
|
172
|
+
<ul hlmNavigationMenuList>
|
|
173
|
+
<li hlmNavigationMenuItem>
|
|
174
|
+
<a
|
|
175
|
+
hlmNavigationMenuLink
|
|
176
|
+
routerLink="/docs"
|
|
177
|
+
routerLinkActive="active"
|
|
178
|
+
#rla="routerLinkActive"
|
|
179
|
+
[active]="rla.isActive"
|
|
180
|
+
>
|
|
181
|
+
Docs
|
|
182
|
+
</a>
|
|
183
|
+
</li>
|
|
184
|
+
<li hlmNavigationMenuItem>
|
|
185
|
+
<a
|
|
186
|
+
hlmNavigationMenuLink
|
|
187
|
+
routerLink="/blog"
|
|
188
|
+
routerLinkActive="active"
|
|
189
|
+
#rlb="routerLinkActive"
|
|
190
|
+
[active]="rlb.isActive"
|
|
191
|
+
>
|
|
192
|
+
Blog
|
|
193
|
+
</a>
|
|
194
|
+
</li>
|
|
195
|
+
</ul>
|
|
196
|
+
</nav>
|
|
197
|
+
`,
|
|
198
|
+
})
|
|
199
|
+
export class NavActiveComponent {}
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
> `[active]` is the brain input forwarded by `HlmNavigationMenuLink`; it drives the `data-[active=true]` treatment. `routerLinkActive` alone only adds a class — bind both.
|
|
203
|
+
|
|
204
|
+
### 3. Controlled value + orientation
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
import { Component, signal } from '@angular/core';
|
|
208
|
+
import { HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
209
|
+
|
|
210
|
+
@Component({
|
|
211
|
+
selector: 'app-nav-controlled',
|
|
212
|
+
standalone: true,
|
|
213
|
+
imports: [...HlmNavigationMenuImports],
|
|
214
|
+
template: `
|
|
215
|
+
<nav hlmNavigationMenu [value]="value()" orientation="horizontal" (valueChange)="value.set($event)">
|
|
216
|
+
<ul hlmNavigationMenuList>
|
|
217
|
+
<li hlmNavigationMenuItem id="item-docs">
|
|
218
|
+
<button hlmNavigationMenuTrigger>Docs</button>
|
|
219
|
+
<div hlmNavigationMenuContent>Docs panel</div>
|
|
220
|
+
</li>
|
|
221
|
+
<li hlmNavigationMenuItem id="item-api">
|
|
222
|
+
<button hlmNavigationMenuTrigger>API</button>
|
|
223
|
+
<div hlmNavigationMenuContent>API panel</div>
|
|
224
|
+
</li>
|
|
225
|
+
</ul>
|
|
226
|
+
</nav>
|
|
227
|
+
<p class="tw:text-sm tw:text-muted-foreground">Open: {{ value() ?? 'none' }}</p>
|
|
228
|
+
`,
|
|
229
|
+
})
|
|
230
|
+
export class NavControlledComponent {
|
|
231
|
+
readonly value = signal<string | undefined>(undefined);
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
`value`/`valueChange` and `orientation` are brain inputs/outputs exposed through `HlmNavigationMenu`; `id` is the brain input on each item used as the value key.
|
|
236
|
+
|
|
237
|
+
### 4. Rich mega-panel with offset tuning
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
import { Component } from '@angular/core';
|
|
241
|
+
import { RouterLink } from '@angular/router';
|
|
242
|
+
import { HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
243
|
+
|
|
244
|
+
@Component({
|
|
245
|
+
selector: 'app-nav-mega',
|
|
246
|
+
standalone: true,
|
|
247
|
+
imports: [RouterLink, ...HlmNavigationMenuImports],
|
|
248
|
+
template: `
|
|
249
|
+
<nav hlmNavigationMenu>
|
|
250
|
+
<ul hlmNavigationMenuList>
|
|
251
|
+
<li hlmNavigationMenuItem>
|
|
252
|
+
<button hlmNavigationMenuTrigger>Solutions</button>
|
|
253
|
+
<div hlmNavigationMenuContent [navOffset]="2">
|
|
254
|
+
<div class="tw:grid tw:grid-cols-2 tw:gap-2 tw:p-2 tw:min-w-[28rem]">
|
|
255
|
+
<a hlmNavigationMenuLink routerLink="/solutions/startups">
|
|
256
|
+
<div>
|
|
257
|
+
<div class="tw:font-medium">Startups</div>
|
|
258
|
+
<p class="tw:text-xs tw:text-muted-foreground">Launch fast.</p>
|
|
259
|
+
</div>
|
|
260
|
+
</a>
|
|
261
|
+
<a hlmNavigationMenuLink routerLink="/solutions/enterprise">
|
|
262
|
+
<div>
|
|
263
|
+
<div class="tw:font-medium">Enterprise</div>
|
|
264
|
+
<p class="tw:text-xs tw:text-muted-foreground">Scale safely.</p>
|
|
265
|
+
</div>
|
|
266
|
+
</a>
|
|
267
|
+
</div>
|
|
268
|
+
</div>
|
|
269
|
+
</li>
|
|
270
|
+
</ul>
|
|
271
|
+
</nav>
|
|
272
|
+
`,
|
|
273
|
+
})
|
|
274
|
+
export class NavMegaComponent {}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
`navOffset` sets `--nav-offset` (spacing units of gap between trigger and panel); the default `1.5` suits single-column panels, `2+` suits mega-panels.
|
|
278
|
+
|
|
279
|
+
### 5. Hover vs click + delays (brain behavior)
|
|
280
|
+
|
|
281
|
+
```ts
|
|
282
|
+
import { Component } from '@angular/core';
|
|
283
|
+
import { HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
284
|
+
|
|
285
|
+
@Component({
|
|
286
|
+
selector: 'app-nav-delays',
|
|
287
|
+
standalone: true,
|
|
288
|
+
imports: [...HlmNavigationMenuImports],
|
|
289
|
+
template: `
|
|
290
|
+
<nav hlmNavigationMenu openOn="hover" [delayDuration]="200" [skipDelayDuration]="300">
|
|
291
|
+
<ul hlmNavigationMenuList>
|
|
292
|
+
<li hlmNavigationMenuItem>
|
|
293
|
+
<button hlmNavigationMenuTrigger>Features</button>
|
|
294
|
+
<div hlmNavigationMenuContent>Feature panel (hover, 200ms delay)</div>
|
|
295
|
+
</li>
|
|
296
|
+
</ul>
|
|
297
|
+
</nav>
|
|
298
|
+
`,
|
|
299
|
+
})
|
|
300
|
+
export class NavDelaysComponent {}
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
`openOn`, `delayDuration`, `skipDelayDuration` are brain inputs — no shadcn wrapper logic involved.
|
|
304
|
+
|
|
305
|
+
### 6. Data-driven bar + NgModule consumer
|
|
306
|
+
|
|
307
|
+
```ts
|
|
308
|
+
import { NgModule, Component, signal } from '@angular/core';
|
|
309
|
+
import { RouterLink } from '@angular/router';
|
|
310
|
+
import { HlmNavigationMenuModule, HlmNavigationMenuImports } from '@egose/shadcn-theme-ng/navigation-menu';
|
|
311
|
+
|
|
312
|
+
interface NavEntry {
|
|
313
|
+
label: string;
|
|
314
|
+
link?: string;
|
|
315
|
+
children?: { label: string; link: string }[];
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@Component({
|
|
319
|
+
selector: 'app-nav-data',
|
|
320
|
+
standalone: true,
|
|
321
|
+
imports: [RouterLink, ...HlmNavigationMenuImports],
|
|
322
|
+
template: `
|
|
323
|
+
<nav hlmNavigationMenu>
|
|
324
|
+
<ul hlmNavigationMenuList>
|
|
325
|
+
@for (entry of entries(); track entry.label) {
|
|
326
|
+
<li hlmNavigationMenuItem>
|
|
327
|
+
@if (entry.children) {
|
|
328
|
+
<button hlmNavigationMenuTrigger>{{ entry.label }}</button>
|
|
329
|
+
<div hlmNavigationMenuContent>
|
|
330
|
+
@for (child of entry.children; track child.label) {
|
|
331
|
+
<a hlmNavigationMenuLink [routerLink]="child.link">{{ child.label }}</a>
|
|
332
|
+
}
|
|
333
|
+
</div>
|
|
334
|
+
} @else {
|
|
335
|
+
<a hlmNavigationMenuLink [routerLink]="entry.link">{{ entry.label }}</a>
|
|
336
|
+
}
|
|
337
|
+
</li>
|
|
338
|
+
}
|
|
339
|
+
</ul>
|
|
340
|
+
</nav>
|
|
341
|
+
`,
|
|
342
|
+
})
|
|
343
|
+
export class NavDataComponent {
|
|
344
|
+
readonly entries = signal<NavEntry[]>([
|
|
345
|
+
{ label: 'Home', link: '/' },
|
|
346
|
+
{
|
|
347
|
+
label: 'Docs',
|
|
348
|
+
children: [
|
|
349
|
+
{ label: 'Quickstart', link: '/docs/quickstart' },
|
|
350
|
+
{ label: 'API', link: '/docs/api' },
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
]);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@NgModule({ imports: [HlmNavigationMenuModule, RouterLink] })
|
|
357
|
+
export class NavLegacyModule {}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## Accessibility notes
|
|
361
|
+
|
|
362
|
+
- The brain layer owns menubar/tree semantics, focus management, `Escape` handling, and arrow-key traversal — preserve the `nav > ul > li > trigger/link` nesting so roles hold.
|
|
363
|
+
- Triggers must stay `<button>` and links `<a>`; swapping elements breaks both selectors and semantics.
|
|
364
|
+
- The trigger chevron rotates on open via `group-data-*` — decorative (`ng-icon` is aria-hidden by the icon layer); the open state itself is announced by the brain directive.
|
|
365
|
+
- For the active page, bind `[active]` (example 2) so the current link exposes `data-[active=true]` styling in addition to `aria-current` handling by the router.
|
|
366
|
+
|
|
367
|
+
## Theming / CSS variables
|
|
368
|
+
|
|
369
|
+
No theming inputs. Panel offset is tunable per instance via `navOffset`; everything else flows from tokens (`bg-background`, `bg-muted` hover, `bg-popover` panel, `ring-foreground/10`). Motion/placement classes respond to brain `data-[motion]` / `data-[orientation]` attributes.
|
|
370
|
+
|
|
371
|
+
## Related subpaths
|
|
372
|
+
|
|
373
|
+
- `@egose/shadcn-theme-ng/menubar` — action-menu bar (File/Edit) vs this component's site-navigation bar.
|
|
374
|
+
- `@egose/shadcn-theme-ng/dropdown-menu` — single-trigger menu when you don't need a full nav strip.
|
|
375
|
+
- `@egose/shadcn-theme-ng/navigation-menu` pairs well with `@egose/shadcn-theme-ng/layout-simple` top rows for docs/marketing shells.
|
|
@@ -8,12 +8,12 @@ import { lucideChevronDown } from '@ng-icons/lucide';
|
|
|
8
8
|
|
|
9
9
|
class HlmNavigationMenu {
|
|
10
10
|
constructor() {
|
|
11
|
-
classes(() =>
|
|
11
|
+
classes(() => "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center");
|
|
12
12
|
}
|
|
13
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
14
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
13
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenu, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
14
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmNavigationMenu, isStandalone: true, selector: "nav[hlmNavigationMenu]", host: { attributes: { "data-slot": "navigation-menu" } }, hostDirectives: [{ directive: i1.BrnNavigationMenu, inputs: ["value", "value", "delayDuration", "delayDuration", "skipDelayDuration", "skipDelayDuration", "orientation", "orientation", "openOn", "openOn"], outputs: ["valueChange", "valueChange"] }], ngImport: i0 });
|
|
15
15
|
}
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenu, decorators: [{
|
|
17
17
|
type: Directive,
|
|
18
18
|
args: [{
|
|
19
19
|
selector: 'nav[hlmNavigationMenu]',
|
|
@@ -34,17 +34,17 @@ class HlmNavigationMenuContent {
|
|
|
34
34
|
navOffset = input(1.5, { ...(ngDevMode ? { debugName: "navOffset" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
35
35
|
constructor() {
|
|
36
36
|
classes(() => [
|
|
37
|
-
|
|
37
|
+
"data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out top-0 left-0 w-full p-2 pr-2.5 md:w-auto",
|
|
38
38
|
'data-[orientation=horizontal]:data-[motion=from-end]:slide-in-from-right-52 data-[orientation=horizontal]:data-[motion=from-start]:slide-in-from-left-52 data-[orientation=horizontal]:data-[motion=to-end]:slide-out-to-right-52 data-[orientation=horizontal]:data-[motion=to-start]:slide-out-to-left-52',
|
|
39
39
|
'data-[orientation=vertical]:data-[motion=from-end]:slide-in-from-bottom-52 data-[orientation=vertical]:data-[motion=from-start]:slide-in-from-top-52 data-[orientation=vertical]:data-[motion=to-end]:slide-out-to-bottom-52 data-[orientation=vertical]:data-[motion=to-start]:slide-out-to-top-52',
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
"data-[orientation=horizontal]:mt-[--spacing(var(--nav-offset))] data-[orientation=vertical]:mx-[--spacing(var(--nav-offset))]",
|
|
41
|
+
"bg-popover text-popover-foreground ring-foreground/10 rounded-lg shadow ring-1 transition-all ease-[cubic-bezier(0.22,1,0.36,1)] outline-none data-ending-style:scale-90 data-ending-style:opacity-0 data-ending-style:duration-150 data-starting-style:scale-90 data-starting-style:opacity-0 block",
|
|
42
42
|
]);
|
|
43
43
|
}
|
|
44
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
45
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.
|
|
44
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
45
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: HlmNavigationMenuContent, isStandalone: true, selector: "[hlmNavigationMenuContent],hlm-navigation-menu-content", inputs: { navOffset: { classPropertyName: "navOffset", publicName: "navOffset", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "data-slot": "navigation-menu-content" }, properties: { "style.--nav-offset": "navOffset()" } }, ngImport: i0 });
|
|
46
46
|
}
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuContent, decorators: [{
|
|
48
48
|
type: Directive,
|
|
49
49
|
args: [{
|
|
50
50
|
selector: '[hlmNavigationMenuContent],hlm-navigation-menu-content',
|
|
@@ -57,12 +57,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
57
57
|
|
|
58
58
|
class HlmNavigationMenuItem {
|
|
59
59
|
constructor() {
|
|
60
|
-
classes(() =>
|
|
60
|
+
classes(() => "relative has-[:focus]:z-10 data-active:z-10");
|
|
61
61
|
}
|
|
62
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
63
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
62
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuItem, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
63
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmNavigationMenuItem, isStandalone: true, selector: "li[hlmNavigationMenuItem]", host: { attributes: { "data-slot": "navigation-menu-item" } }, hostDirectives: [{ directive: i1.BrnNavigationMenuItem, inputs: ["id", "id"] }], ngImport: i0 });
|
|
64
64
|
}
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuItem, decorators: [{
|
|
66
66
|
type: Directive,
|
|
67
67
|
args: [{
|
|
68
68
|
selector: 'li[hlmNavigationMenuItem]',
|
|
@@ -77,10 +77,10 @@ class HlmNavigationMenuLink {
|
|
|
77
77
|
constructor() {
|
|
78
78
|
classes(() => "data-[active=true]:focus:bg-muted data-[active=true]:hover:bg-muted data-[active=true]:bg-muted/50 focus-visible:ring-ring/50 hover:bg-muted focus:bg-muted flex items-center gap-1.5 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-3 focus-visible:outline-1 [&_ng-icon:not([class*='text-'])]:text-[length:--spacing(4)]");
|
|
79
79
|
}
|
|
80
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
81
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
80
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuLink, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
81
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmNavigationMenuLink, isStandalone: true, selector: "a[hlmNavigationMenuLink]", host: { attributes: { "data-slot": "navigation-menu-link" } }, hostDirectives: [{ directive: i1.BrnNavigationMenuLink, inputs: ["active", "active"] }], ngImport: i0 });
|
|
82
82
|
}
|
|
83
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
83
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuLink, decorators: [{
|
|
84
84
|
type: Directive,
|
|
85
85
|
args: [{
|
|
86
86
|
selector: 'a[hlmNavigationMenuLink]',
|
|
@@ -94,14 +94,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
94
94
|
class HlmNavigationMenuList {
|
|
95
95
|
constructor() {
|
|
96
96
|
classes(() => [
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
"gap-0 group flex flex-1 list-none items-center justify-center",
|
|
98
|
+
"data-[orientation=vertical]:flex-col",
|
|
99
99
|
]);
|
|
100
100
|
}
|
|
101
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
102
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuList, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
102
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmNavigationMenuList, isStandalone: true, selector: "ul[hlmNavigationMenuList]", host: { attributes: { "data-slot": "navigation-menu-list" } }, hostDirectives: [{ directive: i1.BrnNavigationMenuList }], ngImport: i0 });
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuList, decorators: [{
|
|
105
105
|
type: Directive,
|
|
106
106
|
args: [{
|
|
107
107
|
selector: 'ul[hlmNavigationMenuList]',
|
|
@@ -117,10 +117,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
117
117
|
}], ctorParameters: () => [] });
|
|
118
118
|
|
|
119
119
|
class HlmNavigationMenuPortal {
|
|
120
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
121
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.
|
|
120
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
121
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: HlmNavigationMenuPortal, isStandalone: true, selector: "[hlmNavigationMenuPortal]", hostDirectives: [{ directive: i1.BrnNavigationMenuContent }], ngImport: i0 });
|
|
122
122
|
}
|
|
123
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
123
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuPortal, decorators: [{
|
|
124
124
|
type: Directive,
|
|
125
125
|
args: [{
|
|
126
126
|
selector: '[hlmNavigationMenuPortal]',
|
|
@@ -130,18 +130,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
130
130
|
|
|
131
131
|
class HlmNavigationMenuTrigger {
|
|
132
132
|
constructor() {
|
|
133
|
-
classes(() =>
|
|
133
|
+
classes(() => "bg-background hover:bg-muted focus:bg-muted data-open:hover:bg-muted data-open:focus:bg-muted data-open:bg-muted/50 focus-visible:ring-ring/50 rounded-md px-4 py-2 text-sm font-medium transition-all focus-visible:ring-3 focus-visible:outline-1 disabled:opacity-50 group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center outline-none disabled:pointer-events-none");
|
|
134
134
|
}
|
|
135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
136
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.
|
|
137
|
-
<ng-content />
|
|
138
|
-
<ng-icon
|
|
139
|
-
name="lucideChevronDown"
|
|
140
|
-
class="relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180"
|
|
141
|
-
/>
|
|
142
|
-
`, isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuTrigger, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: HlmNavigationMenuTrigger, isStandalone: true, selector: "button[hlmNavigationMenuTrigger]", host: { attributes: { "data-slot": "navigation-menu-trigger" } }, providers: [provideIcons({ lucideChevronDown })], hostDirectives: [{ directive: i1.BrnNavigationMenuTrigger, inputs: ["align", "align"] }], ngImport: i0, template: "\n <ng-content />\n <ng-icon\n name=\"lucideChevronDown\"\n class=\"relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180\"\n />\n ", isInline: true, dependencies: [{ kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
143
137
|
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuTrigger, decorators: [{
|
|
145
139
|
type: Component,
|
|
146
140
|
args: [{
|
|
147
141
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
@@ -151,13 +145,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
151
145
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
152
146
|
hostDirectives: [{ directive: BrnNavigationMenuTrigger, inputs: ['align'] }],
|
|
153
147
|
host: { 'data-slot': 'navigation-menu-trigger' },
|
|
154
|
-
template:
|
|
155
|
-
<ng-content />
|
|
156
|
-
<ng-icon
|
|
157
|
-
name="lucideChevronDown"
|
|
158
|
-
class="relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180"
|
|
159
|
-
/>
|
|
160
|
-
`,
|
|
148
|
+
template: "\n <ng-content />\n <ng-icon\n name=\"lucideChevronDown\"\n class=\"relative top-px ml-1 size-3 transition duration-300 group-data-open/navigation-menu-trigger:rotate-180 group-data-popup-open/navigation-menu-trigger:rotate-180\"\n />\n ",
|
|
161
149
|
}]
|
|
162
150
|
}], ctorParameters: () => [] });
|
|
163
151
|
|
|
@@ -174,8 +162,8 @@ const HlmNavigationMenuImports = [
|
|
|
174
162
|
HlmNavigationMenuTrigger,
|
|
175
163
|
];
|
|
176
164
|
class HlmNavigationMenuModule {
|
|
177
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
178
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.
|
|
165
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
166
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuModule, imports: [HlmNavigationMenu,
|
|
179
167
|
HlmNavigationMenuContent,
|
|
180
168
|
HlmNavigationMenuItem,
|
|
181
169
|
HlmNavigationMenuLink,
|
|
@@ -188,9 +176,9 @@ class HlmNavigationMenuModule {
|
|
|
188
176
|
HlmNavigationMenuList,
|
|
189
177
|
HlmNavigationMenuPortal,
|
|
190
178
|
HlmNavigationMenuTrigger] });
|
|
191
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.
|
|
179
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuModule, imports: [HlmNavigationMenuTrigger] });
|
|
192
180
|
}
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmNavigationMenuModule, decorators: [{
|
|
194
182
|
type: NgModule,
|
|
195
183
|
args: [{
|
|
196
184
|
imports: [...HlmNavigationMenuImports],
|
|
@@ -203,4 +191,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
|
|
|
203
191
|
*/
|
|
204
192
|
|
|
205
193
|
export { HlmNavigationMenu, HlmNavigationMenuContent, HlmNavigationMenuImports, HlmNavigationMenuItem, HlmNavigationMenuLink, HlmNavigationMenuList, HlmNavigationMenuModule, HlmNavigationMenuPortal, HlmNavigationMenuTrigger };
|
|
206
|
-
|
|
194
|
+
|