@devtron-labs/devtron-fe-common-lib 0.2.32 → 0.3.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/dist/Shared/Components/Button/Button.component.d.ts +1 -6
- package/dist/Shared/Components/Button/constants.d.ts +0 -3
- package/dist/Shared/Components/Button/types.d.ts +12 -29
- package/dist/Shared/Components/Button/utils.d.ts +1 -3
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-M4DwGcPH.js → cssMode-gAMETjhs.js} +1 -1
- package/dist/{freemarker2-CLFaMa5E.js → freemarker2-1LUPRZvK.js} +1 -1
- package/dist/{handlebars-B4l-4sY9.js → handlebars-FFlW7wcF.js} +1 -1
- package/dist/{html-Bi2VBaVP.js → html-Bje_q8_h.js} +1 -1
- package/dist/{htmlMode-DAht50Y5.js → htmlMode--Ajs2w0s.js} +1 -1
- package/dist/{index-NQuyL_Mo.js → index-H6WWnur7.js} +2327 -2368
- package/dist/index.js +1 -1
- package/dist/{javascript-Ccg1Aseq.js → javascript-DWqTbQ2W.js} +1 -1
- package/dist/{jsonMode-DKWJoNVp.js → jsonMode-hm7gyx36.js} +1 -1
- package/dist/{liquid-B41HoeXE.js → liquid-BgJmUwJB.js} +1 -1
- package/dist/{mdx-BUFzRr2f.js → mdx-B8aQgpZ8.js} +1 -1
- package/dist/{python-awFItZgn.js → python-1rHBUaWD.js} +1 -1
- package/dist/{razor-DOPL8r44.js → razor-DKD66wkm.js} +1 -1
- package/dist/{tsMode-n3eok1R7.js → tsMode-CzgxhWLn.js} +1 -1
- package/dist/{typescript-DVgXOzFY.js → typescript-Bup97xWo.js} +1 -1
- package/dist/{xml-D3KcHZhU.js → xml-Lw75qqS-.js} +1 -1
- package/dist/{yaml-D-0j7PYX.js → yaml-DXNYWuXp.js} +1 -1
- package/package.json +1 -1
|
@@ -57,11 +57,6 @@ import { ButtonProps } from './types';
|
|
|
57
57
|
* ```tsx
|
|
58
58
|
* <Button component={ButtonComponentType.link} linkProps={{ to: '#' }} />
|
|
59
59
|
* ```
|
|
60
|
-
*
|
|
61
|
-
* @example Icon button
|
|
62
|
-
* ```tsx
|
|
63
|
-
* <Button icon={<ICCube />} ariaLabel="Label" />
|
|
64
|
-
* ```
|
|
65
60
|
*/
|
|
66
|
-
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps,
|
|
61
|
+
declare const Button: ({ dataTestId, text, variant, size, style, startIcon, endIcon, disabled, isLoading, showTooltip, tooltipProps, ...props }: ButtonProps) => JSX.Element;
|
|
67
62
|
export default Button;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { ProgressingProps } from '../../../Common/Types';
|
|
2
2
|
import { ButtonProps } from './types';
|
|
3
3
|
export declare const BUTTON_SIZE_TO_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
|
|
4
|
-
export declare const ICON_BUTTON_SIZE_TO_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
|
|
5
4
|
export declare const BUTTON_SIZE_TO_ICON_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
|
|
6
|
-
export declare const ICON_BUTTON_SIZE_TO_ICON_CLASS_NAME_MAP: Record<ButtonProps['size'], string>;
|
|
7
5
|
export declare const BUTTON_SIZE_TO_LOADER_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
|
|
8
|
-
export declare const ICON_BUTTON_SIZE_TO_LOADER_SIZE_MAP: Record<ButtonProps['size'], ProgressingProps['size']>;
|
|
@@ -11,7 +11,6 @@ export declare enum ButtonVariantType {
|
|
|
11
11
|
export declare enum ButtonStyleType {
|
|
12
12
|
default = "default",
|
|
13
13
|
negative = "negative",
|
|
14
|
-
negativeGrey = "negative-grey",
|
|
15
14
|
positive = "positive",
|
|
16
15
|
warning = "warning",
|
|
17
16
|
neutral = "neutral"
|
|
@@ -60,6 +59,18 @@ export type ButtonProps = ({
|
|
|
60
59
|
* @default ButtonStyleType.default
|
|
61
60
|
*/
|
|
62
61
|
style?: ButtonStyleType;
|
|
62
|
+
/**
|
|
63
|
+
* Text to be displayed in the button
|
|
64
|
+
*/
|
|
65
|
+
text: string;
|
|
66
|
+
/**
|
|
67
|
+
* If provided, icon to be displayed at the start of the button
|
|
68
|
+
*/
|
|
69
|
+
startIcon?: ReactElement;
|
|
70
|
+
/**
|
|
71
|
+
* If provided, icon to be displayed at the end of the button
|
|
72
|
+
*/
|
|
73
|
+
endIcon?: ReactElement;
|
|
63
74
|
/**
|
|
64
75
|
* If true, the loading state is shown for the button with disabled
|
|
65
76
|
*/
|
|
@@ -86,32 +97,4 @@ export type ButtonProps = ({
|
|
|
86
97
|
} | {
|
|
87
98
|
showTooltip?: never;
|
|
88
99
|
tooltipProps?: never;
|
|
89
|
-
}) & ({
|
|
90
|
-
icon?: never;
|
|
91
|
-
ariaLabel?: never;
|
|
92
|
-
/**
|
|
93
|
-
* Text to be displayed in the button
|
|
94
|
-
*/
|
|
95
|
-
text: string;
|
|
96
|
-
/**
|
|
97
|
-
* If provided, icon to be displayed at the start of the button
|
|
98
|
-
*/
|
|
99
|
-
startIcon?: ReactElement;
|
|
100
|
-
/**
|
|
101
|
-
* If provided, icon to be displayed at the end of the button
|
|
102
|
-
*/
|
|
103
|
-
endIcon?: ReactElement;
|
|
104
|
-
} | {
|
|
105
|
-
/**
|
|
106
|
-
* If provided, icon button is rendered
|
|
107
|
-
*/
|
|
108
|
-
icon: ReactElement;
|
|
109
|
-
/**
|
|
110
|
-
* Label for the icon button for accessibility.
|
|
111
|
-
* Shown on hover in tooltip if tippy is not provided explicitly
|
|
112
|
-
*/
|
|
113
|
-
ariaLabel: string;
|
|
114
|
-
text?: never;
|
|
115
|
-
startIcon?: never;
|
|
116
|
-
endIcon?: never;
|
|
117
100
|
});
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { ButtonProps } from './types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const getButtonLoaderSize: ({ size, icon }: Pick<ButtonProps, "size" | "icon">) => number;
|
|
4
|
-
export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, icon, }: Pick<ButtonProps, "variant" | "size" | "style" | "isLoading" | "icon">) => string;
|
|
2
|
+
export declare const getButtonDerivedClass: ({ size, variant, style, isLoading, }: Pick<ButtonProps, "variant" | "size" | "style" | "isLoading">) => string;
|