diff --git a/core/api.txt b/core/api.txt index 320c0fc1878..fa3825d2903 100644 --- a/core/api.txt +++ b/core/api.txt @@ -1087,6 +1087,7 @@ ion-range,part,tick-active ion-refresher,none ion-refresher,prop,closeDuration,string,'280ms',false,false ion-refresher,prop,disabled,boolean,false,false,false +ion-refresher,prop,mode,"ios" | "md",undefined,false,false ion-refresher,prop,pullFactor,number,1,false,false ion-refresher,prop,pullMax,number,this.pullMin + 60,false,false ion-refresher,prop,pullMin,number,60,false,false diff --git a/core/src/components.d.ts b/core/src/components.d.ts index dcfee8f33e6..3ab34450f9f 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -2377,6 +2377,10 @@ export namespace Components { * A number representing how far down the user has pulled. The number `0` represents the user hasn't pulled down at all. The number `1`, and anything greater than `1`, represents that the user has pulled far enough down that when they let go then the refresh will happen. If they let go and the number is less than `1`, then the refresh will not happen, and the content will return to it's original position. */ "getProgress": () => Promise; + /** + * The mode determines which platform styles to use. + */ + "mode"?: "ios" | "md"; /** * How much to multiply the pull speed by. To slow the pull animation down, pass a number less than `1`. To speed up the pull, pass a number greater than `1`. The default value is `1` which is equal to the speed of the cursor. If a negative value is passed in, the factor will be `1` instead. For example: If the value passed is `1.2` and the content is dragged by `10` pixels, instead of `10` pixels the content will be pulled by `12` pixels (an increase of 20 percent). If the value passed is `0.8`, the dragged amount will be `8` pixels, less than the amount the cursor has moved. Does not apply when the refresher content uses a spinner, enabling the native refresher. */ @@ -7089,6 +7093,10 @@ declare namespace LocalJSX { * If `true`, the refresher will be hidden. */ "disabled"?: boolean; + /** + * The mode determines which platform styles to use. + */ + "mode"?: "ios" | "md"; /** * Emitted while the user is pulling down the content and exposing the refresher. */ diff --git a/core/src/components/refresher/refresher.tsx b/core/src/components/refresher/refresher.tsx index f762ffe7ac2..8f234f3eb8e 100644 --- a/core/src/components/refresher/refresher.tsx +++ b/core/src/components/refresher/refresher.tsx @@ -25,6 +25,9 @@ import { translateElement, } from './refresher.utils'; +/** + * @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use. + */ @Component({ tag: 'ion-refresher', styleUrls: { diff --git a/packages/angular/src/directives/proxies.ts b/packages/angular/src/directives/proxies.ts index d192372759d..be168ed8703 100644 --- a/packages/angular/src/directives/proxies.ts +++ b/packages/angular/src/directives/proxies.ts @@ -1626,7 +1626,7 @@ mouse drag, touch gesture, or keyboard interaction. @ProxyCmp({ - inputs: ['closeDuration', 'disabled', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], + inputs: ['closeDuration', 'disabled', 'mode', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], methods: ['complete', 'cancel', 'getProgress'] }) @Component({ @@ -1634,7 +1634,7 @@ mouse drag, touch gesture, or keyboard interaction. changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['closeDuration', 'disabled', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], + inputs: ['closeDuration', 'disabled', 'mode', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], }) export class IonRefresher { protected el: HTMLElement; diff --git a/packages/angular/standalone/src/directives/proxies.ts b/packages/angular/standalone/src/directives/proxies.ts index 650d21c94ed..fa6f3d45828 100644 --- a/packages/angular/standalone/src/directives/proxies.ts +++ b/packages/angular/standalone/src/directives/proxies.ts @@ -1496,7 +1496,7 @@ export declare interface IonProgressBar extends Components.IonProgressBar {} @ProxyCmp({ defineCustomElementFn: defineIonRefresher, - inputs: ['closeDuration', 'disabled', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], + inputs: ['closeDuration', 'disabled', 'mode', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], methods: ['complete', 'cancel', 'getProgress'] }) @Component({ @@ -1504,7 +1504,7 @@ export declare interface IonProgressBar extends Components.IonProgressBar {} changeDetection: ChangeDetectionStrategy.OnPush, template: '', // eslint-disable-next-line @angular-eslint/no-inputs-metadata-property - inputs: ['closeDuration', 'disabled', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], + inputs: ['closeDuration', 'disabled', 'mode', 'pullFactor', 'pullMax', 'pullMin', 'snapbackDuration'], standalone: true }) export class IonRefresher {