@frame-kit/ui-ng 0.0.1
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/COMPONENTS.md +683 -0
- package/DEVELOPMENT_GUIDE.md +1102 -0
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/THEMING.md +130 -0
- package/core/headline/README.md +121 -0
- package/core/icon/README.md +173 -0
- package/core/image/README.md +210 -0
- package/core/link/README.md +297 -0
- package/core/separator/README.md +145 -0
- package/core/text/README.md +240 -0
- package/directives/infinite-scroll/README.md +102 -0
- package/directives/spotlight/README.md +154 -0
- package/directives/tooltip/README.md +147 -0
- package/docs/endpoint-link/README.md +142 -0
- package/docs/method-badge/README.md +154 -0
- package/fesm2022/frame-kit-ui-ng-core-headline.mjs +122 -0
- package/fesm2022/frame-kit-ui-ng-core-headline.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-icon.mjs +189 -0
- package/fesm2022/frame-kit-ui-ng-core-icon.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-image.mjs +123 -0
- package/fesm2022/frame-kit-ui-ng-core-image.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-link.mjs +369 -0
- package/fesm2022/frame-kit-ui-ng-core-link.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-separator.mjs +59 -0
- package/fesm2022/frame-kit-ui-ng-core-separator.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-core-text.mjs +204 -0
- package/fesm2022/frame-kit-ui-ng-core-text.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-directives-infinite-scroll.mjs +74 -0
- package/fesm2022/frame-kit-ui-ng-directives-infinite-scroll.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-directives-spotlight.mjs +76 -0
- package/fesm2022/frame-kit-ui-ng-directives-spotlight.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-directives-tooltip.mjs +425 -0
- package/fesm2022/frame-kit-ui-ng-directives-tooltip.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-docs-endpoint-link.mjs +63 -0
- package/fesm2022/frame-kit-ui-ng-docs-endpoint-link.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-docs-method-badge.mjs +43 -0
- package/fesm2022/frame-kit-ui-ng-docs-method-badge.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-forms.mjs +3632 -0
- package/fesm2022/frame-kit-ui-ng-forms.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-layouts-app-shell.mjs +239 -0
- package/fesm2022/frame-kit-ui-ng-layouts-app-shell.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-layouts-content-split.mjs +132 -0
- package/fesm2022/frame-kit-ui-ng-layouts-content-split.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-services-overlay-orchestrator.mjs +133 -0
- package/fesm2022/frame-kit-ui-ng-services-overlay-orchestrator.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-services-spotlight.mjs +60 -0
- package/fesm2022/frame-kit-ui-ng-services-spotlight.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-services-toast.mjs +166 -0
- package/fesm2022/frame-kit-ui-ng-services-toast.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-accordion.mjs +214 -0
- package/fesm2022/frame-kit-ui-ng-ui-accordion.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-alert.mjs +82 -0
- package/fesm2022/frame-kit-ui-ng-ui-alert.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar-stack.mjs +76 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar-stack.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-avatar.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-badge.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-badge.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-breadcrumb.mjs +68 -0
- package/fesm2022/frame-kit-ui-ng-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-button.mjs +108 -0
- package/fesm2022/frame-kit-ui-ng-ui-button.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-callout.mjs +58 -0
- package/fesm2022/frame-kit-ui-ng-ui-callout.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-card.mjs +70 -0
- package/fesm2022/frame-kit-ui-ng-ui-card.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-copyable-field.mjs +113 -0
- package/fesm2022/frame-kit-ui-ng-ui-copyable-field.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-data-table.mjs +1288 -0
- package/fesm2022/frame-kit-ui-ng-ui-data-table.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-dialog.mjs +456 -0
- package/fesm2022/frame-kit-ui-ng-ui-dialog.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-drawer.mjs +398 -0
- package/fesm2022/frame-kit-ui-ng-ui-drawer.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-dropdown-menu.mjs +398 -0
- package/fesm2022/frame-kit-ui-ng-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-editable-field.mjs +125 -0
- package/fesm2022/frame-kit-ui-ng-ui-editable-field.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-badge.mjs +113 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-badge.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-list.mjs +111 -0
- package/fesm2022/frame-kit-ui-ng-ui-icon-list.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-inline-edit.mjs +103 -0
- package/fesm2022/frame-kit-ui-ng-ui-inline-edit.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-list-editor.mjs +135 -0
- package/fesm2022/frame-kit-ui-ng-ui-list-editor.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-loader.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-loader.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-menu-item.mjs +79 -0
- package/fesm2022/frame-kit-ui-ng-ui-menu-item.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-brand.mjs +40 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-brand.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-group.mjs +110 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-group.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-separator.mjs +91 -0
- package/fesm2022/frame-kit-ui-ng-ui-nav-separator.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree-breadcrumb.mjs +86 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree-breadcrumb.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree.mjs +443 -0
- package/fesm2022/frame-kit-ui-ng-ui-node-tree.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-note.mjs +56 -0
- package/fesm2022/frame-kit-ui-ng-ui-note.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-numbered-list.mjs +105 -0
- package/fesm2022/frame-kit-ui-ng-ui-numbered-list.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-pagination.mjs +110 -0
- package/fesm2022/frame-kit-ui-ng-ui-pagination.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-progress-bar.mjs +129 -0
- package/fesm2022/frame-kit-ui-ng-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-sidenav-link.mjs +42 -0
- package/fesm2022/frame-kit-ui-ng-ui-sidenav-link.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-tabs.mjs +894 -0
- package/fesm2022/frame-kit-ui-ng-ui-tabs.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-timeline.mjs +81 -0
- package/fesm2022/frame-kit-ui-ng-ui-timeline.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-toast.mjs +179 -0
- package/fesm2022/frame-kit-ui-ng-ui-toast.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-user-menu.mjs +143 -0
- package/fesm2022/frame-kit-ui-ng-ui-user-menu.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng-ui-wizard-dialog.mjs +191 -0
- package/fesm2022/frame-kit-ui-ng-ui-wizard-dialog.mjs.map +1 -0
- package/fesm2022/frame-kit-ui-ng.mjs +58 -0
- package/fesm2022/frame-kit-ui-ng.mjs.map +1 -0
- package/layouts/app-shell/README.md +357 -0
- package/layouts/content-split/README.md +180 -0
- package/package.json +253 -0
- package/services/overlay-orchestrator/README.md +184 -0
- package/services/spotlight/README.md +61 -0
- package/services/toast/README.md +118 -0
- package/types/frame-kit-ui-ng-core-headline.d.ts +38 -0
- package/types/frame-kit-ui-ng-core-icon.d.ts +74 -0
- package/types/frame-kit-ui-ng-core-image.d.ts +93 -0
- package/types/frame-kit-ui-ng-core-link.d.ts +251 -0
- package/types/frame-kit-ui-ng-core-separator.d.ts +28 -0
- package/types/frame-kit-ui-ng-core-text.d.ts +186 -0
- package/types/frame-kit-ui-ng-directives-infinite-scroll.d.ts +42 -0
- package/types/frame-kit-ui-ng-directives-spotlight.d.ts +51 -0
- package/types/frame-kit-ui-ng-directives-tooltip.d.ts +70 -0
- package/types/frame-kit-ui-ng-docs-endpoint-link.d.ts +43 -0
- package/types/frame-kit-ui-ng-docs-method-badge.d.ts +30 -0
- package/types/frame-kit-ui-ng-forms.d.ts +1674 -0
- package/types/frame-kit-ui-ng-layouts-app-shell.d.ts +75 -0
- package/types/frame-kit-ui-ng-layouts-content-split.d.ts +43 -0
- package/types/frame-kit-ui-ng-services-overlay-orchestrator.d.ts +96 -0
- package/types/frame-kit-ui-ng-services-spotlight.d.ts +32 -0
- package/types/frame-kit-ui-ng-services-toast.d.ts +100 -0
- package/types/frame-kit-ui-ng-ui-accordion.d.ts +86 -0
- package/types/frame-kit-ui-ng-ui-alert.d.ts +34 -0
- package/types/frame-kit-ui-ng-ui-avatar-stack.d.ts +38 -0
- package/types/frame-kit-ui-ng-ui-avatar.d.ts +36 -0
- package/types/frame-kit-ui-ng-ui-badge.d.ts +33 -0
- package/types/frame-kit-ui-ng-ui-breadcrumb.d.ts +45 -0
- package/types/frame-kit-ui-ng-ui-button.d.ts +48 -0
- package/types/frame-kit-ui-ng-ui-callout.d.ts +26 -0
- package/types/frame-kit-ui-ng-ui-card.d.ts +30 -0
- package/types/frame-kit-ui-ng-ui-copyable-field.d.ts +62 -0
- package/types/frame-kit-ui-ng-ui-data-table.d.ts +482 -0
- package/types/frame-kit-ui-ng-ui-dialog.d.ts +166 -0
- package/types/frame-kit-ui-ng-ui-drawer.d.ts +130 -0
- package/types/frame-kit-ui-ng-ui-dropdown-menu.d.ts +77 -0
- package/types/frame-kit-ui-ng-ui-editable-field.d.ts +65 -0
- package/types/frame-kit-ui-ng-ui-icon-badge.d.ts +45 -0
- package/types/frame-kit-ui-ng-ui-icon-list.d.ts +67 -0
- package/types/frame-kit-ui-ng-ui-inline-edit.d.ts +44 -0
- package/types/frame-kit-ui-ng-ui-list-editor.d.ts +56 -0
- package/types/frame-kit-ui-ng-ui-loader.d.ts +32 -0
- package/types/frame-kit-ui-ng-ui-menu-item.d.ts +27 -0
- package/types/frame-kit-ui-ng-ui-nav-brand.d.ts +25 -0
- package/types/frame-kit-ui-ng-ui-nav-group.d.ts +60 -0
- package/types/frame-kit-ui-ng-ui-nav-separator.d.ts +33 -0
- package/types/frame-kit-ui-ng-ui-node-tree-breadcrumb.d.ts +35 -0
- package/types/frame-kit-ui-ng-ui-node-tree.d.ts +135 -0
- package/types/frame-kit-ui-ng-ui-note.d.ts +22 -0
- package/types/frame-kit-ui-ng-ui-numbered-list.d.ts +52 -0
- package/types/frame-kit-ui-ng-ui-pagination.d.ts +49 -0
- package/types/frame-kit-ui-ng-ui-progress-bar.d.ts +50 -0
- package/types/frame-kit-ui-ng-ui-sidenav-link.d.ts +24 -0
- package/types/frame-kit-ui-ng-ui-tabs.d.ts +266 -0
- package/types/frame-kit-ui-ng-ui-timeline.d.ts +42 -0
- package/types/frame-kit-ui-ng-ui-toast.d.ts +56 -0
- package/types/frame-kit-ui-ng-ui-user-menu.d.ts +87 -0
- package/types/frame-kit-ui-ng-ui-wizard-dialog.d.ts +116 -0
- package/types/frame-kit-ui-ng.d.ts +53 -0
- package/ui/accordion/README.md +261 -0
- package/ui/alert/README.md +211 -0
- package/ui/avatar/README.md +167 -0
- package/ui/avatar-stack/README.md +164 -0
- package/ui/badge/README.md +162 -0
- package/ui/breadcrumb/README.md +240 -0
- package/ui/button/README.md +184 -0
- package/ui/callout/README.md +159 -0
- package/ui/card/README.md +174 -0
- package/ui/copyable-field/README.md +235 -0
- package/ui/data-table/README.md +408 -0
- package/ui/dialog/README.md +222 -0
- package/ui/drawer/README.md +274 -0
- package/ui/dropdown-menu/README.md +336 -0
- package/ui/editable-field/README.md +171 -0
- package/ui/icon-badge/README.md +131 -0
- package/ui/icon-list/README.md +205 -0
- package/ui/inline-edit/README.md +135 -0
- package/ui/list-editor/README.md +162 -0
- package/ui/loader/README.md +160 -0
- package/ui/menu-item/README.md +204 -0
- package/ui/nav-brand/README.md +111 -0
- package/ui/nav-group/README.md +145 -0
- package/ui/nav-separator/README.md +44 -0
- package/ui/node-tree/README.md +278 -0
- package/ui/node-tree-breadcrumb/README.md +164 -0
- package/ui/note/README.md +146 -0
- package/ui/numbered-list/README.md +187 -0
- package/ui/pagination/README.md +174 -0
- package/ui/progress-bar/README.md +223 -0
- package/ui/sidenav-link/README.md +214 -0
- package/ui/tabs/README.md +204 -0
- package/ui/timeline/README.md +285 -0
- package/ui/toast/README.md +243 -0
- package/ui/user-menu/README.md +260 -0
- package/ui/wizard-dialog/README.md +283 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# fk-menu-item / fk-menu-separator
|
|
2
|
+
|
|
3
|
+
Atom-level menu primitives for rendering actionable items and visual dividers inside menu-like containers such as `fk-dropdown-menu`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## API
|
|
8
|
+
|
|
9
|
+
### fk-menu-item
|
|
10
|
+
|
|
11
|
+
#### Inputs
|
|
12
|
+
|
|
13
|
+
| Input | Type | Default | Description |
|
|
14
|
+
| ---------- | ---------------- | ------- | ----------------------------------------- |
|
|
15
|
+
| `icon` | `string \| null` | `null` | Optional icon name shown before the label |
|
|
16
|
+
| `danger` | `boolean` | `false` | Applies destructive/danger styling |
|
|
17
|
+
| `disabled` | `boolean` | `false` | Disables the item |
|
|
18
|
+
|
|
19
|
+
#### Outputs
|
|
20
|
+
|
|
21
|
+
| Output | Type | Description |
|
|
22
|
+
| ----------- | ------ | ---------------------------------- |
|
|
23
|
+
| `itemClick` | `void` | Emitted when the item is activated |
|
|
24
|
+
|
|
25
|
+
#### Content
|
|
26
|
+
|
|
27
|
+
The item label is provided through content projection.
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<fk-menu-item>Save Changes</fk-menu-item>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### fk-menu-separator
|
|
34
|
+
|
|
35
|
+
A visual divider between menu item groups. No inputs or outputs.
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<fk-menu-separator />
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
- Icon + label layout with flexible content projection
|
|
46
|
+
- Danger variant for destructive actions
|
|
47
|
+
- Disabled state with `aria-disabled` and keyboard exclusion
|
|
48
|
+
- Keyboard activation via Enter and Space
|
|
49
|
+
- Dispatches `fkmenuitemselect` bubbling event for parent auto-close
|
|
50
|
+
- Token-driven styling with two-tier fallbacks
|
|
51
|
+
- Reusable across any menu-like context (dropdown menus, context menus, command palettes)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<fk-menu-item icon="eye" (itemClick)="onView()">View Details</fk-menu-item>
|
|
59
|
+
<fk-menu-separator />
|
|
60
|
+
<fk-menu-item icon="gear-outline" [disabled]="true">Settings</fk-menu-item>
|
|
61
|
+
<fk-menu-item [danger]="true" (itemClick)="onDelete()">Delete</fk-menu-item>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Import
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { MenuItemComponent, MenuSeparatorComponent } from '@frame-kit/ui-ng';
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
@Component({
|
|
74
|
+
selector: 'app-example',
|
|
75
|
+
imports: [MenuItemComponent, MenuSeparatorComponent],
|
|
76
|
+
templateUrl: './example.component.html',
|
|
77
|
+
})
|
|
78
|
+
export class ExampleComponent {}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Selectors
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<fk-menu-item></fk-menu-item> <fk-menu-separator></fk-menu-separator>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
### With icon
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<fk-menu-item icon="eye">View</fk-menu-item>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Without icon
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<fk-menu-item>Copy</fk-menu-item>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Danger variant
|
|
106
|
+
|
|
107
|
+
```html
|
|
108
|
+
<fk-menu-item [danger]="true">Delete</fk-menu-item>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Disabled
|
|
112
|
+
|
|
113
|
+
```html
|
|
114
|
+
<fk-menu-item [disabled]="true">Settings (locked)</fk-menu-item>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### With separator
|
|
118
|
+
|
|
119
|
+
```html
|
|
120
|
+
<fk-menu-item icon="eye">View</fk-menu-item>
|
|
121
|
+
<fk-menu-item icon="gear-outline">Edit</fk-menu-item>
|
|
122
|
+
<fk-menu-separator />
|
|
123
|
+
<fk-menu-item icon="open-rect-arrow-out-fill" [danger]="true">Delete</fk-menu-item>
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Handling clicks
|
|
127
|
+
|
|
128
|
+
```html
|
|
129
|
+
<fk-menu-item (itemClick)="onEdit()">Edit</fk-menu-item>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Disabled items do not emit `itemClick`.
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Accessibility
|
|
137
|
+
|
|
138
|
+
### fk-menu-item
|
|
139
|
+
|
|
140
|
+
- Host element has `role="menuitem"`
|
|
141
|
+
- `tabindex="-1"` for roving focus management (parent container controls focus)
|
|
142
|
+
- `aria-disabled="true"` set when disabled; disabled items are skipped by keyboard navigation
|
|
143
|
+
- Activates on Enter and Space keydown
|
|
144
|
+
|
|
145
|
+
### fk-menu-separator
|
|
146
|
+
|
|
147
|
+
- Host element has `role="separator"`
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Design Tokens
|
|
152
|
+
|
|
153
|
+
### fk-menu-item tokens
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
--fk-menu-item-gap
|
|
157
|
+
--fk-menu-item-padding
|
|
158
|
+
--fk-menu-item-radius
|
|
159
|
+
--fk-menu-item-font-family
|
|
160
|
+
--fk-menu-item-font-size
|
|
161
|
+
--fk-menu-item-color
|
|
162
|
+
--fk-menu-item-bg-hover
|
|
163
|
+
--fk-menu-item-focus-ring
|
|
164
|
+
--fk-menu-item-opacity-disabled
|
|
165
|
+
--fk-menu-item-transition-duration
|
|
166
|
+
--fk-menu-item-transition-easing
|
|
167
|
+
--fk-menu-item-danger-color
|
|
168
|
+
--fk-menu-item-danger-bg-hover
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### fk-menu-separator tokens
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
--fk-menu-separator-color
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Customizing tokens
|
|
178
|
+
|
|
179
|
+
Override tokens in your application's global stylesheet or a scoped selector:
|
|
180
|
+
|
|
181
|
+
```css
|
|
182
|
+
:root {
|
|
183
|
+
--fk-menu-item-radius: 0;
|
|
184
|
+
--fk-menu-item-bg-hover: #f5f3ff;
|
|
185
|
+
--fk-menu-item-danger-color: #dc2626;
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Or scope overrides to a specific container:
|
|
190
|
+
|
|
191
|
+
```css
|
|
192
|
+
.custom-menu fk-menu-item {
|
|
193
|
+
--fk-menu-item-font-size: 1rem;
|
|
194
|
+
--fk-menu-item-padding: 0.75rem 1rem;
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Behavior Notes
|
|
201
|
+
|
|
202
|
+
- `fk-menu-item` dispatches a custom `fkmenuitemselect` DOM event with `bubbles: true` on activation, allowing parent containers like `fk-dropdown-menu` to auto-close without tight coupling
|
|
203
|
+
- `fk-menu-item` and `fk-menu-separator` are standalone atoms designed for reuse across any menu-like context, not just dropdown menus
|
|
204
|
+
- Disabled items suppress click/keyboard activation and are excluded from focus navigation by parent containers querying `[role="menuitem"]:not([aria-disabled="true"])`
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# fk-nav-brand
|
|
2
|
+
|
|
3
|
+
A navigation brand component for displaying your app or company name (and optional logo) in the header with router integration.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## API
|
|
8
|
+
|
|
9
|
+
### Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Description |
|
|
12
|
+
| ----------- | ------------------- | ------- | -------------------------------------------------------- |
|
|
13
|
+
| `brandText` | `string` (required) | — | Brand text to display (for example `"FrameKit"`) |
|
|
14
|
+
| `href` | `string` | `"/"` | Navigation target (router link or plain href) |
|
|
15
|
+
| `id` | `string \| null` | `null` | Optional ID for the root element |
|
|
16
|
+
| `className` | `string` | `''` | Additional CSS classes for the host element |
|
|
17
|
+
| `ariaLabel` | `string \| null` | `null` | Accessible label when the brand text alone is not enough |
|
|
18
|
+
|
|
19
|
+
Internally, `fk-nav-brand` uses Angular’s router to navigate when `href` is a client-side route.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
- Consistent brand placement in navigation bars
|
|
26
|
+
- Works with Angular Router via `routerLink`
|
|
27
|
+
- Token-driven typography and spacing
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
```html
|
|
34
|
+
<fk-nav-brand brandText="Acme App" href="/"></fk-nav-brand>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Import
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { NavBrandComponent } from '@frame-kit/ui-ng';
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
```ts
|
|
46
|
+
@Component({
|
|
47
|
+
selector: 'app-header',
|
|
48
|
+
imports: [NavBrandComponent],
|
|
49
|
+
templateUrl: './header.component.html',
|
|
50
|
+
})
|
|
51
|
+
export class HeaderComponent {}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Selector
|
|
57
|
+
|
|
58
|
+
```html
|
|
59
|
+
<fk-nav-brand></fk-nav-brand>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Examples
|
|
65
|
+
|
|
66
|
+
### Basic header usage
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<header class="app-header">
|
|
70
|
+
<fk-nav-brand brandText="My Application" href="/"></fk-nav-brand>
|
|
71
|
+
</header>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### With ARIA label
|
|
75
|
+
|
|
76
|
+
```html
|
|
77
|
+
<fk-nav-brand brandText="AA" href="/" ariaLabel="Acme App Home"></fk-nav-brand>
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Accessibility
|
|
83
|
+
|
|
84
|
+
- Use `ariaLabel` when abbreviations or logos alone might not be clear to screen readers.
|
|
85
|
+
- Typically placed within a `<header>` or `<nav>` landmark to help assistive tech users orient themselves.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Design Tokens
|
|
90
|
+
|
|
91
|
+
`fk-nav-brand` uses navigation/brand tokens such as:
|
|
92
|
+
|
|
93
|
+
```scss
|
|
94
|
+
--fk-nav-brand-font-size;
|
|
95
|
+
--fk-nav-brand-font-weight;
|
|
96
|
+
--fk-nav-brand-color;
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Override in your theme:
|
|
100
|
+
|
|
101
|
+
```scss
|
|
102
|
+
:root {
|
|
103
|
+
--fk-nav-brand-font-weight: 700;
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Behavior Notes
|
|
110
|
+
|
|
111
|
+
- The component is unopinionated about layout; pair it with your header/nav layout components for full navigation experiences.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# fk-nav-group
|
|
2
|
+
|
|
3
|
+
An expandable sidenav group — renders a clickable trigger row (icon + label, optionally routed) and reveals projected child nav items when expanded. Designed to sit inside a collapsible shell so that clicks on a collapsed rail pop the shell open and auto-expand the group.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## API
|
|
8
|
+
|
|
9
|
+
### Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Default | Description |
|
|
12
|
+
| ------------ | ---------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| `label` | `string` | — | **Required.** Text rendered on the trigger row. |
|
|
14
|
+
| `icon` | `string \| null` | `null` | Icon name rendered before the label. |
|
|
15
|
+
| `iconSize` | `IconSize` | `"sm"` | Size passed through to the trigger's `fk-sidenav-link`. |
|
|
16
|
+
| `routerLink` | `string \| string[] \| null` | `null` | Destination for the trigger's anchor. Active in both expanded and collapsed states. |
|
|
17
|
+
| `collapsed` | `boolean` | `false` | Set this to `true` when the outer sidenav is in its collapsed rail state — clicks then both navigate AND emit `requestOpen`. |
|
|
18
|
+
| `className` | `string` | `''` | Additional CSS classes merged onto the host element. |
|
|
19
|
+
|
|
20
|
+
### Models
|
|
21
|
+
|
|
22
|
+
| Model | Type | Default | Description |
|
|
23
|
+
| ---------- | --------- | ------- | --------------------------------------------------------------------------- |
|
|
24
|
+
| `expanded` | `boolean` | `false` | Two-way bound expansion state. Flipped by the built-in toggle on row click. |
|
|
25
|
+
|
|
26
|
+
### Outputs
|
|
27
|
+
|
|
28
|
+
| Output | Type | Description |
|
|
29
|
+
| ------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
30
|
+
| `requestOpen` | `void` | Emitted only when the trigger is clicked while `collapsed` is `true`. Hosts typically listen to open their collapsible outer shell. The trigger also navigates via `routerLink` on the same click, so the user lands on the group's route with the shell already opening. |
|
|
31
|
+
|
|
32
|
+
### Content
|
|
33
|
+
|
|
34
|
+
`fk-nav-group` projects its child nav items into the expanded body:
|
|
35
|
+
|
|
36
|
+
```html
|
|
37
|
+
<fk-nav-group label="Integrations" icon="integrations">
|
|
38
|
+
<fk-sidenav-link icon="integrations" label="API Keys" routerLink="/integrations/api-keys" />
|
|
39
|
+
<fk-sidenav-link icon="integrations" label="Webhooks" routerLink="/integrations/webhooks" />
|
|
40
|
+
</fk-nav-group>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Features
|
|
46
|
+
|
|
47
|
+
- Click-to-toggle expansion with two-way `expanded` model (suppressed by `lockedOpen`)
|
|
48
|
+
- Router integration via `routerLink` — navigates in both expanded and collapsed states
|
|
49
|
+
- `requestOpen` output bridges to a collapsible outer shell (`fk-app-shell` and friends) — fires alongside navigation when clicked in rail mode
|
|
50
|
+
- Content projection for arbitrary child rows — `fk-sidenav-link`, section titles, custom markers
|
|
51
|
+
- Token-driven spacing (`--fk-nav-group-row-gap`, `--fk-nav-group-children-gap`, `--fk-nav-group-children-indent`, `--fk-nav-group-children-offset`)
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<fk-nav-group label="Integrations" icon="integrations" iconSize="md" [routerLink]="['/integrations']" [collapsed]="sidenavCollapsed()" [(expanded)]="integrationsExpanded" (requestOpen)="openSidenav()">
|
|
59
|
+
<fk-sidenav-link icon="integrations" label="API Keys" [routerLink]="['/integrations/api-keys']" />
|
|
60
|
+
<fk-sidenav-link icon="integrations" label="Applications" [routerLink]="['/integrations/applications']" />
|
|
61
|
+
</fk-nav-group>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Import
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { NavGroupComponent } from '@frame-kit/ui-ng';
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
@Component({
|
|
74
|
+
selector: 'app-example',
|
|
75
|
+
imports: [NavGroupComponent],
|
|
76
|
+
templateUrl: './example.component.html',
|
|
77
|
+
})
|
|
78
|
+
export class ExampleComponent {}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Selector
|
|
84
|
+
|
|
85
|
+
```html
|
|
86
|
+
<fk-nav-group></fk-nav-group>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Examples
|
|
92
|
+
|
|
93
|
+
### Flat list with auto-expansion
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<fk-nav-group label="Core Concepts" icon="book-outline" [(expanded)]="expanded">
|
|
97
|
+
<fk-sidenav-link icon="book-outline" label="Authentication" routerLink="/docs/authentication" />
|
|
98
|
+
<fk-sidenav-link icon="book-outline" label="Roles" routerLink="/docs/roles" />
|
|
99
|
+
<fk-sidenav-link icon="book-outline" label="Permissions" routerLink="/docs/permissions" />
|
|
100
|
+
</fk-nav-group>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Inside a collapsible sidenav
|
|
104
|
+
|
|
105
|
+
```html
|
|
106
|
+
<fk-nav-group label="Docs" icon="book-outline" [collapsed]="shellCollapsed()" [(expanded)]="docsExpanded" (requestOpen)="shellCollapsed.set(false)">
|
|
107
|
+
<fk-sidenav-link label="Getting started" routerLink="/docs" />
|
|
108
|
+
</fk-nav-group>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Accessibility
|
|
114
|
+
|
|
115
|
+
- Trigger row is a `role="presentation"` wrapper containing a keyboard-navigable `fk-sidenav-link` — the sidenav-link handles focus and keyboard activation
|
|
116
|
+
- Expansion state is reflected through the host class `fk-nav-group--expanded`; consumers can add further ARIA attributes via `className` if needed
|
|
117
|
+
- Keyboard activation (Enter on the focused trigger) follows the same path as a mouse click — navigates via `routerLink` and, when `collapsed` is `true`, also emits `requestOpen` so screen-reader users land on the destination with the rail expanding behind them
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Design Tokens
|
|
122
|
+
|
|
123
|
+
```scss
|
|
124
|
+
--fk-nav-group-row-gap;
|
|
125
|
+
--fk-nav-group-children-gap;
|
|
126
|
+
--fk-nav-group-children-indent;
|
|
127
|
+
--fk-nav-group-children-offset;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Override in your app stylesheet:
|
|
131
|
+
|
|
132
|
+
```scss
|
|
133
|
+
:root {
|
|
134
|
+
--fk-nav-group-children-indent: 1rem;
|
|
135
|
+
--fk-nav-group-children-gap: var(--fk-rhythm-2);
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Behavior Notes
|
|
142
|
+
|
|
143
|
+
- The built-in `toggle()` decides what happens to `expanded` on click: in rail mode it leaves `expanded` alone and only emits `requestOpen` (children must not render inside the rail); in expanded mode it flips `expanded` unless `lockedOpen` is `true`. Navigation via `routerLink` happens independently on the inner sidenav-link's anchor in both states. If you want custom behavior, listen to `(requestOpen)` and drive `[(expanded)]` yourself.
|
|
144
|
+
- The trigger row composes `fk-sidenav-link` — you get the same active-route styling and keyboard semantics for free.
|
|
145
|
+
- No opinionated max-width — the trigger fills the row. Cap the width at the consumer level if you need it (e.g., docs shells clamp their top-level items to 18rem).
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# fk-nav-separator
|
|
2
|
+
|
|
3
|
+
A token-driven separator atom for visually dividing groups of navigation items. Supports vertical and horizontal orientation with decorative/semantic accessibility modes.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
```html
|
|
8
|
+
<!-- Default: vertical, decorative -->
|
|
9
|
+
<fk-nav-separator />
|
|
10
|
+
|
|
11
|
+
<!-- Horizontal -->
|
|
12
|
+
<fk-nav-separator orientation="horizontal" />
|
|
13
|
+
|
|
14
|
+
<!-- Semantic (accessible to screen readers) -->
|
|
15
|
+
<fk-nav-separator [decorative]="false" />
|
|
16
|
+
|
|
17
|
+
<!-- Custom styling -->
|
|
18
|
+
<fk-nav-separator length="2rem" thickness="2px" color="var(--fk-color-primary)" />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Inputs
|
|
22
|
+
|
|
23
|
+
| Input | Type | Default | Description |
|
|
24
|
+
| ------------- | ---------------------------- | ------------ | ------------------------------------------------------------------------- |
|
|
25
|
+
| `orientation` | `"vertical" \| "horizontal"` | `"vertical"` | Line axis |
|
|
26
|
+
| `length` | `string \| null` | `null` | Line length (height when vertical, width when horizontal) |
|
|
27
|
+
| `thickness` | `string \| null` | `null` | Line thickness |
|
|
28
|
+
| `margin` | `string \| null` | `null` | Margin around separator |
|
|
29
|
+
| `color` | `string \| null` | `null` | Custom color override |
|
|
30
|
+
| `decorative` | `boolean` | `true` | If true: `aria-hidden="true"`. If false: `role="separator"` + orientation |
|
|
31
|
+
| `className` | `string` | `""` | Additional CSS classes |
|
|
32
|
+
|
|
33
|
+
## Tokens
|
|
34
|
+
|
|
35
|
+
| Token | Fallback | Description |
|
|
36
|
+
| ------------------------------ | ------------------------ | -------------- |
|
|
37
|
+
| `--fk-nav-separator-color` | `var(--fk-color-border)` | Line color |
|
|
38
|
+
| `--fk-nav-separator-length` | `1.5rem` / `auto` | Line length |
|
|
39
|
+
| `--fk-nav-separator-thickness` | `1px` | Line thickness |
|
|
40
|
+
| `--fk-nav-separator-margin` | `0 0.75rem` / `0.5rem 0` | Spacing around |
|
|
41
|
+
|
|
42
|
+
## Accessibility
|
|
43
|
+
|
|
44
|
+
By default, the separator is decorative (`aria-hidden="true"`). Set `[decorative]="false"` to expose it as a semantic separator with `role="separator"` and `aria-orientation`.
|