@spectrum-css/actionbutton
Advanced tools
Comparing version 1.1.9 to 1.1.10
@@ -6,2 +6,12 @@ # Change Log | ||
<a name="1.1.10"></a> | ||
## 1.1.10 | ||
🗓 2022-03-22 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/actionbutton@1.1.9...@spectrum-css/actionbutton@1.1.10) | ||
**Note:** Version bump only for package @spectrum-css/actionbutton | ||
<a name="1.1.9"></a> | ||
@@ -8,0 +18,0 @@ ## 1.1.9 |
@@ -13,2 +13,31 @@ /* | ||
// Asset Card | ||
(function() { | ||
function setSelected(card, selected) { | ||
var checkbox = card.querySelector('.spectrum-Checkbox-input'); | ||
if (checkbox) { | ||
checkbox.checked = selected; | ||
} | ||
card.classList.toggle('is-selected', selected); | ||
} | ||
document.addEventListener('click', function(event) { | ||
var card = event.target.closest('.spectrum-AssetCard'); | ||
if (card) { | ||
setSelected(card, !card.classList.contains('is-selected')); | ||
} | ||
}); | ||
document.addEventListener('keypress', function(event) { | ||
var card = event.target.closest('.spectrum-AssetCard'); | ||
if (card) { | ||
if (event.key === 'Enter' || event.key === ' ') { | ||
setSelected(card, !card.classList.contains('is-selected')); | ||
event.preventDefault(); | ||
} | ||
} | ||
}); | ||
}()); | ||
// Rating | ||
@@ -15,0 +44,0 @@ (function() { |
{ | ||
"name": "@spectrum-css/actionbutton", | ||
"version": "1.1.9", | ||
"version": "1.1.10", | ||
"description": "The Spectrum CSS action button component", | ||
@@ -23,4 +23,4 @@ "license": "Apache-2.0", | ||
"@spectrum-css/component-builder": "^3.1.1", | ||
"@spectrum-css/icon": "^3.0.18", | ||
"@spectrum-css/vars": "^7.1.1", | ||
"@spectrum-css/icon": "^3.0.19", | ||
"@spectrum-css/vars": "^7.2.0", | ||
"gulp": "^4.0.0" | ||
@@ -32,3 +32,3 @@ }, | ||
"homepage": "https://opensource.adobe.com/spectrum-css/", | ||
"gitHead": "f9b4a1e6756e15af49b0057df6ced92a89463733" | ||
"gitHead": "d40a93f418ce13bd5c71da1fcf26152868988879" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3333045
44
7094