@daffodil/design 0.51.1 → 0.53.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/core/focus/focusable-elements.d.ts +1 -0
- package/core/focus/public_api.d.ts +1 -0
- package/core/lazy/lazy-component.d.ts +7 -0
- package/core/lazy/public_api.d.ts +1 -0
- package/core/public_api.d.ts +2 -0
- package/esm2020/core/focus/focusable-elements.mjs +2 -0
- package/esm2020/core/focus/public_api.mjs +2 -0
- package/esm2020/core/lazy/lazy-component.mjs +3 -0
- package/esm2020/core/lazy/public_api.mjs +2 -0
- package/esm2020/core/public_api.mjs +3 -1
- package/esm2020/menu/examples/basic-menu/basic-menu.component.mjs +16 -0
- package/esm2020/menu/examples/basic-menu/basic-menu.module.mjs +36 -0
- package/esm2020/menu/examples/basic-menu/menu-content/menu-content.component.mjs +19 -0
- package/esm2020/menu/examples/daffodil-design-menu-examples.mjs +5 -0
- package/esm2020/menu/examples/index.mjs +2 -0
- package/esm2020/menu/examples/public_api.mjs +6 -0
- package/esm2020/molecules/menu/helpers/create-overlay.mjs +29 -0
- package/esm2020/molecules/menu/helpers/public_api.mjs +2 -0
- package/esm2020/molecules/menu/menu/menu.component.mjs +63 -0
- package/esm2020/molecules/menu/menu-activator/menu-activator.component.mjs +48 -0
- package/esm2020/molecules/menu/menu-item/menu-item.component.mjs +35 -0
- package/esm2020/molecules/menu/menu.module.mjs +46 -0
- package/esm2020/molecules/menu/public_api.mjs +7 -0
- package/esm2020/molecules/menu/service/menu.service.mjs +52 -0
- package/esm2020/public_api.mjs +2 -1
- package/fesm2015/daffodil-design-menu-examples.mjs +74 -0
- package/fesm2015/daffodil-design-menu-examples.mjs.map +1 -0
- package/fesm2015/daffodil-design.mjs +255 -16
- package/fesm2015/daffodil-design.mjs.map +1 -1
- package/fesm2020/daffodil-design-menu-examples.mjs +74 -0
- package/fesm2020/daffodil-design-menu-examples.mjs.map +1 -0
- package/fesm2020/daffodil-design.mjs +259 -16
- package/fesm2020/daffodil-design.mjs.map +1 -1
- package/menu/examples/basic-menu/basic-menu.component.d.ts +7 -0
- package/menu/examples/basic-menu/basic-menu.module.d.ts +10 -0
- package/menu/examples/basic-menu/menu-content/menu-content.component.d.ts +8 -0
- package/menu/examples/daffodil-design-menu-examples.d.ts +5 -0
- package/menu/examples/index.d.ts +1 -0
- package/menu/examples/package.json +10 -0
- package/menu/examples/public_api.d.ts +2 -0
- package/molecules/menu/helpers/create-overlay.d.ts +3 -0
- package/molecules/menu/helpers/public_api.d.ts +1 -0
- package/molecules/menu/menu/menu.component.d.ts +19 -0
- package/molecules/menu/menu-activator/menu-activator.component.d.ts +18 -0
- package/molecules/menu/menu-item/menu-item.component.d.ts +20 -0
- package/molecules/menu/menu.module.d.ts +11 -0
- package/molecules/menu/public_api.d.ts +6 -0
- package/molecules/menu/service/menu.service.d.ts +24 -0
- package/package.json +11 -3
- package/public_api.d.ts +1 -0
- package/scss/theme.scss +2 -0
- package/src/molecules/menu/README.md +7 -0
- package/src/molecules/menu/menu-theme.scss +25 -0
@@ -0,0 +1,7 @@
|
|
1
|
+
import { MenuContentComponent } from './menu-content/menu-content.component';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class BasicMenuComponent {
|
4
|
+
menu: typeof MenuContentComponent;
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasicMenuComponent, never>;
|
6
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BasicMenuComponent, "basic-menu", never, {}, {}, never, never>;
|
7
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./basic-menu.component";
|
3
|
+
import * as i2 from "./menu-content/menu-content.component";
|
4
|
+
import * as i3 from "@daffodil/design";
|
5
|
+
import * as i4 from "@fortawesome/angular-fontawesome";
|
6
|
+
export declare class BasicMenuComponentModule {
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BasicMenuComponentModule, never>;
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<BasicMenuComponentModule, [typeof i1.BasicMenuComponent, typeof i2.MenuContentComponent], [typeof i3.DaffButtonModule, typeof i3.DaffMenuModule, typeof i4.FontAwesomeModule], [typeof i1.BasicMenuComponent]>;
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<BasicMenuComponentModule>;
|
10
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
export declare class MenuContentComponent {
|
3
|
+
faUser: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
4
|
+
faInfo: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
5
|
+
faEnvelope: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MenuContentComponent, never>;
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MenuContentComponent, "menu-content", never, {}, {}, never, never>;
|
8
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './public_api';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
{
|
2
|
+
"name": "@daffodil/design/menu/examples",
|
3
|
+
"module": "../../fesm2015/daffodil-design-menu-examples.mjs",
|
4
|
+
"es2020": "../../fesm2020/daffodil-design-menu-examples.mjs",
|
5
|
+
"esm2020": "../../esm2020/menu/examples/daffodil-design-menu-examples.mjs",
|
6
|
+
"fesm2020": "../../fesm2020/daffodil-design-menu-examples.mjs",
|
7
|
+
"fesm2015": "../../fesm2015/daffodil-design-menu-examples.mjs",
|
8
|
+
"typings": "daffodil-design-menu-examples.d.ts",
|
9
|
+
"sideEffects": false
|
10
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export { daffMenuCreateOverlay } from './create-overlay';
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { ConfigurableFocusTrapFactory } from '@angular/cdk/a11y';
|
2
|
+
import { AfterContentInit, AfterViewInit, ElementRef, NgZone } from '@angular/core';
|
3
|
+
import { DaffMenuService } from '../service/menu.service';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class DaffMenuComponent implements AfterContentInit, AfterViewInit {
|
6
|
+
private _focusTrapFactory;
|
7
|
+
private _ngZone;
|
8
|
+
private _elementRef;
|
9
|
+
private menuService;
|
10
|
+
class: boolean;
|
11
|
+
tabindex: number;
|
12
|
+
role: string;
|
13
|
+
private _focusTrap;
|
14
|
+
constructor(_focusTrapFactory: ConfigurableFocusTrapFactory, _ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, menuService: DaffMenuService);
|
15
|
+
ngAfterContentInit(): void;
|
16
|
+
ngAfterViewInit(): void;
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMenuComponent, never>;
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffMenuComponent, "daff-menu", never, {}, {}, never, ["[daff-menu-item]"]>;
|
19
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { ChangeDetectorRef, OnDestroy, TemplateRef, Type, ViewContainerRef } from '@angular/core';
|
2
|
+
import { DaffMenuService } from '../service/menu.service';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class DaffMenuActivatorDirective implements OnDestroy {
|
5
|
+
private service;
|
6
|
+
private viewContainerRef;
|
7
|
+
private cdRef;
|
8
|
+
daffMenuActivator: Type<unknown> | TemplateRef<unknown>;
|
9
|
+
private _destroyed$;
|
10
|
+
private _open;
|
11
|
+
get openClass(): boolean;
|
12
|
+
constructor(service: DaffMenuService, viewContainerRef: ViewContainerRef, cdRef: ChangeDetectorRef);
|
13
|
+
ngOnDestroy(): void;
|
14
|
+
focus(): void;
|
15
|
+
openMenu(event: any): void;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMenuActivatorDirective, never>;
|
17
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DaffMenuActivatorDirective, "[daffMenuActivator]", never, { "daffMenuActivator": "daffMenuActivator"; }, {}, never>;
|
18
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { DaffPrefixDirective } from '../../../core/prefix-suffix/public_api';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class DaffMenuItemComponent {
|
4
|
+
/**
|
5
|
+
* @docs-private
|
6
|
+
*/
|
7
|
+
class: boolean;
|
8
|
+
/**
|
9
|
+
* Sets the role of the component to menuitem.
|
10
|
+
*
|
11
|
+
* @docs-private
|
12
|
+
*/
|
13
|
+
role: string;
|
14
|
+
/**
|
15
|
+
* @docs-private
|
16
|
+
*/
|
17
|
+
_prefix: DaffPrefixDirective;
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMenuItemComponent, never>;
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DaffMenuItemComponent, "a[daff-menu-item],button[daff-menu-item]", never, {}, {}, ["_prefix"], ["[daffPrefix]", "*"]>;
|
20
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./menu-activator/menu-activator.component";
|
3
|
+
import * as i2 from "./menu/menu.component";
|
4
|
+
import * as i3 from "./menu-item/menu-item.component";
|
5
|
+
import * as i4 from "@angular/common";
|
6
|
+
import * as i5 from "@angular/cdk/overlay";
|
7
|
+
export declare class DaffMenuModule {
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMenuModule, never>;
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DaffMenuModule, [typeof i1.DaffMenuActivatorDirective, typeof i2.DaffMenuComponent, typeof i3.DaffMenuItemComponent], [typeof i4.CommonModule, typeof i5.OverlayModule], [typeof i1.DaffMenuActivatorDirective, typeof i2.DaffMenuComponent, typeof i3.DaffMenuItemComponent]>;
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DaffMenuModule>;
|
11
|
+
}
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export * from './helpers/public_api';
|
2
|
+
export { DaffMenuService } from './service/menu.service';
|
3
|
+
export { DaffMenuActivatorDirective } from './menu-activator/menu-activator.component';
|
4
|
+
export { DaffMenuModule } from './menu.module';
|
5
|
+
export { DaffMenuComponent } from './menu/menu.component';
|
6
|
+
export { DaffMenuItemComponent } from './menu-item/menu-item.component';
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
|
2
|
+
import { ElementRef, TemplateRef, Type, ViewContainerRef } from '@angular/core';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
import { DaffLazyComponent } from '../../../core/lazy/public_api';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export interface DaffActivatedMenu {
|
7
|
+
el: ElementRef;
|
8
|
+
component: Type<unknown>;
|
9
|
+
}
|
10
|
+
export declare type DaffMenuSlot = TemplateRef<unknown> | DaffLazyComponent | Type<unknown>;
|
11
|
+
export declare class DaffMenuService {
|
12
|
+
protected overlay: Overlay;
|
13
|
+
protected _overlay: OverlayRef | null;
|
14
|
+
private _activator;
|
15
|
+
private $_open;
|
16
|
+
open$: Observable<boolean>;
|
17
|
+
constructor(overlay: Overlay);
|
18
|
+
protected _createOverlay(activatorElement: ViewContainerRef, component: DaffMenuSlot): Promise<void>;
|
19
|
+
protected _destroyOverlay(): void;
|
20
|
+
close(): void;
|
21
|
+
open(activator: ViewContainerRef, component: DaffMenuSlot): void;
|
22
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DaffMenuService, never>;
|
23
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DaffMenuService>;
|
24
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@daffodil/design",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.53.1",
|
4
4
|
"author": "Graycore LLC",
|
5
5
|
"license": "MIT",
|
6
6
|
"bugs": {
|
@@ -18,7 +18,7 @@
|
|
18
18
|
"@angular/core": "^13.0.0",
|
19
19
|
"@angular/forms": "^13.0.0",
|
20
20
|
"@angular/cdk": "^13.0.0",
|
21
|
-
"@daffodil/core": "0.
|
21
|
+
"@daffodil/core": "0.53.1",
|
22
22
|
"@fortawesome/angular-fontawesome": "^0.10.0",
|
23
23
|
"@fortawesome/fontawesome-svg-core": "^1.2.32",
|
24
24
|
"@fortawesome/free-solid-svg-icons": "^5.10.0",
|
@@ -28,7 +28,7 @@
|
|
28
28
|
"rxjs": "7.5.5"
|
29
29
|
},
|
30
30
|
"optionalDependencies": {
|
31
|
-
"@faker-js/faker": "^
|
31
|
+
"@faker-js/faker": "^7.6.0"
|
32
32
|
},
|
33
33
|
"exports": {
|
34
34
|
"./scss/daff-global": {
|
@@ -159,6 +159,14 @@
|
|
159
159
|
"node": "./fesm2015/daffodil-design-media-gallery-examples.mjs",
|
160
160
|
"default": "./fesm2020/daffodil-design-media-gallery-examples.mjs"
|
161
161
|
},
|
162
|
+
"./menu/examples": {
|
163
|
+
"types": "./menu/examples/daffodil-design-menu-examples.d.ts",
|
164
|
+
"esm2020": "./esm2020/menu/examples/daffodil-design-menu-examples.mjs",
|
165
|
+
"es2020": "./fesm2020/daffodil-design-menu-examples.mjs",
|
166
|
+
"es2015": "./fesm2015/daffodil-design-menu-examples.mjs",
|
167
|
+
"node": "./fesm2015/daffodil-design-menu-examples.mjs",
|
168
|
+
"default": "./fesm2020/daffodil-design-menu-examples.mjs"
|
169
|
+
},
|
162
170
|
"./modal/examples": {
|
163
171
|
"types": "./modal/examples/daffodil-design-modal-examples.d.ts",
|
164
172
|
"esm2020": "./esm2020/modal/examples/daffodil-design-modal-examples.mjs",
|
package/public_api.d.ts
CHANGED
@@ -20,6 +20,7 @@ export * from './molecules/image-list/public_api';
|
|
20
20
|
export * from './molecules/link-set/public_api';
|
21
21
|
export * from './molecules/list/public_api';
|
22
22
|
export * from './molecules/media-gallery/public_api';
|
23
|
+
export * from './molecules/menu/public_api';
|
23
24
|
export * from './molecules/modal/public_api';
|
24
25
|
export * from './molecules/navbar/public_api';
|
25
26
|
export * from './molecules/paginator/public_api';
|
package/scss/theme.scss
CHANGED
@@ -32,6 +32,7 @@
|
|
32
32
|
@use '../src/molecules/hero/hero-theme' as hero;
|
33
33
|
@use '../src/molecules/list/list/list-theme' as list;
|
34
34
|
@use '../src/molecules/media-gallery/media-gallery-theme' as media-gallery;
|
35
|
+
@use '../src/molecules/menu/menu-theme' as menu;
|
35
36
|
@use '../src/molecules/modal/modal-theme' as modal;
|
36
37
|
@use '../src/molecules/navbar/navbar-theme' as navbar;
|
37
38
|
@use '../src/molecules/paginator/paginator-theme' as paginator;
|
@@ -68,6 +69,7 @@
|
|
68
69
|
@include hero.daff-hero-theme($theme);
|
69
70
|
@include list.daff-list-theme($theme);
|
70
71
|
@include media-gallery.daff-media-gallery-theme($theme);
|
72
|
+
@include menu.daff-menu-theme($theme);
|
71
73
|
@include modal.daff-modal-theme($theme);
|
72
74
|
@include navbar.daff-navbar-theme($theme);
|
73
75
|
@include paginator.daff-paginator-theme($theme);
|
@@ -0,0 +1,25 @@
|
|
1
|
+
@use '../../../scss/core';
|
2
|
+
@use '../../../scss/theming';
|
3
|
+
|
4
|
+
@mixin daff-menu-theme($theme) {
|
5
|
+
$white: core.daff-map-deep-get($theme, 'core.white');
|
6
|
+
$black: core.daff-map-deep-get($theme, 'core.black');
|
7
|
+
$gray: core.daff-map-deep-get($theme, 'core.gray');
|
8
|
+
$base: core.daff-map-deep-get($theme, 'core.base');
|
9
|
+
$base-contrast: core.daff-map-deep-get($theme, 'core.base-contrast');
|
10
|
+
|
11
|
+
.daff-menu {
|
12
|
+
background: $base;
|
13
|
+
box-shadow: 0 8px 12px rgb($black, 0.12);
|
14
|
+
}
|
15
|
+
|
16
|
+
.daff-menu-item {
|
17
|
+
background: $base;
|
18
|
+
color: $base-contrast;
|
19
|
+
|
20
|
+
&:hover,
|
21
|
+
&:focus {
|
22
|
+
background: theming.daff-illuminate($base, $gray, 1);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
}
|