* @class * * ### Overview * The `ui5-toolbar-button` represents an abstract action, * used in the `ui5-toolbar`. * * ### ES6 Module Import * `import "@ui5/webcomponents/dist/ToolbarButton.js";` * @constructor * @abstract * @extends ToolbarItemBase * @public * @since 1.17.0
| 29 | * @since 1.17.0 |
| 30 | */ |
| 31 | @customElement({ |
| 32 | tag: "ui5-toolbar-button", |
| 33 | template: ToolbarButtonTemplate, |
| 34 | renderer: jsxRenderer, |
| 35 | styles: [ToolbarButtonCss], |
| 36 | }) |
| 37 | |
| 38 | /** |
| 39 | * Fired when the component is activated either with a |
| 40 | * mouse/tap or by using the Enter or Space key. |
| 41 | * |
| 42 | * **Note:** The event will not be fired if the `disabled` |
| 43 | * property is set to `true`. |
| 44 | * @public |
| 45 | */ |
| 46 | @event("click", { |
| 47 | bubbles: true, |
| 48 | cancelable: true, |
| 49 | }) |
| 50 | |
| 51 | class ToolbarButton extends ToolbarItemBase { |
| 52 | eventDetails!: ToolbarItemBase["eventDetails"] & { |
| 53 | click: ToolbarItemEventDetail, |
| 54 | } |
| 55 | |
| 56 | /** |
| 57 | * Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set, |
| 58 | * the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it. |
| 59 | * @public |
| 60 | * @default "Default" |
| 61 | */ |
| 62 | @property() |
| 63 | overflowPriority: `${ToolbarItemOverflowBehavior}` = "Default"; |
| 64 | |
| 65 | /** |
| 66 | * Defines if the toolbar overflow popup should close upon interaction with the item. |
| 67 | * It will close by default. |
| 68 | * @default false |
| 69 | * @public |
| 70 | */ |
| 71 | @property({ type: Boolean }) |
| 72 | preventOverflowClosing = false; |
| 73 | |
| 74 | /** |
| 75 | * Defines if the action is disabled. |
| 76 | * |
| 77 | * **Note:** a disabled action can't be pressed or focused, and it is not in the tab chain. |
| 78 | * @default false |
| 79 | * @public |
| 80 | */ |
| 81 | @property({ type: Boolean }) |
| 82 | disabled = false; |
| 83 | |
| 84 | /** |
| 85 | * Defines the action design. |
| 86 | * @default "Default" |
| 87 | * @public |
| 88 | */ |
nothing calls this directly
no test coverage detected