@homecode/ui 4.19.9 → 4.20.0-beta-1
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/dist/esm/index.js +1 -0
- package/dist/esm/src/components/Autocomplete/Autocomplete.js +3 -1
- package/dist/esm/src/components/Input/Input.js +150 -200
- package/dist/esm/src/components/Input/Input.styl.js +2 -2
- package/dist/esm/src/components/InputFile/InputFile.js +2 -1
- package/dist/esm/src/components/Notifications/Notifications.js +7 -7
- package/dist/esm/src/components/Popup/Popup.js +28 -31
- package/dist/esm/src/components/Router/Link/Link.js +4 -3
- package/dist/esm/src/components/Router/Route.js +3 -1
- package/dist/esm/src/components/Router/Router.js +4 -2
- package/dist/esm/src/components/Select/Select.js +5 -5
- package/dist/esm/src/components/Select/Select2.js +307 -0
- package/dist/esm/src/hooks/useThrottle.js +28 -0
- package/dist/esm/src/services/i18n.js +13 -7
- package/dist/esm/types/src/components/Icon/Icon.d.ts +2 -0
- package/dist/esm/types/src/components/Input/Input.d.ts +1 -42
- package/dist/esm/types/src/components/Lazy/Lazy.d.ts +1 -0
- package/dist/esm/types/src/components/Notifications/Notifications.d.ts +5 -1
- package/dist/esm/types/src/components/Popup/Popup.d.ts +8 -1
- package/dist/esm/types/src/components/Router/Link/Link.d.ts +2 -1
- package/dist/esm/types/src/components/Router/Route.d.ts +4 -4
- package/dist/esm/types/src/components/Select/Select.d.ts +1 -2
- package/dist/esm/types/src/components/Select/Select.helpers.d.ts +1 -1
- package/dist/esm/types/src/components/Select/Select.types.d.ts +5 -3
- package/dist/esm/types/src/components/Select/Select2.d.ts +2 -0
- package/dist/esm/types/src/components/index.d.ts +1 -0
- package/dist/esm/types/src/hooks/useThrottle.d.ts +5 -0
- package/dist/esm/types/src/services/i18n.d.ts +14 -4
- package/package.json +2 -2
|
@@ -1,44 +1,3 @@
|
|
|
1
|
-
import { Component, ChangeEvent } from 'react';
|
|
2
1
|
import * as T from './Input.types';
|
|
3
2
|
export type InputProps = T.Props;
|
|
4
|
-
export declare
|
|
5
|
-
inputRef: import("react").RefObject<HTMLInputElement>;
|
|
6
|
-
isClearPressed: boolean;
|
|
7
|
-
cursorPos: number;
|
|
8
|
-
prevLabelText: string;
|
|
9
|
-
store: any;
|
|
10
|
-
uid: any;
|
|
11
|
-
static defaultProps: {
|
|
12
|
-
type: string;
|
|
13
|
-
size: string;
|
|
14
|
-
variant: string;
|
|
15
|
-
};
|
|
16
|
-
constructor(props: T.Props);
|
|
17
|
-
componentDidMount(): void;
|
|
18
|
-
componentDidUpdate(prevProps: T.Props): void;
|
|
19
|
-
updateAutoComplete(): void;
|
|
20
|
-
updateSelection(): void;
|
|
21
|
-
updateLabelPosition(): void;
|
|
22
|
-
updateHasValue(): void;
|
|
23
|
-
hasValue(value?: any): boolean;
|
|
24
|
-
isTextArea: () => boolean;
|
|
25
|
-
isNumber: () => boolean;
|
|
26
|
-
isLabelOnTop(hasValue?: any): any;
|
|
27
|
-
getValue(val?: any): any;
|
|
28
|
-
onTextareaPaste: (e: any) => void;
|
|
29
|
-
pasteToTextarea: any;
|
|
30
|
-
onClearPress: (e: any) => void;
|
|
31
|
-
onDocKeyUp: (e: KeyboardEvent) => void;
|
|
32
|
-
handleChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
33
|
-
onChange: (value: string, e?: ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
-
onNumberWheel: (delta: any) => void;
|
|
35
|
-
onTextAreaInput: (e: any) => void;
|
|
36
|
-
onLabelClipPathChange: (clipPath: string) => string;
|
|
37
|
-
onTypingEnd: () => void;
|
|
38
|
-
onFocus: (e: any) => void;
|
|
39
|
-
onBlur: (e: any) => void;
|
|
40
|
-
getControlProps(): T.ControlProps;
|
|
41
|
-
wrapControll(control: any): JSX.Element;
|
|
42
|
-
renderAddon(type: 'right' | 'left'): JSX.Element;
|
|
43
|
-
render(): JSX.Element;
|
|
44
|
-
}
|
|
3
|
+
export declare const Input: (props: T.Props) => JSX.Element;
|
|
@@ -16,7 +16,6 @@ export declare class Popup extends Component<T.Props> {
|
|
|
16
16
|
needDropOffset: boolean;
|
|
17
17
|
id: any;
|
|
18
18
|
parentPopupContent: any;
|
|
19
|
-
store: any;
|
|
20
19
|
timers: any;
|
|
21
20
|
scrollParent: any;
|
|
22
21
|
offset: {
|
|
@@ -28,6 +27,14 @@ export declare class Popup extends Component<T.Props> {
|
|
|
28
27
|
direction: string;
|
|
29
28
|
animated: boolean;
|
|
30
29
|
};
|
|
30
|
+
state: {
|
|
31
|
+
rootPopupId: any;
|
|
32
|
+
isOpen: boolean;
|
|
33
|
+
isContentVisible: boolean;
|
|
34
|
+
animating: boolean;
|
|
35
|
+
direction: T.Direction;
|
|
36
|
+
triggerBounds: any;
|
|
37
|
+
};
|
|
31
38
|
constructor(props: any);
|
|
32
39
|
componentDidMount(): void;
|
|
33
40
|
componentDidUpdate(prevProps: T.Props): void;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import * as T from './Link.types';
|
|
2
|
+
export declare const Link: ({ className, exactClassName, children, href: hrefProp, isClear, isDisabled, disableExternalIcon, inline, isPartialExact, onClick, ...rest }: T.Props) => JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as T from './Router.types';
|
|
2
|
-
export declare
|
|
3
|
-
|
|
4
|
-
displayName: string;
|
|
5
|
-
}
|
|
2
|
+
export declare function Route<T extends T.RouteProps>(props: T.RouteProps): any;
|
|
3
|
+
export declare namespace Route {
|
|
4
|
+
var displayName: string;
|
|
5
|
+
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as H from './Select.helpers';
|
|
2
2
|
import * as T from './Select.types';
|
|
3
3
|
import { Component, ReactNode } from 'react';
|
|
4
|
-
import { Input } from 'uilib/components/Input/Input';
|
|
5
4
|
export declare const SelectHelpers: typeof H;
|
|
6
5
|
export declare class Select extends Component<T.Props, T.State> {
|
|
7
6
|
store: any;
|
|
8
|
-
inputRef: import("react").RefObject<Input>;
|
|
7
|
+
inputRef: import("react").RefObject<(props: import("../Input/Input.types").Props) => JSX.Element>;
|
|
9
8
|
triggerInputRef: import("react").RefObject<HTMLDivElement>;
|
|
10
9
|
contentRef: import("react").RefObject<HTMLDivElement>;
|
|
11
10
|
scrollInnerElem: HTMLDivElement;
|
|
@@ -30,13 +30,14 @@ type InheritedInputProps = Partial<Pick<InputProps, 'onFocus' | 'onBlur'>>;
|
|
|
30
30
|
export type Props = FormControl<Value> & InheritedInputProps & {
|
|
31
31
|
className?: string;
|
|
32
32
|
isOpen?: boolean;
|
|
33
|
+
closeOnSelect?: boolean;
|
|
33
34
|
optionsClassName?: string;
|
|
34
35
|
optionClassName?: string;
|
|
35
36
|
additionalLabel?: ReactNode;
|
|
36
37
|
size?: Size;
|
|
37
38
|
variant?: 'default' | 'outlined';
|
|
38
39
|
showSelectedCount?: boolean;
|
|
39
|
-
|
|
40
|
+
disableLabel?: boolean;
|
|
40
41
|
blur?: boolean;
|
|
41
42
|
options: Option[];
|
|
42
43
|
additionalOptions?: Option[];
|
|
@@ -47,7 +48,7 @@ export type Props = FormControl<Value> & InheritedInputProps & {
|
|
|
47
48
|
searchValue?: string;
|
|
48
49
|
expandSelected?: boolean;
|
|
49
50
|
onChange: (value: Value) => void;
|
|
50
|
-
|
|
51
|
+
onSearchChange?: (value: string) => void;
|
|
51
52
|
onOpen?: () => void;
|
|
52
53
|
onClose?: () => void;
|
|
53
54
|
isSearchable?: boolean;
|
|
@@ -68,7 +69,8 @@ export type State = {
|
|
|
68
69
|
searchVal: string;
|
|
69
70
|
options: Option[];
|
|
70
71
|
labelClipPath: string;
|
|
71
|
-
|
|
72
|
+
optionsUpdated: number;
|
|
73
|
+
focusedItemIndex: number;
|
|
72
74
|
};
|
|
73
75
|
export type OptionElemProps = HTMLAttributes<HTMLDivElement> & {
|
|
74
76
|
className: string;
|
|
@@ -28,6 +28,7 @@ export * from './PopupMenu/PopupMenu';
|
|
|
28
28
|
export * from './Router/Router';
|
|
29
29
|
export * from './RequiredStar/RequiredStar';
|
|
30
30
|
export * from './Select/Select';
|
|
31
|
+
export * from './Select/Select2';
|
|
31
32
|
export * from './Scroll/Scroll';
|
|
32
33
|
export * from './Shimmer/Shimmer';
|
|
33
34
|
export * from './Spinner/Spinner';
|
|
@@ -4,12 +4,22 @@ type LangLoader = () => Promise<{
|
|
|
4
4
|
type RegisterConfig = {
|
|
5
5
|
[lang: string]: LangLoader;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type I18NProps = {
|
|
8
|
+
id?: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
props?: number | Record<string, any>;
|
|
11
|
+
};
|
|
12
|
+
export declare const store: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
13
|
+
lang: string | void;
|
|
14
|
+
changeLang(lang: any): Promise<void>;
|
|
15
|
+
}>;
|
|
8
16
|
export declare function init(config: RegisterConfig): {
|
|
9
17
|
storeName: string;
|
|
10
|
-
componentStore:
|
|
11
|
-
|
|
18
|
+
componentStore: import("justorm/dist/esm/proxy").ProxyStore<{
|
|
19
|
+
_updated: string;
|
|
20
|
+
}>;
|
|
21
|
+
withI18N: (Component: any) => (props: any) => JSX.Element;
|
|
12
22
|
i18n: (key: any, props?: any) => any;
|
|
13
|
-
I18N: import("react").
|
|
23
|
+
I18N: import("react").NamedExoticComponent<I18NProps>;
|
|
14
24
|
};
|
|
15
25
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@homecode/ui",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.20.0-beta-1",
|
|
4
4
|
"description": "React UI components library",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"fastest-validator": "^1.16.0",
|
|
50
50
|
"favicons": "^7.1.3",
|
|
51
51
|
"favicons-webpack-plugin": "^6.0.0",
|
|
52
|
-
"justorm": "
|
|
52
|
+
"justorm": "3.0.0-beta-24",
|
|
53
53
|
"lodash.omit": "^4.5.0",
|
|
54
54
|
"lodash.pick": "^4.4.0",
|
|
55
55
|
"moment": "^2.29.4",
|