@reportportal/ui-kit 0.0.1-alpha.51 → 0.0.1-alpha.53

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 (80) hide show
  1. package/README.md +4 -1
  2. package/dist/common/hooks/useOnClickOutside.d.ts +1 -0
  3. package/dist/components/baseIconButton/baseIconButton.d.ts +1 -0
  4. package/dist/components/baseIconButton/index.d.ts +1 -0
  5. package/dist/components/bubblesLoader/bubblesLoader.d.ts +1 -0
  6. package/dist/components/bubblesLoader/index.d.ts +1 -0
  7. package/dist/components/button/button.d.ts +1 -0
  8. package/dist/components/button/index.d.ts +1 -0
  9. package/dist/components/checkbox/checkbox.d.ts +1 -0
  10. package/dist/components/checkbox/index.d.ts +1 -0
  11. package/dist/components/datePicker/datePicker.d.ts +1 -0
  12. package/dist/components/datePicker/header/datePickerHeader.d.ts +1 -0
  13. package/dist/components/datePicker/header/index.d.ts +1 -0
  14. package/dist/components/datePicker/index.d.ts +3 -1
  15. package/dist/components/datePicker/utils.d.ts +1 -0
  16. package/dist/components/dropdown/constants.d.ts +1 -0
  17. package/dist/components/dropdown/dropdown.d.ts +1 -0
  18. package/dist/components/dropdown/dropdownOption/dropdownOption.d.ts +1 -0
  19. package/dist/components/dropdown/dropdownOption/index.d.ts +1 -0
  20. package/dist/components/dropdown/index.d.ts +1 -0
  21. package/dist/components/dropdown/types.d.ts +1 -0
  22. package/dist/components/dropdown/utils.d.ts +1 -0
  23. package/dist/components/fieldNumber/constants.d.ts +1 -0
  24. package/dist/components/fieldNumber/fieldNumber.d.ts +1 -0
  25. package/dist/components/fieldNumber/index.d.ts +1 -0
  26. package/dist/components/fieldText/fieldText.d.ts +2 -1
  27. package/dist/components/fieldText/index.d.ts +1 -0
  28. package/dist/components/fieldTextFlex/fieldTextFlex.d.ts +1 -0
  29. package/dist/components/fieldTextFlex/index.d.ts +1 -0
  30. package/dist/components/icons/index.d.ts +1 -1
  31. package/dist/components/maxValueDisplay/index.d.ts +1 -0
  32. package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +1 -0
  33. package/dist/components/modal/modal.d.ts +1 -0
  34. package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
  35. package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
  36. package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -0
  37. package/dist/components/pagination/index.d.ts +1 -0
  38. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +1 -0
  39. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
  40. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
  41. package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
  42. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
  43. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
  44. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
  45. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
  46. package/dist/components/pagination/pagination.d.ts +1 -0
  47. package/dist/components/popover/popover.d.ts +1 -0
  48. package/dist/components/radio/index.d.ts +1 -0
  49. package/dist/components/radio/radio.d.ts +1 -0
  50. package/dist/components/radio/radioGroup.d.ts +1 -0
  51. package/dist/components/spinLoader/index.d.ts +1 -0
  52. package/dist/components/spinLoader/spinLoader.d.ts +1 -0
  53. package/dist/components/systemAlert/systemAlert.d.ts +1 -0
  54. package/dist/components/systemAlert/types.d.ts +1 -0
  55. package/dist/components/systemMessage/index.d.ts +1 -0
  56. package/dist/components/systemMessage/systemMessage.d.ts +1 -0
  57. package/dist/components/table/index.d.ts +1 -0
  58. package/dist/components/table/table.d.ts +1 -0
  59. package/dist/components/table/types.d.ts +1 -0
  60. package/dist/components/table/utils.d.ts +1 -0
  61. package/dist/components/themeProvider/index.d.ts +1 -0
  62. package/dist/components/themeProvider/themeProvider.d.ts +1 -0
  63. package/dist/components/toggle/index.d.ts +1 -0
  64. package/dist/components/toggle/toggle.d.ts +1 -0
  65. package/dist/components/tooltip/tooltip.d.ts +1 -0
  66. package/dist/datePicker-e7db2778.js +197 -0
  67. package/dist/datePicker.js +5 -3
  68. package/dist/fieldText-78c1be1a.js +160 -0
  69. package/dist/fieldText.js +1 -1
  70. package/dist/fieldTextFlex-314741ad.js +78 -0
  71. package/dist/fieldTextFlex.js +1 -1
  72. package/dist/icons.js +38 -38
  73. package/dist/index.js +27 -27
  74. package/dist/{pagination-09b1f2af.js → pagination-066b1b2b.js} +1 -1
  75. package/dist/pagination.js +2 -2
  76. package/dist/style.css +1 -1
  77. package/package.json +2 -2
  78. package/dist/datePicker-0480f3fb.js +0 -193
  79. package/dist/fieldText-43787c48.js +0 -160
  80. package/dist/fieldTextFlex-23d6ecce.js +0 -78
package/README.md CHANGED
@@ -234,6 +234,9 @@ The CSS custom properties that come from DS are prefixed with `rp-ui-base` to av
234
234
 
235
235
  ### Testing
236
236
 
237
+ Each new component/hook/utility **must be** covered by unit/component tests.
238
+ All existing uncovered stuff will be tested gradually in the scope of tech-debt elimination activities.
239
+
237
240
  #### Testing Tools
238
241
 
239
242
  The project uses the following testing tools:
@@ -257,4 +260,4 @@ The project maintains a minimum of 80% test coverage threshold for:
257
260
  - Statements
258
261
  - Branches
259
262
  - Functions
260
- - Lines
263
+ - Lines
@@ -1,2 +1,3 @@
1
1
  import { RefObject } from 'react';
2
+
2
3
  export declare function useOnClickOutside<T extends HTMLElement = HTMLDivElement>(ref: RefObject<T>, handler?: (e?: MouseEvent) => void): void;
@@ -1,4 +1,5 @@
1
1
  import { FC, MouseEventHandler, ReactNode, HTMLAttributes } from 'react';
2
+
2
3
  export interface BaseIconButtonProps extends HTMLAttributes<HTMLButtonElement> {
3
4
  children: ReactNode;
4
5
  className?: string;
@@ -1,4 +1,5 @@
1
1
  import { BaseIconButton, BaseIconButtonProps } from './baseIconButton';
2
+
2
3
  export { BaseIconButton };
3
4
  export type { BaseIconButtonProps };
4
5
  export default BaseIconButton;
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+
2
3
  interface BubblesLoaderProps {
3
4
  color?: string;
4
5
  className?: string;
@@ -1,3 +1,4 @@
1
1
  import { BubblesLoader } from './bubblesLoader';
2
+
2
3
  export { BubblesLoader };
3
4
  export default BubblesLoader;
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode, ComponentPropsWithRef, MouseEventHandler } from 'react';
2
+
2
3
  type IconPlace = 'start' | 'end';
3
4
  type ButtonVariant = 'primary' | 'ghost' | 'danger' | 'text';
4
5
  type ButtonWidth = 'content' | 'wide-content' | 'parent';
@@ -1,4 +1,5 @@
1
1
  import { Button, ButtonProps } from './button';
2
+
2
3
  export { Button };
3
4
  export type { ButtonProps };
4
5
  export default Button;
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode, ChangeEventHandler, HTMLAttributes } from 'react';
2
+
2
3
  interface CheckboxProps extends HTMLAttributes<HTMLInputElement> {
3
4
  value: boolean;
4
5
  children?: ReactNode;
@@ -1,3 +1,4 @@
1
1
  import { Checkbox } from './checkbox';
2
+
2
3
  export { Checkbox };
3
4
  export default Checkbox;
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode, ReactElement } from 'react';
2
+
2
3
  interface DatePickerProps {
3
4
  onChange?: (date: Date | any) => void;
4
5
  onBlur?: () => void;
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
+
2
3
  export interface DatePickerHeaderProps {
3
4
  changeYear: (year: number) => void;
4
5
  changeMonth: (month: number) => void;
@@ -1,3 +1,4 @@
1
1
  import { DatePickerHeader } from './datePickerHeader';
2
+
2
3
  export { DatePickerHeader };
3
4
  export default DatePickerHeader;
@@ -1,3 +1,5 @@
1
1
  import { DatePicker } from './datePicker';
2
- export { DatePicker };
2
+ import { registerDatePickerLocale } from './utils';
3
+
4
+ export { DatePicker, registerDatePickerLocale };
3
5
  export default DatePicker;
@@ -1,3 +1,4 @@
1
1
  import { Locale } from 'date-fns';
2
+
2
3
  export declare const registerDatePickerLocale: (language: string, locale: Locale) => void;
3
4
  export declare const getYearsFrom: (start: number, amountYearsToGenerate?: number) => number[];
@@ -1,4 +1,5 @@
1
1
  import { KeyCodes } from '../../common/constants/keyCodes';
2
+
2
3
  export declare const OPEN_DROPDOWN_KEY_CODES: KeyCodes[];
3
4
  export declare const CLOSE_DROPDOWN_KEY_CODES: KeyCodes[];
4
5
  export declare enum EventName {
@@ -1,5 +1,6 @@
1
1
  import { ReactNode, FC } from 'react';
2
2
  import { DropdownVariant, RenderDropdownOption, DropdownOptionType, DropdownValue } from './types';
3
+
3
4
  export interface DropdownProps {
4
5
  options: DropdownOptionType[];
5
6
  value: DropdownValue | DropdownValue[];
@@ -1,3 +1,4 @@
1
1
  import { FC } from 'react';
2
2
  import { DropdownOptionProps } from '../types';
3
+
3
4
  export declare const DropdownOption: FC<DropdownOptionProps>;
@@ -1,3 +1,4 @@
1
1
  import { DropdownOption } from './dropdownOption';
2
+
2
3
  export { DropdownOption };
3
4
  export default DropdownOption;
@@ -1,3 +1,4 @@
1
1
  import { Dropdown } from './dropdown';
2
+
2
3
  export { Dropdown };
3
4
  export default Dropdown;
@@ -1,4 +1,5 @@
1
1
  import { MouseEventHandler, ReactNode } from 'react';
2
+
2
3
  export type DropdownVariant = 'default' | 'ghost';
3
4
  export type DropdownValue = string | boolean | number;
4
5
  export type RenderDropdownOption = (props: DropdownOptionProps) => ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { DropdownValue, DropdownOptionType } from './types';
2
+
2
3
  export declare const calculateDefaultIndex: (options: DropdownOptionType[], selectedValue: DropdownValue | DropdownValue[]) => number;
3
4
  export declare const calculateNextIndex: (options: DropdownOptionType[], index?: number) => number;
4
5
  export declare const calculatePrevIndex: (options: DropdownOptionType[], index?: number) => number;
@@ -1,4 +1,5 @@
1
1
  import { KeyCodes } from '../../common/constants/keyCodes';
2
+
2
3
  export declare const DEFAULT_WIDTH_CH = 5;
3
4
  export declare const MAX_WIDTH_CH = 16;
4
5
  export declare const ALLOWED_KEY_CODES: KeyCodes[];
@@ -1,4 +1,5 @@
1
1
  import { FC, HTMLAttributes, FocusEventHandler } from 'react';
2
+
2
3
  type FieldNumberValue = number | string;
3
4
  interface FieldNumberProps extends Omit<HTMLAttributes<HTMLInputElement>, 'onChange' | 'onFocus'> {
4
5
  onChange: (value: number | string) => void;
@@ -1,3 +1,4 @@
1
1
  import { FieldNumber } from './fieldNumber.js';
2
+
2
3
  export { FieldNumber };
3
4
  export default FieldNumber;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEventHandler, ReactNode, InputHTMLAttributes } from 'react';
2
+
2
3
  interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
3
4
  value?: string;
4
5
  className?: string;
@@ -26,5 +27,5 @@ interface FieldTextProps extends InputHTMLAttributes<HTMLInputElement> {
26
27
  collapsible?: boolean;
27
28
  loading?: boolean;
28
29
  }
29
- export declare const FieldText: import("react").ForwardRefExoticComponent<FieldTextProps & import("react").RefAttributes<HTMLInputElement>>;
30
+ export declare const FieldText: import('react').ForwardRefExoticComponent<FieldTextProps & import('react').RefAttributes<HTMLInputElement>>;
30
31
  export {};
@@ -1,3 +1,4 @@
1
1
  import { FieldText } from './fieldText';
2
+
2
3
  export { FieldText };
3
4
  export default FieldText;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEventHandler, ComponentPropsWithRef, FC, FocusEventHandler, KeyboardEventHandler } from 'react';
2
+
2
3
  export interface FieldTextFlexProps extends ComponentPropsWithRef<'textarea'> {
3
4
  value: string;
4
5
  readonly?: boolean;
@@ -1,3 +1,4 @@
1
1
  import { FieldTextFlex } from './fieldTextFlex';
2
+
2
3
  export { FieldTextFlex };
3
4
  export default FieldTextFlex;
@@ -4,7 +4,7 @@ export { default as BreadcrumbsTreeIcon } from './svg/breadcrumbsTree.svg';
4
4
  export { default as CalendarIcon } from './svg/calendar.svg';
5
5
  export { default as CalendarArrowIcon } from './svg/calendarArrow.svg';
6
6
  export { default as ChevronDownDropdownIcon } from './svg/chevronDownDropdown.svg';
7
- export { default as ChevronRightBreadcrumbsIcon } from './svg/chevronDownDropdown.svg';
7
+ export { default as ChevronRightBreadcrumbsIcon } from './svg/chevronRightBreadcrumbs.svg';
8
8
  export { default as ClearIcon } from './svg/clear.svg';
9
9
  export { default as CloseIcon } from './svg/close.svg';
10
10
  export { default as CloseEyeIcon } from './svg/closeEye.svg';
@@ -1,3 +1,4 @@
1
1
  import { MaxValueDisplay } from './maxValueDisplay';
2
+
2
3
  export { MaxValueDisplay };
3
4
  export default MaxValueDisplay;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ShapeWithClassName } from '../../common/types';
3
+
3
4
  export interface MaxValueDisplayProps {
4
5
  value: number;
5
6
  maxValue?: number;
@@ -1,6 +1,7 @@
1
1
  import { ReactNode, FC } from 'react';
2
2
  import { ButtonProps } from '../button';
3
3
  import { ModalSize } from './modalFooter';
4
+
4
5
  type ModalOverlay = 'default' | 'light-cyan';
5
6
  interface ModalProps {
6
7
  onClose?: () => void;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode, FC } from 'react';
2
+
2
3
  interface ModalContentProps {
3
4
  scrollable?: boolean;
4
5
  children?: ReactNode;
@@ -1,5 +1,6 @@
1
1
  import { ReactNode, FC, MouseEventHandler } from 'react';
2
2
  import { ButtonProps } from '../../button';
3
+
3
4
  export type ModalSize = 'default' | 'small' | 'large';
4
5
  interface ModalFooterProps {
5
6
  closeHandler: MouseEventHandler<HTMLButtonElement>;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode, FC } from 'react';
2
+
2
3
  interface ModalHeaderProps {
3
4
  title?: ReactNode;
4
5
  onClose: () => void;
@@ -1,4 +1,5 @@
1
1
  import { Pagination, PaginationProps } from './pagination';
2
+
2
3
  export { Pagination };
3
4
  export type { PaginationProps };
4
5
  export default Pagination;
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+
2
3
  export interface ItemCounterProps {
3
4
  activePage: number;
4
5
  pageSize: number;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePage } from '../../types';
3
+
3
4
  interface ActivePageProps {
4
5
  activePage: number;
5
6
  totalPages: number;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePage } from '../../../types';
3
+
3
4
  interface PageSelectorProps {
4
5
  pageText: string;
5
6
  goActionText: string;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePage } from '../types';
3
+
3
4
  type PageControlsCaptions = {
4
5
  page: string;
5
6
  goTo: string;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePage } from '../../../types';
3
+
3
4
  export interface BarProps {
4
5
  totalPages: number;
5
6
  activePage: number;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePage } from '../../types';
3
+
3
4
  export interface PageNavigatorProps {
4
5
  activePage: number;
5
6
  totalPages: number;
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePageSize } from '../types';
3
+
3
4
  interface PageSizeControlProps {
4
5
  size: number;
5
6
  sizeOptions: number[];
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePageSize } from '../../types';
3
+
3
4
  export interface SizeSelectorProps {
4
5
  currentSize: number;
5
6
  options: number[];
@@ -1,5 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { ChangePageSize, ChangePage } from './types';
3
+
3
4
  type PaginationCaptions = {
4
5
  items?: string;
5
6
  of?: string;
@@ -1,5 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { Placement } from '@floating-ui/react';
3
+
3
4
  interface PopoverProps {
4
5
  className?: string;
5
6
  content: ReactNode;
@@ -1,4 +1,5 @@
1
1
  import { Radio, RadioProps } from './radio.js';
2
+
2
3
  export { Radio };
3
4
  export type { RadioProps };
4
5
  export default Radio;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEventHandler, HTMLAttributes, ReactNode, FC } from 'react';
2
+
2
3
  export type RadioValue = string | number;
3
4
  export type RadioOption = {
4
5
  value: RadioValue;
@@ -1,6 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { RadioProps } from './index';
3
3
  import { RadioOption } from './radio';
4
+
4
5
  interface RadioGroupProps extends Omit<RadioProps, 'option'> {
5
6
  options: RadioOption[];
6
7
  }
@@ -1,3 +1,4 @@
1
1
  import { SpinLoader } from './spinLoader';
2
+
2
3
  export { SpinLoader };
3
4
  export default SpinLoader;
@@ -1,4 +1,5 @@
1
1
  import { FC } from 'react';
2
+
2
3
  interface SpinLoaderProps {
3
4
  color?: string;
4
5
  className?: string;
@@ -1,3 +1,4 @@
1
1
  import { FC } from 'react';
2
2
  import { SystemAlertProps } from './types';
3
+
3
4
  export declare const SystemAlert: FC<SystemAlertProps>;
@@ -1,4 +1,5 @@
1
1
  import { ReactElement } from 'react';
2
+
2
3
  export declare enum SystemAlertType {
3
4
  INFO = "info",
4
5
  SUCCESS = "success",
@@ -1,3 +1,4 @@
1
1
  import { SystemMessage } from './systemMessage';
2
+
2
3
  export { SystemMessage };
3
4
  export default SystemMessage;
@@ -1,4 +1,5 @@
1
1
  import { FC, ReactNode } from 'react';
2
+
2
3
  type Mode = 'info' | 'warning' | 'error';
3
4
  interface SystemMessageProps {
4
5
  children?: ReactNode;
@@ -1,3 +1,4 @@
1
1
  import { Table } from './table';
2
+
2
3
  export { Table };
3
4
  export default Table;
@@ -1,3 +1,4 @@
1
1
  import { FC } from 'react';
2
2
  import { TableComponentProps } from './types';
3
+
3
4
  export declare const Table: FC<TableComponentProps>;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  export interface Column {
3
4
  key: string;
4
5
  header: string;
@@ -1,3 +1,4 @@
1
1
  import { Column, RowData, SortConfig } from './types';
2
+
2
3
  export declare const sortTableData: (tableData: RowData[], sortConfig?: SortConfig) => RowData[];
3
4
  export declare const getColumnsKeys: (columns: Column[]) => string[];
@@ -1,3 +1,4 @@
1
1
  import { ThemeProvider } from './themeProvider';
2
+
2
3
  export { ThemeProvider };
3
4
  export default ThemeProvider;
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+
2
3
  type ThemeKey = 'light' | 'dark' | string;
3
4
  interface ITheme {
4
5
  [themeKey: ThemeKey]: string;
@@ -1,3 +1,4 @@
1
1
  import { Toggle } from './toggle';
2
+
2
3
  export { Toggle };
3
4
  export default Toggle;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEventHandler, FC, HTMLAttributes, ReactNode } from 'react';
2
+
2
3
  interface ToggleProps extends HTMLAttributes<HTMLInputElement> {
3
4
  value: boolean;
4
5
  title?: string;
@@ -1,5 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { Placement } from '@floating-ui/react';
3
+
3
4
  interface TooltipProps {
4
5
  content: ReactNode;
5
6
  children: ReactNode;