@true-engineering/true-react-common-ui-kit 3.40.0 → 3.41.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/README.md +9 -1
- package/dist/components/SmartInput/SmartInput.d.ts +8 -6
- package/dist/components/SmartInput/constants.d.ts +4 -6
- package/dist/components/SmartInput/helpers.d.ts +2 -4
- package/dist/components/SmartInput/types.d.ts +5 -0
- package/dist/true-react-common-ui-kit.js +1081 -940
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +1081 -940
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +98 -98
- package/src/components/MoreMenu/MoreMenu.tsx +93 -93
- package/src/components/SmartInput/SmartInput.stories.tsx +52 -51
- package/src/components/SmartInput/SmartInput.tsx +116 -134
- package/src/components/SmartInput/constants.ts +91 -84
- package/src/components/SmartInput/helpers.ts +26 -13
- package/src/components/SmartInput/types.ts +18 -11
- package/src/components/TextWithTooltip/TextWithTooltip.tsx +156 -156
- package/src/components/WithPopup/WithPopup.styles.ts +45 -45
- package/src/components/WithPopup/WithPopup.tsx +184 -184
- package/src/components/WithTooltip/WithTooltip.stories.tsx +56 -56
- package/src/components/WithTooltip/WithTooltip.styles.ts +7 -7
- package/src/components/WithTooltip/WithTooltip.tsx +67 -67
- package/src/components/WithTooltip/index.ts +2 -2
- package/src/components/index.ts +46 -46
- package/src/theme/types.ts +158 -158
package/README.md
CHANGED
|
@@ -11,7 +11,15 @@
|
|
|
11
11
|
|
|
12
12
|
# Release Notes
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 3.41.0
|
|
15
|
+
|
|
16
|
+
### Changes
|
|
17
|
+
|
|
18
|
+
- **SmartInput**: Переписан + исправлен баг с неправильной позицией каретки при повторном вводе
|
|
19
|
+
- **SmartInput**: Добавлена пропса `isTransliterationEnabled`
|
|
20
|
+
- **SmartInput**: У `onChange` добавлено два новых аргумента `rawValue` и `event`
|
|
21
|
+
|
|
22
|
+
## 3.40.0
|
|
15
23
|
|
|
16
24
|
### Changes
|
|
17
25
|
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { ClipboardEvent, FormEvent } from 'react';
|
|
2
2
|
import { IInputProps } from '../Input';
|
|
3
|
-
import { ISmartType } from './types';
|
|
4
|
-
export interface ISmartInputProps extends IInputProps {
|
|
5
|
-
/** @default false */
|
|
6
|
-
isUpperCase?: boolean;
|
|
3
|
+
import { IInputRawValue, ISmartType } from './types';
|
|
4
|
+
export interface ISmartInputProps extends Omit<IInputProps, 'onChange'> {
|
|
7
5
|
/** @default 'default' */
|
|
8
6
|
smartType?: ISmartType;
|
|
9
7
|
regExp?: RegExp;
|
|
10
|
-
|
|
8
|
+
/** @default false */
|
|
9
|
+
isUpperCase?: boolean;
|
|
10
|
+
/** @default true */
|
|
11
|
+
isTransliterationEnabled?: boolean;
|
|
12
|
+
onChange: (value: string, rawValue: IInputRawValue, event?: FormEvent<HTMLInputElement> | ClipboardEvent<HTMLInputElement>) => void;
|
|
11
13
|
}
|
|
12
14
|
export declare const SmartInput: import("react").ForwardRefExoticComponent<ISmartInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ICharactersMap } from './types';
|
|
1
2
|
export declare const SMART_INPUT_REGEX_MAP: {
|
|
2
3
|
default: RegExp;
|
|
3
4
|
agencyName: RegExp;
|
|
@@ -10,9 +11,6 @@ export declare const SMART_INPUT_REGEX_MAP: {
|
|
|
10
11
|
docNumber: RegExp;
|
|
11
12
|
benefitCert: RegExp;
|
|
12
13
|
};
|
|
13
|
-
export declare const CharactersMap:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export declare const TransliterationMap: {
|
|
17
|
-
[key: string]: string;
|
|
18
|
-
};
|
|
14
|
+
export declare const CharactersMap: ICharactersMap;
|
|
15
|
+
export declare const EmailCharactersMap: ICharactersMap;
|
|
16
|
+
export declare const TransliterationMap: ICharactersMap;
|
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const
|
|
3
|
-
[key: string]: string;
|
|
4
|
-
}, symbol: string) => string;
|
|
1
|
+
import { ICharactersMap } from './types';
|
|
2
|
+
export declare const mapSymbols: (str: string, regex: RegExp, charactersMap: ICharactersMap, isTransliterationEnabled: boolean) => string;
|
|
@@ -1 +1,6 @@
|
|
|
1
|
+
export type ICharactersMap = Record<string, string>;
|
|
2
|
+
export interface IInputRawValue {
|
|
3
|
+
rawValue: string;
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
}
|
|
1
6
|
export type ISmartType = 'name' | 'nameRuEn' | 'surname' | 'surnameRuEn' | 'email' | 'agencyName' | 'default' | 'digits' | 'docNumber' | 'benefitCert';
|