@vaadin/grid
Advanced tools
Comparing version 23.0.0-beta2 to 23.0.0-beta3
{ | ||
"name": "@vaadin/grid", | ||
"version": "23.0.0-beta2", | ||
"version": "23.0.0-beta3", | ||
"publishConfig": { | ||
@@ -44,12 +44,12 @@ "access": "public" | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/checkbox": "23.0.0-beta2", | ||
"@vaadin/component-base": "23.0.0-beta2", | ||
"@vaadin/text-field": "23.0.0-beta2", | ||
"@vaadin/vaadin-lumo-styles": "23.0.0-beta2", | ||
"@vaadin/vaadin-material-styles": "23.0.0-beta2", | ||
"@vaadin/vaadin-themable-mixin": "23.0.0-beta2" | ||
"@vaadin/checkbox": "23.0.0-beta3", | ||
"@vaadin/component-base": "23.0.0-beta3", | ||
"@vaadin/text-field": "23.0.0-beta3", | ||
"@vaadin/vaadin-lumo-styles": "23.0.0-beta3", | ||
"@vaadin/vaadin-material-styles": "23.0.0-beta3", | ||
"@vaadin/vaadin-themable-mixin": "23.0.0-beta3" | ||
}, | ||
"devDependencies": { | ||
"@esm-bundle/chai": "^4.3.4", | ||
"@vaadin/polymer-legacy-adapter": "23.0.0-beta2", | ||
"@vaadin/polymer-legacy-adapter": "23.0.0-beta3", | ||
"@vaadin/testing-helpers": "^0.3.2", | ||
@@ -59,3 +59,3 @@ "lit": "^2.0.0", | ||
}, | ||
"gitHead": "a276f7a0fd00e5459b87267468e0dd0d4fb6f7f3" | ||
"gitHead": "4c87216666541f9eb58f56c475964727822aad53" | ||
} |
@@ -97,3 +97,8 @@ /** | ||
_a11yUpdateRowLevel(row, level) { | ||
row.setAttribute('aria-level', level + 1); | ||
// Set level for the expandable rows itself, and all the nested rows. | ||
if (level > 0 || this.__isRowCollapsible(row) || this.__isRowExpandable(row)) { | ||
row.setAttribute('aria-level', level + 1); | ||
} else { | ||
row.removeAttribute('aria-level'); | ||
} | ||
} | ||
@@ -103,19 +108,2 @@ | ||
* @param {!HTMLElement} row | ||
* @param {boolean} detailsOpened | ||
* @protected | ||
*/ | ||
_a11yUpdateRowDetailsOpened(row, detailsOpened) { | ||
const detailsCell = row.querySelector('[part~=details-cell]'); | ||
Array.from(row.children).forEach((cell) => { | ||
if (detailsCell) { | ||
cell.setAttribute('aria-expanded', detailsOpened); | ||
} else { | ||
cell.removeAttribute('aria-expanded'); | ||
} | ||
}); | ||
} | ||
/** | ||
* @param {!HTMLElement} row | ||
* @param {!HTMLElement} detailsCell | ||
@@ -122,0 +110,0 @@ * @protected |
@@ -87,3 +87,2 @@ /** | ||
const isDetailsOpened = this._isDetailsOpened(row._item); | ||
this._a11yUpdateRowDetailsOpened(row, isDetailsOpened); | ||
this._toggleDetailsCell(row, isDetailsOpened); | ||
@@ -90,0 +89,0 @@ } |
@@ -30,2 +30,6 @@ /** | ||
:host([disabled]) { | ||
pointer-events: none; | ||
} | ||
#scroller { | ||
@@ -32,0 +36,0 @@ display: block; |
@@ -6,2 +6,3 @@ /** | ||
*/ | ||
import { DisabledMixinClass } from '@vaadin/component-base/src/disabled-mixin.js'; | ||
import { ElementMixinClass } from '@vaadin/component-base/src/element-mixin.js'; | ||
@@ -393,3 +394,4 @@ import { ThemableMixinClass } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
interface Grid<TItem = GridDefaultItem> | ||
extends ElementMixinClass, | ||
extends DisabledMixinClass, | ||
ElementMixinClass, | ||
ThemableMixinClass, | ||
@@ -396,0 +398,0 @@ ActiveItemMixinClass<TItem>, |
@@ -12,2 +12,3 @@ /** | ||
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js'; | ||
import { TabindexMixin } from '@vaadin/component-base/src/tabindex-mixin.js'; | ||
import { processTemplates } from '@vaadin/component-base/src/templates.js'; | ||
@@ -260,3 +261,5 @@ import { Virtualizer } from '@vaadin/component-base/src/virtualizer.js'; | ||
ColumnReorderingMixin( | ||
ColumnResizingMixin(EventContextMixin(DragAndDropMixin(StylingMixin(PolymerElement)))) | ||
ColumnResizingMixin( | ||
EventContextMixin(DragAndDropMixin(StylingMixin(TabindexMixin(PolymerElement)))) | ||
) | ||
) | ||
@@ -342,2 +345,7 @@ ) | ||
/** @protected */ | ||
tabindex: { | ||
value: undefined | ||
}, | ||
/** | ||
@@ -471,2 +479,19 @@ * If true, the grid's height is defined by its rows. | ||
/** | ||
* Override an observer from `DisabledMixin` to not | ||
* set `tabindex` on the grid when it is re-enabled. | ||
* | ||
* @param {boolean} disabled | ||
* @param {boolean} oldDisabled | ||
* @protected | ||
* @override | ||
*/ | ||
_disabledChanged(disabled, oldDisabled) { | ||
super._disabledChanged(disabled, oldDisabled); | ||
if (oldDisabled) { | ||
this.removeAttribute('tabindex'); | ||
} | ||
} | ||
/** @private */ | ||
@@ -917,3 +942,2 @@ __getBodyCellCoordinates(cell) { | ||
this._a11yUpdateRowSelected(row, model.selected); | ||
this._a11yUpdateRowDetailsOpened(row, model.detailsOpened); | ||
@@ -920,0 +944,0 @@ row.toggleAttribute('expanded', model.expanded); |
@@ -38,2 +38,6 @@ import '@vaadin/vaadin-lumo-styles/color.js'; | ||
:host([disabled]) { | ||
opacity: 0.7; | ||
} | ||
/* Cell styles */ | ||
@@ -40,0 +44,0 @@ |
@@ -16,2 +16,6 @@ import '@vaadin/vaadin-material-styles/color.js'; | ||
:host([disabled]) { | ||
opacity: 0.7; | ||
} | ||
[part~='cell'] { | ||
@@ -18,0 +22,0 @@ min-height: 48px; |
329494
8964
+ Added@vaadin/checkbox@23.0.0-beta3(transitive)
+ Added@vaadin/component-base@23.0.0-beta3(transitive)
+ Added@vaadin/field-base@23.0.0-beta3(transitive)
+ Added@vaadin/icon@23.0.0-beta3(transitive)
+ Added@vaadin/input-container@23.0.0-beta3(transitive)
+ Added@vaadin/text-field@23.0.0-beta3(transitive)
+ Added@vaadin/vaadin-lumo-styles@23.0.0-beta3(transitive)
+ Added@vaadin/vaadin-material-styles@23.0.0-beta3(transitive)
+ Added@vaadin/vaadin-themable-mixin@23.0.0-beta3(transitive)
- Removed@vaadin/checkbox@23.0.0-beta2(transitive)
- Removed@vaadin/component-base@23.0.0-beta2(transitive)
- Removed@vaadin/field-base@23.0.0-beta2(transitive)
- Removed@vaadin/icon@23.0.0-beta2(transitive)
- Removed@vaadin/input-container@23.0.0-beta2(transitive)
- Removed@vaadin/text-field@23.0.0-beta2(transitive)
- Removed@vaadin/vaadin-lumo-styles@23.0.0-beta2(transitive)
- Removed@vaadin/vaadin-material-styles@23.0.0-beta2(transitive)
- Removed@vaadin/vaadin-themable-mixin@23.0.0-beta2(transitive)