refactor(types): remove overlay attribute interfaces (#26181)

BREAKING CHANGE:

`ActionSheetAttributes`, `AlertAttributes`, `AlertTextareaAttributes`, `AlertInputAttributes`, `LoadingAttributes`, `ModalAttributes`, `PickerAttributes`, `PopoverAttributes`, and `ToastAttributes` have been removed. Developers should use `{ [key: string]: any }` instead.
This commit is contained in:
Liam DeBeasi
2022-10-28 15:12:28 -05:00
committed by GitHub
parent 34ca337b8a
commit 322a1dbcd0
19 changed files with 40 additions and 94 deletions

View File

@ -5,8 +5,6 @@ import { getIonMode } from '../../global/ionic-global';
import type {
AlertButton,
AlertInput,
AlertInputAttributes,
AlertTextareaAttributes,
AnimationBuilder,
CssClassMap,
OverlayEventDetail,
@ -19,7 +17,6 @@ import type { IonicSafeString } from '../../utils/sanitization';
import { sanitizeDOMString } from '../../utils/sanitization';
import { getClassMap } from '../../utils/theme';
import type { AlertAttributes } from './alert-interface';
import { iosEnterAnimation } from './animations/ios.enter';
import { iosLeaveAnimation } from './animations/ios.leave';
import { mdEnterAnimation } from './animations/md.enter';
@ -124,7 +121,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
/**
* Additional attributes to pass to the alert.
*/
@Prop() htmlAttributes?: AlertAttributes;
@Prop() htmlAttributes?: { [key: string]: any };
/**
* Emitted after the alert has presented.
@ -499,7 +496,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
value={i.value}
id={i.id}
tabIndex={i.tabindex}
{...(i.attributes as AlertTextareaAttributes)}
{...(i.attributes as { [key: string]: any })}
disabled={i.attributes?.disabled ?? i.disabled}
class={inputClass(i)}
onInput={(e) => {
@ -522,7 +519,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
value={i.value}
id={i.id}
tabIndex={i.tabindex}
{...(i.attributes as AlertInputAttributes)}
{...(i.attributes as { [key: string]: any })}
disabled={i.attributes?.disabled ?? i.disabled}
class={inputClass(i)}
onInput={(e) => {