@vaadin/popover 25.3.0-alpha7 → 25.3.0-alpha9

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.
@@ -62,6 +62,20 @@
62
62
  "description": "A mixin providing common popover overlay functionality.",
63
63
  "name": "PopoverOverlayMixin",
64
64
  "members": [
65
+ {
66
+ "kind": "field",
67
+ "name": "autofocus",
68
+ "privacy": "public",
69
+ "type": {
70
+ "text": "boolean"
71
+ },
72
+ "description": "Set to true to move focus into the overlay automatically on open.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
73
+ "attribute": "autofocus",
74
+ "inheritedFrom": {
75
+ "name": "OverlayFocusMixin",
76
+ "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
77
+ }
78
+ },
65
79
  {
66
80
  "kind": "method",
67
81
  "name": "bringToFront",
@@ -94,7 +108,7 @@
94
108
  "type": {
95
109
  "text": "boolean"
96
110
  },
97
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
111
+ "description": "Set to true to move focus into the overlay automatically on open\nand keep it inside: Tab and Shift+Tab cycle through the overlay's\ncontent until the overlay is closed.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
98
112
  "attribute": "focus-trap",
99
113
  "inheritedFrom": {
100
114
  "name": "OverlayFocusMixin",
@@ -355,12 +369,24 @@
355
369
  }
356
370
  ],
357
371
  "attributes": [
372
+ {
373
+ "name": "autofocus",
374
+ "type": {
375
+ "text": "boolean"
376
+ },
377
+ "description": "Set to true to move focus into the overlay automatically on open.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
378
+ "fieldName": "autofocus",
379
+ "inheritedFrom": {
380
+ "name": "OverlayFocusMixin",
381
+ "package": "@vaadin/overlay/src/vaadin-overlay-focus-mixin.js"
382
+ }
383
+ },
358
384
  {
359
385
  "name": "focus-trap",
360
386
  "type": {
361
387
  "text": "boolean"
362
388
  },
363
- "description": "When true, opening the overlay moves focus to the first focusable child,\nor to the overlay part with tabindex if there are no focusable children.",
389
+ "description": "Set to true to move focus into the overlay automatically on open\nand keep it inside: Tab and Shift+Tab cycle through the overlay's\ncontent until the overlay is closed.\n\nFocus moves to the first tabbable element in the tab order. This\ncan be the overlay itself if it has `tabindex` attribute set to `0`\non the host element or the `overlay` shadow DOM part.",
364
390
  "fieldName": "focusTrap",
365
391
  "inheritedFrom": {
366
392
  "name": "OverlayFocusMixin",
@@ -1127,6 +1153,13 @@
1127
1153
  "description": "The `role` attribute value to be set on the popover.\nWhen not specified, defaults to 'dialog'.",
1128
1154
  "fieldName": "role"
1129
1155
  },
1156
+ {
1157
+ "type": {
1158
+ "text": "string"
1159
+ },
1160
+ "description": "The theme variants to apply to the component.",
1161
+ "name": "theme"
1162
+ },
1130
1163
  {
1131
1164
  "name": "trigger",
1132
1165
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/popover",
3
- "version": "25.3.0-alpha7",
3
+ "version": "25.3.0-alpha9",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -37,19 +37,19 @@
37
37
  ],
38
38
  "dependencies": {
39
39
  "@open-wc/dedupe-mixin": "^1.3.0",
40
- "@vaadin/a11y-base": "25.3.0-alpha7",
41
- "@vaadin/component-base": "25.3.0-alpha7",
42
- "@vaadin/lit-renderer": "25.3.0-alpha7",
43
- "@vaadin/overlay": "25.3.0-alpha7",
44
- "@vaadin/vaadin-themable-mixin": "25.3.0-alpha7",
40
+ "@vaadin/a11y-base": "25.3.0-alpha9",
41
+ "@vaadin/component-base": "25.3.0-alpha9",
42
+ "@vaadin/lit-renderer": "25.3.0-alpha9",
43
+ "@vaadin/overlay": "25.3.0-alpha9",
44
+ "@vaadin/vaadin-themable-mixin": "25.3.0-alpha9",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/aura": "25.3.0-alpha7",
49
- "@vaadin/chai-plugins": "25.3.0-alpha7",
50
- "@vaadin/test-runner-commands": "25.3.0-alpha7",
48
+ "@vaadin/aura": "25.3.0-alpha9",
49
+ "@vaadin/chai-plugins": "25.3.0-alpha9",
50
+ "@vaadin/test-runner-commands": "25.3.0-alpha9",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.3.0-alpha7",
52
+ "@vaadin/vaadin-lumo-styles": "25.3.0-alpha9",
53
53
  "sinon": "^22.0.0"
54
54
  },
55
55
  "customElements": "custom-elements.json",
@@ -57,5 +57,5 @@
57
57
  "web-types.json",
58
58
  "web-types.lit.json"
59
59
  ],
60
- "gitHead": "ae7b9823df5598faebd7a482993029ee489c35ae"
60
+ "gitHead": "cb915ebde095ec5b94a87af93dd4530f51984c52"
61
61
  }
@@ -16,6 +16,7 @@ import { PopoverOverlayMixin } from './vaadin-popover-overlay-mixin.js';
16
16
  /**
17
17
  * An element used internally by `<vaadin-popover>`. Not intended to be used separately.
18
18
  *
19
+ * @attr {string} theme - The theme variants to apply to the component.
19
20
  * @customElement vaadin-popover-overlay
20
21
  * @extends HTMLElement
21
22
  * @private
@@ -8,6 +8,7 @@ import { css, html, LitElement } from 'lit';
8
8
  import { ifDefined } from 'lit/directives/if-defined.js';
9
9
  import { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
10
10
  import { defineCustomElement } from '@vaadin/component-base/src/define.js';
11
+ import { setOrRemoveAttribute } from '@vaadin/component-base/src/dom-utils.js';
11
12
  import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
12
13
  import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
13
14
  import { generateUniqueId } from '@vaadin/component-base/src/unique-id-utils.js';
@@ -216,6 +217,7 @@ const hasOnlyNestedOverlays = (overlay) => getOverlaysOnTop(overlay).every((el)
216
217
  * @fires {CustomEvent} opened-changed - Fired when the `opened` property changes.
217
218
  * @fires {CustomEvent} closed - Fired when the popover is closed.
218
219
  *
220
+ * @attr {string} theme - The theme variants to apply to the component.
219
221
  * @customElement vaadin-popover
220
222
  * @extends HTMLElement
221
223
  */
@@ -607,27 +609,15 @@ class Popover extends PopoverPositionMixin(
607
609
  }
608
610
 
609
611
  if (props.has('accessibleName')) {
610
- if (this.accessibleName) {
611
- this.setAttribute('aria-label', this.accessibleName);
612
- } else {
613
- this.removeAttribute('aria-label');
614
- }
612
+ setOrRemoveAttribute(this, 'aria-label', this.accessibleName);
615
613
  }
616
614
 
617
615
  if (props.has('accessibleNameRef')) {
618
- if (this.accessibleNameRef) {
619
- this.setAttribute('aria-labelledby', this.accessibleNameRef);
620
- } else {
621
- this.removeAttribute('aria-labelledby');
622
- }
616
+ setOrRemoveAttribute(this, 'aria-labelledby', this.accessibleNameRef);
623
617
  }
624
618
 
625
619
  if (props.has('modal')) {
626
- if (this.modal) {
627
- this.setAttribute('aria-modal', 'true');
628
- } else {
629
- this.removeAttribute('aria-modal');
630
- }
620
+ setOrRemoveAttribute(this, 'aria-modal', this.modal);
631
621
  }
632
622
  }
633
623
 
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/popover",
4
- "version": "25.3.0-alpha7",
4
+ "version": "25.3.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -159,9 +159,7 @@
159
159
  "description": "The theme variants to apply to the component.",
160
160
  "value": {
161
161
  "type": [
162
- "string",
163
- "null",
164
- "undefined"
162
+ "string"
165
163
  ]
166
164
  }
167
165
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/popover",
4
- "version": "25.3.0-alpha7",
4
+ "version": "25.3.0-alpha9",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {