@clayui/tabs 3.56.0 → 3.67.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/Content.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: BSD-3-Clause
4
4
  */
5
5
  import React from 'react';
6
- interface IProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ export interface IProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  /**
8
8
  * Receives a number that indicates the `tabkey` to be rendered.
9
9
  */
@@ -17,5 +17,5 @@ interface IProps extends React.HTMLAttributes<HTMLDivElement> {
17
17
  */
18
18
  fade?: boolean;
19
19
  }
20
- declare const Content: React.FunctionComponent<IProps>;
20
+ declare const Content: ({ activeIndex, children, className, fade, ...otherProps }: IProps) => JSX.Element;
21
21
  export default Content;
package/lib/Item.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: BSD-3-Clause
4
4
  */
5
5
  import React from 'react';
6
- interface IProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> {
6
+ export interface IProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> {
7
7
  /**
8
8
  * Flag to indicate if the component is active or not.
9
9
  */
package/lib/TabPane.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * SPDX-License-Identifier: BSD-3-Clause
4
4
  */
5
5
  import React from 'react';
6
- interface ITabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
6
+ export interface ITabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
7
7
  /**
8
8
  * Flag to indicate if `active` classname should be applied
9
9
  */
@@ -13,5 +13,5 @@ interface ITabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
13
13
  */
14
14
  fade?: boolean;
15
15
  }
16
- declare const TabPane: React.FunctionComponent<ITabPaneProps>;
16
+ declare const TabPane: ({ active, children, className, fade, ...otherProps }: ITabPaneProps) => JSX.Element;
17
17
  export default TabPane;
package/lib/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import Content from './Content';
7
7
  import Item from './Item';
8
8
  import TabPane from './TabPane';
9
9
  export declare type DisplayType = null | 'basic' | 'underline';
10
- interface IProps extends React.HTMLAttributes<HTMLUListElement> {
10
+ export interface IProps extends React.HTMLAttributes<HTMLUListElement> {
11
11
  /**
12
12
  * Determines how tab is displayed.
13
13
  */
@@ -21,10 +21,16 @@ interface IProps extends React.HTMLAttributes<HTMLUListElement> {
21
21
  */
22
22
  modern?: boolean;
23
23
  }
24
- declare const ClayTabs: React.FunctionComponent<IProps> & {
24
+ declare function ClayTabs(props: IProps): JSX.Element & {
25
25
  Content: typeof Content;
26
26
  TabPane: typeof TabPane;
27
27
  TabPanel: typeof TabPane;
28
28
  Item: typeof Item;
29
29
  };
30
+ declare namespace ClayTabs {
31
+ var Content: ({ activeIndex, children, className, fade, ...otherProps }: import("./Content").IProps) => JSX.Element;
32
+ var TabPane: ({ active, children, className, fade, ...otherProps }: import("./TabPane").ITabPaneProps) => JSX.Element;
33
+ var TabPanel: ({ active, children, className, fade, ...otherProps }: import("./TabPane").ITabPaneProps) => JSX.Element;
34
+ var Item: React.ForwardRefExoticComponent<import("./Item").IProps & React.RefAttributes<any>>;
35
+ }
30
36
  export default ClayTabs;
package/lib/index.js CHANGED
@@ -25,7 +25,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
25
25
 
26
26
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
27
27
 
28
- var ClayTabs = function ClayTabs(_ref) {
28
+ function ClayTabs(_ref) {
29
29
  var children = _ref.children,
30
30
  className = _ref.className,
31
31
  displayType = _ref.displayType,
@@ -46,7 +46,7 @@ var ClayTabs = function ClayTabs(_ref) {
46
46
  }, className),
47
47
  role: "tablist"
48
48
  }, otherProps), children);
49
- };
49
+ }
50
50
 
51
51
  ClayTabs.Content = _Content.default;
52
52
  ClayTabs.TabPane = _TabPane.default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/tabs",
3
- "version": "3.56.0",
3
+ "version": "3.67.0",
4
4
  "description": "ClayTabs component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -26,7 +26,7 @@
26
26
  "react"
27
27
  ],
28
28
  "dependencies": {
29
- "@clayui/shared": "^3.56.0",
29
+ "@clayui/shared": "^3.67.0",
30
30
  "classnames": "^2.2.6"
31
31
  },
32
32
  "peerDependencies": {
@@ -37,5 +37,5 @@
37
37
  "browserslist": [
38
38
  "extends browserslist-config-clay"
39
39
  ],
40
- "gitHead": "1c33d9c709d8ce071862f0087c76ac23ce11465b"
40
+ "gitHead": "71e84490088d72afb0240a7ef69cde23a6d5dd19"
41
41
  }
package/src/Content.tsx CHANGED
@@ -6,7 +6,7 @@
6
6
  import classNames from 'classnames';
7
7
  import React from 'react';
8
8
 
9
- interface IProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ export interface IProps extends React.HTMLAttributes<HTMLDivElement> {
10
10
  /**
11
11
  * Receives a number that indicates the `tabkey` to be rendered.
12
12
  */
@@ -23,7 +23,7 @@ interface IProps extends React.HTMLAttributes<HTMLDivElement> {
23
23
  fade?: boolean;
24
24
  }
25
25
 
26
- const Content: React.FunctionComponent<IProps> = ({
26
+ const Content = ({
27
27
  activeIndex = 0,
28
28
  children,
29
29
  className,
package/src/Item.tsx CHANGED
@@ -7,7 +7,8 @@ import {LinkOrButton} from '@clayui/shared';
7
7
  import classNames from 'classnames';
8
8
  import React from 'react';
9
9
 
10
- interface IProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> {
10
+ export interface IProps
11
+ extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> {
11
12
  /**
12
13
  * Flag to indicate if the component is active or not.
13
14
  */
package/src/TabPane.tsx CHANGED
@@ -6,7 +6,7 @@
6
6
  import classNames from 'classnames';
7
7
  import React from 'react';
8
8
 
9
- interface ITabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
9
+ export interface ITabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
10
10
  /**
11
11
  * Flag to indicate if `active` classname should be applied
12
12
  */
@@ -23,7 +23,7 @@ const delay = (fn: Function, val: number = 150) =>
23
23
  fn();
24
24
  }, val);
25
25
 
26
- const TabPane: React.FunctionComponent<ITabPaneProps> = ({
26
+ const TabPane = ({
27
27
  active = false,
28
28
  children,
29
29
  className,
package/src/index.tsx CHANGED
@@ -12,7 +12,7 @@ import TabPane from './TabPane';
12
12
 
13
13
  export type DisplayType = null | 'basic' | 'underline';
14
14
 
15
- interface IProps extends React.HTMLAttributes<HTMLUListElement> {
15
+ export interface IProps extends React.HTMLAttributes<HTMLUListElement> {
16
16
  /**
17
17
  * Determines how tab is displayed.
18
18
  */
@@ -29,19 +29,21 @@ interface IProps extends React.HTMLAttributes<HTMLUListElement> {
29
29
  modern?: boolean;
30
30
  }
31
31
 
32
- const ClayTabs: React.FunctionComponent<IProps> & {
32
+ function ClayTabs(props: IProps): JSX.Element & {
33
33
  Content: typeof Content;
34
34
  TabPane: typeof TabPane;
35
35
  TabPanel: typeof TabPane;
36
36
  Item: typeof Item;
37
- } = ({
37
+ };
38
+
39
+ function ClayTabs({
38
40
  children,
39
41
  className,
40
42
  displayType,
41
43
  justified,
42
44
  modern = true,
43
45
  ...otherProps
44
- }: IProps) => {
46
+ }: IProps) {
45
47
  return (
46
48
  <ul
47
49
  className={classNames(
@@ -65,7 +67,7 @@ const ClayTabs: React.FunctionComponent<IProps> & {
65
67
  {children}
66
68
  </ul>
67
69
  );
68
- };
70
+ }
69
71
 
70
72
  ClayTabs.Content = Content;
71
73
  ClayTabs.TabPane = TabPane;