@scaleflex/ui-tw 0.0.137 → 0.0.139
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.
|
@@ -3,5 +3,5 @@ import type { InputProps } from './input.types';
|
|
|
3
3
|
declare const inputVariants: (props?: ({
|
|
4
4
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
|
-
declare function Input({ className, type, size, disabled, readOnly, icon: Icon, suffix, clearable, onClear, value, ...props }: InputProps): React.JSX.Element;
|
|
6
|
+
declare function Input({ className, wrapperClassName, type, size, disabled, readOnly, icon: Icon, suffix, clearable, onClear, value, ...props }: InputProps): React.JSX.Element;
|
|
7
7
|
export { Input, inputVariants };
|
package/input/input.component.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "type", "size", "disabled", "readOnly", "icon", "suffix", "clearable", "onClear", "value"];
|
|
4
|
+
var _excluded = ["className", "wrapperClassName", "type", "size", "disabled", "readOnly", "icon", "suffix", "clearable", "onClear", "value"];
|
|
5
5
|
import { buttonVariants } from '@scaleflex/ui-tw/button';
|
|
6
6
|
import { ButtonVariant } from '@scaleflex/ui-tw/button/button.constants';
|
|
7
7
|
import { getBaseInputClasses, readOnlyClassNames, selectionHighlightClassNames } from '@scaleflex/ui-tw/styles/shared-classes';
|
|
@@ -45,6 +45,7 @@ var inputSuffixSizeVariants = cva('', {
|
|
|
45
45
|
});
|
|
46
46
|
function Input(_ref) {
|
|
47
47
|
var className = _ref.className,
|
|
48
|
+
wrapperClassName = _ref.wrapperClassName,
|
|
48
49
|
_ref$type = _ref.type,
|
|
49
50
|
type = _ref$type === void 0 ? InputType.Text : _ref$type,
|
|
50
51
|
_ref$size = _ref.size,
|
|
@@ -79,7 +80,7 @@ function Input(_ref) {
|
|
|
79
80
|
return inputElement;
|
|
80
81
|
}
|
|
81
82
|
return /*#__PURE__*/React.createElement("div", {
|
|
82
|
-
className: cn('relative', className)
|
|
83
|
+
className: cn('relative', className, wrapperClassName)
|
|
83
84
|
}, inputElement, Icon && /*#__PURE__*/React.createElement(Icon, {
|
|
84
85
|
className: cn(inputIconSizeVariants({
|
|
85
86
|
size: size
|
package/input/input.types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleflex/ui-tw",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.139",
|
|
4
4
|
"author": "scaleflex",
|
|
5
5
|
"repository": "github:scaleflex/ui",
|
|
6
6
|
"homepage": "https://github.com/scaleflex/ui/blob/master/README.md",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@radix-ui/react-switch": "^1.0.1",
|
|
30
30
|
"@radix-ui/react-tabs": "^1.1.13",
|
|
31
31
|
"@radix-ui/react-tooltip": "^1.2.6",
|
|
32
|
-
"@scaleflex/icons-tw": "^0.0.
|
|
32
|
+
"@scaleflex/icons-tw": "^0.0.139",
|
|
33
33
|
"@tanstack/react-table": "^8.21.3",
|
|
34
34
|
"@types/lodash.merge": "^4.6.9",
|
|
35
35
|
"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, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
3
|
+
export declare function Search({ className, wrapperClassName, size, disabled, readOnly, onChange, ...rest }: InputProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
-
var _excluded = ["className", "size", "disabled", "readOnly", "onChange"];
|
|
4
|
+
var _excluded = ["className", "wrapperClassName", "size", "disabled", "readOnly", "onChange"];
|
|
5
5
|
import { buttonVariants } from '@scaleflex/ui-tw/button';
|
|
6
6
|
import { ButtonVariant } from '@scaleflex/ui-tw/button/button.constants';
|
|
7
7
|
import { Input } from '@scaleflex/ui-tw/input';
|
|
@@ -13,6 +13,7 @@ import React, { useState } from 'react';
|
|
|
13
13
|
export function Search(_ref) {
|
|
14
14
|
var _rest$value$toString, _rest$value;
|
|
15
15
|
var className = _ref.className,
|
|
16
|
+
wrapperClassName = _ref.wrapperClassName,
|
|
16
17
|
_ref$size = _ref.size,
|
|
17
18
|
size = _ref$size === void 0 ? FormSize.Md : _ref$size,
|
|
18
19
|
disabled = _ref.disabled,
|
|
@@ -36,7 +37,7 @@ export function Search(_ref) {
|
|
|
36
37
|
_onChange === null || _onChange === void 0 || _onChange(syntheticEvent);
|
|
37
38
|
};
|
|
38
39
|
return /*#__PURE__*/React.createElement("div", {
|
|
39
|
-
className:
|
|
40
|
+
className: cn('relative w-full', wrapperClassName)
|
|
40
41
|
}, /*#__PURE__*/React.createElement(SearchIcon, {
|
|
41
42
|
className: cn('text-muted-foreground pointer-events-none absolute top-1/2 -translate-y-1/2', iconSize, padding.icon)
|
|
42
43
|
}), /*#__PURE__*/React.createElement(Input, _extends({
|