Socket
Socket
Sign inDemoInstall

@fluentui/react-tabster

Package Overview
Dependencies
Maintainers
12
Versions
863
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-tabster - npm Package Compare versions

Comparing version 9.0.0-alpha.18 to 9.0.0-alpha.19

lib-amd/hooks/useTabster.d.ts

31

CHANGELOG.json

@@ -5,3 +5,32 @@ {

{
"date": "Thu, 22 Apr 2021 07:31:20 GMT",
"date": "Fri, 23 Apr 2021 07:30:56 GMT",
"tag": "@fluentui/react-tabster_v9.0.0-alpha.19",
"version": "9.0.0-alpha.19",
"comments": {
"prerelease": [
{
"comment": "Add useTabster hook and remove TabsterProvider",
"author": "lingfan.gao@microsoft.com",
"commit": "e9ef2a1d7e2d57a5b52642dd35243cb6a8600237",
"package": "@fluentui/react-tabster"
}
],
"patch": [
{
"comment": "Bump @fluentui/eslint-plugin to v1.1.1",
"author": "olfedias@microsoft.com",
"commit": "7d1a9a8aee217022e55b8c39c723b1390b5d8095",
"package": "@fluentui/react-tabster"
},
{
"comment": "Bump @fluentui/scripts to v1.0.0",
"author": "olfedias@microsoft.com",
"commit": "7d1a9a8aee217022e55b8c39c723b1390b5d8095",
"package": "@fluentui/react-tabster"
}
]
}
},
{
"date": "Thu, 22 Apr 2021 07:33:28 GMT",
"tag": "@fluentui/react-tabster_v9.0.0-alpha.18",

@@ -8,0 +37,0 @@ "version": "9.0.0-alpha.18",

# Change Log - @fluentui/react-tabster
This log was last generated on Thu, 22 Apr 2021 07:31:20 GMT and should not be manually modified.
This log was last generated on Fri, 23 Apr 2021 07:30:56 GMT and should not be manually modified.
<!-- Start content -->
## [9.0.0-alpha.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.0.0-alpha.19)
Fri, 23 Apr 2021 07:30:56 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-alpha.18..@fluentui/react-tabster_v9.0.0-alpha.19)
### Patches
- Bump @fluentui/eslint-plugin to v1.1.1 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
- Bump @fluentui/scripts to v1.0.0 ([PR #17894](https://github.com/microsoft/fluentui/pull/17894) by olfedias@microsoft.com)
### Changes
- Add useTabster hook and remove TabsterProvider ([PR #17885](https://github.com/microsoft/fluentui/pull/17885) by lingfan.gao@microsoft.com)
## [9.0.0-alpha.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabster_v9.0.0-alpha.18)
Thu, 22 Apr 2021 07:31:20 GMT
Thu, 22 Apr 2021 07:33:28 GMT
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabster_v9.0.0-alpha.17..@fluentui/react-tabster_v9.0.0-alpha.18)

@@ -11,0 +25,0 @@

42

dist/react-tabster.d.ts

@@ -1,31 +0,4 @@

import { getTabsterAttribute } from 'tabster';
import * as React from 'react';
import { Types } from 'tabster';
export { getTabsterAttribute }
export declare const renderTabsterProvider: (state: TabsterProviderState) => JSX.Element;
declare type TabsterContextValue = Types.TabsterCore;
/**
* A React provider that manages and exposes a tabster instance for focus management
*/
export declare const TabsterProvider: React.FunctionComponent<TabsterProviderProps>;
export declare interface TabsterProviderProps extends React.HTMLAttributes<HTMLElement> {
dir?: 'rtl' | 'ltr';
targetDocument: Document | undefined;
/**
* The root is automatically set as the `body` element of the ownerDocument.
* This prop needs to be set if a custom root is used
*/
customRoot?: boolean;
}
export declare interface TabsterProviderState extends TabsterProviderProps {
dir: 'ltr' | 'rtl';
contextValue: TabsterContextValue | undefined;
}
/**
* A hook that returns the necessary tabster attributes to support arrow key navigation

@@ -57,4 +30,17 @@ * @param options - Options to configure keyboard navigation

export declare const useTabsterProvider: (props: TabsterProviderProps, ref: React.Ref<HTMLElement>) => TabsterProviderState;
/**
* Hook that returns tabster attributes while ensuring tabster exists
* @param args - same arguments as `getTabsterAttribute`
*/
export declare const useTabsterAttributes: (props: Partial<{
deloser: import("tabster/dist/Types").DeloserBasicProps;
root: import("tabster/dist/Types").RootBasicProps;
modalizer: import("tabster/dist/Types").ModalizerBasicProps;
focusable: import("tabster/dist/Types").FocusableProps;
groupper: import("tabster/dist/Types").GroupperBasicProps;
uberGroupper: true;
observed: import("tabster/dist/Types").ObservedElementBasicProps;
outline: import("tabster/dist/Types").OutlinedElementProps;
}> | null, plain?: false | undefined) => import("tabster/dist/Types").TabsterDOMAttribute;
export { }

@@ -7,34 +7,5 @@ ## API Report File for "@fluentui/react-tabster"

import { getTabsterAttribute } from 'tabster';
import * as React from 'react';
import { Types } from 'tabster';
export { getTabsterAttribute }
// @public (undocumented)
export const renderTabsterProvider: (state: TabsterProviderState) => JSX.Element;
// @public
export const TabsterProvider: React.FunctionComponent<TabsterProviderProps>;
// @public (undocumented)
export interface TabsterProviderProps extends React.HTMLAttributes<HTMLElement> {
customRoot?: boolean;
// (undocumented)
dir?: 'rtl' | 'ltr';
// (undocumented)
targetDocument: Document | undefined;
}
// @public (undocumented)
export interface TabsterProviderState extends TabsterProviderProps {
// Warning: (ae-forgotten-export) The symbol "TabsterContextValue" needs to be exported by the entry point index.d.ts
//
// (undocumented)
contextValue: TabsterContextValue | undefined;
// (undocumented)
dir: 'ltr' | 'rtl';
}
// @public
export const useArrowNavigationGroup: (options?: UseArrowNavigationGroupOptions | undefined) => Types.TabsterDOMAttribute;

@@ -55,4 +26,13 @@

// @public (undocumented)
export const useTabsterProvider: (props: TabsterProviderProps, ref: React.Ref<HTMLElement>) => TabsterProviderState;
// @public
export const useTabsterAttributes: (props: Partial<{
deloser: import("tabster/dist/Types").DeloserBasicProps;
root: import("tabster/dist/Types").RootBasicProps;
modalizer: import("tabster/dist/Types").ModalizerBasicProps;
focusable: import("tabster/dist/Types").FocusableProps;
groupper: import("tabster/dist/Types").GroupperBasicProps;
uberGroupper: true;
observed: import("tabster/dist/Types").ObservedElementBasicProps;
outline: import("tabster/dist/Types").OutlinedElementProps;
}> | null, plain?: false | undefined) => import("tabster/dist/Types").TabsterDOMAttribute;

@@ -59,0 +39,0 @@

export * from './useArrowNavigationGroup';
export * from './useFocusFinders';
export * from './useTabsterAttributes';

@@ -1,2 +0,2 @@

define(["require", "exports", "tslib", "./useArrowNavigationGroup", "./useFocusFinders"], function (require, exports, tslib_1, useArrowNavigationGroup_1, useFocusFinders_1) {
define(["require", "exports", "tslib", "./useArrowNavigationGroup", "./useFocusFinders", "./useTabsterAttributes"], function (require, exports, tslib_1, useArrowNavigationGroup_1, useFocusFinders_1, useTabsterAttributes_1) {
"use strict";

@@ -6,3 +6,4 @@ Object.defineProperty(exports, "__esModule", { value: true });

tslib_1.__exportStar(useFocusFinders_1, exports);
tslib_1.__exportStar(useTabsterAttributes_1, exports);
});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

define(["require", "exports", "tabster"], function (require, exports, tabster_1) {
define(["require", "exports", "tabster", "./useTabsterAttributes"], function (require, exports, tabster_1, useTabsterAttributes_1) {
"use strict";

@@ -10,3 +10,3 @@ Object.defineProperty(exports, "__esModule", { value: true });

var _a, _b, _c;
return tabster_1.getTabsterAttribute({
return useTabsterAttributes_1.useTabsterAttributes({
focusable: {

@@ -13,0 +13,0 @@ mover: {

@@ -1,2 +0,2 @@

define(["require", "exports", "../TabsterContext"], function (require, exports, TabsterContext_1) {
define(["require", "exports", "./useTabster"], function (require, exports, useTabster_1) {
"use strict";

@@ -8,7 +8,7 @@ Object.defineProperty(exports, "__esModule", { value: true });

exports.useFocusFinders = function () {
var ctx = TabsterContext_1.useTabsterContext();
var tabster = useTabster_1.useTabster();
// Narrow props for now and let need dictate additional props in the future
var findAllFocusable = function (root, matcher) { var _a; return ((_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findAll(root, matcher)) || []; };
var findFirstFocusable = function (root) { var _a; return (_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findFirst(root); };
var findLastFocusable = function (root) { var _a; return (_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findLast(root); };
var findAllFocusable = function (root, matcher) { var _a; return ((_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findAll(root, matcher)) || []; };
var findFirstFocusable = function (root) { var _a; return (_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findFirst(root); };
var findLastFocusable = function (root) { var _a; return (_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findLast(root); };
return {

@@ -15,0 +15,0 @@ findAllFocusable: findAllFocusable,

@@ -1,3 +0,1 @@

export { getTabsterAttribute } from 'tabster';
export * from './TabsterProvider';
export * from './hooks/index';

@@ -1,8 +0,6 @@

define(["require", "exports", "tslib", "tabster", "./TabsterProvider", "./hooks/index"], function (require, exports, tslib_1, tabster_1, TabsterProvider_1, index_1) {
define(["require", "exports", "tslib", "./hooks/index"], function (require, exports, tslib_1, index_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTabsterAttribute = tabster_1.getTabsterAttribute;
tslib_1.__exportStar(TabsterProvider_1, exports);
tslib_1.__exportStar(index_1, exports);
});
//# sourceMappingURL=index.js.map
export * from './useArrowNavigationGroup';
export * from './useFocusFinders';
export * from './useTabsterAttributes';

@@ -6,2 +6,3 @@ "use strict";

tslib_1.__exportStar(require("./useFocusFinders"), exports);
tslib_1.__exportStar(require("./useTabsterAttributes"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tabster_1 = require("tabster");
var useTabsterAttributes_1 = require("./useTabsterAttributes");
/**

@@ -10,3 +11,3 @@ * A hook that returns the necessary tabster attributes to support arrow key navigation

var _a, _b, _c;
return tabster_1.getTabsterAttribute({
return useTabsterAttributes_1.useTabsterAttributes({
focusable: {

@@ -13,0 +14,0 @@ mover: {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var TabsterContext_1 = require("../TabsterContext");
var useTabster_1 = require("./useTabster");
/**

@@ -8,7 +8,7 @@ * Returns a set of helper functions that will traverse focusable elements in the context of a root DOM element

exports.useFocusFinders = function () {
var ctx = TabsterContext_1.useTabsterContext();
var tabster = useTabster_1.useTabster();
// Narrow props for now and let need dictate additional props in the future
var findAllFocusable = function (root, matcher) { var _a; return ((_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findAll(root, matcher)) || []; };
var findFirstFocusable = function (root) { var _a; return (_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findFirst(root); };
var findLastFocusable = function (root) { var _a; return (_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findLast(root); };
var findAllFocusable = function (root, matcher) { var _a; return ((_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findAll(root, matcher)) || []; };
var findFirstFocusable = function (root) { var _a; return (_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findFirst(root); };
var findLastFocusable = function (root) { var _a; return (_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findLast(root); };
return {

@@ -15,0 +15,0 @@ findAllFocusable: findAllFocusable,

@@ -1,3 +0,1 @@

export { getTabsterAttribute } from 'tabster';
export * from './TabsterProvider';
export * from './hooks/index';
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var tabster_1 = require("tabster");
exports.getTabsterAttribute = tabster_1.getTabsterAttribute;
tslib_1.__exportStar(require("./TabsterProvider"), exports);
tslib_1.__exportStar(require("./hooks/index"), exports);
//# sourceMappingURL=index.js.map
export * from './useArrowNavigationGroup';
export * from './useFocusFinders';
export * from './useTabsterAttributes';
export * from './useArrowNavigationGroup';
export * from './useFocusFinders';
export * from './useTabsterAttributes';
//# sourceMappingURL=index.js.map

@@ -1,2 +0,3 @@

import { getTabsterAttribute, Types } from 'tabster';
import { Types } from 'tabster';
import { useTabsterAttributes } from './useTabsterAttributes';
/**

@@ -8,3 +9,3 @@ * A hook that returns the necessary tabster attributes to support arrow key navigation

var _a, _b, _c;
return getTabsterAttribute({
return useTabsterAttributes({
focusable: {

@@ -11,0 +12,0 @@ mover: {

@@ -1,2 +0,2 @@

import { useTabsterContext } from '../TabsterContext';
import { useTabster } from './useTabster';
/**

@@ -6,7 +6,7 @@ * Returns a set of helper functions that will traverse focusable elements in the context of a root DOM element

export var useFocusFinders = function () {
var ctx = useTabsterContext();
var tabster = useTabster();
// Narrow props for now and let need dictate additional props in the future
var findAllFocusable = function (root, matcher) { var _a; return ((_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findAll(root, matcher)) || []; };
var findFirstFocusable = function (root) { var _a; return (_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findFirst(root); };
var findLastFocusable = function (root) { var _a; return (_a = ctx) === null || _a === void 0 ? void 0 : _a.focusable.findLast(root); };
var findAllFocusable = function (root, matcher) { var _a; return ((_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findAll(root, matcher)) || []; };
var findFirstFocusable = function (root) { var _a; return (_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findFirst(root); };
var findLastFocusable = function (root) { var _a; return (_a = tabster) === null || _a === void 0 ? void 0 : _a.focusable.findLast(root); };
return {

@@ -13,0 +13,0 @@ findAllFocusable: findAllFocusable,

@@ -1,3 +0,1 @@

export { getTabsterAttribute } from 'tabster';
export * from './TabsterProvider';
export * from './hooks/index';

@@ -1,4 +0,2 @@

export { getTabsterAttribute } from 'tabster';
export * from './TabsterProvider';
export * from './hooks/index';
//# sourceMappingURL=index.js.map
{
"name": "@fluentui/react-tabster",
"version": "9.0.0-alpha.18",
"version": "9.0.0-alpha.19",
"description": "Utilities for focus management and facade for tabster",

@@ -25,3 +25,3 @@ "main": "lib-commonjs/index.js",

"devDependencies": {
"@fluentui/eslint-plugin": "^1.1.0",
"@fluentui/eslint-plugin": "^1.1.1",
"@fluentui/scripts": "^1.0.0",

@@ -36,3 +36,4 @@ "@types/react": "16.9.42",

"dependencies": {
"@fluentui/react-utilities": "^9.0.0-alpha.18",
"@fluentui/react-shared-contexts": "^9.0.0-alpha.7",
"@fluentui/react-utilities": "^9.0.0-alpha.19",
"tabster": "^0.5.6",

@@ -39,0 +40,0 @@ "tslib": "^1.10.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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc