formio-react-native 1.0.3 → 1.0.4

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.
Files changed (23) hide show
  1. package/lib/commonjs/components/renderers/CheckboxRenderer.js +1 -1
  2. package/lib/commonjs/components/renderers/EmailRenderer.js +1 -1
  3. package/lib/commonjs/components/renderers/NumberRenderer.js +1 -1
  4. package/lib/commonjs/components/renderers/PasswordRenderer.js +1 -1
  5. package/lib/commonjs/components/renderers/PhoneNumberRenderer.js +1 -1
  6. package/lib/commonjs/components/renderers/RadioRenderer.js +1 -1
  7. package/lib/commonjs/components/renderers/SelectRenderer.js +1 -1
  8. package/lib/commonjs/components/renderers/SelectboxesRenderer.js +1 -1
  9. package/lib/commonjs/components/renderers/TextAreaRenderer.js +1 -1
  10. package/lib/commonjs/components/renderers/TextfieldRenderer.js +1 -1
  11. package/lib/commonjs/components/renderers/URLRenderer.js +1 -1
  12. package/lib/module/components/renderers/CheckboxRenderer.js +1 -1
  13. package/lib/module/components/renderers/EmailRenderer.js +1 -1
  14. package/lib/module/components/renderers/NumberRenderer.js +1 -1
  15. package/lib/module/components/renderers/PasswordRenderer.js +1 -1
  16. package/lib/module/components/renderers/PhoneNumberRenderer.js +1 -1
  17. package/lib/module/components/renderers/RadioRenderer.js +1 -1
  18. package/lib/module/components/renderers/SelectRenderer.js +1 -1
  19. package/lib/module/components/renderers/SelectboxesRenderer.js +1 -1
  20. package/lib/module/components/renderers/TextAreaRenderer.js +1 -1
  21. package/lib/module/components/renderers/TextfieldRenderer.js +1 -1
  22. package/lib/module/components/renderers/URLRenderer.js +1 -1
  23. package/package.json +1 -1
@@ -1,2 +1,2 @@
1
- import React from'react';import{Switch,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getCheckboxAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},checkboxContainer:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.sm},label:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,marginLeft:SPACING.sm,flex:1},labelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});const CheckboxRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{const{label}=component;const{isRTL}=useI18n();const isChecked=Boolean(value);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.checkboxContainer,{flexDirection:getFlexDirection(isRTL)}]},React.createElement(View,getCheckboxAriaAttributes(label||'',isChecked,disabled||readOnly),React.createElement(Switch,{value:isChecked,onValueChange:onChange,disabled:disabled||readOnly,trackColor:{false:COLORS.border,true:COLORS.primary},thumbColor:isChecked?COLORS.primary:COLORS.disabled})),label&&React.createElement(Text,{style:[styles.label,(disabled||readOnly)&&styles.labelDisabled,{textAlign:getTextAlign(isRTL)}]},label)),error&&React.createElement(Text,{style:[styles.errorText,{textAlign:getTextAlign(isRTL)}]},error));};export const CheckboxRenderer=React.memo(CheckboxRendererComponent);
1
+ import React from'react';import{Switch,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getCheckboxAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},checkboxContainer:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.sm},label:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,marginLeft:SPACING.sm,flex:1},labelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});const CheckboxRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{const{label}=component;const{isRTL,translate}=useI18n();const isChecked=Boolean(value);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.checkboxContainer,{flexDirection:getFlexDirection(isRTL)}]},React.createElement(View,getCheckboxAriaAttributes(translate(label||''),isChecked,disabled||readOnly),React.createElement(Switch,{value:isChecked,onValueChange:onChange,disabled:disabled||readOnly,trackColor:{false:COLORS.border,true:COLORS.primary},thumbColor:isChecked?COLORS.primary:COLORS.disabled})),label&&React.createElement(Text,{style:[styles.label,(disabled||readOnly)&&styles.labelDisabled,{textAlign:getTextAlign(isRTL)}]},label)),error&&React.createElement(Text,{style:[styles.errorText,{textAlign:getTextAlign(isRTL)}]},error));};export const CheckboxRenderer=React.memo(CheckboxRendererComponent);
2
2
  //# sourceMappingURL=CheckboxRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const EmailRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter email address',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"email-address",autoCapitalize:"none",autoCorrect:false,autoComplete:"email"}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const EmailRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder)||translate('Enter email address'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"email-address",autoCapitalize:"none",autoCorrect:false,autoComplete:"email"}));};
2
2
  //# sourceMappingURL=EmailRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const NumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,min,max}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];const handleChange=text=>{if(text===''){onChange(null);return;}const numValue=parseFloat(text);if(!isNaN(numValue)){let constrainedValue=numValue;if(min!==undefined&&constrainedValue<min){constrainedValue=min;}if(max!==undefined&&constrainedValue>max){constrainedValue=max;}onChange(constrainedValue);}};return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter a number',placeholderTextColor:COLORS.placeholder,value:value!==null&&value!==undefined?String(value):'',onChangeText:handleChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"decimal-pad"}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const NumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,min,max}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];const handleChange=text=>{if(text===''){onChange(null);return;}const numValue=parseFloat(text);if(!isNaN(numValue)){let constrainedValue=numValue;if(min!==undefined&&constrainedValue<min){constrainedValue=min;}if(max!==undefined&&constrainedValue>max){constrainedValue=max;}onChange(constrainedValue);}};return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder)||translate('Enter a number'),placeholderTextColor:COLORS.placeholder,value:value!==null&&value!==undefined?String(value):'',onChangeText:handleChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"decimal-pad"}));};
2
2
  //# sourceMappingURL=NumberRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React,{useState}from'react';import{TextInput,StyleSheet,View,Text,TouchableOpacity}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},inputWrapper:{flexDirection:'row',alignItems:'center',borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,backgroundColor:COLORS.background},inputWrapperFocused:{borderColor:COLORS.primary},inputWrapperError:{borderColor:COLORS.error},inputWrapperDisabled:{backgroundColor:COLORS.disabled},input:{flex:1,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},toggleButton:{padding:SPACING.xs,marginLeft:SPACING.xs},toggleText:{fontSize:18,color:COLORS.primary}});export const PasswordRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=useState({isFocused:false,showPassword:false});const{placeholder}=component;const inputWrapperStyle=[styles.inputWrapper,state.isFocused&&styles.inputWrapperFocused,error&&styles.inputWrapperError,disabled&&styles.inputWrapperDisabled];return React.createElement(View,{style:styles.container},React.createElement(View,{style:inputWrapperStyle},React.createElement(TextInput,{style:styles.input,placeholder:placeholder||'Enter password',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState(prev=>({...prev,isFocused:true})),onBlur:()=>setState(prev=>({...prev,isFocused:false})),secureTextEntry:!state.showPassword,autoCapitalize:"none",autoCorrect:false}),React.createElement(TouchableOpacity,{style:styles.toggleButton,onPress:()=>setState(prev=>({...prev,showPassword:!prev.showPassword})),disabled:disabled||readOnly},React.createElement(Text,{style:styles.toggleText},state.showPassword?'🐵':'🙈'))));};
1
+ import React,{useState}from'react';import{TextInput,StyleSheet,View,Text,TouchableOpacity}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},inputWrapper:{flexDirection:'row',alignItems:'center',borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,backgroundColor:COLORS.background},inputWrapperFocused:{borderColor:COLORS.primary},inputWrapperError:{borderColor:COLORS.error},inputWrapperDisabled:{backgroundColor:COLORS.disabled},input:{flex:1,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},toggleButton:{padding:SPACING.xs,marginLeft:SPACING.xs},toggleText:{fontSize:18,color:COLORS.primary}});export const PasswordRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=useState({isFocused:false,showPassword:false});const{placeholder}=component;const{translate}=useI18n();const inputWrapperStyle=[styles.inputWrapper,state.isFocused&&styles.inputWrapperFocused,error&&styles.inputWrapperError,disabled&&styles.inputWrapperDisabled];return React.createElement(View,{style:styles.container},React.createElement(View,{style:inputWrapperStyle},React.createElement(TextInput,{style:styles.input,placeholder:translate(placeholder)||translate('Enter password'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState(prev=>({...prev,isFocused:true})),onBlur:()=>setState(prev=>({...prev,isFocused:false})),secureTextEntry:!state.showPassword,autoCapitalize:"none",autoCorrect:false}),React.createElement(TouchableOpacity,{style:styles.toggleButton,onPress:()=>setState(prev=>({...prev,showPassword:!prev.showPassword})),disabled:disabled||readOnly},React.createElement(Text,{style:styles.toggleText},state.showPassword?'🐵':'🙈'))));};
2
2
  //# sourceMappingURL=PasswordRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const PhoneNumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter phone number',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"phone-pad",autoCapitalize:"none",autoCorrect:false}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const PhoneNumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder)||translate('Enter phone number'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"phone-pad",autoCapitalize:"none",autoCorrect:false}));};
2
2
  //# sourceMappingURL=PhoneNumberRenderer.js.map
@@ -1,2 +1,2 @@
1
- import _extends from"@babel/runtime/helpers/esm/extends";import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getRadioAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},radioGroup:{gap:SPACING.sm},radioItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},radioButton:{width:20,height:20,borderRadius:10,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},radioButtonSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},radioButtonDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},radioInner:{width:8,height:8,borderRadius:4,backgroundColor:COLORS.background},radioLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},radioLabelDisabled:{color:COLORS.disabled}});const RadioRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{isRTL}=useI18n();const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.radioGroup,{flexDirection:getFlexDirection(isRTL)}]},options.map((option,index)=>React.createElement(TouchableOpacity,_extends({key:String(option.value),style:styles.radioItem,onPress:()=>!disabled&&!readOnly&&onChange(option.value),disabled:disabled||readOnly},getRadioAriaAttributes(option.label,value===option.value,disabled||readOnly)),React.createElement(View,{style:[styles.radioButton,value===option.value&&styles.radioButtonSelected,(disabled||readOnly)&&styles.radioButtonDisabled]},value===option.value&&React.createElement(View,{style:styles.radioInner})),React.createElement(Text,{style:[styles.radioLabel,(disabled||readOnly)&&styles.radioLabelDisabled,{textAlign:getTextAlign(isRTL)}]},option.label)))));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}export const RadioRenderer=React.memo(RadioRendererComponent);
1
+ import _extends from"@babel/runtime/helpers/esm/extends";import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getRadioAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},radioGroup:{gap:SPACING.sm},radioItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},radioButton:{width:20,height:20,borderRadius:10,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},radioButtonSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},radioButtonDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},radioInner:{width:8,height:8,borderRadius:4,backgroundColor:COLORS.background},radioLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},radioLabelDisabled:{color:COLORS.disabled}});const RadioRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{isRTL,translate}=useI18n();const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.radioGroup,{flexDirection:getFlexDirection(isRTL)}]},options.map((option,index)=>React.createElement(TouchableOpacity,_extends({key:String(option.value),style:styles.radioItem,onPress:()=>!disabled&&!readOnly&&onChange(option.value),disabled:disabled||readOnly},getRadioAriaAttributes(option.label,value===option.value,disabled||readOnly)),React.createElement(View,{style:[styles.radioButton,value===option.value&&styles.radioButtonSelected,(disabled||readOnly)&&styles.radioButtonDisabled]},value===option.value&&React.createElement(View,{style:styles.radioInner})),React.createElement(Text,{style:[styles.radioLabel,(disabled||readOnly)&&styles.radioLabelDisabled,{textAlign:getTextAlign(isRTL)}]},translate(option.label))))));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}export const RadioRenderer=React.memo(RadioRendererComponent);
2
2
  //# sourceMappingURL=RadioRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{StyleSheet,View,Text,TouchableOpacity,Modal,FlatList}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},selectButton:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,minHeight:40,justifyContent:'center'},selectButtonFocused:{borderColor:COLORS.primary},selectButtonError:{borderColor:COLORS.error},selectButtonDisabled:{backgroundColor:COLORS.disabled},selectText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},selectTextPlaceholder:{color:COLORS.placeholder},selectTextDisabled:{color:COLORS.disabled},modalOverlay:{flex:1,backgroundColor:'rgba(0, 0, 0, 0.5)',justifyContent:'flex-end'},modalContent:{backgroundColor:COLORS.background,borderTopLeftRadius:12,borderTopRightRadius:12,maxHeight:'80%'},modalHeader:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border,flexDirection:'row',justifyContent:'space-between',alignItems:'center'},modalTitle:{fontSize:TYPOGRAPHY.fontSize.lg,fontWeight:TYPOGRAPHY.fontWeight.bold,color:COLORS.text},closeButton:{padding:SPACING.sm},closeButtonText:{fontSize:TYPOGRAPHY.fontSize.lg,color:COLORS.primary,fontWeight:TYPOGRAPHY.fontWeight.bold},optionItem:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border},optionItemSelected:{backgroundColor:COLORS.primaryLight},optionText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},optionTextSelected:{fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.primary},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});export const SelectRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const[state,setState]=React.useState({isOpen:false,isFocused:false,options:parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[])});const{label,placeholder}=component;const selectedOption=state.options.find(opt=>opt.value===value);const displayText=(selectedOption==null?void 0:selectedOption.label)||placeholder||'Select an option';const selectButtonStyle=[styles.selectButton,state.isFocused&&styles.selectButtonFocused,error&&styles.selectButtonError,(disabled||readOnly)&&styles.selectButtonDisabled];const selectTextStyle=[styles.selectText,!selectedOption&&styles.selectTextPlaceholder,(disabled||readOnly)&&styles.selectTextDisabled];const handleSelect=selectedValue=>{onChange(selectedValue);setState(prev=>({...prev,isOpen:false}));};const handleOpenClose=()=>{if(!disabled&&!readOnly){setState(prev=>({...prev,isOpen:!prev.isOpen,isFocused:!prev.isOpen}));}};return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},label),React.createElement(TouchableOpacity,{style:selectButtonStyle,onPress:handleOpenClose,disabled:disabled||readOnly},React.createElement(Text,{style:selectTextStyle},displayText)),React.createElement(Modal,{visible:state.isOpen&&!disabled&&!readOnly,transparent:true,animationType:"slide"},React.createElement(View,{style:styles.modalOverlay},React.createElement(View,{style:styles.modalContent},React.createElement(View,{style:styles.modalHeader},React.createElement(Text,{style:styles.modalTitle},label||'Select'),React.createElement(TouchableOpacity,{style:styles.closeButton,onPress:handleOpenClose},React.createElement(Text,{style:styles.closeButtonText},"Done"))),React.createElement(FlatList,{data:state.options,keyExtractor:(item,idx)=>String(idx),renderItem:({item})=>React.createElement(TouchableOpacity,{style:[styles.optionItem,item.value===value&&styles.optionItemSelected],onPress:()=>handleSelect(item.value)},React.createElement(Text,{style:[styles.optionText,item.value===value&&styles.optionTextSelected]},item.label))})))),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
1
+ import React from'react';import{StyleSheet,View,Text,TouchableOpacity,Modal,FlatList}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},selectButton:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,minHeight:40,justifyContent:'center'},selectButtonFocused:{borderColor:COLORS.primary},selectButtonError:{borderColor:COLORS.error},selectButtonDisabled:{backgroundColor:COLORS.disabled},selectText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},selectTextPlaceholder:{color:COLORS.placeholder},selectTextDisabled:{color:COLORS.disabled},modalOverlay:{flex:1,backgroundColor:'rgba(0, 0, 0, 0.5)',justifyContent:'flex-end'},modalContent:{backgroundColor:COLORS.background,borderTopLeftRadius:12,borderTopRightRadius:12,maxHeight:'80%'},modalHeader:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border,flexDirection:'row',justifyContent:'space-between',alignItems:'center'},modalTitle:{fontSize:TYPOGRAPHY.fontSize.lg,fontWeight:TYPOGRAPHY.fontWeight.bold,color:COLORS.text},closeButton:{padding:SPACING.sm},closeButtonText:{fontSize:TYPOGRAPHY.fontSize.lg,color:COLORS.primary,fontWeight:TYPOGRAPHY.fontWeight.bold},optionItem:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border},optionItemSelected:{backgroundColor:COLORS.primaryLight},optionText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},optionTextSelected:{fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.primary},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});export const SelectRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const[state,setState]=React.useState({isOpen:false,isFocused:false,options:parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[])});const{translate}=useI18n();const{label,placeholder}=component;const selectedOption=state.options.find(opt=>opt.value===value);const displayText=(selectedOption==null?void 0:selectedOption.label)||translate(placeholder)||translate('Select an option');const selectButtonStyle=[styles.selectButton,state.isFocused&&styles.selectButtonFocused,error&&styles.selectButtonError,(disabled||readOnly)&&styles.selectButtonDisabled];const selectTextStyle=[styles.selectText,!selectedOption&&styles.selectTextPlaceholder,(disabled||readOnly)&&styles.selectTextDisabled];const handleSelect=selectedValue=>{onChange(selectedValue);setState(prev=>({...prev,isOpen:false}));};const handleOpenClose=()=>{if(!disabled&&!readOnly){setState(prev=>({...prev,isOpen:!prev.isOpen,isFocused:!prev.isOpen}));}};return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},translate(label)),React.createElement(TouchableOpacity,{style:selectButtonStyle,onPress:handleOpenClose,disabled:disabled||readOnly},React.createElement(Text,{style:selectTextStyle},displayText)),React.createElement(Modal,{visible:state.isOpen&&!disabled&&!readOnly,transparent:true,animationType:"slide"},React.createElement(View,{style:styles.modalOverlay},React.createElement(View,{style:styles.modalContent},React.createElement(View,{style:styles.modalHeader},React.createElement(Text,{style:styles.modalTitle},label||'Select'),React.createElement(TouchableOpacity,{style:styles.closeButton,onPress:handleOpenClose},React.createElement(Text,{style:styles.closeButtonText},"Done"))),React.createElement(FlatList,{data:state.options,keyExtractor:(item,idx)=>String(idx),renderItem:({item})=>React.createElement(TouchableOpacity,{style:[styles.optionItem,item.value===value&&styles.optionItemSelected],onPress:()=>handleSelect(item.value)},React.createElement(Text,{style:[styles.optionText,item.value===value&&styles.optionTextSelected]},item.label))})))),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
2
2
  //# sourceMappingURL=SelectRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.sm},checkboxGroup:{gap:SPACING.sm},checkboxItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},checkbox:{width:20,height:20,borderRadius:3,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},checkboxSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},checkboxDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},checkmark:{fontSize:14,color:COLORS.background,fontWeight:'bold'},checkboxLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},checkboxLabelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.sm}});export const SelectboxesRenderer=({component,value={},onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{label}=component;const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);const selectedValues=value||{};const handleToggle=optionValue=>{if(disabled||readOnly)return;const newValue={...selectedValues,[String(optionValue)]:!selectedValues[String(optionValue)]};onChange(newValue);};return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},label),React.createElement(View,{style:styles.checkboxGroup},options.map(option=>{const isSelected=selectedValues[String(option.value)];return React.createElement(TouchableOpacity,{key:String(option.value),style:styles.checkboxItem,onPress:()=>handleToggle(option.value),disabled:disabled||readOnly},React.createElement(View,{style:[styles.checkbox,isSelected&&styles.checkboxSelected,(disabled||readOnly)&&styles.checkboxDisabled]},isSelected&&React.createElement(Text,{style:styles.checkmark},"\u2713")),React.createElement(Text,{style:[styles.checkboxLabel,(disabled||readOnly)&&styles.checkboxLabelDisabled]},option.label));})),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
1
+ import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.sm},checkboxGroup:{gap:SPACING.sm},checkboxItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},checkbox:{width:20,height:20,borderRadius:3,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},checkboxSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},checkboxDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},checkmark:{fontSize:14,color:COLORS.background,fontWeight:'bold'},checkboxLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},checkboxLabelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.sm}});export const SelectboxesRenderer=({component,value={},onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{label}=component;const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);const selectedValues=value||{};const handleToggle=optionValue=>{if(disabled||readOnly)return;const newValue={...selectedValues,[String(optionValue)]:!selectedValues[String(optionValue)]};onChange(newValue);};const{translate}=useI18n();return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},translate(label)),React.createElement(View,{style:styles.checkboxGroup},options.map(option=>{const isSelected=selectedValues[String(option.value)];return React.createElement(TouchableOpacity,{key:String(option.value),style:styles.checkboxItem,onPress:()=>handleToggle(option.value),disabled:disabled||readOnly},React.createElement(View,{style:[styles.checkbox,isSelected&&styles.checkboxSelected,(disabled||readOnly)&&styles.checkboxDisabled]},isSelected&&React.createElement(Text,{style:styles.checkmark},"\u2713")),React.createElement(Text,{style:[styles.checkboxLabel,(disabled||readOnly)&&styles.checkboxLabelDisabled]},option.label));})),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
2
2
  //# sourceMappingURL=SelectboxesRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:100,textAlignVertical:'top'},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs},charCount:{fontSize:TYPOGRAPHY.fontSize.xs,color:COLORS.textSecondary,marginTop:SPACING.xs}});export const TextAreaRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{label,placeholder,maxLength}=component;const currentLength=String(value||'').length;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},label),React.createElement(TextInput,{style:inputStyle,placeholder:placeholder,placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),multiline:true,numberOfLines:4,maxLength:maxLength}),maxLength&&React.createElement(Text,{style:styles.charCount},currentLength," / ",maxLength),error&&React.createElement(Text,{style:styles.errorText},error));};
1
+ import React from'react';import{TextInput,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:100,textAlignVertical:'top'},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs},charCount:{fontSize:TYPOGRAPHY.fontSize.xs,color:COLORS.textSecondary,marginTop:SPACING.xs}});export const TextAreaRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,maxLength}=component;const currentLength=String(value||'').length;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),multiline:true,numberOfLines:4,maxLength:maxLength}),maxLength&&React.createElement(Text,{style:styles.charCount},currentLength," / ",maxLength),error&&React.createElement(Text,{style:styles.errorText},error));};
2
2
  //# sourceMappingURL=TextAreaRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const TextfieldRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,type='text'}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder,placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:getKeyboardType(type),secureTextEntry:type==='password',autoCapitalize:getAutoCapitalize(type),autoCorrect:type!=='email'&&type!=='url'}));};function getKeyboardType(type){const keyboardMap={email:'email-address',url:'url',number:'numeric',tel:'phone-pad',text:'default'};return keyboardMap[type]||'default';}function getAutoCapitalize(type){const capitalizeMap={email:'none',url:'none',text:'sentences'};return capitalizeMap[type]||'none';}
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const TextfieldRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,type='text'}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:getKeyboardType(type),secureTextEntry:type==='password',autoCapitalize:getAutoCapitalize(type),autoCorrect:type!=='email'&&type!=='url'}));};function getKeyboardType(type){const keyboardMap={email:'email-address',url:'url',number:'numeric',tel:'phone-pad',text:'default'};return keyboardMap[type]||'default';}function getAutoCapitalize(type){const capitalizeMap={email:'none',url:'none',text:'sentences'};return capitalizeMap[type]||'none';}
2
2
  //# sourceMappingURL=TextfieldRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const URLRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{label,placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter URL',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"default",autoCapitalize:"none",autoCorrect:false}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const URLRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{label,placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];const{translate}=useI18n();return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder||'Enter URL'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"default",autoCapitalize:"none",autoCorrect:false}));};
2
2
  //# sourceMappingURL=URLRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{Switch,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getCheckboxAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},checkboxContainer:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.sm},label:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,marginLeft:SPACING.sm,flex:1},labelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});const CheckboxRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{const{label}=component;const{isRTL}=useI18n();const isChecked=Boolean(value);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.checkboxContainer,{flexDirection:getFlexDirection(isRTL)}]},React.createElement(View,getCheckboxAriaAttributes(label||'',isChecked,disabled||readOnly),React.createElement(Switch,{value:isChecked,onValueChange:onChange,disabled:disabled||readOnly,trackColor:{false:COLORS.border,true:COLORS.primary},thumbColor:isChecked?COLORS.primary:COLORS.disabled})),label&&React.createElement(Text,{style:[styles.label,(disabled||readOnly)&&styles.labelDisabled,{textAlign:getTextAlign(isRTL)}]},label)),error&&React.createElement(Text,{style:[styles.errorText,{textAlign:getTextAlign(isRTL)}]},error));};export const CheckboxRenderer=React.memo(CheckboxRendererComponent);
1
+ import React from'react';import{Switch,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getCheckboxAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},checkboxContainer:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.sm},label:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,marginLeft:SPACING.sm,flex:1},labelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});const CheckboxRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{const{label}=component;const{isRTL,translate}=useI18n();const isChecked=Boolean(value);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.checkboxContainer,{flexDirection:getFlexDirection(isRTL)}]},React.createElement(View,getCheckboxAriaAttributes(translate(label||''),isChecked,disabled||readOnly),React.createElement(Switch,{value:isChecked,onValueChange:onChange,disabled:disabled||readOnly,trackColor:{false:COLORS.border,true:COLORS.primary},thumbColor:isChecked?COLORS.primary:COLORS.disabled})),label&&React.createElement(Text,{style:[styles.label,(disabled||readOnly)&&styles.labelDisabled,{textAlign:getTextAlign(isRTL)}]},label)),error&&React.createElement(Text,{style:[styles.errorText,{textAlign:getTextAlign(isRTL)}]},error));};export const CheckboxRenderer=React.memo(CheckboxRendererComponent);
2
2
  //# sourceMappingURL=CheckboxRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const EmailRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter email address',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"email-address",autoCapitalize:"none",autoCorrect:false,autoComplete:"email"}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const EmailRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder)||translate('Enter email address'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"email-address",autoCapitalize:"none",autoCorrect:false,autoComplete:"email"}));};
2
2
  //# sourceMappingURL=EmailRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const NumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,min,max}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];const handleChange=text=>{if(text===''){onChange(null);return;}const numValue=parseFloat(text);if(!isNaN(numValue)){let constrainedValue=numValue;if(min!==undefined&&constrainedValue<min){constrainedValue=min;}if(max!==undefined&&constrainedValue>max){constrainedValue=max;}onChange(constrainedValue);}};return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter a number',placeholderTextColor:COLORS.placeholder,value:value!==null&&value!==undefined?String(value):'',onChangeText:handleChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"decimal-pad"}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const NumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,min,max}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];const handleChange=text=>{if(text===''){onChange(null);return;}const numValue=parseFloat(text);if(!isNaN(numValue)){let constrainedValue=numValue;if(min!==undefined&&constrainedValue<min){constrainedValue=min;}if(max!==undefined&&constrainedValue>max){constrainedValue=max;}onChange(constrainedValue);}};return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder)||translate('Enter a number'),placeholderTextColor:COLORS.placeholder,value:value!==null&&value!==undefined?String(value):'',onChangeText:handleChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"decimal-pad"}));};
2
2
  //# sourceMappingURL=NumberRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React,{useState}from'react';import{TextInput,StyleSheet,View,Text,TouchableOpacity}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},inputWrapper:{flexDirection:'row',alignItems:'center',borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,backgroundColor:COLORS.background},inputWrapperFocused:{borderColor:COLORS.primary},inputWrapperError:{borderColor:COLORS.error},inputWrapperDisabled:{backgroundColor:COLORS.disabled},input:{flex:1,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},toggleButton:{padding:SPACING.xs,marginLeft:SPACING.xs},toggleText:{fontSize:18,color:COLORS.primary}});export const PasswordRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=useState({isFocused:false,showPassword:false});const{placeholder}=component;const inputWrapperStyle=[styles.inputWrapper,state.isFocused&&styles.inputWrapperFocused,error&&styles.inputWrapperError,disabled&&styles.inputWrapperDisabled];return React.createElement(View,{style:styles.container},React.createElement(View,{style:inputWrapperStyle},React.createElement(TextInput,{style:styles.input,placeholder:placeholder||'Enter password',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState(prev=>({...prev,isFocused:true})),onBlur:()=>setState(prev=>({...prev,isFocused:false})),secureTextEntry:!state.showPassword,autoCapitalize:"none",autoCorrect:false}),React.createElement(TouchableOpacity,{style:styles.toggleButton,onPress:()=>setState(prev=>({...prev,showPassword:!prev.showPassword})),disabled:disabled||readOnly},React.createElement(Text,{style:styles.toggleText},state.showPassword?'🐵':'🙈'))));};
1
+ import React,{useState}from'react';import{TextInput,StyleSheet,View,Text,TouchableOpacity}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},inputWrapper:{flexDirection:'row',alignItems:'center',borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,backgroundColor:COLORS.background},inputWrapperFocused:{borderColor:COLORS.primary},inputWrapperError:{borderColor:COLORS.error},inputWrapperDisabled:{backgroundColor:COLORS.disabled},input:{flex:1,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},toggleButton:{padding:SPACING.xs,marginLeft:SPACING.xs},toggleText:{fontSize:18,color:COLORS.primary}});export const PasswordRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=useState({isFocused:false,showPassword:false});const{placeholder}=component;const{translate}=useI18n();const inputWrapperStyle=[styles.inputWrapper,state.isFocused&&styles.inputWrapperFocused,error&&styles.inputWrapperError,disabled&&styles.inputWrapperDisabled];return React.createElement(View,{style:styles.container},React.createElement(View,{style:inputWrapperStyle},React.createElement(TextInput,{style:styles.input,placeholder:translate(placeholder)||translate('Enter password'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState(prev=>({...prev,isFocused:true})),onBlur:()=>setState(prev=>({...prev,isFocused:false})),secureTextEntry:!state.showPassword,autoCapitalize:"none",autoCorrect:false}),React.createElement(TouchableOpacity,{style:styles.toggleButton,onPress:()=>setState(prev=>({...prev,showPassword:!prev.showPassword})),disabled:disabled||readOnly},React.createElement(Text,{style:styles.toggleText},state.showPassword?'🐵':'🙈'))));};
2
2
  //# sourceMappingURL=PasswordRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const PhoneNumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter phone number',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"phone-pad",autoCapitalize:"none",autoCorrect:false}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const PhoneNumberRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder)||translate('Enter phone number'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"phone-pad",autoCapitalize:"none",autoCorrect:false}));};
2
2
  //# sourceMappingURL=PhoneNumberRenderer.js.map
@@ -1,2 +1,2 @@
1
- import _extends from"@babel/runtime/helpers/esm/extends";import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getRadioAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},radioGroup:{gap:SPACING.sm},radioItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},radioButton:{width:20,height:20,borderRadius:10,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},radioButtonSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},radioButtonDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},radioInner:{width:8,height:8,borderRadius:4,backgroundColor:COLORS.background},radioLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},radioLabelDisabled:{color:COLORS.disabled}});const RadioRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{isRTL}=useI18n();const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.radioGroup,{flexDirection:getFlexDirection(isRTL)}]},options.map((option,index)=>React.createElement(TouchableOpacity,_extends({key:String(option.value),style:styles.radioItem,onPress:()=>!disabled&&!readOnly&&onChange(option.value),disabled:disabled||readOnly},getRadioAriaAttributes(option.label,value===option.value,disabled||readOnly)),React.createElement(View,{style:[styles.radioButton,value===option.value&&styles.radioButtonSelected,(disabled||readOnly)&&styles.radioButtonDisabled]},value===option.value&&React.createElement(View,{style:styles.radioInner})),React.createElement(Text,{style:[styles.radioLabel,(disabled||readOnly)&&styles.radioLabelDisabled,{textAlign:getTextAlign(isRTL)}]},option.label)))));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}export const RadioRenderer=React.memo(RadioRendererComponent);
1
+ import _extends from"@babel/runtime/helpers/esm/extends";import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';import{getTextAlign,getFlexDirection}from'../../utils/rtlUtils';import{getRadioAriaAttributes}from'../../utils/a11yUtils';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},radioGroup:{gap:SPACING.sm},radioItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},radioButton:{width:20,height:20,borderRadius:10,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},radioButtonSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},radioButtonDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},radioInner:{width:8,height:8,borderRadius:4,backgroundColor:COLORS.background},radioLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},radioLabelDisabled:{color:COLORS.disabled}});const RadioRendererComponent=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{isRTL,translate}=useI18n();const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);return React.createElement(View,{style:styles.container},React.createElement(View,{style:[styles.radioGroup,{flexDirection:getFlexDirection(isRTL)}]},options.map((option,index)=>React.createElement(TouchableOpacity,_extends({key:String(option.value),style:styles.radioItem,onPress:()=>!disabled&&!readOnly&&onChange(option.value),disabled:disabled||readOnly},getRadioAriaAttributes(option.label,value===option.value,disabled||readOnly)),React.createElement(View,{style:[styles.radioButton,value===option.value&&styles.radioButtonSelected,(disabled||readOnly)&&styles.radioButtonDisabled]},value===option.value&&React.createElement(View,{style:styles.radioInner})),React.createElement(Text,{style:[styles.radioLabel,(disabled||readOnly)&&styles.radioLabelDisabled,{textAlign:getTextAlign(isRTL)}]},translate(option.label))))));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}export const RadioRenderer=React.memo(RadioRendererComponent);
2
2
  //# sourceMappingURL=RadioRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{StyleSheet,View,Text,TouchableOpacity,Modal,FlatList}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},selectButton:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,minHeight:40,justifyContent:'center'},selectButtonFocused:{borderColor:COLORS.primary},selectButtonError:{borderColor:COLORS.error},selectButtonDisabled:{backgroundColor:COLORS.disabled},selectText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},selectTextPlaceholder:{color:COLORS.placeholder},selectTextDisabled:{color:COLORS.disabled},modalOverlay:{flex:1,backgroundColor:'rgba(0, 0, 0, 0.5)',justifyContent:'flex-end'},modalContent:{backgroundColor:COLORS.background,borderTopLeftRadius:12,borderTopRightRadius:12,maxHeight:'80%'},modalHeader:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border,flexDirection:'row',justifyContent:'space-between',alignItems:'center'},modalTitle:{fontSize:TYPOGRAPHY.fontSize.lg,fontWeight:TYPOGRAPHY.fontWeight.bold,color:COLORS.text},closeButton:{padding:SPACING.sm},closeButtonText:{fontSize:TYPOGRAPHY.fontSize.lg,color:COLORS.primary,fontWeight:TYPOGRAPHY.fontWeight.bold},optionItem:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border},optionItemSelected:{backgroundColor:COLORS.primaryLight},optionText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},optionTextSelected:{fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.primary},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});export const SelectRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const[state,setState]=React.useState({isOpen:false,isFocused:false,options:parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[])});const{label,placeholder}=component;const selectedOption=state.options.find(opt=>opt.value===value);const displayText=(selectedOption==null?void 0:selectedOption.label)||placeholder||'Select an option';const selectButtonStyle=[styles.selectButton,state.isFocused&&styles.selectButtonFocused,error&&styles.selectButtonError,(disabled||readOnly)&&styles.selectButtonDisabled];const selectTextStyle=[styles.selectText,!selectedOption&&styles.selectTextPlaceholder,(disabled||readOnly)&&styles.selectTextDisabled];const handleSelect=selectedValue=>{onChange(selectedValue);setState(prev=>({...prev,isOpen:false}));};const handleOpenClose=()=>{if(!disabled&&!readOnly){setState(prev=>({...prev,isOpen:!prev.isOpen,isFocused:!prev.isOpen}));}};return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},label),React.createElement(TouchableOpacity,{style:selectButtonStyle,onPress:handleOpenClose,disabled:disabled||readOnly},React.createElement(Text,{style:selectTextStyle},displayText)),React.createElement(Modal,{visible:state.isOpen&&!disabled&&!readOnly,transparent:true,animationType:"slide"},React.createElement(View,{style:styles.modalOverlay},React.createElement(View,{style:styles.modalContent},React.createElement(View,{style:styles.modalHeader},React.createElement(Text,{style:styles.modalTitle},label||'Select'),React.createElement(TouchableOpacity,{style:styles.closeButton,onPress:handleOpenClose},React.createElement(Text,{style:styles.closeButtonText},"Done"))),React.createElement(FlatList,{data:state.options,keyExtractor:(item,idx)=>String(idx),renderItem:({item})=>React.createElement(TouchableOpacity,{style:[styles.optionItem,item.value===value&&styles.optionItemSelected],onPress:()=>handleSelect(item.value)},React.createElement(Text,{style:[styles.optionText,item.value===value&&styles.optionTextSelected]},item.label))})))),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
1
+ import React from'react';import{StyleSheet,View,Text,TouchableOpacity,Modal,FlatList}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},selectButton:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,minHeight:40,justifyContent:'center'},selectButtonFocused:{borderColor:COLORS.primary},selectButtonError:{borderColor:COLORS.error},selectButtonDisabled:{backgroundColor:COLORS.disabled},selectText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},selectTextPlaceholder:{color:COLORS.placeholder},selectTextDisabled:{color:COLORS.disabled},modalOverlay:{flex:1,backgroundColor:'rgba(0, 0, 0, 0.5)',justifyContent:'flex-end'},modalContent:{backgroundColor:COLORS.background,borderTopLeftRadius:12,borderTopRightRadius:12,maxHeight:'80%'},modalHeader:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border,flexDirection:'row',justifyContent:'space-between',alignItems:'center'},modalTitle:{fontSize:TYPOGRAPHY.fontSize.lg,fontWeight:TYPOGRAPHY.fontWeight.bold,color:COLORS.text},closeButton:{padding:SPACING.sm},closeButtonText:{fontSize:TYPOGRAPHY.fontSize.lg,color:COLORS.primary,fontWeight:TYPOGRAPHY.fontWeight.bold},optionItem:{paddingHorizontal:SPACING.md,paddingVertical:SPACING.md,borderBottomWidth:1,borderBottomColor:COLORS.border},optionItemSelected:{backgroundColor:COLORS.primaryLight},optionText:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text},optionTextSelected:{fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.primary},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs}});export const SelectRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{var _component$data;const[state,setState]=React.useState({isOpen:false,isFocused:false,options:parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[])});const{translate}=useI18n();const{label,placeholder}=component;const selectedOption=state.options.find(opt=>opt.value===value);const displayText=(selectedOption==null?void 0:selectedOption.label)||translate(placeholder)||translate('Select an option');const selectButtonStyle=[styles.selectButton,state.isFocused&&styles.selectButtonFocused,error&&styles.selectButtonError,(disabled||readOnly)&&styles.selectButtonDisabled];const selectTextStyle=[styles.selectText,!selectedOption&&styles.selectTextPlaceholder,(disabled||readOnly)&&styles.selectTextDisabled];const handleSelect=selectedValue=>{onChange(selectedValue);setState(prev=>({...prev,isOpen:false}));};const handleOpenClose=()=>{if(!disabled&&!readOnly){setState(prev=>({...prev,isOpen:!prev.isOpen,isFocused:!prev.isOpen}));}};return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},translate(label)),React.createElement(TouchableOpacity,{style:selectButtonStyle,onPress:handleOpenClose,disabled:disabled||readOnly},React.createElement(Text,{style:selectTextStyle},displayText)),React.createElement(Modal,{visible:state.isOpen&&!disabled&&!readOnly,transparent:true,animationType:"slide"},React.createElement(View,{style:styles.modalOverlay},React.createElement(View,{style:styles.modalContent},React.createElement(View,{style:styles.modalHeader},React.createElement(Text,{style:styles.modalTitle},label||'Select'),React.createElement(TouchableOpacity,{style:styles.closeButton,onPress:handleOpenClose},React.createElement(Text,{style:styles.closeButtonText},"Done"))),React.createElement(FlatList,{data:state.options,keyExtractor:(item,idx)=>String(idx),renderItem:({item})=>React.createElement(TouchableOpacity,{style:[styles.optionItem,item.value===value&&styles.optionItemSelected],onPress:()=>handleSelect(item.value)},React.createElement(Text,{style:[styles.optionText,item.value===value&&styles.optionTextSelected]},item.label))})))),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
2
2
  //# sourceMappingURL=SelectRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.sm},checkboxGroup:{gap:SPACING.sm},checkboxItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},checkbox:{width:20,height:20,borderRadius:3,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},checkboxSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},checkboxDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},checkmark:{fontSize:14,color:COLORS.background,fontWeight:'bold'},checkboxLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},checkboxLabelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.sm}});export const SelectboxesRenderer=({component,value={},onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{label}=component;const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);const selectedValues=value||{};const handleToggle=optionValue=>{if(disabled||readOnly)return;const newValue={...selectedValues,[String(optionValue)]:!selectedValues[String(optionValue)]};onChange(newValue);};return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},label),React.createElement(View,{style:styles.checkboxGroup},options.map(option=>{const isSelected=selectedValues[String(option.value)];return React.createElement(TouchableOpacity,{key:String(option.value),style:styles.checkboxItem,onPress:()=>handleToggle(option.value),disabled:disabled||readOnly},React.createElement(View,{style:[styles.checkbox,isSelected&&styles.checkboxSelected,(disabled||readOnly)&&styles.checkboxDisabled]},isSelected&&React.createElement(Text,{style:styles.checkmark},"\u2713")),React.createElement(Text,{style:[styles.checkboxLabel,(disabled||readOnly)&&styles.checkboxLabelDisabled]},option.label));})),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
1
+ import React from'react';import{View,Text,TouchableOpacity,StyleSheet}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.sm},checkboxGroup:{gap:SPACING.sm},checkboxItem:{flexDirection:'row',alignItems:'center',paddingVertical:SPACING.xs},checkbox:{width:20,height:20,borderRadius:3,borderWidth:2,borderColor:COLORS.border,justifyContent:'center',alignItems:'center',marginRight:SPACING.sm},checkboxSelected:{borderColor:COLORS.primary,backgroundColor:COLORS.primary},checkboxDisabled:{borderColor:COLORS.disabled,backgroundColor:COLORS.disabled},checkmark:{fontSize:14,color:COLORS.background,fontWeight:'bold'},checkboxLabel:{fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,flex:1},checkboxLabelDisabled:{color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.sm}});export const SelectboxesRenderer=({component,value={},onChange,error,disabled=false,readOnly=false})=>{var _component$data;const{label}=component;const options=parseOptions(((_component$data=component.data)==null?void 0:_component$data.values)||component.values||[]);const selectedValues=value||{};const handleToggle=optionValue=>{if(disabled||readOnly)return;const newValue={...selectedValues,[String(optionValue)]:!selectedValues[String(optionValue)]};onChange(newValue);};const{translate}=useI18n();return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},translate(label)),React.createElement(View,{style:styles.checkboxGroup},options.map(option=>{const isSelected=selectedValues[String(option.value)];return React.createElement(TouchableOpacity,{key:String(option.value),style:styles.checkboxItem,onPress:()=>handleToggle(option.value),disabled:disabled||readOnly},React.createElement(View,{style:[styles.checkbox,isSelected&&styles.checkboxSelected,(disabled||readOnly)&&styles.checkboxDisabled]},isSelected&&React.createElement(Text,{style:styles.checkmark},"\u2713")),React.createElement(Text,{style:[styles.checkboxLabel,(disabled||readOnly)&&styles.checkboxLabelDisabled]},option.label));})),error&&React.createElement(Text,{style:styles.errorText},error));};function parseOptions(data){if(!Array.isArray(data)){return[];}return data.map(item=>{if(typeof item==='string'){return{label:item,value:item};}if(typeof item==='object'&&item!==null){return{label:item.label||String(item.value),value:item.value};}return{label:String(item),value:item};});}
2
2
  //# sourceMappingURL=SelectboxesRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:100,textAlignVertical:'top'},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs},charCount:{fontSize:TYPOGRAPHY.fontSize.xs,color:COLORS.textSecondary,marginTop:SPACING.xs}});export const TextAreaRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{label,placeholder,maxLength}=component;const currentLength=String(value||'').length;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},label&&React.createElement(Text,{style:styles.label},label),React.createElement(TextInput,{style:inputStyle,placeholder:placeholder,placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),multiline:true,numberOfLines:4,maxLength:maxLength}),maxLength&&React.createElement(Text,{style:styles.charCount},currentLength," / ",maxLength),error&&React.createElement(Text,{style:styles.errorText},error));};
1
+ import React from'react';import{TextInput,StyleSheet,View,Text}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},label:{fontSize:TYPOGRAPHY.fontSize.sm,fontWeight:TYPOGRAPHY.fontWeight.semibold,color:COLORS.text,marginBottom:SPACING.xs},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:100,textAlignVertical:'top'},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled},errorText:{color:COLORS.error,fontSize:TYPOGRAPHY.fontSize.xs,marginTop:SPACING.xs},charCount:{fontSize:TYPOGRAPHY.fontSize.xs,color:COLORS.textSecondary,marginTop:SPACING.xs}});export const TextAreaRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,maxLength}=component;const currentLength=String(value||'').length;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),multiline:true,numberOfLines:4,maxLength:maxLength}),maxLength&&React.createElement(Text,{style:styles.charCount},currentLength," / ",maxLength),error&&React.createElement(Text,{style:styles.errorText},error));};
2
2
  //# sourceMappingURL=TextAreaRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const TextfieldRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,type='text'}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder,placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:getKeyboardType(type),secureTextEntry:type==='password',autoCapitalize:getAutoCapitalize(type),autoCorrect:type!=='email'&&type!=='url'}));};function getKeyboardType(type){const keyboardMap={email:'email-address',url:'url',number:'numeric',tel:'phone-pad',text:'default'};return keyboardMap[type]||'default';}function getAutoCapitalize(type){const capitalizeMap={email:'none',url:'none',text:'sentences'};return capitalizeMap[type]||'none';}
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const TextfieldRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{placeholder,type='text'}=component;const{translate}=useI18n();const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:getKeyboardType(type),secureTextEntry:type==='password',autoCapitalize:getAutoCapitalize(type),autoCorrect:type!=='email'&&type!=='url'}));};function getKeyboardType(type){const keyboardMap={email:'email-address',url:'url',number:'numeric',tel:'phone-pad',text:'default'};return keyboardMap[type]||'default';}function getAutoCapitalize(type){const capitalizeMap={email:'none',url:'none',text:'sentences'};return capitalizeMap[type]||'none';}
2
2
  //# sourceMappingURL=TextfieldRenderer.js.map
@@ -1,2 +1,2 @@
1
- import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const URLRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{label,placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:placeholder||'Enter URL',placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"default",autoCapitalize:"none",autoCorrect:false}));};
1
+ import React from'react';import{TextInput,StyleSheet,View}from'react-native';import{COLORS,SPACING,TYPOGRAPHY}from'../../constants';import{useI18n}from'../../i18n/I18nContext';const styles=StyleSheet.create({container:{marginBottom:SPACING.md},input:{borderWidth:1,borderColor:COLORS.border,borderRadius:4,paddingHorizontal:SPACING.sm,paddingVertical:SPACING.sm,fontSize:TYPOGRAPHY.fontSize.md,color:COLORS.text,minHeight:40},inputFocused:{borderColor:COLORS.primary},inputError:{borderColor:COLORS.error},inputDisabled:{backgroundColor:COLORS.disabled,color:COLORS.disabled}});export const URLRenderer=({component,value,onChange,error,disabled=false,readOnly=false})=>{const[state,setState]=React.useState({isFocused:false});const{label,placeholder}=component;const inputStyle=[styles.input,state.isFocused&&styles.inputFocused,error&&styles.inputError,disabled&&styles.inputDisabled];const{translate}=useI18n();return React.createElement(View,{style:styles.container},React.createElement(TextInput,{style:inputStyle,placeholder:translate(placeholder||'Enter URL'),placeholderTextColor:COLORS.placeholder,value:String(value||''),onChangeText:onChange,editable:!disabled&&!readOnly,onFocus:()=>setState({isFocused:true}),onBlur:()=>setState({isFocused:false}),keyboardType:"default",autoCapitalize:"none",autoCorrect:false}));};
2
2
  //# sourceMappingURL=URLRenderer.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formio-react-native",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "React Native renderer for Form.io forms",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",