@tactics/toddle-styleguide 1.4.7 → 1.4.8
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
|
@@ -76,81 +76,75 @@ const ChildListItem = React.memo(
|
|
|
76
76
|
visualState={visualStateTimeTracker}
|
|
77
77
|
textColor={textColor}
|
|
78
78
|
/>
|
|
79
|
-
} else {
|
|
80
|
-
return <View style={styles.timeTrackerSpacer}></View>
|
|
81
79
|
}
|
|
82
|
-
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
return (
|
|
86
83
|
<View style={styles.container}>
|
|
87
|
-
<
|
|
88
|
-
onPress={onPressSelectable}
|
|
89
|
-
style={styles.innerContainer}
|
|
90
|
-
onLongPress={onLongPressCallback}
|
|
91
|
-
>
|
|
92
|
-
<Avatar
|
|
93
|
-
source={sourceAvatar}
|
|
94
|
-
size={Size.MEDIUM}
|
|
95
|
-
isLoading={longPressExecuting}
|
|
96
|
-
/>
|
|
97
|
-
<View style={styles.pressableText}>
|
|
98
|
-
<View style={styles.trackerContainer}>
|
|
99
|
-
{renderTimeTracker(textTimeTracker, visualStateTimeTracker)}
|
|
100
|
-
</View>
|
|
101
|
-
<View>
|
|
102
|
-
<Heading2
|
|
103
|
-
bold={true}
|
|
104
|
-
numberOfLines={1}
|
|
105
|
-
ellipsizeMode={'tail'}
|
|
106
|
-
textColor={
|
|
107
|
-
isSelected ? context.colors.ui.white : context.colors.ui.black
|
|
108
|
-
}
|
|
109
|
-
>
|
|
110
|
-
{name}
|
|
111
|
-
</Heading2>
|
|
112
|
-
<SmallText
|
|
113
|
-
textColor={
|
|
114
|
-
isSelected ? context.colors.ui.white : context.colors.ui.black
|
|
115
|
-
}
|
|
116
|
-
>
|
|
117
|
-
{department}
|
|
118
|
-
</SmallText>
|
|
119
|
-
</View>
|
|
120
|
-
{tags && (
|
|
121
|
-
<View
|
|
122
|
-
style={{
|
|
123
|
-
flexDirection: 'row',
|
|
124
|
-
gap: 6,
|
|
125
|
-
flexWrap: 'wrap',
|
|
126
|
-
marginTop: 10,
|
|
127
|
-
}}
|
|
128
|
-
>
|
|
129
|
-
{tags.map((tag) => {
|
|
130
|
-
return (
|
|
131
|
-
<ChildListTag
|
|
132
|
-
key={`${id}--${tag}`}
|
|
133
|
-
label={tag}
|
|
134
|
-
isSelected={isSelected}
|
|
135
|
-
/>
|
|
136
|
-
);
|
|
137
|
-
})}
|
|
138
|
-
</View>
|
|
139
|
-
)}
|
|
140
|
-
</View>
|
|
141
|
-
</Pressable>
|
|
142
|
-
{!selectable && (
|
|
84
|
+
<View style={styles.pressableContainer}>
|
|
143
85
|
<Pressable
|
|
144
|
-
onPress={
|
|
145
|
-
style={styles.
|
|
86
|
+
onPress={onPressSelectable}
|
|
87
|
+
style={styles.innerContainer}
|
|
88
|
+
onLongPress={onLongPressCallback}
|
|
146
89
|
>
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
color={context.colors.ui.black}
|
|
90
|
+
<Avatar
|
|
91
|
+
source={sourceAvatar}
|
|
92
|
+
size={Size.MEDIUM}
|
|
93
|
+
isLoading={longPressExecuting}
|
|
152
94
|
/>
|
|
95
|
+
<View style={styles.pressableText}>
|
|
96
|
+
<View style={styles.trackerContainer}>
|
|
97
|
+
{renderTimeTracker(textTimeTracker, visualStateTimeTracker)}
|
|
98
|
+
</View>
|
|
99
|
+
<View>
|
|
100
|
+
<Heading2
|
|
101
|
+
bold={true}
|
|
102
|
+
numberOfLines={1}
|
|
103
|
+
ellipsizeMode={'tail'}
|
|
104
|
+
textColor={
|
|
105
|
+
isSelected ? context.colors.ui.white : context.colors.ui.black
|
|
106
|
+
}
|
|
107
|
+
>
|
|
108
|
+
{name}
|
|
109
|
+
</Heading2>
|
|
110
|
+
<SmallText
|
|
111
|
+
textColor={
|
|
112
|
+
isSelected ? context.colors.ui.white : context.colors.ui.black
|
|
113
|
+
}
|
|
114
|
+
>
|
|
115
|
+
{department}
|
|
116
|
+
</SmallText>
|
|
117
|
+
</View>
|
|
118
|
+
</View>
|
|
153
119
|
</Pressable>
|
|
120
|
+
{!selectable && (
|
|
121
|
+
<Pressable
|
|
122
|
+
onPress={onPressArrowCallback}
|
|
123
|
+
style={styles.iconContainer}
|
|
124
|
+
>
|
|
125
|
+
<Icon
|
|
126
|
+
style={'regular'}
|
|
127
|
+
name={'chevron-right'}
|
|
128
|
+
size={20}
|
|
129
|
+
color={context.colors.ui.black}
|
|
130
|
+
/>
|
|
131
|
+
</Pressable>
|
|
132
|
+
)}
|
|
133
|
+
</View>
|
|
134
|
+
{tags && (
|
|
135
|
+
<View
|
|
136
|
+
style={styles.tagContainer}
|
|
137
|
+
>
|
|
138
|
+
{tags.map((tag) => {
|
|
139
|
+
return (
|
|
140
|
+
<ChildListTag
|
|
141
|
+
key={`${id}--${tag}`}
|
|
142
|
+
label={tag}
|
|
143
|
+
isSelected={isSelected}
|
|
144
|
+
/>
|
|
145
|
+
);
|
|
146
|
+
})}
|
|
147
|
+
</View>
|
|
154
148
|
)}
|
|
155
149
|
</View>
|
|
156
150
|
);
|
|
@@ -5,7 +5,7 @@ export function Stylesheet(isSelectedItem: any, context: any): {
|
|
|
5
5
|
borderBottomRightRadius: number;
|
|
6
6
|
borderTopLeftRadius: number;
|
|
7
7
|
borderBottomLeftRadius: number;
|
|
8
|
-
flexDirection: "
|
|
8
|
+
flexDirection: "column";
|
|
9
9
|
backgroundColor: any;
|
|
10
10
|
};
|
|
11
11
|
innerContainer: {
|
|
@@ -16,6 +16,12 @@ export function Stylesheet(isSelectedItem: any, context: any): {
|
|
|
16
16
|
borderBottomRightRadius: number;
|
|
17
17
|
borderTopLeftRadius: number;
|
|
18
18
|
borderBottomLeftRadius: number;
|
|
19
|
+
alignItems: "center";
|
|
20
|
+
};
|
|
21
|
+
pressableContainer: {
|
|
22
|
+
flex: number;
|
|
23
|
+
flexDirection: "row";
|
|
24
|
+
alignItems: "center";
|
|
19
25
|
};
|
|
20
26
|
pressableText: {
|
|
21
27
|
marginLeft: number;
|
|
@@ -37,4 +43,10 @@ export function Stylesheet(isSelectedItem: any, context: any): {
|
|
|
37
43
|
height: number;
|
|
38
44
|
marginBottom: number;
|
|
39
45
|
};
|
|
46
|
+
tagContainer: {
|
|
47
|
+
flexDirection: "row";
|
|
48
|
+
gap: number;
|
|
49
|
+
flexWrap: "wrap";
|
|
50
|
+
marginLeft: number;
|
|
51
|
+
};
|
|
40
52
|
};
|
|
@@ -10,7 +10,7 @@ export const Stylesheet = (isSelectedItem, context) =>
|
|
|
10
10
|
borderBottomRightRadius: Scale.l,
|
|
11
11
|
borderTopLeftRadius: Scale.xl,
|
|
12
12
|
borderBottomLeftRadius: Scale.xl,
|
|
13
|
-
flexDirection: '
|
|
13
|
+
flexDirection: 'column',
|
|
14
14
|
backgroundColor: isSelectedItem
|
|
15
15
|
? context.colors.main[6]
|
|
16
16
|
: context.colors.ui.white,
|
|
@@ -23,10 +23,16 @@ export const Stylesheet = (isSelectedItem, context) =>
|
|
|
23
23
|
borderBottomRightRadius: Scale.l,
|
|
24
24
|
borderTopLeftRadius: Scale.xxl,
|
|
25
25
|
borderBottomLeftRadius: Scale.xxl,
|
|
26
|
+
alignItems: 'center'
|
|
27
|
+
},
|
|
28
|
+
pressableContainer: {
|
|
29
|
+
flex: 1,
|
|
30
|
+
flexDirection: 'row',
|
|
31
|
+
alignItems: 'center',
|
|
26
32
|
},
|
|
27
33
|
pressableText: {
|
|
28
34
|
marginLeft: Scale.l,
|
|
29
|
-
flex: 1
|
|
35
|
+
flex: 1
|
|
30
36
|
},
|
|
31
37
|
iconContainer: {
|
|
32
38
|
alignItems: 'flex-end',
|
|
@@ -43,5 +49,11 @@ export const Stylesheet = (isSelectedItem, context) =>
|
|
|
43
49
|
timeTrackerSpacer: {
|
|
44
50
|
height: Scale.s,
|
|
45
51
|
marginBottom: Scale.xxs
|
|
52
|
+
},
|
|
53
|
+
tagContainer: {
|
|
54
|
+
flexDirection: 'row',
|
|
55
|
+
gap: Scale.s,
|
|
56
|
+
flexWrap: 'wrap',
|
|
57
|
+
marginLeft: Scale.xxxxl
|
|
46
58
|
}
|
|
47
59
|
});
|