Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0193f60
build(deps): add necessary dependenices for wagmi
hobbescodes Oct 20, 2023
0ede0f9
feat(wagmi): set up base for simple config integration
hobbescodes Oct 20, 2023
07b93f2
feat: add base for BlockchainProvider component
hobbescodes Oct 20, 2023
8849c6a
feat: add base for ConnectWallet component
hobbescodes Oct 20, 2023
3867cad
refactor(ConnectWallet): update image source fetching logic
hobbescodes Oct 20, 2023
c43c0e5
feat(ConnectWallet): add error toast when onError callback is triggered
hobbescodes Oct 21, 2023
bbdd42a
Merge branch 'master' into feature/web3-module
hobbescodes Oct 21, 2023
00d4add
feat(ConnectWallet): add basic success toast for onSuccess callback
hobbescodes Oct 21, 2023
dead611
chore(config): add mock wagmi connector in dev environments
hobbescodes Oct 21, 2023
c28b6d9
chore(config): remove unnecessary injected provider
hobbescodes Oct 21, 2023
461187a
feat: add disconnect workflow
hobbescodes Oct 21, 2023
d883c75
feat(DisconnectWallet): set up ensAvatar and ensName on trigger
hobbescodes Oct 21, 2023
08e604f
Merge branch 'master' into feature/web3-module
hobbescodes Oct 23, 2023
3680440
chore: update directory structure for wallet connection components
hobbescodes Oct 23, 2023
b232063
refactor(DisconnectWallet): update styles and layout of DisconnectWal…
hobbescodes Oct 23, 2023
da17174
chore: update image alt tags in DisconnectWallet
hobbescodes Oct 24, 2023
5a6b1f8
feat(DisconnectWallet): add connector indicator to disconnect modal
hobbescodes Oct 24, 2023
b8b9f90
feat(DisconnectWallet): add success toast when address is copied to c…
hobbescodes Oct 24, 2023
a96b6bf
chore: add custom networks array to include chain icons and override …
hobbescodes Oct 24, 2023
a590803
feat(SwitchNetwork): see up base for component
hobbescodes Oct 25, 2023
5fc9c94
feat(DisconnectWallet): use current network icon as fallback image wh…
hobbescodes Oct 25, 2023
07a9f9a
refactor(DisconnectWallet): update current network image styles
hobbescodes Oct 25, 2023
f649594
fix(DisconnectWallet): fix component name typo
hobbescodes Oct 25, 2023
74a7e26
feat(SwitchNetwork): add success and error toasts
hobbescodes Oct 25, 2023
34902fb
feat: add base for wallet connection flow tests
hobbescodes Oct 25, 2023
a5e711c
feat: add switch network to wallet connection testing suite
hobbescodes Oct 25, 2023
78b0efe
chore: remove need for env files
hobbescodes Oct 25, 2023
85e934c
chore: add basic JSDoc to wallet connection components
hobbescodes Oct 25, 2023
01cfbea
feat: add base for useCurrencyBalance hook
hobbescodes Oct 25, 2023
4a51243
chore: add comment for WalletConnectionState story
hobbescodes Oct 27, 2023
1daf1cb
refactor(ConnectWallet): target metaMask for injected connector
hobbescodes Oct 27, 2023
3471790
chore: remove unnecessary multiInjectedProviderDiscovery prop
hobbescodes Oct 27, 2023
3071707
refactor: update useCurrencyBalance --> useBalance, update logic
hobbescodes Oct 27, 2023
9b5ec13
chore(useBalance): move precision handling to custom hook
hobbescodes Oct 27, 2023
ed8e649
refactor(useBalance): return complete objects
hobbescodes Oct 27, 2023
66d62ea
chore(useBalance): update fallback patterns
hobbescodes Oct 27, 2023
5c560b7
chore(useBalance): add explicit return types for data
hobbescodes Oct 27, 2023
4a38f14
fix(useBalance): create custom 'BalanceData' type, to override wagmi …
hobbescodes Oct 27, 2023
dcace50
chore(useBalance): add comment related to 'formatted' deprecation/ove…
hobbescodes Oct 27, 2023
3ed4b5d
refactor(DisconnectWallet): update component to use custom 'useBalanc…
hobbescodes Oct 27, 2023
9e03eb8
chore: add note about using public RPC endpoints
hobbescodes Oct 27, 2023
616c8b4
chore: merge master
hobbescodes Oct 31, 2023
ae01576
build: fix lock file
hobbescodes Oct 31, 2023
3ad4b24
chore: update gitignore patterns
hobbescodes Oct 31, 2023
1dccc16
build(deps): update dependencies
hobbescodes Nov 10, 2023
a0881e3
style(button): update border styles for variants
hobbescodes Nov 10, 2023
15f6aa4
style: add appropriate transparent borders to disconnect modal buttons
hobbescodes Nov 10, 2023
32ad812
chore: add TODO to useBalance hook
hobbescodes Nov 10, 2023
8bddcd6
fix(tests): verify that connect button is present again after disconnect
hobbescodes Nov 10, 2023
a862cc5
Merge branch 'master' into feature/web3-module
hobbescodes Nov 14, 2023
d86a247
fix: update wallet connection components to use ark v1 api structure
hobbescodes Nov 14, 2023
c20930d
chore(changelog): format
hobbescodes Nov 14, 2023
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [#161](https://github.com/animareflection/ui/pull/161) [`f750579`](https://github.com/animareflection/ui/commit/f75057983f63a85daa7c74fe521298e3b2582e7e) Thanks [@Twonarly1](https://github.com/Twonarly1)! - Update `Accordion` component

- [#171](https://github.com/animareflection/ui/pull/171) [`072e6d0`](https://github.com/animareflection/ui/commit/072e6d0904cdbb6eef0740fbaca43d3fdb0a9738) Thanks [@coopbri](https://github.com/coopbri)! - Change recipes to use Ark v1 slots

- Change `Carousel` `slides` prop to `items`

- [#158](https://github.com/animareflection/ui/pull/158) [`165d9c5`](https://github.com/animareflection/ui/commit/165d9c5fd5c938176c01a427f9493e82970a7fa8) Thanks [@hobbescodes](https://github.com/hobbescodes)! - Add additional variants for components that leverage `defaultVariants`
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"@storybook/testing-library": "^0.2.2",
"@storybook/theming": "^7.5.3",
"@storybook/types": "^7.5.3",
"@tanstack/react-query": "^5.8.1",
"@testing-library/dom": "^9.3.3",
"@testing-library/react": "^14.1.0",
"@testing-library/user-event": "^14.5.1",
Expand Down Expand Up @@ -116,6 +117,8 @@
"tsup": "^7.2.0",
"typescript": "^5.2.2",
"usehooks-ts": "^2.9.1",
"viem": "2.0.0-beta.1",
"wagmi": "beta",
"wait-on": "^7.1.0",
"webpack": "^5.89.0"
}
Expand Down
33 changes: 33 additions & 0 deletions public/svg/connectors/brave.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions public/svg/connectors/ethereum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions public/svg/connectors/metamask.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions public/svg/connectors/phantom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion src/components/core/Button/Button.recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const buttonRecipe = defineRecipe({
className: "button",
description: "The styles for the Button component",
base: {
borderWidth: "1px",
cursor: "pointer",
fontWeight: "bold",
borderRadius: "md",
Expand All @@ -27,6 +28,7 @@ export const buttonRecipe = defineRecipe({
variants: {
variant: {
primary: {
borderColor: "accent.default",
color: "accent.fg",
bgColor: "accent.default",
_hover: {
Expand All @@ -41,7 +43,6 @@ export const buttonRecipe = defineRecipe({
},
},
secondary: {
borderWidth: "1px",
borderColor: "border.emphasized",
bgColor: "bg.default",
color: "fg.emphasized",
Expand All @@ -60,6 +61,7 @@ export const buttonRecipe = defineRecipe({
},
},
ghost: {
borderColor: "transparent",
bgColor: "transparent",
color: "fg.emphasized",
_hover: {
Expand All @@ -76,6 +78,7 @@ export const buttonRecipe = defineRecipe({
},
},
round: {
borderColor: "accent.default",
borderRadius: "full !important",
color: "accent.fg",
bgColor: "accent.default",
Expand Down
21 changes: 4 additions & 17 deletions src/components/core/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,39 +80,26 @@ const WITH_CONTEXT_GROUPS: MenuItemGroupRecord[] = [
];

export const Default: Story = {
render: () => (
<Menu triggerVariant="primary" trigger="Open Menu" groups={GROUPS} />
),
render: () => <Menu trigger={<Button>Open Menu</Button>} groups={GROUPS} />,
};

export const Small: Story = {
render: () => (
<Menu
triggerVariant="primary"
trigger="Open Menu"
groups={GROUPS}
size="sm"
/>
<Menu trigger={<Button>Open Menu</Button>} groups={GROUPS} size="sm" />
),
};

export const Large: Story = {
render: () => (
<Menu
triggerVariant="primary"
trigger="Open Menu"
groups={GROUPS}
size="lg"
/>
<Menu trigger={<Button>Open Menu</Button>} groups={GROUPS} size="lg" />
),
};

export const WithContext: Story = {
render: () => (
<Menu
closeOnSelect={false}
triggerVariant="primary"
trigger="Open Menu"
trigger={<Button>Open Menu</Button>}
groups={WITH_CONTEXT_GROUPS}
>
{({ close: onClose }) => (
Expand Down
19 changes: 3 additions & 16 deletions src/components/core/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ import {
PrimitiveMenuItemGroupLabel,
PrimitiveMenuTriggerItem,
} from "components/primitives";
import { cx } from "generated/panda/css";
import { button, menu } from "generated/panda/recipes";
import { menu } from "generated/panda/recipes";
import { useIsClient } from "lib/hooks";

import type { PrimitiveMenuProps } from "components/primitives";
import type {
ButtonVariantProps,
MenuVariantProps,
} from "generated/panda/recipes";
import type { MenuVariantProps } from "generated/panda/recipes";
import type { ReactElement, ReactNode } from "react";

export interface MenuItemRecord {
Expand All @@ -36,7 +32,6 @@ export interface MenuItemGroupRecord {
export interface Props extends PrimitiveMenuProps, MenuVariantProps {
trigger?: ReactNode;
triggerItem?: ReactNode;
triggerVariant?: ButtonVariantProps["variant"];
groups?: MenuItemGroupRecord[];
}

Expand All @@ -47,7 +42,6 @@ const Menu = ({
children,
trigger,
triggerItem,
triggerVariant,
groups,
size,
...rest
Expand All @@ -63,14 +57,7 @@ const Menu = ({
{(ctx) => (
<>
{trigger && (
<PrimitiveMenuTrigger
className={cx(
button({ variant: triggerVariant }),
classNames.trigger,
)}
>
{trigger}
</PrimitiveMenuTrigger>
<PrimitiveMenuTrigger asChild>{trigger}</PrimitiveMenuTrigger>
)}
{triggerItem && (
<PrimitiveMenuTriggerItem className={classNames.triggerItem}>
Expand Down
6 changes: 3 additions & 3 deletions src/components/core/Modal/Modal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { modalState } from "./Modal.spec";
import { Modal, Text } from "components/core";
import { Button, Modal, Text } from "components/core";

import type { Meta, StoryObj } from "@storybook/react";

Expand All @@ -8,7 +8,7 @@ type Story = StoryObj<typeof Modal>;
export const Default: Story = {
render: () => (
<Modal
trigger="Open Modal"
trigger={<Button>Open Modal</Button>}
title="Modal Title"
description="Modal Description"
>
Expand All @@ -24,7 +24,7 @@ export const Default: Story = {
export const WithContext: Story = {
render: () => (
<Modal
trigger="Open Modal"
trigger={<Button>Open Modal</Button>}
title="Modal Title"
description="Modal Description"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/core/Modal/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Modal = ({
{(ctx) => (
<>
{trigger && (
<PrimitiveModalTrigger className={classNames.trigger}>
<PrimitiveModalTrigger className={classNames.trigger} asChild>
{trigger}
</PrimitiveModalTrigger>
)}
Expand Down
4 changes: 4 additions & 0 deletions src/components/core/Spinner/Spinner.recipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export const spinnerRecipe = defineRecipe({
},
variants: {
size: {
xs: {
h: 3,
w: 3,
},
sm: {
h: 6,
w: 6,
Expand Down
Loading