react-native-ui-lib 7.41.0-snapshot.6877 → 7.41.0-snapshot.6884
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
|
@@ -7,6 +7,7 @@ const fs = require('fs');
|
|
|
7
7
|
|
|
8
8
|
const COMPONENTS_DOCS_DIR = './docs/components';
|
|
9
9
|
const SERVICES_DOCS_DIR = './docs/services';
|
|
10
|
+
const COMPOSITE_DOCS_DIR = './docs/composite';
|
|
10
11
|
const FOUNDATION_DOCS_DIR = './docs/foundation';
|
|
11
12
|
|
|
12
13
|
const VALID_COMPONENTS_CATEGORIES = [
|
|
@@ -27,7 +28,8 @@ const VALID_COMPONENTS_CATEGORIES = [
|
|
|
27
28
|
'infra',
|
|
28
29
|
// non components categories
|
|
29
30
|
'services',
|
|
30
|
-
'dev' // development category for components we don't want to render in our docs (used in test.api.json)
|
|
31
|
+
'dev', // development category for components we don't want to render in our docs (used in test.api.json),
|
|
32
|
+
'composite'
|
|
31
33
|
];
|
|
32
34
|
|
|
33
35
|
function buildDocs(apiFolders, componentsPreProcess) {
|
|
@@ -95,6 +97,10 @@ function processComponents(components) {
|
|
|
95
97
|
|
|
96
98
|
let dirPath;
|
|
97
99
|
switch (component.category) {
|
|
100
|
+
case 'composite': {
|
|
101
|
+
dirPath = `${COMPOSITE_DOCS_DIR}`;
|
|
102
|
+
break;
|
|
103
|
+
}
|
|
98
104
|
case 'services': {
|
|
99
105
|
dirPath = `${SERVICES_DOCS_DIR}`;
|
|
100
106
|
break;
|
|
@@ -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
|
-
}]}
|
|
30
|
+
}]} />;
|
|
32
31
|
}
|
|
33
32
|
};
|
|
34
33
|
const renderLine = () => {
|
|
35
34
|
if (type === LineTypes.DASHED) {
|
|
36
|
-
return <Dash vertical color={color} containerStyle={dashedLineStyle}
|
|
35
|
+
return <Dash vertical color={color} containerStyle={dashedLineStyle} />;
|
|
37
36
|
}
|
|
38
|
-
return <View style={solidLineStyle}
|
|
37
|
+
return <View style={solidLineStyle} />;
|
|
39
38
|
};
|
|
40
39
|
return <>
|
|
41
40
|
{top && renderStartPoint()}
|
|
@@ -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
|
|
58
|
+
return <Icon tintColor={tintColor} {...iconProps} size={iconSize} source={icon} />;
|
|
60
59
|
} else if (label) {
|
|
61
|
-
return <Text
|
|
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}
|
|
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
|
|
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
|
|
114
|
+
return <Line {...bottomLine} style={styles.bottomLine} color={bottomLine?.color || getStateColor(bottomLine?.state)} />;
|
|
116
115
|
}
|
|
117
116
|
};
|
|
118
|
-
return <View row style={containerStyle}
|
|
119
|
-
<View style={styles.timelineContainer}
|
|
117
|
+
return <View row style={containerStyle}>
|
|
118
|
+
<View style={styles.timelineContainer}>
|
|
120
119
|
{renderTopLine()}
|
|
121
|
-
<Point {...point} onLayout={onPointLayout} color={point?.color || getStateColor(point?.state)}
|
|
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}>
|
|
@@ -23,7 +23,6 @@ export type LineProps = {
|
|
|
23
23
|
/** to mark as entry point */
|
|
24
24
|
entry?: boolean;
|
|
25
25
|
width?: number;
|
|
26
|
-
testID?: string;
|
|
27
26
|
};
|
|
28
27
|
export type PointProps = {
|
|
29
28
|
state?: StateTypes | `${StateTypes}`;
|
|
@@ -36,7 +35,6 @@ export type PointProps = {
|
|
|
36
35
|
labelColor?: string;
|
|
37
36
|
/** to align point to this view's center */
|
|
38
37
|
anchorRef?: React.MutableRefObject<undefined>;
|
|
39
|
-
testID?: string;
|
|
40
38
|
};
|
|
41
39
|
export type Layout = {
|
|
42
40
|
x: number;
|