66} from '@umbraco-ui/uui-base/lib/mixins' ;
77import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
88import { demandCustomElement } from '@umbraco-ui/uui-base/lib/utils' ;
9- import { css , html , LitElement } from 'lit' ;
9+ import { css , html , LitElement , TemplateResult } from 'lit' ;
1010import { property , state } from 'lit/decorators.js' ;
1111import { ref } from 'lit/directives/ref.js' ;
1212import { ifDefined } from 'lit/directives/if-defined.js' ;
@@ -122,6 +122,12 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
122122 @property ( { type : String , attribute : 'caret-label' } )
123123 public caretLabel = 'Reveal the underlying items' ;
124124
125+ /**
126+ * Overwrite the expand symbol rendering, this replaces the Expand Symbol from UI Library.
127+ */
128+ @property ( { attribute : false } )
129+ public renderExpandSymbol ?: ( ) => Element | TemplateResult < 1 > | undefined ;
130+
125131 @state ( )
126132 private iconSlotHasContent = false ;
127133
@@ -223,9 +229,7 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
223229 id= "caret-button"
224230 aria-label = ${ this . caretLabel }
225231 @click = ${ this . _onCaretClicked } >
226- <uui- symbol- expand
227- aria- hidden= "true"
228- ?open= ${ this . showChildren } > </ uui- symbol- expand >
232+ ${ this . #renderExpandSymbol( ) }
229233 </ butto n> `
230234 : '' }
231235 ${ this . href && this . selectOnly !== true && this . selectable !== true
@@ -241,6 +245,19 @@ export class UUIMenuItemElement extends SelectOnlyMixin(
241245 ` ;
242246 }
243247
248+ #renderExpandSymbol( ) {
249+ if ( this . renderExpandSymbol ) {
250+ const result = this . renderExpandSymbol ( ) ;
251+ if ( result ) {
252+ return result ;
253+ }
254+ }
255+
256+ return html `<uui- symbol- expand
257+ aria- hidden= "true"
258+ ?open= ${ this . showChildren } > </ uui- symbol- expand > ` ;
259+ }
260+
244261 static styles = [
245262 css `
246263 : host {
0 commit comments