@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.
Files changed (34) hide show
  1. package/dist/{@code-editor-D4gh0SB7.js → @code-editor-BiOPx_Lm.js} +5656 -5608
  2. package/dist/{@common-rjsf-eTOLTqJt.js → @common-rjsf-B5j3ZOil.js} +2 -2
  3. package/dist/Common/DeleteComponentModal/DeleteComponent.d.ts +4 -0
  4. package/dist/Common/Dialogs/DeleteDialog.d.ts +4 -0
  5. package/dist/Common/ResizableTextarea.d.ts +3 -0
  6. package/dist/Common/Types.d.ts +13 -0
  7. package/dist/Common/index.d.ts +1 -0
  8. package/dist/Shared/Components/Button/constants.d.ts +1 -0
  9. package/dist/Shared/Components/ConfirmationModal/CannotDeleteModal.d.ts +2 -0
  10. package/dist/Shared/Components/ConfirmationModal/DeleteConfirmationModal.d.ts +3 -0
  11. package/dist/Shared/Components/ConfirmationModal/ForceDeleteConfirmationModal.d.ts +2 -0
  12. package/dist/Shared/Components/ConfirmationModal/index.d.ts +3 -0
  13. package/dist/Shared/Components/ConfirmationModal/types.d.ts +29 -0
  14. package/dist/Shared/Components/ConfirmationModal/utils.d.ts +2 -1
  15. package/dist/Shared/Components/EditableTextArea/types.d.ts +1 -0
  16. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  17. package/dist/Shared/Components/SelectPicker/type.d.ts +13 -2
  18. package/dist/Shared/Components/ThemeSwitcher/index.d.ts +0 -1
  19. package/dist/Shared/Components/index.d.ts +0 -2
  20. package/dist/Shared/constants.d.ts +0 -3
  21. package/dist/assets/@code-editor.css +1 -1
  22. package/dist/assets/{ic-warning.a842ba2a.svg → ic-warning.10bcf8bd.svg} +1 -1
  23. package/dist/index.js +543 -544
  24. package/package.json +1 -1
  25. package/dist/Shared/Components/FormFieldWrapper/FormFieldInfo.d.ts +0 -3
  26. package/dist/Shared/Components/FormFieldWrapper/FormFieldLabel.d.ts +0 -3
  27. package/dist/Shared/Components/FormFieldWrapper/FormFieldWrapper.d.ts +0 -3
  28. package/dist/Shared/Components/FormFieldWrapper/index.d.ts +0 -3
  29. package/dist/Shared/Components/FormFieldWrapper/types.d.ts +0 -75
  30. package/dist/Shared/Components/FormFieldWrapper/utils.d.ts +0 -18
  31. package/dist/Shared/Components/Textarea/Textarea.component.d.ts +0 -3
  32. package/dist/Shared/Components/Textarea/constants.d.ts +0 -4
  33. package/dist/Shared/Components/Textarea/index.d.ts +0 -2
  34. package/dist/Shared/Components/Textarea/types.d.ts +0 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "1.5.8-beta-2",
3
+ "version": "1.5.8-beta-4",
4
4
  "description": "Supporting common component library",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,3 +0,0 @@
1
- import { FormFieldInfoProps } from './types';
2
- declare const FormFieldInfo: ({ error, helperText, warningText, inputId }: FormFieldInfoProps) => JSX.Element;
3
- export default FormFieldInfo;
@@ -1,3 +0,0 @@
1
- import { FormFieldLabelProps } from './types';
2
- declare const FormFieldLabel: ({ label, inputId, required, layout }: FormFieldLabelProps) => JSX.Element;
3
- export default FormFieldLabel;
@@ -1,3 +0,0 @@
1
- import { FormFieldWrapperProps } from './types';
2
- declare const FormFieldWrapper: ({ layout, fullWidth, label, inputId, error, helperText, warningText, required, children, }: Required<FormFieldWrapperProps>) => JSX.Element;
3
- export default FormFieldWrapper;
@@ -1,3 +0,0 @@
1
- export { default as FormFieldWrapper } from './FormFieldWrapper';
2
- export type { FormFieldWrapperProps } from './types';
3
- export { getFormFieldAriaAttributes } from './utils';
@@ -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,3 +0,0 @@
1
- import { TextareaProps } from './types';
2
- declare const Textarea: ({ name, label, fullWidth, error, helperText, warningText, layout, required, onBlur, shouldTrim, size, ariaLabel, borderRadiusConfig, ...props }: TextareaProps) => JSX.Element;
3
- export default Textarea;
@@ -1,4 +0,0 @@
1
- export declare const TEXTAREA_CONSTRAINTS: {
2
- MIN_HEIGHT: number;
3
- AUTO_EXPANSION_MAX_HEIGHT: number;
4
- };
@@ -1,2 +0,0 @@
1
- export { default as Textarea } from './Textarea.component';
2
- export type { TextareaProps } from './types';
@@ -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
- }