@devtron-labs/devtron-fe-common-lib 0.0.51 → 0.0.52-beta-2
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/Constants.d.ts +5 -0
- package/dist/Common/CustomInput/CustomInput.d.ts +1 -1
- package/dist/Common/CustomInput/Types.d.ts +1 -0
- package/dist/Common/DraggableWrapper/DraggableButton.d.ts +3 -0
- package/dist/Common/DraggableWrapper/DraggableWrapper.d.ts +9 -0
- package/dist/Common/DraggableWrapper/index.d.ts +3 -0
- package/dist/Common/DraggableWrapper/types.d.ts +23 -0
- package/dist/Common/EmptyState/GenericEmptyState.d.ts +1 -1
- package/dist/Common/Grid/Grid.d.ts +1 -1
- package/dist/Common/Grid/types.d.ts +2 -2
- package/dist/Common/Hooks/UseWindowSize/UseWindowSize.d.ts +4 -0
- package/dist/Common/Hooks/index.d.ts +1 -0
- package/dist/Common/Types.d.ts +1 -0
- package/dist/Common/index.d.ts +1 -0
- package/dist/index.js +286 -140
- package/package.json +3 -2
- package/src/Assets/Icon/ic-drag.svg +8 -0
- package/src/Common/Constants.ts +7 -1
- package/src/Common/CustomInput/CustomInput.tsx +3 -2
- package/src/Common/CustomInput/Types.ts +1 -0
- package/src/Common/DraggableWrapper/DraggableButton.tsx +14 -0
- package/src/Common/DraggableWrapper/DraggableWrapper.tsx +116 -0
- package/src/Common/DraggableWrapper/index.ts +3 -0
- package/src/Common/DraggableWrapper/types.ts +27 -0
- package/src/Common/EmptyState/GenericEmptyState.tsx +45 -13
- package/src/Common/Grid/Grid.tsx +7 -2
- package/src/Common/Grid/types.ts +3 -1
- package/src/Common/Hooks/UseWindowSize/UseWindowSize.tsx +31 -0
- package/src/Common/Hooks/index.ts +1 -0
- package/src/Common/Types.ts +1 -0
- package/src/Common/index.ts +1 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CustomInputProps } from './Types';
|
|
3
|
-
export declare function CustomInput({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, helperText, handleOnBlur, readOnly, noTrim, ref, onKeyPress, defaultValue, onKeyDown, required, additionalErrorInfo }: CustomInputProps): JSX.Element;
|
|
3
|
+
export declare function CustomInput({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, helperText, handleOnBlur, readOnly, noTrim, ref, onKeyPress, defaultValue, onKeyDown, required, additionalErrorInfo, inputWrapClassName, }: CustomInputProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DraggableWrapperProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* TODO: import it as lazy, after it is supported in common
|
|
5
|
+
* 1. If using react select please use menuPlacement='auto'
|
|
6
|
+
* 2. dragSelector will be used to identify the grabbable button that will grab the div to drag
|
|
7
|
+
* 3. parentRef is the reference point from which we will derive the base top:0 ,left: 0 position
|
|
8
|
+
*/
|
|
9
|
+
export default function DraggableWrapper({ children, zIndex, positionVariant, dragSelector, parentRef, boundaryGap, childDivProps, }: DraggableWrapperProps): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
2
|
+
export declare enum DraggablePositionVariant {
|
|
3
|
+
PARENT_BOTTOM_CENTER = "PARENT_BOTTOM_CENTER",
|
|
4
|
+
SCREEN_BOTTOM_CENTER = "SCREEN_BOTTOM_CENTER"
|
|
5
|
+
}
|
|
6
|
+
export interface DraggableWrapperProps {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
zIndex?: number;
|
|
9
|
+
positionVariant?: DraggablePositionVariant;
|
|
10
|
+
/**
|
|
11
|
+
* dragSelector (class - (append with .), id, etc) will be used to identify the grabbable button that will grab the div to drag
|
|
12
|
+
*/
|
|
13
|
+
dragSelector: string;
|
|
14
|
+
parentRef?: RefObject<HTMLDivElement>;
|
|
15
|
+
boundaryGap?: number;
|
|
16
|
+
childDivProps?: HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* dragClassName is the class that we feed to Draggable to identify dragging buttons
|
|
20
|
+
*/
|
|
21
|
+
export interface DraggableButtonProps {
|
|
22
|
+
dragClassName: string;
|
|
23
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GenericEmptyStateType } from '../Types';
|
|
3
3
|
import './emptyState.scss';
|
|
4
|
-
declare function GenericEmptyState({ title, image, subTitle, isButtonAvailable, classname, styles, heightToDeduct, imageType, renderButton, imageClassName, children, SvgImage, noImage, layout, contentClassName }: GenericEmptyStateType): JSX.Element;
|
|
4
|
+
declare function GenericEmptyState({ title, image, subTitle, isButtonAvailable, classname, styles, heightToDeduct, imageType, renderButton, imageClassName, children, SvgImage, noImage, layout, contentClassName, imageStyles, }: GenericEmptyStateType): JSX.Element;
|
|
5
5
|
export default GenericEmptyState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GridProps } from './types';
|
|
3
|
-
export default function Grid({ container, spacing, item, xs, containerClass, itemClass, children, }: GridProps): JSX.Element;
|
|
3
|
+
export default function Grid({ container, spacing, item, xs, containerClass, itemClass, children, ...containerDivProps }: GridProps): JSX.Element;
|
package/dist/Common/Types.d.ts
CHANGED
package/dist/Common/index.d.ts
CHANGED