etendo-ui-library 1.3.11 → 1.3.12

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.
@@ -33,6 +33,7 @@ export declare const styles: {
33
33
  fontSize: number;
34
34
  outlineStyle: string;
35
35
  height: number;
36
+ flex: number;
36
37
  };
37
38
  inputContainerWrapper: {
38
39
  backgroundColor: string;
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.styles=exports.CALENDAR_HEIGHT=void 0;var _reactNative=require("react-native");var _colors=require("../../styles/colors");var _utilsTypes=require("../../helpers/utilsTypes");var CALENDAR_HEIGHT=exports.CALENDAR_HEIGHT=260;var styles=exports.styles=_reactNative.StyleSheet.create({container:{flex:1},datePickerButton:{borderWidth:1,borderColor:'gray',paddingVertical:_reactNative.Platform.OS===_utilsTypes.AppPlatform.web?8:20,paddingHorizontal:12,borderRadius:4,backgroundColor:'white',flexDirection:'row',justifyContent:'space-between',alignItems:'center'},inputWrapper:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',paddingVertical:_reactNative.Platform.OS===_utilsTypes.AppPlatform.web?8:20,paddingHorizontal:16,backgroundColor:_colors.NEUTRAL_50},invalidDateInputWrapper:{borderColor:_colors.DESTRUCTIVE_100},disabledInput:{opacity:0.2},datePickerInput:{textAlign:'left',fontSize:18,outlineStyle:'none',height:20},inputContainerWrapper:{backgroundColor:'transparent',padding:6,height:_reactNative.Platform.OS!==_utilsTypes.AppPlatform.web?63:undefined,borderRadius:8},monthAndYearContainer:{flexDirection:'row',alignItems:'center',gap:8},monthAndYearContent:{flexDirection:'row',marginHorizontal:12,alignItems:'center',gap:8},inputWrapperFocused:{backgroundColor:_colors.QUATERNARY_50},invalidDateWrapperFocused:{backgroundColor:_colors.DESTRUCTIVE_10},calendarIcon:{width:24},modalContainer:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'rgba(0,0,0,0.5)'},modalContent:{backgroundColor:_colors.NEUTRAL_50,borderRadius:8,elevation:5,width:_reactNative.Platform.OS===_utilsTypes.AppPlatform.web?'100%':'90%',borderWidth:1,borderColor:_colors.NEUTRAL_300},header:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',paddingHorizontal:20,paddingTop:15,paddingBottom:10},monthText:{fontSize:16,color:_colors.PRIMARY_100},arrow:{fontSize:24,color:_colors.NEUTRAL_400},dayHeader:{flexDirection:'row',justifyContent:'space-between',paddingVertical:16},dayHeaderText:{width:'14.28%',textAlign:'center',color:'NEUTRAL_800'},notCurrentMonthStyle:{color:_colors.NEUTRAL_400},calendarContainer:{height:CALENDAR_HEIGHT,paddingHorizontal:10},dayItem:{width:'14.28%',justifyContent:'center',alignItems:'center',marginVertical:2},dayItemText:{padding:8,marginVertical:2,borderRadius:100,textAlign:'center',width:34,height:34},dayItemTextHover:{backgroundColor:_colors.NEUTRAL_200},todayItemTextHover:{backgroundColor:_colors.TERTIARY_70,borderWidth:1,borderColor:_colors.PRIMARY_100},selectedDayBackground:{backgroundColor:_colors.PRIMARY_100,borderRadius:100,padding:8,height:34,width:34,justifyContent:'center',alignItems:'center'},selectedDayText:{color:'white'},dayText:{color:'black'},currentDayBorder:{borderWidth:1,borderColor:_colors.PRIMARY_100,borderRadius:100,justifyContent:'center',alignItems:'center'},list:{height:CALENDAR_HEIGHT,paddingHorizontal:10,paddingVertical:5},item:{justifyContent:'center',padding:10,margin:2},yearText:{fontSize:16,width:40},selectedItem:{backgroundColor:_colors.TERTIARY_70,borderRadius:8},optionsContainer:{width:'100%',flexDirection:'row',justifyContent:'flex-end',marginTop:12,gap:4,padding:10},modalContentUpwards:{position:'absolute',bottom:70,boxShadow:'0px 0px 5px 0px rgba(0,0,0,0.2)'},disabledButtonStyle:{opacity:0.2}});
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.styles=exports.CALENDAR_HEIGHT=void 0;var _reactNative=require("react-native");var _colors=require("../../styles/colors");var _utilsTypes=require("../../helpers/utilsTypes");var CALENDAR_HEIGHT=exports.CALENDAR_HEIGHT=260;var styles=exports.styles=_reactNative.StyleSheet.create({container:{flex:1},datePickerButton:{borderWidth:1,borderColor:'gray',paddingVertical:_reactNative.Platform.OS===_utilsTypes.AppPlatform.web?8:20,paddingHorizontal:12,borderRadius:4,backgroundColor:'white',flexDirection:'row',justifyContent:'space-between',alignItems:'center'},inputWrapper:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',paddingVertical:_reactNative.Platform.OS===_utilsTypes.AppPlatform.web?8:20,paddingHorizontal:16,backgroundColor:_colors.NEUTRAL_50},invalidDateInputWrapper:{borderColor:_colors.DESTRUCTIVE_100},disabledInput:{opacity:0.2},datePickerInput:{textAlign:'left',fontSize:18,outlineStyle:'none',height:20,flex:1},inputContainerWrapper:{backgroundColor:'transparent',padding:6,height:_reactNative.Platform.OS!==_utilsTypes.AppPlatform.web?63:undefined,borderRadius:8},monthAndYearContainer:{flexDirection:'row',alignItems:'center',gap:8},monthAndYearContent:{flexDirection:'row',marginHorizontal:12,alignItems:'center',gap:8},inputWrapperFocused:{backgroundColor:_colors.QUATERNARY_50},invalidDateWrapperFocused:{backgroundColor:_colors.DESTRUCTIVE_10},calendarIcon:{width:24},modalContainer:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'rgba(0,0,0,0.5)'},modalContent:{backgroundColor:_colors.NEUTRAL_50,borderRadius:8,elevation:5,width:_reactNative.Platform.OS===_utilsTypes.AppPlatform.web?'100%':'90%',borderWidth:1,borderColor:_colors.NEUTRAL_300},header:{flexDirection:'row',justifyContent:'space-between',alignItems:'center',paddingHorizontal:20,paddingTop:15,paddingBottom:10},monthText:{fontSize:16,color:_colors.PRIMARY_100},arrow:{fontSize:24,color:_colors.NEUTRAL_400},dayHeader:{flexDirection:'row',justifyContent:'space-between',paddingVertical:16},dayHeaderText:{width:'14.28%',textAlign:'center',color:'NEUTRAL_800'},notCurrentMonthStyle:{color:_colors.NEUTRAL_400},calendarContainer:{height:CALENDAR_HEIGHT,paddingHorizontal:10},dayItem:{width:'14.28%',justifyContent:'center',alignItems:'center',marginVertical:2},dayItemText:{padding:8,marginVertical:2,borderRadius:100,textAlign:'center',width:34,height:34},dayItemTextHover:{backgroundColor:_colors.NEUTRAL_200},todayItemTextHover:{backgroundColor:_colors.TERTIARY_70,borderWidth:1,borderColor:_colors.PRIMARY_100},selectedDayBackground:{backgroundColor:_colors.PRIMARY_100,borderRadius:100,padding:8,height:34,width:34,justifyContent:'center',alignItems:'center'},selectedDayText:{color:'white'},dayText:{color:'black'},currentDayBorder:{borderWidth:1,borderColor:_colors.PRIMARY_100,borderRadius:100,justifyContent:'center',alignItems:'center'},list:{height:CALENDAR_HEIGHT,paddingHorizontal:10,paddingVertical:5},item:{justifyContent:'center',padding:10,margin:2},yearText:{fontSize:16,width:40},selectedItem:{backgroundColor:_colors.TERTIARY_70,borderRadius:8},optionsContainer:{width:'100%',flexDirection:'row',justifyContent:'flex-end',marginTop:12,gap:4,padding:10},modalContentUpwards:{position:'absolute',bottom:70,boxShadow:'0px 0px 5px 0px rgba(0,0,0,0.2)'},disabledButtonStyle:{opacity:0.2}});
@@ -1 +1 @@
1
- Object.defineProperty(exports,"__esModule",{value:true});exports.validateDate=exports.transformDate=exports.parseLocalDateString=exports.isLeapYear=exports.getPlaceholderDateFormat=exports.getDaysInMonth=exports.generateYearList=exports.formatterDate=exports.buildMonth=void 0;var formatterDate=exports.formatterDate=function formatterDate(date,format){if(date!==undefined){var day=date.getDate().toString().padStart(2,'0');var month=(date.getMonth()+1).toString().padStart(2,'0');var year=date.getFullYear();if(format==='MM/DD/YYYY'){return month+"/"+day+"/"+year;}else if(format==='DD/MM/YYYY'){return day+"/"+month+"/"+year;}else{return month+"/"+day+"/"+year;}}return'';};var getPlaceholderDateFormat=exports.getPlaceholderDateFormat=function getPlaceholderDateFormat(dateFormat){return dateFormat==='MM/DD/YYYY'?'MM/DD/YYYY':'DD/MM/YYYY';};var parseLocalDateString=exports.parseLocalDateString=function parseLocalDateString(localDate,dateFormat){var parts=localDate.split('/');var year=parts[2];var month=dateFormat==='MM/DD/YYYY'?parts[0]-1:parts[1]-1;var day=dateFormat==='MM/DD/YYYY'?parts[1]:parts[0];return new Date(year,month,day);};var transformDate=exports.transformDate=function transformDate(dateString){var parts=dateString.split('/');var date=new Date(parts[2],parts[1]-1,parts[0],3,0,0);return date.toISOString();};var generateYearList=exports.generateYearList=function generateYearList(){return Array.from({length:200},function(_,i){return 1900+i;});};var isLeapYear=exports.isLeapYear=function isLeapYear(year){return year%4===0&&year%100!==0||year%400===0;};var getDaysInMonth=exports.getDaysInMonth=function getDaysInMonth(year,month){var daysInMonth=[31,isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31];return daysInMonth[month];};var buildMonth=exports.buildMonth=function buildMonth(year,month){var days=[];var firstDayOfMonth=new Date(year,month,1).getDay();var totalDays=getDaysInMonth(year,month);var previousMonth=month===0?11:month-1;var previousMonthYear=month===0?year-1:year;var previousMonthDays=getDaysInMonth(previousMonthYear,previousMonth);for(var i=firstDayOfMonth;i>0;i--){days.unshift(new Date(previousMonthYear,previousMonth,previousMonthDays-i+1));}for(var _day=1;_day<=totalDays;_day++){days.push(new Date(year,month,_day));}var nextMonth=month===11?0:month+1;var nextMonthYear=month===11?year+1:year;var day=1;while(days.length%7!==0){days.push(new Date(nextMonthYear,nextMonth,day++));}return days;};var validateDate=exports.validateDate=function validateDate(dateObject,text,format){if(isNaN(dateObject.getTime())||dateObject.getFullYear()<1000||dateObject.getFullYear()>9999){return false;}var parts=text.split('/');var day,month;if(format==='DD/MM/YYYY'){day=parseInt(parts[0],10);month=parseInt(parts[1],10);}else{day=parseInt(parts[1],10);month=parseInt(parts[0],10);}if(month<1||month>12||day<1||day>31){return false;}if((month===4||month===6||month===9||month===11)&&day>30){return false;}if(month===2){var isLeap=dateObject.getFullYear()%4===0&&(dateObject.getFullYear()%100!==0||dateObject.getFullYear()%400===0);if(day>(isLeap?29:28)){return false;}}return true;};
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.validateDate=exports.transformDate=exports.parseLocalDateString=exports.isLeapYear=exports.getPlaceholderDateFormat=exports.getDaysInMonth=exports.generateYearList=exports.formatterDate=exports.buildMonth=void 0;var formatterDate=exports.formatterDate=function formatterDate(date,format){if(date!==undefined){var day=date.getDate().toString().padStart(2,'0');var month=(date.getMonth()+1).toString().padStart(2,'0');var year=date.getFullYear();if(format==='MM/DD/YYYY'){return month+"/"+day+"/"+year;}else if(format==='DD/MM/YYYY'){return day+"/"+month+"/"+year;}else{return month+"/"+day+"/"+year;}}return'';};var getPlaceholderDateFormat=exports.getPlaceholderDateFormat=function getPlaceholderDateFormat(dateFormat){return dateFormat==='MM/DD/YYYY'?'MM/DD/YYYY':'DD/MM/YYYY';};var parseLocalDateString=exports.parseLocalDateString=function parseLocalDateString(localDate,dateFormat){var parts=localDate.split('/');var year=parts[2];var month=dateFormat==='MM/DD/YYYY'?parts[0]-1:parts[1]-1;var day=dateFormat==='MM/DD/YYYY'?parts[1]:parts[0];return new Date(year,month,day);};var transformDate=exports.transformDate=function transformDate(dateString){var parts=dateString.split('/');var date=new Date(parts[2],parts[1]-1,parts[0],3,0,0);return date.toISOString();};var generateYearList=exports.generateYearList=function generateYearList(){return Array.from({length:200},function(_,i){return 1900+i;});};var isLeapYear=exports.isLeapYear=function isLeapYear(year){return year%4===0&&year%100!==0||year%400===0;};var getDaysInMonth=exports.getDaysInMonth=function getDaysInMonth(year,month){var daysInMonth=[31,isLeapYear(year)?29:28,31,30,31,30,31,31,30,31,30,31];return daysInMonth[month];};var buildMonth=exports.buildMonth=function buildMonth(year,month){var days=[];var firstDayOfMonth=new Date(year,month,1).getDay();var totalDays=getDaysInMonth(year,month);var previousMonth=month===0?11:month-1;var previousMonthYear=month===0?year-1:year;var previousMonthDays=getDaysInMonth(previousMonthYear,previousMonth);for(var i=firstDayOfMonth;i>0;i--){days.push(new Date(previousMonthYear,previousMonth,previousMonthDays-i+1));}for(var _day=1;_day<=totalDays;_day++){days.push(new Date(year,month,_day));}var nextMonth=month===11?0:month+1;var nextMonthYear=month===11?year+1:year;var day=1;while(days.length%7!==0){days.push(new Date(nextMonthYear,nextMonth,day++));}return days;};var validateDate=exports.validateDate=function validateDate(dateObject,text,format){if(isNaN(dateObject.getTime())||dateObject.getFullYear()<1000||dateObject.getFullYear()>9999){return false;}var parts=text.split('/');var day,month;if(format==='DD/MM/YYYY'){day=parseInt(parts[0],10);month=parseInt(parts[1],10);}else{day=parseInt(parts[1],10);month=parseInt(parts[0],10);}if(month<1||month>12||day<1||day>31){return false;}if((month===4||month===6||month===9||month===11)&&day>30){return false;}if(month===2){var isLeap=dateObject.getFullYear()%4===0&&(dateObject.getFullYear()%100!==0||dateObject.getFullYear()%400===0);if(day>(isLeap?29:28)){return false;}}return true;};
@@ -33,6 +33,7 @@ export declare const styles: {
33
33
  fontSize: number;
34
34
  outlineStyle: string;
35
35
  height: number;
36
+ flex: number;
36
37
  };
37
38
  inputContainerWrapper: {
38
39
  backgroundColor: string;
@@ -39,7 +39,8 @@ export var styles = StyleSheet.create({
39
39
  textAlign: 'left',
40
40
  fontSize: 18,
41
41
  outlineStyle: 'none',
42
- height: 20
42
+ height: 20,
43
+ flex: 1
43
44
  },
44
45
  inputContainerWrapper: {
45
46
  backgroundColor: 'transparent',
@@ -69,7 +69,7 @@ export var buildMonth = function buildMonth(year, month) {
69
69
 
70
70
  // Fill days from previous month
71
71
  for (var i = firstDayOfMonth; i > 0; i--) {
72
- days.unshift(new Date(previousMonthYear, previousMonth, previousMonthDays - i + 1));
72
+ days.push(new Date(previousMonthYear, previousMonth, previousMonthDays - i + 1));
73
73
  }
74
74
 
75
75
  // Add days of current month
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etendo-ui-library",
3
- "version": "1.3.11",
3
+ "version": "1.3.12",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "android": "react-native run-android",