reactive-bulma 1.15.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +28 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/atoms/TextArea/index.d.ts +4 -0
- package/dist/cjs/types/components/atoms/index.d.ts +1 -0
- package/dist/cjs/types/interfaces/atomProps.d.ts +5 -0
- package/dist/esm/index.js +28 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/atoms/TextArea/index.d.ts +4 -0
- package/dist/esm/types/components/atoms/index.d.ts +1 -0
- package/dist/esm/types/interfaces/atomProps.d.ts +5 -0
- package/dist/index.d.ts +8 -1
- package/package.json +27 -26
@@ -85,4 +85,9 @@ export interface InputProps extends BasicProps {
|
|
85
85
|
onClick?: () => void;
|
86
86
|
onChange?: () => void;
|
87
87
|
}
|
88
|
+
export interface TextAreaProps extends Omit<InputProps, 'isRounded' | 'type'> {
|
89
|
+
cols?: number;
|
90
|
+
rows?: number;
|
91
|
+
isFixedSize?: boolean;
|
92
|
+
}
|
88
93
|
export {};
|
package/dist/esm/index.js
CHANGED
@@ -3007,8 +3007,34 @@ const Input = ({ testId = null, type, text = null, isDisabled = false, isReadonl
|
|
3007
3007
|
tag: 'input',
|
3008
3008
|
parsedClasses: inputClasses
|
3009
3009
|
});
|
3010
|
-
return (React.createElement("input", { "data-testid": _testId, type: type,
|
3010
|
+
return (React.createElement("input", { "data-testid": _testId, type: type, defaultValue: text !== null && text !== void 0 ? text : undefined, disabled: isDisabled, readOnly: isReadonly, style: style !== null && style !== void 0 ? style : undefined, className: inputClasses, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined, onChange: onChange !== null && onChange !== void 0 ? onChange : undefined }));
|
3011
3011
|
};
|
3012
3012
|
|
3013
|
-
|
3013
|
+
const TextArea = ({ testId = null, text = null, cols = null, rows = null, isDisabled = false, isReadonly = false, isFixedSize = false, style = null, color = null, size = null, isHovered = null, isFocused = null, onClick = null, onChange = null }) => {
|
3014
|
+
const textAreaClasses = parseClasses([
|
3015
|
+
'textarea',
|
3016
|
+
color,
|
3017
|
+
size,
|
3018
|
+
isHovered ? 'is-hovered' : null,
|
3019
|
+
isFocused ? 'is-focused' : null,
|
3020
|
+
isFixedSize ? 'has-fixed-size' : null
|
3021
|
+
]);
|
3022
|
+
const _testId = testId !== null && testId !== void 0 ? testId : parseTestId({
|
3023
|
+
tag: 'textarea',
|
3024
|
+
parsedClasses: textAreaClasses,
|
3025
|
+
rules: [
|
3026
|
+
{
|
3027
|
+
usedRegExp: /textarea/gm,
|
3028
|
+
regExpReplacer: ''
|
3029
|
+
},
|
3030
|
+
{
|
3031
|
+
usedRegExp: /is-|has-/gm,
|
3032
|
+
regExpReplacer: '-'
|
3033
|
+
}
|
3034
|
+
]
|
3035
|
+
});
|
3036
|
+
return (React.createElement("textarea", { "data-testid": _testId, defaultValue: text !== null && text !== void 0 ? text : undefined, cols: cols !== null && cols !== void 0 ? cols : undefined, rows: rows !== null && rows !== void 0 ? rows : undefined, disabled: isDisabled, readOnly: isReadonly, style: style !== null && style !== void 0 ? style : undefined, className: textAreaClasses, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined, onChange: onChange !== null && onChange !== void 0 ? onChange : undefined }));
|
3037
|
+
};
|
3038
|
+
|
3039
|
+
export { Block, Box, Button, Column, Icon, Input, ProgressBar, Tag, TextArea, Title };
|
3014
3040
|
//# sourceMappingURL=index.js.map
|