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

@ -1,7 +1,7 @@
import type { ComponentInterface, EventEmitter } from '@stencil/core';
import { Component, Element, Event, Host, Listen, Method, Prop, Watch, forceUpdate, h } from '@stencil/core';
import { getIonStylesheet, getIonBehavior } from '../../global/ionic-global';
import { getIonMode } from '../../global/ionic-global';
import type {
AlertButton,
AlertInput,
@ -36,13 +36,11 @@ import { mdLeaveAnimation } from './animations/md.leave';
// 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.
*/
@Component({
tag: 'ion-alert',
styleUrls: {
base: 'alert.scss',
ios: 'alert.ios.scss',
md: 'alert.md.scss',
},
@ -350,7 +348,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
* 2. App is running in MD mode
* 3. A wrapper ref does not exist
*/
if (this.gesture || getIonBehavior(this) === 'md' || !this.wrapperEl) {
if (this.gesture || getIonMode(this) === 'md' || !this.wrapperEl) {
return;
}
@ -507,7 +505,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
private renderCheckbox() {
const inputs = this.processedInputs;
const mode = getIonStylesheet(this);
const mode = getIonMode(this);
if (inputs.length === 0) {
return null;
@ -656,7 +654,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
private renderAlertButtons() {
const buttons = this.processedButtons;
const mode = getIonStylesheet(this);
const mode = getIonMode(this);
const alertButtonGroupClass = {
'alert-button-group': true,
'alert-button-group-vertical': buttons.length > 2,
@ -681,7 +679,7 @@ export class Alert implements ComponentInterface, OverlayInterface {
render() {
const { overlayIndex, header, subHeader, message, htmlAttributes } = this;
const mode = getIonStylesheet(this);
const mode = getIonMode(this);
const hdrId = `alert-${overlayIndex}-hdr`;
const subHdrId = `alert-${overlayIndex}-sub-hdr`;
const msgId = `alert-${overlayIndex}-msg`;