sapo-components-ui-rn 1.0.57 → 1.0.58
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/dist/components/Icon/index.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +4 -4
- package/dist/components/TextInput/TextInputNumber.d.ts +25 -0
- package/dist/icons/IconDelNumber.d.ts +4 -0
- package/dist/index.esm.js +398 -155
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +396 -153
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Icon/index.tsx +5 -1
- package/src/components/TextInput/TextInput.tsx +22 -6
- package/src/components/TextInput/TextInputFlat.tsx +2 -1
- package/src/components/TextInput/TextInputNumber.tsx +453 -0
- package/src/icons/IconDelNumber.tsx +20 -0
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { StyleProp, TextStyle } from "react-native";
|
|
3
3
|
export type IconType = "FontAwesome" | "Image" | "MaterialIcons" | "Feather" | "MaterialCommunityIcons" | "Svg";
|
|
4
4
|
export interface IconProps {
|
|
5
|
-
name: "IconCheckboxActive" | "IconCheckbox" | "IconRadio" | "IconRadioActive" | "IconRadioDisable" | "IconArrowDown" | "IconClearText" | "IconSearch" | "IconClose" | "IconSuccess" | "IconError" | "IconInfo" | "IconWarning";
|
|
5
|
+
name: "IconCheckboxActive" | "IconCheckbox" | "IconRadio" | "IconRadioActive" | "IconRadioDisable" | "IconArrowDown" | "IconClearText" | "IconSearch" | "IconClose" | "IconSuccess" | "IconError" | "IconInfo" | "IconWarning" | "IconDelNumber";
|
|
6
6
|
backgroundColor?: string;
|
|
7
7
|
size?: number;
|
|
8
8
|
color?: string;
|
|
@@ -4,7 +4,7 @@ import { Props as TextInputAffixProps } from "./Adornment/TextInputAffix";
|
|
|
4
4
|
import type { RenderProps, TextInputLabelProp } from "./types";
|
|
5
5
|
import type { ThemeProp } from "../../types";
|
|
6
6
|
export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
7
|
-
mode?: "flat" | "default";
|
|
7
|
+
mode?: "flat" | "default" | "number";
|
|
8
8
|
left?: React.ReactNode;
|
|
9
9
|
right?: React.ReactNode;
|
|
10
10
|
prefix?: string;
|
|
@@ -16,11 +16,11 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
16
16
|
/**
|
|
17
17
|
* The text or component to use for the floating label.
|
|
18
18
|
*/
|
|
19
|
-
label
|
|
19
|
+
label: TextInputLabelProp;
|
|
20
20
|
/**
|
|
21
21
|
* Placeholder for the input.
|
|
22
22
|
*/
|
|
23
|
-
placeholder
|
|
23
|
+
placeholder: string;
|
|
24
24
|
/**
|
|
25
25
|
* Whether to style the TextInput with error style.
|
|
26
26
|
*/
|
|
@@ -143,8 +143,8 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
143
143
|
* Example: `borderRadius`, `borderColor`
|
|
144
144
|
*/
|
|
145
145
|
underlineStyle?: StyleProp<ViewStyle>;
|
|
146
|
+
minHeight?: number;
|
|
146
147
|
clearButton?: boolean;
|
|
147
|
-
textStyle?: StyleProp<TextStyle>;
|
|
148
148
|
};
|
|
149
149
|
interface CompoundedComponent extends React.ForwardRefExoticComponent<Props & React.RefAttributes<TextInputHandles>> {
|
|
150
150
|
Affix: React.FunctionComponent<Partial<TextInputAffixProps>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle, TouchableOpacityProps, TextStyle } from "react-native";
|
|
3
|
+
import { IText } from "../Text";
|
|
4
|
+
import { ThemeProp } from "../../types";
|
|
5
|
+
export interface TextInputNumberProps extends TouchableOpacityProps {
|
|
6
|
+
style?: StyleProp<ViewStyle>;
|
|
7
|
+
borderColor?: string;
|
|
8
|
+
value?: string;
|
|
9
|
+
label?: string;
|
|
10
|
+
textError?: string;
|
|
11
|
+
left?: React.ReactNode;
|
|
12
|
+
right?: React.ReactNode;
|
|
13
|
+
textProps?: IText;
|
|
14
|
+
textColor?: string;
|
|
15
|
+
labelColor?: string;
|
|
16
|
+
textStyle?: TextStyle;
|
|
17
|
+
labelStyle?: TextStyle;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
prefix?: string;
|
|
20
|
+
onChangeText?: (value: string) => void;
|
|
21
|
+
clearButton?: boolean;
|
|
22
|
+
theme?: ThemeProp;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: React.MemoExoticComponent<({ style, value, label, textError, borderColor, left, right, textStyle, labelStyle, textProps, onChangeText, disabled, textColor, labelColor, theme: themeOverrides, prefix, clearButton, ...props }: TextInputNumberProps) => React.JSX.Element>;
|
|
25
|
+
export default _default;
|