@fluentui/react-utilities
Advanced tools
Comparing version 9.0.0-alpha.43 to 9.0.0-alpha.44
@@ -5,3 +5,18 @@ { | ||
{ | ||
"date": "Wed, 01 Sep 2021 07:37:53 GMT", | ||
"date": "Mon, 06 Sep 2021 07:32:10 GMT", | ||
"tag": "@fluentui/react-utilities_v9.0.0-alpha.44", | ||
"version": "9.0.0-alpha.44", | ||
"comments": { | ||
"prerelease": [ | ||
{ | ||
"comment": "feat(react-utilities): use `event.key` for keyboard events", | ||
"author": "lingfangao@hotmail.com", | ||
"commit": "cd22a603bb20947e7d23a3357b9a535afdb5ee1d", | ||
"package": "@fluentui/react-utilities" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 01 Sep 2021 07:39:56 GMT", | ||
"tag": "@fluentui/react-utilities_v9.0.0-alpha.43", | ||
@@ -8,0 +23,0 @@ "version": "9.0.0-alpha.43", |
# Change Log - @fluentui/react-utilities | ||
This log was last generated on Wed, 01 Sep 2021 07:37:53 GMT and should not be manually modified. | ||
This log was last generated on Mon, 06 Sep 2021 07:32:10 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [9.0.0-alpha.44](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.44) | ||
Mon, 06 Sep 2021 07:32:10 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.43..@fluentui/react-utilities_v9.0.0-alpha.44) | ||
### Changes | ||
- feat(react-utilities): use `event.key` for keyboard events ([PR #19640](https://github.com/microsoft/fluentui/pull/19640) by lingfangao@hotmail.com) | ||
## [9.0.0-alpha.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-utilities_v9.0.0-alpha.43) | ||
Wed, 01 Sep 2021 07:37:53 GMT | ||
Wed, 01 Sep 2021 07:39:56 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-utilities_v9.0.0-alpha.42..@fluentui/react-utilities_v9.0.0-alpha.43) | ||
@@ -11,0 +20,0 @@ |
@@ -1,2 +0,2 @@ | ||
define(["require", "exports", "@fluentui/keyboard-key"], function (require, exports, keyboard_key_1) { | ||
define(["require", "exports", "@fluentui/keyboard-keys"], function (require, exports, keyboard_keys_1) { | ||
"use strict"; | ||
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
function shouldPreventDefaultOnKeyDown(e) { | ||
var code = keyboard_key_1.getCode(e); | ||
var key = e.key; | ||
var target = e.target; | ||
var matchesByKey = code === keyboard_key_1.SpacebarKey || code === keyboard_key_1.EnterKey; | ||
var matchesByKey = key === keyboard_keys_1.Space || key === keyboard_keys_1.Enter; | ||
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') { | ||
return code === keyboard_key_1.SpacebarKey; | ||
return key === keyboard_keys_1.Space; | ||
} | ||
@@ -18,0 +18,0 @@ var ignoredByTag = (target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT' || (target === null || target === void 0 ? void 0 : target.tagName) === 'TEXTAREA' || (target === null || target === void 0 ? void 0 : target.isContentEditable) === true; |
@@ -8,3 +8,3 @@ "use strict"; | ||
var keyboard_key_1 = /*#__PURE__*/require("@fluentui/keyboard-key"); | ||
var keyboard_keys_1 = /*#__PURE__*/require("@fluentui/keyboard-keys"); | ||
/** | ||
@@ -18,8 +18,8 @@ * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys | ||
function shouldPreventDefaultOnKeyDown(e) { | ||
var code = keyboard_key_1.getCode(e); | ||
var key = e.key; | ||
var target = e.target; | ||
var matchesByKey = code === keyboard_key_1.SpacebarKey || code === keyboard_key_1.EnterKey; | ||
var matchesByKey = key === keyboard_keys_1.Space || key === keyboard_keys_1.Enter; | ||
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') { | ||
return code === keyboard_key_1.SpacebarKey; | ||
return key === keyboard_keys_1.Space; | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -1,2 +0,2 @@ | ||
import { getCode, SpacebarKey, EnterKey } from '@fluentui/keyboard-key'; | ||
import { Space, Enter } from '@fluentui/keyboard-keys'; | ||
/** | ||
@@ -9,8 +9,8 @@ * Checks if the keyboard event should preventDefault() for Enter and Spacebar keys | ||
export function shouldPreventDefaultOnKeyDown(e) { | ||
var code = getCode(e); | ||
var key = e.key; | ||
var target = e.target; | ||
var matchesByKey = code === SpacebarKey || code === EnterKey; | ||
var matchesByKey = key === Space || key === Enter; | ||
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'A') { | ||
return code === SpacebarKey; | ||
return key === Space; | ||
} | ||
@@ -17,0 +17,0 @@ |
{ | ||
"name": "@fluentui/react-utilities", | ||
"version": "9.0.0-alpha.43", | ||
"version": "9.0.0-alpha.44", | ||
"description": "A set of general React-specific utilities.", | ||
@@ -40,3 +40,3 @@ "main": "lib-commonjs/index.js", | ||
"dependencies": { | ||
"@fluentui/keyboard-key": "^0.3.4", | ||
"@fluentui/keyboard-keys": "^9.0.0-alpha.3", | ||
"tslib": "^2.1.0" | ||
@@ -43,0 +43,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
639743
7736
44
+ Added@fluentui/keyboard-keys@9.0.7(transitive)
+ Added@swc/helpers@0.5.12(transitive)
- Removed@fluentui/keyboard-key@^0.3.4
- Removed@fluentui/keyboard-key@0.3.5(transitive)