etendo-ui-library 1.3.16 → 1.3.17

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.
@@ -1 +1 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _Input=require("./Input.style");var _index=require("./index");var _this=this,_jsxFileName="/home/jenkins/agent/workspace/etendo_ui_library_develop/etendo_ui_library/src/components/input/Input.tsx";var Input=function Input(_ref){var value=_ref.value,titleLabel=_ref.titleLabel,titleImage=_ref.titleImage,helperText=_ref.helperText,placeholder=_ref.placeholder,placeholderPickerSearch=_ref.placeholderPickerSearch,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,maxLength=_ref.maxLength,centerText=_ref.centerText,keyboardType=_ref.keyboardType,displayKey=_ref.displayKey,dataPicker=_ref.dataPicker,backgroundColor=_ref.backgroundColor,showOptionsAmount=_ref.showOptionsAmount,showSearchInPicker=_ref.showSearchInPicker,height=_ref.height,onPress=_ref.onPress,onSubmit=_ref.onSubmit,_ref$onFocus=_ref.onFocus,onFocus=_ref$onFocus===void 0?function(){}:_ref$onFocus,_ref$onBlur=_ref.onBlur,onBlur=_ref$onBlur===void 0?function(){}:_ref$onBlur,onChangeText=_ref.onChangeText,onOptionSelected=_ref.onOptionSelected,typeField=_ref.typeField,isError=_ref.isError,language=_ref.language,dateFormat=_ref.dateFormat,showCalendar=_ref.showCalendar;var stateStyle=function stateStyle(){if(typeField==='readOnly'){return _Input.inputStyleVariants.readOnly;}else if(getDisabled()){return _Input.inputStyleVariants.disabled;}else if(isError){return _Input.inputStyleVariants.destructive;}else{return _Input.inputStyleVariants.default;}};var getDisabled=function getDisabled(){if(typeField==='picker'){return!(dataPicker!=null&&dataPicker.length)||disabled;}if(typeField==='readOnly'){return false;}return disabled;};var showFilterSearch=dataPicker&&(showSearchInPicker!=null?showSearchInPicker:(dataPicker==null?void 0:dataPicker.length)>16);return _react.default.createElement(_reactNative.View,{style:_Input.styles.inputContainer,__self:_this,__source:{fileName:_jsxFileName,lineNumber:62,columnNumber:5}},_react.default.createElement(_index.InputTitle,{disabled:getDisabled(),titleLabel:titleLabel,titleImage:titleImage,styleTitle:stateStyle().titleStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:63,columnNumber:7}}),_react.default.createElement(_index.InputField,{disabled:getDisabled(),type:typeField,configField:_Input.inputVariants[typeField].field,styleField:stateStyle().fieldStyle,placeholder:placeholder,placeholderPickerSearch:placeholderPickerSearch,value:value,onPress:onPress,onSubmit:onSubmit,onFocus:onFocus,onBlur:onBlur,onChangeText:onChangeText,onOptionSelected:onOptionSelected,showOptionsAmount:showOptionsAmount,showSearchInPicker:showFilterSearch,keyboardType:keyboardType,maxLength:maxLength,centerText:centerText,dataPicker:dataPicker,displayKey:displayKey,backgroundColor:backgroundColor,height:height,language:language,dateFormat:dateFormat,showCalendar:showCalendar,__self:_this,__source:{fileName:_jsxFileName,lineNumber:69,columnNumber:7}}),_react.default.createElement(_index.InputHelperText,{label:helperText,styleHelper:stateStyle().helperStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:96,columnNumber:7}}));};var _default=exports.default=Input;
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _Input=require("./Input.style");var _index=require("./index");var _colors=require("../../styles/colors");var _this=this,_jsxFileName="/home/jenkins/agent/workspace/etendo_ui_library_develop/etendo_ui_library/src/components/input/Input.tsx";var Input=function Input(_ref){var value=_ref.value,titleLabel=_ref.titleLabel,titleImage=_ref.titleImage,helperText=_ref.helperText,placeholder=_ref.placeholder,placeholderPickerSearch=_ref.placeholderPickerSearch,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,maxLength=_ref.maxLength,centerText=_ref.centerText,keyboardType=_ref.keyboardType,displayKey=_ref.displayKey,dataPicker=_ref.dataPicker,_ref$backgroundColor=_ref.backgroundColor,backgroundColor=_ref$backgroundColor===void 0?_colors.NEUTRAL_50:_ref$backgroundColor,showOptionsAmount=_ref.showOptionsAmount,showSearchInPicker=_ref.showSearchInPicker,height=_ref.height,onPress=_ref.onPress,onSubmit=_ref.onSubmit,_ref$onFocus=_ref.onFocus,onFocus=_ref$onFocus===void 0?function(){}:_ref$onFocus,_ref$onBlur=_ref.onBlur,onBlur=_ref$onBlur===void 0?function(){}:_ref$onBlur,onChangeText=_ref.onChangeText,onOptionSelected=_ref.onOptionSelected,typeField=_ref.typeField,isError=_ref.isError,language=_ref.language,dateFormat=_ref.dateFormat,showCalendar=_ref.showCalendar;var stateStyle=function stateStyle(){if(typeField==='readOnly'){return _Input.inputStyleVariants.readOnly;}else if(getDisabled()){return _Input.inputStyleVariants.disabled;}else if(isError){return _Input.inputStyleVariants.destructive;}else{return _Input.inputStyleVariants.default;}};var getDisabled=function getDisabled(){if(typeField==='picker'){return!(dataPicker!=null&&dataPicker.length)||disabled;}if(typeField==='readOnly'){return false;}return disabled;};var showFilterSearch=dataPicker&&(showSearchInPicker!=null?showSearchInPicker:(dataPicker==null?void 0:dataPicker.length)>16);return _react.default.createElement(_reactNative.View,{style:_Input.styles.inputContainer,__self:_this,__source:{fileName:_jsxFileName,lineNumber:63,columnNumber:5}},_react.default.createElement(_index.InputTitle,{disabled:getDisabled(),titleLabel:titleLabel,titleImage:titleImage,styleTitle:stateStyle().titleStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:64,columnNumber:7}}),_react.default.createElement(_index.InputField,{disabled:getDisabled(),type:typeField,configField:_Input.inputVariants[typeField].field,styleField:stateStyle().fieldStyle,placeholder:placeholder,placeholderPickerSearch:placeholderPickerSearch,value:value,onPress:onPress,onSubmit:onSubmit,onFocus:onFocus,onBlur:onBlur,onChangeText:onChangeText,onOptionSelected:onOptionSelected,showOptionsAmount:showOptionsAmount,showSearchInPicker:showFilterSearch,keyboardType:keyboardType,maxLength:maxLength,centerText:centerText,dataPicker:dataPicker,displayKey:displayKey,backgroundColor:backgroundColor,height:height,language:language,dateFormat:dateFormat,showCalendar:showCalendar,__self:_this,__source:{fileName:_jsxFileName,lineNumber:70,columnNumber:7}}),_react.default.createElement(_index.InputHelperText,{label:helperText,styleHelper:stateStyle().helperStyle,__self:_this,__source:{fileName:_jsxFileName,lineNumber:97,columnNumber:7}}));};var _default=exports.default=Input;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { View } from "react-native-web";
3
3
  import { inputStyleVariants, inputVariants, styles } from "./Input.style";
4
4
  import { InputTitle, InputField, InputHelperText } from "./index";
5
+ import { NEUTRAL_50 } from "../../styles/colors";
5
6
  var Input = function Input(_ref) {
6
7
  var value = _ref.value,
7
8
  titleLabel = _ref.titleLabel,
@@ -16,7 +17,8 @@ var Input = function Input(_ref) {
16
17
  keyboardType = _ref.keyboardType,
17
18
  displayKey = _ref.displayKey,
18
19
  dataPicker = _ref.dataPicker,
19
- backgroundColor = _ref.backgroundColor,
20
+ _ref$backgroundColor = _ref.backgroundColor,
21
+ backgroundColor = _ref$backgroundColor === void 0 ? NEUTRAL_50 : _ref$backgroundColor,
20
22
  showOptionsAmount = _ref.showOptionsAmount,
21
23
  showSearchInPicker = _ref.showSearchInPicker,
22
24
  height = _ref.height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etendo-ui-library",
3
- "version": "1.3.16",
3
+ "version": "1.3.17",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "android": "react-native run-android",