### File

`packages/ecl/components/ecl-popover/ecl-popover-toggle.directive.ts`

### Description

Directive used to toggle the visibility of an `ecl-popover` component.

This directive emits a custom click event and manages accessibility attributes.

### Extends

`ECLBaseDirective`

### Metadata

Selector | `[eclPopoverToggle]`

### Index

###### Properties
hostElementRef isExpanded
###### Methods
Public getHostElement onClick getCssClasses
###### Inputs
class e2eAttr tabindex
###### Outputs
click
###### HostBindings
attr.aria-expanded class
###### HostListeners
mouseup
###### Accessors
cssClasses

### Inputs

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

click
Type : `EventEmitter`
Event emitted when the toggle element is clicked with the left mouse button.

### HostBindings

attr.aria-expanded
Type : `boolean`
Default value : `false`
Sets the `aria-expanded` attribute to reflect the popover's open state. This should be updated by the parent popover component.

class
Type : `string`
Host binding that applies the appropriate CSS class to the toggle element.

### HostListeners

mouseup
Arguments : `'$event'`
Emits the `click` event only for left mouse button clicks. Used by the popover component to toggle visibility.

### Methods

Public getHostElement
`getHostElement()`
Returns the native HTML element of the directive. Used internally by the popover to query attributes. Returns : `HTMLElement`

onClick
`onClick(evt: MouseEvent)`
Decorators : `@HostListener('mouseup', ['$event'])`
Emits the `click` event only for left mouse button clicks. Used by the popover component to toggle visibility. Parameters :
Name | Type | Optional
evt | `MouseEvent` | No
Returns : `void`

getCssClasses
`getCssClasses(rootClass: string)`
Parameters :
Name | Type | Optional
rootClass | `string` | No
Returns : `string`

### Properties

hostElementRef
Type : `unknown`
Default value : `inject(ElementRef)`

isExpanded
Type : `unknown`
Default value : `false`
Decorators : `@HostBinding('attr.aria-expanded')`
Sets the `aria-expanded` attribute to reflect the popover's open state. This should be updated by the parent popover component.

### Accessors

cssClasses
get `cssClasses()`
Host binding that applies the appropriate CSS class to the toggle element. Returns : `string`

# results matching ""

# No results matching ""