@scaleflex/ui-tw 0.0.66 → 0.0.67
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"@radix-ui/react-slot": "^1.1.2",
|
|
24
24
|
"@radix-ui/react-switch": "^1.0.1",
|
|
25
25
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
26
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
26
|
+
"@scaleflex/icons-tw": "^0.0.67",
|
|
27
27
|
"@tanstack/react-table": "^8.21.3",
|
|
28
28
|
"@types/lodash.merge": "^4.6.9",
|
|
29
29
|
"class-variance-authority": "^0.7.1",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { InputProps } from '@scaleflex/ui-tw/input';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare function Search({ className, size, disabled, readOnly, ...rest }: InputProps): React.JSX.Element;
|
|
3
|
+
export declare function Search({ className, size, disabled, readOnly, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/extends";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["className", "size", "disabled", "readOnly"];
|
|
5
|
+
var _excluded = ["className", "size", "disabled", "readOnly", "onChange"];
|
|
6
6
|
import { buttonVariants } from '@scaleflex/ui-tw/button';
|
|
7
7
|
import { ButtonVariant, buttonBaseClassNames } from '@scaleflex/ui-tw/button/button.constants';
|
|
8
8
|
import { Input } from '@scaleflex/ui-tw/input';
|
|
@@ -19,6 +19,7 @@ export function Search(_ref) {
|
|
|
19
19
|
size = _ref$size === void 0 ? FormSize.Md : _ref$size,
|
|
20
20
|
disabled = _ref.disabled,
|
|
21
21
|
readOnly = _ref.readOnly,
|
|
22
|
+
_onChange = _ref.onChange,
|
|
22
23
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
24
|
var padding = searchPaddingMap[size];
|
|
24
25
|
var iconSize = iconSizeOptions[size];
|
|
@@ -28,14 +29,13 @@ export function Search(_ref) {
|
|
|
28
29
|
value = _useState2[0],
|
|
29
30
|
setValue = _useState2[1];
|
|
30
31
|
var handleClear = function handleClear() {
|
|
31
|
-
var _rest$onChange;
|
|
32
32
|
var syntheticEvent = {
|
|
33
33
|
target: {
|
|
34
34
|
value: ''
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
setValue('');
|
|
38
|
-
|
|
38
|
+
_onChange === null || _onChange === void 0 || _onChange(syntheticEvent);
|
|
39
39
|
};
|
|
40
40
|
return /*#__PURE__*/React.createElement("div", {
|
|
41
41
|
className: "relative w-full"
|
|
@@ -44,9 +44,8 @@ export function Search(_ref) {
|
|
|
44
44
|
}), /*#__PURE__*/React.createElement(Input, _extends({
|
|
45
45
|
value: value,
|
|
46
46
|
onChange: function onChange(e) {
|
|
47
|
-
var _rest$onChange2;
|
|
48
47
|
setValue(e.target.value);
|
|
49
|
-
|
|
48
|
+
_onChange === null || _onChange === void 0 || _onChange(e);
|
|
50
49
|
},
|
|
51
50
|
type: "search",
|
|
52
51
|
size: size,
|