Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): controlled behavior #1676

Merged
merged 20 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
b23a237
feat(core/drawer): add prevent default logic
nuke-ellington Jan 31, 2025
158f0b2
Merge branch 'main' into feat/1920-controlled-behavior
nuke-ellington Feb 10, 2025
2987cc2
feat(core/flip-tile): expose index and handle prevent default for togโ€ฆ
nuke-ellington Feb 11, 2025
f312e40
feat(core/menu): add open settings and about events
nuke-ellington Feb 11, 2025
6202b14
docs(core/menu-category): add story
nuke-ellington Feb 11, 2025
0e57202
feat(core/menu|menu-about|menu-settings): add prevent default to events
nuke-ellington Feb 11, 2025
1b0f550
feat(core/pagination): add prevent default logic
nuke-ellington Feb 11, 2025
7619b6d
feat(core/toggle): add prevent default logic
nuke-ellington Feb 11, 2025
cabf660
feat(core/slider): add prevent default logic
nuke-ellington Feb 12, 2025
f2c6cd5
ci(changesets): add changesets
nuke-ellington Feb 12, 2025
6e9dad4
docs: update figma node ids
nuke-ellington Feb 12, 2025
5e27610
Merge branch 'main' into feat/1920-controlled-behavior
nuke-ellington Feb 12, 2025
ba971b1
fix(core/flip-tile): make sure animation is only running once at a time
nuke-ellington Feb 13, 2025
bb7b66b
fix(core/drawer): re-enable old undefined check logic
nuke-ellington Feb 13, 2025
d938570
ci: update changesets and move test
nuke-ellington Feb 13, 2025
b635195
refactor(core/drawer): use nullish coallesing operator
nuke-ellington Feb 14, 2025
5f4b7dc
refactor(core/drawer): simplyfiy styling
nuke-ellington Feb 14, 2025
1792cad
test(core/flip-tile): add ct
nuke-ellington Feb 14, 2025
2d3030d
remove unused imports
danielleroux Feb 17, 2025
4ad7e54
Update .changeset/tender-planes-bathe.md
danielleroux Feb 17, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/eighty-doors-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@siemens/ix-angular': minor
'@siemens/ix': minor
'@siemens/ix-vue': minor
---

Expsose index of **ix-flip-tile** and add toggle event.
jul-lam marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions .changeset/shy-lions-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@siemens/ix-angular': minor
'@siemens/ix': minor
'@siemens/ix-vue': minor
---

Add openSettings and openAbout events to **ix-menu**.
7 changes: 7 additions & 0 deletions .changeset/thick-vans-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@siemens/ix-angular': minor
'@siemens/ix': minor
'@siemens/ix-vue': minor
---

Add tabChange event to **ix-menu-settings** and **ix-menu-about**.
34 changes: 28 additions & 6 deletions packages/angular/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1058,25 +1058,31 @@ export declare interface IxFilterChip extends Components.IxFilterChip {


@ProxyCmp({
inputs: ['height', 'state', 'width']
inputs: ['height', 'index', 'state', 'width']
})
@Component({
selector: 'ix-flip-tile',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['height', 'state', 'width'],
inputs: ['height', 'index', 'state', 'width'],
})
export class IxFlipTile {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['toggle']);
}
}


export declare interface IxFlipTile extends Components.IxFlipTile {}
export declare interface IxFlipTile extends Components.IxFlipTile {
/**
* Event emitted when the index changes @since 3.0.0
*/
toggle: EventEmitter<CustomEvent<number>>;
}


@ProxyCmp({
Expand Down Expand Up @@ -1524,7 +1530,7 @@ export class IxMenu {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['expandChange', 'mapExpandChange', 'openAppSwitch']);
proxyOutputs(this, this.el, ['expandChange', 'mapExpandChange', 'openAppSwitch', 'openSettings', 'openAbout']);
}
}

Expand All @@ -1542,6 +1548,14 @@ export declare interface IxMenu extends Components.IxMenu {
* Event emitted when the app switch button is clicked @since 3.0.0
*/
openAppSwitch: EventEmitter<CustomEvent<void>>;
/**
* Event emitted when the settings button is clicked @since 3.0.0
*/
openSettings: EventEmitter<CustomEvent<void>>;
/**
* Event emitted when the about button is clicked @since 3.0.0
*/
openAbout: EventEmitter<CustomEvent<void>>;
}


Expand All @@ -1560,14 +1574,18 @@ export class IxMenuAbout {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['close']);
proxyOutputs(this, this.el, ['tabChange', 'close']);
}
}


import type { CustomCloseEvent as IIxMenuAboutCustomCloseEvent } from '@siemens/ix';

export declare interface IxMenuAbout extends Components.IxMenuAbout {
/**
* Active tab changed @since 3.0.0
*/
tabChange: EventEmitter<CustomEvent<string>>;
/**
* About and Legal closed
*/
Expand Down Expand Up @@ -1752,14 +1770,18 @@ export class IxMenuSettings {
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
proxyOutputs(this, this.el, ['close']);
proxyOutputs(this, this.el, ['tabChange', 'close']);
}
}


import type { CustomCloseEvent as IIxMenuSettingsCustomCloseEvent } from '@siemens/ix';

export declare interface IxMenuSettings extends Components.IxMenuSettings {
/**
* Active tab changed @since 3.0.0
*/
tabChange: EventEmitter<CustomEvent<string>>;
/**
* Popover closed
*/
Expand Down
125 changes: 124 additions & 1 deletion packages/core/component-doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8662,6 +8662,33 @@
"optional": false,
"required": false
},
{
"name": "index",
"type": "number",
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"mutable": false,
"attr": "index",
"reflectToAttr": false,
"docs": "Index of the currently visible content",
"docsTags": [
{
"name": "since",
"text": "3.0.0"
}
],
"default": "0",
"values": [
{
"type": "number"
}
],
"optional": false,
"required": false
},
{
"name": "state",
"type": "FlipTileState.Alarm | FlipTileState.Info | FlipTileState.None | FlipTileState.Primary | FlipTileState.Warning | undefined",
Expand Down Expand Up @@ -8737,7 +8764,27 @@
}
],
"methods": [],
"events": [],
"events": [
{
"event": "toggle",
"detail": "number",
"bubbles": true,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"cancelable": true,
"composed": true,
"docs": "Event emitted when the index changes",
"docsTags": [
{
"name": "since",
"text": "3.0.0"
}
]
}
],
"styles": [],
"slots": [],
"parts": [],
Expand Down Expand Up @@ -12516,6 +12563,25 @@
"docs": "Map Sidebar expanded",
"docsTags": []
},
{
"event": "openAbout",
"detail": "void",
"bubbles": true,
"complexType": {
"original": "void",
"resolved": "void",
"references": {}
},
"cancelable": true,
"composed": true,
"docs": "Event emitted when the about button is clicked",
"docsTags": [
{
"name": "since",
"text": "3.0.0"
}
]
},
{
"event": "openAppSwitch",
"detail": "void",
Expand All @@ -12534,6 +12600,25 @@
"text": "3.0.0"
}
]
},
{
"event": "openSettings",
"detail": "void",
"bubbles": true,
"complexType": {
"original": "void",
"resolved": "void",
"references": {}
},
"cancelable": true,
"composed": true,
"docs": "Event emitted when the settings button is clicked",
"docsTags": [
{
"name": "since",
"text": "3.0.0"
}
]
}
],
"styles": [],
Expand Down Expand Up @@ -12672,6 +12757,25 @@
"composed": true,
"docs": "About and Legal closed",
"docsTags": []
},
{
"event": "tabChange",
"detail": "string",
"bubbles": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"cancelable": true,
"composed": true,
"docs": "Active tab changed",
"docsTags": [
{
"name": "since",
"text": "3.0.0"
}
]
}
],
"styles": [],
Expand Down Expand Up @@ -13777,6 +13881,25 @@
"composed": true,
"docs": "Popover closed",
"docsTags": []
},
{
"event": "tabChange",
"detail": "string",
"bubbles": true,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"cancelable": true,
"composed": true,
"docs": "Active tab changed",
"docsTags": [
{
"name": "since",
"text": "3.0.0"
}
]
}
],
"styles": [],
Expand Down
Loading
Loading