@devtron-labs/devtron-fe-common-lib 1.5.8-beta-2 → 1.5.8-beta-4
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/{@code-editor-D4gh0SB7.js → @code-editor-BiOPx_Lm.js} +5656 -5608
- package/dist/{@common-rjsf-eTOLTqJt.js → @common-rjsf-B5j3ZOil.js} +2 -2
- package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +4 -0
- package/dist/Common/Dialogs/DeleteDialog.d.ts +4 -0
- package/dist/Common/ResizableTextarea.d.ts +3 -0
- package/dist/Common/Types.d.ts +13 -0
- package/dist/Common/index.d.ts +1 -0
- package/dist/Shared/Components/Button/constants.d.ts +1 -0
- package/dist/Shared/Components/ConfirmationModal/CannotDeleteModal.d.ts +2 -0
- package/dist/Shared/Components/ConfirmationModal/DeleteConfirmationModal.d.ts +3 -0
- package/dist/Shared/Components/ConfirmationModal/ForceDeleteConfirmationModal.d.ts +2 -0
- package/dist/Shared/Components/ConfirmationModal/index.d.ts +3 -0
- package/dist/Shared/Components/ConfirmationModal/types.d.ts +29 -0
- package/dist/Shared/Components/ConfirmationModal/utils.d.ts +2 -1
- package/dist/Shared/Components/EditableTextArea/types.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
- package/dist/Shared/Components/SelectPicker/type.d.ts +13 -2
- package/dist/Shared/Components/ThemeSwitcher/index.d.ts +0 -1
- package/dist/Shared/Components/index.d.ts +0 -2
- package/dist/Shared/constants.d.ts +0 -3
- package/dist/assets/@code-editor.css +1 -1
- package/dist/assets/{ic-warning.a842ba2a.svg → ic-warning.10bcf8bd.svg} +1 -1
- package/dist/index.js +543 -544
- package/package.json +1 -1
- package/dist/Shared/Components/FormFieldWrapper/FormFieldInfo.d.ts +0 -3
- package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +0 -3
- package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +0 -3
- package/dist/Shared/Components/FormFieldWrapper/index.d.ts +0 -3
- package/dist/Shared/Components/FormFieldWrapper/types.d.ts +0 -75
- package/dist/Shared/Components/FormFieldWrapper/utils.d.ts +0 -18
- package/dist/Shared/Components/Textarea/Textarea.component.d.ts +0 -3
- package/dist/Shared/Components/Textarea/constants.d.ts +0 -4
- package/dist/Shared/Components/Textarea/index.d.ts +0 -2
- package/dist/Shared/Components/Textarea/types.d.ts +0 -17
package/package.json
CHANGED
@@ -1,75 +0,0 @@
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
2
|
-
export type LabelOrAriaLabelType = {
|
3
|
-
label: ReactNode;
|
4
|
-
ariaLabel?: never;
|
5
|
-
} | {
|
6
|
-
label?: never;
|
7
|
-
ariaLabel: string;
|
8
|
-
};
|
9
|
-
export type FormFieldLabelProps = LabelOrAriaLabelType & {
|
10
|
-
/**
|
11
|
-
* If true, the field is required and * is shown with the label
|
12
|
-
*/
|
13
|
-
required?: boolean;
|
14
|
-
/**
|
15
|
-
* Id of the input element
|
16
|
-
*/
|
17
|
-
inputId: string;
|
18
|
-
/**
|
19
|
-
* Layout of the field
|
20
|
-
*/
|
21
|
-
layout?: 'row' | 'column';
|
22
|
-
};
|
23
|
-
export interface FormFieldInfoProps extends Pick<FormFieldLabelProps, 'inputId'> {
|
24
|
-
/**
|
25
|
-
* Error message for the field
|
26
|
-
*/
|
27
|
-
error?: ReactNode;
|
28
|
-
/**
|
29
|
-
* Helper text for the field
|
30
|
-
*/
|
31
|
-
helperText?: ReactNode;
|
32
|
-
/**
|
33
|
-
* Warning message for the field
|
34
|
-
*/
|
35
|
-
warningText?: ReactNode;
|
36
|
-
}
|
37
|
-
export interface FormInfoItemProps {
|
38
|
-
id: FormFieldLabelProps['inputId'];
|
39
|
-
text: FormFieldInfoProps['error'];
|
40
|
-
textClass: string;
|
41
|
-
icon: ReactElement;
|
42
|
-
}
|
43
|
-
export interface FormFieldWrapperProps extends Pick<FormFieldLabelProps, 'label' | 'required' | 'ariaLabel' | 'layout'>, FormFieldInfoProps {
|
44
|
-
/**
|
45
|
-
* If true, the field takes the full width of the parent
|
46
|
-
*/
|
47
|
-
fullWidth?: boolean;
|
48
|
-
children: ReactElement;
|
49
|
-
borderRadiusConfig?: {
|
50
|
-
/**
|
51
|
-
* If false, the top border radius is not applied
|
52
|
-
*
|
53
|
-
* @default true
|
54
|
-
*/
|
55
|
-
top?: boolean;
|
56
|
-
/**
|
57
|
-
* If false, the right border radius is not applied
|
58
|
-
*
|
59
|
-
* @default true
|
60
|
-
*/
|
61
|
-
right?: boolean;
|
62
|
-
/**
|
63
|
-
* If false, the bottom border radius is not applied
|
64
|
-
*
|
65
|
-
* @default true
|
66
|
-
*/
|
67
|
-
bottom?: boolean;
|
68
|
-
/**
|
69
|
-
* If false, the left border radius is not applied
|
70
|
-
*
|
71
|
-
* @default true
|
72
|
-
*/
|
73
|
-
left?: boolean;
|
74
|
-
};
|
75
|
-
}
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { FormFieldInfoProps, FormFieldLabelProps, FormFieldWrapperProps } from './types';
|
2
|
-
export declare const getFormErrorElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
|
3
|
-
export declare const getFormLabelElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
|
4
|
-
export declare const getFormHelperTextElementId: (inputId: FormFieldLabelProps["inputId"]) => string;
|
5
|
-
export declare const getFormFieldAriaAttributes: ({ inputId, label, ariaLabel, required, error, helperText, }: Required<Pick<FormFieldLabelProps, "label" | "ariaLabel" | "required" | "inputId"> & Pick<FormFieldInfoProps, "error" | "helperText">>) => {
|
6
|
-
'aria-labelledby': string;
|
7
|
-
'aria-errormessage'?: string;
|
8
|
-
'aria-invalid'?: boolean;
|
9
|
-
'aria-describedby'?: string;
|
10
|
-
'aria-required': boolean;
|
11
|
-
} | {
|
12
|
-
'aria-label': string;
|
13
|
-
'aria-errormessage'?: string;
|
14
|
-
'aria-invalid'?: boolean;
|
15
|
-
'aria-describedby'?: string;
|
16
|
-
'aria-required': boolean;
|
17
|
-
};
|
18
|
-
export declare const getFormFieldBorderClassName: (borderRadiusConfig?: FormFieldWrapperProps["borderRadiusConfig"]) => string;
|
@@ -1,17 +0,0 @@
|
|
1
|
-
import { TextareaHTMLAttributes } from 'react';
|
2
|
-
import { ComponentSizeType } from '../../constants';
|
3
|
-
import { FormFieldWrapperProps } from '../FormFieldWrapper';
|
4
|
-
export interface TextareaProps extends Omit<FormFieldWrapperProps, 'children' | 'inputId'>, Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onBlur' | 'disabled' | 'autoFocus' | 'onFocus'>, Required<Pick<TextareaHTMLAttributes<HTMLTextAreaElement>, 'placeholder' | 'onChange' | 'value' | 'name'>> {
|
5
|
-
/**
|
6
|
-
* If false, the input is not trimmed on blur
|
7
|
-
*
|
8
|
-
* @default true
|
9
|
-
*/
|
10
|
-
shouldTrim?: boolean;
|
11
|
-
/**
|
12
|
-
* Size of the textarea
|
13
|
-
*
|
14
|
-
* @default ComponentSizeType.large
|
15
|
-
*/
|
16
|
-
size?: Extract<ComponentSizeType, ComponentSizeType.medium | ComponentSizeType.large>;
|
17
|
-
}
|