Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[uma-bridge] Consolidate IconWithCircleBackground (#12761)
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 425054ef5a5f13e550134ebf0c159e2747dd47dc
coreymartin authored and Lightspark Eng committed Oct 9, 2024
1 parent 0b39a65 commit 41a3eb3
Showing 27 changed files with 71 additions and 161 deletions.
9 changes: 0 additions & 9 deletions apps/examples/nodejs-scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# @lightsparkdev/nodejs-scripts

## 0.0.17

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4
- @lightsparkdev/lightspark-sdk@1.8.6

## 0.0.16

### Patch Changes
6 changes: 3 additions & 3 deletions apps/examples/nodejs-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/nodejs-scripts",
"version": "0.0.17",
"version": "0.0.16",
"private": true,
"description": "Example NodeJS scripts for Lightspark JS SDKs",
"main": "index.js",
@@ -33,8 +33,8 @@
"typescript": "^5.6.2"
},
"dependencies": {
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"commander": "^11.0.0",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21"
10 changes: 0 additions & 10 deletions apps/examples/oauth-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# @lightsparkdev/oauth-app

## 0.0.42

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/ui@1.0.11
- @lightsparkdev/lightspark-sdk@1.8.6
- @lightsparkdev/oauth@0.1.49

## 0.0.41

### Patch Changes
6 changes: 3 additions & 3 deletions apps/examples/oauth-app/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@lightsparkdev/oauth-app",
"version": "0.0.42",
"version": "0.0.41",
"private": true,
"dependencies": {
"@emotion/css": "^11.11.0",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"@lightsparkdev/oauth": "*",
"@lightsparkdev/ui": "1.0.11",
"@lightsparkdev/ui": "1.0.10",
"react": "^18.2.0",
"react-dom": "^18.1.0",
"react-router-dom": "6.11.2",
9 changes: 0 additions & 9 deletions apps/examples/remote-signing-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# @lightsparkdev/remote-signing-server

## 0.0.41

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4
- @lightsparkdev/lightspark-sdk@1.8.6

## 0.0.40

### Patch Changes
6 changes: 3 additions & 3 deletions apps/examples/remote-signing-server/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/remote-signing-server",
"version": "0.0.41",
"version": "0.0.40",
"private": true,
"type": "module",
"scripts": {
@@ -17,8 +17,8 @@
"types": "tsc"
},
"dependencies": {
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"express": "^4.18.2"
},
"devDependencies": {
11 changes: 0 additions & 11 deletions apps/examples/streaming-wallet-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# @lightsparkdev/streaming-wallet-extension

## 1.0.71

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/ui@1.0.11
- @lightsparkdev/core@1.2.4
- @lightsparkdev/lightspark-sdk@1.8.6

## 1.0.70

### Patch Changes
8 changes: 4 additions & 4 deletions apps/examples/streaming-wallet-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "@lightsparkdev/streaming-wallet-extension",
"version": "1.0.71",
"version": "1.0.70",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/ui": "1.0.11",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"@lightsparkdev/ui": "1.0.10",
"eslint": "^8.3.0",
"react": "^18.2.0",
"react-dom": "^18.1.0",
10 changes: 0 additions & 10 deletions apps/examples/ui-test-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# @lightsparkdev/ui-test-app

## 0.0.12

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/ui@1.0.11
- @lightsparkdev/core@1.2.4

## 0.0.11

### Patch Changes
6 changes: 3 additions & 3 deletions apps/examples/ui-test-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/ui-test-app",
"version": "0.0.12",
"version": "0.0.11",
"description": "Lightspark UI components",
"author": "Lightspark Inc.",
"main": "./dist/index.js",
@@ -30,8 +30,8 @@
"@emotion/css": "^11.11.0",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/ui": "1.0.11",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/ui": "1.0.10",
"react": "^18.2.0",
"react-dom": "^18.1.0",
"react-router-dom": "6.11.2"
9 changes: 0 additions & 9 deletions apps/examples/uma-vasp-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# @lightsparkdev/uma-vasp-cli

## 0.0.22

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4
- @lightsparkdev/lightspark-sdk@1.8.6

## 0.0.21

### Patch Changes
6 changes: 3 additions & 3 deletions apps/examples/uma-vasp-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/uma-vasp-cli",
"version": "0.0.22",
"version": "0.0.21",
"private": true,
"description": "CLI for the Demo UMA VASP in ../apps/examples/uma-vasp",
"main": "./dist/index.js",
@@ -43,8 +43,8 @@
},
"dependencies": {
"@inquirer/prompts": "^1.1.3",
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"@uma-sdk/core": "^1.2.0",
"chalk": "^5.3.0",
"commander": "^11.0.0"
9 changes: 0 additions & 9 deletions apps/examples/uma-vasp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# @lightsparkdev/uma-vasp

## 0.0.42

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4
- @lightsparkdev/lightspark-sdk@1.8.6

## 0.0.41

### Patch Changes
6 changes: 3 additions & 3 deletions apps/examples/uma-vasp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/uma-vasp",
"version": "0.0.42",
"version": "0.0.41",
"private": true,
"type": "module",
"scripts": {
@@ -13,8 +13,8 @@
},
"main": "dist/index.js",
"dependencies": {
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"@uma-sdk/core": "^1.2.0",
"express": "^4.18.2",
"uuid": "^9.0.0",
7 changes: 0 additions & 7 deletions packages/core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# @lightsparkdev/core

## 1.2.4

### Patch Changes

- 1a063b6: - Add MXN to currency conversion util
- 1a063b6: - Remove text-encoding dependency previously needed for React Native support

## 1.2.3

### Patch Changes
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/core",
"version": "1.2.4",
"version": "1.2.3",
"description": "Lightspark JS SDK",
"author": "Lightspark Inc.",
"keywords": [
8 changes: 0 additions & 8 deletions packages/crypto-wasm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
# @lightsparkdev/crypto-wasm

## 0.1.7

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4

## 0.1.6

### Patch Changes
4 changes: 2 additions & 2 deletions packages/crypto-wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/crypto-wasm",
"version": "0.1.7",
"version": "0.1.6",
"type": "module",
"files": [
"crypto_bg.wasm",
@@ -12,7 +12,7 @@
"test": "node --experimental-vm-modules $(yarn bin jest) --no-cache --runInBand --bail"
},
"dependencies": {
"@lightsparkdev/core": "1.2.4"
"@lightsparkdev/core": "1.2.3"
},
"devDependencies": {
"jest": "^29.6.2",
10 changes: 0 additions & 10 deletions packages/lightspark-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# @lightsparkdev/lightspark-cli

## 0.0.60

### Patch Changes

- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4
- @lightsparkdev/lightspark-sdk@1.8.6
- @lightsparkdev/crypto-wasm@0.1.7

## 0.0.59

### Patch Changes
8 changes: 4 additions & 4 deletions packages/lightspark-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/lightspark-cli",
"version": "0.0.60",
"version": "0.0.59",
"description": "CLI for the Lightspark JS sdk",
"main": "./dist/index.js",
"bin": {
@@ -44,9 +44,9 @@
},
"dependencies": {
"@inquirer/prompts": "^1.1.3",
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/crypto-wasm": "0.1.7",
"@lightsparkdev/lightspark-sdk": "1.8.6",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/crypto-wasm": "0.1.6",
"@lightsparkdev/lightspark-sdk": "1.8.5",
"commander": "^11.0.0",
"dayjs": "^1.11.7",
"dotenv": "^16.3.1",
10 changes: 0 additions & 10 deletions packages/lightspark-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
# @lightsparkdev/lightspark-sdk

## 1.8.6

### Patch Changes

- 1a063b6: - Remove text-encoding dependency previously needed for React Native support
- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4
- @lightsparkdev/crypto-wasm@0.1.7

## 1.8.5

### Patch Changes
6 changes: 3 additions & 3 deletions packages/lightspark-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/lightspark-sdk",
"version": "1.8.6",
"version": "1.8.5",
"description": "Lightspark JS SDK",
"author": "Lightspark Inc.",
"keywords": [
@@ -82,8 +82,8 @@
},
"license": "Apache-2.0",
"dependencies": {
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/crypto-wasm": "0.1.7",
"@lightsparkdev/core": "1.2.3",
"@lightsparkdev/crypto-wasm": "0.1.6",
"crypto-browserify": "^3.12.0",
"dayjs": "^1.11.7",
"dotenv": "^16.3.1",
9 changes: 0 additions & 9 deletions packages/oauth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# @lightsparkdev/oauth

## 0.1.49

### Patch Changes

- 1a063b6: - Remove text-encoding dependency previously needed for React Native support
- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4

## 0.1.48

### Patch Changes
4 changes: 2 additions & 2 deletions packages/oauth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/oauth",
"version": "0.1.49",
"version": "0.1.48",
"private": true,
"description": "Lightspark JS Oauth SDK",
"author": "Lightspark Inc.",
@@ -48,7 +48,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/core": "1.2.3",
"@openid/appauth": "^1.3.1",
"auto-bind": "^5.0.1",
"dayjs": "^1.11.7"
11 changes: 0 additions & 11 deletions packages/ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
# @lightsparkdev/ui

## 1.0.11

### Patch Changes

- 1a063b6: - PendingValue improvements
- Fix circular dep issue with typography and toReactNodes utils
- Add theming for CardForm
- Updated dependencies [1a063b6]
- Updated dependencies [1a063b6]
- @lightsparkdev/core@1.2.4

## 1.0.10

### Patch Changes
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lightsparkdev/ui",
"version": "1.0.11",
"version": "1.0.10",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -58,7 +58,7 @@
"@emotion/css": "^11.11.0",
"@emotion/react": "^11.11.0",
"@emotion/styled": "^11.11.0",
"@lightsparkdev/core": "1.2.4",
"@lightsparkdev/core": "1.2.3",
"@rollup/plugin-url": "^8.0.2",
"@simbathesailor/use-what-changed": "^2.0.0",
"@svgr/core": "^8.1.0",
38 changes: 35 additions & 3 deletions packages/ui/src/components/IconWithCircleBackground.tsx
Original file line number Diff line number Diff line change
@@ -12,6 +12,8 @@ type IconWithCircleBackgroundProps = {
iconName?: IconName;
iconWidth?: IconWidth | undefined;
to?: NewRoutesType | undefined;
darkBg?: boolean;
shouldRotate?: boolean;
onClick?: () => void;
};

@@ -20,11 +22,21 @@ export function IconWithCircleBackground({
iconWidth = 40,
to,
onClick,
darkBg = false,
shouldRotate = false,
}: IconWithCircleBackgroundProps) {
const content = (
<Flex center onClick={onClick}>
<StyledIconWithCircleBackground size={iconWidth}>
<Icon name={iconName} width={iconWidth} color="grayBlue9" />
<StyledIconWithCircleBackground
size={iconWidth}
darkBg={darkBg}
shouldRotate={shouldRotate}
>
<Icon
name={iconName}
width={iconWidth}
color={darkBg ? "white" : "grayBlue9"}
/>
</StyledIconWithCircleBackground>
</Flex>
);
@@ -33,10 +45,15 @@ export function IconWithCircleBackground({

type StyledIconWithCircleBackgroundProps = {
size: IconWidth;
darkBg: boolean;
shouldRotate: boolean;
};

const StyledIconWithCircleBackground = styled.div<StyledIconWithCircleBackgroundProps>`
background-color: ${({ theme }) => getColor(theme, "grayBlue94")};
background: ${({ theme, darkBg }) =>
darkBg
? `linear-gradient(291.4deg, #1C243F 0%, #21283A 100%)`
: getColor(theme, "grayBlue94")};
border-radius: 50%;
padding: ${({ size }) => getPadding(size)}px;
display: flex;
@@ -45,6 +62,21 @@ const StyledIconWithCircleBackground = styled.div<StyledIconWithCircleBackground
`width: ${size + getPadding(size) * 2}px; height: ${
size + getPadding(size) * 2
}px;`}
@keyframes IconWithCircleBackgroundRotate {
0% {
transform: rotate(0);
}
35% {
transform: rotate(360deg);
}
100% {
transform: rotate(360deg);
}
}
${({ shouldRotate }) =>
shouldRotate &&
`animation: IconWithCircleBackgroundRotate 10s ease infinite;`}
`;

function getPadding(size: IconWidth) {

0 comments on commit 41a3eb3

Please sign in to comment.