dhre-ui-kit 0.0.156 → 0.0.158
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/index.d.ts +5 -5
- package/lib/index.js +35 -21
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +35 -21
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { SvgProps } from 'react-native-svg';
|
|
|
4
4
|
import { PdfProps } from 'react-native-pdf';
|
|
5
5
|
import { CalendarProps } from 'react-native-calendars';
|
|
6
6
|
import { CountryCode } from 'react-native-country-picker-modal';
|
|
7
|
+
import { TextInputProps as TextInputProps$1 } from 'react-native-paper';
|
|
7
8
|
import { DocumentPickerResponse } from 'react-native-document-picker';
|
|
8
9
|
|
|
9
10
|
interface FontStyles {
|
|
@@ -584,10 +585,8 @@ interface MobileNumberInputProps {
|
|
|
584
585
|
}
|
|
585
586
|
declare const CountryDropDown: ({ defaultCountryCode, defaultCallingCode, placeholder, onChangeText, value, containerStyle, inputStyle, countryPickerStyle, callingCodeStyle, getCountryCode, maxLength, errorMessage, label, }: MobileNumberInputProps) => React$1.JSX.Element;
|
|
586
587
|
|
|
587
|
-
interface CommonTextInputProps {
|
|
588
|
-
label: string;
|
|
588
|
+
interface CommonTextInputProps extends TextInputProps$1 {
|
|
589
589
|
value?: string;
|
|
590
|
-
onChangeText: (text: string) => void;
|
|
591
590
|
placeholderText?: string;
|
|
592
591
|
isSecureTextEntry?: boolean;
|
|
593
592
|
activeBorderColor?: string;
|
|
@@ -602,9 +601,10 @@ interface CommonTextInputProps {
|
|
|
602
601
|
labelColor?: string;
|
|
603
602
|
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
|
|
604
603
|
handlePress?: () => void;
|
|
605
|
-
|
|
604
|
+
rightIcon?: () => React$1.ReactElement;
|
|
605
|
+
onRightIconPress?: () => void;
|
|
606
606
|
}
|
|
607
|
-
declare const CommonTextInput: React$1.
|
|
607
|
+
declare const CommonTextInput: (props: CommonTextInputProps) => React$1.JSX.Element;
|
|
608
608
|
|
|
609
609
|
interface CustomDropdownProps {
|
|
610
610
|
data: {
|
package/lib/index.js
CHANGED
|
@@ -3241,26 +3241,29 @@ const styles$9 = reactNative.StyleSheet.create({
|
|
|
3241
3241
|
}
|
|
3242
3242
|
});
|
|
3243
3243
|
|
|
3244
|
-
const CommonTextInput = ({
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3244
|
+
const CommonTextInput = (props) => {
|
|
3245
|
+
const {
|
|
3246
|
+
label,
|
|
3247
|
+
value,
|
|
3248
|
+
onChangeText,
|
|
3249
|
+
isSecureTextEntry = false,
|
|
3250
|
+
keyboardType = "default",
|
|
3251
|
+
placeholderText,
|
|
3252
|
+
activeBorderColor = theme.CONTENT_PRIMARY["light"],
|
|
3253
|
+
inactiveBorderColor = theme.BORDER_PRIMARY["light"],
|
|
3254
|
+
inputStyle,
|
|
3255
|
+
maxLength,
|
|
3256
|
+
errorMessage,
|
|
3257
|
+
editable = true,
|
|
3258
|
+
textColor = theme.CONTENT_PRIMARY["light"],
|
|
3259
|
+
labelColor,
|
|
3260
|
+
handlePress,
|
|
3261
|
+
pointerEvents,
|
|
3262
|
+
multiline = false,
|
|
3263
|
+
// Default multiline to false
|
|
3264
|
+
rightIcon,
|
|
3265
|
+
onRightIconPress
|
|
3266
|
+
} = props;
|
|
3264
3267
|
return /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: handlePress, style: styles$8.container }, /* @__PURE__ */ React__default["default"].createElement(
|
|
3265
3268
|
reactNativePaper.TextInput,
|
|
3266
3269
|
{
|
|
@@ -3291,7 +3294,18 @@ const CommonTextInput = ({
|
|
|
3291
3294
|
editable,
|
|
3292
3295
|
pointerEvents,
|
|
3293
3296
|
multiline,
|
|
3294
|
-
numberOfLines: multiline ? 4 : 1
|
|
3297
|
+
numberOfLines: multiline ? 4 : 1,
|
|
3298
|
+
right: isSecureTextEntry ? /* @__PURE__ */ React__default["default"].createElement(
|
|
3299
|
+
reactNativePaper.TextInput.Icon,
|
|
3300
|
+
{
|
|
3301
|
+
icon: rightIcon ?? "",
|
|
3302
|
+
size: 24,
|
|
3303
|
+
onPress: () => {
|
|
3304
|
+
onRightIconPress?.();
|
|
3305
|
+
}
|
|
3306
|
+
}
|
|
3307
|
+
) : null,
|
|
3308
|
+
...props
|
|
3295
3309
|
}
|
|
3296
3310
|
), errorMessage ? /* @__PURE__ */ React__default["default"].createElement(
|
|
3297
3311
|
CustomTypography,
|