Skip to content

Commit

Permalink
fix(core/menu): use container to collapse overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Nov 4, 2022
1 parent 59b5fe4 commit dc9e692
Show file tree
Hide file tree
Showing 7 changed files with 251 additions and 123 deletions.
15 changes: 2 additions & 13 deletions packages/angular/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -837,10 +837,6 @@ export declare interface IxMenu extends Components.IxMenu {
* Map Sidebar expanded
*/
mapExpandChange: EventEmitter<CustomEvent<boolean>>;
/**
* Event to emit to parent that the item was selected
*/
overlayClose: EventEmitter<CustomEvent<boolean>>;

}

Expand All @@ -860,7 +856,7 @@ export class IxMenu {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['expandChange', 'mapExpandChange', 'overlayClose']);
proxyOutputs(this, this.el, ['expandChange', 'mapExpandChange']);
}
}

Expand Down Expand Up @@ -1002,13 +998,7 @@ export class IxMenuAvatarItem {
}


export declare interface IxMenuItem extends Components.IxMenuItem {
/**
* Event to emit to parent that the item was selected
*/
onClick: EventEmitter<CustomEvent<boolean>>;

}
export declare interface IxMenuItem extends Components.IxMenuItem {}

@ProxyCmp({
defineCustomElementFn: undefined,
Expand All @@ -1025,7 +1015,6 @@ export class IxMenuItem {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['onClick']);
}
}

Expand Down
122 changes: 85 additions & 37 deletions packages/core/component-doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,18 @@
"docs": "<!--\nSPDX-FileCopyrightText: 2022 Siemens AG\n\nSPDX-License-Identifier: MIT\n-->",
"docsTags": [],
"encapsulation": "scoped",
"dependents": [],
"dependents": [
"my-component"
],
"dependencies": [
"ix-application-header"
],
"dependencyGraph": {
"ix-basic-navigation": [
"ix-application-header"
],
"my-component": [
"ix-basic-navigation"
]
},
"props": [
Expand Down Expand Up @@ -4095,7 +4100,9 @@
"docs": "<!--\nSPDX-FileCopyrightText: 2022 Siemens AG\n\nSPDX-License-Identifier: MIT\n-->",
"docsTags": [],
"encapsulation": "none",
"dependents": [],
"dependents": [
"my-component"
],
"dependencies": [
"ix-menu-item",
"ix-dropdown"
Expand All @@ -4104,6 +4111,9 @@
"ix-menu": [
"ix-menu-item",
"ix-dropdown"
],
"my-component": [
"ix-menu"
]
},
"props": [
Expand Down Expand Up @@ -4446,27 +4456,12 @@
"composed": true,
"docs": "Map Sidebar expanded",
"docsTags": []
},
{
"event": "overlayClose",
"detail": "boolean",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": "Event to emit to parent that the item was selected",
"docsTags": []
}
],
"styles": [],
"slots": [],
"parts": [],
"listeners": [
{
"event": "onClick",
"target": "body",
"capture": false,
"passive": false
},
{
"event": "resize",
"target": "window",
Expand All @@ -4488,7 +4483,8 @@
"docsTags": [],
"encapsulation": "scoped",
"dependents": [
"ix-map-navigation"
"ix-map-navigation",
"my-component"
],
"dependencies": [
"ix-tab-item",
Expand All @@ -4506,6 +4502,9 @@
],
"ix-map-navigation": [
"ix-menu-about"
],
"my-component": [
"ix-menu-about"
]
},
"props": [
Expand Down Expand Up @@ -4596,9 +4595,15 @@
"docs": "<!--\nSPDX-FileCopyrightText: 2022 Siemens AG\n\nSPDX-License-Identifier: MIT\n-->",
"docsTags": [],
"encapsulation": "scoped",
"dependents": [],
"dependents": [
"my-component"
],
"dependencies": [],
"dependencyGraph": {},
"dependencyGraph": {
"my-component": [
"ix-menu-about-item"
]
},
"props": [
{
"name": "label",
Expand Down Expand Up @@ -4974,12 +4979,16 @@
"docsTags": [],
"encapsulation": "none",
"dependents": [
"ix-menu"
"ix-menu",
"my-component"
],
"dependencies": [],
"dependencyGraph": {
"ix-menu": [
"ix-menu-item"
],
"my-component": [
"ix-menu-item"
]
},
"props": [
Expand Down Expand Up @@ -5084,17 +5093,7 @@
}
],
"methods": [],
"events": [
{
"event": "onClick",
"detail": "boolean",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": "Event to emit to parent that the item was selected",
"docsTags": []
}
],
"events": [],
"styles": [],
"slots": [],
"parts": [],
Expand All @@ -5112,7 +5111,9 @@
"docs": "<!--\nSPDX-FileCopyrightText: 2022 Siemens AG\n\nSPDX-License-Identifier: MIT\n-->",
"docsTags": [],
"encapsulation": "scoped",
"dependents": [],
"dependents": [
"my-component"
],
"dependencies": [
"ix-tab-item",
"ix-icon-button",
Expand All @@ -5126,6 +5127,9 @@
],
"ix-icon-button": [
"ix-icon"
],
"my-component": [
"ix-menu-settings"
]
},
"props": [
Expand Down Expand Up @@ -5216,9 +5220,15 @@
"docs": "<!--\nSPDX-FileCopyrightText: 2022 Siemens AG\n\nSPDX-License-Identifier: MIT\n-->",
"docsTags": [],
"encapsulation": "scoped",
"dependents": [],
"dependents": [
"my-component"
],
"dependencies": [],
"dependencyGraph": {},
"dependencyGraph": {
"my-component": [
"ix-menu-settings-item"
]
},
"props": [
{
"name": "label",
Expand Down Expand Up @@ -8615,8 +8625,46 @@
"docsTags": [],
"encapsulation": "scoped",
"dependents": [],
"dependencies": [],
"dependencyGraph": {},
"dependencies": [
"ix-basic-navigation",
"ix-menu",
"ix-menu-item",
"ix-menu-settings",
"ix-menu-settings-item",
"ix-menu-about",
"ix-menu-about-item"
],
"dependencyGraph": {
"my-component": [
"ix-basic-navigation",
"ix-menu",
"ix-menu-item",
"ix-menu-settings",
"ix-menu-settings-item",
"ix-menu-about",
"ix-menu-about-item"
],
"ix-basic-navigation": [
"ix-application-header"
],
"ix-menu": [
"ix-menu-item",
"ix-dropdown"
],
"ix-menu-settings": [
"ix-tab-item",
"ix-icon-button",
"ix-tabs"
],
"ix-icon-button": [
"ix-icon"
],
"ix-menu-about": [
"ix-tab-item",
"ix-icon-button",
"ix-tabs"
]
},
"props": [],
"methods": [],
"events": [],
Expand Down
7 changes: 0 additions & 7 deletions packages/core/src/components/menu-item/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ SPDX-License-Identifier: MIT
| `tabIcon` | `tab-icon` | Icon name from @siemens/ix-icons | `string` | `'document'` |


## Events

| Event | Description | Type |
| --------- | -------------------------------------------------- | ---------------------- |
| `onClick` | Event to emit to parent that the item was selected | `CustomEvent<boolean>` |


----------------------------------------------


Loading

0 comments on commit dc9e692

Please sign in to comment.