@vaadin/menu-bar 25.0.0-alpha17 → 25.0.0-alpha19

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/menu-bar",
3
- "version": "25.0.0-alpha17",
3
+ "version": "25.0.0-alpha19",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -34,27 +34,27 @@
34
34
  ],
35
35
  "dependencies": {
36
36
  "@open-wc/dedupe-mixin": "^1.3.0",
37
- "@vaadin/a11y-base": "25.0.0-alpha17",
38
- "@vaadin/button": "25.0.0-alpha17",
39
- "@vaadin/component-base": "25.0.0-alpha17",
40
- "@vaadin/context-menu": "25.0.0-alpha17",
41
- "@vaadin/item": "25.0.0-alpha17",
42
- "@vaadin/list-box": "25.0.0-alpha17",
43
- "@vaadin/overlay": "25.0.0-alpha17",
44
- "@vaadin/vaadin-themable-mixin": "25.0.0-alpha17",
37
+ "@vaadin/a11y-base": "25.0.0-alpha19",
38
+ "@vaadin/button": "25.0.0-alpha19",
39
+ "@vaadin/component-base": "25.0.0-alpha19",
40
+ "@vaadin/context-menu": "25.0.0-alpha19",
41
+ "@vaadin/item": "25.0.0-alpha19",
42
+ "@vaadin/list-box": "25.0.0-alpha19",
43
+ "@vaadin/overlay": "25.0.0-alpha19",
44
+ "@vaadin/vaadin-themable-mixin": "25.0.0-alpha19",
45
45
  "lit": "^3.0.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@vaadin/chai-plugins": "25.0.0-alpha17",
49
- "@vaadin/icon": "25.0.0-alpha17",
50
- "@vaadin/test-runner-commands": "25.0.0-alpha17",
48
+ "@vaadin/chai-plugins": "25.0.0-alpha19",
49
+ "@vaadin/icon": "25.0.0-alpha19",
50
+ "@vaadin/test-runner-commands": "25.0.0-alpha19",
51
51
  "@vaadin/testing-helpers": "^2.0.0",
52
- "@vaadin/vaadin-lumo-styles": "25.0.0-alpha17",
52
+ "@vaadin/vaadin-lumo-styles": "25.0.0-alpha19",
53
53
  "sinon": "^21.0.0"
54
54
  },
55
55
  "web-types": [
56
56
  "web-types.json",
57
57
  "web-types.lit.json"
58
58
  ],
59
- "gitHead": "8264c71309907be99368b09414f0f8d7f591e0b9"
59
+ "gitHead": "1f9af1ce5f0bae8daff044176c8a8df697763881"
60
60
  }
@@ -17,16 +17,15 @@ export const menuBarStyles = css`
17
17
  [part='container'] {
18
18
  display: flex;
19
19
  flex-wrap: nowrap;
20
- margin: calc((var(--vaadin-focus-ring-width) + 1px) * -1);
20
+ margin: calc((var(--vaadin-focus-ring-width) + 2px) * -1);
21
21
  overflow: hidden;
22
- padding: calc(var(--vaadin-focus-ring-width) + 1px);
22
+ padding: calc(var(--vaadin-focus-ring-width) + 2px);
23
23
  position: relative;
24
24
  width: 100%;
25
25
  --_gap: var(--vaadin-menu-bar-gap, 0px);
26
26
  --_bw: var(--vaadin-button-border-width, 1px);
27
27
  gap: var(--_gap);
28
28
  --_rad-button: var(--vaadin-button-border-radius, var(--vaadin-radius-m));
29
- --_rad: min(var(--_gap) * 1000, var(--_rad-button));
30
29
  }
31
30
 
32
31
  ::slotted(vaadin-menu-bar-button:not(:first-of-type)) {
@@ -34,16 +33,18 @@ export const menuBarStyles = css`
34
33
  }
35
34
 
36
35
  ::slotted(vaadin-menu-bar-button) {
37
- border-radius: var(--_rad);
36
+ border-radius: 0;
38
37
  }
39
38
 
40
39
  ::slotted([first-visible]),
41
- :host([has-single-button]) ::slotted([slot='overflow']) {
40
+ :host([has-single-button]) ::slotted([slot='overflow']),
41
+ ::slotted(vaadin-menu-bar-button[theme~='tertiary']) {
42
42
  border-start-start-radius: var(--_rad-button);
43
43
  border-end-start-radius: var(--_rad-button);
44
44
  }
45
45
 
46
- ::slotted(:is([last-visible], [slot='overflow'])) {
46
+ ::slotted(:is([last-visible], [slot='overflow'])),
47
+ ::slotted(vaadin-menu-bar-button[theme~='tertiary']) {
47
48
  border-start-end-radius: var(--_rad-button);
48
49
  border-end-end-radius: var(--_rad-button);
49
50
  }
@@ -114,7 +114,7 @@ export declare class MenuBarMixinClass<TItem extends MenuBarItem = MenuBarItem>
114
114
  * which makes disabled buttons focusable and hoverable, while still
115
115
  * preventing them from being triggered:
116
116
  *
117
- * ```
117
+ * ```js
118
118
  * // Set before any menu bar is attached to the DOM.
119
119
  * window.Vaadin.featureFlags.accessibleDisabledButtons = true;
120
120
  * ```
@@ -127,7 +127,7 @@ export declare class MenuBarMixinClass<TItem extends MenuBarItem = MenuBarItem>
127
127
  * just the individual properties you want to change.
128
128
  *
129
129
  * The object has the following JSON structure and default values:
130
- * ```
130
+ * ```js
131
131
  * {
132
132
  * moreOptions: 'More options'
133
133
  * }
@@ -136,12 +136,7 @@ export const MenuBarMixin = (superClass) =>
136
136
  * which makes disabled buttons focusable and hoverable, while still
137
137
  * preventing them from being triggered:
138
138
  *
139
- * ```
140
- * // Set before any menu bar is attached to the DOM.
141
- * window.Vaadin.featureFlags.accessibleDisabledButtons = true;
142
- * ```
143
- *
144
- * ```
139
+ * ```js
145
140
  * // Set before any menu bar is attached to the DOM.
146
141
  * window.Vaadin.featureFlags.accessibleDisabledButtons = true;
147
142
  * ```
@@ -190,7 +185,7 @@ export const MenuBarMixin = (superClass) =>
190
185
  * just the individual properties you want to change.
191
186
  *
192
187
  * The object has the following JSON structure and default values:
193
- * ```
188
+ * ```js
194
189
  * {
195
190
  * moreOptions: 'More options'
196
191
  * }
@@ -414,7 +409,7 @@ export const MenuBarMixin = (superClass) =>
414
409
  __updateSubMenu() {
415
410
  const subMenu = this._subMenu;
416
411
  if (subMenu && subMenu.opened) {
417
- const button = subMenu._overlayElement.positionTarget;
412
+ const button = subMenu._positionTarget;
418
413
 
419
414
  // Close sub-menu if the corresponding button is no longer in the DOM,
420
415
  // or if the item on it has been changed to no longer have children.
@@ -698,17 +693,18 @@ export const MenuBarMixin = (superClass) =>
698
693
  * and open another one for the newly focused button.
699
694
  *
700
695
  * @param {Element} item
696
+ * @param {FocusOptions=} options
701
697
  * @param {boolean} navigating
702
698
  * @protected
703
699
  * @override
704
700
  */
705
- _focusItem(item, navigating) {
701
+ _focusItem(item, options, navigating) {
706
702
  const wasExpanded = navigating && this.focused === this._expandedButton;
707
703
  if (wasExpanded) {
708
704
  this._close();
709
705
  }
710
706
 
711
- super._focusItem(item, navigating);
707
+ super._focusItem(item, options, navigating);
712
708
 
713
709
  this._buttons.forEach((btn) => {
714
710
  this._setTabindex(btn, btn === item);
@@ -949,6 +945,7 @@ export const MenuBarMixin = (superClass) =>
949
945
 
950
946
  subMenu.items = items;
951
947
  subMenu.listenOn = button;
948
+ subMenu._positionTarget = button;
952
949
  const overlay = subMenu._overlayElement;
953
950
  overlay.noVerticalOverlap = true;
954
951
 
@@ -958,7 +955,6 @@ export const MenuBarMixin = (superClass) =>
958
955
  this._setExpanded(button, true);
959
956
 
960
957
  this.style.pointerEvents = 'auto';
961
- overlay.positionTarget = button;
962
958
 
963
959
  button.dispatchEvent(
964
960
  new CustomEvent('opensubmenu', {
@@ -976,7 +972,8 @@ export const MenuBarMixin = (superClass) =>
976
972
  }
977
973
 
978
974
  if (options.keepFocus) {
979
- this._focusItem(this._expandedButton, false);
975
+ const focusOptions = { focusVisible: isKeyboardActive() };
976
+ this._focusItem(this._expandedButton, focusOptions, false);
980
977
  }
981
978
 
982
979
  // Do not focus item when open not from keyboard
@@ -1020,7 +1017,8 @@ export const MenuBarMixin = (superClass) =>
1020
1017
  if (button && button.hasAttribute('expanded')) {
1021
1018
  this._setExpanded(button, false);
1022
1019
  if (restoreFocus) {
1023
- this._focusItem(button, false);
1020
+ const focusOptions = { focusVisible: isKeyboardActive() };
1021
+ this._focusItem(button, focusOptions, false);
1024
1022
  }
1025
1023
  this._expandedButton = null;
1026
1024
  }
@@ -39,6 +39,16 @@ class MenuBarSubmenu extends ContextMenuMixin(ThemePropertyMixin(PolylitMixin(Li
39
39
  `;
40
40
  }
41
41
 
42
+ static get properties() {
43
+ return {
44
+ isRoot: {
45
+ type: Boolean,
46
+ reflectToAttribute: true,
47
+ sync: true,
48
+ },
49
+ };
50
+ }
51
+
42
52
  constructor() {
43
53
  super();
44
54
 
@@ -65,6 +75,8 @@ class MenuBarSubmenu extends ContextMenuMixin(ThemePropertyMixin(PolylitMixin(Li
65
75
  .modeless="${this._modeless}"
66
76
  .renderer="${this.__itemsRenderer}"
67
77
  .withBackdrop="${this._phone}"
78
+ .positionTarget="${this._positionTarget}"
79
+ ?no-horizontal-overlap="${!this.isRoot}"
68
80
  ?phone="${this._phone}"
69
81
  theme="${ifDefined(this._theme)}"
70
82
  exportparts="backdrop, overlay, content"
package/web-types.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/menu-bar",
4
- "version": "25.0.0-alpha17",
4
+ "version": "25.0.0-alpha19",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "vaadin-menu-bar",
11
- "description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```js\ndocument.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n------------------|----------------\n`container` | The container wrapping menu bar buttons.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|----------------------------------\n`disabled` | Set when the menu bar is disabled\n`has-single-button` | Set when there is only one button visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-menu-bar>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-context-menu).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.",
11
+ "description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```js\ndocument.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n------------------|----------------\n`container` | The container wrapping menu bar buttons.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|----------------------------------\n`disabled` | Set when the menu bar is disabled\n`has-single-button` | Set when there is only one button visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-menu-bar>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-context-menu).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.",
12
12
  "attributes": [
13
13
  {
14
14
  "name": "disabled",
@@ -90,7 +90,7 @@
90
90
  },
91
91
  {
92
92
  "name": "i18n",
93
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```\n{\n moreOptions: 'More options'\n}\n```",
93
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n moreOptions: 'More options'\n}\n```",
94
94
  "value": {
95
95
  "type": [
96
96
  "MenuBarI18n"
@@ -99,7 +99,7 @@
99
99
  },
100
100
  {
101
101
  "name": "items",
102
- "description": "Defines a hierarchical structure, where root level items represent menu bar buttons,\nand `children` property configures a submenu with items to be opened below\nthe button on click, Enter, Space, Up and Down arrow keys.\n\n#### Example\n\n```js\nmenubar.items = [\n {\n text: 'File',\n className: 'file',\n children: [\n {text: 'Open', className: 'file open'}\n {text: 'Auto Save', checked: true},\n ]\n },\n {component: 'hr'},\n {\n text: 'Edit',\n children: [\n {text: 'Undo', disabled: true},\n {text: 'Redo'}\n ]\n },\n {text: 'Help'}\n];\n```\n\n#### Disabled buttons\n\nWhen disabled, menu bar buttons (root-level items) are rendered\nas \"dimmed\" and prevent all user interactions (mouse and keyboard).\n\nSince disabled buttons are not focusable and cannot react to hover\nevents by default, it can cause accessibility issues by making them\nentirely invisible to assistive technologies, and prevents the use\nof Tooltips to explain why the action is not available. This can be\naddressed by enabling the feature flag `accessibleDisabledButtons`,\nwhich makes disabled buttons focusable and hoverable, while still\npreventing them from being triggered:\n\n```\n// Set before any menu bar is attached to the DOM.\nwindow.Vaadin.featureFlags.accessibleDisabledButtons = true;\n```\n```\n// Set before any menu bar is attached to the DOM.\nwindow.Vaadin.featureFlags.accessibleDisabledButtons = true;\n```",
102
+ "description": "Defines a hierarchical structure, where root level items represent menu bar buttons,\nand `children` property configures a submenu with items to be opened below\nthe button on click, Enter, Space, Up and Down arrow keys.\n\n#### Example\n\n```js\nmenubar.items = [\n {\n text: 'File',\n className: 'file',\n children: [\n {text: 'Open', className: 'file open'}\n {text: 'Auto Save', checked: true},\n ]\n },\n {component: 'hr'},\n {\n text: 'Edit',\n children: [\n {text: 'Undo', disabled: true},\n {text: 'Redo'}\n ]\n },\n {text: 'Help'}\n];\n```\n\n#### Disabled buttons\n\nWhen disabled, menu bar buttons (root-level items) are rendered\nas \"dimmed\" and prevent all user interactions (mouse and keyboard).\n\nSince disabled buttons are not focusable and cannot react to hover\nevents by default, it can cause accessibility issues by making them\nentirely invisible to assistive technologies, and prevents the use\nof Tooltips to explain why the action is not available. This can be\naddressed by enabling the feature flag `accessibleDisabledButtons`,\nwhich makes disabled buttons focusable and hoverable, while still\npreventing them from being triggered:\n\n```js\n// Set before any menu bar is attached to the DOM.\nwindow.Vaadin.featureFlags.accessibleDisabledButtons = true;\n```",
103
103
  "value": {
104
104
  "type": [
105
105
  "Array.<MenuBarItem>"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/web-types",
3
3
  "name": "@vaadin/menu-bar",
4
- "version": "25.0.0-alpha17",
4
+ "version": "25.0.0-alpha19",
5
5
  "description-markup": "markdown",
6
6
  "framework": "lit",
7
7
  "framework-config": {
@@ -16,7 +16,7 @@
16
16
  "elements": [
17
17
  {
18
18
  "name": "vaadin-menu-bar",
19
- "description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```js\ndocument.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n------------------|----------------\n`container` | The container wrapping menu bar buttons.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|----------------------------------\n`disabled` | Set when the menu bar is disabled\n`has-single-button` | Set when there is only one button visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-menu-bar>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha17/#/elements/vaadin-context-menu).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.",
19
+ "description": "`<vaadin-menu-bar>` is a Web Component providing a set of horizontally stacked buttons offering\nthe user quick access to a consistent set of commands. Each button can toggle a submenu with\nsupport for additional levels of nested menus.\n\nTo create the menu bar, first add the component to the page:\n\n```html\n<vaadin-menu-bar></vaadin-menu-bar>\n```\n\nAnd then use [`items`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-menu-bar#property-items) property to initialize the structure:\n\n```js\ndocument.querySelector('vaadin-menu-bar').items = [{text: 'File'}, {text: 'Edit'}];\n```\n\n### Styling\n\nThe following shadow DOM parts are exposed for styling:\n\nPart name | Description\n------------------|----------------\n`container` | The container wrapping menu bar buttons.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n--------------------|----------------------------------\n`disabled` | Set when the menu bar is disabled\n`has-single-button` | Set when there is only one button visible\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.\n\n### Internal components\n\nIn addition to `<vaadin-menu-bar>` itself, the following internal\ncomponents are themable:\n\n- `<vaadin-menu-bar-button>` - has the same API as [`<vaadin-button>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-button).\n- `<vaadin-menu-bar-item>` - has the same API as [`<vaadin-item>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-item).\n- `<vaadin-menu-bar-list-box>` - has the same API as [`<vaadin-list-box>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-list-box).\n- `<vaadin-menu-bar-submenu>` - has the same API as [`<vaadin-context-menu>`](https://cdn.vaadin.com/vaadin-web-components/25.0.0-alpha19/#/elements/vaadin-context-menu).\n\nThe `<vaadin-menu-bar-item>` sub-menu elements have the following additional state attributes\non top of the built-in `<vaadin-item>` state attributes:\n\nAttribute | Description\n---------- |-------------\n`expanded` | Expanded parent item.",
20
20
  "extension": true,
21
21
  "attributes": [
22
22
  {
@@ -49,14 +49,14 @@
49
49
  },
50
50
  {
51
51
  "name": ".i18n",
52
- "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```\n{\n moreOptions: 'More options'\n}\n```",
52
+ "description": "The object used to localize this component. To change the default\nlocalization, replace this with an object that provides all properties, or\njust the individual properties you want to change.\n\nThe object has the following JSON structure and default values:\n```js\n{\n moreOptions: 'More options'\n}\n```",
53
53
  "value": {
54
54
  "kind": "expression"
55
55
  }
56
56
  },
57
57
  {
58
58
  "name": ".items",
59
- "description": "Defines a hierarchical structure, where root level items represent menu bar buttons,\nand `children` property configures a submenu with items to be opened below\nthe button on click, Enter, Space, Up and Down arrow keys.\n\n#### Example\n\n```js\nmenubar.items = [\n {\n text: 'File',\n className: 'file',\n children: [\n {text: 'Open', className: 'file open'}\n {text: 'Auto Save', checked: true},\n ]\n },\n {component: 'hr'},\n {\n text: 'Edit',\n children: [\n {text: 'Undo', disabled: true},\n {text: 'Redo'}\n ]\n },\n {text: 'Help'}\n];\n```\n\n#### Disabled buttons\n\nWhen disabled, menu bar buttons (root-level items) are rendered\nas \"dimmed\" and prevent all user interactions (mouse and keyboard).\n\nSince disabled buttons are not focusable and cannot react to hover\nevents by default, it can cause accessibility issues by making them\nentirely invisible to assistive technologies, and prevents the use\nof Tooltips to explain why the action is not available. This can be\naddressed by enabling the feature flag `accessibleDisabledButtons`,\nwhich makes disabled buttons focusable and hoverable, while still\npreventing them from being triggered:\n\n```\n// Set before any menu bar is attached to the DOM.\nwindow.Vaadin.featureFlags.accessibleDisabledButtons = true;\n```\n```\n// Set before any menu bar is attached to the DOM.\nwindow.Vaadin.featureFlags.accessibleDisabledButtons = true;\n```",
59
+ "description": "Defines a hierarchical structure, where root level items represent menu bar buttons,\nand `children` property configures a submenu with items to be opened below\nthe button on click, Enter, Space, Up and Down arrow keys.\n\n#### Example\n\n```js\nmenubar.items = [\n {\n text: 'File',\n className: 'file',\n children: [\n {text: 'Open', className: 'file open'}\n {text: 'Auto Save', checked: true},\n ]\n },\n {component: 'hr'},\n {\n text: 'Edit',\n children: [\n {text: 'Undo', disabled: true},\n {text: 'Redo'}\n ]\n },\n {text: 'Help'}\n];\n```\n\n#### Disabled buttons\n\nWhen disabled, menu bar buttons (root-level items) are rendered\nas \"dimmed\" and prevent all user interactions (mouse and keyboard).\n\nSince disabled buttons are not focusable and cannot react to hover\nevents by default, it can cause accessibility issues by making them\nentirely invisible to assistive technologies, and prevents the use\nof Tooltips to explain why the action is not available. This can be\naddressed by enabling the feature flag `accessibleDisabledButtons`,\nwhich makes disabled buttons focusable and hoverable, while still\npreventing them from being triggered:\n\n```js\n// Set before any menu bar is attached to the DOM.\nwindow.Vaadin.featureFlags.accessibleDisabledButtons = true;\n```",
60
60
  "value": {
61
61
  "kind": "expression"
62
62
  }