colibri-ui 0.7.69 → 0.7.71
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/Counter/index.js +6 -2
- package/Icons/Minus.js +5 -3
- package/Icons/Plus.js +6 -8
- package/Input/index.js +3 -1
- package/Input/index.props.d.ts +2 -1
- package/esm/Counter/index.js +6 -2
- package/esm/Icons/Minus.js +5 -3
- package/esm/Icons/Plus.js +6 -8
- package/esm/Input/index.js +3 -1
- package/esm/Input/index.props.d.ts +2 -1
- package/package.json +1 -1
package/Counter/index.js
CHANGED
|
@@ -43,7 +43,9 @@ var Counter = function Counter(_a) {
|
|
|
43
43
|
height: 16
|
|
44
44
|
}),
|
|
45
45
|
disabled: minusDisabled,
|
|
46
|
-
|
|
46
|
+
type: "button",
|
|
47
|
+
onClick: function onClick(e) {
|
|
48
|
+
e.stopPropagation();
|
|
47
49
|
onChange(value - 1);
|
|
48
50
|
lastNumValue.current = value - 1;
|
|
49
51
|
},
|
|
@@ -56,7 +58,9 @@ var Counter = function Counter(_a) {
|
|
|
56
58
|
height: 16
|
|
57
59
|
}),
|
|
58
60
|
disabled: plusDisabled,
|
|
59
|
-
|
|
61
|
+
type: "button",
|
|
62
|
+
onClick: function onClick(e) {
|
|
63
|
+
e.stopPropagation();
|
|
60
64
|
onChange(value + 1);
|
|
61
65
|
lastNumValue.current = value + 1;
|
|
62
66
|
},
|
package/Icons/Minus.js
CHANGED
|
@@ -20,12 +20,14 @@ var MinusIcon = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
20
20
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
21
|
width: width,
|
|
22
22
|
height: height,
|
|
23
|
-
|
|
23
|
+
fill: "none",
|
|
24
|
+
viewBox: "0 0 16 16",
|
|
24
25
|
ref: ref
|
|
25
26
|
}, props), /*#__PURE__*/React__default.default.createElement("path", {
|
|
26
27
|
fill: fill,
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
d: "M12.5 9.5h-9C2.7 9.5 2 8.8 2 8s.7-1.5 1.5-1.5h9c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5z",
|
|
30
|
+
clipRule: "evenodd"
|
|
29
31
|
}));
|
|
30
32
|
});
|
|
31
33
|
|
package/Icons/Plus.js
CHANGED
|
@@ -13,22 +13,20 @@ var PlusIcon = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
13
13
|
var _b = _a.fill,
|
|
14
14
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
15
15
|
_c = _a.width,
|
|
16
|
-
width = _c === void 0 ?
|
|
16
|
+
width = _c === void 0 ? 18 : _c,
|
|
17
17
|
_d = _a.height,
|
|
18
|
-
height = _d === void 0 ?
|
|
18
|
+
height = _d === void 0 ? 18 : _d,
|
|
19
19
|
props = tslib.__rest(_a, ["fill", "width", "height"]);
|
|
20
20
|
return /*#__PURE__*/React__default.default.createElement("svg", tslib.__assign({
|
|
21
21
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22
22
|
width: width,
|
|
23
23
|
height: height,
|
|
24
|
+
viewBox: "0 0 18 18",
|
|
24
25
|
ref: ref
|
|
25
|
-
}, props, {
|
|
26
|
-
fill: "none"
|
|
27
|
-
}), /*#__PURE__*/React__default.default.createElement("path", {
|
|
26
|
+
}, props), /*#__PURE__*/React__default.default.createElement("path", {
|
|
28
27
|
fill: fill,
|
|
29
|
-
fillRule: "
|
|
30
|
-
d: "
|
|
31
|
-
clipRule: "evenodd"
|
|
28
|
+
fillRule: "nonzero",
|
|
29
|
+
d: "M15.517 7.642h-5.16v-5.16a1.358 1.358 0 0 0-2.715 0v5.16h-5.16a1.358 1.358 0 0 0 0 2.716h5.16v5.16a1.358 1.358 0 0 0 2.716 0v-5.16h5.16a1.358 1.358 0 0 0 0-2.716"
|
|
32
30
|
}));
|
|
33
31
|
});
|
|
34
32
|
|
package/Input/index.js
CHANGED
|
@@ -23,11 +23,12 @@ var Input = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
23
23
|
error = _a.error,
|
|
24
24
|
required = _a.required,
|
|
25
25
|
onChange = _a.onChange,
|
|
26
|
+
inputRef = _a.inputRef,
|
|
26
27
|
_b = _a.variant,
|
|
27
28
|
variant = _b === void 0 ? "primary" : _b,
|
|
28
29
|
_c = _a.size,
|
|
29
30
|
size = _c === void 0 ? "m" : _c,
|
|
30
|
-
props = tslib.__rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "error", "required", "onChange", "variant", "size"]);
|
|
31
|
+
props = tslib.__rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "error", "required", "onChange", "inputRef", "variant", "size"]);
|
|
31
32
|
return /*#__PURE__*/React__default.default.createElement(index.default, {
|
|
32
33
|
className: classNames__default.default(className),
|
|
33
34
|
label: label,
|
|
@@ -43,6 +44,7 @@ var Input = /*#__PURE__*/React.forwardRef(function (_a, ref) {
|
|
|
43
44
|
disabled: !!props.disabled,
|
|
44
45
|
error: error
|
|
45
46
|
}, /*#__PURE__*/React__default.default.createElement(index$2.default, tslib.__assign({
|
|
47
|
+
ref: inputRef,
|
|
46
48
|
onChange: onChange,
|
|
47
49
|
type: "text"
|
|
48
50
|
}, props))));
|
package/Input/index.props.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, ReactNode } 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"> {
|
|
@@ -11,4 +11,5 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
11
11
|
hint?: ReactNode;
|
|
12
12
|
error?: boolean;
|
|
13
13
|
required?: boolean;
|
|
14
|
+
inputRef?: ForwardedRef<HTMLInputElement>;
|
|
14
15
|
}
|
package/esm/Counter/index.js
CHANGED
|
@@ -33,7 +33,9 @@ var Counter = function Counter(_a) {
|
|
|
33
33
|
height: 16
|
|
34
34
|
}),
|
|
35
35
|
disabled: minusDisabled,
|
|
36
|
-
|
|
36
|
+
type: "button",
|
|
37
|
+
onClick: function onClick(e) {
|
|
38
|
+
e.stopPropagation();
|
|
37
39
|
onChange(value - 1);
|
|
38
40
|
lastNumValue.current = value - 1;
|
|
39
41
|
},
|
|
@@ -46,7 +48,9 @@ var Counter = function Counter(_a) {
|
|
|
46
48
|
height: 16
|
|
47
49
|
}),
|
|
48
50
|
disabled: plusDisabled,
|
|
49
|
-
|
|
51
|
+
type: "button",
|
|
52
|
+
onClick: function onClick(e) {
|
|
53
|
+
e.stopPropagation();
|
|
50
54
|
onChange(value + 1);
|
|
51
55
|
lastNumValue.current = value + 1;
|
|
52
56
|
},
|
package/esm/Icons/Minus.js
CHANGED
|
@@ -12,12 +12,14 @@ var MinusIcon = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
12
12
|
return /*#__PURE__*/React__default.createElement("svg", __assign({
|
|
13
13
|
width: width,
|
|
14
14
|
height: height,
|
|
15
|
-
|
|
15
|
+
fill: "none",
|
|
16
|
+
viewBox: "0 0 16 16",
|
|
16
17
|
ref: ref
|
|
17
18
|
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
18
19
|
fill: fill,
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
fillRule: "evenodd",
|
|
21
|
+
d: "M12.5 9.5h-9C2.7 9.5 2 8.8 2 8s.7-1.5 1.5-1.5h9c.8 0 1.5.7 1.5 1.5s-.7 1.5-1.5 1.5z",
|
|
22
|
+
clipRule: "evenodd"
|
|
21
23
|
}));
|
|
22
24
|
});
|
|
23
25
|
|
package/esm/Icons/Plus.js
CHANGED
|
@@ -5,22 +5,20 @@ var PlusIcon = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
5
5
|
var _b = _a.fill,
|
|
6
6
|
fill = _b === void 0 ? "currentColor" : _b,
|
|
7
7
|
_c = _a.width,
|
|
8
|
-
width = _c === void 0 ?
|
|
8
|
+
width = _c === void 0 ? 18 : _c,
|
|
9
9
|
_d = _a.height,
|
|
10
|
-
height = _d === void 0 ?
|
|
10
|
+
height = _d === void 0 ? 18 : _d,
|
|
11
11
|
props = __rest(_a, ["fill", "width", "height"]);
|
|
12
12
|
return /*#__PURE__*/React__default.createElement("svg", __assign({
|
|
13
13
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14
14
|
width: width,
|
|
15
15
|
height: height,
|
|
16
|
+
viewBox: "0 0 18 18",
|
|
16
17
|
ref: ref
|
|
17
|
-
}, props, {
|
|
18
|
-
fill: "none"
|
|
19
|
-
}), /*#__PURE__*/React__default.createElement("path", {
|
|
18
|
+
}, props), /*#__PURE__*/React__default.createElement("path", {
|
|
20
19
|
fill: fill,
|
|
21
|
-
fillRule: "
|
|
22
|
-
d: "
|
|
23
|
-
clipRule: "evenodd"
|
|
20
|
+
fillRule: "nonzero",
|
|
21
|
+
d: "M15.517 7.642h-5.16v-5.16a1.358 1.358 0 0 0-2.715 0v5.16h-5.16a1.358 1.358 0 0 0 0 2.716h5.16v5.16a1.358 1.358 0 0 0 2.716 0v-5.16h5.16a1.358 1.358 0 0 0 0-2.716"
|
|
24
22
|
}));
|
|
25
23
|
});
|
|
26
24
|
|
package/esm/Input/index.js
CHANGED
|
@@ -14,11 +14,12 @@ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
14
14
|
error = _a.error,
|
|
15
15
|
required = _a.required,
|
|
16
16
|
onChange = _a.onChange,
|
|
17
|
+
inputRef = _a.inputRef,
|
|
17
18
|
_b = _a.variant,
|
|
18
19
|
variant = _b === void 0 ? "primary" : _b,
|
|
19
20
|
_c = _a.size,
|
|
20
21
|
size = _c === void 0 ? "m" : _c,
|
|
21
|
-
props = __rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "error", "required", "onChange", "variant", "size"]);
|
|
22
|
+
props = __rest(_a, ["className", "startIcon", "endIcon", "label", "hint", "error", "required", "onChange", "inputRef", "variant", "size"]);
|
|
22
23
|
return /*#__PURE__*/React__default.createElement(FormField, {
|
|
23
24
|
className: classNames(className),
|
|
24
25
|
label: label,
|
|
@@ -34,6 +35,7 @@ var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
|
|
|
34
35
|
disabled: !!props.disabled,
|
|
35
36
|
error: error
|
|
36
37
|
}, /*#__PURE__*/React__default.createElement(BaseInput, __assign({
|
|
38
|
+
ref: inputRef,
|
|
37
39
|
onChange: onChange,
|
|
38
40
|
type: "text"
|
|
39
41
|
}, props))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, InputHTMLAttributes, ReactNode } from "react";
|
|
1
|
+
import type { ChangeEvent, ForwardedRef, InputHTMLAttributes, ReactNode } 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"> {
|
|
@@ -11,4 +11,5 @@ export interface InputProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
|
|
|
11
11
|
hint?: ReactNode;
|
|
12
12
|
error?: boolean;
|
|
13
13
|
required?: boolean;
|
|
14
|
+
inputRef?: ForwardedRef<HTMLInputElement>;
|
|
14
15
|
}
|