Skip to content

Commit

Permalink
Upgrade to SDS v2 (#938)
Browse files Browse the repository at this point in the history
* Breaking changes fixed

* Replace old color variables
  • Loading branch information
quietbits authored Aug 11, 2023
1 parent f6af798 commit 8e2852b
Show file tree
Hide file tree
Showing 121 changed files with 909 additions and 876 deletions.
2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"@shared/api": "1.0.0",
"@shared/constants": "1.0.0",
"@shared/helpers": "1.0.0",
"@stellar/design-system": "^0.8.1",
"@stellar/design-system": "^1.0.0-beta.14",
"@stellar/wallet-sdk": "^0.8.0",
"@testing-library/react": "^10.4.8",
"@testing-library/user-event": "^7.1.2",
Expand Down
2 changes: 1 addition & 1 deletion extension/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</style>
<title>Freighter</title>
</head>
<body class="dark-mode">
<body class="sds-theme-dark">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<div id="modal-root"></div>
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/basics/Forms/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}

.FormError {
color: var(--pal-error);
color: var(--color-red-60);
font-size: 0.8125rem;
padding: 0.25rem 0 0.75rem;
line-height: 1;
Expand Down
44 changes: 0 additions & 44 deletions extension/src/popup/basics/InfoBlock/index.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions extension/src/popup/basics/InfoBlock/styles.scss

This file was deleted.

29 changes: 29 additions & 0 deletions extension/src/popup/basics/InfoTooltip/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from "react";
import { FloaterPlacement, Icon, Tooltip } from "@stellar/design-system";
import "./styles.scss";

interface InfoTooltipProps {
children: React.ReactNode;
infoText: React.ReactNode;
placement?: FloaterPlacement;
}

export const InfoTooltip = ({
children,
infoText,
placement = "right",
}: InfoTooltipProps) => (
<div className="InfoTooltip">
{children}
<Tooltip
triggerEl={
<div className="InfoTooltip__button">
<Icon.Info />
</div>
}
placement={placement}
>
{infoText}
</Tooltip>
</div>
);
33 changes: 33 additions & 0 deletions extension/src/popup/basics/InfoTooltip/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.InfoTooltip {
display: inline-flex;
align-items: center;
gap: 0.3125rem;
position: relative;

// Make sure tooltip covers other info buttons
&:has(.trigger--active) {
z-index: var(--z-index-tooltip);
}

&__button {
width: 0.875rem;
height: 1.5rem;
cursor: pointer;
display: flex;
align-items: center;
color: var(--color-gray-60);

svg {
display: block;
width: 0.75rem;
height: 0.75rem;
fill: currentColor;
}

@media (hover: hover) {
&:hover {
color: var(--color-gray-70);
}
}
}
}
2 changes: 1 addition & 1 deletion extension/src/popup/basics/ListNavLink/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

a {
align-items: center;
color: var(--pal-text-primary);
color: var(--color-gray-90);
display: flex;
justify-content: space-between;
}
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/basics/LoadingBackground/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
transition-delay: 0.1s;

&--active {
background-color: rgba(var(--pal-shadow-rbg), 0.6);
background-color: rgba(var(--color-shadow-rgb), 0.6);
opacity: 1;
z-index: 1;
}
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/basics/TransactionHeading/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.TransactionHeading {
border-bottom: 1px solid var(--pal-border-secondary);
border-bottom: 1px solid var(--color-gray-30);
font-size: 0.875rem;
font-weight: var(--font-weight-medium);
line-height: 0.72rem;
Expand Down
54 changes: 0 additions & 54 deletions extension/src/popup/basics/buttons/Button/index.tsx

This file was deleted.

20 changes: 0 additions & 20 deletions extension/src/popup/basics/buttons/Button/styles.scss

This file was deleted.

6 changes: 3 additions & 3 deletions extension/src/popup/basics/buttons/PillButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from "react";
import { Button } from "@stellar/design-system";

import "./styles.scss";

interface PillButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
disabled?: boolean;
Expand All @@ -18,9 +16,11 @@ export const PillButton = ({
}: PillButtonProps) => (
<div className="PillButton">
<Button
size="md"
disabled={disabled}
isLoading={isLoading}
variant={Button.variant.tertiary}
variant="secondary"
isPill
{...props}
>
{children}
Expand Down
10 changes: 0 additions & 10 deletions extension/src/popup/basics/buttons/PillButton/styles.scss

This file was deleted.

4 changes: 2 additions & 2 deletions extension/src/popup/components/AutoSave/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useState } from "react";
import { useFormikContext } from "formik";
import { StatusBar } from "@stellar/design-system";
import { Banner } from "@stellar/design-system";
import debounce from "lodash/debounce";

import "./styles.scss";
Expand Down Expand Up @@ -55,7 +55,7 @@ export const AutoSaveFields = ({ debounceMs = 500 }: AutoSaveFieldsProps) => {
didSaveFail ? "AutoSave--status--failed" : ""
}`}
>
<StatusBar variant={StatusBar.variant.error}>Save failed!</StatusBar>
<Banner variant="error">Save failed!</Banner>
</div>
);
};
2 changes: 1 addition & 1 deletion extension/src/popup/components/BottomNav/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.BottomNav {
border-top: solid 1px var(--pal-example-details);
border-top: solid 1px var(--color-gray-40);
display: flex;
align-items: center;
justify-content: space-between;
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/components/Header/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.Header {
border-bottom: 1px solid var(--pal-border-primary);
border-bottom: 1px solid var(--color-gray-30);
padding: 1.5rem 0;

&__popup {
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/components/ModalInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ModalInfo = ({
}: ModalInfoProps) => (
<>
<div className="ModalInfo--card">
<Card variant={Card.variant.highlight}>
<Card variant="secondary">
<PunycodedDomain domain={domain} domainTitle={domainTitle} />
<div className="ModalInfo--subject">{subject}</div>
{children}
Expand Down
4 changes: 2 additions & 2 deletions extension/src/popup/components/ModalInfo/styles.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.ModalInfo {
&--subject {
border-bottom: 1px solid var(--pal-border-secondary);
color: var(--pal-text-primary);
border-bottom: 1px solid var(--color-gray-30);
color: var(--color-gray-90);
line-height: 1.5rem;
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/components/Onboarding/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
.OnboardingHeader {
font-size: 2.5rem;
line-height: 120%;
color: var(--pal-text-primary);
color: var(--color-gray-90);
}

.OnboardingScreen {
Expand Down
4 changes: 2 additions & 2 deletions extension/src/popup/components/PunycodedDomain/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
}

&__domain {
color: var(--pal-text-primary);
color: var(--color-gray-90);
}

&__title {
color: var(--pal-text-tertiary);
color: var(--color-gray-60);
font-size: 0.875rem;
}

Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/components/SlideupModal/styles.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.SlideupModal {
background: var(--background-color);
background: var(--background-color--overlay);
border-radius: 1.5rem 1.5rem 0 0;
box-shadow: 0 1rem 1.5rem rgba(0, 0, 0, 0.24);
position: absolute;
Expand Down
2 changes: 1 addition & 1 deletion extension/src/popup/components/SubviewHeader/styles.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.SubviewHeader {
align-items: center;
color: var(--pal-brand-primary-on);
color: var(--color-white);
display: flex;
height: var(--subview--header--height);
padding-bottom: 2rem;
Expand Down
Loading

0 comments on commit 8e2852b

Please sign in to comment.