@ewc-lib/ewc-popovers 2.0.0-beta → 2.0.2-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ export default class Element extends HTMLElement {
14
14
 
15
15
  connectedCallback(ignoreCheck) {
16
16
  if(this.#isInitialized) { return } else { this.#isInitialized=true }
17
- this.setAttribute("ewc-version", "2.0.0-beta") // please always keep in sync with version in package.json
17
+ this.setAttribute("ewc-version", "2.0.2-beta") // please always keep in sync with version in package.json
18
18
  if(ignoreCheck || this.childElementCount===2) {
19
19
  // please see also comment in html.js
20
20
 
@@ -21,7 +21,7 @@ function main() {
21
21
  return `
22
22
  <div class="main_container">
23
23
  <slot name="toggle"></slot>
24
- <div class="ewc-popover__container" aria-expanded="false" role="dialog">
24
+ <div class="ewc-popover__container" role="dialog">
25
25
  <div part="contentContainer" class="ewc-popover__scrollable">
26
26
  <slot class="ewc-popover__content" name="content"></slot>
27
27
  </div>
@@ -372,7 +372,7 @@ export class Popover {
372
372
  }
373
373
 
374
374
  setFocusToToggleElement() {
375
- this.element.children[0].focus()
375
+ this.element.firstElementChild.assignedElements()[0].focus()
376
376
  }
377
377
 
378
378
  /**
@@ -26,6 +26,8 @@ Note: can be modified at runtime.
26
26
  This implements creating URLs and opening websites, email client or invoking an ewc-dialog (for embed).
27
27
  It's usage is **optional**.
28
28
 
29
+ TODO: better description
30
+
29
31
  # Details
30
32
 
31
33
  The ewc-popover-sharing derives from ewc-popover.
@@ -16,11 +16,8 @@ export default class Element extends Popover {
16
16
  } else {
17
17
  this.#isInitialized = true;
18
18
  }
19
+ super.connectedCallback(true);
19
20
  if (this.childElementCount === 1) {
20
- super.connectedCallback(true);
21
-
22
- this.setAttribute("ewc-version", "2.0.0-beta") // please always keep in sync with version in package.json
23
-
24
21
  this.shadowRoot.appendChild( CSS().cloneNode(true) )
25
22
  this.shadowRoot.appendChild( MARKUP.getSvg() )
26
23
 
@@ -32,7 +29,7 @@ export default class Element extends Popover {
32
29
  this.#enableFocusWrap();
33
30
  this.#enableFocusFirstMenuItem()
34
31
  } else {
35
- console.error("popover-sharing: Must have exactly 1 child, which is an clickable element to toggle visibility of the popover.");
32
+ console.error("popover-sharing: Must have exactly 1 child (some clickable element) to toggle visibility of the popover.");
36
33
  }
37
34
  }
38
35
 
@@ -24,7 +24,7 @@ export function html(enabledItems) {
24
24
 
25
25
  function getMenuItemHtml(included, classId, label) {
26
26
  return included?`<li class="ewc-popover-sharing__item ${classId}" tabindex="0">
27
- <a class="ewc-link ewc-link--standalone ewc-popover-sharing__link" role="menuitem" tabindex="-1">
27
+ <a class="ewc-link ewc-link--standalone ewc-popover-sharing__link" tabindex="-1">
28
28
  <svg class="ewc-icon ewc-icon--m ewc-button__icon" focusable="false" aria-hidden="true">
29
29
  <use href="#svg-${classId}"></use>
30
30
  </svg>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@ewc-lib/ewc-popovers",
3
3
  "description": "Monorepo for EWCL popover WebComponents",
4
4
  "//": "please always keep version in sync with version info in the sourcecode",
5
- "version": "2.0.0-beta",
5
+ "version": "2.0.2-beta",
6
6
  "workspaces": [
7
7
  "ewc-popover",
8
8
  "ewc-popover-sharing"
package/readme.md CHANGED
@@ -99,3 +99,11 @@ Before the 2 popover components were grouped together into this monorepo, they e
99
99
 
100
100
  - 2.0.0-beta
101
101
  - initial version of monorepo, containing 2 former singlerepos
102
+
103
+ - 2.0.1-beta
104
+ - bugfix: wrong focus after escape-key close
105
+ - a11y markup
106
+ - adapt tests
107
+
108
+ - 2.0.2-beta
109
+ - version info