react-native-ui-lib 7.41.0-snapshot.6899 → 7.41.0-snapshot.6902

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-ui-lib",
3
- "version": "7.41.0-snapshot.6899",
3
+ "version": "7.41.0-snapshot.6902",
4
4
  "main": "src/index.js",
5
5
  "types": "src/index.d.ts",
6
6
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
@@ -4,7 +4,6 @@ import { LineProps } from './types';
4
4
  type LinePropsInternal = LineProps & {
5
5
  top?: boolean;
6
6
  style?: ViewStyle;
7
- testID?: string;
8
7
  };
9
8
  declare const Line: React.MemoExoticComponent<(props: LinePropsInternal) => React.JSX.Element>;
10
9
  export default Line;
@@ -12,8 +12,7 @@ const Line = React.memo(props => {
12
12
  entry,
13
13
  top,
14
14
  style,
15
- width = LINE_WIDTH,
16
- testID
15
+ width = LINE_WIDTH
17
16
  } = props;
18
17
  const solidLineStyle = useMemo(() => {
19
18
  return [style, styles.line, {
@@ -28,14 +27,14 @@ const Line = React.memo(props => {
28
27
  if (entry) {
29
28
  return <View style={[styles.entryPoint, {
30
29
  backgroundColor: color
31
- }]} testID={`${testID}.entryPoint`} />;
30
+ }]} />;
32
31
  }
33
32
  };
34
33
  const renderLine = () => {
35
34
  if (type === LineTypes.DASHED) {
36
- return <Dash vertical color={color} containerStyle={dashedLineStyle} testID={testID} />;
35
+ return <Dash vertical color={color} containerStyle={dashedLineStyle} />;
37
36
  }
38
- return <View style={solidLineStyle} testID={testID} />;
37
+ return <View style={solidLineStyle} />;
39
38
  };
40
39
  return <>
41
40
  {top && renderStartPoint()}
@@ -3,7 +3,6 @@ import { LayoutChangeEvent } from 'react-native';
3
3
  import { PointProps } from './types';
4
4
  type PointPropsInternal = PointProps & {
5
5
  onLayout?: (event: LayoutChangeEvent) => void;
6
- testID?: string;
7
6
  };
8
7
  declare const Point: (props: PointPropsInternal) => React.JSX.Element;
9
8
  export default Point;
@@ -20,8 +20,7 @@ const Point = props => {
20
20
  label,
21
21
  type,
22
22
  color,
23
- onLayout,
24
- testID
23
+ onLayout
25
24
  } = props;
26
25
  const pointStyle = useMemo(() => {
27
26
  const hasOutline = type === PointTypes.OUTLINE;
@@ -56,14 +55,14 @@ const Point = props => {
56
55
  const tintColor = removeIconBackground ? Colors.$iconDefault : Colors.$iconDefaultLight;
57
56
  const iconSize = removeIconBackground ? undefined : ICON_SIZE;
58
57
  if (icon) {
59
- return <Icon testID={`${testID}.icon`} tintColor={tintColor} {...iconProps} size={iconSize} source={icon} />;
58
+ return <Icon tintColor={tintColor} {...iconProps} size={iconSize} source={icon} />;
60
59
  } else if (label) {
61
- return <Text testID={`${testID}.label`} recorderTag={'unmask'} $textDefaultLight subtextBold color={labelColor}>
60
+ return <Text recorderTag={'unmask'} $textDefaultLight subtextBold color={labelColor}>
62
61
  {label}
63
62
  </Text>;
64
63
  }
65
64
  };
66
- return <View center style={pointStyle} onLayout={onLayout} testID={testID}>
65
+ return <View center style={pointStyle} onLayout={onLayout}>
67
66
  {renderPointContent()}
68
67
  </View>;
69
68
  };
@@ -15,8 +15,7 @@ const Timeline = props => {
15
15
  topLine,
16
16
  bottomLine,
17
17
  point,
18
- children,
19
- testID
18
+ children
20
19
  } = themeProps;
21
20
  const [anchorMeasurements, setAnchorMeasurements] = useState();
22
21
  const [contentContainerMeasurements, setContentContainerMeasurements] = useState();
@@ -108,17 +107,17 @@ const Timeline = props => {
108
107
  });
109
108
  }, []);
110
109
  const renderTopLine = () => {
111
- return <Line testID={`${testID}.topLine`} {...topLine} top style={topLineStyle} color={topLine ? topLine?.color || getStateColor(topLine?.state) : undefined} />;
110
+ return <Line {...topLine} top style={topLineStyle} color={topLine ? topLine?.color || getStateColor(topLine?.state) : undefined} />;
112
111
  };
113
112
  const renderBottomLine = () => {
114
113
  if (bottomLine) {
115
- return <Line testID={`${testID}.bottomLine`} {...bottomLine} style={styles.bottomLine} color={bottomLine?.color || getStateColor(bottomLine?.state)} />;
114
+ return <Line {...bottomLine} style={styles.bottomLine} color={bottomLine?.color || getStateColor(bottomLine?.state)} />;
116
115
  }
117
116
  };
118
- return <View row style={containerStyle} testID={testID}>
117
+ return <View row style={containerStyle}>
119
118
  <View style={styles.timelineContainer}>
120
119
  {renderTopLine()}
121
- <Point {...point} onLayout={onPointLayout} color={point?.color || getStateColor(point?.state)} testID={`${testID}.point`} />
120
+ <Point {...point} onLayout={onPointLayout} color={point?.color || getStateColor(point?.state)} />
122
121
  {renderBottomLine()}
123
122
  </View>
124
123
  <View style={styles.contentContainer} onLayout={onContentContainerLayout} ref={contentContainerRef}>
@@ -1,9 +0,0 @@
1
- import { ComponentProps } from '../../testkit/new/Component.driver';
2
- export declare const LineDriver: (props: ComponentProps) => {
3
- getLine: () => {
4
- exists: () => boolean;
5
- getStyle: () => any;
6
- isEntryPointExists: () => boolean;
7
- getEntryPointStyle: () => any;
8
- };
9
- };
@@ -1,35 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- import { ViewDriver } from "../view/View.driver.new";
3
- export const LineDriver = props => {
4
- const lineDriver = ViewDriver({
5
- renderTree: props.renderTree,
6
- testID: `${props.testID}`
7
- });
8
- const entryPointDriver = ViewDriver({
9
- renderTree: props.renderTree,
10
- testID: `${props.testID}.entryPoint`
11
- });
12
- const getLine = () => {
13
- const exists = () => {
14
- return lineDriver.exists();
15
- };
16
- const getStyle = () => {
17
- return StyleSheet.flatten(lineDriver.getElement().props.style);
18
- };
19
- const isEntryPointExists = () => {
20
- return entryPointDriver.exists();
21
- };
22
- const getEntryPointStyle = () => {
23
- return entryPointDriver.getStyle();
24
- };
25
- return {
26
- exists,
27
- getStyle,
28
- isEntryPointExists,
29
- getEntryPointStyle
30
- };
31
- };
32
- return {
33
- getLine
34
- };
35
- };
@@ -1,8 +0,0 @@
1
- import { ComponentProps } from '../../testkit/new/Component.driver';
2
- export declare const PointDriver: (props: ComponentProps) => {
3
- getPoint: () => {
4
- exists: () => boolean;
5
- getStyle: () => any;
6
- getContentStyle: () => any;
7
- };
8
- };
@@ -1,55 +0,0 @@
1
- import { StyleSheet } from 'react-native';
2
- import { TextDriver } from "../text/Text.driver.new";
3
- import { ImageDriver } from "../image/Image.driver.new";
4
- import { ViewDriver } from "../view/View.driver.new";
5
- export const PointDriver = props => {
6
- const pointDriver = ViewDriver({
7
- renderTree: props.renderTree,
8
- testID: `${props.testID}`
9
- });
10
- const labelDriver = TextDriver({
11
- renderTree: props.renderTree,
12
- testID: `${props.testID}.label`
13
- });
14
- const iconDriver = ImageDriver({
15
- renderTree: props.renderTree,
16
- testID: `${props.testID}.icon`
17
- });
18
- const getLabel = () => {
19
- const exists = () => {
20
- return labelDriver.exists();
21
- };
22
- return {
23
- ...labelDriver,
24
- exists
25
- };
26
- };
27
- const getIcon = () => {
28
- const exists = () => {
29
- return iconDriver.exists();
30
- };
31
- return {
32
- ...iconDriver,
33
- exists
34
- };
35
- };
36
- const getPoint = () => {
37
- const exists = () => {
38
- return pointDriver.exists();
39
- };
40
- const getStyle = () => {
41
- return StyleSheet.flatten(pointDriver.getElement().props.style);
42
- };
43
- const getContentStyle = () => {
44
- return getIcon().exists() ? StyleSheet.flatten(getIcon().getElement().props.style) : getLabel().exists() && StyleSheet.flatten(getLabel().getElement().props.style);
45
- };
46
- return {
47
- exists,
48
- getStyle,
49
- getContentStyle
50
- };
51
- };
52
- return {
53
- getPoint
54
- };
55
- };
@@ -1,23 +0,0 @@
1
- import { ComponentProps } from '../../testkit/new/Component.driver';
2
- export declare const TimelineDriver: (props: ComponentProps) => {
3
- getPoint: () => {
4
- exists: () => boolean;
5
- getStyle: () => any;
6
- getContentStyle: () => any;
7
- };
8
- getTopLine: () => {
9
- exists: () => boolean;
10
- getStyle: () => any;
11
- isEntryPointExists: () => boolean;
12
- getEntryPointStyle: () => any;
13
- };
14
- getBottomLine: () => {
15
- exists: () => boolean;
16
- getStyle: () => any;
17
- isEntryPointExists: () => boolean;
18
- getEntryPointStyle: () => any;
19
- };
20
- getElement: () => import("react-test-renderer").ReactTestInstance;
21
- queryElement: () => import("react-test-renderer").ReactTestInstance | undefined;
22
- exists: () => boolean;
23
- };
@@ -1,39 +0,0 @@
1
- import { useComponentDriver } from "../../testkit/new/Component.driver";
2
- import { LineDriver } from "./line.driver";
3
- import { PointDriver } from "./point.driver";
4
- export const TimelineDriver = props => {
5
- const driver = useComponentDriver(props);
6
- const pointDriver = PointDriver({
7
- renderTree: props.renderTree,
8
- testID: `${props.testID}.point`
9
- });
10
- const topLineDriver = LineDriver({
11
- renderTree: props.renderTree,
12
- testID: `${props.testID}.topLine`
13
- });
14
- const bottomLineDriver = LineDriver({
15
- renderTree: props.renderTree,
16
- testID: `${props.testID}.bottomLine`
17
- });
18
- const getPoint = () => {
19
- return {
20
- ...pointDriver.getPoint()
21
- };
22
- };
23
- const getTopLine = () => {
24
- return {
25
- ...topLineDriver.getLine()
26
- };
27
- };
28
- const getBottomLine = () => {
29
- return {
30
- ...bottomLineDriver.getLine()
31
- };
32
- };
33
- return {
34
- ...driver,
35
- getPoint,
36
- getTopLine,
37
- getBottomLine
38
- };
39
- };