Skip to content

Commit

Permalink
fix(icon): update to ionicons 6 to resolve typescript 4.4 errors (#24185
Browse files Browse the repository at this point in the history
)
  • Loading branch information
liamdebeasi authored Nov 8, 2021
1 parent 52cd5d0 commit 118c606
Show file tree
Hide file tree
Showing 10 changed files with 58 additions and 39 deletions.
5 changes: 5 additions & 0 deletions BREAKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This is a comprehensive list of the breaking changes introduced in the major ver
- [Components](#components)
* [Datetime](#datetime)
* [Header](#header)
* [Icons](#icons)
* [Input](#input)
* [Modal](#modal)
* [Popover](#popover)
Expand Down Expand Up @@ -91,6 +92,10 @@ ion-header.header-collapse-condense ion-toolbar:last-of-type {
}
```

#### Icons

Ionic 6 now ships with Ionicons 6. Please be sure to review the [Ionicons 6.0.0 Changelog](https://github.com/ionic-team/ionicons/releases/tag/v6.0.0) and make any necessary changes.

#### Input

The `placeholder` property now has a type of `string | undefined` rather than `null | string | undefined`.
Expand Down
4 changes: 2 additions & 2 deletions angular/src/directives/proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,13 +576,13 @@ export class IonHeader {

export declare interface IonIcon extends Components.IonIcon {}
@ProxyCmp({
inputs: ['ariaHidden', 'ariaLabel', 'color', 'flipRtl', 'icon', 'ios', 'lazy', 'md', 'mode', 'name', 'sanitize', 'size', 'src']
inputs: ['color', 'flipRtl', 'icon', 'ios', 'lazy', 'md', 'mode', 'name', 'sanitize', 'size', 'src']
})
@Component({
selector: 'ion-icon',
changeDetection: ChangeDetectionStrategy.OnPush,
template: '<ng-content></ng-content>',
inputs: ['ariaHidden', 'ariaLabel', 'color', 'flipRtl', 'icon', 'ios', 'lazy', 'md', 'mode', 'name', 'sanitize', 'size', 'src']
inputs: ['color', 'flipRtl', 'icon', 'ios', 'lazy', 'md', 'mode', 'name', 'sanitize', 'size', 'src']
})
export class IonIcon {
protected el: HTMLElement;
Expand Down
14 changes: 7 additions & 7 deletions core/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
],
"dependencies": {
"@stencil/core": "~2.10.0",
"ionicons": "^5.5.4",
"ionicons": "^6.0.0",
"tslib": "^2.1.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/accordion/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export class Accordion implements ComponentInterface {
iconEl.lazy = false;
iconEl.classList.add('ion-accordion-toggle-icon');
iconEl.icon = toggleIcon;
iconEl.ariaHidden = 'true';
iconEl.setAttribute('aria-hidden', 'true');

ionItem.appendChild(iconEl);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
],
"dependencies": {
"@ionic/core": "6.0.0-rc.2",
"ionicons": "^5.5.4",
"ionicons": "^6.0.0",
"tslib": "*"
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/react/src/components/IonIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { IonIconInner } from './inner-proxies';
import { createForwardRef, isPlatform } from './utils';

interface IonIconProps {
ariaLabel?: string;
color?: string;
flipRtl?: boolean;
icon?: string;
Expand Down
64 changes: 40 additions & 24 deletions packages/vue/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
},
"dependencies": {
"@ionic/core": "6.0.0-rc.2",
"ionicons": "^5.5.4"
"ionicons": "^6.0.0"
},
"vetur": {
"tags": "dist/vetur/tags.json",
Expand Down
1 change: 0 additions & 1 deletion packages/vue/src/components/IonIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { IonIcon as IonIconCmp } from 'ionicons/components/ion-icon.js';
export const IonIcon = /*@__PURE__*/ defineComponent({
name: 'IonIcon',
props: {
ariaLabel: String,
color: String,
flipRtl: Boolean,
icon: String,
Expand Down

0 comments on commit 118c606

Please sign in to comment.