Skip to content

Commit

Permalink
build: bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Majorfi committed Jan 12, 2024
1 parent f75c24a commit b9b87c3
Show file tree
Hide file tree
Showing 55 changed files with 3,215 additions and 1,999 deletions.
77 changes: 40 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@yearn-finance/web-lib",
"version": "3.0.86",
"version": "3.0.92",
"main": "./dist/index.js",
"types": "./dist/index.d.js",
"files": [
"."
],
"type": "module",
"engines": {
"node": ">=14"
"node": ">=18"
},
"scripts": {
"dev": "tsc --watch",
Expand All @@ -25,67 +25,70 @@
"export": "tsc && next build && next export -o ipfs"
},
"dependencies": {
"@babel/core": "^7.23.5",
"@commitlint/cli": "^18.4.3",
"@commitlint/config-conventional": "^18.4.3",
"@headlessui/react": "^1.7.17",
"@headlessui/react": "^1.7.18",
"@rainbow-me/rainbowkit": "^1.3.0",
"@react-hookz/web": "^23.1.0",
"@react-hookz/web": "^24.0.2",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"@total-typescript/ts-reset": "^0.5.1",
"@wagmi/chains": "1.8.0",
"@wagmi/core": "^1.4.7",
"axios": "^1.6.2",
"bun-types": "^1.0.15",
"@yearn-finance/web-lib": "^3.0.78",
"bun-types": "^1.0.22",
"dayjs": "^1.11.10",
"eslint-config-next": "^14.0.3",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-brackets": ">= 0.1.3",
"eslint-plugin-react-hooks": "^4.6.0",
"ethers": "5.7.2",
"eventemitter3": "^5.0.1",
"graphql": "^16.8.1",
"graphql-request": "^6.1.0",
"husky": "^8.0.3",
"lint-staged": "^15.1.0",
"next": "^14.0.3",
"nprogress": "^0.2.0",
"prettier": "^3.1.0",
"lint-staged": "^15.2.0",
"next": "^14.0.4",
"next-seo": "^6.4.0",
"prettier": "^3.1.1",
"react-hot-toast": "2.4.1",
"sass": "^1.69.5",
"sharp": "^0.33.0",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"tailwindcss": "^3.3.5",
"viem": "^1.19.11",
"react-paginate": "^8.2.0",
"sass": "^1.69.7",
"stylelint": "^16.1.0",
"tailwindcss": "^3.4.1",
"viem": "^1.19.9",
"wagmi": "^1.4.7",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/jest": "^29.5.10",
"@types/node": "^20.10.0",
"@babel/core": "^7.23.7",
"@commitlint/cli": "^18.4.4",
"@commitlint/config-conventional": "^18.4.4",
"@tailwindcss/typography": "^0.5.10",
"@types/jest": "^29.5.11",
"@types/node": "^20.11.0",
"@types/nprogress": "^0.2.3",
"@types/react": "^18.2.39",
"@types/react-dom": "^18.2.17",
"@typescript-eslint/eslint-plugin": "^6.13.1",
"@typescript-eslint/parser": "^6.13.1",
"@types/react": "^18.2.47",
"@types/react-dom": "^18.2.18",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"autoprefixer": "^10.4.16",
"axios": "^1.6.5",
"bump": "^0.2.5",
"eslint": "^8.55.0",
"eslint": "^8.56.0",
"eslint-config-next": "^14.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-brackets": ">= 0.1.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-tailwindcss": "^3.13.0",
"eslint-plugin-tailwindcss": "^3.13.1",
"eslint-plugin-unused-imports": "^3.0.0",
"graphql-request": "^6.1.0",
"husky": "^8.0.3",
"jest": "^29.7.0",
"postcss-nesting": "^12.0.1",
"nprogress": "^0.2.0",
"postcss-nesting": "^12.0.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"sharp": "^0.33.2",
"stylelint-config-standard": "^36.0.0",
"ts-jest": "^29.1.1",
"tsup": "^8.0.1",
"typescript": "^5.3.2"
"typescript": "^5.3.3"
},
"peerDependencies": {
"@rainbow-me/rainbowkit": "1.3.0",
Expand Down
1 change: 0 additions & 1 deletion src/components/AddressLike.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import {useEnsName} from 'wagmi';

import {cl} from '../utils/cl.js';
Expand Down
73 changes: 73 additions & 0 deletions src/components/AmountInput.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import {Renderable} from './Renderable.js';

import type {ReactElement} from 'react';
import type {TNormalizedBN} from '../utils/format.bigNumber.js';

type TAmountInputProps = {
amount: TNormalizedBN;
maxAmount?: TNormalizedBN;
maxLabel?: string;
label?: string;
placeholder?: string;
legend?: string | ReactElement;
error?: string;
disabled?: boolean;
loading?: boolean;
onAmountChange?: (amount: string) => void;
onLegendClick?: () => void;
onMaxClick?: () => void;
};

export function AmountInput({
amount,
maxAmount,
label,
placeholder,
legend,
error,
disabled,
loading,
onAmountChange,
onLegendClick,
onMaxClick
}: TAmountInputProps): ReactElement {
return (
<div className={'w-full'}>
{label && <p className={'mb-1 w-full truncate text-base text-neutral-600'}>{label}</p>}
<div className={'relative flex w-full items-center justify-center'}>
<input
className={`h-10 w-full p-2 font-mono text-base font-normal outline-none ${
maxAmount && !disabled ? 'pr-12' : null
} ${
error ? 'border border-solid border-[#EA5204] focus:border-[#EA5204]' : 'border-0 border-none'
} ${disabled ? 'bg-neutral-300 text-neutral-600' : 'bg-neutral-0'}`}
type={'text'}
autoComplete={'off'}
aria-label={label}
value={amount.normalized}
onChange={onAmountChange ? (e): void => onAmountChange(e.target.value) : undefined}
placeholder={loading ? '' : placeholder ?? '0'}
disabled={disabled}
/>
<Renderable shouldRender={!!maxAmount && !disabled}>
<button
onClick={onMaxClick ? (): void => onMaxClick() : undefined}
className={
'absolute right-2 ml-2 h-6 cursor-pointer border-none bg-neutral-900 px-2 py-1 text-xs text-neutral-0 transition-colors hover:bg-neutral-700'
}>
{'Max'}
</button>
</Renderable>
</div>
<Renderable shouldRender={!!error || !!legend}>
<legend
role={onLegendClick ? 'button' : 'text'}
onClick={onLegendClick}
suppressHydrationWarning
className={`mt-1 pl-1 text-xs md:mr-0 ${error ? 'text-[#EA5204]' : 'text-neutral-600'}`}>
{error ?? legend}
</legend>
</Renderable>
</div>
);
}
41 changes: 0 additions & 41 deletions src/components/Banner.tsx

This file was deleted.

Loading

0 comments on commit b9b87c3

Please sign in to comment.