reactive-bulma 1.15.0 → 1.16.0

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.
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { TextAreaProps } from '../../../interfaces/atomProps';
3
+ declare const TextArea: React.FC<TextAreaProps>;
4
+ export default TextArea;
@@ -7,3 +7,4 @@ export { default as Box } from './Box';
7
7
  export { default as Title } from './Title';
8
8
  export { default as Icon } from './Icon';
9
9
  export { default as Input } from './Input';
10
+ export { default as TextArea } from './TextArea';
@@ -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, value: 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 }));
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
- export { Block, Box, Button, Column, Icon, Input, ProgressBar, Tag, Title };
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