react-input-emoji 5.7.0 → 5.7.1
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/dist/index.es.js +19 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/text-input.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -943,7 +943,7 @@ var _excluded = ["placeholder", "style", "tabIndex", "className", "onChange"];
|
|
943
943
|
* @property {(event: React.ClipboardEvent) => void} onCopy
|
944
944
|
* @property {(event: React.ClipboardEvent) => void} onPaste
|
945
945
|
* @property {string} placeholder
|
946
|
-
* @property {{borderRadius?: number; borderColor?: string; fontSize?: number; fontFamily?: string; background: string; placeholderColor?: string;}} style
|
946
|
+
* @property {{borderRadius?: number; color?: string; borderColor?: string; fontSize?: number; fontFamily?: string; background: string; placeholderColor?: string;}} style
|
947
947
|
* @property {number} tabIndex
|
948
948
|
* @property {string} className
|
949
949
|
* @property {(html: string) => void} onChange
|
@@ -1037,7 +1037,16 @@ var TextInput = function TextInput(_ref, ref) {
|
|
1037
1037
|
placeholderStyle.color = style.placeholderColor;
|
1038
1038
|
}
|
1039
1039
|
return placeholderStyle;
|
1040
|
-
}, [style.placeholderColor]);
|
1040
|
+
}, [style === null || style === void 0 ? void 0 : style.placeholderColor]);
|
1041
|
+
|
1042
|
+
/** @type {React.CSSProperties} */
|
1043
|
+
var inputStyle = React.useMemo(function () {
|
1044
|
+
var inputStyle = {};
|
1045
|
+
if (style.color) {
|
1046
|
+
inputStyle.color = style.color;
|
1047
|
+
}
|
1048
|
+
return inputStyle;
|
1049
|
+
}, [style === null || style === void 0 ? void 0 : style.color]);
|
1041
1050
|
|
1042
1051
|
/** @type {React.MutableRefObject<HTMLDivElement | null>} */
|
1043
1052
|
var placeholderRef = React.useRef(null);
|
@@ -1114,7 +1123,8 @@ var TextInput = function TextInput(_ref, ref) {
|
|
1114
1123
|
onBlur: props.onBlur,
|
1115
1124
|
onCopy: props.onCopy,
|
1116
1125
|
onPaste: props.onPaste,
|
1117
|
-
"data-testid": "react-input-emoji--input"
|
1126
|
+
"data-testid": "react-input-emoji--input",
|
1127
|
+
style: inputStyle
|
1118
1128
|
})));
|
1119
1129
|
};
|
1120
1130
|
var TextInputWithRef = /*#__PURE__*/React.forwardRef(TextInput);
|
@@ -4508,6 +4518,7 @@ function usePollute() {
|
|
4508
4518
|
* @property {(text: string) => void=} onEnter
|
4509
4519
|
* @property {string=} placeholder
|
4510
4520
|
* @property {string=} placeholderColor
|
4521
|
+
* @property {string=} color
|
4511
4522
|
* @property {(size: {width: number, height: number}) => void=} onResize
|
4512
4523
|
* @property {() => void=} onClick
|
4513
4524
|
* @property {() => void=} onFocus
|
@@ -4566,7 +4577,8 @@ function InputEmoji(props, ref) {
|
|
4566
4577
|
fontSize = props.fontSize,
|
4567
4578
|
fontFamily = props.fontFamily,
|
4568
4579
|
background = props.background,
|
4569
|
-
placeholderColor = props.placeholderColor
|
4580
|
+
placeholderColor = props.placeholderColor,
|
4581
|
+
color = props.color;
|
4570
4582
|
|
4571
4583
|
/** @type {React.MutableRefObject<import('./text-input').Ref | null>} */
|
4572
4584
|
var textInputRef = React.useRef(null);
|
@@ -4737,7 +4749,8 @@ function InputEmoji(props, ref) {
|
|
4737
4749
|
fontSize: fontSize,
|
4738
4750
|
fontFamily: fontFamily,
|
4739
4751
|
background: background,
|
4740
|
-
placeholderColor: placeholderColor
|
4752
|
+
placeholderColor: placeholderColor,
|
4753
|
+
color: color
|
4741
4754
|
},
|
4742
4755
|
tabIndex: tabIndex,
|
4743
4756
|
className: inputClass,
|
@@ -4762,6 +4775,7 @@ InputEmojiWithRef.defaultProps = {
|
|
4762
4775
|
placeholder: "Type a message",
|
4763
4776
|
borderRadius: 21,
|
4764
4777
|
borderColor: "#EAEAEA",
|
4778
|
+
color: "black",
|
4765
4779
|
fontSize: 15,
|
4766
4780
|
fontFamily: "sans-serif",
|
4767
4781
|
background: "white",
|