mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
chore: build & lint
This commit is contained in:
650
core/src/components.d.ts
vendored
650
core/src/components.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -41,7 +41,9 @@ export const startFocusVisible = (rootEl?: HTMLElement): FocusVisibleUtility =>
|
|||||||
if (ev instanceof PointerEvent && ev.pointerType !== '') {
|
if (ev instanceof PointerEvent && ev.pointerType !== '') {
|
||||||
hadPointerEvent = true;
|
hadPointerEvent = true;
|
||||||
// Reset after the event loop so only the immediate focusin is suppressed
|
// Reset after the event loop so only the immediate focusin is suppressed
|
||||||
setTimeout(() => { hadPointerEvent = false; }, 0);
|
setTimeout(() => {
|
||||||
|
hadPointerEvent = false;
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -61,9 +63,9 @@ export const startFocusVisible = (rootEl?: HTMLElement): FocusVisibleUtility =>
|
|||||||
const onFocusin = (ev: Event) => {
|
const onFocusin = (ev: Event) => {
|
||||||
const target = ev.target as HTMLElement;
|
const target = ev.target as HTMLElement;
|
||||||
if (target.classList.contains(ION_FOCUSABLE) && !hadPointerEvent) {
|
if (target.classList.contains(ION_FOCUSABLE) && !hadPointerEvent) {
|
||||||
const toFocus = ev.composedPath().filter((el): el is HTMLElement =>
|
const toFocus = ev
|
||||||
el instanceof HTMLElement && el.classList.contains(ION_FOCUSABLE)
|
.composedPath()
|
||||||
);
|
.filter((el): el is HTMLElement => el instanceof HTMLElement && el.classList.contains(ION_FOCUSABLE));
|
||||||
setFocus(toFocus);
|
setFocus(toFocus);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -36,7 +36,6 @@ import { defineCustomElement as defineIonHeader } from '@ionic/core/components/i
|
|||||||
import { defineCustomElement as defineIonImg } from '@ionic/core/components/ion-img.js';
|
import { defineCustomElement as defineIonImg } from '@ionic/core/components/ion-img.js';
|
||||||
import { defineCustomElement as defineIonInfiniteScroll } from '@ionic/core/components/ion-infinite-scroll.js';
|
import { defineCustomElement as defineIonInfiniteScroll } from '@ionic/core/components/ion-infinite-scroll.js';
|
||||||
import { defineCustomElement as defineIonInfiniteScrollContent } from '@ionic/core/components/ion-infinite-scroll-content.js';
|
import { defineCustomElement as defineIonInfiniteScrollContent } from '@ionic/core/components/ion-infinite-scroll-content.js';
|
||||||
import { defineCustomElement as defineIonInputOtp } from '@ionic/core/components/ion-input-otp.js';
|
|
||||||
import { defineCustomElement as defineIonInputPasswordToggle } from '@ionic/core/components/ion-input-password-toggle.js';
|
import { defineCustomElement as defineIonInputPasswordToggle } from '@ionic/core/components/ion-input-password-toggle.js';
|
||||||
import { defineCustomElement as defineIonItem } from '@ionic/core/components/ion-item.js';
|
import { defineCustomElement as defineIonItem } from '@ionic/core/components/ion-item.js';
|
||||||
import { defineCustomElement as defineIonItemDivider } from '@ionic/core/components/ion-item-divider.js';
|
import { defineCustomElement as defineIonItemDivider } from '@ionic/core/components/ion-item-divider.js';
|
||||||
@ -982,71 +981,6 @@ export class IonInfiniteScrollContent {
|
|||||||
export declare interface IonInfiniteScrollContent extends Components.IonInfiniteScrollContent {}
|
export declare interface IonInfiniteScrollContent extends Components.IonInfiniteScrollContent {}
|
||||||
|
|
||||||
|
|
||||||
@ProxyCmp({
|
|
||||||
defineCustomElementFn: defineIonInputOtp,
|
|
||||||
inputs: ['autocapitalize', 'color', 'disabled', 'fill', 'inputmode', 'length', 'pattern', 'readonly', 'separators', 'shape', 'size', 'type', 'value'],
|
|
||||||
methods: ['setFocus']
|
|
||||||
})
|
|
||||||
@Component({
|
|
||||||
selector: 'ion-input-otp',
|
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
||||||
template: '<ng-content></ng-content>',
|
|
||||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
|
||||||
inputs: ['autocapitalize', 'color', 'disabled', 'fill', 'inputmode', 'length', 'pattern', 'readonly', 'separators', 'shape', 'size', 'type', 'value'],
|
|
||||||
standalone: true
|
|
||||||
})
|
|
||||||
export class IonInputOtp {
|
|
||||||
protected el: HTMLIonInputOtpElement;
|
|
||||||
constructor(c: ChangeDetectorRef, r: ElementRef, protected z: NgZone) {
|
|
||||||
c.detach();
|
|
||||||
this.el = r.nativeElement;
|
|
||||||
proxyOutputs(this, this.el, ['ionInput', 'ionChange', 'ionComplete', 'ionBlur', 'ionFocus']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
import type { InputOtpInputEventDetail as IIonInputOtpInputOtpInputEventDetail } from '@ionic/core/components';
|
|
||||||
import type { InputOtpChangeEventDetail as IIonInputOtpInputOtpChangeEventDetail } from '@ionic/core/components';
|
|
||||||
import type { InputOtpCompleteEventDetail as IIonInputOtpInputOtpCompleteEventDetail } from '@ionic/core/components';
|
|
||||||
|
|
||||||
export declare interface IonInputOtp extends Components.IonInputOtp {
|
|
||||||
/**
|
|
||||||
* The `ionInput` event is fired each time the user modifies the input's value.
|
|
||||||
Unlike the `ionChange` event, the `ionInput` event is fired for each alteration
|
|
||||||
to the input's value. This typically happens for each keystroke as the user types.
|
|
||||||
|
|
||||||
For elements that accept text input (`type=text`, `type=tel`, etc.), the interface
|
|
||||||
is [`InputEvent`](https://developer.mozilla.org/en-US/docs/Web/API/InputEvent); for others,
|
|
||||||
the interface is [`Event`](https://developer.mozilla.org/en-US/docs/Web/API/Event). If
|
|
||||||
the input is cleared on edit, the type is `null`.
|
|
||||||
*/
|
|
||||||
ionInput: EventEmitter<CustomEvent<IIonInputOtpInputOtpInputEventDetail>>;
|
|
||||||
/**
|
|
||||||
* The `ionChange` event is fired when the user modifies the input's value.
|
|
||||||
Unlike the `ionInput` event, the `ionChange` event is only fired when changes
|
|
||||||
are committed, not as the user types.
|
|
||||||
|
|
||||||
The `ionChange` event fires when the `<ion-input-otp>` component loses
|
|
||||||
focus after its value has changed.
|
|
||||||
|
|
||||||
This event will not emit when programmatically setting the `value` property.
|
|
||||||
*/
|
|
||||||
ionChange: EventEmitter<CustomEvent<IIonInputOtpInputOtpChangeEventDetail>>;
|
|
||||||
/**
|
|
||||||
* Emitted when all input boxes have been filled with valid values.
|
|
||||||
*/
|
|
||||||
ionComplete: EventEmitter<CustomEvent<IIonInputOtpInputOtpCompleteEventDetail>>;
|
|
||||||
/**
|
|
||||||
* Emitted when the input group loses focus.
|
|
||||||
*/
|
|
||||||
ionBlur: EventEmitter<CustomEvent<FocusEvent>>;
|
|
||||||
/**
|
|
||||||
* Emitted when the input group has focus.
|
|
||||||
*/
|
|
||||||
ionFocus: EventEmitter<CustomEvent<FocusEvent>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ProxyCmp({
|
@ProxyCmp({
|
||||||
defineCustomElementFn: defineIonInputPasswordToggle,
|
defineCustomElementFn: defineIonInputPasswordToggle,
|
||||||
inputs: ['color', 'hideIcon', 'mode', 'showIcon']
|
inputs: ['color', 'hideIcon', 'mode', 'showIcon']
|
||||||
|
@ -492,7 +492,7 @@ export const IonInput: StencilVueComponent<JSX.IonInput, JSX.IonInput["value"]>
|
|||||||
'value', 'ion-input');
|
'value', 'ion-input');
|
||||||
|
|
||||||
|
|
||||||
export const IonInputOtp: StencilVueComponent<JSX.IonInputOtp> = /*@__PURE__*/ defineContainer<JSX.IonInputOtp>('ion-input-otp', defineIonInputOtp, [
|
export const IonInputOtp: StencilVueComponent<JSX.IonInputOtp, JSX.IonInputOtp["value"]> = /*@__PURE__*/ defineContainer<JSX.IonInputOtp, JSX.IonInputOtp["value"]>('ion-input-otp', defineIonInputOtp, [
|
||||||
'autocapitalize',
|
'autocapitalize',
|
||||||
'color',
|
'color',
|
||||||
'disabled',
|
'disabled',
|
||||||
@ -517,7 +517,8 @@ export const IonInputOtp: StencilVueComponent<JSX.IonInputOtp> = /*@__PURE__*/ d
|
|||||||
'ionComplete',
|
'ionComplete',
|
||||||
'ionBlur',
|
'ionBlur',
|
||||||
'ionFocus'
|
'ionFocus'
|
||||||
]);
|
],
|
||||||
|
'value', 'ion-input');
|
||||||
|
|
||||||
|
|
||||||
export const IonInputPasswordToggle: StencilVueComponent<JSX.IonInputPasswordToggle> = /*@__PURE__*/ defineContainer<JSX.IonInputPasswordToggle>('ion-input-password-toggle', defineIonInputPasswordToggle, [
|
export const IonInputPasswordToggle: StencilVueComponent<JSX.IonInputPasswordToggle> = /*@__PURE__*/ defineContainer<JSX.IonInputPasswordToggle>('ion-input-password-toggle', defineIonInputPasswordToggle, [
|
||||||
|
Reference in New Issue
Block a user