Skip to content

Commit

Permalink
feat(core/group): migrate to shadow dom (#661)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielleroux committed Jul 28, 2023
1 parent 17daf4b commit 8970a03
Show file tree
Hide file tree
Showing 26 changed files with 183 additions and 353 deletions.
17 changes: 17 additions & 0 deletions BREAKING_CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

## v2.0.0

### `ix-group-dropdown-item` removed

Replaced with standard `ix-dropdown-item`

___Now___
```tsx
<ix-group header="Header text" sub-header="Subheader text">
<ix-dropdown slot="dropdown">
<ix-dropdown-item label="Item 1"></ix-dropdown-item>
<ix-dropdown-item label="Item 2"></ix-dropdown-item>
</ix-dropdown>
<ix-group-item text="Example text 1"></ix-group-item>
<ix-group-item text="Example text 2"></ix-group-item>
<ix-group-item text="Example text 3"></ix-group-item>
</ix-group>
```

### `ix-dropdown` removed deprecated properties

- adjustDropdownWidthToReferenceWith
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { Component } from '@angular/core';
template: `
<ix-group header="Header text" sub-header="Subheader text">
<ix-dropdown slot="dropdown">
<ix-group-dropdown-item label="Item 1"></ix-group-dropdown-item>
<ix-group-dropdown-item label="Item 2"></ix-group-dropdown-item>
<ix-dropdown-item label="Item 1"></ix-dropdown-item>
<ix-dropdown-item label="Item 2"></ix-dropdown-item>
</ix-dropdown>
<ix-group-item text="Example text 1"></ix-group-item>
<ix-group-item text="Example text 2"></ix-group-item>
Expand Down
22 changes: 0 additions & 22 deletions packages/angular/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -991,28 +991,6 @@ export class IxGroupContextMenu {
export declare interface IxGroupContextMenu extends Components.IxGroupContextMenu {}


@ProxyCmp({
inputs: ['icon', 'label']
})
@Component({
selector: 'ix-group-dropdown-item',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
inputs: ['icon', 'label'],
})
export class IxGroupDropdownItem {
protected el: HTMLElement;
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
c.detach();
this.el = r.nativeElement;
}
}


export declare interface IxGroupDropdownItem extends Components.IxGroupDropdownItem {}


@ProxyCmp({
inputs: ['focusable', 'icon', 'index', 'secondaryText', 'selected', 'suppressSelection', 'text']
})
Expand Down
1 change: 0 additions & 1 deletion packages/angular/src/declare-components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const DIRECTIVES = [
d.IxFlipTileContent,
d.IxGroup,
d.IxGroupContextMenu,
d.IxGroupDropdownItem,
d.IxGroupItem,
d.IxIcon,
d.IxIconButton,
Expand Down
84 changes: 4 additions & 80 deletions packages/core/component-doc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3618,7 +3618,6 @@
"encapsulation": "shadow",
"dependents": [
"ix-breadcrumb",
"ix-group-dropdown-item",
"ix-menu-avatar-item",
"ix-menu-category",
"ix-select",
Expand All @@ -3635,9 +3634,6 @@
"ix-breadcrumb": [
"ix-dropdown-item"
],
"ix-group-dropdown-item": [
"ix-dropdown-item"
],
"ix-menu-avatar-item": [
"ix-dropdown-item"
],
Expand Down Expand Up @@ -4533,7 +4529,7 @@
"usage": {},
"docs": "",
"docsTags": [],
"encapsulation": "scoped",
"encapsulation": "shadow",
"dependents": [],
"dependencies": [
"ix-icon",
Expand Down Expand Up @@ -4707,14 +4703,7 @@
"styles": [],
"slots": [],
"parts": [],
"listeners": [
{
"event": "keydown",
"target": "window",
"capture": false,
"passive": false
}
]
"listeners": []
},
{
"dirPath": "./src/components/group",
Expand All @@ -4727,7 +4716,7 @@
"usage": {},
"docs": "",
"docsTags": [],
"encapsulation": "scoped",
"encapsulation": "shadow",
"dependents": [
"ix-group"
],
Expand All @@ -4754,71 +4743,6 @@
"parts": [],
"listeners": []
},
{
"dirPath": "./src/components/group-dropdown-item",
"filePath": "./src/components/group-dropdown-item/group-dropdown-item.tsx",
"fileName": "group-dropdown-item.tsx",
"readmePath": "./src/components/group-dropdown-item/readme.md",
"usagesDir": "./src/components/group-dropdown-item/usage",
"tag": "ix-group-dropdown-item",
"overview": "",
"usage": {},
"docs": "",
"docsTags": [],
"encapsulation": "scoped",
"dependents": [],
"dependencies": [
"ix-dropdown-item"
],
"dependencyGraph": {
"ix-group-dropdown-item": [
"ix-dropdown-item"
],
"ix-dropdown-item": [
"ix-icon"
]
},
"props": [
{
"name": "icon",
"type": "string",
"mutable": false,
"attr": "icon",
"reflectToAttr": false,
"docs": "Group dropdown icon",
"docsTags": [],
"values": [
{
"type": "string"
}
],
"optional": false,
"required": false
},
{
"name": "label",
"type": "string",
"mutable": false,
"attr": "label",
"reflectToAttr": false,
"docs": "Group dropdown label",
"docsTags": [],
"values": [
{
"type": "string"
}
],
"optional": false,
"required": false
}
],
"methods": [],
"events": [],
"styles": [],
"slots": [],
"parts": [],
"listeners": []
},
{
"dirPath": "./src/components/group-item",
"filePath": "./src/components/group-item/group-item.tsx",
Expand All @@ -4830,7 +4754,7 @@
"usage": {},
"docs": "",
"docsTags": [],
"encapsulation": "scoped",
"encapsulation": "shadow",
"dependents": [
"ix-group"
],
Expand Down
29 changes: 0 additions & 29 deletions packages/core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,16 +895,6 @@ export namespace Components {
}
interface IxGroupContextMenu {
}
interface IxGroupDropdownItem {
/**
* Group dropdown icon
*/
"icon": string;
/**
* Group dropdown label
*/
"label": string;
}
interface IxGroupItem {
/**
* The elements tabindex attribute will get set accordingly. If true tabindex will be 0, -1 otherwise.
Expand Down Expand Up @@ -2449,12 +2439,6 @@ declare global {
prototype: HTMLIxGroupContextMenuElement;
new (): HTMLIxGroupContextMenuElement;
};
interface HTMLIxGroupDropdownItemElement extends Components.IxGroupDropdownItem, HTMLStencilElement {
}
var HTMLIxGroupDropdownItemElement: {
prototype: HTMLIxGroupDropdownItemElement;
new (): HTMLIxGroupDropdownItemElement;
};
interface HTMLIxGroupItemElement extends Components.IxGroupItem, HTMLStencilElement {
}
var HTMLIxGroupItemElement: {
Expand Down Expand Up @@ -2833,7 +2817,6 @@ declare global {
"ix-flip-tile-content": HTMLIxFlipTileContentElement;
"ix-group": HTMLIxGroupElement;
"ix-group-context-menu": HTMLIxGroupContextMenuElement;
"ix-group-dropdown-item": HTMLIxGroupDropdownItemElement;
"ix-group-item": HTMLIxGroupItemElement;
"ix-icon-button": HTMLIxIconButtonElement;
"ix-index-button": HTMLIxIndexButtonElement;
Expand Down Expand Up @@ -3838,16 +3821,6 @@ declare namespace LocalJSX {
}
interface IxGroupContextMenu {
}
interface IxGroupDropdownItem {
/**
* Group dropdown icon
*/
"icon"?: string;
/**
* Group dropdown label
*/
"label"?: string;
}
interface IxGroupItem {
/**
* The elements tabindex attribute will get set accordingly. If true tabindex will be 0, -1 otherwise.
Expand Down Expand Up @@ -5062,7 +5035,6 @@ declare namespace LocalJSX {
"ix-flip-tile-content": IxFlipTileContent;
"ix-group": IxGroup;
"ix-group-context-menu": IxGroupContextMenu;
"ix-group-dropdown-item": IxGroupDropdownItem;
"ix-group-item": IxGroupItem;
"ix-icon-button": IxIconButton;
"ix-index-button": IxIndexButton;
Expand Down Expand Up @@ -5197,7 +5169,6 @@ declare module "@stencil/core" {
"ix-flip-tile-content": LocalJSX.IxFlipTileContent & JSXBase.HTMLAttributes<HTMLIxFlipTileContentElement>;
"ix-group": LocalJSX.IxGroup & JSXBase.HTMLAttributes<HTMLIxGroupElement>;
"ix-group-context-menu": LocalJSX.IxGroupContextMenu & JSXBase.HTMLAttributes<HTMLIxGroupContextMenuElement>;
"ix-group-dropdown-item": LocalJSX.IxGroupDropdownItem & JSXBase.HTMLAttributes<HTMLIxGroupDropdownItemElement>;
"ix-group-item": LocalJSX.IxGroupItem & JSXBase.HTMLAttributes<HTMLIxGroupItemElement>;
"ix-icon-button": LocalJSX.IxIconButton & JSXBase.HTMLAttributes<HTMLIxIconButtonElement>;
"ix-index-button": LocalJSX.IxIndexButton & JSXBase.HTMLAttributes<HTMLIxIndexButtonElement>;
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8970a03

Please sign in to comment.