-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(ui): sync with penumbra-zone/ui * ui package imports * fix(ui): move penumbra packages to dev dependencies * fix(ui): don't export components directory from UI * feat(ui): #1336: start separating ui components * feat(ui): #1336: Put all components in directories * fix(ui): linting and tests * chore: add changesets * fix: put the repo/ui package name back * fix: after the merge --------- Co-Authored-By: Tal Derei <[email protected]> * feat(ui): #51: remove unused components and their dependencies * chore: changeset * fix: update pnpm lock * fix: forgotten update * fix: one-way-swap --------- Co-authored-by: Tal Derei <[email protected]>
- Loading branch information
Showing
132 changed files
with
1,303 additions
and
2,669 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@repo/ui': major | ||
'chrome-extension': patch | ||
--- | ||
|
||
Refactor UI package: sync it with the penumbra-zone/ui and remove unused components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/extension/src/routes/page/restore-password/set-password.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/extension/src/routes/popup/settings/settings-screen/settings-header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/extension/src/shared/components/default-frontend-form/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
apps/extension/src/shared/components/grpc-endpoint-form/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...i/components/ui/account-switcher.test.tsx → ...ccount-switcher/account-switcher.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ges/ui/components/ui/account-switcher.tsx → .../components/ui/account-switcher/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
packages/ui/components/ui/address-view/address-view.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { AddressViewComponent } from '.'; | ||
import { | ||
Address, | ||
AddressIndex, | ||
AddressView, | ||
AddressView_Decoded, | ||
} from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/keys/v1/keys_pb'; | ||
import { addressFromBech32m } from '@penumbra-zone/bech32m/penumbra'; | ||
|
||
const meta: Meta<typeof AddressViewComponent> = { | ||
component: AddressViewComponent, | ||
title: 'AddressViewComponent', | ||
tags: ['autodocs'], | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof AddressViewComponent>; | ||
|
||
const EXAMPLE_VIEW = new AddressView({ | ||
addressView: { | ||
case: 'decoded', | ||
|
||
value: new AddressView_Decoded({ | ||
address: new Address({ inner: new Uint8Array(80) }), | ||
index: new AddressIndex({ | ||
account: 0, | ||
randomizer: new Uint8Array([0, 0, 0]), | ||
}), | ||
}), | ||
}, | ||
}); | ||
|
||
const EXAMPLE_VIEW_OPAQUE = new AddressView({ | ||
addressView: { | ||
case: 'opaque', | ||
value: { | ||
address: addressFromBech32m( | ||
'penumbra1e8k5cyds484dxvapeamwveh5khqv4jsvyvaf5wwxaaccgfghm229qw03pcar3ryy8smptevstycch0qk3uu0rgkvtjpxy3cu3rjd0agawqtlz6erev28a6sg69u7cxy0t02nd4', | ||
), | ||
}, | ||
}, | ||
}); | ||
|
||
export const Decoded: Story = { | ||
args: { | ||
view: EXAMPLE_VIEW, | ||
}, | ||
}; | ||
|
||
export const Copiable: Story = { | ||
args: { | ||
view: EXAMPLE_VIEW, | ||
copyable: true, | ||
}, | ||
}; | ||
|
||
export const Opaque: Story = { | ||
args: { | ||
view: EXAMPLE_VIEW_OPAQUE, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ui/components/ui/tx/view/address-view.tsx → ...s/ui/components/ui/address-view/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...es/ui/components/ui/address-component.tsx → ...mponents/ui/address/address-component.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/ui/components/ui/address-icon.tsx → ...ui/components/ui/address/address-icon.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { AddressIcon, type AddressIconProps } from './address-icon'; | ||
export { AddressComponent, type AddressComponentProps } from './address-component'; |
44 changes: 44 additions & 0 deletions
44
packages/ui/components/ui/asset-icon/asset-icon.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { AssetIcon } from '.'; | ||
import { Metadata } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb'; | ||
|
||
const meta: Meta<typeof AssetIcon> = { | ||
component: AssetIcon, | ||
title: 'AssetIcon', | ||
tags: ['autodocs'], | ||
}; | ||
export default meta; | ||
|
||
type Story = StoryObj<typeof AssetIcon>; | ||
|
||
const EXAMPLE_METADATA = new Metadata({ | ||
base: 'upenumbra', | ||
display: 'penumbra', | ||
symbol: 'UM', | ||
images: [ | ||
{ | ||
svg: 'https://raw.githubusercontent.com/prax-wallet/registry/main/images/um.svg', | ||
}, | ||
], | ||
}); | ||
|
||
export const Small: Story = { | ||
args: { | ||
metadata: EXAMPLE_METADATA, | ||
}, | ||
}; | ||
|
||
export const ExtraSmall: Story = { | ||
args: { | ||
metadata: EXAMPLE_METADATA, | ||
size: 'xs', | ||
}, | ||
}; | ||
|
||
export const Large: Story = { | ||
args: { | ||
metadata: EXAMPLE_METADATA, | ||
size: 'lg', | ||
}, | ||
}; |
File renamed without changes.
4 changes: 2 additions & 2 deletions
4
...omponents/ui/tx/view/asset-icon/index.tsx → ...ges/ui/components/ui/asset-icon/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.