@vaadin/popover 25.2.0-alpha9 → 25.2.0-beta1

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.
@@ -812,6 +812,16 @@
812
812
  "description": "Set to true to disable closing popover on outside click.",
813
813
  "attribute": "no-close-on-outside-click"
814
814
  },
815
+ {
816
+ "kind": "field",
817
+ "name": "noTabFocus",
818
+ "privacy": "public",
819
+ "type": {
820
+ "text": "boolean"
821
+ },
822
+ "description": "When true, pressing Tab on the target or a sibling element does not move\nfocus into the popover's content (including any nested popovers), and\nShift+Tab does not move focus into the popover's last focusable. Focus\nstill moves out of the popover on Tab / Shift+Tab if it was placed\ninside programmatically.\n\nHas no effect on modal popovers, which use their own focus trap.",
823
+ "attribute": "no-tab-focus"
824
+ },
815
825
  {
816
826
  "kind": "field",
817
827
  "name": "opened",
@@ -1072,6 +1082,14 @@
1072
1082
  "description": "Set to true to disable closing popover on outside click.",
1073
1083
  "fieldName": "noCloseOnOutsideClick"
1074
1084
  },
1085
+ {
1086
+ "name": "no-tab-focus",
1087
+ "type": {
1088
+ "text": "boolean"
1089
+ },
1090
+ "description": "When true, pressing Tab on the target or a sibling element does not move\nfocus into the popover's content (including any nested popovers), and\nShift+Tab does not move focus into the popover's last focusable. Focus\nstill moves out of the popover on Tab / Shift+Tab if it was placed\ninside programmatically.\n\nHas no effect on modal popovers, which use their own focus trap.",
1091
+ "fieldName": "noTabFocus"
1092
+ },
1075
1093
  {
1076
1094
  "name": "opened",
1077
1095
  "type": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/popover",
3
- "version": "25.2.0-alpha9",
3
+ "version": "25.2.0-beta1",
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.2.0-alpha9",
41
- "@vaadin/component-base": "25.2.0-alpha9",
42
- "@vaadin/lit-renderer": "25.2.0-alpha9",
43
- "@vaadin/overlay": "25.2.0-alpha9",
44
- "@vaadin/vaadin-themable-mixin": "25.2.0-alpha9",
40
+ "@vaadin/a11y-base": "25.2.0-beta1",
41
+ "@vaadin/component-base": "25.2.0-beta1",
42
+ "@vaadin/lit-renderer": "25.2.0-beta1",
43
+ "@vaadin/overlay": "25.2.0-beta1",
44
+ "@vaadin/vaadin-themable-mixin": "25.2.0-beta1",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/aura": "25.2.0-alpha9",
49
- "@vaadin/chai-plugins": "25.2.0-alpha9",
50
- "@vaadin/test-runner-commands": "25.2.0-alpha9",
48
+ "@vaadin/aura": "25.2.0-beta1",
49
+ "@vaadin/chai-plugins": "25.2.0-beta1",
50
+ "@vaadin/test-runner-commands": "25.2.0-beta1",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.2.0-alpha9",
52
+ "@vaadin/vaadin-lumo-styles": "25.2.0-beta1",
53
53
  "sinon": "^21.0.2"
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": "a38a03e8a8be45821f39c14054c63634dafe08d0"
60
+ "gitHead": "471a23f60d1eb725f98a33f62cb9664d9c0a4163"
61
61
  }
@@ -40,13 +40,19 @@ export class PopoverFocusController {
40
40
 
41
41
  if (targetFocusable && isElementFocused(targetFocusable)) {
42
42
  event.preventDefault();
43
- host.focus();
43
+ if (host.noTabFocus) {
44
+ this.__moveLogicalNext(event, targetFocusable);
45
+ } else {
46
+ host.focus();
47
+ }
44
48
  return;
45
49
  }
46
50
 
47
51
  const lastPopoverFocusable = this.__getLastPopoverFocusable();
48
52
  if (isElementFocused(lastPopoverFocusable)) {
49
- this.__moveLogicalNext(event, host);
53
+ // With noTabFocus the popover isn't in the logical list, so the target
54
+ // becomes the reference for "next after the popover".
55
+ this.__moveLogicalNext(event, host.noTabFocus ? targetFocusable : host);
50
56
  return;
51
57
  }
52
58
 
@@ -65,10 +71,12 @@ export class PopoverFocusController {
65
71
  const host = this.host;
66
72
  const targetFocusable = this.__getTargetFocusable();
67
73
 
68
- // Just clear the flag so native Shift+Tab from the target doesn't reopen.
74
+ // Clear the flag so native Shift+Tab from the target doesn't reopen. Fall
75
+ // through to the redirect logic: when the popover is DOM-prev of the target,
76
+ // case 5 steers focus away from it instead of letting the browser land on
77
+ // the popover host or its content.
69
78
  if (targetFocusable && isElementFocused(targetFocusable) && host.__shouldRestoreFocus) {
70
79
  host.__shouldRestoreFocus = false;
71
- return;
72
80
  }
73
81
 
74
82
  if (isElementFocused(host)) {
@@ -104,6 +112,10 @@ export class PopoverFocusController {
104
112
  prevFocusable.focus();
105
113
  } else if (getActiveTrappingNode(host)) {
106
114
  this.__wrapToLogicalLast(event, logicalFocusables);
115
+ } else if (host.noTabFocus) {
116
+ // No redirect target and no trap: still block native Shift+Tab so the
117
+ // popover host can never receive Shift+Tab focus.
118
+ event.preventDefault();
107
119
  }
108
120
  return;
109
121
  }
@@ -165,7 +177,7 @@ export class PopoverFocusController {
165
177
  /**
166
178
  * Scope focusables in *logical* tab order: the popover is moved from its DOM
167
179
  * position to right after the target focusable. The popover is left out of
168
- * the list entirely when there is no target.
180
+ * the list entirely when there is no target, or when `noTabFocus` is set.
169
181
  * @private
170
182
  */
171
183
  __buildLogicalList(scopeFocusables = this.__getScopeFocusables()) {
@@ -173,7 +185,7 @@ export class PopoverFocusController {
173
185
  const targetFocusable = this.__getTargetFocusable();
174
186
  const logicalFocusables = scopeFocusables.filter((el) => el !== host);
175
187
 
176
- if (targetFocusable && targetFocusable !== host) {
188
+ if (!host.noTabFocus && targetFocusable && targetFocusable !== host) {
177
189
  const targetIdx = logicalFocusables.indexOf(targetFocusable);
178
190
  if (targetIdx >= 0) {
179
191
  logicalFocusables.splice(targetIdx + 1, 0, host);
@@ -187,28 +199,32 @@ export class PopoverFocusController {
187
199
  const host = this.host;
188
200
  const logicalFocusables = this.__buildLogicalList(scopeFocusables);
189
201
  const fromIdx = logicalFocusables.indexOf(from);
190
- if (fromIdx < 0) {
191
- return;
192
- }
193
202
 
194
- // The popover sits right after the target in the logical list, so it can
195
- // be the logical next only when `from` is the target. Skip it: the popover
196
- // is Tab-reachable only from its target (handled in __handleTab case 1).
197
- let nextIdx = fromIdx + 1;
198
- if (logicalFocusables[nextIdx] === host) {
199
- nextIdx += 1;
200
- }
203
+ let focusable;
204
+ if (fromIdx >= 0) {
205
+ // The popover sits right after the target in the logical list, so it can
206
+ // be the logical next only when `from` is the target. Skip it: the popover
207
+ // is Tab-reachable only from its target (handled in __handleTab case 1).
208
+ let nextIdx = fromIdx + 1;
209
+ if (logicalFocusables[nextIdx] === host) {
210
+ nextIdx += 1;
211
+ }
201
212
 
202
- // Past the end inside a trap: wrap to the first element. The popover
203
- // never sits at position 0 (it only follows a target), so list[0] is real.
204
- let focusable = logicalFocusables[nextIdx];
205
- if (!focusable && getActiveTrappingNode(host)) {
206
- focusable = logicalFocusables[0];
213
+ // Past the end inside a trap: wrap to the first element. The popover
214
+ // never sits at position 0 (it only follows a target), so list[0] is real.
215
+ focusable = logicalFocusables[nextIdx];
216
+ if (!focusable && getActiveTrappingNode(host)) {
217
+ focusable = logicalFocusables[0];
218
+ }
207
219
  }
208
220
 
209
221
  if (focusable) {
210
222
  event.preventDefault();
211
223
  focusable.focus();
224
+ } else if (host.noTabFocus) {
225
+ // No redirect target found: still block native Tab so the popover host
226
+ // can never receive Tab focus when it is DOM-adjacent.
227
+ event.preventDefault();
212
228
  }
213
229
  }
214
230
 
@@ -8,10 +8,6 @@ import { PositionMixin } from '@vaadin/overlay/src/vaadin-overlay-position-mixin
8
8
 
9
9
  /**
10
10
  * A mixin providing common popover overlay functionality.
11
- *
12
- * @polymerMixin
13
- * @mixes PositionMixin
14
- * @mixes OverlayMixin
15
11
  */
16
12
  export const PopoverOverlayMixin = (superClass) =>
17
13
  class PopoverOverlayMixinClass extends PositionMixin(OverlayMixin(superClass)) {
@@ -18,9 +18,6 @@ import { PopoverOverlayMixin } from './vaadin-popover-overlay-mixin.js';
18
18
  *
19
19
  * @customElement vaadin-popover-overlay
20
20
  * @extends HTMLElement
21
- * @mixes DirMixin
22
- * @mixes PopoverOverlayMixin
23
- * @mixes ThemableMixin
24
21
  * @private
25
22
  */
26
23
  class PopoverOverlay extends PopoverOverlayMixin(
@@ -6,8 +6,6 @@
6
6
 
7
7
  /**
8
8
  * A mixin providing popover position functionality.
9
- *
10
- * @polymerMixin
11
9
  */
12
10
  export const PopoverPositionMixin = (superClass) =>
13
11
  class PopoverPositionMixinClass extends superClass {
@@ -8,8 +8,6 @@ import { Debouncer } from '@vaadin/component-base/src/debounce.js';
8
8
 
9
9
  /**
10
10
  * A mixin providing popover target functionality.
11
- *
12
- * @polymerMixin
13
11
  */
14
12
  export const PopoverTargetMixin = (superClass) =>
15
13
  class PopoverTargetMixinClass extends superClass {
@@ -34,6 +32,7 @@ export const PopoverTargetMixin = (superClass) =>
34
32
  */
35
33
  target: {
36
34
  type: Object,
35
+ sync: true,
37
36
  },
38
37
 
39
38
  /** @private */
@@ -205,6 +205,19 @@ declare class Popover extends PopoverPositionMixin(PopoverTargetMixin(ThemePrope
205
205
  */
206
206
  noCloseOnEsc: boolean;
207
207
 
208
+ /**
209
+ * When true, pressing Tab on the target or a sibling element does not move
210
+ * focus into the popover's content (including any nested popovers), and
211
+ * Shift+Tab does not move focus into the popover's last focusable. Focus
212
+ * still moves out of the popover on Tab / Shift+Tab if it was placed
213
+ * inside programmatically.
214
+ *
215
+ * Has no effect on modal popovers, which use their own focus trap.
216
+ *
217
+ * @attr {boolean} no-tab-focus
218
+ */
219
+ noTabFocus: boolean;
220
+
208
221
  /**
209
222
  * Popover trigger mode, used to configure how the popover is opened or closed.
210
223
  * Could be set to multiple by providing an array, e.g. `trigger = ['hover', 'focus']`.
@@ -209,10 +209,6 @@ const isLastOverlay = (overlay) => {
209
209
  *
210
210
  * @customElement vaadin-popover
211
211
  * @extends HTMLElement
212
- * @mixes ElementMixin
213
- * @mixes PopoverPositionMixin
214
- * @mixes PopoverTargetMixin
215
- * @mixes ThemePropertyMixin
216
212
  */
217
213
  class Popover extends PopoverPositionMixin(
218
214
  PopoverTargetMixin(ThemePropertyMixin(ElementMixin(PolylitMixin(LitElement)))),
@@ -398,6 +394,22 @@ class Popover extends PopoverPositionMixin(
398
394
  value: false,
399
395
  },
400
396
 
397
+ /**
398
+ * When true, pressing Tab on the target or a sibling element does not move
399
+ * focus into the popover's content (including any nested popovers), and
400
+ * Shift+Tab does not move focus into the popover's last focusable. Focus
401
+ * still moves out of the popover on Tab / Shift+Tab if it was placed
402
+ * inside programmatically.
403
+ *
404
+ * Has no effect on modal popovers, which use their own focus trap.
405
+ *
406
+ * @attr {boolean} no-tab-focus
407
+ */
408
+ noTabFocus: {
409
+ type: Boolean,
410
+ value: false,
411
+ },
412
+
401
413
  /**
402
414
  * Popover trigger mode, used to configure how the popover is opened or closed.
403
415
  * Could be set to multiple by providing an array, e.g. `trigger = ['hover', 'focus']`.
@@ -936,12 +948,6 @@ class Popover extends PopoverPositionMixin(
936
948
  __hasTrigger(trigger) {
937
949
  return Array.isArray(this.trigger) && this.trigger.includes(trigger);
938
950
  }
939
-
940
- /**
941
- * Fired when the popover is closed.
942
- *
943
- * @event closed
944
- */
945
951
  }
946
952
 
947
953
  defineCustomElement(Popover);
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.2.0-alpha9",
4
+ "version": "25.2.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -15,9 +15,7 @@
15
15
  "description": "String used to label the popover to screen reader users.",
16
16
  "value": {
17
17
  "type": [
18
- "string",
19
- "null",
20
- "undefined"
18
+ "string"
21
19
  ]
22
20
  }
23
21
  },
@@ -26,9 +24,7 @@
26
24
  "description": "Id of the element used as label of the popover to screen reader users.",
27
25
  "value": {
28
26
  "type": [
29
- "string",
30
- "null",
31
- "undefined"
27
+ "string"
32
28
  ]
33
29
  }
34
30
  },
@@ -37,9 +33,7 @@
37
33
  "description": "When true, the popover content automatically receives focus after\nit is opened. Modal popovers use this behavior by default.",
38
34
  "value": {
39
35
  "type": [
40
- "boolean",
41
- "null",
42
- "undefined"
36
+ "boolean"
43
37
  ]
44
38
  }
45
39
  },
@@ -48,9 +42,7 @@
48
42
  "description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
49
43
  "value": {
50
44
  "type": [
51
- "number",
52
- "null",
53
- "undefined"
45
+ "number"
54
46
  ]
55
47
  }
56
48
  },
@@ -59,9 +51,7 @@
59
51
  "description": "The id of the element to be used as `target` value.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
60
52
  "value": {
61
53
  "type": [
62
- "string",
63
- "null",
64
- "undefined"
54
+ "string"
65
55
  ]
66
56
  }
67
57
  },
@@ -70,9 +60,7 @@
70
60
  "description": "Set the height of the popover.\nIf a unitless number is provided, pixels are assumed.",
71
61
  "value": {
72
62
  "type": [
73
- "string",
74
- "null",
75
- "undefined"
63
+ "string"
76
64
  ]
77
65
  }
78
66
  },
@@ -81,9 +69,7 @@
81
69
  "description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
82
70
  "value": {
83
71
  "type": [
84
- "number",
85
- "null",
86
- "undefined"
72
+ "number"
87
73
  ]
88
74
  }
89
75
  },
@@ -92,9 +78,7 @@
92
78
  "description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
93
79
  "value": {
94
80
  "type": [
95
- "number",
96
- "null",
97
- "undefined"
81
+ "number"
98
82
  ]
99
83
  }
100
84
  },
@@ -103,9 +87,7 @@
103
87
  "description": "When true, the popover prevents interacting with background elements\nby setting `pointer-events` style on the document body to `none`.\nThis also enables trapping focus inside the popover.",
104
88
  "value": {
105
89
  "type": [
106
- "boolean",
107
- "null",
108
- "undefined"
90
+ "boolean"
109
91
  ]
110
92
  }
111
93
  },
@@ -114,9 +96,7 @@
114
96
  "description": "Set to true to disable closing popover on Escape press.",
115
97
  "value": {
116
98
  "type": [
117
- "boolean",
118
- "null",
119
- "undefined"
99
+ "boolean"
120
100
  ]
121
101
  }
122
102
  },
@@ -125,9 +105,16 @@
125
105
  "description": "Set to true to disable closing popover on outside click.",
126
106
  "value": {
127
107
  "type": [
128
- "boolean",
129
- "null",
130
- "undefined"
108
+ "boolean"
109
+ ]
110
+ }
111
+ },
112
+ {
113
+ "name": "no-tab-focus",
114
+ "description": "When true, pressing Tab on the target or a sibling element does not move\nfocus into the popover's content (including any nested popovers), and\nShift+Tab does not move focus into the popover's last focusable. Focus\nstill moves out of the popover on Tab / Shift+Tab if it was placed\ninside programmatically.\n\nHas no effect on modal popovers, which use their own focus trap.",
115
+ "value": {
116
+ "type": [
117
+ "boolean"
131
118
  ]
132
119
  }
133
120
  },
@@ -136,9 +123,7 @@
136
123
  "description": "True if the popover is visible and available for interaction.",
137
124
  "value": {
138
125
  "type": [
139
- "boolean",
140
- "null",
141
- "undefined"
126
+ "boolean"
142
127
  ]
143
128
  }
144
129
  },
@@ -147,9 +132,7 @@
147
132
  "description": "The `role` attribute value to be set on the popover.",
148
133
  "value": {
149
134
  "type": [
150
- "string",
151
- "null",
152
- "undefined"
135
+ "string"
153
136
  ]
154
137
  }
155
138
  },
@@ -158,9 +141,7 @@
158
141
  "description": "Position of the overlay with respect to the target.\nSupported values: `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
159
142
  "value": {
160
143
  "type": [
161
- "string",
162
- "null",
163
- "undefined"
144
+ "string"
164
145
  ]
165
146
  }
166
147
  },
@@ -169,9 +150,7 @@
169
150
  "description": "The `role` attribute value to be set on the popover.\nWhen not specified, defaults to 'dialog'.",
170
151
  "value": {
171
152
  "type": [
172
- "string",
173
- "null",
174
- "undefined"
153
+ "string"
175
154
  ]
176
155
  }
177
156
  },
@@ -191,9 +170,7 @@
191
170
  "description": "Set the width of the popover.\nIf a unitless number is provided, pixels are assumed.",
192
171
  "value": {
193
172
  "type": [
194
- "string",
195
- "null",
196
- "undefined"
173
+ "string"
197
174
  ]
198
175
  }
199
176
  },
@@ -202,9 +179,7 @@
202
179
  "description": "When true, the popover has a backdrop (modality curtain) on top of the\nunderlying page content, covering the whole viewport.",
203
180
  "value": {
204
181
  "type": [
205
- "boolean",
206
- "null",
207
- "undefined"
182
+ "boolean"
208
183
  ]
209
184
  }
210
185
  }
@@ -216,9 +191,7 @@
216
191
  "description": "String used to label the popover to screen reader users.",
217
192
  "value": {
218
193
  "type": [
219
- "string",
220
- "null",
221
- "undefined"
194
+ "string"
222
195
  ]
223
196
  }
224
197
  },
@@ -227,9 +200,7 @@
227
200
  "description": "Id of the element used as label of the popover to screen reader users.",
228
201
  "value": {
229
202
  "type": [
230
- "string",
231
- "null",
232
- "undefined"
203
+ "string"
233
204
  ]
234
205
  }
235
206
  },
@@ -238,9 +209,7 @@
238
209
  "description": "When true, the popover content automatically receives focus after\nit is opened. Modal popovers use this behavior by default.",
239
210
  "value": {
240
211
  "type": [
241
- "boolean",
242
- "null",
243
- "undefined"
212
+ "boolean"
244
213
  ]
245
214
  }
246
215
  },
@@ -249,9 +218,7 @@
249
218
  "description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
250
219
  "value": {
251
220
  "type": [
252
- "number",
253
- "null",
254
- "undefined"
221
+ "number"
255
222
  ]
256
223
  }
257
224
  },
@@ -260,9 +227,7 @@
260
227
  "description": "The id of the element to be used as `target` value.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
261
228
  "value": {
262
229
  "type": [
263
- "string",
264
- "null",
265
- "undefined"
230
+ "string"
266
231
  ]
267
232
  }
268
233
  },
@@ -271,9 +236,7 @@
271
236
  "description": "Set the height of the popover.\nIf a unitless number is provided, pixels are assumed.",
272
237
  "value": {
273
238
  "type": [
274
- "string",
275
- "null",
276
- "undefined"
239
+ "string"
277
240
  ]
278
241
  }
279
242
  },
@@ -282,9 +245,7 @@
282
245
  "description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
283
246
  "value": {
284
247
  "type": [
285
- "number",
286
- "null",
287
- "undefined"
248
+ "number"
288
249
  ]
289
250
  }
290
251
  },
@@ -293,9 +254,7 @@
293
254
  "description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
294
255
  "value": {
295
256
  "type": [
296
- "number",
297
- "null",
298
- "undefined"
257
+ "number"
299
258
  ]
300
259
  }
301
260
  },
@@ -304,9 +263,7 @@
304
263
  "description": "When true, the popover prevents interacting with background elements\nby setting `pointer-events` style on the document body to `none`.\nThis also enables trapping focus inside the popover.",
305
264
  "value": {
306
265
  "type": [
307
- "boolean",
308
- "null",
309
- "undefined"
266
+ "boolean"
310
267
  ]
311
268
  }
312
269
  },
@@ -315,9 +272,7 @@
315
272
  "description": "Set to true to disable closing popover on Escape press.",
316
273
  "value": {
317
274
  "type": [
318
- "boolean",
319
- "null",
320
- "undefined"
275
+ "boolean"
321
276
  ]
322
277
  }
323
278
  },
@@ -326,9 +281,16 @@
326
281
  "description": "Set to true to disable closing popover on outside click.",
327
282
  "value": {
328
283
  "type": [
329
- "boolean",
330
- "null",
331
- "undefined"
284
+ "boolean"
285
+ ]
286
+ }
287
+ },
288
+ {
289
+ "name": "noTabFocus",
290
+ "description": "When true, pressing Tab on the target or a sibling element does not move\nfocus into the popover's content (including any nested popovers), and\nShift+Tab does not move focus into the popover's last focusable. Focus\nstill moves out of the popover on Tab / Shift+Tab if it was placed\ninside programmatically.\n\nHas no effect on modal popovers, which use their own focus trap.",
291
+ "value": {
292
+ "type": [
293
+ "boolean"
332
294
  ]
333
295
  }
334
296
  },
@@ -337,9 +299,7 @@
337
299
  "description": "True if the popover is visible and available for interaction.",
338
300
  "value": {
339
301
  "type": [
340
- "boolean",
341
- "null",
342
- "undefined"
302
+ "boolean"
343
303
  ]
344
304
  }
345
305
  },
@@ -348,9 +308,7 @@
348
308
  "description": "The `role` attribute value to be set on the popover.",
349
309
  "value": {
350
310
  "type": [
351
- "string",
352
- "null",
353
- "undefined"
311
+ "string"
354
312
  ]
355
313
  }
356
314
  },
@@ -359,9 +317,7 @@
359
317
  "description": "Position of the overlay with respect to the target.\nSupported values: `top-start`, `top`, `top-end`,\n`bottom-start`, `bottom`, `bottom-end`, `start-top`,\n`start`, `start-bottom`, `end-top`, `end`, `end-bottom`.",
360
318
  "value": {
361
319
  "type": [
362
- "string",
363
- "null",
364
- "undefined"
320
+ "string"
365
321
  ]
366
322
  }
367
323
  },
@@ -370,9 +326,7 @@
370
326
  "description": "Custom function for rendering the content of the popover.\nReceives two arguments:\n\n- `root` The root container DOM element. Append your content to it.\n- `popover` The reference to the `vaadin-popover` element.",
371
327
  "value": {
372
328
  "type": [
373
- "Object",
374
- "null",
375
- "undefined"
329
+ "object"
376
330
  ]
377
331
  }
378
332
  },
@@ -381,9 +335,7 @@
381
335
  "description": "The `role` attribute value to be set on the popover.\nWhen not specified, defaults to 'dialog'.",
382
336
  "value": {
383
337
  "type": [
384
- "string",
385
- "null",
386
- "undefined"
338
+ "string"
387
339
  ]
388
340
  }
389
341
  },
@@ -392,9 +344,7 @@
392
344
  "description": "Reference to the DOM element used both to trigger the overlay\nby user interaction and to visually position it on the screen.\n\nDefaults to an element referenced with `for` attribute, in\nwhich case it must be located in the same shadow scope.",
393
345
  "value": {
394
346
  "type": [
395
- "Object",
396
- "null",
397
- "undefined"
347
+ "object"
398
348
  ]
399
349
  }
400
350
  },
@@ -403,9 +353,7 @@
403
353
  "description": "Popover trigger mode, used to configure how the popover is opened or closed.\nCould be set to multiple by providing an array, e.g. `trigger = ['hover', 'focus']`.\n\nSupported values:\n- `click` (default) - opens and closes on target click.\n- `hover` - opens on target mouseenter, closes on target mouseleave. Moving mouse\nto the popover content keeps the popover opened.\n- `focus` - opens on target focus, closes on target blur. Moving focus to the\npopover content keeps the popover opened.\n\nIn addition to the behavior specified by `trigger`, the popover can be closed by:\n- pressing Escape key (unless `noCloseOnEsc` property is true)\n- outside click (unless `noCloseOnOutsideClick` property is true)\n\nWhen setting `trigger` property to `null`, `undefined` or empty array, the popover\ncan be only opened programmatically by changing `opened` property. Note, closing\non Escape press or outside click is still allowed unless explicitly disabled.",
404
354
  "value": {
405
355
  "type": [
406
- "Array",
407
- "null",
408
- "undefined"
356
+ "array"
409
357
  ]
410
358
  }
411
359
  },
@@ -414,9 +362,7 @@
414
362
  "description": "Set the width of the popover.\nIf a unitless number is provided, pixels are assumed.",
415
363
  "value": {
416
364
  "type": [
417
- "string",
418
- "null",
419
- "undefined"
365
+ "string"
420
366
  ]
421
367
  }
422
368
  },
@@ -425,9 +371,7 @@
425
371
  "description": "When true, the popover has a backdrop (modality curtain) on top of the\nunderlying page content, covering the whole viewport.",
426
372
  "value": {
427
373
  "type": [
428
- "boolean",
429
- "null",
430
- "undefined"
374
+ "boolean"
431
375
  ]
432
376
  }
433
377
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/popover",
4
- "version": "25.2.0-alpha9",
4
+ "version": "25.2.0-beta1",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -20,92 +20,92 @@
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
23
- "name": "?autofocus",
24
- "description": "When true, the popover content automatically receives focus after\nit is opened. Modal popovers use this behavior by default.",
23
+ "name": ".accessibleName",
24
+ "description": "String used to label the popover to screen reader users.",
25
25
  "value": {
26
26
  "kind": "expression"
27
27
  }
28
28
  },
29
29
  {
30
- "name": "?modal",
31
- "description": "When true, the popover prevents interacting with background elements\nby setting `pointer-events` style on the document body to `none`.\nThis also enables trapping focus inside the popover.",
30
+ "name": ".accessibleNameRef",
31
+ "description": "Id of the element used as label of the popover to screen reader users.",
32
32
  "value": {
33
33
  "kind": "expression"
34
34
  }
35
35
  },
36
36
  {
37
- "name": "?noCloseOnEsc",
38
- "description": "Set to true to disable closing popover on Escape press.",
37
+ "name": "?autofocus",
38
+ "description": "When true, the popover content automatically receives focus after\nit is opened. Modal popovers use this behavior by default.",
39
39
  "value": {
40
40
  "kind": "expression"
41
41
  }
42
42
  },
43
43
  {
44
- "name": "?noCloseOnOutsideClick",
45
- "description": "Set to true to disable closing popover on outside click.",
44
+ "name": ".focusDelay",
45
+ "description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
46
46
  "value": {
47
47
  "kind": "expression"
48
48
  }
49
49
  },
50
50
  {
51
- "name": "?opened",
52
- "description": "True if the popover is visible and available for interaction.",
51
+ "name": ".for",
52
+ "description": "The id of the element to be used as `target` value.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
53
53
  "value": {
54
54
  "kind": "expression"
55
55
  }
56
56
  },
57
57
  {
58
- "name": "?withBackdrop",
59
- "description": "When true, the popover has a backdrop (modality curtain) on top of the\nunderlying page content, covering the whole viewport.",
58
+ "name": ".height",
59
+ "description": "Set the height of the popover.\nIf a unitless number is provided, pixels are assumed.",
60
60
  "value": {
61
61
  "kind": "expression"
62
62
  }
63
63
  },
64
64
  {
65
- "name": ".accessibleName",
66
- "description": "String used to label the popover to screen reader users.",
65
+ "name": ".hideDelay",
66
+ "description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
67
67
  "value": {
68
68
  "kind": "expression"
69
69
  }
70
70
  },
71
71
  {
72
- "name": ".accessibleNameRef",
73
- "description": "Id of the element used as label of the popover to screen reader users.",
72
+ "name": ".hoverDelay",
73
+ "description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
74
74
  "value": {
75
75
  "kind": "expression"
76
76
  }
77
77
  },
78
78
  {
79
- "name": ".focusDelay",
80
- "description": "The delay in milliseconds before the popover is opened\non focus when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
79
+ "name": "?modal",
80
+ "description": "When true, the popover prevents interacting with background elements\nby setting `pointer-events` style on the document body to `none`.\nThis also enables trapping focus inside the popover.",
81
81
  "value": {
82
82
  "kind": "expression"
83
83
  }
84
84
  },
85
85
  {
86
- "name": ".for",
87
- "description": "The id of the element to be used as `target` value.\nThe element should be in the DOM by the time when\nthe attribute is set, otherwise a warning is shown.",
86
+ "name": "?noCloseOnEsc",
87
+ "description": "Set to true to disable closing popover on Escape press.",
88
88
  "value": {
89
89
  "kind": "expression"
90
90
  }
91
91
  },
92
92
  {
93
- "name": ".height",
94
- "description": "Set the height of the popover.\nIf a unitless number is provided, pixels are assumed.",
93
+ "name": "?noCloseOnOutsideClick",
94
+ "description": "Set to true to disable closing popover on outside click.",
95
95
  "value": {
96
96
  "kind": "expression"
97
97
  }
98
98
  },
99
99
  {
100
- "name": ".hideDelay",
101
- "description": "The delay in milliseconds before the popover is closed\non losing hover, when the corresponding trigger is used.\nOn blur, the popover is closed immediately.\n\nWhen not specified, the global default (500ms) is used.",
100
+ "name": "?noTabFocus",
101
+ "description": "When true, pressing Tab on the target or a sibling element does not move\nfocus into the popover's content (including any nested popovers), and\nShift+Tab does not move focus into the popover's last focusable. Focus\nstill moves out of the popover on Tab / Shift+Tab if it was placed\ninside programmatically.\n\nHas no effect on modal popovers, which use their own focus trap.",
102
102
  "value": {
103
103
  "kind": "expression"
104
104
  }
105
105
  },
106
106
  {
107
- "name": ".hoverDelay",
108
- "description": "The delay in milliseconds before the popover is opened\non hover when the corresponding trigger is used.\n\nWhen not specified, the global default (500ms) is used.",
107
+ "name": "?opened",
108
+ "description": "True if the popover is visible and available for interaction.",
109
109
  "value": {
110
110
  "kind": "expression"
111
111
  }
@@ -159,6 +159,13 @@
159
159
  "kind": "expression"
160
160
  }
161
161
  },
162
+ {
163
+ "name": "?withBackdrop",
164
+ "description": "When true, the popover has a backdrop (modality curtain) on top of the\nunderlying page content, covering the whole viewport.",
165
+ "value": {
166
+ "kind": "expression"
167
+ }
168
+ },
162
169
  {
163
170
  "name": "@closed",
164
171
  "description": "Fired when the popover is closed.",