colibri-ui 0.8.36 → 0.8.37
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/Input/index.d.ts +1 -1
- package/Input/index.js +7 -1
- package/Input/index.props.d.ts +5 -1
- package/esm/Input/index.d.ts +1 -1
- package/esm/Input/index.js +7 -1
- package/esm/Input/index.props.d.ts +5 -1
- package/package.json +1 -1
package/Input/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { InputProps } from "./index.props";
|
|
3
|
-
declare const Input: ({ className, startIcon, endIcon, label, hint, hasError, required, onChange, inputRef, disabled, variant, size, ref, ...props }: InputProps) => React.JSX.Element;
|
|
3
|
+
declare const Input: ({ className, startIcon, endIcon, label, hint, hasError, required, onChange, onFocus, onBlur, onKeyDown, inputRef, disabled, variant, size, ref, ...props }: InputProps) => React.JSX.Element;
|
|
4
4
|
export default Input;
|
package/Input/index.js
CHANGED
|
@@ -23,6 +23,9 @@ var Input = function Input(_a) {
|
|
|
23
23
|
hasError = _a.hasError,
|
|
24
24
|
required = _a.required,
|
|
25
25
|
onChange = _a.onChange,
|
|
26
|
+
onFocus = _a.onFocus,
|
|
27
|
+
onBlur = _a.onBlur,
|
|
28
|
+
onKeyDown = _a.onKeyDown,
|
|
26
29
|
inputRef = _a.inputRef,
|
|
27
30
|
disabled = _a.disabled,
|
|
28
31
|
_a$variant = _a.variant,
|
|
@@ -30,7 +33,7 @@ var Input = function Input(_a) {
|
|
|
30
33
|
_a$size = _a.size,
|
|
31
34
|
size = _a$size === void 0 ? "m" : _a$size,
|
|
32
35
|
ref = _a.ref,
|
|
33
|
-
props = tslib.__rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "hasError", "required", "onChange", "inputRef", "disabled", "variant", "size", "ref"]);
|
|
36
|
+
props = tslib.__rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "hasError", "required", "onChange", "onFocus", "onBlur", "onKeyDown", "inputRef", "disabled", "variant", "size", "ref"]);
|
|
34
37
|
return /*#__PURE__*/React__default.default.createElement(index.default, {
|
|
35
38
|
className: classNames__default.default(className),
|
|
36
39
|
label: label,
|
|
@@ -48,6 +51,9 @@ var Input = function Input(_a) {
|
|
|
48
51
|
}, /*#__PURE__*/React__default.default.createElement(index$2.default, Object.assign({
|
|
49
52
|
ref: inputRef,
|
|
50
53
|
onChange: onChange,
|
|
54
|
+
onFocus: onFocus,
|
|
55
|
+
onBlur: onBlur,
|
|
56
|
+
onKeyDown: onKeyDown,
|
|
51
57
|
type: "text"
|
|
52
58
|
}, props))));
|
|
53
59
|
};
|
package/Input/index.props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
1
|
+
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, ReactNode, FocusEvent, KeyboardEvent, FormEvent, Ref } from "react";
|
|
2
2
|
import type { FormFieldProps } from "../base/FormField/index.props";
|
|
3
3
|
import type { Size, Variant } from "../base/InputRoot/index.props";
|
|
4
4
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "size">, Omit<FormFieldProps, "children"> {
|
|
@@ -8,6 +8,10 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
8
8
|
inputRef?: ForwardedRef<HTMLInputElement>;
|
|
9
9
|
label?: ReactNode;
|
|
10
10
|
onChange?: (e: ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
11
|
+
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
12
|
+
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
13
|
+
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
+
onInput?: (event: FormEvent<HTMLInputElement>) => void;
|
|
11
15
|
ref?: Ref<HTMLInputElement>;
|
|
12
16
|
required?: boolean;
|
|
13
17
|
size?: Size;
|
package/esm/Input/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { InputProps } from "./index.props";
|
|
3
|
-
declare const Input: ({ className, startIcon, endIcon, label, hint, hasError, required, onChange, inputRef, disabled, variant, size, ref, ...props }: InputProps) => React.JSX.Element;
|
|
3
|
+
declare const Input: ({ className, startIcon, endIcon, label, hint, hasError, required, onChange, onFocus, onBlur, onKeyDown, inputRef, disabled, variant, size, ref, ...props }: InputProps) => React.JSX.Element;
|
|
4
4
|
export default Input;
|
package/esm/Input/index.js
CHANGED
|
@@ -14,6 +14,9 @@ var Input = function Input(_a) {
|
|
|
14
14
|
hasError = _a.hasError,
|
|
15
15
|
required = _a.required,
|
|
16
16
|
onChange = _a.onChange,
|
|
17
|
+
onFocus = _a.onFocus,
|
|
18
|
+
onBlur = _a.onBlur,
|
|
19
|
+
onKeyDown = _a.onKeyDown,
|
|
17
20
|
inputRef = _a.inputRef,
|
|
18
21
|
disabled = _a.disabled,
|
|
19
22
|
_a$variant = _a.variant,
|
|
@@ -21,7 +24,7 @@ var Input = function Input(_a) {
|
|
|
21
24
|
_a$size = _a.size,
|
|
22
25
|
size = _a$size === void 0 ? "m" : _a$size,
|
|
23
26
|
ref = _a.ref,
|
|
24
|
-
props = __rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "hasError", "required", "onChange", "inputRef", "disabled", "variant", "size", "ref"]);
|
|
27
|
+
props = __rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "hasError", "required", "onChange", "onFocus", "onBlur", "onKeyDown", "inputRef", "disabled", "variant", "size", "ref"]);
|
|
25
28
|
return /*#__PURE__*/React__default.createElement(FormField, {
|
|
26
29
|
className: classNames(className),
|
|
27
30
|
label: label,
|
|
@@ -39,6 +42,9 @@ var Input = function Input(_a) {
|
|
|
39
42
|
}, /*#__PURE__*/React__default.createElement(BaseInput, Object.assign({
|
|
40
43
|
ref: inputRef,
|
|
41
44
|
onChange: onChange,
|
|
45
|
+
onFocus: onFocus,
|
|
46
|
+
onBlur: onBlur,
|
|
47
|
+
onKeyDown: onKeyDown,
|
|
42
48
|
type: "text"
|
|
43
49
|
}, props))));
|
|
44
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
1
|
+
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, ReactNode, FocusEvent, KeyboardEvent, FormEvent, Ref } from "react";
|
|
2
2
|
import type { FormFieldProps } from "../base/FormField/index.props";
|
|
3
3
|
import type { Size, Variant } from "../base/InputRoot/index.props";
|
|
4
4
|
export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "size">, Omit<FormFieldProps, "children"> {
|
|
@@ -8,6 +8,10 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
8
8
|
inputRef?: ForwardedRef<HTMLInputElement>;
|
|
9
9
|
label?: ReactNode;
|
|
10
10
|
onChange?: (e: ChangeEvent<HTMLInputElement>, value: string) => void;
|
|
11
|
+
onFocus?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
12
|
+
onBlur?: (event: FocusEvent<HTMLInputElement>) => void;
|
|
13
|
+
onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
14
|
+
onInput?: (event: FormEvent<HTMLInputElement>) => void;
|
|
11
15
|
ref?: Ref<HTMLInputElement>;
|
|
12
16
|
required?: boolean;
|
|
13
17
|
size?: Size;
|