mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00
refactor(input): remove accept property (#28946)
BREAKING CHANGE: The `accept` property has been removed from `ion-input`.
This commit is contained in:
@ -138,6 +138,7 @@ This allows components to inherit the color properly when used outside of Ionic
|
|||||||
<h4 id="version-8x-input">Input</h4>
|
<h4 id="version-8x-input">Input</h4>
|
||||||
|
|
||||||
- `size` has been removed from the `ion-input` component. Developers should use CSS to specify the visible width of the input.
|
- `size` has been removed from the `ion-input` component. Developers should use CSS to specify the visible width of the input.
|
||||||
|
- `accept` has been removed from the `ion-input` component. This was previously used in conjunction with the `type="file"`. However, the `file` value for `type` is not a valid value in Ionic Framework.
|
||||||
|
|
||||||
<h4 id="version-8x-nav">Nav</h4>
|
<h4 id="version-8x-nav">Nav</h4>
|
||||||
|
|
||||||
|
@ -547,7 +547,6 @@ ion-infinite-scroll-content,prop,loadingSpinner,"bubbles" | "circles" | "circula
|
|||||||
ion-infinite-scroll-content,prop,loadingText,IonicSafeString | string | undefined,undefined,false,false
|
ion-infinite-scroll-content,prop,loadingText,IonicSafeString | string | undefined,undefined,false,false
|
||||||
|
|
||||||
ion-input,scoped
|
ion-input,scoped
|
||||||
ion-input,prop,accept,string | undefined,undefined,false,false
|
|
||||||
ion-input,prop,autocapitalize,string,'off',false,false
|
ion-input,prop,autocapitalize,string,'off',false,false
|
||||||
ion-input,prop,autocomplete,"name" | "email" | "tel" | "url" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo",'off',false,false
|
ion-input,prop,autocomplete,"name" | "email" | "tel" | "url" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo",'off',false,false
|
||||||
ion-input,prop,autocorrect,"off" | "on",'off',false,false
|
ion-input,prop,autocorrect,"off" | "on",'off',false,false
|
||||||
|
10
core/src/components.d.ts
vendored
10
core/src/components.d.ts
vendored
@ -1144,11 +1144,6 @@ export namespace Components {
|
|||||||
"loadingText"?: string | IonicSafeString;
|
"loadingText"?: string | IonicSafeString;
|
||||||
}
|
}
|
||||||
interface IonInput {
|
interface IonInput {
|
||||||
/**
|
|
||||||
* This attribute is ignored.
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
"accept"?: string;
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||||
*/
|
*/
|
||||||
@ -5888,11 +5883,6 @@ declare namespace LocalJSX {
|
|||||||
"loadingText"?: string | IonicSafeString;
|
"loadingText"?: string | IonicSafeString;
|
||||||
}
|
}
|
||||||
interface IonInput {
|
interface IonInput {
|
||||||
/**
|
|
||||||
* This attribute is ignored.
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
"accept"?: string;
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||||
*/
|
*/
|
||||||
|
@ -74,12 +74,6 @@ export class Input implements ComponentInterface {
|
|||||||
*/
|
*/
|
||||||
@Prop({ reflect: true }) color?: Color;
|
@Prop({ reflect: true }) color?: Color;
|
||||||
|
|
||||||
/**
|
|
||||||
* This attribute is ignored.
|
|
||||||
* @deprecated
|
|
||||||
*/
|
|
||||||
@Prop() accept?: string;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
||||||
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||||
@ -784,7 +778,6 @@ export class Input implements ComponentInterface {
|
|||||||
ref={(input) => (this.nativeInput = input)}
|
ref={(input) => (this.nativeInput = input)}
|
||||||
id={inputId}
|
id={inputId}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
accept={this.accept}
|
|
||||||
autoCapitalize={this.autocapitalize}
|
autoCapitalize={this.autocapitalize}
|
||||||
autoComplete={this.autocomplete}
|
autoComplete={this.autocomplete}
|
||||||
autoCorrect={this.autocorrect}
|
autoCorrect={this.autocorrect}
|
||||||
@ -892,7 +885,6 @@ Developers can dismiss this warning by removing their usage of the "legacy" prop
|
|||||||
ref={(input) => (this.nativeInput = input)}
|
ref={(input) => (this.nativeInput = input)}
|
||||||
aria-labelledby={label ? label.id : null}
|
aria-labelledby={label ? label.id : null}
|
||||||
disabled={this.disabled}
|
disabled={this.disabled}
|
||||||
accept={this.accept}
|
|
||||||
autoCapitalize={this.autocapitalize}
|
autoCapitalize={this.autocapitalize}
|
||||||
autoComplete={this.autocomplete}
|
autoComplete={this.autocomplete}
|
||||||
autoCorrect={this.autocorrect}
|
autoCorrect={this.autocorrect}
|
||||||
|
@ -955,7 +955,7 @@ export declare interface IonInfiniteScrollContent extends Components.IonInfinite
|
|||||||
|
|
||||||
|
|
||||||
@ProxyCmp({
|
@ProxyCmp({
|
||||||
inputs: ['accept', 'autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearInput', 'clearOnEdit', 'color', 'counter', 'counterFormatter', 'debounce', 'disabled', 'enterkeyhint', 'errorText', 'fill', 'helperText', 'inputmode', 'label', 'labelPlacement', 'legacy', 'max', 'maxlength', 'min', 'minlength', 'mode', 'multiple', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'shape', 'spellcheck', 'step', 'type', 'value'],
|
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearInput', 'clearOnEdit', 'color', 'counter', 'counterFormatter', 'debounce', 'disabled', 'enterkeyhint', 'errorText', 'fill', 'helperText', 'inputmode', 'label', 'labelPlacement', 'legacy', 'max', 'maxlength', 'min', 'minlength', 'mode', 'multiple', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'shape', 'spellcheck', 'step', 'type', 'value'],
|
||||||
methods: ['setFocus', 'getInputElement']
|
methods: ['setFocus', 'getInputElement']
|
||||||
})
|
})
|
||||||
@Component({
|
@Component({
|
||||||
@ -963,7 +963,7 @@ export declare interface IonInfiniteScrollContent extends Components.IonInfinite
|
|||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
template: '<ng-content></ng-content>',
|
template: '<ng-content></ng-content>',
|
||||||
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
// eslint-disable-next-line @angular-eslint/no-inputs-metadata-property
|
||||||
inputs: ['accept', 'autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearInput', 'clearOnEdit', 'color', 'counter', 'counterFormatter', 'debounce', 'disabled', 'enterkeyhint', 'errorText', 'fill', 'helperText', 'inputmode', 'label', 'labelPlacement', 'legacy', 'max', 'maxlength', 'min', 'minlength', 'mode', 'multiple', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'shape', 'spellcheck', 'step', 'type', 'value'],
|
inputs: ['autocapitalize', 'autocomplete', 'autocorrect', 'autofocus', 'clearInput', 'clearOnEdit', 'color', 'counter', 'counterFormatter', 'debounce', 'disabled', 'enterkeyhint', 'errorText', 'fill', 'helperText', 'inputmode', 'label', 'labelPlacement', 'legacy', 'max', 'maxlength', 'min', 'minlength', 'mode', 'multiple', 'name', 'pattern', 'placeholder', 'readonly', 'required', 'shape', 'spellcheck', 'step', 'type', 'value'],
|
||||||
})
|
})
|
||||||
export class IonInput {
|
export class IonInput {
|
||||||
protected el: HTMLElement;
|
protected el: HTMLElement;
|
||||||
|
@ -397,7 +397,6 @@ export const IonInfiniteScrollContent = /*@__PURE__*/ defineContainer<JSX.IonInf
|
|||||||
|
|
||||||
export const IonInput = /*@__PURE__*/ defineContainer<JSX.IonInput, JSX.IonInput["value"]>('ion-input', defineIonInput, [
|
export const IonInput = /*@__PURE__*/ defineContainer<JSX.IonInput, JSX.IonInput["value"]>('ion-input', defineIonInput, [
|
||||||
'color',
|
'color',
|
||||||
'accept',
|
|
||||||
'autocapitalize',
|
'autocapitalize',
|
||||||
'autocomplete',
|
'autocomplete',
|
||||||
'autocorrect',
|
'autocorrect',
|
||||||
|
Reference in New Issue
Block a user