Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy of 'new components pr' #1894

Merged
merged 36 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
3d53613
chore(init): add new dev route for components
ororsatti Sep 19, 2024
3731d17
chore(init): add components screen to route
ororsatti Sep 19, 2024
5e27e95
initial typography
17Amir17 Sep 19, 2024
349bcf2
feat(background): add bg pattern and toggle
ororsatti Sep 19, 2024
a5bcb41
get font working
17Amir17 Sep 19, 2024
54382a5
nits
17Amir17 Sep 19, 2024
ab8d253
add hot reload
17Amir17 Sep 20, 2024
0538b3a
add mock ticket
17Amir17 Sep 21, 2024
f5f7f57
live reload
17Amir17 Sep 21, 2024
8885e90
doc live reload
17Amir17 Sep 21, 2024
efb2946
add ticket card
17Amir17 Sep 21, 2024
c950dc7
Update ComponentsScreen.tsx
17Amir17 Sep 21, 2024
8a0dfbf
update ticket card style
17Amir17 Sep 21, 2024
baf3880
add date chip
17Amir17 Sep 21, 2024
bf78404
feat(input): added variants and erorr state
ororsatti Sep 22, 2024
53eabd9
Add floating menu
GuySerfaty Sep 22, 2024
21b5cd1
feat(button): add btn variants: primary secondary danger
ororsatti Sep 22, 2024
c64574d
fix(button): added border to secondary variant
ororsatti Sep 22, 2024
d507c19
feat(font): added Neue Haas Unica font
ororsatti Sep 22, 2024
67793bc
feat(icon): add icon component
ororsatti Sep 22, 2024
f76cb6b
feat(list): added basic list and changed icon component to avatar
ororsatti Sep 22, 2024
b641863
fix(remove icon): remove the icon file and update component screeen
ororsatti Sep 22, 2024
f170f02
Add bottom modal
GuySerfaty Sep 22, 2024
a0d7191
feat(list): add prop to remove last bottom border
ororsatti Sep 22, 2024
a164adf
feat(list): add onclick to list item
ororsatti Sep 22, 2024
03080a3
fix(list): change main file name to index
ororsatti Sep 22, 2024
a050ad4
feat(accordion): add accordion component
ororsatti Sep 22, 2024
fad2ecd
fix(bg): bring all old website to use the right bg
ororsatti Sep 22, 2024
00b2e4a
install heroicons
17Amir17 Sep 23, 2024
b37d0df
chore(lint): fix lint problems
ororsatti Sep 23, 2024
28975d3
update yarn.lock
ichub Sep 23, 2024
01650d4
enable components page in dev mode
ichub Sep 23, 2024
8ead59f
Merge branch 'main' into ivan/deploy-ui-components
ororsatti Sep 24, 2024
a4e89ca
lint
17Amir17 Sep 24, 2024
160c461
fix(fonts and btn): changing font to rubik and fixing the btn styles
ororsatti Sep 26, 2024
634d7b2
Merge remote-tracking branch 'origin/main' into ivan/deploy-ui-compon…
ichub Sep 27, 2024
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
2 changes: 1 addition & 1 deletion apps/passport-client/components/screens/AddEmailScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export function AddEmailScreen(): JSX.Element | null {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={64} />
<CenterColumn>{content}</CenterColumn>
</AppContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function AddScreen(): JSX.Element | null {

if (!screen) {
// Need AppContainer to display error
return <AppContainer bg="gray" />;
return <AppContainer bg="primary" />;
}
return screen;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function JustAddScreen({
<>
{isProtocolWorlds && <ProtocolWorldsStyling />}
<MaybeModal fullScreen isProveOrAddScreen={true} />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Container>
<Spacer h={16} />
<AppHeader isProveOrAddScreen={true} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export function ProveAndAddScreen({
return (
<>
<MaybeModal fullScreen isProveOrAddScreen={true} />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Container>
<Spacer h={24} />
<AppHeader isProveOrAddScreen={true}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function AddSubscriptionScreen(): JSX.Element | null {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<ScreenNavigation label={"Subscriptions"} to="/subscriptions" />
<SubscriptionsScreenContainer>
{mismatchedEmails && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ export function ChangeEmailScreen(): JSX.Element | null {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={64} />
<CenterColumn>{content}</CenterColumn>
</AppContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export function ChangePasswordScreen(): JSX.Element | null {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={64} />
<CenterColumn>{content}</CenterColumn>
</AppContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function EmbeddedGPCProofScreen({
const identity = useIdentityV3();

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={4} />
<H2
style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export function FrogManagerScreen(): JSX.Element {
}

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<ButtonGroup>
<Button
disabled={tab === "frogs"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function FrogSubscriptionScreen(): JSX.Element {
}

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<Container>
<TypistText
onInit={(typewriter): TypewriterClass =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function GetWithoutProvingScreen(): JSX.Element | null {
return (
<>
<MaybeModal fullScreen isProveOrAddScreen={true} />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Container>
<Spacer h={16} />
<AppHeader isProveOrAddScreen={true} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ export function AddHaloScreen({
let content: ReactNode;

if (invalidPCD) {
return <AppContainer bg="gray" />;
return <AppContainer bg="primary" />;
} else if (!pcd) {
return <SyncingPCDs />;
} else if (!loggedIn) {
return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<MaybeModal fullScreen />
<Container>
<Spacer h={16} />
Expand Down Expand Up @@ -139,7 +139,7 @@ export function AddHaloScreen({
}

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<MaybeModal fullScreen />
<Container>
<Spacer h={16} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ export function HaloScreen(): JSX.Element {

if (!syncSettled) {
return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<SyncingPCDs />
</AppContainer>
);
}

if (!screen) {
// Need AppContainer to display error
return <AppContainer bg="gray" />;
return <AppContainer bg="primary" />;
}

return screen;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export function HomeScreenImpl(): JSX.Element | null {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={24} />
<AppHeader isEdgeCity={isEdgeCity} />
<Spacer h={24} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export function ImportBackupScreen(): JSX.Element {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<ScreenNavigation label={"Home"} to="/" />
<Container>
<Spacer h={8} />
Expand Down
2 changes: 1 addition & 1 deletion apps/passport-client/components/screens/MissingScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export function MissingScreen(): JSX.Element {
const loc = useLocation();

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<CenterColumn w={290}>
<TextCenter>
<Spacer h={64} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export function GenericProveScreen({
return (
<>
<MaybeModal fullScreen isProveOrAddScreen={true} />
<AppContainer bg="gray">
<AppContainer bg="primary">
<AppHeader isProveOrAddScreen={true}>
<H2
style={{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ export function ProveScreen(): JSX.Element | null {

if (!syncSettled) {
return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<SyncingPCDs />
</AppContainer>
);
}

if (!screen) {
// Need AppContainer to display error
return <AppContainer bg="gray" />;
return <AppContainer bg="primary" />;
}

return screen;
Expand Down Expand Up @@ -101,7 +101,7 @@ function getScreen(request: PCDGetRequest): JSX.Element | null {
return (
<>
<MaybeModal fullScreen isProveOrAddScreen={true} />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={24} />
<H2>{title.toUpperCase()}</H2>
<Spacer h={24} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function RemoveEmailScreen(): JSX.Element | null {
return (
<>
<MaybeModal />
<AppContainer bg="gray">
<AppContainer bg="primary">
<Spacer h={64} />
<CenterColumn>{content}</CenterColumn>
</AppContainer>
Expand Down
4 changes: 2 additions & 2 deletions apps/passport-client/components/screens/ScanScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ export function ScanScreen(): JSX.Element {

if (isRedirectingProtocolWorlds) {
return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<ScreenLoader text="Discovering something new.." />
</AppContainer>
);
}

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
{!usingLaserScanner && (
<QRContainer>
<Spacer h={8} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export function ServerErrorScreen(): JSX.Element {
const description = query.get("description");

return (
<AppContainer bg="gray">
<AppContainer bg="primary">
<CenterColumn w={290}>
<TextCenter>
<Spacer h={64} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function SubscriptionsScreen(): JSX.Element {
<>
<MaybeModal />
<Overscroll />
<AppContainer bg="gray">
<AppContainer bg="primary">
<ScreenNavigation label={"Home"} to="/" />
<Spacer h={8} />
<Button onClick={onAddNewClicked}>Add Subscription</Button>
Expand Down
8 changes: 5 additions & 3 deletions apps/passport-client/components/shared/AppContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { ScreenLoader } from "./ScreenLoader";

// Wrapper for all screens.
export function AppContainer({
children
children,
bg
}: {
bg: "primary" | "gray";
children?: ReactNode;
Expand All @@ -25,7 +26,8 @@ export function AppContainer({
[dispatch]
);

const col = "var(--bg-dark-primary)";
const col =
bg === "gray" ? "var(--dot-pattern-bg)" : "var(--bg-dark-primary)";
return (
<>
<GlobalBackground color={col} />
Expand Down Expand Up @@ -53,7 +55,7 @@ export function AppContainer({

export const GlobalBackground = createGlobalStyle<{ color: string }>`
html {
background-color: ${(p): string => p.color};
background: ${(p): string => p.color};
}
`;

Expand Down
Loading
Loading