@@ -38,7 +38,7 @@ export class AlertCloseEvent extends Event {
3838 super ( 'close' , { bubbles : true , cancelable : true } ) ;
3939 }
4040}
41- let toaster : HTMLElement ;
41+ // let toaster: HTMLElement;
4242const toasts = new Set < Required < ToastOptions > > ( ) ;
4343
4444
@@ -62,9 +62,9 @@ export class PfAlert extends LitElement {
6262 #slots = new SlotController ( this , 'header' , null , 'actions' ) ;
6363
6464 get #icon( ) {
65- const internalStatus = this . closest ( '.demo-with-arrows' ) &&
66- this . status === 'neutral' && this . classList . contains ( 'cogear-demo' )
67- ? 'cogear'
65+ const internalStatus = this . closest ( '.demo-with-arrows' )
66+ && this . status === 'neutral' && this . classList . contains ( 'cogear-demo' ) ?
67+ 'cogear'
6868 : this . status ;
6969 switch ( internalStatus ) {
7070 // @ts -expect-error: support for deprecated props
@@ -77,25 +77,25 @@ export class PfAlert extends LitElement {
7777 }
7878 }
7979
80- #aliasState( state : string ) {
81- switch ( state . toLowerCase ( ) ) {
82- // the first three are deprecated pre-DPO status names
83- case 'note' : return 'info' ;
84- case 'default' : return 'neutral' ;
85- case 'error' : return 'danger' ;
86- // the following are DPO-approved status names
87- case 'danger' :
88- case 'warning' :
89- case 'custom' :
90- case 'neutral' :
91- case 'info' :
92- case 'success' :
93- case 'cogear' :
94- return state . toLowerCase ( ) as this[ 'status' ] ;
95- default :
96- return 'neutral' ;
97- }
98- }
80+ // #aliasState(state: string) {
81+ // switch (state.toLowerCase()) {
82+ // // the first three are deprecated pre-DPO status names
83+ // case 'note': return 'info';
84+ // case 'default': return 'neutral';
85+ // case 'error': return 'danger';
86+ // // the following are DPO-approved status names
87+ // case 'danger':
88+ // case 'warning':
89+ // case 'custom':
90+ // case 'neutral':
91+ // case 'info':
92+ // case 'success':
93+ // case 'cogear':
94+ // return state.toLowerCase() as this['status'];
95+ // default:
96+ // return 'neutral';
97+ // }
98+ // }
9999
100100 connectedCallback ( ) : void {
101101 super . connectedCallback ( ) ;
@@ -114,8 +114,10 @@ export class PfAlert extends LitElement {
114114 const inDemo = this . closest ( '.demo-with-arrows' ) !== null ;
115115 const hasDescription = this . querySelector ( 'p' ) !== null ;
116116 const showArrow = inDemo ;
117- const internalStatus = ( this . closest ( '.demo-with-arrows' ) && this . classList . contains ( 'cogear-demo' ) )
118- ? 'cogear'
117+ const internalStatus = (
118+ this . closest ( '.demo-with-arrows' )
119+ && this . classList . contains ( 'cogear-demo' ) ) ?
120+ 'cogear'
119121 : this . status ;
120122 const arrowDirection = hasDescription ? 'angle-down' : 'angle-right' ;
121123 const footer = html `< footer class ="${ classMap ( { hasActions } ) } "
0 commit comments