dropdown-menu-element
Advanced tools
Comparing version
@@ -1,2 +0,2 @@ | ||
export type DropdownTriggeringClick = "primary" | "secondary"; | ||
export type DropdownTriggeringClick = "primary" | "secondary" | "both"; | ||
/** | ||
@@ -40,2 +40,7 @@ * This is used to specify where the dropdown menu should be opened. | ||
* | ||
* This is a [DOM event](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) using the | ||
* [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) type with the event name | ||
* `"dropdownSelect"`. The {@link DropdownSelectEventDetails | `DropdownSelectEventDetails`} will be on the | ||
* `.details` property of this object. | ||
* | ||
* When a menu option is selected, a non-bubbling version of this event is emitted on the {@link DropdownMenuElement}. | ||
@@ -78,2 +83,7 @@ * If that event isn't cancelled, (that is, if `preventDefault()` was not called) a bubbling version of this event is | ||
* | ||
* This is a [DOM event](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener) using the | ||
* [`CustomEvent`](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/detail) type with the event name | ||
* `"dropdownSelect"`. The {@link DropdownOpenEventDetails | `DropdownOpenEventDetails`} will be on the `.details` | ||
* property of this object. | ||
* | ||
* This event is emitted when a root {@link DropdownMenuElement | `<dropdown-menu>`} is about to be opened. It does not | ||
@@ -243,3 +253,3 @@ * get emitted when a sub-menu opens. | ||
* A value of `"primary"` means this menu will be opened on `"click"` events. A value of `"secondary"`, means this | ||
* menu will be opened on `"contextmenu"` events. | ||
* menu will be opened on `"contextmenu"` events. A value of "both" listens to both. | ||
*/ | ||
@@ -251,4 +261,4 @@ get clickTrigger(): DropdownTriggeringClick; | ||
* Reflects the value of the `open-position` attribute. If not set, or set to an invalid value, this defaults to | ||
* `"element-bottom-rightward"` if {@link DropdownMenuElement.clickTrigger | `click-trigger`} is `"primary"`, or | ||
* `"pointer"` if {@link DropdownMenuElement.clickTrigger | `click-trigger`} is `"secondary"`. | ||
* `"element-bottom-rightward"` if {@link DropdownMenuElement.clickTrigger | `click-trigger`} is `"primary" || | ||
* "both"`, or `"pointer"` if {@link DropdownMenuElement.clickTrigger | `click-trigger`} is `"secondary"`. | ||
* | ||
@@ -255,0 +265,0 @@ * See the {@link DropdownOpenPosition} documentation for details |
@@ -18,3 +18,3 @@ { | ||
], | ||
"version": "1.1.4", | ||
"version": "1.2.0", | ||
"license": "GPL-3.0-or-later", | ||
@@ -37,2 +37,4 @@ "author": { | ||
"build": "rm -rf dist/* && mkdir -p dist && tsc", | ||
"build-standalone:dev": "webpack --mode=development", | ||
"build-standalone:final": "webpack --mode=production", | ||
"build-standalone": "webpack --mode=development && webpack --mode=production", | ||
@@ -42,3 +44,3 @@ "docs": "typedoc src/index.ts" | ||
"dependencies": { | ||
"@aritz-cracker/browser-utils": "^1.3.1" | ||
"@aritz-cracker/browser-utils": "^1.3.2" | ||
}, | ||
@@ -57,4 +59,5 @@ "devDependencies": { | ||
"sideEffects": [ | ||
"dist/index.js" | ||
"dist/index.js", | ||
"src/index.ts" | ||
] | ||
} |
Sorry, the diff of this file is too big to display
100435
1.31%2194
0.92%