@conveyorhq/arrow-ds 1.65.2 → 1.65.3
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 +1 -1
- package/public/components/Input/Input.d.ts +3 -3
- package/public/components/Input/Input.js +2 -2
- package/public/css/styles.css +5 -2
- package/public/css/styles.min.css +1 -1
- package/public/css/styles.min.css.map +1 -1
- package/src/components/Input/Input.story.mdx +41 -0
- package/src/components/Input/Input.tsx +15 -4
- package/src/components/Input/index.css +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { InputHTMLAttributes, ForwardRefExoticComponent } from "react";
|
|
1
|
+
import { InputHTMLAttributes, ForwardRefExoticComponent, ComponentProps } from "react";
|
|
2
2
|
import { STATUS_VARIANT, THEME } from "../../types";
|
|
3
|
-
import {
|
|
3
|
+
import { Icon, IconType } from "../Icon";
|
|
4
4
|
export declare enum INPUT_ICON_POSITION {
|
|
5
5
|
LEFT = "left",
|
|
6
6
|
RIGHT = "right"
|
|
@@ -12,7 +12,7 @@ export interface InputBaseProps {
|
|
|
12
12
|
theme?: THEME;
|
|
13
13
|
icon?: IconType;
|
|
14
14
|
iconPosition?: INPUT_ICON_POSITION;
|
|
15
|
-
iconProps?:
|
|
15
|
+
iconProps?: ComponentProps<typeof Icon>;
|
|
16
16
|
wrapperClassName?: string;
|
|
17
17
|
}
|
|
18
18
|
export interface InputProps extends InputBaseProps, InputHTMLAttributes<HTMLInputElement> {
|
|
@@ -44,10 +44,10 @@ const Input = react_1.forwardRef(({ as: Component = "input", className, wrapperC
|
|
|
44
44
|
const theme = themeProp || themeContext;
|
|
45
45
|
const inputClasses = classnames_1.default(isTextInput && bem_1.bem(cn), bem_1.bem(cn, { m: variant }), bem_1.bem(cn, { m: theme }), disabled && bem_1.bem(cn, { m: "disabled" }), icon && bem_1.bem(cn, { m: `icon-${iconPosition}` }), className);
|
|
46
46
|
const wrapperClasses = classnames_1.default(bem_1.bem(cn, { e: "wrapper" }), wrapperClassName);
|
|
47
|
-
const { className: iconClassName, ...iconPropsRest } = iconProps;
|
|
47
|
+
const { className: iconClassName, color: iconColor = "gray-600", ...iconPropsRest } = iconProps;
|
|
48
48
|
const iconClasses = classnames_1.default(bem_1.bem(cn, { e: "icon" }), bem_1.bem(cn, { e: "icon", m: iconPosition }), iconClassName);
|
|
49
49
|
return isTextInput && icon ? (react_1.default.createElement(Box_1.Box, { className: wrapperClasses },
|
|
50
50
|
react_1.default.createElement(Component, Object.assign({ ref: ref, className: inputClasses, id: id, type: type, disabled: disabled }, rest)),
|
|
51
|
-
react_1.default.createElement(Icon_1.Icon, Object.assign({ icon: icon, className: iconClasses }, iconPropsRest)))) : (react_1.default.createElement(Component, Object.assign({ ref: ref, className: inputClasses, id: id, type: type, disabled: disabled }, rest)));
|
|
51
|
+
react_1.default.createElement(Icon_1.Icon, Object.assign({ icon: icon, className: iconClasses, color: iconColor }, iconPropsRest)))) : (react_1.default.createElement(Component, Object.assign({ ref: ref, className: inputClasses, id: id, type: type, disabled: disabled }, rest)));
|
|
52
52
|
});
|
|
53
53
|
exports.Input = Input;
|
package/public/css/styles.css
CHANGED
|
@@ -4046,8 +4046,6 @@ override built-in Image component classes */
|
|
|
4046
4046
|
top: 0;
|
|
4047
4047
|
height: 100%;
|
|
4048
4048
|
align-items: center;
|
|
4049
|
-
--tw-text-opacity: 1;
|
|
4050
|
-
color: rgb(134 163 181 / var(--tw-text-opacity));
|
|
4051
4049
|
}
|
|
4052
4050
|
|
|
4053
4051
|
.ads-TextInput-icon--left {
|
|
@@ -8824,6 +8822,11 @@ override built-in Image component classes */
|
|
|
8824
8822
|
color: rgb(222 231 238 / var(--tw-text-opacity));
|
|
8825
8823
|
}
|
|
8826
8824
|
|
|
8825
|
+
.text-green-400 {
|
|
8826
|
+
--tw-text-opacity: 1;
|
|
8827
|
+
color: rgb(84 175 104 / var(--tw-text-opacity));
|
|
8828
|
+
}
|
|
8829
|
+
|
|
8827
8830
|
.text-brandGreen-400 {
|
|
8828
8831
|
--tw-text-opacity: 1;
|
|
8829
8832
|
color: rgb(51 198 159 / var(--tw-text-opacity));
|