@@ -3,7 +3,7 @@ import { defineElement } from '@umbraco-ui/uui-base/lib/registration';
3
3
import { property , state } from 'lit/decorators.js' ;
4
4
import { UUITextStyles } from '@umbraco-ui/uui-css/lib' ;
5
5
import type { UUIInterfaceHeading } from '@umbraco-ui/uui-base/lib' ;
6
- import { StaticValue , html , literal , unsafeStatic } from 'lit/static-html.js' ;
6
+ import { html , unsafeStatic } from 'lit/static-html.js' ;
7
7
8
8
function slotHasContent ( target : EventTarget | null ) : boolean {
9
9
return target
@@ -42,15 +42,14 @@ export class UUIBoxElement extends LitElement {
42
42
*/
43
43
@property ( { attribute : 'headline-variant' } )
44
44
set headlineVariant ( value : UUIInterfaceHeading ) {
45
- if ( ! value ) {
46
- this . _headlineVariantTag = literal `h5` ;
47
- } else {
48
- this . _headlineVariantTag = unsafeStatic ( value ) ;
49
- }
45
+ this . _headlineVariantTag = value ;
46
+ }
47
+ get headlineVariant ( ) {
48
+ return this . _headlineVariantTag ;
50
49
}
51
50
52
51
@state ( )
53
- private _headlineVariantTag : StaticValue = literal `h5` ;
52
+ private _headlineVariantTag : UUIInterfaceHeading = 'h5' ;
54
53
55
54
@state ( )
56
55
private _headlineSlotHasContent = false ;
@@ -89,7 +88,7 @@ export class UUIBoxElement extends LitElement {
89
88
? ''
90
89
: 'display: none'
91
90
} >
92
- <${ this . _headlineVariantTag }
91
+ <${ unsafeStatic ( this . _headlineVariantTag ) }
93
92
id= "headline"
94
93
class = "uui-h5"
95
94
style = ${
@@ -99,7 +98,7 @@ export class UUIBoxElement extends LitElement {
99
98
} >
100
99
${ this . headline }
101
100
<slot name= "headline" @slotchange = ${ this . _headlineSlotChanged } > </ slot>
102
- </ ${ this . _headlineVariantTag } >
101
+ </ ${ unsafeStatic ( this . _headlineVariantTag ) } >
103
102
<slot name= "header" @slotchange = ${ this . _headerSlotChanged } > </ slot>
104
103
<slot name= "header-actions" @slotchange = ${
105
104
this . _headerActionsSlotChanged
0 commit comments