Skip to content

Commit

Permalink
Rename @cartridge/ui-next to @cartridge/ui
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Jan 17, 2025
1 parent e4d03c7 commit dcbf4f9
Show file tree
Hide file tree
Showing 432 changed files with 120 additions and 137 deletions.
2 changes: 1 addition & 1 deletion examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dependencies": {
"@cartridge/connector": "workspace:*",
"@cartridge/controller": "workspace:*",
"@cartridge/ui-next": "workspace:*",
"@cartridge/ui": "workspace:*",
"@starknet-react/chains": "^0.1.3",
"@starknet-react/core": "^3.0.2",
"next": "^14.2.5",
Expand Down
6 changes: 3 additions & 3 deletions examples/next/src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "@cartridge/ui-next/dist/themes/default.css";
@import "@cartridge/ui-next/dist/themes/dark.css";
@import "@cartridge/ui-next/dist/themes/fonts.css";
@import "@cartridge/ui/dist/themes/default.css";
@import "@cartridge/ui/dist/themes/dark.css";
@import "@cartridge/ui/dist/themes/fonts.css";

@tailwind base;
@tailwind components;
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/app/token/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ConnectWallet } from "components/ConnectWallet";
import { useTokenContract } from "hooks/token";
import { Abi } from "starknet";
import Erc20Abi from "abi/erc20.json";
import { Button, Input } from "@cartridge/ui-next";
import { Button, Input } from "@cartridge/ui";

function UserBalance() {
const { account } = useAccount();
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/ColorModeToggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@cartridge/ui-next";
} from "@cartridge/ui";

export function ColorModeToggle() {
const { setTheme } = useTheme();
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { useAccount, useConnect, useDisconnect } from "@starknet-react/core";
import ControllerConnector from "@cartridge/connector/controller";
import React, { useEffect, useState, useRef } from "react";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";

export function ConnectWallet() {
const { connect, connectors } = useConnect();
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/DelegateAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAccount } from "@starknet-react/core";
import { useCallback, useEffect, useState } from "react";
import { constants } from "starknet";
import ControllerConnector from "@cartridge/connector/controller";
import { Button, Input } from "@cartridge/ui-next";
import { Button, Input } from "@cartridge/ui";

export const DelegateAccount = () => {
const [chainId] = useState<constants.StarknetChainId>(
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import ControllerConnector from "@cartridge/connector/controller";
import {
useAccount,
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/InvalidTxn.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import { useAccount, useSendTransaction } from "@starknet-react/core";

const ETH_CONTRACT =
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/LookupControllers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useAccount } from "@starknet-react/core";
import { useCallback, useState } from "react";
import ControllerConnector from "@cartridge/connector/controller";
import { lookupAddresses, lookupUsernames } from "@cartridge/controller";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";

export function LookupControllers() {
const { address, connector } = useAccount();
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/ManualTransferEth.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import { useAccount, useNetwork } from "@starknet-react/core";
import { useCallback, useState } from "react";
import { ETH_CONTRACT_ADDRESS } from "./providers/StarknetProvider";
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useAccount } from "@starknet-react/core";
import ControllerConnector from "@cartridge/connector/controller";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";

export function Profile() {
const { account, connector } = useAccount();
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/RegisterSession.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useAccount } from "@starknet-react/core";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import { ec, stark } from "starknet";
import { useCallback, useState } from "react";

Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useAccount, useDisconnect } from "@starknet-react/core";
import ControllerConnector from "@cartridge/connector/controller";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";

export function Settings() {
const { account, connector } = useAccount();
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/SignMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Button, Textarea } from "@cartridge/ui-next";
import { Button, Textarea } from "@cartridge/ui";
import { useAccount, useSignTypedData } from "@starknet-react/core";
import { useCallback, useState } from "react";
import {
Expand Down
2 changes: 1 addition & 1 deletion examples/next/src/components/Transfer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import { useAccount, useNetwork } from "@starknet-react/core";
import { useCallback, useState } from "react";
import { STRK_CONTRACT_ADDRESS } from "./providers/StarknetProvider";
Expand Down
4 changes: 2 additions & 2 deletions examples/next/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { cartridgeTWPreset } from "@cartridge/ui-next/preset";
import { cartridgeTWPreset } from "@cartridge/ui/preset";
import { Config } from "tailwindcss";

const config: Config = {
content: [
"./src/**/*.{ts,tsx}",
"./node_modules/@cartridge/ui-next/dist/**/*.{js,jsx}",
"./node_modules/@cartridge/ui/dist/**/*.{js,jsx}",
],
presets: [cartridgeTWPreset],
};
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"connector": "pnpm --filter @cartridge/connector",
"account-wasm": "pnpm --filter @cartridge/account-wasm",
"book": "pnpm --filter @cartridge/documentation",
"ui:next": "pnpm --filter @cartridge/ui-next",
"ui": "pnpm --filter @cartridge/ui",
"profile": "pnpm --filter @cartridge/profile",
"utils": "pnpm --filter @cartridge/utils",
"example:next": "pnpm --filter @cartridge/controller-example-next",
Expand All @@ -43,4 +43,4 @@
"vercel": "^37.4.2",
"@types/react": "^18.3.12"
}
}
}
2 changes: 1 addition & 1 deletion packages/keychain/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import type { Preview, ReactRenderer } from "@storybook/react";
import { withThemeByClassName } from "@storybook/addon-themes";
import { SonnerToaster } from "@cartridge/ui-next";
import { SonnerToaster } from "@cartridge/ui";

import { StoryParameters } from "./mock";
import { Provider } from "./provider";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/.storybook/provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { QueryClient, QueryClientProvider } from "react-query";
import { controllerConfigs } from "@cartridge/presets";
import { mainnet } from "@starknet-react/chains";
import { StarknetConfig, publicProvider, voyager } from "@starknet-react/core";
import { useThemeEffect } from "@cartridge/ui-next";
import { useThemeEffect } from "@cartridge/ui";
import { BrowserRouter } from "react-router-dom";

import { ConnectionContext } from "../src/components/provider/connection";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@cartridge/account-wasm": "workspace:*",
"@cartridge/controller": "workspace:*",
"@cartridge/penpal": "^6.2.3",
"@cartridge/ui-next": "workspace:*",
"@cartridge/ui": "workspace:*",
"@cartridge/utils": "workspace:*",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/DeployController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
Spinner,
WandIcon,
Button,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import { Funding } from "./funding";
import { useConnection } from "@/hooks/connection";
import { ControllerErrorAlert, ErrorAlert } from "./ErrorAlert";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/ErrorAlert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
AccordionContent,
cn,
Separator,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import React, {
ReactElement,
useCallback,
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { PropsWithChildren, useEffect } from "react";
import { Container, Content, Footer } from "./layout";
import { AlertIcon, ExternalIcon, Button } from "@cartridge/ui-next";
import { AlertIcon, ExternalIcon, Button } from "@cartridge/ui";
import { useConnection } from "@/hooks/connection";
import { CARTRIDGE_DISCORD_LINK } from "@/const";
import { usePostHog } from "posthog-js/react";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/ExecutionContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useCallback, useEffect, useRef } from "react";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import { Container, Footer } from "@/components/layout";
import { useConnection } from "@/hooks/connection";
import { ControllerError } from "@/utils/connection";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/Fees.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useEffect, useState } from "react";
import { formatUnits } from "viem";
import { useChainId } from "@/hooks/connection";
import { ErrorAlertIcon, EthereumIcon, Spinner } from "@cartridge/ui-next";
import { ErrorAlertIcon, EthereumIcon, Spinner } from "@cartridge/ui";

export function Fees({
maxFee,
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/Loading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Spinner } from "@cartridge/ui-next";
import { Spinner } from "@cartridge/ui";

export function PageLoading() {
return (
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/SignMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
CardTitle,
CardListContent,
CardListItem,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import { useController } from "@/hooks/controller";

export function SignMessage({
Expand Down
7 changes: 1 addition & 6 deletions packages/keychain/src/components/Transaction.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { ReactNode, useEffect, useMemo, useState } from "react";
import { constants } from "starknet";
import {
CheckIcon,
ExternalIcon,
Spinner,
StarknetIcon,
} from "@cartridge/ui-next";
import { CheckIcon, ExternalIcon, Spinner, StarknetIcon } from "@cartridge/ui";
import { useController } from "@/hooks/controller";
import { useChainName } from "@/hooks/chain";
import { StarkscanUrl } from "@cartridge/utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/CreateSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
SelectValue,
Button,
Checkbox,
} from "@cartridge/ui-next";
} from "@cartridge/ui";

export function CreateSession({
policies,
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/Logout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Container, Footer } from "@/components/layout";
import { LogoutDuoIcon, Button } from "@cartridge/ui-next";
import { LogoutDuoIcon, Button } from "@cartridge/ui";
import { useConnection } from "@/hooks/connection";
import { ResponseCodes } from "@cartridge/controller";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { VerifiedIcon } from "@cartridge/ui-next";
import { VerifiedIcon } from "@cartridge/ui";
import { useConnection } from "@/hooks/connection";
import { useMemo } from "react";
import { Link } from "react-router-dom";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/Upgrade.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BoltIcon, CircleIcon } from "@cartridge/ui-next";
import { BoltIcon, CircleIcon } from "@cartridge/ui";
import { ExecutionContainer } from "@/components/ExecutionContainer";
import { Content } from "@/components/layout";
import { useConnection } from "@/hooks/connection";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AlertIcon } from "@cartridge/ui-next";
import { AlertIcon } from "@cartridge/ui";
import { Container } from "@/components/layout";
import { useEffect, useState } from "react";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, useCallback } from "react";
import { Button } from "@cartridge/ui-next";
import { Button } from "@cartridge/ui";
import { Unsupported, useIsSupported } from "./Unsupported";
import { doSignup } from "@/hooks/account";
import { Container, Content, Footer } from "@/components/layout";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useRef, useState, useEffect } from "react";
import { Container, Footer, Content } from "@/components/layout";
import { Button, cn, Input } from "@cartridge/ui-next";
import { Button, cn, Input } from "@cartridge/ui";
import { useControllerTheme } from "@/hooks/theme";
import { usePostHog } from "posthog-js/react";
import { useDebounce } from "@/hooks/debounce";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/create/Legal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LockIcon } from "@cartridge/ui-next";
import { LockIcon } from "@cartridge/ui";
import { Link } from "react-router-dom";

export const Legal = () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ValidationState } from "./useUsernameValidation";
import { cn, ExternalIcon } from "@cartridge/ui-next";
import { cn, ExternalIcon } from "@cartridge/ui";
import { useMemo } from "react";
import { Link } from "react-router-dom";

Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/failure.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Container } from "@/components/layout";
import { AlertIcon, ExternalIcon } from "@cartridge/ui-next";
import { AlertIcon, ExternalIcon } from "@cartridge/ui";
import { CARTRIDGE_DISCORD_LINK } from "@/const";
import { Link } from "react-router-dom";

Expand Down
8 changes: 1 addition & 7 deletions packages/keychain/src/components/funding/AmountSelection.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import {
DollarIcon,
Button,
cn,
useDisclosure,
Input,
} from "@cartridge/ui-next";
import { DollarIcon, Button, cn, useDisclosure, Input } from "@cartridge/ui";
import { useState } from "react";

export const DEFAULT_AMOUNT = 5;
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/funding/Balance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
CardListItem,
CardTitle,
CoinsIcon,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import { TokenPair } from "@cartridge/utils/api/cartridge";
import { formatEther } from "viem";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/funding/DepositEth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
Button,
CopyAddress,
Separator,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import { useConnection } from "@/hooks/connection";
import { ErrorAlert } from "../ErrorAlert";
import { parseEther } from "viem";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Button,
CopyAddress,
Separator,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import { useConnection } from "@/hooks/connection";
import { AmountSelection, DEFAULT_AMOUNT } from "./AmountSelection";
import { ErrorAlert } from "@/components/ErrorAlert";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
import { StripePaymentElementOptions } from "@stripe/stripe-js";
import { Container, Content, Footer } from "@/components/layout";
import { useController } from "@/hooks/controller";
import { CoinsIcon, CopyAddress, Button } from "@cartridge/ui-next";
import { CoinsIcon, CopyAddress, Button } from "@cartridge/ui";
import { ErrorAlert } from "@/components/ErrorAlert";

type StripeCheckoutProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/funding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
CoinsIcon,
EthereumIcon,
CopyAddress,
} from "@cartridge/ui-next";
} from "@cartridge/ui";
import { DepositEth } from "./DepositEth";
import { PurchaseCredits } from "./PurchaseCredits";
import { Balance, BalanceType } from "./Balance";
Expand Down
2 changes: 1 addition & 1 deletion packages/keychain/src/components/layout/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn } from "@cartridge/ui-next";
import { cn } from "@cartridge/ui";
import { PropsWithChildren } from "react";

export function Content({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ArrowIcon, Button } from "@cartridge/ui-next";
import { ArrowIcon, Button } from "@cartridge/ui";
import { isIframe } from "@cartridge/utils";

export function BackButton({ onClick }: { onClick?: () => void }) {
Expand Down
Loading

0 comments on commit dcbf4f9

Please sign in to comment.