Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 53 additions & 59 deletions bun.lock

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions common/styleguide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const colors = {
primary: '#61DAFB',
primaryLight: '#c1f4ff',
primaryDark: '#39BEE2',
primaryHover: '#61dafb16',
sky: '#C6EEFB',
powder: '#EEFAFE',
pewter: '#BEC8CB',
Expand All @@ -37,7 +38,7 @@ export const colors = {
gray3: '#CFCFD5',
gray4: '#82889E',
gray5: '#505461',
gray6: '#2A2C33',
gray6: '#24262e',
gray7: '#21232A',
black: '#242424',
white: '#ffffff',
Expand Down Expand Up @@ -197,7 +198,12 @@ export function HoverEffect({ children }: PropsWithChildren) {

return (
<View
style={[isHovered && { opacity: 0.8 }, isActive && { opacity: 0.5 }]}
style={[
// @ts-expect-error Transition is a valid web style property
{ transition: 'opacity 0.33s' },
isHovered && { opacity: 0.8 },
isActive && { opacity: 0.5 },
]}
onPointerEnter={() => setIsHovered(true)}
onPointerLeave={() => setIsHovered(false)}
onPointerDown={() => setIsActive(true)}
Expand Down
9 changes: 3 additions & 6 deletions components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { A } from '@expo/html-elements';
import { type PropsWithChildren, useContext } from 'react';
import { type PropsWithChildren } from 'react';
import { StyleSheet, type TextStyle, Pressable, type StyleProp } from 'react-native';

import { colors, darkColors, HoverEffect, P } from '~/common/styleguide';
import CustomAppearanceContext from '~/context/CustomAppearanceContext';
import { darkColors, HoverEffect, P } from '~/common/styleguide';

type Props = PropsWithChildren & {
href?: string;
Expand All @@ -13,13 +12,11 @@ type Props = PropsWithChildren & {
};

export function Button({ children, href, onPress, style, openInNewTab, ...rest }: Props) {
const { isDark } = useContext(CustomAppearanceContext);

const isLink = !!href;
const linkStyle = [
styles.container,
{
backgroundColor: isDark ? darkColors.powder : colors.primaryDark,
backgroundColor: darkColors.primaryDark,
},
style,
];
Expand Down
2 changes: 1 addition & 1 deletion components/ErrorState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function ErrorState({ statusCode }: Props) {
return (
<>
<PageMeta title="Error" description="Uh oh, something went wrong" />
<Navigation noHeader />
<Navigation />
<View style={styles.container}>
<Image style={styles.img} source={require('~/assets/notfound.png')} alt="No results" />
<H2 style={styles.text}>Uh oh, something went wrong ({statusCode})</H2>
Expand Down
14 changes: 12 additions & 2 deletions components/Filters/ClearButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react';
import { Pressable, type PressableProps } from 'react-native';
import { Pressable, type PressableProps, StyleSheet } from 'react-native';

import { colors } from '~/common/styleguide';

Expand All @@ -18,11 +18,21 @@ export const ClearButton = ({ onPress }: ClearButtonProps) => {
onHoverIn={() => setIsXIconHovered(true)}
onHoverOut={() => setIsXIconHovered(false)}
onPress={onPress}
style={styles.container}
aria-label="Clear all">
<XIcon fill={isXIconHovered ? colors.primary : colors.white} width={12} height={12} />
<XIcon fill={isXIconHovered ? colors.error : colors.white} width={12} height={12} />
</Pressable>
}>
Clear all
</Tooltip>
);
};

const styles = StyleSheet.create({
container: {
width: 24,
height: 24,
alignItems: 'center',
justifyContent: 'center',
},
});
12 changes: 3 additions & 9 deletions components/Filters/FilterButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ export const FilterButton = ({
<View style={styles.displayHorizontal}>
<View style={styles.iconContainer}>
<FilterIcon
fill={isFilterVisible ? colors.gray7 : isFilterCount ? colors.primary : colors.white}
fill={isFilterVisible ? colors.white : isFilterCount ? colors.primary : colors.white}
width={14}
height={12}
/>
</View>
<P style={[styles.buttonText, isFilterVisible && styles.activeButtonText]}>
Filters{isFilterCount ? `: ${filterCount}` : ''}
</P>
<P style={styles.buttonText}>Filters{isFilterCount ? `: ${filterCount}` : ''}</P>
</View>
</Button>
{filterCount > 0 && (
Expand All @@ -88,7 +86,7 @@ const styles = StyleSheet.create({
paddingHorizontal: 8,
},
activeButton: {
backgroundColor: colors.primary,
backgroundColor: darkColors.primaryDark,
},
leftBorderRadiusOnly: {
borderTopRightRadius: 0,
Expand All @@ -101,9 +99,6 @@ const styles = StyleSheet.create({
fontWeight: '500',
userSelect: 'none',
},
activeButtonText: {
color: colors.gray7,
},
iconContainer: {
top: 1,
},
Expand All @@ -113,7 +108,6 @@ const styles = StyleSheet.create({
},
clearButtonContainer: {
height: '100%',
width: 24,
justifyContent: 'center',
alignItems: 'center',
borderTopRightRadius: 4,
Expand Down
120 changes: 0 additions & 120 deletions components/Header.tsx

This file was deleted.

32 changes: 28 additions & 4 deletions components/Icons/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { type ViewStyle } from 'react-native';
import { Circle, Path, Rect, Svg } from 'react-native-svg';

import { colors } from '~/common/styleguide';
Expand All @@ -6,6 +7,7 @@ export type IconProps = {
fill?: string;
width?: number;
height?: number;
style?: ViewStyle;
};

export function Search({ width, height, fill = colors.black }: IconProps) {
Expand Down Expand Up @@ -173,9 +175,9 @@ export function Eye({ width = 22, height = 19, fill = colors.black }: IconProps)
);
}

export function Logo({ width, height, fill = colors.black }: IconProps) {
export function Logo({ width, height, style, fill = colors.black }: IconProps) {
return (
<Svg width={width ?? 25} height={height ?? 22} viewBox="0 0 25 22" fill="none">
<Svg width={width ?? 25} height={height ?? 22} viewBox="0 0 25 22" fill="none" style={style}>
<Path
d="M12.029 13.03a2.334 2.334 0 002.343-2.325 2.334 2.334 0 00-2.343-2.326 2.334 2.334 0 00-2.343 2.325 2.334 2.334 0 002.343 2.326zM18.88 1.794c-.16-.74-.466-1.183-.851-1.404-.385-.22-.926-.262-1.65-.03-.725.234-1.571.723-2.485 1.46-.35.283-.708.6-1.068.947a27.206 27.206 0 012.225 2.743c1.246.114 2.424.298 3.505.54.123-.483.221-.948.293-1.391.186-1.154.19-2.125.03-2.865zM10.163 1.82c.351.283.708.6 1.068.947A27.215 27.215 0 009.007 5.51a27.564 27.564 0 00-3.506.54c-.123-.483-.22-.948-.292-1.391-.186-1.153-.19-2.125-.031-2.865.16-.74.466-1.183.85-1.403C6.415.17 6.955.128 7.68.36s1.57.722 2.484 1.459zM19.354 7.421a27.05 27.05 0 01-1.281 3.284 27.04 27.04 0 011.28 3.283c.484-.136.939-.284 1.361-.444 1.1-.417 1.95-.9 2.515-1.406.566-.507.8-.992.8-1.433 0-.442-.234-.927-.8-1.434-.565-.506-1.415-.988-2.515-1.405-.422-.16-.877-.309-1.36-.445zM15.05 15.9a27.207 27.207 0 01-2.224 2.742c.36.348.718.664 1.069.947.913.737 1.759 1.227 2.483 1.46.725.232 1.266.19 1.65-.03.386-.221.693-.665.852-1.404.16-.74.155-1.711-.031-2.864-.072-.444-.17-.909-.293-1.392a27.56 27.56 0 01-3.505.54zM9.007 15.9a27.21 27.21 0 002.224 2.742c-.36.348-.717.664-1.068.947-.913.737-1.759 1.227-2.484 1.46-.725.232-1.265.19-1.65-.03-.385-.221-.692-.665-.851-1.404-.16-.74-.155-1.711.031-2.864.071-.444.17-.909.292-1.392a27.56 27.56 0 003.506.54zM4.704 13.988c.329-1.05.758-2.155 1.28-3.283a27.043 27.043 0 01-1.28-3.284c-.483.136-.938.285-1.36.445-1.1.417-1.95.899-2.516 1.405-.565.507-.8.992-.8 1.434 0 .441.235.926.8 1.433.566.507 1.416.989 2.515 1.405.423.16.877.31 1.36.445z"
fill={fill}
Expand All @@ -195,9 +197,9 @@ export function GitHub({ width, height, fill = colors.black }: IconProps) {
);
}

export function Plus({ width, height, fill = colors.black }: IconProps) {
export function Plus({ width, height, style, fill = colors.black }: IconProps) {
return (
<Svg width={width ?? 16} height={height ?? 16} viewBox="0 0 16 16" fill="none">
<Svg width={width ?? 16} height={height ?? 16} viewBox="0 0 16 16" fill="none" style={style}>
<Path fillRule="evenodd" clipRule="evenodd" d="M.114 7.12H15.57v2H.114v-2z" fill={fill} />
<Path fillRule="evenodd" clipRule="evenodd" d="M6.842 15.848V.393h2v15.455h-2z" fill={fill} />
</Svg>
Expand Down Expand Up @@ -478,3 +480,25 @@ export function Dependency({ width = 18, height = 20, fill = colors.black }: Ico
</Svg>
);
}

export function ThemeLight({ width = 24, height = 24, fill = colors.black }: IconProps) {
return (
<Svg width={width} height={height} viewBox="0 0 24 24" fill="none">
<Path
fill={fill}
d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"
/>
</Svg>
);
}

export function ThemeDark({ width = 24, height = 24, fill = colors.black }: IconProps) {
return (
<Svg width={width} height={height} viewBox="0 0 24 24" fill="none">
<Path
fill={fill}
d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"
/>
</Svg>
);
}
Loading