@reportportal/ui-kit 0.0.1-alpha.52 → 0.0.1-alpha.54

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 (68) 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/maxValueDisplay/index.d.ts +1 -0
  31. package/dist/components/maxValueDisplay/maxValueDisplay.d.ts +1 -0
  32. package/dist/components/modal/modal.d.ts +1 -0
  33. package/dist/components/modal/modalContent/modalContent.d.ts +1 -0
  34. package/dist/components/modal/modalFooter/modalFooter.d.ts +1 -0
  35. package/dist/components/modal/modalHeader/modalHeader.d.ts +1 -0
  36. package/dist/components/pagination/index.d.ts +1 -0
  37. package/dist/components/pagination/itemsCounter/itemCounter.d.ts +1 -0
  38. package/dist/components/pagination/pageControls/activePage/activePage.d.ts +1 -0
  39. package/dist/components/pagination/pageControls/activePage/pageSelector/pageSelector.d.ts +1 -0
  40. package/dist/components/pagination/pageControls/pageControls.d.ts +1 -0
  41. package/dist/components/pagination/pageControls/pageNavigator/bar/bar.d.ts +1 -0
  42. package/dist/components/pagination/pageControls/pageNavigator/pageNavigator.d.ts +1 -0
  43. package/dist/components/pagination/pageSizeControl/pageSizeControl.d.ts +1 -0
  44. package/dist/components/pagination/pageSizeControl/sizeSelector/sizeSelector.d.ts +1 -0
  45. package/dist/components/pagination/pagination.d.ts +1 -0
  46. package/dist/components/popover/popover.d.ts +1 -0
  47. package/dist/components/radio/index.d.ts +1 -0
  48. package/dist/components/radio/radio.d.ts +1 -0
  49. package/dist/components/radio/radioGroup.d.ts +1 -0
  50. package/dist/components/spinLoader/index.d.ts +1 -0
  51. package/dist/components/spinLoader/spinLoader.d.ts +1 -0
  52. package/dist/components/systemAlert/systemAlert.d.ts +1 -0
  53. package/dist/components/systemAlert/types.d.ts +1 -0
  54. package/dist/components/systemMessage/index.d.ts +1 -0
  55. package/dist/components/systemMessage/systemMessage.d.ts +1 -0
  56. package/dist/components/table/index.d.ts +1 -0
  57. package/dist/components/table/table.d.ts +1 -0
  58. package/dist/components/table/types.d.ts +1 -0
  59. package/dist/components/table/utils.d.ts +1 -0
  60. package/dist/components/themeProvider/index.d.ts +1 -0
  61. package/dist/components/themeProvider/themeProvider.d.ts +1 -0
  62. package/dist/components/toggle/index.d.ts +1 -0
  63. package/dist/components/toggle/toggle.d.ts +1 -0
  64. package/dist/components/tooltip/tooltip.d.ts +1 -0
  65. package/dist/{datePicker-8c37bd50.js → datePicker-a333d78b.js} +57 -53
  66. package/dist/datePicker.js +6 -3
  67. package/dist/index.js +82 -81
  68. package/package.json +2 -2
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;
@@ -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;
@@ -1,25 +1,28 @@
1
1
  import { jsxs as S, Fragment as U, jsx as o } from "react/jsx-runtime";
2
- import $ from "react-datepicker";
3
- import { c as Y } from "./bind-06a7ff84.js";
2
+ import $ from "react-datepicker/dist/es/index.js";
3
+ import { c as R } from "./bind-06a7ff84.js";
4
4
  import { useMemo as E, useRef as B } from "react";
5
5
  import { F as D } from "./fieldText-78c1be1a.js";
6
6
  import { a as T, S as G } from "./calendarArrow-3e1339ea.js";
7
- import { D as P } from "./dropdown-6edea86c.js";
8
- const H = (a, c = 20) => {
9
- const l = a + c;
10
- return new Array(l - a).fill(void 0).map((g, e) => a - e);
11
- }, V = "_header_a3cjx_1", O = "_disabled_a3cjx_25", W = "_dropdown_a3cjx_8", q = {
12
- header: V,
7
+ import { D as L } from "./dropdown-6edea86c.js";
8
+ import { registerLocale as H } from "react-datepicker";
9
+ const pe = (r, s) => {
10
+ H(r, s);
11
+ }, V = (r, s = 20) => {
12
+ const l = r + s;
13
+ return new Array(l - r).fill(void 0).map((g, e) => r - e);
14
+ }, O = "_header_a3cjx_1", W = "_disabled_a3cjx_25", q = "_dropdown_a3cjx_8", z = {
15
+ header: O,
13
16
  "dropdowns-wrapper": "_dropdowns-wrapper_a3cjx_8",
14
17
  "button-prev": "_button-prev_a3cjx_13",
15
18
  "button-next": "_button-next_a3cjx_14",
16
- disabled: O,
17
- dropdown: W,
19
+ disabled: W,
20
+ dropdown: q,
18
21
  "month-dropdown": "_month-dropdown_a3cjx_44",
19
22
  "toggle-button": "_toggle-button_a3cjx_47"
20
- }, r = Y.bind(q), z = ({
21
- date: a = /* @__PURE__ */ new Date(),
22
- changeYear: c = () => {
23
+ }, a = R.bind(z), J = ({
24
+ date: r = /* @__PURE__ */ new Date(),
25
+ changeYear: s = () => {
23
26
  },
24
27
  changeMonth: l = () => {
25
28
  },
@@ -34,56 +37,56 @@ const H = (a, c = 20) => {
34
37
  yearsOptions: i = [],
35
38
  locale: x
36
39
  }) => {
37
- const p = a.getFullYear(), C = a.getMonth(), f = E(() => {
38
- const t = Array(12).keys(), s = new Intl.DateTimeFormat(x, {
40
+ const p = r.getFullYear(), C = r.getMonth(), f = E(() => {
41
+ const t = Array(12).keys(), c = new Intl.DateTimeFormat(x, {
39
42
  month: "long"
40
- }), d = (m) => s.format(new Date(p, m));
43
+ }), d = (m) => c.format(new Date(p, m));
41
44
  return Array.from(t, d).reduce((m, j, A) => m.concat({
42
45
  value: A,
43
46
  label: j
44
47
  }), []);
45
- }, []), N = E(() => (i.length > 0 ? i : H(p)).reduce(
46
- (s, d) => s.concat({ value: d, label: `${d}` }),
48
+ }, []), N = E(() => (i.length > 0 ? i : V(p)).reduce(
49
+ (c, d) => c.concat({ value: d, label: `${d}` }),
47
50
  []
48
51
  ), [i]), v = (t) => {
49
52
  l(t);
50
53
  }, y = (t) => {
51
- c(t);
54
+ s(t);
52
55
  };
53
56
  return /* @__PURE__ */ S(U, { children: [
54
- b && /* @__PURE__ */ o("div", { className: r(w), children: b }),
55
- /* @__PURE__ */ S("div", { className: r("header"), children: [
57
+ b && /* @__PURE__ */ o("div", { className: a(w), children: b }),
58
+ /* @__PURE__ */ S("div", { className: a("header"), children: [
56
59
  /* @__PURE__ */ o(
57
60
  "button",
58
61
  {
59
62
  "aria-label": "Previous Months",
60
63
  disabled: n,
61
64
  onClick: g,
62
- className: r("button-prev", { disabled: n }),
65
+ className: a("button-prev", { disabled: n }),
63
66
  children: /* @__PURE__ */ o(T, {})
64
67
  }
65
68
  ),
66
- /* @__PURE__ */ S("div", { className: r("dropdowns-wrapper"), children: [
69
+ /* @__PURE__ */ S("div", { className: a("dropdowns-wrapper"), children: [
67
70
  /* @__PURE__ */ o(
68
- P,
71
+ L,
69
72
  {
70
73
  options: f,
71
74
  value: C,
72
75
  onChange: v,
73
76
  transparentBackground: !0,
74
- className: r("dropdown", "month-dropdown"),
75
- toggleButtonClassName: r("toggle-button")
77
+ className: a("dropdown", "month-dropdown"),
78
+ toggleButtonClassName: a("toggle-button")
76
79
  }
77
80
  ),
78
81
  /* @__PURE__ */ o(
79
- P,
82
+ L,
80
83
  {
81
84
  options: N,
82
85
  value: p,
83
86
  onChange: y,
84
87
  transparentBackground: !0,
85
- className: r("dropdown"),
86
- toggleButtonClassName: r("toggle-button")
88
+ className: a("dropdown"),
89
+ toggleButtonClassName: a("toggle-button")
87
90
  }
88
91
  )
89
92
  ] }),
@@ -93,25 +96,25 @@ const H = (a, c = 20) => {
93
96
  "aria-label": "Next Months",
94
97
  disabled: h,
95
98
  onClick: e,
96
- className: r("button-next", { disabled: h }),
99
+ className: a("button-next", { disabled: h }),
97
100
  children: /* @__PURE__ */ o(T, {})
98
101
  }
99
102
  )
100
103
  ] })
101
104
  ] });
102
- }, J = "_calendar_1jr94_5", K = "_date_1jr94_90", Q = "_disabled_1jr94_202", X = "_popper_1jr94_210", Z = "_input_1jr94_214", ee = {
103
- calendar: J,
105
+ }, K = "_calendar_1jr94_5", Q = "_date_1jr94_90", X = "_disabled_1jr94_202", Z = "_popper_1jr94_210", ee = "_input_1jr94_214", ne = {
106
+ calendar: K,
104
107
  "current-date": "_current-date_1jr94_89",
105
- date: K,
108
+ date: Q,
106
109
  "selected-range": "_selected-range_1jr94_119",
107
110
  "end-date": "_end-date_1jr94_119",
108
- disabled: Q,
109
- popper: X,
110
- input: Z
111
- }, _ = Y.bind(ee), ne = "en", R = "MM-dd-yyyy", le = ({
112
- onChange: a = () => {
111
+ disabled: X,
112
+ popper: Z,
113
+ input: ee
114
+ }, _ = R.bind(ne), oe = "en", P = "MM-dd-yyyy", me = ({
115
+ onChange: r = () => {
113
116
  },
114
- disabled: c = !1,
117
+ disabled: s = !1,
115
118
  onBlur: l = () => {
116
119
  },
117
120
  onFocus: g = () => {
@@ -125,20 +128,20 @@ const H = (a, c = 20) => {
125
128
  popperClassName: x = "",
126
129
  calendarClassName: p = "",
127
130
  fixedHeight: C = !1,
128
- language: f = ne,
131
+ language: f = oe,
129
132
  yearsOptions: N = [],
130
- placeholder: v = R.toUpperCase(),
131
- dateFormat: y = R,
133
+ placeholder: v = P.toUpperCase(),
134
+ dateFormat: y = P,
132
135
  selects: t = "start",
133
- value: s = null
136
+ value: c = null
134
137
  }) => {
135
- const d = B(null), F = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
136
- const k = u.toDateString(), I = k === F, M = j && k === m, L = n && e && u > n && u < e;
138
+ const d = B(null), k = n == null ? void 0 : n.toDateString(), m = e == null ? void 0 : e.toDateString(), j = e && n && e > n, A = (u) => {
139
+ const F = u.toDateString(), Y = F === k, M = j && F === m, I = n && e && u > n && u < e;
137
140
  return _("date", {
138
- "current-date": I,
139
- "selected-range": L && !M,
141
+ "current-date": Y,
142
+ "selected-range": I && !M,
140
143
  "end-date": M && j,
141
- disabled: c
144
+ disabled: s
142
145
  });
143
146
  };
144
147
  return /* @__PURE__ */ o(
@@ -154,11 +157,11 @@ const H = (a, c = 20) => {
154
157
  }
155
158
  ),
156
159
  placeholderText: v,
157
- selected: s,
160
+ selected: c,
158
161
  startDate: n,
159
162
  endDate: e,
160
163
  minDate: t === "end" ? n : void 0,
161
- disabled: c,
164
+ disabled: s,
162
165
  shouldCloseOnSelect: i,
163
166
  fixedHeight: C,
164
167
  locale: f,
@@ -166,7 +169,7 @@ const H = (a, c = 20) => {
166
169
  dayClassName: A,
167
170
  calendarClassName: _(p, "calendar"),
168
171
  renderCustomHeader: (u) => /* @__PURE__ */ o(
169
- z,
172
+ J,
170
173
  {
171
174
  ...u,
172
175
  headerNodes: h,
@@ -175,7 +178,7 @@ const H = (a, c = 20) => {
175
178
  locale: f
176
179
  }
177
180
  ),
178
- onChange: a,
181
+ onChange: r,
179
182
  onBlur: l,
180
183
  onFocus: g,
181
184
  customTimeInput: w,
@@ -189,5 +192,6 @@ const H = (a, c = 20) => {
189
192
  );
190
193
  };
191
194
  export {
192
- le as D
195
+ me as D,
196
+ pe as r
193
197
  };
@@ -1,6 +1,7 @@
1
- import { D as t } from "./datePicker-8c37bd50.js";
1
+ import { D as t } from "./datePicker-a333d78b.js";
2
+ import { r as q } from "./datePicker-a333d78b.js";
2
3
  import "react/jsx-runtime";
3
- import "react-datepicker";
4
+ import "react-datepicker/dist/es/index.js";
4
5
  import "./bind-06a7ff84.js";
5
6
  import "react";
6
7
  import "./fieldText-78c1be1a.js";
@@ -18,7 +19,9 @@ import "./keyCodes-f63c0e11.js";
18
19
  import "./baseIconButton-251479f7.js";
19
20
  import "./dropdown-0260bb66.js";
20
21
  import "./checkbox-9a6c7ce1.js";
22
+ import "react-datepicker";
21
23
  export {
22
24
  t as DatePicker,
23
- t as default
25
+ t as default,
26
+ q as registerDatePickerLocale
24
27
  };
package/dist/index.js CHANGED
@@ -1,32 +1,33 @@
1
- import { B as l } from "./button-33c88abf.js";
2
- import { B as S } from "./baseIconButton-251479f7.js";
3
- import { C } from "./checkbox-9a6c7ce1.js";
4
- import { S as b } from "./systemMessage-1ced6079.js";
5
- import { F as B } from "./fieldText-78c1be1a.js";
6
- import { T as P } from "./themeProvider-46c2be7b.js";
7
- import { Modal as g } from "./modal.js";
8
- import { D as v } from "./dropdown-6edea86c.js";
9
- import { T as M } from "./toggle-1a3aacb5.js";
10
- import { F as A } from "./fieldNumber-d81e551e.js";
11
- import { B as L } from "./bubblesLoader-a7e709d4.js";
12
- import { S as O } from "./spinLoader-c4a53718.js";
13
- import { F as H } from "./fieldTextFlex-314741ad.js";
14
- import { R as U } from "./radio-bccc84f2.js";
15
- import { Tooltip as q } from "./tooltip.js";
16
- import { Popover as J } from "./popover.js";
17
- import { P as Q } from "./pagination-066b1b2b.js";
18
- import { T as W } from "./table-32fc8c70.js";
19
- import { D as Y } from "./datePicker-8c37bd50.js";
20
- import { SystemAlert as _ } from "./systemAlert.js";
21
- import { S as oo, a as ro } from "./arrowUp-4a5caee7.js";
22
- import { BreadcrumbsTreeIcon as to, ChevronDownDropdownIcon as ao, ChevronRightBreadcrumbsIcon as no, CopyIcon as po, DeleteIcon as mo, EditIcon as so, ExportIcon as co, ExternalLinkIcon as xo, FilterFilledIcon as Io, FilterOutlineIcon as io, FlagIcon as fo, HideIcon as lo, MaximizeIcon as So, MeatballMenuIcon as uo, SearchIcon as Co, SortIcon as Fo } from "./icons.js";
23
- import { a as To, S as Bo } from "./calendarArrow-3e1339ea.js";
24
- import { S as Po, a as wo, b as go } from "./openEye-7b9cf080.js";
25
- import { S as vo } from "./close-4b33d7c1.js";
26
- import { S as Mo } from "./dropdown-0260bb66.js";
27
- import { S as Ao, a as ko, b as Lo } from "./success-dc1914aa.js";
28
- import { S as Oo, a as zo } from "./plus-0929dda4.js";
29
- import { S as No, a as Uo } from "./prevPage-87faf576.js";
1
+ import { B as d } from "./button-33c88abf.js";
2
+ import { B as u } from "./baseIconButton-251479f7.js";
3
+ import { C as F } from "./checkbox-9a6c7ce1.js";
4
+ import { S as T } from "./systemMessage-1ced6079.js";
5
+ import { F as D } from "./fieldText-78c1be1a.js";
6
+ import { T as w } from "./themeProvider-46c2be7b.js";
7
+ import { Modal as h } from "./modal.js";
8
+ import { D as E } from "./dropdown-6edea86c.js";
9
+ import { T as y } from "./toggle-1a3aacb5.js";
10
+ import { F as k } from "./fieldNumber-d81e551e.js";
11
+ import { B as R } from "./bubblesLoader-a7e709d4.js";
12
+ import { S as z } from "./spinLoader-c4a53718.js";
13
+ import { F as N } from "./fieldTextFlex-314741ad.js";
14
+ import { R as j } from "./radio-bccc84f2.js";
15
+ import { Tooltip as G } from "./tooltip.js";
16
+ import { Popover as K } from "./popover.js";
17
+ import { P as V } from "./pagination-066b1b2b.js";
18
+ import { T as X } from "./table-32fc8c70.js";
19
+ import { D as Z } from "./datePicker-a333d78b.js";
20
+ import "react-datepicker";
21
+ import { SystemAlert as $ } from "./systemAlert.js";
22
+ import { S as ro, a as eo } from "./arrowUp-4a5caee7.js";
23
+ import { BreadcrumbsTreeIcon as ao, ChevronDownDropdownIcon as no, ChevronRightBreadcrumbsIcon as po, CopyIcon as mo, DeleteIcon as so, EditIcon as co, ExportIcon as xo, ExternalLinkIcon as io, FilterFilledIcon as Io, FilterOutlineIcon as fo, FlagIcon as lo, HideIcon as So, MaximizeIcon as uo, MeatballMenuIcon as Co, SearchIcon as Fo, SortIcon as bo } from "./icons.js";
24
+ import { a as Bo, S as Do } from "./calendarArrow-3e1339ea.js";
25
+ import { S as wo, a as go, b as ho } from "./openEye-7b9cf080.js";
26
+ import { S as Eo } from "./close-4b33d7c1.js";
27
+ import { S as yo } from "./dropdown-0260bb66.js";
28
+ import { S as ko, a as Lo, b as Ro } from "./success-dc1914aa.js";
29
+ import { S as zo, a as Ho } from "./plus-0929dda4.js";
30
+ import { S as Uo, a as jo } from "./prevPage-87faf576.js";
30
31
  import "react/jsx-runtime";
31
32
  import "react";
32
33
  import "./bind-06a7ff84.js";
@@ -38,58 +39,58 @@ import "./useOnClickOutside-c332f7d3.js";
38
39
  import "@floating-ui/react-dom";
39
40
  import "downshift";
40
41
  import "@floating-ui/react";
41
- import "react-datepicker";
42
+ import "react-datepicker/dist/es/index.js";
42
43
  export {
43
- oo as ArrowDownIcon,
44
- ro as ArrowUpIcon,
45
- S as BaseIconButton,
46
- to as BreadcrumbsTreeIcon,
47
- L as BubblesLoader,
48
- l as Button,
49
- To as CalendarArrowIcon,
50
- Bo as CalendarIcon,
51
- C as Checkbox,
52
- ao as ChevronDownDropdownIcon,
53
- no as ChevronRightBreadcrumbsIcon,
54
- Po as ClearIcon,
55
- wo as CloseEyeIcon,
56
- vo as CloseIcon,
57
- po as CopyIcon,
58
- Y as DatePicker,
59
- mo as DeleteIcon,
60
- v as Dropdown,
61
- Mo as DropdownIcon,
62
- so as EditIcon,
63
- Ao as ErrorIcon,
64
- co as ExportIcon,
65
- xo as ExternalLinkIcon,
66
- A as FieldNumber,
67
- B as FieldText,
68
- H as FieldTextFlex,
44
+ ro as ArrowDownIcon,
45
+ eo as ArrowUpIcon,
46
+ u as BaseIconButton,
47
+ ao as BreadcrumbsTreeIcon,
48
+ R as BubblesLoader,
49
+ d as Button,
50
+ Bo as CalendarArrowIcon,
51
+ Do as CalendarIcon,
52
+ F as Checkbox,
53
+ no as ChevronDownDropdownIcon,
54
+ po as ChevronRightBreadcrumbsIcon,
55
+ wo as ClearIcon,
56
+ go as CloseEyeIcon,
57
+ Eo as CloseIcon,
58
+ mo as CopyIcon,
59
+ Z as DatePicker,
60
+ so as DeleteIcon,
61
+ E as Dropdown,
62
+ yo as DropdownIcon,
63
+ co as EditIcon,
64
+ ko as ErrorIcon,
65
+ xo as ExportIcon,
66
+ io as ExternalLinkIcon,
67
+ k as FieldNumber,
68
+ D as FieldText,
69
+ N as FieldTextFlex,
69
70
  Io as FilterFilledIcon,
70
- io as FilterOutlineIcon,
71
- fo as FlagIcon,
72
- lo as HideIcon,
73
- ko as InfoIcon,
74
- So as MaximizeIcon,
75
- uo as MeatballMenuIcon,
76
- Oo as MinusIcon,
77
- g as Modal,
78
- go as OpenEyeIcon,
79
- Q as Pagination,
80
- zo as PlusIcon,
81
- J as Popover,
82
- No as PrevChapterIcon,
83
- Uo as PrevPageIcon,
84
- U as Radio,
85
- Co as SearchIcon,
86
- Fo as SortIcon,
87
- O as SpinLoader,
88
- Lo as SuccessIcon,
89
- _ as SystemAlert,
90
- b as SystemMessage,
91
- W as Table,
92
- P as ThemeProvider,
93
- M as Toggle,
94
- q as Tooltip
71
+ fo as FilterOutlineIcon,
72
+ lo as FlagIcon,
73
+ So as HideIcon,
74
+ Lo as InfoIcon,
75
+ uo as MaximizeIcon,
76
+ Co as MeatballMenuIcon,
77
+ zo as MinusIcon,
78
+ h as Modal,
79
+ ho as OpenEyeIcon,
80
+ V as Pagination,
81
+ Ho as PlusIcon,
82
+ K as Popover,
83
+ Uo as PrevChapterIcon,
84
+ jo as PrevPageIcon,
85
+ j as Radio,
86
+ Fo as SearchIcon,
87
+ bo as SortIcon,
88
+ z as SpinLoader,
89
+ Ro as SuccessIcon,
90
+ $ as SystemAlert,
91
+ T as SystemMessage,
92
+ X as Table,
93
+ w as ThemeProvider,
94
+ y as Toggle,
95
+ G as Tooltip
95
96
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reportportal/ui-kit",
3
- "version": "0.0.1-alpha.52",
3
+ "version": "0.0.1-alpha.54",
4
4
  "description": "The UI-kit library for ReportPortal Design System.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -32,7 +32,7 @@
32
32
  "downshift": "^6.1.12",
33
33
  "framer-motion": "^10.15.2",
34
34
  "rc-scrollbars": "^1.1.6",
35
- "react-datepicker": "^7.3.0"
35
+ "react-datepicker": "^7.6.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@storybook/addon-essentials": "^8.2.9",