react-native-ui-lib 7.35.1 → 7.36.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uilib-native",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "homepage": "https://github.com/wix/react-native-ui-lib",
5
5
  "description": "uilib native components (separated from js components)",
6
6
  "main": "components/index",
@@ -10,14 +10,14 @@
10
10
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
11
11
  "license": "MIT",
12
12
  "dependencies": {
13
- "lodash": "^4.0.0",
13
+ "lodash": "^4.17.21",
14
14
  "prop-types": "^15.5.10"
15
15
  },
16
16
  "devDependencies": {
17
17
  "shell-utils": "^1.0.10"
18
18
  },
19
19
  "peerDependencies": {
20
- "react": "^16.0.0",
21
- "react-native": "^0.51.0"
20
+ "react": ">=17.0.1",
21
+ "react-native": ">=0.64.1"
22
22
  }
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.35.1",
3
+ "version": "7.36.0",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
package/pieChart.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import {PieChart} from './src';
2
+ export default PieChart;
package/pieChart.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./src/components/pieChart').default;
@@ -403,7 +403,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
403
403
  color?: string | undefined;
404
404
  iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
405
405
  iconStyle?: StyleProp<ImageStyle>;
406
- iconProps?: Partial<import("../image").ImageProps> | undefined;
406
+ iconProps?: Partial<import("../icon").IconProps> | undefined;
407
407
  iconOnRight?: boolean | undefined;
408
408
  supportRTL?: boolean | undefined;
409
409
  backgroundColor?: string | undefined;
@@ -433,7 +433,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
433
433
  color?: string | undefined;
434
434
  iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
435
435
  iconStyle?: StyleProp<ImageStyle>;
436
- iconProps?: Partial<import("../image").ImageProps> | undefined;
436
+ iconProps?: Partial<import("../icon").IconProps> | undefined;
437
437
  iconOnRight?: boolean | undefined;
438
438
  supportRTL?: boolean | undefined;
439
439
  backgroundColor?: string | undefined;
@@ -463,7 +463,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
463
463
  color?: string | undefined;
464
464
  iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
465
465
  iconStyle?: StyleProp<ImageStyle>;
466
- iconProps?: Partial<import("../image").ImageProps> | undefined;
466
+ iconProps?: Partial<import("../icon").IconProps> | undefined;
467
467
  iconOnRight?: boolean | undefined;
468
468
  supportRTL?: boolean | undefined;
469
469
  backgroundColor?: string | undefined;
@@ -493,7 +493,7 @@ declare const _default: React.ForwardRefExoticComponent<((import("../touchableOp
493
493
  color?: string | undefined;
494
494
  iconSource?: import("../image").ImageSourceType | ((iconStyle?: StyleProp<ImageStyle>[] | undefined) => JSX.Element) | null;
495
495
  iconStyle?: StyleProp<ImageStyle>;
496
- iconProps?: Partial<import("../image").ImageProps> | undefined;
496
+ iconProps?: Partial<import("../icon").IconProps> | undefined;
497
497
  iconOnRight?: boolean | undefined;
498
498
  supportRTL?: boolean | undefined;
499
499
  backgroundColor?: string | undefined;
@@ -4,6 +4,7 @@ import { BaseComponentInjectedProps, ForwardRefInjectedProps, TypographyModifier
4
4
  import { TouchableOpacityProps } from '../touchableOpacity';
5
5
  import { TextProps } from '../text';
6
6
  import { ImageProps } from '../image';
7
+ import type { IconProps } from '../icon';
7
8
  export declare enum ButtonSize {
8
9
  xSmall = "xSmall",
9
10
  small = "small",
@@ -38,7 +39,7 @@ export type ButtonProps = TouchableOpacityProps & TypographyModifiers & ColorsMo
38
39
  /**
39
40
  * Other image props that will be passed to the image
40
41
  */
41
- iconProps?: Partial<ImageProps>;
42
+ iconProps?: Partial<IconProps>;
42
43
  /**
43
44
  * Should the icon be right to the label
44
45
  */
@@ -34,7 +34,8 @@ const PickerItemsList = props => {
34
34
  mode,
35
35
  testID,
36
36
  showLoader,
37
- customLoaderElement
37
+ customLoaderElement,
38
+ renderCustomTopElement
38
39
  } = props;
39
40
  const context = useContext(PickerContext);
40
41
  const [wheelPickerValue, setWheelPickerValue] = useState(context.value ?? items?.[0]?.value);
@@ -126,6 +127,7 @@ const PickerItemsList = props => {
126
127
  const renderContent = () => {
127
128
  return useWheelPicker ? renderWheel() : <>
128
129
  {renderSearchInput()}
130
+ {renderCustomTopElement?.(context.value)}
129
131
  {renderList()}
130
132
  </>;
131
133
  };
@@ -47,6 +47,11 @@
47
47
  "type": "(value, {{...props, isSelected}}, itemLabel) => void",
48
48
  "description": "Render custom picker item"
49
49
  },
50
+ {
51
+ "name": "renderCustomTopElement",
52
+ "type": "(value?: PickerValue) => React.ReactElement",
53
+ "description": "Render custom top element"
54
+ },
50
55
  {
51
56
  "name": "renderCustomModal",
52
57
  "type": "({visible, children, toggleModal}) => void)",
@@ -57,6 +57,7 @@ const Picker = React.forwardRef((props, ref) => {
57
57
  items: propItems,
58
58
  showLoader,
59
59
  customLoaderElement,
60
+ renderCustomTopElement,
60
61
  ...others
61
62
  } = themeProps;
62
63
  const {
@@ -200,7 +201,7 @@ const Picker = React.forwardRef((props, ref) => {
200
201
  ...topBarProps,
201
202
  onCancel: cancelSelect,
202
203
  onDone: mode === PickerModes.MULTI ? () => onDoneSelecting(multiDraftValue) : undefined
203
- }} showSearch={showSearch} searchStyle={searchStyle} searchPlaceholder={searchPlaceholder} onSearchChange={_onSearchChange} renderCustomSearch={renderCustomSearch} renderHeader={renderHeader} listProps={listProps} useSafeArea={useSafeArea} showLoader={showLoader} customLoaderElement={customLoaderElement}>
204
+ }} showSearch={showSearch} searchStyle={searchStyle} searchPlaceholder={searchPlaceholder} onSearchChange={_onSearchChange} renderCustomSearch={renderCustomSearch} renderHeader={renderHeader} listProps={listProps} useSafeArea={useSafeArea} showLoader={showLoader} customLoaderElement={customLoaderElement} renderCustomTopElement={renderCustomTopElement}>
204
205
  {filteredItems}
205
206
  </PickerItemsList>;
206
207
  }, [testID, mode, useDialog, selectedItemPosition, topBarProps, cancelSelect, onDoneSelecting, multiDraftValue, showSearch, searchStyle, searchPlaceholder, _onSearchChange, renderCustomSearch, renderHeader, listProps, filteredItems, useSafeArea, useWheelPicker, items, showLoader]);
@@ -189,6 +189,10 @@ export type PickerBaseProps = Omit<TextFieldProps, 'value' | 'onChange'> & Picke
189
189
  isSelected: boolean;
190
190
  isItemDisabled: boolean;
191
191
  }, label?: string) => React.ReactElement;
192
+ /**
193
+ * Render custom top element
194
+ */
195
+ renderCustomTopElement?: (value?: PickerValue) => React.ReactElement;
192
196
  /**
193
197
  * Add onPress callback for when pressing the picker
194
198
  */
@@ -283,7 +287,7 @@ export interface PickerContextProps extends Pick<PickerProps, 'migrate' | 'value
283
287
  onSelectedLayout: (event: any) => any;
284
288
  selectionLimit: PickerProps['selectionLimit'];
285
289
  }
286
- export type PickerItemsListProps = Pick<PropsWithChildren<PickerProps>, 'topBarProps' | 'listProps' | 'renderHeader' | 'useSafeArea' | 'showLoader' | 'customLoaderElement' | 'showSearch' | 'searchStyle' | 'searchPlaceholder' | 'onSearchChange' | 'renderCustomSearch' | 'children' | 'useWheelPicker' | 'useDialog' | 'mode' | 'testID'> & {
290
+ export type PickerItemsListProps = Pick<PropsWithChildren<PickerProps>, 'topBarProps' | 'listProps' | 'renderHeader' | 'useSafeArea' | 'showLoader' | 'customLoaderElement' | 'renderCustomTopElement' | 'showSearch' | 'searchStyle' | 'searchPlaceholder' | 'onSearchChange' | 'renderCustomSearch' | 'children' | 'useWheelPicker' | 'useDialog' | 'mode' | 'testID'> & {
287
291
  items?: {
288
292
  value: any;
289
293
  label: any;
@@ -0,0 +1,15 @@
1
+ {
2
+ "name": "PieChart",
3
+ "category": "charts",
4
+ "description": "Pie Chart",
5
+ "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/componentScreens/PieChartScreen.tsx",
6
+ "props": [
7
+ {"name": "segments", "type": "PieChartSegmentProps[]", "description": "Pie chart segments array"},
8
+ {"name": "diameter", "type": "number", "description": "Pie chart diameter"},
9
+ {"name": "dividerWidth", "type": "number", "description": "The width of the divider between the segments"},
10
+ {"name": "dividerColor", "type": "ColorValue", "description": "The color of the divider between the segments"}
11
+ ],
12
+ "snippet": [
13
+ "<PieChart segments={[{percentage: 50, color: Colors.blue30}, {percentage: 30, color: Colors.red30}, {percentage: 20, color: Colors.green30}]} diameter={144}/>"
14
+ ]
15
+ }
@@ -0,0 +1,34 @@
1
+ import React from 'react';
2
+ import { ColorValue } from 'react-native';
3
+ export type PieSegmentProps = {
4
+ /**
5
+ * The percentage of pie the segment should cover
6
+ */
7
+ percentage: number;
8
+ /**
9
+ * The radius of the containing pie
10
+ */
11
+ radius: number;
12
+ /**
13
+ * The color of the segment
14
+ */
15
+ color: string;
16
+ /**
17
+ * The start angle of the segment
18
+ */
19
+ startAngle?: number;
20
+ /**
21
+ * The padding between the segments and the container of the pie.
22
+ */
23
+ padding?: number;
24
+ /**
25
+ * The width of the divider between the segments
26
+ */
27
+ dividerWidth?: number;
28
+ /**
29
+ * The color of the divider between the segments
30
+ */
31
+ dividerColor?: ColorValue;
32
+ };
33
+ declare const PieSegment: (props: PieSegmentProps) => React.JSX.Element;
34
+ export default PieSegment;
@@ -0,0 +1,58 @@
1
+ import React from 'react';
2
+ import { StyleSheet } from 'react-native';
3
+ import View from "../view";
4
+ import { SvgPackage } from "../../optionalDependencies";
5
+ import { Colors } from "../../style";
6
+ const {
7
+ Svg,
8
+ Path
9
+ } = SvgPackage;
10
+ const PieSegment = props => {
11
+ const {
12
+ percentage,
13
+ radius,
14
+ color,
15
+ startAngle = 0,
16
+ padding = 0,
17
+ dividerWidth = 4,
18
+ dividerColor = Colors.$backgroundDefault
19
+ } = props;
20
+ const actualRadius = radius - padding;
21
+ const centerXAndY = radius;
22
+ const amountToCover = percentage / 100 * 360;
23
+ const angleFromTop = startAngle - 90;
24
+ const startRad = angleFromTop * Math.PI / 180;
25
+ const endRad = startRad + amountToCover * Math.PI / 180;
26
+ const startX = centerXAndY + Math.cos(startRad) * actualRadius;
27
+ const startY = centerXAndY + Math.sin(startRad) * actualRadius;
28
+ const endX = centerXAndY + Math.cos(endRad) * actualRadius;
29
+ const endY = centerXAndY + Math.sin(endRad) * actualRadius;
30
+ const largeArcFlag = amountToCover > 180 ? 1 : 0;
31
+ const sweepFlag = 1;
32
+ const arcPath = `
33
+ M ${centerXAndY} ${centerXAndY}
34
+ L ${startX} ${startY}
35
+ A ${actualRadius} ${actualRadius} 0 ${largeArcFlag} ${sweepFlag} ${endX} ${endY}
36
+ Z
37
+ `;
38
+ const startBorderLine = `M ${centerXAndY} ${centerXAndY} L ${startX} ${startY}`;
39
+ const endBorderLine = `M ${centerXAndY} ${centerXAndY} L ${endX} ${endY}`;
40
+ const arc = <Path d={arcPath} fill={color} />;
41
+ const borders = <Path d={`${startBorderLine} ${endBorderLine}`} fill="none" stroke={dividerColor} strokeWidth={dividerWidth / 2} strokeLinejoin="round" />;
42
+ const totalSize = radius * 2 + padding;
43
+ return <View style={styles.container}>
44
+ <Svg width={totalSize} height={totalSize} viewBox={`0 0 ${totalSize} ${totalSize}`} style={styles.svg}>
45
+ {arc}
46
+ {borders}
47
+ </Svg>
48
+ </View>;
49
+ };
50
+ export default PieSegment;
51
+ const styles = StyleSheet.create({
52
+ container: {
53
+ position: 'absolute'
54
+ },
55
+ svg: {
56
+ position: 'absolute'
57
+ }
58
+ });
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { PieSegmentProps } from './PieSegment';
3
+ export type PieChartSegmentProps = Pick<PieSegmentProps, 'percentage' | 'color'>;
4
+ export type PieChartProps = {
5
+ /**
6
+ * Pie chart segments array
7
+ */
8
+ segments: PieChartSegmentProps[];
9
+ /**
10
+ * Pie chart diameter
11
+ */
12
+ diameter?: number;
13
+ } & Pick<PieSegmentProps, 'dividerWidth' | 'dividerColor'>;
14
+ declare const PieChart: (props: PieChartProps) => React.JSX.Element | null;
15
+ export default PieChart;
@@ -0,0 +1,32 @@
1
+ import React from 'react';
2
+ import View from "../view";
3
+ import PieSegment from "./PieSegment";
4
+ import { SvgPackage } from "../../optionalDependencies";
5
+ const {
6
+ Svg,
7
+ Path
8
+ } = SvgPackage;
9
+ const DEFAULT_DIAMETER = 144;
10
+ const PieChart = props => {
11
+ const {
12
+ segments,
13
+ diameter = DEFAULT_DIAMETER,
14
+ ...others
15
+ } = props;
16
+ if (!Svg || !Path) {
17
+ console.error(`RNUILib PieChart requires installing "@react-native-svg" dependency`);
18
+ return null;
19
+ }
20
+ const renderPieSegments = () => {
21
+ let currentStartAngle = 0;
22
+ return segments.map((segment, index) => {
23
+ const startAngle = currentStartAngle;
24
+ currentStartAngle += segment.percentage / 100 * 360;
25
+ return <PieSegment key={index} {...segment} {...others} startAngle={startAngle} radius={diameter / 2} />;
26
+ });
27
+ };
28
+ return <View width={diameter} height={diameter}>
29
+ {renderPieSegments()}
30
+ </View>;
31
+ };
32
+ export default PieChart;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
- import { TextFieldProps } from './types';
3
- declare const ClearButton: ({ testID, onClear, onChangeText }: Pick<TextFieldProps, 'onClear' | 'testID' | 'onChangeText'>) => React.JSX.Element;
2
+ import { ClearButtonProps } from './types';
3
+ declare const ClearButton: ({ testID, onClear, onChangeText, clearButtonStyle }: ClearButtonProps) => React.JSX.Element;
4
4
  export default ClearButton;
@@ -3,7 +3,7 @@ import { StyleSheet } from 'react-native';
3
3
  import { useAnimatedStyle, useSharedValue, withTiming, Easing } from 'react-native-reanimated';
4
4
  import { useDidUpdate } from "../../hooks";
5
5
  import Assets from "../../assets";
6
- import { Spacings, Colors } from "../../style";
6
+ import { Colors } from "../../style";
7
7
  import View from "../view";
8
8
  import Button from "../button";
9
9
  import FieldContext from "./FieldContext";
@@ -22,7 +22,8 @@ const TIMING_CONFIG = {
22
22
  const ClearButton = ({
23
23
  testID,
24
24
  onClear,
25
- onChangeText
25
+ onChangeText,
26
+ clearButtonStyle
26
27
  }) => {
27
28
  const {
28
29
  hasValue
@@ -39,7 +40,7 @@ const ClearButton = ({
39
40
  opacity: animatedOpacity.value
40
41
  };
41
42
  });
42
- const style = useMemo(() => [styles.container, animatedStyle], [animatedStyle]);
43
+ const style = useMemo(() => [clearButtonStyle, animatedStyle], [clearButtonStyle, animatedStyle]);
43
44
  const animate = useCallback(() => {
44
45
  const toValue = hasValue ? VISIBLE_POSITION : NON_VISIBLE_POSITION;
45
46
  animatedValue.value = withTiming(toValue, TIMING_CONFIG);
@@ -57,9 +58,6 @@ const ClearButton = ({
57
58
  </View>;
58
59
  };
59
60
  const styles = StyleSheet.create({
60
- container: {
61
- marginHorizontal: Spacings.s3
62
- },
63
61
  clearIcon: {
64
62
  tintColor: Colors.$textNeutralLight
65
63
  }
@@ -6,13 +6,12 @@ interface StaticMembers {
6
6
  presets: typeof Presets;
7
7
  }
8
8
  export { TextFieldProps, FieldContextType, StaticMembers as TextFieldStaticMembers, TextFieldMethods, TextFieldRef, ValidationMessagePosition as TextFieldValidationMessagePosition, Validator as TextFieldValidator, ValidationMessagePositionType as TextFieldValidationMessagePositionType, MandatoryIndication as TextFieldMandatoryIndication, TextFieldValidators };
9
- declare const _default: React.ForwardRefExoticComponent<((Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & Partial<Record<"transparent" | "black" | "white" | "dark" | "$backgroundDefault" | "$backgroundElevated" | "$backgroundElevatedLight" | "$backgroundNeutralHeavy" | "$backgroundNeutralIdle" | "$backgroundNeutralMedium" | "$backgroundNeutral" | "$backgroundNeutralLight" | "$backgroundPrimaryHeavy" | "$backgroundPrimaryMedium" | "$backgroundPrimaryLight" | "$backgroundGeneralHeavy" | "$backgroundGeneralMedium" | "$backgroundGeneralLight" | "$backgroundSuccessHeavy" | "$backgroundSuccessLight" | "$backgroundWarningHeavy" | "$backgroundWarningLight" | "$backgroundMajorLight" | "$backgroundMajorHeavy" | "$backgroundDangerHeavy" | "$backgroundDangerLight" | "$backgroundDisabled" | "$backgroundDark" | "$backgroundDarkElevated" | "$backgroundDarkActive" | "$backgroundInverted" | "$textDisabled" | "$textDefault" | "$textNeutralHeavy" | "$textNeutral" | "$textNeutralLight" | "$textDefaultLight" | "$textPrimary" | "$textGeneral" | "$textSuccess" | "$textSuccessLight" | "$textMajor" | "$textDanger" | "$textDangerLight" | "$iconDefault" | "$iconNeutral" | "$iconDefaultLight" | "$iconPrimary" | "$iconPrimaryLight" | "$iconGeneral" | "$iconGeneralLight" | "$iconSuccess" | "$iconSuccessLight" | "$iconMajor" | "$iconDanger" | "$iconDangerLight" | "$iconDisabled" | "$outlineDefault" | "$outlineDisabled" | "$outlineDisabledHeavy" | "$outlineNeutral" | "$outlineNeutralHeavy" | "$outlinePrimary" | "$outlinePrimaryMedium" | "$outlineGeneral" | "$outlineWarning" | "$outlineDanger" | "$outlineInverted" | "$black" | "$white" | "grey1" | "grey5" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue1" | "blue5" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green1" | "green5" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow1" | "yellow5" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange1" | "orange5" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red1" | "red5" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple1" | "purple5" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet1" | "violet5" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
9
+ declare const _default: React.ForwardRefExoticComponent<((Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & Partial<Record<"transparent" | "black" | "white" | "dark" | "$backgroundDefault" | "$backgroundElevated" | "$backgroundElevatedLight" | "$backgroundNeutralHeavy" | "$backgroundNeutralIdle" | "$backgroundNeutralMedium" | "$backgroundNeutral" | "$backgroundNeutralLight" | "$backgroundPrimaryHeavy" | "$backgroundPrimaryMedium" | "$backgroundPrimaryLight" | "$backgroundGeneralHeavy" | "$backgroundGeneralMedium" | "$backgroundGeneralLight" | "$backgroundSuccessHeavy" | "$backgroundSuccessLight" | "$backgroundWarningHeavy" | "$backgroundWarningLight" | "$backgroundMajorLight" | "$backgroundMajorHeavy" | "$backgroundDangerHeavy" | "$backgroundDangerLight" | "$backgroundDisabled" | "$backgroundDark" | "$backgroundDarkElevated" | "$backgroundDarkActive" | "$backgroundInverted" | "$textDisabled" | "$textDefault" | "$textNeutralHeavy" | "$textNeutral" | "$textNeutralLight" | "$textDefaultLight" | "$textPrimary" | "$textGeneral" | "$textSuccess" | "$textSuccessLight" | "$textMajor" | "$textDanger" | "$textDangerLight" | "$iconDefault" | "$iconNeutral" | "$iconDefaultLight" | "$iconPrimary" | "$iconPrimaryLight" | "$iconGeneral" | "$iconGeneralLight" | "$iconSuccess" | "$iconSuccessLight" | "$iconMajor" | "$iconDanger" | "$iconDangerLight" | "$iconDisabled" | "$outlineDefault" | "$outlineDisabled" | "$outlineDisabledHeavy" | "$outlineNeutral" | "$outlineNeutralHeavy" | "$outlinePrimary" | "$outlinePrimaryMedium" | "$outlineGeneral" | "$outlineWarning" | "$outlineDanger" | "$outlineInverted" | "$black" | "$white" | "grey1" | "grey5" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue1" | "blue5" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green1" | "green5" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow1" | "yellow5" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange1" | "orange5" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red1" | "red5" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple1" | "purple5" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet1" | "violet5" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & Omit<import("./types").ClearButtonProps, "testID" | "onChangeText"> & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
10
10
  leadingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
11
11
  trailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
12
12
  topTrailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
13
13
  bottomAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
14
14
  showClearButton?: boolean | undefined;
15
- onClear?: (() => void) | undefined;
16
15
  helperText?: string | undefined;
17
16
  floatingPlaceholder?: boolean | undefined;
18
17
  floatingPlaceholderStyle?: import("react-native").TextStyle | undefined;
@@ -33,13 +32,12 @@ declare const _default: React.ForwardRefExoticComponent<((Partial<Record<"margin
33
32
  preset?: string | null | undefined;
34
33
  centered?: boolean | undefined;
35
34
  innerFlexBehavior?: boolean | undefined;
36
- }) | Omit<Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & import("../../commons/modifiers").CustomModifier & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
35
+ }) | Omit<Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & import("../../commons/modifiers").CustomModifier & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & Omit<import("./types").ClearButtonProps, "testID" | "onChangeText"> & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
37
36
  leadingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
38
37
  trailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
39
38
  topTrailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
40
39
  bottomAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
41
40
  showClearButton?: boolean | undefined;
42
- onClear?: (() => void) | undefined;
43
41
  helperText?: string | undefined;
44
42
  floatingPlaceholder?: boolean | undefined;
45
43
  floatingPlaceholderStyle?: import("react-native").TextStyle | undefined;
@@ -60,13 +58,12 @@ declare const _default: React.ForwardRefExoticComponent<((Partial<Record<"margin
60
58
  preset?: string | null | undefined;
61
59
  centered?: boolean | undefined;
62
60
  innerFlexBehavior?: boolean | undefined;
63
- }, "ref"> | Omit<Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & import("../../commons/modifiers").CustomModifier & Partial<Record<"transparent" | "black" | "white" | "dark" | "$backgroundDefault" | "$backgroundElevated" | "$backgroundElevatedLight" | "$backgroundNeutralHeavy" | "$backgroundNeutralIdle" | "$backgroundNeutralMedium" | "$backgroundNeutral" | "$backgroundNeutralLight" | "$backgroundPrimaryHeavy" | "$backgroundPrimaryMedium" | "$backgroundPrimaryLight" | "$backgroundGeneralHeavy" | "$backgroundGeneralMedium" | "$backgroundGeneralLight" | "$backgroundSuccessHeavy" | "$backgroundSuccessLight" | "$backgroundWarningHeavy" | "$backgroundWarningLight" | "$backgroundMajorLight" | "$backgroundMajorHeavy" | "$backgroundDangerHeavy" | "$backgroundDangerLight" | "$backgroundDisabled" | "$backgroundDark" | "$backgroundDarkElevated" | "$backgroundDarkActive" | "$backgroundInverted" | "$textDisabled" | "$textDefault" | "$textNeutralHeavy" | "$textNeutral" | "$textNeutralLight" | "$textDefaultLight" | "$textPrimary" | "$textGeneral" | "$textSuccess" | "$textSuccessLight" | "$textMajor" | "$textDanger" | "$textDangerLight" | "$iconDefault" | "$iconNeutral" | "$iconDefaultLight" | "$iconPrimary" | "$iconPrimaryLight" | "$iconGeneral" | "$iconGeneralLight" | "$iconSuccess" | "$iconSuccessLight" | "$iconMajor" | "$iconDanger" | "$iconDangerLight" | "$iconDisabled" | "$outlineDefault" | "$outlineDisabled" | "$outlineDisabledHeavy" | "$outlineNeutral" | "$outlineNeutralHeavy" | "$outlinePrimary" | "$outlinePrimaryMedium" | "$outlineGeneral" | "$outlineWarning" | "$outlineDanger" | "$outlineInverted" | "$black" | "$white" | "grey1" | "grey5" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue1" | "blue5" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green1" | "green5" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow1" | "yellow5" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange1" | "orange5" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red1" | "red5" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple1" | "purple5" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet1" | "violet5" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
61
+ }, "ref"> | Omit<Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & import("../../commons/modifiers").CustomModifier & Partial<Record<"transparent" | "black" | "white" | "dark" | "$backgroundDefault" | "$backgroundElevated" | "$backgroundElevatedLight" | "$backgroundNeutralHeavy" | "$backgroundNeutralIdle" | "$backgroundNeutralMedium" | "$backgroundNeutral" | "$backgroundNeutralLight" | "$backgroundPrimaryHeavy" | "$backgroundPrimaryMedium" | "$backgroundPrimaryLight" | "$backgroundGeneralHeavy" | "$backgroundGeneralMedium" | "$backgroundGeneralLight" | "$backgroundSuccessHeavy" | "$backgroundSuccessLight" | "$backgroundWarningHeavy" | "$backgroundWarningLight" | "$backgroundMajorLight" | "$backgroundMajorHeavy" | "$backgroundDangerHeavy" | "$backgroundDangerLight" | "$backgroundDisabled" | "$backgroundDark" | "$backgroundDarkElevated" | "$backgroundDarkActive" | "$backgroundInverted" | "$textDisabled" | "$textDefault" | "$textNeutralHeavy" | "$textNeutral" | "$textNeutralLight" | "$textDefaultLight" | "$textPrimary" | "$textGeneral" | "$textSuccess" | "$textSuccessLight" | "$textMajor" | "$textDanger" | "$textDangerLight" | "$iconDefault" | "$iconNeutral" | "$iconDefaultLight" | "$iconPrimary" | "$iconPrimaryLight" | "$iconGeneral" | "$iconGeneralLight" | "$iconSuccess" | "$iconSuccessLight" | "$iconMajor" | "$iconDanger" | "$iconDangerLight" | "$iconDisabled" | "$outlineDefault" | "$outlineDisabled" | "$outlineDisabledHeavy" | "$outlineNeutral" | "$outlineNeutralHeavy" | "$outlinePrimary" | "$outlinePrimaryMedium" | "$outlineGeneral" | "$outlineWarning" | "$outlineDanger" | "$outlineInverted" | "$black" | "$white" | "grey1" | "grey5" | "grey10" | "grey20" | "grey30" | "grey40" | "grey50" | "grey60" | "grey70" | "grey80" | "blue1" | "blue5" | "blue10" | "blue20" | "blue30" | "blue40" | "blue50" | "blue60" | "blue70" | "blue80" | "cyan10" | "cyan20" | "cyan30" | "cyan40" | "cyan50" | "cyan60" | "cyan70" | "cyan80" | "green1" | "green5" | "green10" | "green20" | "green30" | "green40" | "green50" | "green60" | "green70" | "green80" | "yellow1" | "yellow5" | "yellow10" | "yellow20" | "yellow30" | "yellow40" | "yellow50" | "yellow60" | "yellow70" | "yellow80" | "orange1" | "orange5" | "orange10" | "orange20" | "orange30" | "orange40" | "orange50" | "orange60" | "orange70" | "orange80" | "red1" | "red5" | "red10" | "red20" | "red30" | "red40" | "red50" | "red60" | "red70" | "red80" | "purple1" | "purple5" | "purple10" | "purple20" | "purple30" | "purple40" | "purple50" | "purple60" | "purple70" | "purple80" | "violet1" | "violet5" | "violet10" | "violet20" | "violet30" | "violet40" | "violet50" | "violet60" | "violet70" | "violet80", boolean>> & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & Omit<import("./types").ClearButtonProps, "testID" | "onChangeText"> & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
64
62
  leadingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
65
63
  trailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
66
64
  topTrailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
67
65
  bottomAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
68
66
  showClearButton?: boolean | undefined;
69
- onClear?: (() => void) | undefined;
70
67
  helperText?: string | undefined;
71
68
  floatingPlaceholder?: boolean | undefined;
72
69
  floatingPlaceholderStyle?: import("react-native").TextStyle | undefined;
@@ -87,13 +84,12 @@ declare const _default: React.ForwardRefExoticComponent<((Partial<Record<"margin
87
84
  preset?: string | null | undefined;
88
85
  centered?: boolean | undefined;
89
86
  innerFlexBehavior?: boolean | undefined;
90
- }, "ref"> | Omit<Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & import("../../commons/modifiers").CustomModifier & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
87
+ }, "ref"> | Omit<Partial<Record<"margin" | "marginL" | "marginT" | "marginR" | "marginB" | "marginH" | "marginV", boolean>> & Partial<Record<"padding" | "paddingL" | "paddingT" | "paddingR" | "paddingB" | "paddingH" | "paddingV", boolean>> & Partial<Record<"text10" | "text20" | "text30" | "text40" | "text50" | "text60" | "text65" | "text70" | "text80" | "text90" | "text100" | "text10T" | "text10L" | "text10R" | "text10M" | "text10BO" | "text10H" | "text10BL" | "text20T" | "text20L" | "text20R" | "text20M" | "text20BO" | "text20H" | "text20BL" | "text30T" | "text30L" | "text30R" | "text30M" | "text30BO" | "text30H" | "text30BL" | "text40T" | "text40L" | "text40R" | "text40M" | "text40BO" | "text40H" | "text40BL" | "text50T" | "text50L" | "text50R" | "text50M" | "text50BO" | "text50H" | "text50BL" | "text60T" | "text60L" | "text60R" | "text60M" | "text60BO" | "text60H" | "text60BL" | "text65T" | "text65L" | "text65R" | "text65M" | "text65BO" | "text65H" | "text65BL" | "text70T" | "text70L" | "text70R" | "text70M" | "text70BO" | "text70H" | "text70BL" | "text80T" | "text80L" | "text80R" | "text80M" | "text80BO" | "text80H" | "text80BL" | "text90T" | "text90L" | "text90R" | "text90M" | "text90BO" | "text90H" | "text90BL" | "text100T" | "text100L" | "text100R" | "text100M" | "text100BO" | "text100H" | "text100BL", boolean>> & import("../../commons/modifiers").CustomModifier & import("./types").InputProps & import("./types").LabelProps & Omit<import("./types").FloatingPlaceholderProps, "testID"> & MandatoryIndication & Omit<import("./types").ClearButtonProps, "testID" | "onChangeText"> & import("./types").ValidationMessageProps & Omit<import("./types").CharCounterProps, "testID" | "maxLength"> & {
91
88
  leadingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
92
89
  trailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
93
90
  topTrailingAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
94
91
  bottomAccessory?: React.ReactElement<any, string | React.JSXElementConstructor<any>> | undefined;
95
92
  showClearButton?: boolean | undefined;
96
- onClear?: (() => void) | undefined;
97
93
  helperText?: string | undefined;
98
94
  floatingPlaceholder?: boolean | undefined;
99
95
  floatingPlaceholderStyle?: import("react-native").TextStyle | undefined;
@@ -77,6 +77,7 @@ const TextField = props => {
77
77
  centered,
78
78
  readonly = false,
79
79
  showMandatoryIndication,
80
+ clearButtonStyle,
80
81
  ...others
81
82
  } = usePreset(props);
82
83
  const {
@@ -160,7 +161,7 @@ const TextField = props => {
160
161
  {floatingPlaceholder && <FloatingPlaceholder defaultValue={others.defaultValue} placeholder={placeholder} floatingPlaceholderStyle={_floatingPlaceholderStyle} floatingPlaceholderColor={floatingPlaceholderColor} floatOnFocus={floatOnFocus} validationMessagePosition={validationMessagePosition} extraOffset={leadingAccessoryMeasurements?.width} testID={`${props.testID}.floatingPlaceholder`} showMandatoryIndication={showMandatoryIndication} />}
161
162
  <Input placeholderTextColor={hidePlaceholder ? 'transparent' : placeholderTextColor} value={fieldState.value} {...others} readonly={readonly} style={inputStyle} onFocus={onFocus} onBlur={onBlur} onChangeText={onChangeText} placeholder={placeholder} hint={hint} showMandatoryIndication={showMandatoryIndication && !label} />
162
163
  </View>}
163
- {showClearButton && <ClearButton onClear={onClear} testID={`${props.testID}.clearButton`} onChangeText={onChangeText} />}
164
+ {showClearButton && <ClearButton onClear={onClear} testID={`${props.testID}.clearButton`} onChangeText={onChangeText} clearButtonStyle={clearButtonStyle} />}
164
165
  {trailingAccessory}
165
166
  {/* </View> */}
166
167
  </View>
@@ -1,4 +1,7 @@
1
1
  declare const _default: {
2
+ clearButtonStyle: {
3
+ marginLeft: number;
4
+ };
2
5
  fieldStyle: {
3
6
  borderWidth: number;
4
7
  borderColor: string;
@@ -2,6 +2,9 @@ import { StyleSheet } from 'react-native';
2
2
  import { BorderRadiuses, Colors, Spacings } from "../../../style";
3
3
  import underline from "./underline";
4
4
  const styles = StyleSheet.create({
5
+ clearButtonStyle: {
6
+ marginLeft: Spacings.s3
7
+ },
5
8
  field: {
6
9
  borderWidth: 1,
7
10
  borderColor: Colors.$outlineDisabled,
@@ -12,5 +15,6 @@ const styles = StyleSheet.create({
12
15
  });
13
16
  export default {
14
17
  ...underline,
18
+ clearButtonStyle: styles.clearButtonStyle,
15
19
  fieldStyle: styles.field
16
20
  };
@@ -346,6 +346,9 @@ declare const _default: {
346
346
  verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
347
347
  includeFontPadding?: boolean | undefined;
348
348
  };
349
+ clearButtonStyle: {
350
+ marginHorizontal: number;
351
+ };
349
352
  floatingPlaceholderStyle: {
350
353
  color?: import("react-native").ColorValue | undefined;
351
354
  fontFamily?: string | undefined;
@@ -23,6 +23,9 @@ const styles = StyleSheet.create({
23
23
  lineHeight: undefined,
24
24
  height: Typography?.text70?.lineHeight
25
25
  },
26
+ clearButtonStyle: {
27
+ marginHorizontal: Spacings.s3
28
+ },
26
29
  floatingPlaceholder: {
27
30
  ...Typography.text70
28
31
  }
@@ -35,5 +38,6 @@ export default {
35
38
  labelColor: colorByState,
36
39
  fieldStyle: styles.field,
37
40
  style: styles.input,
41
+ clearButtonStyle: styles.clearButtonStyle,
38
42
  floatingPlaceholderStyle: styles.floatingPlaceholder
39
43
  };
@@ -52,6 +52,16 @@ export interface MandatoryIndication {
52
52
  */
53
53
  showMandatoryIndication?: boolean;
54
54
  }
55
+ export interface ClearButtonProps extends Pick<TextInputProps, 'testID' | 'onChangeText'> {
56
+ /**
57
+ * On clear button callback
58
+ */
59
+ onClear?: () => void;
60
+ /**
61
+ * The style of the clear button
62
+ */
63
+ clearButtonStyle?: StyleProp<ViewStyle>;
64
+ }
55
65
  export interface LabelProps extends MandatoryIndication, Pick<ValidationMessageProps, 'enableErrors'> {
56
66
  /**
57
67
  * Field label
@@ -157,7 +167,7 @@ export interface InputProps extends Omit<TextInputProps, 'placeholderTextColor'>
157
167
  */
158
168
  readonly?: boolean;
159
169
  }
160
- export type TextFieldProps = MarginModifiers & PaddingModifiers & TypographyModifiers & ColorsModifiers & InputProps & LabelProps & Omit<FloatingPlaceholderProps, 'testID'> & MandatoryIndication & ValidationMessageProps & Omit<CharCounterProps, 'maxLength' | 'testID'> & {
170
+ export type TextFieldProps = MarginModifiers & PaddingModifiers & TypographyModifiers & ColorsModifiers & InputProps & LabelProps & Omit<FloatingPlaceholderProps, 'testID'> & MandatoryIndication & Omit<ClearButtonProps, 'testID' | 'onChangeText'> & ValidationMessageProps & Omit<CharCounterProps, 'maxLength' | 'testID'> & {
161
171
  /**
162
172
  * Pass to render a leading element
163
173
  */
@@ -178,10 +188,6 @@ export type TextFieldProps = MarginModifiers & PaddingModifiers & TypographyModi
178
188
  * Should show a clear button when there is a value
179
189
  */
180
190
  showClearButton?: boolean;
181
- /**
182
- * On clear button callback
183
- */
184
- onClear?: () => void;
185
191
  /**
186
192
  * Text to display under the input
187
193
  */
@@ -188,6 +188,8 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
188
188
  floatingPlaceholderStyle?: ((false | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null) & import("react-native/types").TextStyle) | undefined;
189
189
  floatOnFocus?: boolean | undefined;
190
190
  extraOffset?: number | undefined;
191
+ onClear?: (() => void) | undefined;
192
+ clearButtonStyle?: import("react-native/types").StyleProp<import("react-native/types").ViewStyle>;
191
193
  validationMessage?: string | string[] | undefined;
192
194
  validationMessageStyle?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
193
195
  validationIcon?: import("../icon").IconProps | undefined;
@@ -200,7 +202,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
200
202
  topTrailingAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
201
203
  bottomAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
202
204
  showClearButton?: boolean | undefined;
203
- onClear?: (() => void) | undefined;
204
205
  helperText?: string | undefined;
205
206
  validateOnStart?: boolean | undefined;
206
207
  validateOnChange?: boolean | undefined;
@@ -651,6 +652,8 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
651
652
  floatingPlaceholderStyle?: ((false | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null) & import("react-native/types").TextStyle) | undefined;
652
653
  floatOnFocus?: boolean | undefined;
653
654
  extraOffset?: number | undefined;
655
+ onClear?: (() => void) | undefined;
656
+ clearButtonStyle?: import("react-native/types").StyleProp<import("react-native/types").ViewStyle>;
654
657
  validationMessage?: string | string[] | undefined;
655
658
  validationMessageStyle?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
656
659
  validationIcon?: import("../icon").IconProps | undefined;
@@ -663,7 +666,6 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
663
666
  topTrailingAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
664
667
  bottomAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
665
668
  showClearButton?: boolean | undefined;
666
- onClear?: (() => void) | undefined;
667
669
  helperText?: string | undefined;
668
670
  validateOnStart?: boolean | undefined;
669
671
  validateOnChange?: boolean | undefined;
@@ -1140,6 +1142,10 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
1140
1142
  floatingPlaceholderStyle: (false | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null) & import("react-native/types").TextStyle;
1141
1143
  floatOnFocus?: boolean | undefined;
1142
1144
  extraOffset?: number | undefined;
1145
+ onClear?: (() => void) | undefined;
1146
+ clearButtonStyle: false | import("react-native/types").ViewStyle | import("react-native/types").RegisteredStyle<import("react-native/types").ViewStyle> | import("react-native/types").RecursiveArray<import("react-native/types").ViewStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").ViewStyle>> | {
1147
+ marginHorizontal: number;
1148
+ } | null;
1143
1149
  validationMessage?: string | string[] | undefined;
1144
1150
  validationMessageStyle?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
1145
1151
  validationIcon?: import("../icon").IconProps | undefined;
@@ -1152,7 +1158,497 @@ export default function usePreset({ preset, ...props }: InternalTextFieldProps):
1152
1158
  topTrailingAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
1153
1159
  bottomAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
1154
1160
  showClearButton?: boolean | undefined;
1161
+ helperText?: string | undefined;
1162
+ validateOnStart?: boolean | undefined;
1163
+ validateOnChange?: boolean | undefined;
1164
+ validationDebounceTime?: number | undefined;
1165
+ validateOnBlur: boolean;
1166
+ onValidationFailed?: ((failedValidatorIndex: number) => void) | undefined;
1167
+ onChangeValidity?: ((isValid: boolean) => void) | undefined;
1168
+ dynamicFieldStyle?: ((context: import("./types").FieldContextType, props: {
1169
+ preset: string | null | undefined;
1170
+ }) => import("react-native/types").StyleProp<import("react-native/types").ViewStyle>) | undefined;
1171
+ containerProps?: Omit<import("../view").ViewProps, "style"> | undefined;
1172
+ containerStyle?: import("react-native/types").StyleProp<import("react-native/types").ViewStyle>;
1173
+ centered?: boolean | undefined;
1174
+ innerFlexBehavior?: boolean | undefined;
1175
+ modifiers: import("../../commons/modifiers").ExtractedStyle;
1176
+ forwardedRef: import("react").ForwardedRef<any>;
1177
+ } | {
1178
+ fieldStyle: (import("react-native/types").StyleProp<import("react-native/types").ViewStyle> | {
1179
+ borderBottomWidth: number;
1180
+ borderBottomColor: string;
1181
+ paddingBottom: number;
1182
+ } | {
1183
+ borderWidth: number;
1184
+ borderColor: string;
1185
+ borderRadius: number;
1186
+ paddingHorizontal: number;
1187
+ paddingVertical: number;
1188
+ })[];
1189
+ margin?: boolean | undefined;
1190
+ marginL?: boolean | undefined;
1191
+ marginT?: boolean | undefined;
1192
+ marginR?: boolean | undefined;
1193
+ marginB?: boolean | undefined;
1194
+ marginH?: boolean | undefined;
1195
+ marginV?: boolean | undefined;
1196
+ padding?: boolean | undefined;
1197
+ paddingL?: boolean | undefined;
1198
+ paddingT?: boolean | undefined;
1199
+ paddingR?: boolean | undefined;
1200
+ paddingB?: boolean | undefined;
1201
+ paddingH?: boolean | undefined;
1202
+ paddingV?: boolean | undefined;
1203
+ text10?: boolean | undefined;
1204
+ text20?: boolean | undefined;
1205
+ text30?: boolean | undefined;
1206
+ text40?: boolean | undefined;
1207
+ text50?: boolean | undefined;
1208
+ text60?: boolean | undefined;
1209
+ text65?: boolean | undefined;
1210
+ text70?: boolean | undefined;
1211
+ text80?: boolean | undefined;
1212
+ text90?: boolean | undefined;
1213
+ text100?: boolean | undefined;
1214
+ text10T?: boolean | undefined;
1215
+ text10L?: boolean | undefined;
1216
+ text10R?: boolean | undefined;
1217
+ text10M?: boolean | undefined;
1218
+ text10BO?: boolean | undefined;
1219
+ text10H?: boolean | undefined;
1220
+ text10BL?: boolean | undefined;
1221
+ text20T?: boolean | undefined;
1222
+ text20L?: boolean | undefined;
1223
+ text20R?: boolean | undefined;
1224
+ text20M?: boolean | undefined;
1225
+ text20BO?: boolean | undefined;
1226
+ text20H?: boolean | undefined;
1227
+ text20BL?: boolean | undefined;
1228
+ text30T?: boolean | undefined;
1229
+ text30L?: boolean | undefined;
1230
+ text30R?: boolean | undefined;
1231
+ text30M?: boolean | undefined;
1232
+ text30BO?: boolean | undefined;
1233
+ text30H?: boolean | undefined;
1234
+ text30BL?: boolean | undefined;
1235
+ text40T?: boolean | undefined;
1236
+ text40L?: boolean | undefined;
1237
+ text40R?: boolean | undefined;
1238
+ text40M?: boolean | undefined;
1239
+ text40BO?: boolean | undefined;
1240
+ text40H?: boolean | undefined;
1241
+ text40BL?: boolean | undefined;
1242
+ text50T?: boolean | undefined;
1243
+ text50L?: boolean | undefined;
1244
+ text50R?: boolean | undefined;
1245
+ text50M?: boolean | undefined;
1246
+ text50BO?: boolean | undefined;
1247
+ text50H?: boolean | undefined;
1248
+ text50BL?: boolean | undefined;
1249
+ text60T?: boolean | undefined;
1250
+ text60L?: boolean | undefined;
1251
+ text60R?: boolean | undefined;
1252
+ text60M?: boolean | undefined;
1253
+ text60BO?: boolean | undefined;
1254
+ text60H?: boolean | undefined;
1255
+ text60BL?: boolean | undefined;
1256
+ text65T?: boolean | undefined;
1257
+ text65L?: boolean | undefined;
1258
+ text65R?: boolean | undefined;
1259
+ text65M?: boolean | undefined;
1260
+ text65BO?: boolean | undefined;
1261
+ text65H?: boolean | undefined;
1262
+ text65BL?: boolean | undefined;
1263
+ text70T?: boolean | undefined;
1264
+ text70L?: boolean | undefined;
1265
+ text70R?: boolean | undefined;
1266
+ text70M?: boolean | undefined;
1267
+ text70BO?: boolean | undefined;
1268
+ text70H?: boolean | undefined;
1269
+ text70BL?: boolean | undefined;
1270
+ text80T?: boolean | undefined;
1271
+ text80L?: boolean | undefined;
1272
+ text80R?: boolean | undefined;
1273
+ text80M?: boolean | undefined;
1274
+ text80BO?: boolean | undefined;
1275
+ text80H?: boolean | undefined;
1276
+ text80BL?: boolean | undefined;
1277
+ text90T?: boolean | undefined;
1278
+ text90L?: boolean | undefined;
1279
+ text90R?: boolean | undefined;
1280
+ text90M?: boolean | undefined;
1281
+ text90BO?: boolean | undefined;
1282
+ text90H?: boolean | undefined;
1283
+ text90BL?: boolean | undefined;
1284
+ text100T?: boolean | undefined;
1285
+ text100L?: boolean | undefined;
1286
+ text100R?: boolean | undefined;
1287
+ text100M?: boolean | undefined;
1288
+ text100BO?: boolean | undefined;
1289
+ text100H?: boolean | undefined;
1290
+ text100BL?: boolean | undefined;
1291
+ transparent?: boolean | undefined;
1292
+ black?: boolean | undefined;
1293
+ white?: boolean | undefined;
1294
+ dark?: boolean | undefined;
1295
+ $backgroundDefault?: boolean | undefined;
1296
+ $backgroundElevated?: boolean | undefined;
1297
+ $backgroundElevatedLight?: boolean | undefined;
1298
+ $backgroundNeutralHeavy?: boolean | undefined;
1299
+ $backgroundNeutralIdle?: boolean | undefined;
1300
+ $backgroundNeutralMedium?: boolean | undefined;
1301
+ $backgroundNeutral?: boolean | undefined;
1302
+ $backgroundNeutralLight?: boolean | undefined;
1303
+ $backgroundPrimaryHeavy?: boolean | undefined;
1304
+ $backgroundPrimaryMedium?: boolean | undefined;
1305
+ $backgroundPrimaryLight?: boolean | undefined;
1306
+ $backgroundGeneralHeavy?: boolean | undefined;
1307
+ $backgroundGeneralMedium?: boolean | undefined;
1308
+ $backgroundGeneralLight?: boolean | undefined;
1309
+ $backgroundSuccessHeavy?: boolean | undefined;
1310
+ $backgroundSuccessLight?: boolean | undefined;
1311
+ $backgroundWarningHeavy?: boolean | undefined;
1312
+ $backgroundWarningLight?: boolean | undefined;
1313
+ $backgroundMajorLight?: boolean | undefined;
1314
+ $backgroundMajorHeavy?: boolean | undefined;
1315
+ $backgroundDangerHeavy?: boolean | undefined;
1316
+ $backgroundDangerLight?: boolean | undefined;
1317
+ $backgroundDisabled?: boolean | undefined;
1318
+ $backgroundDark?: boolean | undefined;
1319
+ $backgroundDarkElevated?: boolean | undefined;
1320
+ $backgroundDarkActive?: boolean | undefined;
1321
+ $backgroundInverted?: boolean | undefined;
1322
+ $textDisabled?: boolean | undefined;
1323
+ $textDefault?: boolean | undefined;
1324
+ $textNeutralHeavy?: boolean | undefined;
1325
+ $textNeutral?: boolean | undefined;
1326
+ $textNeutralLight?: boolean | undefined;
1327
+ $textDefaultLight?: boolean | undefined;
1328
+ $textPrimary?: boolean | undefined;
1329
+ $textGeneral?: boolean | undefined;
1330
+ $textSuccess?: boolean | undefined;
1331
+ $textSuccessLight?: boolean | undefined;
1332
+ $textMajor?: boolean | undefined;
1333
+ $textDanger?: boolean | undefined;
1334
+ $textDangerLight?: boolean | undefined;
1335
+ $iconDefault?: boolean | undefined;
1336
+ $iconNeutral?: boolean | undefined;
1337
+ $iconDefaultLight?: boolean | undefined;
1338
+ $iconPrimary?: boolean | undefined;
1339
+ $iconPrimaryLight?: boolean | undefined;
1340
+ $iconGeneral?: boolean | undefined;
1341
+ $iconGeneralLight?: boolean | undefined;
1342
+ $iconSuccess?: boolean | undefined;
1343
+ $iconSuccessLight?: boolean | undefined;
1344
+ $iconMajor?: boolean | undefined;
1345
+ $iconDanger?: boolean | undefined;
1346
+ $iconDangerLight?: boolean | undefined;
1347
+ $iconDisabled?: boolean | undefined;
1348
+ $outlineDefault?: boolean | undefined;
1349
+ $outlineDisabled?: boolean | undefined;
1350
+ $outlineDisabledHeavy?: boolean | undefined;
1351
+ $outlineNeutral?: boolean | undefined;
1352
+ $outlineNeutralHeavy?: boolean | undefined;
1353
+ $outlinePrimary?: boolean | undefined;
1354
+ $outlinePrimaryMedium?: boolean | undefined;
1355
+ $outlineGeneral?: boolean | undefined;
1356
+ $outlineWarning?: boolean | undefined;
1357
+ $outlineDanger?: boolean | undefined;
1358
+ $outlineInverted?: boolean | undefined;
1359
+ $black?: boolean | undefined;
1360
+ $white?: boolean | undefined;
1361
+ grey1?: boolean | undefined;
1362
+ grey5?: boolean | undefined;
1363
+ grey10?: boolean | undefined;
1364
+ grey20?: boolean | undefined;
1365
+ grey30?: boolean | undefined;
1366
+ grey40?: boolean | undefined;
1367
+ grey50?: boolean | undefined;
1368
+ grey60?: boolean | undefined;
1369
+ grey70?: boolean | undefined;
1370
+ grey80?: boolean | undefined;
1371
+ blue1?: boolean | undefined;
1372
+ blue5?: boolean | undefined;
1373
+ blue10?: boolean | undefined;
1374
+ blue20?: boolean | undefined;
1375
+ blue30?: boolean | undefined;
1376
+ blue40?: boolean | undefined;
1377
+ blue50?: boolean | undefined;
1378
+ blue60?: boolean | undefined;
1379
+ blue70?: boolean | undefined;
1380
+ blue80?: boolean | undefined;
1381
+ cyan10?: boolean | undefined;
1382
+ cyan20?: boolean | undefined;
1383
+ cyan30?: boolean | undefined;
1384
+ cyan40?: boolean | undefined;
1385
+ cyan50?: boolean | undefined;
1386
+ cyan60?: boolean | undefined;
1387
+ cyan70?: boolean | undefined;
1388
+ cyan80?: boolean | undefined;
1389
+ green1?: boolean | undefined;
1390
+ green5?: boolean | undefined;
1391
+ green10?: boolean | undefined;
1392
+ green20?: boolean | undefined;
1393
+ green30?: boolean | undefined;
1394
+ green40?: boolean | undefined;
1395
+ green50?: boolean | undefined;
1396
+ green60?: boolean | undefined;
1397
+ green70?: boolean | undefined;
1398
+ green80?: boolean | undefined;
1399
+ yellow1?: boolean | undefined;
1400
+ yellow5?: boolean | undefined;
1401
+ yellow10?: boolean | undefined;
1402
+ yellow20?: boolean | undefined;
1403
+ yellow30?: boolean | undefined;
1404
+ yellow40?: boolean | undefined;
1405
+ yellow50?: boolean | undefined;
1406
+ yellow60?: boolean | undefined;
1407
+ yellow70?: boolean | undefined;
1408
+ yellow80?: boolean | undefined;
1409
+ orange1?: boolean | undefined;
1410
+ orange5?: boolean | undefined;
1411
+ orange10?: boolean | undefined;
1412
+ orange20?: boolean | undefined;
1413
+ orange30?: boolean | undefined;
1414
+ orange40?: boolean | undefined;
1415
+ orange50?: boolean | undefined;
1416
+ orange60?: boolean | undefined;
1417
+ orange70?: boolean | undefined;
1418
+ orange80?: boolean | undefined;
1419
+ red1?: boolean | undefined;
1420
+ red5?: boolean | undefined;
1421
+ red10?: boolean | undefined;
1422
+ red20?: boolean | undefined;
1423
+ red30?: boolean | undefined;
1424
+ red40?: boolean | undefined;
1425
+ red50?: boolean | undefined;
1426
+ red60?: boolean | undefined;
1427
+ red70?: boolean | undefined;
1428
+ red80?: boolean | undefined;
1429
+ purple1?: boolean | undefined;
1430
+ purple5?: boolean | undefined;
1431
+ purple10?: boolean | undefined;
1432
+ purple20?: boolean | undefined;
1433
+ purple30?: boolean | undefined;
1434
+ purple40?: boolean | undefined;
1435
+ purple50?: boolean | undefined;
1436
+ purple60?: boolean | undefined;
1437
+ purple70?: boolean | undefined;
1438
+ purple80?: boolean | undefined;
1439
+ violet1?: boolean | undefined;
1440
+ violet5?: boolean | undefined;
1441
+ violet10?: boolean | undefined;
1442
+ violet20?: boolean | undefined;
1443
+ violet30?: boolean | undefined;
1444
+ violet40?: boolean | undefined;
1445
+ violet50?: boolean | undefined;
1446
+ violet60?: boolean | undefined;
1447
+ violet70?: boolean | undefined;
1448
+ violet80?: boolean | undefined;
1449
+ hint?: string | undefined;
1450
+ color?: import("./types").ColorType | undefined;
1451
+ placeholderTextColor: import("./types").ColorType | {
1452
+ default: string;
1453
+ error: string;
1454
+ focus: string;
1455
+ disabled: string;
1456
+ };
1457
+ formatter?: ((value?: string | undefined) => string | undefined) | undefined;
1458
+ useGestureHandlerInput?: boolean | undefined;
1459
+ readonly?: boolean | undefined;
1460
+ value?: string | undefined;
1461
+ textAlign?: "left" | "right" | "center" | undefined;
1462
+ pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
1463
+ textAlignVertical?: "auto" | "center" | "top" | "bottom" | undefined;
1464
+ verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
1465
+ selection?: {
1466
+ start: number;
1467
+ end?: number | undefined;
1468
+ } | undefined;
1469
+ children?: import("react").ReactNode;
1470
+ style: false | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null;
1471
+ testID?: string | undefined;
1472
+ removeClippedSubviews?: boolean | undefined;
1473
+ onLayout?: ((event: import("react-native/types").LayoutChangeEvent) => void) | undefined;
1474
+ onContentSizeChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputContentSizeChangeEventData>) => void) | undefined;
1475
+ onScroll?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputScrollEventData>) => void) | undefined;
1476
+ scrollEnabled?: boolean | undefined;
1477
+ hitSlop?: import("react-native/types").Insets | undefined;
1478
+ id?: string | undefined;
1479
+ nativeID?: string | undefined;
1480
+ collapsable?: boolean | undefined;
1481
+ needsOffscreenAlphaCompositing?: boolean | undefined;
1482
+ renderToHardwareTextureAndroid?: boolean | undefined;
1483
+ focusable?: boolean | undefined;
1484
+ shouldRasterizeIOS?: boolean | undefined;
1485
+ isTVSelectable?: boolean | undefined;
1486
+ hasTVPreferredFocus?: boolean | undefined;
1487
+ tvParallaxProperties?: import("react-native/types").TVParallaxProperties | undefined;
1488
+ tvParallaxShiftDistanceX?: number | undefined;
1489
+ tvParallaxShiftDistanceY?: number | undefined;
1490
+ tvParallaxTiltAngle?: number | undefined;
1491
+ tvParallaxMagnification?: number | undefined;
1492
+ onStartShouldSetResponder?: ((event: import("react-native/types").GestureResponderEvent) => boolean) | undefined;
1493
+ onMoveShouldSetResponder?: ((event: import("react-native/types").GestureResponderEvent) => boolean) | undefined;
1494
+ onResponderEnd?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1495
+ onResponderGrant?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1496
+ onResponderReject?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1497
+ onResponderMove?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1498
+ onResponderRelease?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1499
+ onResponderStart?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1500
+ onResponderTerminationRequest?: ((event: import("react-native/types").GestureResponderEvent) => boolean) | undefined;
1501
+ onResponderTerminate?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1502
+ onStartShouldSetResponderCapture?: ((event: import("react-native/types").GestureResponderEvent) => boolean) | undefined;
1503
+ onMoveShouldSetResponderCapture?: ((event: import("react-native/types").GestureResponderEvent) => boolean) | undefined;
1504
+ onTouchStart?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1505
+ onTouchMove?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1506
+ onTouchEnd?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1507
+ onTouchCancel?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1508
+ onTouchEndCapture?: ((event: import("react-native/types").GestureResponderEvent) => void) | undefined;
1509
+ onPointerEnter?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1510
+ onPointerEnterCapture?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1511
+ onPointerLeave?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1512
+ onPointerLeaveCapture?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1513
+ onPointerMove?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1514
+ onPointerMoveCapture?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1515
+ onPointerCancel?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1516
+ onPointerCancelCapture?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1517
+ onPointerDown?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1518
+ onPointerDownCapture?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1519
+ onPointerUp?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1520
+ onPointerUpCapture?: ((event: import("react-native/types").PointerEvent) => void) | undefined;
1521
+ accessible?: boolean | undefined;
1522
+ accessibilityActions?: readonly Readonly<{
1523
+ name: string;
1524
+ label?: string | undefined;
1525
+ }>[] | undefined;
1526
+ accessibilityLabel?: string | undefined;
1527
+ 'aria-label'?: string | undefined;
1528
+ accessibilityRole?: import("react-native/types").AccessibilityRole | undefined;
1529
+ accessibilityState?: import("react-native/types").AccessibilityState | undefined;
1530
+ 'aria-busy'?: boolean | undefined;
1531
+ 'aria-checked'?: boolean | "mixed" | undefined;
1532
+ 'aria-disabled'?: boolean | undefined;
1533
+ 'aria-expanded'?: boolean | undefined;
1534
+ 'aria-selected'?: boolean | undefined;
1535
+ 'aria-labelledby'?: string | undefined;
1536
+ accessibilityHint?: string | undefined;
1537
+ accessibilityValue?: import("react-native/types").AccessibilityValue | undefined;
1538
+ 'aria-valuemax'?: number | undefined;
1539
+ 'aria-valuemin'?: number | undefined;
1540
+ 'aria-valuenow'?: number | undefined;
1541
+ 'aria-valuetext'?: string | undefined;
1542
+ onAccessibilityAction?: ((event: import("react-native/types").AccessibilityActionEvent) => void) | undefined;
1543
+ importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
1544
+ 'aria-hidden'?: boolean | undefined;
1545
+ 'aria-live'?: "polite" | "assertive" | "off" | undefined;
1546
+ 'aria-modal'?: boolean | undefined;
1547
+ role?: import("react-native/types").Role | undefined;
1548
+ accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
1549
+ accessibilityLabelledBy?: string | string[] | undefined;
1550
+ accessibilityElementsHidden?: boolean | undefined;
1551
+ accessibilityViewIsModal?: boolean | undefined;
1552
+ onAccessibilityEscape?: (() => void) | undefined;
1553
+ onAccessibilityTap?: (() => void) | undefined;
1554
+ onMagicTap?: (() => void) | undefined;
1555
+ accessibilityIgnoresInvertColors?: boolean | undefined;
1556
+ accessibilityLanguage?: string | undefined;
1557
+ onPressIn?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
1558
+ onPressOut?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").NativeTouchEvent>) => void) | undefined;
1559
+ onBlur?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputFocusEventData>) => void) | undefined;
1560
+ onFocus?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputFocusEventData>) => void) | undefined;
1561
+ allowFontScaling?: boolean | undefined;
1562
+ numberOfLines?: number | undefined;
1563
+ maxFontSizeMultiplier?: number | null | undefined;
1564
+ lineBreakStrategyIOS?: "none" | "standard" | "hangul-word" | "push-out" | undefined;
1565
+ selectionColor?: import("react-native/types").ColorValue | undefined;
1566
+ textBreakStrategy?: "simple" | "highQuality" | "balanced" | undefined;
1567
+ autoCapitalize?: "none" | "sentences" | "words" | "characters" | undefined;
1568
+ autoComplete?: "name" | "off" | "email" | "url" | "additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "username" | "username-new" | undefined;
1569
+ autoCorrect?: boolean | undefined;
1570
+ autoFocus?: boolean | undefined;
1571
+ blurOnSubmit?: boolean | undefined;
1572
+ caretHidden?: boolean | undefined;
1573
+ contextMenuHidden?: boolean | undefined;
1574
+ defaultValue?: string | undefined;
1575
+ editable?: boolean | undefined;
1576
+ keyboardType?: import("react-native/types").KeyboardTypeOptions | undefined;
1577
+ inputMode?: import("react-native/types").InputModeOptions | undefined;
1578
+ maxLength?: number | undefined;
1579
+ multiline?: boolean | undefined;
1580
+ onChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputChangeEventData>) => void) | undefined;
1581
+ onChangeText?: ((text: string) => void) | undefined;
1582
+ onEndEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputEndEditingEventData>) => void) | undefined;
1583
+ onSelectionChange?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSelectionChangeEventData>) => void) | undefined;
1584
+ onSubmitEditing?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputSubmitEditingEventData>) => void) | undefined;
1585
+ onTextInput?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputTextInputEventData>) => void) | undefined;
1586
+ onKeyPress?: ((e: import("react-native/types").NativeSyntheticEvent<import("react-native/types").TextInputKeyPressEventData>) => void) | undefined;
1587
+ placeholder?: string | undefined;
1588
+ readOnly?: boolean | undefined;
1589
+ returnKeyType?: import("react-native/types").ReturnKeyTypeOptions | undefined;
1590
+ enterKeyHint?: import("react-native/types").EnterKeyHintTypeOptions | undefined;
1591
+ secureTextEntry?: boolean | undefined;
1592
+ selectTextOnFocus?: boolean | undefined;
1593
+ inputAccessoryViewID?: string | undefined;
1594
+ clearButtonMode?: "always" | "never" | "while-editing" | "unless-editing" | undefined;
1595
+ clearTextOnFocus?: boolean | undefined;
1596
+ dataDetectorTypes?: import("react-native/types").DataDetectorTypes | import("react-native/types").DataDetectorTypes[] | undefined;
1597
+ enablesReturnKeyAutomatically?: boolean | undefined;
1598
+ keyboardAppearance?: "default" | "light" | "dark" | undefined;
1599
+ passwordRules?: string | null | undefined;
1600
+ rejectResponderTermination?: boolean | null | undefined;
1601
+ selectionState?: import("react-native/types").DocumentSelectionState | undefined;
1602
+ spellCheck?: boolean | undefined;
1603
+ textContentType?: "none" | "name" | "nickname" | "password" | "username" | "URL" | "addressCity" | "addressCityAndState" | "addressState" | "countryName" | "creditCardNumber" | "creditCardExpiration" | "creditCardExpirationMonth" | "creditCardExpirationYear" | "creditCardSecurityCode" | "creditCardType" | "creditCardName" | "creditCardGivenName" | "creditCardMiddleName" | "creditCardFamilyName" | "emailAddress" | "familyName" | "fullStreetAddress" | "givenName" | "jobTitle" | "location" | "middleName" | "namePrefix" | "nameSuffix" | "organizationName" | "postalCode" | "streetAddressLine1" | "streetAddressLine2" | "sublocality" | "telephoneNumber" | "newPassword" | "oneTimeCode" | "birthdate" | "birthdateDay" | "birthdateMonth" | "birthdateYear" | undefined;
1604
+ smartInsertDelete?: boolean | undefined;
1605
+ cursorColor?: import("react-native/types").ColorValue | null | undefined;
1606
+ importantForAutofill?: "auto" | "yes" | "no" | "noExcludeDescendants" | "yesExcludeDescendants" | undefined;
1607
+ disableFullscreenUI?: boolean | undefined;
1608
+ inlineImageLeft?: string | undefined;
1609
+ inlineImagePadding?: number | undefined;
1610
+ returnKeyLabel?: string | undefined;
1611
+ underlineColorAndroid?: import("react-native/types").ColorValue | undefined;
1612
+ showSoftInputOnFocus?: boolean | undefined;
1613
+ showMandatoryIndication?: boolean | undefined;
1614
+ recorderTag?: import("../../typings/recorderTypes").RecorderTag | undefined;
1615
+ label?: string | undefined;
1616
+ labelColor: import("./types").ColorType | {
1617
+ focus: string;
1618
+ error: string;
1619
+ disabled: string;
1620
+ readonly: string;
1621
+ };
1622
+ labelStyle?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
1623
+ labelProps?: import("../text").TextProps | undefined;
1624
+ validationMessagePosition?: import("./types").ValidationMessagePositionType | undefined;
1625
+ floatingPlaceholder?: boolean | undefined;
1626
+ enableErrors: boolean;
1627
+ floatingPlaceholderColor: import("./types").ColorType | {
1628
+ focus: string;
1629
+ error: string;
1630
+ disabled: string;
1631
+ readonly: string;
1632
+ };
1633
+ floatingPlaceholderStyle: (false | import("react-native/types").TextStyle | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle> | import("react-native/types").RecursiveArray<import("react-native/types").TextStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").TextStyle>> | null) & import("react-native/types").TextStyle;
1634
+ floatOnFocus?: boolean | undefined;
1635
+ extraOffset?: number | undefined;
1155
1636
  onClear?: (() => void) | undefined;
1637
+ clearButtonStyle: false | import("react-native/types").ViewStyle | import("react-native/types").RegisteredStyle<import("react-native/types").ViewStyle> | import("react-native/types").RecursiveArray<import("react-native/types").ViewStyle | import("react-native/types").Falsy | import("react-native/types").RegisteredStyle<import("react-native/types").ViewStyle>> | {
1638
+ marginLeft: number;
1639
+ } | null;
1640
+ validationMessage?: string | string[] | undefined;
1641
+ validationMessageStyle?: import("react-native/types").StyleProp<import("react-native/types").TextStyle>;
1642
+ validationIcon?: import("../icon").IconProps | undefined;
1643
+ retainValidationSpace?: boolean | undefined;
1644
+ validate?: import("./types").Validator | import("./types").Validator[] | undefined;
1645
+ showCharCounter?: boolean | undefined;
1646
+ charCounterStyle?: import("react-native/types").TextStyle | undefined;
1647
+ leadingAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
1648
+ trailingAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
1649
+ topTrailingAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
1650
+ bottomAccessory?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | undefined;
1651
+ showClearButton?: boolean | undefined;
1156
1652
  helperText?: string | undefined;
1157
1653
  validateOnStart?: boolean | undefined;
1158
1654
  validateOnChange?: boolean | undefined;
package/src/index.d.ts CHANGED
@@ -68,6 +68,7 @@ export { default as PanningProvider, PanningDirections, PanLocationProps, PanAmo
68
68
  export { default as PanResponderView, PanResponderViewProps } from './components/panningViews/panResponderView';
69
69
  export { default as asPanViewConsumer } from './components/panningViews/asPanViewConsumer';
70
70
  export { default as Picker, PickerProps, PickerItemProps, PickerValue, PickerModes, PickerFieldTypes, PickerSearchStyle, RenderCustomModalProps, PickerItemsListProps, PickerMethods } from './components/picker';
71
+ export { default as PieChart, PieChartSegmentProps } from './components/pieChart';
71
72
  export { default as ProgressBar, ProgressBarProps } from './components/progressBar';
72
73
  export { default as ProgressiveImage, ProgressiveImageProps } from './components/progressiveImage';
73
74
  export { default as RadioButton, RadioButtonProps } from './components/radioButton';
package/src/index.js CHANGED
@@ -166,6 +166,8 @@ var _exportNames = {
166
166
  RenderCustomModalProps: true,
167
167
  PickerItemsListProps: true,
168
168
  PickerMethods: true,
169
+ PieChart: true,
170
+ PieChartSegmentProps: true,
169
171
  ProgressBar: true,
170
172
  ProgressBarProps: true,
171
173
  ProgressiveImage: true,
@@ -1114,6 +1116,18 @@ Object.defineProperty(exports, "PickerValue", {
1114
1116
  return _picker().PickerValue;
1115
1117
  }
1116
1118
  });
1119
+ Object.defineProperty(exports, "PieChart", {
1120
+ enumerable: true,
1121
+ get: function () {
1122
+ return _pieChart().default;
1123
+ }
1124
+ });
1125
+ Object.defineProperty(exports, "PieChartSegmentProps", {
1126
+ enumerable: true,
1127
+ get: function () {
1128
+ return _pieChart().PieChartSegmentProps;
1129
+ }
1130
+ });
1117
1131
  Object.defineProperty(exports, "Profiler", {
1118
1132
  enumerable: true,
1119
1133
  get: function () {
@@ -2137,6 +2151,13 @@ function _picker() {
2137
2151
  };
2138
2152
  return data;
2139
2153
  }
2154
+ function _pieChart() {
2155
+ const data = _interopRequireWildcard(require("./components/pieChart"));
2156
+ _pieChart = function () {
2157
+ return data;
2158
+ };
2159
+ return data;
2160
+ }
2140
2161
  function _progressBar() {
2141
2162
  const data = _interopRequireWildcard(require("./components/progressBar"));
2142
2163
  _progressBar = function () {