revert(): revert base components feature (#26692)

The Ionic Framework team would like to re-evaluate our approach to improving customization options when building mobile applications. We are looking at other solutions that a) make customizing an app UI easier and b) are applicable to a broader set of developers.
This commit is contained in:
Liam DeBeasi
2023-01-30 11:52:36 -05:00
committed by GitHub
parent 592a4f1a37
commit b78b454e08
114 changed files with 387 additions and 1587 deletions

View File

@ -2,7 +2,7 @@ import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Method, Prop, State, Watch, h, writeTask } from '@stencil/core';
import { config } from '../../global/config';
import { getIonStylesheet, getIonBehavior } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type {
Animation,
AnimationBuilder,
@ -47,7 +47,6 @@ import { setCardStatusBarDark, setCardStatusBarDefault } from './utils';
// TODO(FW-2832): types
/**
* @virtualProp {true | false} useBase - useBase determines if base components is enabled.
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
*
* @slot - Content is placed inside of the `.modal-content` element.
@ -59,7 +58,6 @@ import { setCardStatusBarDark, setCardStatusBarDefault } from './utils';
@Component({
tag: 'ion-modal',
styleUrls: {
base: 'modal.scss',
ios: 'modal.ios.scss',
md: 'modal.md.scss',
},
@ -468,7 +466,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
* start of the animation so that it completes
* by the time the card animation is done.
*/
if (hasCardModal && getIonBehavior(this) === 'ios') {
if (hasCardModal && getIonMode(this) === 'ios') {
// Cache the original status bar color before the modal is presented
this.statusBarStyle = await StatusBar.getStyle();
setCardStatusBarDark();
@ -510,7 +508,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
}
private initSwipeToClose() {
if (getIonBehavior(this) !== 'ios') {
if (getIonMode(this) !== 'ios') {
return;
}
@ -639,7 +637,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
* finishes when the dismiss animation does.
*/
const hasCardModal = presentingElement !== undefined;
if (hasCardModal && getIonBehavior(this) === 'ios') {
if (hasCardModal && getIonMode(this) === 'ios') {
setCardStatusBarDefault(this.statusBarStyle);
}
@ -826,7 +824,7 @@ export class Modal implements ComponentInterface, OverlayInterface {
const { handle, isSheetModal, presentingElement, htmlAttributes, handleBehavior, inheritedAttributes } = this;
const showHandle = handle !== false && isSheetModal;
const mode = getIonStylesheet(this);
const mode = getIonMode(this);
const { modalId } = this;
const isCardModal = presentingElement !== undefined && mode === 'ios';
const isHandleCycle = handleBehavior === 'cycle';