@devtron-labs/devtron-fe-common-lib 0.2.17-beta-2 → 0.2.17-beta-5
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/SearchBar/SearchBar.component.d.ts +1 -1
- package/dist/Common/SearchBar/types.d.ts +0 -4
- package/dist/Shared/Components/TabGroup/TabGroup.component.d.ts +3 -0
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +112 -0
- package/dist/Shared/Components/TabGroup/index.d.ts +2 -0
- package/dist/Shared/Components/index.d.ts +1 -0
- package/dist/Shared/types.d.ts +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-c3a60875.js → cssMode-43a51520.js} +1 -1
- package/dist/{freemarker2-1f7e4f77.js → freemarker2-e075c82d.js} +1 -1
- package/dist/{handlebars-b6424662.js → handlebars-d14eb593.js} +1 -1
- package/dist/{html-53d5fcc4.js → html-42e474df.js} +1 -1
- package/dist/{htmlMode-4d5346f2.js → htmlMode-a82d6a1f.js} +1 -1
- package/dist/{index-b3ba5507.js → index-67ec1385.js} +6156 -6048
- package/dist/index.js +230 -229
- package/dist/{javascript-353879b1.js → javascript-7cf8c89b.js} +1 -1
- package/dist/{jsonMode-5eb6ee90.js → jsonMode-03e7c495.js} +1 -1
- package/dist/{liquid-66b9430e.js → liquid-2480a11d.js} +1 -1
- package/dist/{mdx-050a4a92.js → mdx-e094ef16.js} +1 -1
- package/dist/{python-5a1a6a42.js → python-eeaaf393.js} +1 -1
- package/dist/{razor-767c8eca.js → razor-0f7c8127.js} +1 -1
- package/dist/{tsMode-4c19c3bc.js → tsMode-66353c79.js} +1 -1
- package/dist/{typescript-a1d5013f.js → typescript-6f0e35e5.js} +1 -1
- package/dist/{xml-7d481ed6.js → xml-360a72e5.js} +1 -1
- package/dist/{yaml-688a68d5.js → yaml-14e7b1a4.js} +1 -1
- package/package.json +1 -1
|
@@ -34,5 +34,5 @@ import { SearchBarProps } from './types';
|
|
|
34
34
|
* <SearchBar inputProps={{ placeholder: 'Enter search text' }} />
|
|
35
35
|
* ```
|
|
36
36
|
*/
|
|
37
|
-
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, size,
|
|
37
|
+
declare const SearchBar: ({ initialSearchText, handleSearchChange, handleEnter, inputProps, containerClassName, shouldDebounce, debounceTimeout, dataTestId, noBackgroundAndBorder, size, }: SearchBarProps) => JSX.Element;
|
|
38
38
|
export default SearchBar;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { LinkProps, NavLinkProps } from 'react-router-dom';
|
|
2
|
+
import { ComponentSizeType } from '../../constants';
|
|
3
|
+
import { DataAttributes } from '../../types';
|
|
4
|
+
|
|
5
|
+
type TabComponentProps<TabTypeProps> = TabTypeProps & DataAttributes;
|
|
6
|
+
type ConditionalTabType = {
|
|
7
|
+
/**
|
|
8
|
+
* Type of the tab, either `button`, `link` or `navLink`.
|
|
9
|
+
*/
|
|
10
|
+
tabType: 'button';
|
|
11
|
+
/**
|
|
12
|
+
* Props passed to button component.
|
|
13
|
+
*/
|
|
14
|
+
props?: TabComponentProps<Omit<React.ComponentProps<'button'>, 'className' | 'style'>>;
|
|
15
|
+
/**
|
|
16
|
+
* Indicates if the tab is currently active.
|
|
17
|
+
*/
|
|
18
|
+
active?: boolean;
|
|
19
|
+
} | {
|
|
20
|
+
/**
|
|
21
|
+
* Type of the tab, either `button`, `link` or `navLink`.
|
|
22
|
+
*/
|
|
23
|
+
tabType: 'navLink';
|
|
24
|
+
/**
|
|
25
|
+
* Props passed to nav link component.
|
|
26
|
+
*/
|
|
27
|
+
props: TabComponentProps<Omit<NavLinkProps, 'className' | 'style' | 'activeClassName'>>;
|
|
28
|
+
/**
|
|
29
|
+
* Active state is determined by matching the URL.
|
|
30
|
+
*/
|
|
31
|
+
active?: false;
|
|
32
|
+
} | {
|
|
33
|
+
/**
|
|
34
|
+
* Type of the tab, either `button`, `link` or `navLink`.
|
|
35
|
+
*/
|
|
36
|
+
tabType: 'link';
|
|
37
|
+
/**
|
|
38
|
+
* Props passed to link component.
|
|
39
|
+
*/
|
|
40
|
+
props: TabComponentProps<Omit<LinkProps, 'className' | 'style'>>;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates if the tab is currently active.
|
|
43
|
+
*/
|
|
44
|
+
active?: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type TabProps = {
|
|
47
|
+
/**
|
|
48
|
+
* Unique identifier for the tab.
|
|
49
|
+
*/
|
|
50
|
+
id: string | number;
|
|
51
|
+
/**
|
|
52
|
+
* Text label for the tab.
|
|
53
|
+
*/
|
|
54
|
+
label: string;
|
|
55
|
+
/**
|
|
56
|
+
* Icon component to be displayed in the tab.
|
|
57
|
+
* This should be a functional component that renders an SVG.
|
|
58
|
+
*/
|
|
59
|
+
icon?: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
|
|
60
|
+
/**
|
|
61
|
+
* Type of the icon, determining whether it uses a stroke or fill style.
|
|
62
|
+
*/
|
|
63
|
+
iconType?: 'stroke' | 'fill';
|
|
64
|
+
/**
|
|
65
|
+
* Badge number to be displayed on the tab, typically for notifications.
|
|
66
|
+
*/
|
|
67
|
+
badge?: number;
|
|
68
|
+
/**
|
|
69
|
+
* Indicates if an indicator should be shown on the tab.
|
|
70
|
+
*/
|
|
71
|
+
showIndicator?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Indicates if a warning state should be displayed on the tab.
|
|
74
|
+
* @note error state will take precedence over warning state.
|
|
75
|
+
*/
|
|
76
|
+
showWarning?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Indicates if an error state should be displayed on the tab.
|
|
79
|
+
* @note error state will take precedence over warning state.
|
|
80
|
+
*/
|
|
81
|
+
showError?: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Disables the tab, preventing interaction and indicating an inactive state.
|
|
84
|
+
*/
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
} & ConditionalTabType;
|
|
87
|
+
export interface TabGroupProps {
|
|
88
|
+
/**
|
|
89
|
+
* Array of tabs to be rendered.
|
|
90
|
+
*/
|
|
91
|
+
tabs: TabProps[];
|
|
92
|
+
/**
|
|
93
|
+
* Size of the tabs.
|
|
94
|
+
* @default ComponentSizeType.large
|
|
95
|
+
*/
|
|
96
|
+
size?: ComponentSizeType.large | ComponentSizeType.medium;
|
|
97
|
+
/**
|
|
98
|
+
* Optional component to be rendered on the right side of the tab list.
|
|
99
|
+
*/
|
|
100
|
+
rightComponent?: React.ReactElement;
|
|
101
|
+
/**
|
|
102
|
+
* Set to `true` to align the active tab's border with the bottom border of the parent container.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
alignActiveBorderWithContainer?: boolean;
|
|
106
|
+
/**
|
|
107
|
+
* Determines if the top padding of the tab group should be hidden.
|
|
108
|
+
* @default false
|
|
109
|
+
*/
|
|
110
|
+
hideTopPadding?: boolean;
|
|
111
|
+
}
|
|
112
|
+
export {};
|