Skip to content

Commit

Permalink
refactor: rename leaf to leather
Browse files Browse the repository at this point in the history
  • Loading branch information
alter-eggo committed Sep 1, 2023
1 parent e88b2c2 commit 41752f6
Show file tree
Hide file tree
Showing 120 changed files with 141 additions and 141 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module.exports = {
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['./leaf-styles'],
ignorePatterns: ['./leather-styles'],
plugins: ['react', 'react-hooks', '@typescript-eslint', 'deprecation'],
rules: {
// This rule helps highlight areas of the code that use deprecated
Expand Down Expand Up @@ -100,7 +100,7 @@ module.exports = {
{
name: '@radix-ui/themes',
importNames: ['Flex'],
message: 'Layout components should be imported from leaf-styles/jsx',
message: 'Layout components should be imported from leather-styles/jsx',
},
],
},
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ trace*
/test-results/
/playwright-report/
/playwright/.cache/
leaf-styles
leather-styles
.netlify
./.vscode/settings.json
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
"lint:prettier": "prettier --check \"{src,tests,tests-legacy}/**/*.{ts,tsx}\" \"*.{js,json}\"",
"lint:prettier:fix": "prettier --write \"{src,tests,tests-legacy}/**/*.{ts,tsx}\" *.js",
"lint:unused-exports": "ts-unused-exports tsconfig.json --ignoreFiles=leaf-styles",
"lint:unused-exports": "ts-unused-exports tsconfig.json --ignoreFiles=leather-styles",
"lint:remote-wallet-config": "npx ajv-cli validate -s config/wallet-config.schema.json -d config/wallet-config.json",
"lint:deps": "dependency-cruise --config .dependency-cruiser.js \"src/**/*.{ts,tsx}\"",
"prod:ext": "yarn build",
Expand Down
2 changes: 1 addition & 1 deletion panda.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default defineConfig({
recipes: { button: buttonRecipe },
},
},
outdir: 'leaf-styles',
outdir: 'leather-styles',
outExtension: 'js',
minify: true,
});
2 changes: 1 addition & 1 deletion src/app/common/hooks/use-media-query.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';

import { BreakpointToken, token } from 'leaf-styles/tokens';
import { BreakpointToken, token } from 'leather-styles/tokens';

function useMediaQuery(query: string) {
const [matches, setMatches] = useState(false);
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/account-total-balance.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { memo } from 'react';

import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { useTotalBalance } from '@app/common/hooks/balance/use-total-balance';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/account/account-list-item-layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Flex, Spinner, Stack, StackProps, color, useMediaQuery } from '@stacks/ui';
import { truncateMiddle } from '@stacks/ui-utils';
import { SettingsMenuSelectors } from '@tests/selectors/settings.selectors';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { useConfigBitcoinEnabled } from '@app/query/common/remote-config/remote-config.query';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/account/account-name.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { memo } from 'react';

import { BoxProps } from '@stacks/ui';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { useAccountDisplayName } from '@app/common/hooks/account/use-account-names';
import { StacksAccount } from '@app/store/accounts/blockchain/stacks/stacks-account.models';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

interface AddressDisplayerLayoutProps {
isEven: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Dispatch, SetStateAction, useCallback, useRef } from 'react';
import { Link } from '@radix-ui/themes';
import { Stack } from '@stacks/ui';
import { Form, Formik } from 'formik';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';
import * as yup from 'yup';

import { BtcFeeType } from '@shared/models/fees/bitcoin-fees.model';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Flex, Text, color, transition } from '@stacks/ui';
import { SharedComponentsSelectors } from '@tests/selectors/shared-component.selectors';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

interface FeesListItemProps {
arrivesIn: string;
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/button/button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { styled } from 'leaf-styles/jsx';
import { type ButtonVariantProps, button as buttonRecipe } from 'leaf-styles/recipes';
import { styled } from 'leather-styles/jsx';
import { type ButtonVariantProps, button as buttonRecipe } from 'leather-styles/recipes';

const StyledButton = styled('button');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BoxProps, Flex } from '@stacks/ui';
import { forwardRefWithAs } from '@stacks/ui-core';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import type { Money } from '@shared/models/money.model';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FiInfo } from 'react-icons/fi';

import { Box, Flex, Stack, Tooltip, color } from '@stacks/ui';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

interface AssetCaptionProps {
caption: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Flex, StackProps } from '@stacks/ui';
import { forwardRefWithAs } from '@stacks/ui-core';
import { truncateMiddle } from '@stacks/ui-utils';
import { CryptoAssetSelectors } from '@tests/selectors/crypto-asset.selectors';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { CryptoCurrencies } from '@shared/models/currencies.model';
import { Money } from '@shared/models/money.model';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BoxProps } from '@stacks/ui';
import { forwardRefWithAs } from '@stacks/ui-core';
import { Flex, styled } from 'leaf-styles/jsx';
import { Flex, styled } from 'leather-styles/jsx';

import type { Money } from '@shared/models/money.model';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/disclaimer.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, BoxProps, styled } from 'leaf-styles/jsx';
import { Box, BoxProps, styled } from 'leather-styles/jsx';

import { openInNewTab } from '@app/common/utils/open-in-new-tab';

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/drawer/base-drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ReactNode, Suspense, memo, useCallback, useRef } from 'react';
import { useNavigate } from 'react-router-dom';

import { Box, Flex, FlexProps, transition, useEventListener } from '@stacks/ui';
import { css } from 'leaf-styles/css';
import { token } from 'leaf-styles/tokens';
import { css } from 'leather-styles/css';
import { token } from 'leather-styles/tokens';

import { noop } from '@shared/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/drawer/components/drawer-header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, Flex } from '@stacks/ui';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';
import { useHover } from 'use-events';

import { ArrowLeftIcon } from '@app/components/icons/arrow-left-icon';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Grid, transition } from '@stacks/ui';
import { HomePageSelectors } from '@tests/selectors/home.selectors';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

interface HeaderActionButtonProps {
icon?: React.JSX.Element;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/edit-nonce-button.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BoxProps } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { Caption } from '@app/components/typography';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/generic-error/generic-error.layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ReactNode } from 'react';

import GenericError from '@assets/images/generic-error.png';
import { Box, Text, color } from '@stacks/ui';
import { Flex, FlexProps, HStack, styled } from 'leaf-styles/jsx';
import { Flex, FlexProps, HStack, styled } from 'leather-styles/jsx';

import { openInNewTab } from '@app/common/utils/open-in-new-tab';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/global-styles/global-styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { memo } from 'react';
import { Global, css } from '@emotion/react';
import { radixBaseCSS } from '@radix-ui/themes/styles.css';
import { CSSReset } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { fullPageStyles } from './full-page-styles';
import { popupCenterStyles } from './popup-center-styles';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/global-styles/hide-scrollbar.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { css } from 'leaf-styles/css';
import { css } from 'leather-styles/css';

export const hideScrollbarClassName = css({
'&::-webkit-scrollbar': {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/global-styles/radix-styles.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css } from '@emotion/react';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

export const radixStyles = css`
.radix-themes {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useLocation, useNavigate } from 'react-router-dom';
import { Box, Flex, FlexProps, IconButton, Stack, Text, useMediaQuery } from '@stacks/ui';
import { OnboardingSelectors } from '@tests/selectors/onboarding.selectors';
import { SettingsMenuSelectors } from '@tests/selectors/settings.selectors';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { BRANCH_NAME, COMMIT_SHA } from '@shared/environment';
import { RouteUrls } from '@shared/route-urls';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/hiro-wallet-logo.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { memo } from 'react';

import { Stack, StackProps, color } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { LeatherIcon } from './icons/leather-icon';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/icons/leather-lettermark.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

export function LeatherLettermark(props: React.ComponentProps<typeof styled.svg>) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/info-card/info-card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Flex, FlexProps, Stack, StackProps } from '@stacks/ui';
import { SharedComponentsSelectors } from '@tests/selectors/shared-component.selectors';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { isString } from '@shared/utils';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/info-label.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react';

import { Flex, FlexProps, Stack, styled } from 'leaf-styles/jsx';
import { Flex, FlexProps, Stack, styled } from 'leather-styles/jsx';

interface InfoLabelProps extends FlexProps {
children: ReactNode | undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/item-hover.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box, BoxProps, transition } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';
import { useFocus, useHover } from 'use-events';

function ItemHover({
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/json.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { bytesToHex } from '@stacks/common';
import { Box } from '@stacks/ui';
import { css } from 'leaf-styles/css';
import { css } from 'leather-styles/css';

import { isBigInt, isTypedArray } from '@shared/utils';

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/modal-header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { FiArrowLeft, FiX } from 'react-icons/fi';
import { useNavigate } from 'react-router-dom';

import { Box, IconButton } from '@stacks/ui';
import { Flex, styled } from 'leaf-styles/jsx';
import { token } from 'leaf-styles/tokens';
import { Flex, styled } from 'leather-styles/jsx';
import { token } from 'leather-styles/tokens';

import { RouteUrls } from '@shared/route-urls';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/network-mode-badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';

import { ChainID } from '@stacks/transactions';
import { Flex, FlexProps, Text } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { RouteUrls } from '@shared/route-urls';

Expand Down
2 changes: 1 addition & 1 deletion src/app/components/no-fees-warning-row.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChainID } from '@stacks/transactions';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { whenStacksChainId } from '@app/common/utils';
import { SpaceBetween } from '@app/components/layout/space-between';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/pill.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, BoxProps, styled } from 'leaf-styles/jsx';
import { Box, BoxProps, styled } from 'leather-styles/jsx';

import { Tooltip } from './tooltip';

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/request-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { FormEvent, useCallback, useState } from 'react';

import { Box, Input, Stack } from '@stacks/ui';
import { SettingsSelectors } from '@tests-legacy/integration/settings.selectors';
import { styled } from 'leaf-styles/jsx';
import { token } from 'leaf-styles/tokens';
import { styled } from 'leather-styles/jsx';
import { token } from 'leather-styles/tokens';

import { useAnalytics } from '@app/common/hooks/analytics/use-analytics';
import { useKeyActions } from '@app/common/hooks/use-key-actions';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/requester-flag.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { Favicon } from './favicon';
import { Flag } from './layout/flag';
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Box as RBox, Tabs as RTabs } from '@radix-ui/themes';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { capitalize } from '@app/common/utils';

Expand Down
4 changes: 2 additions & 2 deletions src/app/components/text-input-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Ref, useRef } from 'react';
import { Box, Flex, FlexProps, Input, Text, color } from '@stacks/ui';
import { SendCryptoAssetSelectors } from '@tests/selectors/send.selectors';
import { useField } from 'formik';
import { css } from 'leaf-styles/css';
import { token } from 'leaf-styles/tokens';
import { css } from 'leather-styles/css';
import { token } from 'leather-styles/tokens';

import { useShowFieldError } from '@app/common/form-utils';
import { capitalize } from '@app/common/utils';
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/warning-label.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ReactNode } from 'react';

import { Box, BoxProps } from '@stacks/ui';
import { styled } from 'leaf-styles/jsx';
import { token } from 'leaf-styles/tokens';
import { styled } from 'leather-styles/jsx';
import { token } from 'leather-styles/tokens';

import { AlertIcon } from './icons/alert-icon';
import { Flag } from './layout/flag';
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/add-network/add-network.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ChainID } from '@stacks/transactions';
import { Input, Stack } from '@stacks/ui';
import { NetworkSelectors } from '@tests-legacy/integration/network.selectors';
import { Formik } from 'formik';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { DefaultNetworkConfigurations } from '@shared/constants';
import { RouteUrls } from '@shared/route-urls';
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/bitcoin-choose-fee/bitcoin-choose-fee.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';

import { Box, Stack } from '@stacks/ui';
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

import { BtcFeeType } from '@shared/models/fees/bitcoin-fees.model';
import { Money } from '@shared/models/money.model';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Flex } from 'leaf-styles/jsx';
import { Flex } from 'leather-styles/jsx';

import { LoadingSpinner } from '@app/components/loading-spinner';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { styled } from 'leaf-styles/jsx';
import { styled } from 'leather-styles/jsx';

export function ChooseFeeSubtitle({ isSendingMax }: { isSendingMax: boolean }) {
const subtitle = isSendingMax ? (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useNavigate } from 'react-router-dom';

import { Box } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';

import { RouteUrls } from '@shared/route-urls';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ReactNode } from 'react';

import { Box, Button, Stack, Text } from '@stacks/ui';
import type { BoxProps } from '@stacks/ui';
import { token } from 'leaf-styles/tokens';
import { token } from 'leather-styles/tokens';
import { useHover } from 'use-events';

import { figmaTheme } from '@app/common/utils/figma-theme';
Expand Down
Loading

0 comments on commit 41752f6

Please sign in to comment.