@true-engineering/true-react-common-ui-kit 1.0.1 → 1.1.0

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/LICENSE CHANGED
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186
186
  same "printed page" as the copyright notice for easier
187
187
  identification within third-party archives.
188
188
 
189
- Copyright [yyyy] [name of copyright owner]
189
+ Copyright 2023 ООО «Тру Инжиниринг»
190
190
 
191
191
  Licensed under the Apache License, Version 2.0 (the "License");
192
192
  you may not use this file except in compliance with the License.
@@ -4,7 +4,7 @@ import { ModalStyles } from './Modal.styles';
4
4
  export declare type IModalPosition = 'center' | 'left' | 'right' | 'static';
5
5
  export interface IModalProps extends ICommonProps {
6
6
  tweakStyles?: ModalStyles;
7
- title?: string;
7
+ title?: ReactNode;
8
8
  size?: 'l' | 'm' | 's';
9
9
  isFooterSticky?: boolean;
10
10
  buttons?: ReactNode[];
@@ -6,9 +6,9 @@ export interface IMoreMenuProps extends ICommonProps {
6
6
  tweakStyles?: MoreMenuStyles;
7
7
  items: IListItem[];
8
8
  isDisabled?: boolean;
9
- onMenuOpen?: () => void;
10
- onMenuClose?: () => void;
11
9
  hasDefaultStateBackground?: boolean;
12
10
  testId?: string;
11
+ onMenuOpen?(): void;
12
+ onMenuClose?(): void;
13
13
  }
14
14
  export declare const MoreMenu: FC<IMoreMenuProps>;
@@ -49,5 +49,6 @@ export declare const styles: {
49
49
  right: number;
50
50
  marginTop: number;
51
51
  };
52
+ tweakList: {};
52
53
  };
53
54
  export declare type MoreMenuStyles = ComponentStyles<typeof styles>;
@@ -17,11 +17,12 @@ export interface ISelectProps<Value> extends Omit<IInputProps, 'value' | 'onChan
17
17
  onOpen?: () => void;
18
18
  optionsFilter?: (options: Value[], query: string) => Value[];
19
19
  options: Value[];
20
- value?: Value;
21
- onChange: (value?: Value) => void;
22
- compareValuesOnChange?: (v1: Value | undefined, v2: Value | undefined) => boolean;
23
- convertValueToString?: (value?: Value) => string | undefined;
24
- convertValueToReactNode?: (value?: Value) => ReactNode | undefined;
25
- convertValueToId?: (value?: Value) => string | undefined;
20
+ value: Value | undefined;
21
+ shouldScrollToList?: boolean;
22
+ onChange(value: Value | undefined): void;
23
+ compareValuesOnChange?(v1: Value | undefined, v2: Value | undefined): boolean;
24
+ convertValueToString?(value: Value): string | undefined;
25
+ convertValueToReactNode?(value: Value): ReactNode;
26
+ convertValueToId?(value: Value): string | undefined;
26
27
  }
27
- export declare function Select<Value>({ options, value, onChange, compareValuesOnChange, convertValueToString, convertValueToId, convertValueToReactNode, defaultOptionLabel, onFocus, onBlur, onType, onOpen, debounceTime, optionsMode, optionsFilter, noMatchesLabel, loadingLabel, tweakStyles, testId, isDisabled, dropdownOptions, minSymbolsCountToOpenList, dropdownIcon, ...inputProps }: ISelectProps<Value>): JSX.Element;
28
+ export declare function Select<Value>({ options, value, onChange, compareValuesOnChange, convertValueToString, convertValueToId, convertValueToReactNode, defaultOptionLabel, onFocus, onBlur, onType, onOpen, debounceTime, optionsMode, optionsFilter, noMatchesLabel, loadingLabel, tweakStyles, testId, isDisabled, dropdownOptions, minSymbolsCountToOpenList, dropdownIcon, shouldScrollToList, ...inputProps }: ISelectProps<Value>): JSX.Element;
@@ -13,9 +13,9 @@ export interface ISelectListProps<Value> extends ICommonProps {
13
13
  onOptionClick: (index: number) => void;
14
14
  testId?: string;
15
15
  shouldScrollToList?: boolean;
16
- convertValueToString: (value?: Value) => string | undefined;
17
- convertValueToReactNode?: (value?: Value) => ReactNode | undefined;
18
- convertValueToId?: (value?: Value) => string | undefined;
16
+ convertValueToString: (value: Value) => string | undefined;
17
+ convertValueToReactNode?: (value: Value) => ReactNode;
18
+ convertValueToId?: (value: Value) => string | undefined;
19
19
  }
20
20
  export declare function isOptionDisabled<Value>(option: Value): boolean;
21
21
  export declare function SelectList<Value>({ options, onOptionClick, focusedIndex, activeValue, defaultOptionLabel, noMatchesLabel, isLoading, loadingLabel, convertValueToString, convertValueToReactNode, convertValueToId, tweakStyles, testId, shouldScrollToList, }: ISelectListProps<Value>): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  export declare const defaultConvertFunction: (v: unknown) => string | undefined;
2
- export declare const defaultCompareFunction: <Value>(v1: Value | undefined, v2: Value | undefined) => boolean;
3
- export declare const getActiveValueIndex: <Value>(options: Value[], value: Value | undefined, convertFunc: (v?: Value | undefined) => string | undefined) => number;
2
+ export declare const defaultCompareFunction: <Value>(v1: Value, v2: Value) => boolean;
3
+ export declare const getActiveValueIndex: <Value>(options: Value[], value: Value | undefined, convertFunc: (v: Value) => string | undefined) => number;