@clayui/tabs 3.141.2-alpha.0 → 3.143.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.
@@ -0,0 +1,30 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
5
+ import React from 'react';
6
+ export interface IProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ /**
8
+ * @ignore
9
+ */
10
+ active?: React.Key;
11
+ /**
12
+ * Receives a number that indicates the `tabkey` to be rendered.
13
+ * @deprecated since v3.78.2 - No longer needed in new composition.
14
+ */
15
+ activeIndex?: number;
16
+ /**
17
+ * Children elements received from ClayTabs.Content component.
18
+ */
19
+ children: React.ReactNode;
20
+ /**
21
+ * Flag to indicate if `fade` classname that applies an fading animation should be applied.
22
+ */
23
+ fade?: boolean;
24
+ /**
25
+ * @ignore
26
+ */
27
+ tabsId?: string;
28
+ }
29
+ declare const Content: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
30
+ export default Content;
package/lib/Item.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
5
+ import React from 'react';
6
+ export interface IProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'onClick'> {
7
+ /**
8
+ * Flag to indicate if the component is active or not.
9
+ *
10
+ * OBS: The `active` API in the new pattern has uncontrolled behavior,
11
+ * working just like `defaultActive` as in the prop declared in the
12
+ * root component.
13
+ */
14
+ active?: boolean;
15
+ /**
16
+ * Flag to indicate if the TabPane is disabled.
17
+ */
18
+ disabled?: boolean;
19
+ /**
20
+ * This value is used to be the target of the link.
21
+ */
22
+ href?: string;
23
+ /**
24
+ * Props to be added to the item element that can be an anchor or a button.
25
+ */
26
+ innerProps?: React.HTMLAttributes<HTMLAnchorElement | HTMLButtonElement>;
27
+ /**
28
+ * Callback to be used when clicking to a Tab Item.
29
+ */
30
+ onClick?: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
31
+ }
32
+ declare const Item: React.ForwardRefExoticComponent<IProps & React.RefAttributes<any>>;
33
+ export default Item;
package/lib/List.d.ts ADDED
@@ -0,0 +1,49 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2022 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
5
+ import { InternalDispatch } from '@clayui/shared';
6
+ import React from 'react';
7
+ export interface IProps extends React.HTMLAttributes<HTMLUListElement> {
8
+ /**
9
+ * @ignore
10
+ */
11
+ activation?: 'manual' | 'automatic';
12
+ /**
13
+ * @ignore
14
+ */
15
+ active?: React.Key;
16
+ /**
17
+ * The tabs content.
18
+ */
19
+ children: React.ReactNode;
20
+ /**
21
+ * The custom class.
22
+ */
23
+ className?: string;
24
+ /**
25
+ * @ignore
26
+ */
27
+ displayType?: null | 'basic' | 'light' | 'underline';
28
+ /**
29
+ * @ignore
30
+ */
31
+ justified?: boolean;
32
+ /**
33
+ * @ignore
34
+ */
35
+ modern?: boolean;
36
+ /**
37
+ * @ignore
38
+ */
39
+ onActiveChange?: InternalDispatch<number>;
40
+ /**
41
+ * @ignore
42
+ */
43
+ shouldUseActive?: boolean;
44
+ /**
45
+ * @ignore
46
+ */
47
+ tabsId?: string;
48
+ }
49
+ export declare const List: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLUListElement>>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
5
+ import React from 'react';
6
+ export interface ITabPaneProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ /**
8
+ * Flag to indicate if `active` classname should be applied
9
+ */
10
+ active?: boolean;
11
+ /**
12
+ * Flag to indicate if `fade` classname that applies a fading animation should be applied.
13
+ */
14
+ fade?: boolean;
15
+ }
16
+ declare const TabPane: React.ForwardRefExoticComponent<ITabPaneProps & React.RefAttributes<HTMLDivElement>>;
17
+ export default TabPane;
package/lib/index.d.ts ADDED
@@ -0,0 +1,58 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
5
+ import { InternalDispatch } from '@clayui/shared';
6
+ import React from 'react';
7
+ export declare type DisplayType = null | 'basic' | 'underline';
8
+ export interface IProps extends React.HTMLAttributes<HTMLUListElement> {
9
+ /**
10
+ * Flag to indicate the navigation behavior in the tab.
11
+ *
12
+ * - manual - it will just move the focus and tab activation is done just
13
+ * by pressing space or enter.
14
+ * - automatic - moves the focus to the tab and activates the tab.
15
+ */
16
+ activation?: 'manual' | 'automatic';
17
+ /**
18
+ * The current tab active (controlled).
19
+ */
20
+ active?: number;
21
+ /**
22
+ * Initial active tab when rendering component (uncontrolled).
23
+ */
24
+ defaultActive?: number;
25
+ /**
26
+ * Determines how tab is displayed.
27
+ * @deprecated since v3.89.0 with no replacement.
28
+ */
29
+ displayType?: null | 'basic' | 'underline';
30
+ /**
31
+ * Flag to indicate if `fade` classname that applies an fading animation
32
+ * should be applied.
33
+ */
34
+ fade?: boolean;
35
+ /**
36
+ * Justify the nav items according the tab content.
37
+ */
38
+ justified?: boolean;
39
+ /**
40
+ * Applies a modern style to the tab.
41
+ * @deprecated since v3.89.0 with no replacement.
42
+ */
43
+ modern?: boolean;
44
+ /**
45
+ * Callback is called when the active tab changes (controlled).
46
+ */
47
+ onActiveChange?: InternalDispatch<number>;
48
+ }
49
+ declare function Tabs({ activation, active: externalActive, children, className, defaultActive, displayType, fade, justified, modern, onActiveChange, ...otherProps }: IProps): JSX.Element;
50
+ declare namespace Tabs {
51
+ var Content: React.ForwardRefExoticComponent<import("./Content").IProps & React.RefAttributes<HTMLDivElement>>;
52
+ var Panels: React.ForwardRefExoticComponent<import("./Content").IProps & React.RefAttributes<HTMLDivElement>>;
53
+ var Item: React.ForwardRefExoticComponent<import("./Item").IProps & React.RefAttributes<any>>;
54
+ var List: React.ForwardRefExoticComponent<import("./List").IProps & React.RefAttributes<HTMLUListElement>>;
55
+ var TabPane: React.ForwardRefExoticComponent<import("./TabPane").ITabPaneProps & React.RefAttributes<HTMLDivElement>>;
56
+ var TabPanel: React.ForwardRefExoticComponent<import("./TabPane").ITabPaneProps & React.RefAttributes<HTMLDivElement>>;
57
+ }
58
+ export default Tabs;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/tabs",
3
- "version": "3.141.2-alpha.0",
3
+ "version": "3.143.0",
4
4
  "description": "ClayTabs component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -28,16 +28,16 @@
28
28
  "react"
29
29
  ],
30
30
  "dependencies": {
31
- "@clayui/shared": "^3.141.2-alpha.0",
31
+ "@clayui/shared": "^3.143.0",
32
32
  "classnames": "^2.2.6"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@clayui/css": "3.x",
36
- "react": "^16.12.0",
37
- "react-dom": "^16.12.0"
36
+ "react": "^18.2.0",
37
+ "react-dom": "^18.2.0"
38
38
  },
39
39
  "browserslist": [
40
40
  "extends browserslist-config-clay"
41
41
  ],
42
- "gitHead": "aea6ecdaee62ccc374009982f934e1b193785668"
42
+ "gitHead": "aacf20646cc7fb25c4d60e865ec77d2d503d23e9"
43
43
  }