@adiraku/react-native-ui 1.2.11 → 1.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/TextInput/TextInput.component.js +16 -16
- package/lib/commonjs/components/TextInput/TextInput.component.js.map +1 -1
- package/lib/module/components/TextInput/TextInput.component.js +16 -16
- package/lib/module/components/TextInput/TextInput.component.js.map +1 -1
- package/package.json +2 -2
- package/react-native-ui.podspec +4 -20
- package/src/components/TextInput/TextInput.component.tsx +16 -16
|
@@ -120,7 +120,21 @@ const TextInput = props => {
|
|
|
120
120
|
style: computedStyle.fieldWrapper
|
|
121
121
|
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
122
122
|
style: computedStyle.fieldContainer
|
|
123
|
-
},
|
|
123
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
124
|
+
style: computedStyle.inputWrapper
|
|
125
|
+
}, /*#__PURE__*/React.createElement(_reactNativeMaskInput.default, _extends({
|
|
126
|
+
value: computedValue,
|
|
127
|
+
style: [computedStyle.textField],
|
|
128
|
+
onFocus: handleOnFocus,
|
|
129
|
+
onBlur: handleOnBlur,
|
|
130
|
+
placeholderTextColor: focused ? _themes.Palettes.black[500] : 'transparent',
|
|
131
|
+
showSoftInputOnFocus: inputType === 'date' ? false : showSoftInputOnFocus,
|
|
132
|
+
onTouchStart: handleOnTouchStart,
|
|
133
|
+
onChangeText: handleOnchangeText
|
|
134
|
+
}, rest)), inputIcon || counter > 0 ? inputIcon || /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
135
|
+
style: computedStyle.counter,
|
|
136
|
+
variant: "caption"
|
|
137
|
+
}, `${computedValue === null || computedValue === void 0 ? void 0 : computedValue.length}/${counter}`) : null), !!label && /*#__PURE__*/React.createElement(_reactNative.Animated.View, {
|
|
124
138
|
style: [computedStyle.labelContainer, {
|
|
125
139
|
transform: [{
|
|
126
140
|
scale
|
|
@@ -135,21 +149,7 @@ const TextInput = props => {
|
|
|
135
149
|
}, /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
136
150
|
variant: "body2",
|
|
137
151
|
style: computedStyle.label
|
|
138
|
-
}, label)), /*#__PURE__*/React.createElement(
|
|
139
|
-
style: computedStyle.inputWrapper
|
|
140
|
-
}, /*#__PURE__*/React.createElement(_reactNativeMaskInput.default, _extends({
|
|
141
|
-
value: computedValue,
|
|
142
|
-
style: [computedStyle.textField],
|
|
143
|
-
onFocus: handleOnFocus,
|
|
144
|
-
onBlur: handleOnBlur,
|
|
145
|
-
placeholderTextColor: focused ? _themes.Palettes.black[500] : 'transparent',
|
|
146
|
-
showSoftInputOnFocus: inputType === 'date' ? false : showSoftInputOnFocus,
|
|
147
|
-
onTouchStart: handleOnTouchStart,
|
|
148
|
-
onChangeText: handleOnchangeText
|
|
149
|
-
}, rest)), inputIcon || counter > 0 ? inputIcon || /*#__PURE__*/React.createElement(_typography.Typography, {
|
|
150
|
-
style: computedStyle.counter,
|
|
151
|
-
variant: "caption"
|
|
152
|
-
}, `${computedValue === null || computedValue === void 0 ? void 0 : computedValue.length}/${counter}`) : null)), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(_typography.Typography, _extends({
|
|
152
|
+
}, label))), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(_typography.Typography, _extends({
|
|
153
153
|
variant: "caption",
|
|
154
154
|
style: computedStyle.messageHelper
|
|
155
155
|
}, helperMessageProps), errorMessage || !isError && helperMessage) : null), inputType === 'date' && /*#__PURE__*/React.createElement(_calendars.Calendars, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeMaskInput","_interopRequireDefault","_TextInput","_typography","_calendars","_themes","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","helperMessageProps","isError","counter","inputIcon","onTouchStart","showSoftInputOnFocus","inputType","calendarProps","onChangeText","onChangeDate","rest","labelWidth","setLabelWidth","useState","focused","setFocused","isModalDateVisible","setIsModalDateVisible","computedStyle","getStyle","animation","useRef","Animated","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","computedValue","useMemo","options","weekday","day","month","year","formattedDate","Intl","DateTimeFormat","format","replace","letter","toUpperCase","handleOnTouchStart","handleOnchangeText","masked","unmasked","obfuscated","maskedDateObj","Date","isNaN","getTime","undefined","createElement","Fragment","View","style","fieldWrapper","fieldContainer","
|
|
1
|
+
{"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeMaskInput","_interopRequireDefault","_TextInput","_typography","_calendars","_themes","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","helperMessageProps","isError","counter","inputIcon","onTouchStart","showSoftInputOnFocus","inputType","calendarProps","onChangeText","onChangeDate","rest","labelWidth","setLabelWidth","useState","focused","setFocused","isModalDateVisible","setIsModalDateVisible","computedStyle","getStyle","animation","useRef","Animated","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","computedValue","useMemo","options","weekday","day","month","year","formattedDate","Intl","DateTimeFormat","format","replace","letter","toUpperCase","handleOnTouchStart","handleOnchangeText","masked","unmasked","obfuscated","maskedDateObj","Date","isNaN","getTime","undefined","createElement","Fragment","View","style","fieldWrapper","fieldContainer","inputWrapper","textField","placeholderTextColor","Palettes","black","Typography","variant","labelContainer","transform","onLayout","pointerEvents","messageHelper","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vE,kBAAmB;IAC9BwE,UAAU,EAAGC,IAAI,IAAKhF,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGgF,IAAI,CAAE;IAC3CC,SAAS,EAAEA,CAAA,KAAMzE,qBAAqB,CAAC,KAAK;EAAE,GAC1CV,aAAa,CAClB,CAEH,CAAC;AAEP,CAAC;AAACoF,OAAA,CAAAnG,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -112,7 +112,21 @@ const TextInput = props => {
|
|
|
112
112
|
style: computedStyle.fieldWrapper
|
|
113
113
|
}, /*#__PURE__*/React.createElement(View, {
|
|
114
114
|
style: computedStyle.fieldContainer
|
|
115
|
-
},
|
|
115
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
116
|
+
style: computedStyle.inputWrapper
|
|
117
|
+
}, /*#__PURE__*/React.createElement(MaskInput, _extends({
|
|
118
|
+
value: computedValue,
|
|
119
|
+
style: [computedStyle.textField],
|
|
120
|
+
onFocus: handleOnFocus,
|
|
121
|
+
onBlur: handleOnBlur,
|
|
122
|
+
placeholderTextColor: focused ? Palettes.black[500] : 'transparent',
|
|
123
|
+
showSoftInputOnFocus: inputType === 'date' ? false : showSoftInputOnFocus,
|
|
124
|
+
onTouchStart: handleOnTouchStart,
|
|
125
|
+
onChangeText: handleOnchangeText
|
|
126
|
+
}, rest)), inputIcon || counter > 0 ? inputIcon || /*#__PURE__*/React.createElement(Typography, {
|
|
127
|
+
style: computedStyle.counter,
|
|
128
|
+
variant: "caption"
|
|
129
|
+
}, `${computedValue === null || computedValue === void 0 ? void 0 : computedValue.length}/${counter}`) : null), !!label && /*#__PURE__*/React.createElement(Animated.View, {
|
|
116
130
|
style: [computedStyle.labelContainer, {
|
|
117
131
|
transform: [{
|
|
118
132
|
scale
|
|
@@ -127,21 +141,7 @@ const TextInput = props => {
|
|
|
127
141
|
}, /*#__PURE__*/React.createElement(Typography, {
|
|
128
142
|
variant: "body2",
|
|
129
143
|
style: computedStyle.label
|
|
130
|
-
}, label)), /*#__PURE__*/React.createElement(
|
|
131
|
-
style: computedStyle.inputWrapper
|
|
132
|
-
}, /*#__PURE__*/React.createElement(MaskInput, _extends({
|
|
133
|
-
value: computedValue,
|
|
134
|
-
style: [computedStyle.textField],
|
|
135
|
-
onFocus: handleOnFocus,
|
|
136
|
-
onBlur: handleOnBlur,
|
|
137
|
-
placeholderTextColor: focused ? Palettes.black[500] : 'transparent',
|
|
138
|
-
showSoftInputOnFocus: inputType === 'date' ? false : showSoftInputOnFocus,
|
|
139
|
-
onTouchStart: handleOnTouchStart,
|
|
140
|
-
onChangeText: handleOnchangeText
|
|
141
|
-
}, rest)), inputIcon || counter > 0 ? inputIcon || /*#__PURE__*/React.createElement(Typography, {
|
|
142
|
-
style: computedStyle.counter,
|
|
143
|
-
variant: "caption"
|
|
144
|
-
}, `${computedValue === null || computedValue === void 0 ? void 0 : computedValue.length}/${counter}`) : null)), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(Typography, _extends({
|
|
144
|
+
}, label))), errorMessage || helperMessage ? /*#__PURE__*/React.createElement(Typography, _extends({
|
|
145
145
|
variant: "caption",
|
|
146
146
|
style: computedStyle.messageHelper
|
|
147
147
|
}, helperMessageProps), errorMessage || !isError && helperMessage) : null), inputType === 'date' && /*#__PURE__*/React.createElement(Calendars, _extends({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Animated","MaskInput","getStyle","Typography","Calendars","Palettes","TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","helperMessageProps","isError","counter","inputIcon","onTouchStart","showSoftInputOnFocus","inputType","calendarProps","onChangeText","onChangeDate","rest","labelWidth","setLabelWidth","useState","focused","setFocused","isModalDateVisible","setIsModalDateVisible","computedStyle","animation","useRef","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","computedValue","useMemo","options","weekday","day","month","year","formattedDate","Intl","DateTimeFormat","format","replace","letter","toUpperCase","handleOnTouchStart","e","handleOnchangeText","masked","unmasked","obfuscated","maskedDateObj","Date","isNaN","getTime","undefined","createElement","Fragment","style","fieldWrapper","fieldContainer","
|
|
1
|
+
{"version":3,"names":["React","View","Animated","MaskInput","getStyle","Typography","Calendars","Palettes","TextInput","props","value","label","onBlur","onFocus","errorMessage","helperMessage","helperMessageProps","isError","counter","inputIcon","onTouchStart","showSoftInputOnFocus","inputType","calendarProps","onChangeText","onChangeDate","rest","labelWidth","setLabelWidth","useState","focused","setFocused","isModalDateVisible","setIsModalDateVisible","computedStyle","animation","useRef","Value","scale","current","interpolate","inputRange","outputRange","translateY","translateX","animate","toValue","spring","useNativeDriver","start","useEffect","handleOnFocus","event","handleOnBlur","getLabelWidth","width","nativeEvent","layout","computedValue","useMemo","options","weekday","day","month","year","formattedDate","Intl","DateTimeFormat","format","replace","letter","toUpperCase","handleOnTouchStart","e","handleOnchangeText","masked","unmasked","obfuscated","maskedDateObj","Date","isNaN","getTime","undefined","createElement","Fragment","style","fieldWrapper","fieldContainer","inputWrapper","_extends","textField","placeholderTextColor","black","variant","length","labelContainer","transform","onLayout","pointerEvents","messageHelper","isVisible","onDateSave","date","onDismiss"],"sourceRoot":"../../../../src","sources":["components/TextInput/TextInput.component.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,QAAQ,QAAQ,cAAc;AAOvC,OAAOC,SAAS,MAAM,yBAAyB;AAE/C,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,UAAU,QAAQ,oCAAoC;AAC/D,SAASC,SAAS,QAAQ,kCAAkC;AAE5D,SAASC,QAAQ,QAAQ,cAAc;AAGvC,MAAMC,SAAkD,GAAIC,KAAK,IAAK;EACpE,MAAM;IACJC,KAAK;IACLC,KAAK;IACLC,MAAM,GAAGA,CAAA,KAAM,IAAI;IACnBC,OAAO,GAAGA,CAAA,K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AAoF,QAAA;IACTI,OAAO,EAAC,SAAS;IACjBR,KAAK,EAAEnD,aAAa,CAACiE;EAAc,GAC/BnF,kBAAkB,GAErBF,YAAY,IAAM,CAACG,OAAO,IAAIF,aACrB,CAAC,GACX,IACA,CAAC,EAENO,SAAS,KAAK,MAAM,iBACnBtB,KAAA,CAAAmF,aAAA,CAAC7E,SAAS,EAAAmF,QAAA;IACRW,SAAS,EAAEpE,kBAAmB;IAC9BqE,UAAU,EAAGC,IAAI,IAAK7E,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAG6E,IAAI,CAAE;IAC3CC,SAAS,EAAEA,CAAA,KAAMtE,qBAAqB,CAAC,KAAK;EAAE,GAC1CV,aAAa,CAClB,CAEH,CAAC;AAEP,CAAC;AAED,SAASf,SAAS","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adiraku/react-native-ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.12",
|
|
4
4
|
"description": "UI library for Adiraku apps",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"react-native-calendars": "^1.1306.0",
|
|
138
138
|
"react-native-linear-gradient": "^2.8.3",
|
|
139
139
|
"react-native-mask-input": "^1.2.3",
|
|
140
|
-
"react-native-modal": "
|
|
140
|
+
"react-native-modal": "14.0.0-rc.0",
|
|
141
141
|
"react-native-toast-message": "^2.1.6"
|
|
142
142
|
}
|
|
143
143
|
}
|
package/react-native-ui.podspec
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
require "json"
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
|
-
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
|
5
4
|
|
|
6
5
|
Pod::Spec.new do |s|
|
|
7
6
|
s.name = "react-native-ui"
|
|
@@ -11,26 +10,11 @@ Pod::Spec.new do |s|
|
|
|
11
10
|
s.license = package["license"]
|
|
12
11
|
s.authors = package["author"]
|
|
13
12
|
|
|
14
|
-
s.platforms = { :ios =>
|
|
13
|
+
s.platforms = { :ios => min_ios_version_supported }
|
|
15
14
|
s.source = { :git => "https://bitbucket.com/AndhikaK/react-native-ui.git", :tag => "#{s.version}" }
|
|
16
15
|
|
|
17
|
-
s.source_files = "ios/**/*.{h,m,mm,swift}"
|
|
16
|
+
s.source_files = "ios/**/*.{h,m,mm,swift,cpp}"
|
|
17
|
+
s.private_header_files = "ios/**/*.h"
|
|
18
18
|
|
|
19
|
-
s
|
|
20
|
-
|
|
21
|
-
# Don't install the dependencies when we run `pod install` in the old architecture.
|
|
22
|
-
if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then
|
|
23
|
-
s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1"
|
|
24
|
-
s.pod_target_xcconfig = {
|
|
25
|
-
"HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"",
|
|
26
|
-
"OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1",
|
|
27
|
-
"CLANG_CXX_LANGUAGE_STANDARD" => "c++17"
|
|
28
|
-
}
|
|
29
|
-
s.dependency "React-RCTFabric"
|
|
30
|
-
s.dependency "React-Codegen"
|
|
31
|
-
s.dependency "RCT-Folly"
|
|
32
|
-
s.dependency "RCTRequired"
|
|
33
|
-
s.dependency "RCTTypeSafety"
|
|
34
|
-
s.dependency "ReactCommon/turbomodule/core"
|
|
35
|
-
end
|
|
19
|
+
install_modules_dependencies(s)
|
|
36
20
|
end
|
|
@@ -146,22 +146,6 @@ const TextInput: React.FunctionComponent<TextInputProps> = (props) => {
|
|
|
146
146
|
<>
|
|
147
147
|
<View style={computedStyle.fieldWrapper}>
|
|
148
148
|
<View style={computedStyle.fieldContainer}>
|
|
149
|
-
{!!label && (
|
|
150
|
-
<Animated.View
|
|
151
|
-
style={[
|
|
152
|
-
computedStyle.labelContainer,
|
|
153
|
-
{
|
|
154
|
-
transform: [{ scale }, { translateY }, { translateX }],
|
|
155
|
-
},
|
|
156
|
-
]}
|
|
157
|
-
onLayout={getLabelWidth}
|
|
158
|
-
pointerEvents="none"
|
|
159
|
-
>
|
|
160
|
-
<Typography variant="body2" style={computedStyle.label}>
|
|
161
|
-
{label}
|
|
162
|
-
</Typography>
|
|
163
|
-
</Animated.View>
|
|
164
|
-
)}
|
|
165
149
|
<View style={computedStyle.inputWrapper}>
|
|
166
150
|
<MaskInput
|
|
167
151
|
value={computedValue}
|
|
@@ -186,6 +170,22 @@ const TextInput: React.FunctionComponent<TextInputProps> = (props) => {
|
|
|
186
170
|
)
|
|
187
171
|
: null}
|
|
188
172
|
</View>
|
|
173
|
+
{!!label && (
|
|
174
|
+
<Animated.View
|
|
175
|
+
style={[
|
|
176
|
+
computedStyle.labelContainer,
|
|
177
|
+
{
|
|
178
|
+
transform: [{ scale }, { translateY }, { translateX }],
|
|
179
|
+
},
|
|
180
|
+
]}
|
|
181
|
+
onLayout={getLabelWidth}
|
|
182
|
+
pointerEvents="none"
|
|
183
|
+
>
|
|
184
|
+
<Typography variant="body2" style={computedStyle.label}>
|
|
185
|
+
{label}
|
|
186
|
+
</Typography>
|
|
187
|
+
</Animated.View>
|
|
188
|
+
)}
|
|
189
189
|
</View>
|
|
190
190
|
{errorMessage || helperMessage ? (
|
|
191
191
|
<Typography
|