Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Adds new package for accessible tab navigation called react-tabs and a custom libdef for that package #1556

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -65,6 +65,7 @@
"react-dom": "^16.2.0",
"react-redux": "^5.0.6",
"react-splitter-layout": "^3.0.0",
"react-tabs": "^2.3.0",
"react-transition-group": "^2.2.1",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
Expand Down
48 changes: 48 additions & 0 deletions src/types/libdef/npm-custom/react-tabs_v2.3.x.js
@@ -0,0 +1,48 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
// @flow

declare type $$reacttab$$Props = {
+className?: string | Array<string> | { [string]: boolean },
+defaultFocus?: boolean,
+defaultIndex?: number,
+disabledTabClassName?: string,
+domRef?: mixed,
+forceRenderTabPanel?: boolean,
+onSelect?: (index: number, lastIndex: number, event: Event) => ?boolean,
+selectedIndex?: number,
+selectedTabClassName?: string,
+selectedTabPanelClassName?: string,
+children?: React$Node,
};

declare type $$reacttabs$$Props = {
+className?: string | Array<string> | { [string]: boolean },
+disabled?: boolean,
+disabledClassName?: string,
+selectedClassName?: string,
+tabIndex?: string,
+children?: React$Node,
};

declare type $$reacttablist$$Props = {
+className?: string | Array<string> | { [string]: boolean },
+children?: React$Node,
};

declare type $$reacttabpanel$$Props = {
+className?: string | Array<string> | { [string]: boolean },
+forceRender?: boolean,
+selectedClassName?: string,
+children?: React$Node,
};

declare module 'react-tabs' {
declare export class Tab extends React$Component<$$reacttab$$Props> {}
declare export class Tabs extends React$Component<$$reacttabs$$Props> {}
declare export class TabList extends React$Component<$$reacttablist$$Props> {}
declare export class TabPanel extends React$Component<
$$reacttabpanel$$Props
> {}
}
27 changes: 20 additions & 7 deletions yarn.lock
Expand Up @@ -2202,6 +2202,11 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

classnames@^2.2.0:
version "2.2.6"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==

classnames@^2.2.5:
version "2.2.5"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d"
Expand Down Expand Up @@ -7975,18 +7980,18 @@ prompts@^0.1.9:
kleur "^2.0.1"
sisteransi "^0.1.1"

prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
prop-types@^15.5.0, prop-types@^15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.3.1"
object-assign "^4.1.1"

prop-types@^15.6.2:
version "15.6.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
prop-types@^15.5.10, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0:
version "15.6.0"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856"
dependencies:
fbjs "^0.8.16"
loose-envify "^1.3.1"
object-assign "^4.1.1"

Expand Down Expand Up @@ -8260,6 +8265,14 @@ react-splitter-layout@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/react-splitter-layout/-/react-splitter-layout-3.0.0.tgz#a0cba494ffb4e0af56b3a80679e865fc4a6dc71b"

react-tabs@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/react-tabs/-/react-tabs-2.3.0.tgz#0c37e786f288d369824acd06a96bd1818ab8b0dc"
integrity sha512-pYaefgVy76/36AMEP+B8YuVVzDHa3C5UFZ3REU78zolk0qMxEhKvUFofvDCXyLZwf0RZjxIfiwok1BEb18nHyA==
dependencies:
classnames "^2.2.0"
prop-types "^15.5.0"

react-test-renderer@^16.0.0-0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/react-test-renderer/-/react-test-renderer-16.2.0.tgz#bddf259a6b8fcd8555f012afc8eacc238872a211"
Expand Down