@devtron-labs/devtron-fe-common-lib 0.3.6 → 0.3.7
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/dist/Common/Drawer/Drawer.d.ts +1 -1
- package/dist/Shared/Components/TabGroup/TabGroup.helpers.d.ts +7 -0
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +24 -9
- package/dist/Shared/Components/TabGroup/TabGroup.utils.d.ts +2 -2
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-J3JDChT2.js → cssMode-DHrChzLI.js} +1 -1
- package/dist/{freemarker2-Dtusk9e3.js → freemarker2-Ctq5Dnmx.js} +1 -1
- package/dist/{handlebars-D8pkowq2.js → handlebars-BVS4lLNS.js} +1 -1
- package/dist/{html-x3avb0CM.js → html-PTkun63X.js} +1 -1
- package/dist/{htmlMode-CLS66t_u.js → htmlMode-FPlB0uVj.js} +1 -1
- package/dist/{index-oPBCZYbb.js → index-CJxEE85N.js} +3349 -3292
- package/dist/index.js +1 -1
- package/dist/{javascript-ftMnqw_O.js → javascript-CgZ-eJ-v.js} +1 -1
- package/dist/{jsonMode-CXcupX1c.js → jsonMode-DBr9Yx0h.js} +1 -1
- package/dist/{liquid-CIkh7QAQ.js → liquid-D3A5MQwP.js} +1 -1
- package/dist/{mdx-BnDg1g8Y.js → mdx-B3XOS1gR.js} +1 -1
- package/dist/{python-Bm0f2fYo.js → python-D2yb3YGi.js} +1 -1
- package/dist/{razor-DCUpFwGp.js → razor-CSq74LWU.js} +1 -1
- package/dist/{tsMode-7d4Dwa-2.js → tsMode-LIV1wEld.js} +1 -1
- package/dist/{typescript-CcwmuWSe.js → typescript-DZqgszhg.js} +1 -1
- package/dist/{xml-BmaGE9Ro.js → xml-YxEeoAGH.js} +1 -1
- package/dist/{yaml-nuLunV1x.js → yaml-BhRwG7-t.js} +1 -1
- package/package.json +1 -1
|
@@ -10,5 +10,5 @@ interface drawerInterface {
|
|
|
10
10
|
parentClassName?: string;
|
|
11
11
|
onEscape?: (e?: any) => void;
|
|
12
12
|
}
|
|
13
|
-
export declare const Drawer: ({ children, position, height, width, minWidth, maxWidth, parentClassName, onEscape, }: drawerInterface) => JSX.Element;
|
|
13
|
+
export declare const Drawer: ({ children, position, height, width, minWidth, maxWidth, parentClassName, onEscape, onClose, }: drawerInterface) => JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TabProps } from './TabGroup.types';
|
|
2
|
+
export declare const getTabIcon: ({ icon: Icon, showError, showWarning, className, }: Pick<TabProps, "showError" | "showWarning" | "icon"> & {
|
|
3
|
+
className: string;
|
|
4
|
+
}) => JSX.Element;
|
|
5
|
+
export declare const getTabBadge: (badge: TabProps["badge"], className: string) => JSX.Element;
|
|
6
|
+
export declare const getTabIndicator: (showIndicator: TabProps["showIndicator"]) => JSX.Element;
|
|
7
|
+
export declare const getTabDescription: (description: TabProps["description"]) => JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { DataAttributes } from '../../types';
|
|
|
4
4
|
type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
|
|
5
5
|
type ConditionalTabType = {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Type of the tab, either `button`, `link`, `navLink` or `block`.
|
|
8
8
|
*/
|
|
9
9
|
tabType: 'button';
|
|
10
10
|
/**
|
|
@@ -17,7 +17,7 @@ type ConditionalTabType = {
|
|
|
17
17
|
active?: boolean;
|
|
18
18
|
} | {
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Type of the tab, either `button`, `link`, `navLink` or `block`.
|
|
21
21
|
*/
|
|
22
22
|
tabType: 'navLink';
|
|
23
23
|
/**
|
|
@@ -27,10 +27,10 @@ type ConditionalTabType = {
|
|
|
27
27
|
/**
|
|
28
28
|
* Active state is determined by matching the URL.
|
|
29
29
|
*/
|
|
30
|
-
active?: false;
|
|
30
|
+
active?: never | false;
|
|
31
31
|
} | {
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Type of the tab, either `button`, `link`, `navLink` or `block`.
|
|
34
34
|
*/
|
|
35
35
|
tabType: 'link';
|
|
36
36
|
/**
|
|
@@ -41,6 +41,20 @@ type ConditionalTabType = {
|
|
|
41
41
|
* Indicates if the tab is currently active.
|
|
42
42
|
*/
|
|
43
43
|
active?: boolean;
|
|
44
|
+
} | {
|
|
45
|
+
/**
|
|
46
|
+
* Type of the tab, either `button`, `link`, `navLink` or `block`.
|
|
47
|
+
* @note When `tabType` is set to `block`, the tab becomes non-interactive. It won't be active and will not have hover states.
|
|
48
|
+
*/
|
|
49
|
+
tabType: 'block';
|
|
50
|
+
/**
|
|
51
|
+
* Props passed to div component.
|
|
52
|
+
*/
|
|
53
|
+
props?: TabComponentProps<Omit<React.ComponentProps<'div'>, 'className' | 'style'>>;
|
|
54
|
+
/**
|
|
55
|
+
* Indicates if the tab is currently active.
|
|
56
|
+
*/
|
|
57
|
+
active?: never | false;
|
|
44
58
|
};
|
|
45
59
|
export type TabProps = {
|
|
46
60
|
/**
|
|
@@ -51,15 +65,16 @@ export type TabProps = {
|
|
|
51
65
|
* Text label for the tab.
|
|
52
66
|
*/
|
|
53
67
|
label: string;
|
|
68
|
+
/**
|
|
69
|
+
* Description for the tab.
|
|
70
|
+
* @note - If passed as a `string[]`, it will be rendered with a bullet in-between strings.
|
|
71
|
+
*/
|
|
72
|
+
description?: string | string[];
|
|
54
73
|
/**
|
|
55
74
|
* Icon component to be displayed in the tab.
|
|
56
75
|
* This should be a functional component that renders an SVG.
|
|
57
76
|
*/
|
|
58
77
|
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
59
|
-
/**
|
|
60
|
-
* Type of the icon, determining whether it uses a stroke or fill style.
|
|
61
|
-
*/
|
|
62
|
-
iconType?: 'stroke' | 'fill';
|
|
63
78
|
/**
|
|
64
79
|
* Badge number to be displayed on the tab, typically for notifications.
|
|
65
80
|
*/
|
|
@@ -92,7 +107,7 @@ export interface TabGroupProps {
|
|
|
92
107
|
* Size of the tabs.
|
|
93
108
|
* @default ComponentSizeType.large
|
|
94
109
|
*/
|
|
95
|
-
size?: ComponentSizeType.large | ComponentSizeType.medium;
|
|
110
|
+
size?: ComponentSizeType.large | ComponentSizeType.medium | ComponentSizeType.xl;
|
|
96
111
|
/**
|
|
97
112
|
* Optional component to be rendered on the right side of the tab list.
|
|
98
113
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TabGroupProps
|
|
1
|
+
import { TabGroupProps } from './TabGroup.types';
|
|
2
2
|
export declare const getClassNameBySizeMap: ({ hideTopPadding, alignActiveBorderWithContainer, }: Pick<TabGroupProps, "hideTopPadding" | "alignActiveBorderWithContainer">) => Record<TabGroupProps["size"], {
|
|
3
3
|
tabClassName: string;
|
|
4
4
|
iconClassName: string;
|
|
5
5
|
badgeClassName: string;
|
|
6
6
|
}>;
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const tabGroupClassMap: Record<TabGroupProps['size'], string>;
|