diff --git a/packages/blockchain-ui/package.json b/packages/blockchain-ui/package.json index d327b83d3..f16864fc3 100644 --- a/packages/blockchain-ui/package.json +++ b/packages/blockchain-ui/package.json @@ -1,12 +1,12 @@ { "name": "blockchain-ui", - "version": "1.0.121-alpha", + "version": "1.0.0-alpha.31", "license": "MIT", "private": false, "description": "A component library for blockchain apps.", - "main": "./dist/index.js", - "module": "./dist/index.js", - "types": "./dist/index.d.ts", + "main": "dist/cjs/index.js", + "module": "dist/index.js", + "types": "dist/index.d.ts", "homepage": "https://www.blockchain-ui.com", "repository": { "type": "git", @@ -22,10 +22,6 @@ "bugs": { "url": "https://github.com/Blockchain-UI-Org/Library/issues" }, - "files": [ - "./dist", - "./Readme.md" - ], "dependencies": { "@mui/material": "^5.11.0", "@storybook/theming": "^6.5.14", @@ -67,7 +63,10 @@ "eject": "react-scripts eject", "storybook": "start-storybook -p 6006 -s public", "build-storybook": "build-storybook -s public", - "chromatic": "npx chromatic --project-token=486802020566" + "chromatic": "npx chromatic --project-token=486802020566", + "rollup": "rm -rf dist && rollup -c", + "post:rollup:build": "node ./scripts/frankBuild.js", + "rollup:build": "npm run rollup && npm run post:rollup:build" }, "eslintConfig": { "extends": [ @@ -111,6 +110,10 @@ "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0", "@iconify/react": "^4.0.1", + "@rollup/plugin-commonjs": "^24.0.1", + "@rollup/plugin-image": "^3.0.2", + "@rollup/plugin-node-resolve": "^15.0.1", + "@rollup/plugin-replace": "^5.0.2", "@skypack/package-check": "^0.2.2", "@storybook/addon-actions": "^6.5.13", "@storybook/addon-backgrounds": "^6.5.13", @@ -135,6 +138,7 @@ "@types/styled-components": "^5.1.26", "@types/tinycolor2": "^1.4.3", "@types/webfontloader": "^1.6.35", + "autoprefixer": "^10.4.13", "babel-plugin-macros": "^3.1.0", "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-named-exports-order": "^0.0.2", @@ -146,6 +150,12 @@ "prettier": "^2.8.0", "prop-types": "^15.8.1", "rimraf": "^4.1.2", + "rollup-plugin-copy": "^3.4.0", + "rollup-plugin-generate-package-json": "^3.2.0", + "rollup-plugin-peer-deps-external": "^2.2.4", + "rollup-plugin-postcss": "^4.0.2", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "^0.34.1", "storybook": "^6.5.13", "tsc-alias": "^1.8.2", "tsconfig-paths-webpack-plugin": "^4.0.0", diff --git a/packages/blockchain-ui/rollup.config.js b/packages/blockchain-ui/rollup.config.js new file mode 100644 index 000000000..7a0872e51 --- /dev/null +++ b/packages/blockchain-ui/rollup.config.js @@ -0,0 +1,170 @@ +import peerDepsExternal from "rollup-plugin-peer-deps-external"; +import resolve from "@rollup/plugin-node-resolve"; +import commonjs from "@rollup/plugin-commonjs"; +import typescript from "rollup-plugin-typescript2"; +import replace from "@rollup/plugin-replace"; +import { terser } from "rollup-plugin-terser"; +import { getFolders } from "./scripts/buildUtils"; +import generatePackageJson from "rollup-plugin-generate-package-json"; +import image from "@rollup/plugin-image"; +import postcss from "rollup-plugin-postcss"; +import copy from "rollup-plugin-copy"; +import autoprefixer from "autoprefixer"; +const fs = require("fs"); + +const glob = require("glob"); +const path = require("path"); + +const packageJson = require("./package.json"); + +const bundleCss = () => { + var config = []; + var files = glob.sync(path.resolve(__dirname, "**/*.css")); + console.log("files are .. ", files); + files.forEach((file) => { + var filename = file.substr(file.lastIndexOf("/") + 1, file.length).toLowerCase(); + console.log("filename is ", filename); + config.push( + postcss({ + include: file, + extract: path.resolve(`dist/${filename}`), + minimize: true, + }) + ); + }); + return config; +}; + +const plugins = [ + peerDepsExternal(), + resolve(), + replace({ + preventAssignment: true, + __IS_DEV__: process.env.NODE_ENV === "development", + }), + commonjs(), + typescript({ + tsconfig: "./tsconfig.json", + useTsconfigDeclarationDir: true, + tsconfigOverride: { + exclude: [ + "src/_mock/*", + "src/components/_mock/*", + ] + } + }), + // ...bundleCss(), + // css(), + postcss({ + extract: true, + minimize: true, + plugins: [autoprefixer()], + writeDefinitions: true, + module: true, + extensions: [".css"], + }), + // cssBundle(), + image(), + copy({ + targets: [ + { + src: "src/components/tailwind.css", + dest: "dist/components", + }, + { + src: "src/index.css", + dest: "dist/", + }, + ], + }), + // copy() + terser(), +]; +const subfolderPlugins = (folderName, subFolder, copyCSS = false) => [ + ...plugins, + // postcss({ + // include: subFolder ? `src/${subFolder}/${folderName}/style.css` : `src/${folderName}/style.css`, + // extract: resolve(subFolder ? `dist/${subFolder}/${folderName}/style.css` : `dist/${folderName}/style.css`,) + // }), + ...(copyCSS + ? [ + copy({ + targets: [ + { + src: subFolder ? `src/${subFolder}/${folderName}/style.css` : `src/${folderName}/style.css`, + dest: subFolder ? `dist/${subFolder}/${folderName}/` : `dist/${folderName}/`, + }, + ], + }), + ] + : []), + generatePackageJson({ + baseContents: { + name: subFolder ? `${packageJson.name}/${subFolder}/${folderName}` : `${packageJson.name}/${folderName}`, + private: true, + main: "../cjs/index.js", + module: "./index.js", + types: "./index.d.ts", + }, + }), +]; +const folderBuilds = (subFolder = "") => + getFolders(`./src${subFolder ? `/${subFolder}` : ""}`).map((folder) => { + if (fs.existsSync(subFolder ? `src/${subFolder}/${folder}/style.css` : `src/${folder}/style.css`)) { + return { + input: subFolder ? `src/${subFolder}/${folder}/index.ts` : `src/${folder}/index.ts`, + output: { + file: subFolder ? `dist/${subFolder}/${folder}/index.js` : `dist/${folder}/index.js`, + sourcemap: true, + exports: "named", + format: "esm", + }, + plugins: subfolderPlugins(folder, subFolder, true), + external: ["react", "react-dom", /\.css$/u], + }; + } + return { + input: subFolder ? `src/${subFolder}/${folder}/index.ts` : `src/${folder}/index.ts`, + output: { + file: subFolder ? `dist/${subFolder}/${folder}/index.js` : `dist/${folder}/index.js`, + sourcemap: true, + exports: "named", + format: "esm", + }, + plugins: subfolderPlugins(folder, subFolder, false), + external: ["react", "react-dom", /\.css$/u], + }; + }); + +export default [ + { + input: ["src/index.ts"], + output: [ + { + file: packageJson.module, + format: "esm", + sourcemap: true, + exports: "named", + }, + ], + plugins, + external: ["react", "react-dom", /\.css$/u], + }, + ...folderBuilds(""), + ...folderBuilds("components"), + { + input: ["src/index.ts"], + output: [ + { + file: packageJson.main, + format: "cjs", + sourcemap: true, + exports: "named", + }, + ], + plugins: [ + ...plugins, + ], + external: ["react", "react-dom", /\.css$/u], + }, +]; diff --git a/packages/blockchain-ui/scripts/buildUtils.js b/packages/blockchain-ui/scripts/buildUtils.js new file mode 100644 index 000000000..219d35cfd --- /dev/null +++ b/packages/blockchain-ui/scripts/buildUtils.js @@ -0,0 +1,31 @@ +const fs = require('fs'); +export const getFolders = (entry) => { + const dirs = fs.readdirSync(entry) + const dirsWithoutIndex = dirs.filter(name => name !== 'index.ts').filter(name => (!name.includes('.d.ts') && !name.includes('.css'))) + console.log('direcroty without index ', dirsWithoutIndex); + return dirsWithoutIndex +} + +export const getFiles = (entry, extensions = [], excludeExtensions = []) => { + let fileNames = []; + const dirs = fs.readdirSync(entry); + dirs.forEach((dir) => { + const path = `${entry}/${dir}`; + + if (fs.lstatSync(path).isDirectory()) { + fileNames = [ + ...fileNames, + ...getFiles(path, extensions, excludeExtensions), + ]; + + return; + } + + if (!excludeExtensions.some((exclude) => dir.endsWith(exclude)) + && extensions.some((ext) => dir.endsWith(ext)) + ) { + fileNames.push(path); + } + }); + return fileNames; +}; \ No newline at end of file diff --git a/packages/blockchain-ui/scripts/frankBuild.js b/packages/blockchain-ui/scripts/frankBuild.js new file mode 100644 index 000000000..c1d417413 --- /dev/null +++ b/packages/blockchain-ui/scripts/frankBuild.js @@ -0,0 +1,49 @@ +/* eslint-disable no-console */ +const { resolve, join, basename } = require('path'); +const { readFile, writeFile, copy } = require('fs-extra'); +const packagePath = process.cwd(); +const distPath = join(packagePath, './dist'); + +const writeJson = (targetPath, obj) => + writeFile(targetPath, JSON.stringify(obj, null, 2), 'utf8'); + +async function createPackageFile() { + const packageData = await readFile( + resolve(packagePath, './package.json'), + 'utf8' + ); + const { scripts, devDependencies, ...packageOthers } = + JSON.parse(packageData); + const newPackageData = { + ...packageOthers, + private: false, + typings: './index.d.ts', + main: './cjs/index.js', + module: './index.js', + }; + + const targetPath = resolve(distPath, './package.json'); + + await writeJson(targetPath, newPackageData); + console.log(`Created package.json in ${targetPath}`); +} + +async function includeFileInBuild(file) { + const sourcePath = resolve(packagePath, file); + const targetPath = resolve(distPath, basename(file)); + await copy(sourcePath, targetPath); + console.log(`Copied ${sourcePath} to ${targetPath}`); +} + +async function run() { + try { + await createPackageFile(); + await includeFileInBuild('./README.md'); + // await includeFileInBuild('../../LICENSE'); + } catch (err) { + console.error(err); + process.exit(1); + } +} + +run(); diff --git a/packages/blockchain-ui/src/components/alert/alert.stories.tsx b/packages/blockchain-ui/src/components/alert/alert.stories.tsx index 073697c5a..ce6080a1e 100755 --- a/packages/blockchain-ui/src/components/alert/alert.stories.tsx +++ b/packages/blockchain-ui/src/components/alert/alert.stories.tsx @@ -1,22 +1,23 @@ -import { Story, Meta } from '@storybook/react'; -import { Alert, AlertProps } from './alert'; +import React from 'react'; +import { Story, Meta } from "@storybook/react"; +import { Alert, AlertProps } from "./alert"; export default { component: Alert, - title: 'General/Alert', + title: "General/Alert", } as Meta; -const Template: Story = args => ( +const Template: Story = (args) => (
-
+
@@ -24,12 +25,12 @@ const Template: Story = args => ( export const InfoAlert = Template.bind({}); InfoAlert.args = { - message: 'You have 0 KSM in your wallet. You may want to deposit here.', - type: 'info', + message: "You have 0 KSM in your wallet. You may want to deposit here.", + type: "info", }; export const WarningAlert = Template.bind({}); WarningAlert.args = { - message: 'You have 0 BTC in your wallet. You may want to deposit here.', - type: 'error', + message: "You have 0 BTC in your wallet. You may want to deposit here.", + type: "error", }; diff --git a/packages/blockchain-ui/src/components/alert/alert.tsx b/packages/blockchain-ui/src/components/alert/alert.tsx index d16dbbfbb..cb34894c0 100755 --- a/packages/blockchain-ui/src/components/alert/alert.tsx +++ b/packages/blockchain-ui/src/components/alert/alert.tsx @@ -31,6 +31,4 @@ export const Alert: FC = ({ message, type = "info" }) => { ); -}; - -export default Alert; +}; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/alert/index.ts b/packages/blockchain-ui/src/components/alert/index.ts new file mode 100644 index 000000000..ab34032f1 --- /dev/null +++ b/packages/blockchain-ui/src/components/alert/index.ts @@ -0,0 +1 @@ +export * from './alert'; diff --git a/packages/blockchain-ui/src/components/button/index.tsx b/packages/blockchain-ui/src/components/button/button.tsx similarity index 97% rename from packages/blockchain-ui/src/components/button/index.tsx rename to packages/blockchain-ui/src/components/button/button.tsx index 0fe426ab5..d93d7b6cb 100644 --- a/packages/blockchain-ui/src/components/button/index.tsx +++ b/packages/blockchain-ui/src/components/button/button.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import './button.css'; +import './style.css'; interface ButtonProps { /** diff --git a/packages/blockchain-ui/src/components/button/index.ts b/packages/blockchain-ui/src/components/button/index.ts new file mode 100644 index 000000000..eaf5eea7f --- /dev/null +++ b/packages/blockchain-ui/src/components/button/index.ts @@ -0,0 +1 @@ +export * from './button'; diff --git a/packages/blockchain-ui/src/components/button/button.css b/packages/blockchain-ui/src/components/button/style.css similarity index 100% rename from packages/blockchain-ui/src/components/button/button.css rename to packages/blockchain-ui/src/components/button/style.css diff --git a/packages/blockchain-ui/src/components/charts/area/index.stories.tsx b/packages/blockchain-ui/src/components/charts/area/index.stories.tsx index b0d5d05eb..a68b650a5 100644 --- a/packages/blockchain-ui/src/components/charts/area/index.stories.tsx +++ b/packages/blockchain-ui/src/components/charts/area/index.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import { ComponentStory, ComponentMeta, Story } from "@storybook/react"; -import AreaChart, { AreaChartProps } from "."; +import { AreaChart, AreaChartProps } from "."; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export export default { diff --git a/packages/blockchain-ui/src/components/charts/area/index.tsx b/packages/blockchain-ui/src/components/charts/area/index.tsx index 5f59e2894..e085b3330 100644 --- a/packages/blockchain-ui/src/components/charts/area/index.tsx +++ b/packages/blockchain-ui/src/components/charts/area/index.tsx @@ -19,7 +19,7 @@ export interface AreaChartProps { currency?: CryptoSymbols; } -const LineChart: FC = ({ +const AreaChart: FC = ({ color = "blue", width = "100%", height = "100%", @@ -56,7 +56,7 @@ const LineChart: FC = ({ ); }; -export default LineChart; +export { AreaChart }; const Container = styled.div` color: white; diff --git a/packages/blockchain-ui/src/components/charts/candlestick/index.stories.tsx b/packages/blockchain-ui/src/components/charts/candlestick/index.stories.tsx index 1c3807e11..19ed5591e 100644 --- a/packages/blockchain-ui/src/components/charts/candlestick/index.stories.tsx +++ b/packages/blockchain-ui/src/components/charts/candlestick/index.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import { ComponentStory, ComponentMeta, Story } from "@storybook/react"; -import CandleStickChart, { ChartProps } from "."; +import { CandleStickChart, ChartProps } from "."; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export export default { diff --git a/packages/blockchain-ui/src/components/charts/candlestick/index.tsx b/packages/blockchain-ui/src/components/charts/candlestick/index.tsx index 65335caac..d31c72c16 100644 --- a/packages/blockchain-ui/src/components/charts/candlestick/index.tsx +++ b/packages/blockchain-ui/src/components/charts/candlestick/index.tsx @@ -19,7 +19,7 @@ export interface ChartProps { downwardsColor: string; } -const LineChart: FC = ({ +const CandleStickChart: FC = ({ width = "100%", height = "100%", chartData, @@ -27,7 +27,7 @@ const LineChart: FC = ({ upwardsColor = "#3C90EB", downwardsColor = "#DF7D46", }) => { - const theme = useTheme() + const theme = useTheme(); const chartOptions = merge(createBasicChartOptions(theme.components.Chart.common), { plotOptions: { candlestick: { @@ -42,18 +42,12 @@ const LineChart: FC = ({ return ( {currency && <CryptoIcon cryptoSymbol={currency} />}{" "} - + ); }; -export default LineChart; +export { CandleStickChart }; const Container = styled.div` color: white; diff --git a/packages/blockchain-ui/src/components/charts/line/index.stories.tsx b/packages/blockchain-ui/src/components/charts/line/index.stories.tsx index 833660161..342352701 100644 --- a/packages/blockchain-ui/src/components/charts/line/index.stories.tsx +++ b/packages/blockchain-ui/src/components/charts/line/index.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import { ComponentStory, ComponentMeta, Story } from "@storybook/react"; -import LineChart, { ChartProps } from "."; +import { LineChart, ChartProps } from "."; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export export default { diff --git a/packages/blockchain-ui/src/components/charts/line/index.tsx b/packages/blockchain-ui/src/components/charts/line/index.tsx index db92c8570..d24eeeaca 100644 --- a/packages/blockchain-ui/src/components/charts/line/index.tsx +++ b/packages/blockchain-ui/src/components/charts/line/index.tsx @@ -54,7 +54,7 @@ const LineChart: FC = ({ ); }; -export default LineChart; +export { LineChart }; const Container = styled.div` color: white; diff --git a/packages/blockchain-ui/src/components/charts/pie/index.stories.tsx b/packages/blockchain-ui/src/components/charts/pie/index.stories.tsx index 15e6ff795..f83f1255a 100644 --- a/packages/blockchain-ui/src/components/charts/pie/index.stories.tsx +++ b/packages/blockchain-ui/src/components/charts/pie/index.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import { ComponentMeta, Story } from "@storybook/react"; -import PieChart, { PieChartProps } from "."; +import { PieChart, PieChartProps } from "."; import { DefaultTheme } from "blockchain-ui/theme"; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export diff --git a/packages/blockchain-ui/src/components/charts/pie/index.tsx b/packages/blockchain-ui/src/components/charts/pie/index.tsx index 2ede1b2a5..e83b434bd 100644 --- a/packages/blockchain-ui/src/components/charts/pie/index.tsx +++ b/packages/blockchain-ui/src/components/charts/pie/index.tsx @@ -1,8 +1,6 @@ -import merge from "lodash/merge"; import React, { FC } from "react"; import ReactApexChart from "react-apexcharts"; import styled from "styled-components"; -import { ThemeInterface } from "blockchain-ui/theme"; import { fNumber } from "../../../utils/number"; @@ -65,7 +63,7 @@ const PieChart: FC = ({ diameter, chartData, chartColors }) => { ); }; -export default PieChart; +export { PieChart }; const Container = styled.div` display: flex; diff --git a/packages/blockchain-ui/src/components/doughnut/index.tsx b/packages/blockchain-ui/src/components/doughnut/index.ts similarity index 100% rename from packages/blockchain-ui/src/components/doughnut/index.tsx rename to packages/blockchain-ui/src/components/doughnut/index.ts diff --git a/packages/blockchain-ui/src/components/dropdown/index.tsx b/packages/blockchain-ui/src/components/dropdown/dropdown.tsx similarity index 76% rename from packages/blockchain-ui/src/components/dropdown/index.tsx rename to packages/blockchain-ui/src/components/dropdown/dropdown.tsx index f164f0325..2ac7347eb 100755 --- a/packages/blockchain-ui/src/components/dropdown/index.tsx +++ b/packages/blockchain-ui/src/components/dropdown/dropdown.tsx @@ -1,16 +1,16 @@ -import { useState, useRef, useEffect, memo, ReactNode, ReactElement, CSSProperties } from 'react'; -import styled, { css } from 'styled-components'; -import { useClickAway, useWindowSize } from 'react-use'; -import { motion, AnimatePresence } from 'framer-motion'; +import { useState, useRef, useEffect, memo, ReactNode, ReactElement, CSSProperties } from "react"; +import styled, { css } from "styled-components"; +import { useClickAway, useWindowSize } from "react-use"; +import { motion, AnimatePresence } from "framer-motion"; import { withTheme } from "blockchain-ui/theme"; -import { Icon } from '../icon/icon'; -import Image from '../image/image'; +import { Icon } from "../icon/icon"; +import { Image } from "../image/image"; interface InlineProps { - width?: CSSProperties['width']; - justifyContent?: CSSProperties['justifyContent']; - alignItems?: CSSProperties['alignItems']; + width?: CSSProperties["width"]; + justifyContent?: CSSProperties["justifyContent"]; + alignItems?: CSSProperties["alignItems"]; inset?: string; grow?: boolean; gap?: string; @@ -61,28 +61,28 @@ interface ItemProps extends HoverProps { minHeight: string; } - const Hover = css` background-color: ${withTheme(({ showHover, theme }) => - showHover ? theme.palette.default.bg : theme.palette.common.white)}; - border-top-right-radius: ${props => (props.first ? '10px' : '0px')}; - border-top-left-radius: ${props => (props.first ? '10px' : '0px')}; - border-bottom-right-radius: ${props => (props.last ? '10px' : '0px')}; - border-bottom-left-radius: ${props => (props.last ? '10px' : '0px')}; + showHover ? theme.palette.default.bg : theme.palette.common.white + )}; + border-top-right-radius: ${(props) => (props.first ? "10px" : "0px")}; + border-top-left-radius: ${(props) => (props.first ? "10px" : "0px")}; + border-bottom-right-radius: ${(props) => (props.last ? "10px" : "0px")}; + border-bottom-left-radius: ${(props) => (props.last ? "10px" : "0px")}; `; const Inline = styled.div` - width: ${props => props.width}; + width: ${(props) => props.width}; display: flex; flex-direction: row; - justify-content: ${props => props.justifyContent}; - align-items: ${props => props.alignItems}; - padding: ${props => props.inset || '0'}; + justify-content: ${(props) => props.justifyContent}; + align-items: ${(props) => props.alignItems}; + padding: ${(props) => props.inset || "0"}; > * { - flex-grow: ${props => (props.grow ? 1 : 0)}; + flex-grow: ${(props) => (props.grow ? 1 : 0)}; } > * + * { - margin-left: ${props => props.gap || '0px'}; + margin-left: ${(props) => props.gap || "0px"}; } `; @@ -94,12 +94,12 @@ const Wrapper = styled.div` const Display = styled(Inline)<{ withBorder: boolean; showShadow: boolean }>` background-color: ${withTheme(({ theme }) => theme.palette.info.bg)}; - border: ${withTheme(({ withBorder, theme }) => (withBorder ? `1px solid ${theme.palette.grey[300]}` : 'none'))}; + border: ${withTheme(({ withBorder, theme }) => (withBorder ? `1px solid ${theme.palette.grey[300]}` : "none"))}; border-radius: 100px; - box-shadow: ${withTheme(({ showShadow , theme}) => (showShadow ? theme.shadows.depth2 : 'none'))}; + box-shadow: ${withTheme(({ showShadow, theme }) => (showShadow ? theme.shadows.depth2 : "none"))}; cursor: pointer; &:hover { - background-color: ${withTheme(({theme}) => theme.palette.default.bg)}; + background-color: ${withTheme(({ theme }) => theme.palette.default.bg)}; } `; @@ -107,7 +107,7 @@ const Card = styled.div<{ position: Position }>` position: relative; background-color: ${withTheme(({ theme }) => theme.palette.common.white)}; border-radius: 12px; - box-shadow: ${withTheme(({theme}) => theme.shadows.depth1)}; + box-shadow: ${withTheme(({ theme }) => theme.shadows.depth1)}; `; const Options = styled(Card)<{ position: Position; minWidth: string }>` @@ -118,7 +118,7 @@ const Options = styled(Card)<{ position: Position; minWidth: string }>` `; const Item = styled(Inline)` - cursor: ${({ disabled }) => (disabled ? 'not-allowed' : 'pointer')}; + cursor: ${({ disabled }) => (disabled ? "not-allowed" : "pointer")}; color: ${withTheme(({ disabled, theme }) => (disabled ? theme.palette.grey[500] : theme.palette.default.color))}; min-height: ${({ minHeight }) => minHeight}; &:hover { @@ -126,7 +126,7 @@ const Item = styled(Inline)` } `; -const Dropdown = ({ +const DropdownElement = ({ renderLabel, initValue, options, @@ -138,8 +138,8 @@ const Dropdown = ({ showSelectedCheckMark = true, inset = true, isSelection = false, - itemsMinWidth = '10rem', - itemsMinHeight = '60px', + itemsMinWidth = "10rem", + itemsMinHeight = "60px", }: DropdownProps) => { const ref = useRef(null); const optionsRef = useRef(null); @@ -147,10 +147,10 @@ const Dropdown = ({ const [isOpen, setIsOpen] = useState(false); const [selected, setSelected] = useState(initValue || options[0]); const [position, setPosition] = useState({ - top: '-20000', - left: 'auto', - right: 'auto', - bottom: 'auto', + top: "-20000", + left: "auto", + right: "auto", + bottom: "auto", }); useEffect(() => { @@ -170,9 +170,9 @@ const Dropdown = ({ setPosition({ top: toTop ? `-${4 + optionsHeight}px` : `${wrapperHight + 4}px`, - right: toLeft ? 'auto' : '0', - left: toLeft ? '0' : 'auto', - bottom: 'auto', + right: toLeft ? "auto" : "0", + left: toLeft ? "0" : "auto", + bottom: "auto", }); } }, [width, height, isOpen]); @@ -187,7 +187,7 @@ const Dropdown = ({ const renderDisplayText = () => { const { label } = selected; - if (renderLabel && typeof renderLabel === 'function') { + if (renderLabel && typeof renderLabel === "function") { return renderLabel(selected); } return ( @@ -244,7 +244,7 @@ const Dropdown = ({ animate="open" exit="collapsed" variants={{ - open: { opacity: 1, height: 'auto' }, + open: { opacity: 1, height: "auto" }, collapsed: { opacity: 0, height: 0 }, }} transition={{ duration: 0.5, ease: [0.04, 0.62, 0.23, 0.98] }} @@ -258,7 +258,7 @@ const Dropdown = ({ justifyContent="space-between" alignItems="center" gap="0.5rem" - inset={inset ? '0.75rem 1.5rem' : ''} + inset={inset ? "0.75rem 1.5rem" : ""} disabled={option.disabled || false} onClick={() => clickItem(option)} first={i === 0} @@ -277,4 +277,4 @@ const Dropdown = ({ }; export type { DropdownOption, DropdownProps }; -export default memo(Dropdown) as typeof Dropdown; +export const Dropdown = memo(DropdownElement) as typeof DropdownElement; diff --git a/packages/blockchain-ui/src/components/dropdown/index.ts b/packages/blockchain-ui/src/components/dropdown/index.ts new file mode 100644 index 000000000..b96a997b0 --- /dev/null +++ b/packages/blockchain-ui/src/components/dropdown/index.ts @@ -0,0 +1 @@ +export * from './dropdown'; diff --git a/packages/blockchain-ui/src/components/finance/creditcards/index.tsx b/packages/blockchain-ui/src/components/finance/creditcards/index.tsx index 559374d3b..fdbb35e44 100644 --- a/packages/blockchain-ui/src/components/finance/creditcards/index.tsx +++ b/packages/blockchain-ui/src/components/finance/creditcards/index.tsx @@ -1,7 +1,6 @@ import React, { FC, useState } from "react"; import { Icon } from "@iconify/react"; import styled, { css } from "styled-components"; -import Image from "../../image/image"; import { withTheme, ThemeInterface } from "blockchain-ui/theme"; import { CryptoIcon } from "../../icon/icon"; import { CryptoSymbols } from "../../static/types"; diff --git a/packages/blockchain-ui/src/components/finance/index.ts b/packages/blockchain-ui/src/components/finance/index.ts new file mode 100644 index 000000000..f2166ee5d --- /dev/null +++ b/packages/blockchain-ui/src/components/finance/index.ts @@ -0,0 +1,2 @@ +export * from './creditcards'; +export * from './highlightCards'; diff --git a/packages/blockchain-ui/src/components/flex/index.tsx b/packages/blockchain-ui/src/components/flex/flex.tsx similarity index 95% rename from packages/blockchain-ui/src/components/flex/index.tsx rename to packages/blockchain-ui/src/components/flex/flex.tsx index 619f835ec..ed6df589e 100644 --- a/packages/blockchain-ui/src/components/flex/index.tsx +++ b/packages/blockchain-ui/src/components/flex/flex.tsx @@ -19,4 +19,4 @@ const Flex = styled.div` ${FlexBasicProperties} `; -export default Flex; +export { Flex }; diff --git a/packages/blockchain-ui/src/components/flex/index.ts b/packages/blockchain-ui/src/components/flex/index.ts new file mode 100644 index 000000000..ece6890a3 --- /dev/null +++ b/packages/blockchain-ui/src/components/flex/index.ts @@ -0,0 +1 @@ +export * from './flex'; diff --git a/packages/blockchain-ui/src/components/icon/icon.tsx b/packages/blockchain-ui/src/components/icon/icon.tsx index 0e262d599..639d8c314 100755 --- a/packages/blockchain-ui/src/components/icon/icon.tsx +++ b/packages/blockchain-ui/src/components/icon/icon.tsx @@ -1,6 +1,6 @@ import { FC } from 'react'; import { useTheme } from "blockchain-ui/theme"; -import Image from '../image/image'; +import { Image } from '../image/image'; import { CryptoSymbols } from '../static/types/crypto'; import { IconSizes } from '../static/types/icons'; // import { getIconSize } from 'theme/icons'; diff --git a/packages/blockchain-ui/src/components/icon/index.ts b/packages/blockchain-ui/src/components/icon/index.ts new file mode 100644 index 000000000..af77d84ef --- /dev/null +++ b/packages/blockchain-ui/src/components/icon/index.ts @@ -0,0 +1 @@ +export * from './icon'; diff --git a/packages/blockchain-ui/src/components/image/image.spec.tsx b/packages/blockchain-ui/src/components/image/image.spec.tsx index 236e9c834..a43371d77 100755 --- a/packages/blockchain-ui/src/components/image/image.spec.tsx +++ b/packages/blockchain-ui/src/components/image/image.spec.tsx @@ -1,7 +1,7 @@ import React from "react"; import { render, screen } from "@testing-library/react"; import "@testing-library/jest-dom"; -import Image from "./image"; +import { Image } from "./image"; import availableImages from "../static/images/index"; import { regularIcons } from "../static/images/icons/regular"; diff --git a/packages/blockchain-ui/src/components/image/image.stories.tsx b/packages/blockchain-ui/src/components/image/image.stories.tsx index b78022494..98525b5b7 100755 --- a/packages/blockchain-ui/src/components/image/image.stories.tsx +++ b/packages/blockchain-ui/src/components/image/image.stories.tsx @@ -1,7 +1,7 @@ import { ReactElement } from 'react'; import { Story, Meta } from '@storybook/react'; import styled from 'styled-components'; -import Image, { ImageProps } from './image'; +import { Image, ImageProps } from './image'; import * as crowdloanBanner from '../static/images/icons/regular/apps.svg'; export default { diff --git a/packages/blockchain-ui/src/components/image/image.tsx b/packages/blockchain-ui/src/components/image/image.tsx index 852623116..79aa07fc9 100755 --- a/packages/blockchain-ui/src/components/image/image.tsx +++ b/packages/blockchain-ui/src/components/image/image.tsx @@ -53,4 +53,4 @@ export const RoundImage = styled(Image)` border-radius: 50%; `; -export default Image; +export { Image }; diff --git a/packages/blockchain-ui/src/components/image/index.ts b/packages/blockchain-ui/src/components/image/index.ts new file mode 100644 index 000000000..cf09068aa --- /dev/null +++ b/packages/blockchain-ui/src/components/image/index.ts @@ -0,0 +1 @@ +export * from './image'; diff --git a/packages/blockchain-ui/src/components/index.ts b/packages/blockchain-ui/src/components/index.ts index e321c04ee..dd3e747e2 100644 --- a/packages/blockchain-ui/src/components/index.ts +++ b/packages/blockchain-ui/src/components/index.ts @@ -1,3 +1,25 @@ +export * from "./alert"; +export * from "./cryptoinput"; +export * from "./doughnut"; +export * from "./dropdown"; +export * from "./finance"; +export * from "./flex"; +export * from "./icon"; +export * from "./image"; +export * from "./input"; +export * from "./layout"; +export * from "./loadingSpinner"; +export * from "./menu"; +export * from "./nftCard"; +export * from "./notification"; +export * from "./numberInput"; +export * from "./pagination"; +export * from "./progressBar"; +export * from "./tabSwitcher"; +export * from "./table"; +export * from "./tableV2"; +export * from "./tag"; +export * from "./typography"; export * from "./button"; export * from "./charts"; export * from "./input/input"; diff --git a/packages/blockchain-ui/src/components/input/index.ts b/packages/blockchain-ui/src/components/input/index.ts new file mode 100644 index 000000000..e3365cb90 --- /dev/null +++ b/packages/blockchain-ui/src/components/input/index.ts @@ -0,0 +1 @@ +export * from './input'; diff --git a/packages/blockchain-ui/src/components/label/index.ts b/packages/blockchain-ui/src/components/label/index.ts new file mode 100644 index 000000000..301fbded1 --- /dev/null +++ b/packages/blockchain-ui/src/components/label/index.ts @@ -0,0 +1 @@ +export * from './label'; diff --git a/packages/blockchain-ui/src/components/label/index.tsx b/packages/blockchain-ui/src/components/label/label.tsx similarity index 99% rename from packages/blockchain-ui/src/components/label/index.tsx rename to packages/blockchain-ui/src/components/label/label.tsx index 78b5e6b88..d792e3178 100644 --- a/packages/blockchain-ui/src/components/label/index.tsx +++ b/packages/blockchain-ui/src/components/label/label.tsx @@ -103,7 +103,7 @@ interface Props extends BoxProps { variant?: LabelVariant; } -export default function Label({ +export function Label({ children, color = "default", variant = "ghost", diff --git a/packages/blockchain-ui/src/components/loadingSpinner/index.ts b/packages/blockchain-ui/src/components/loadingSpinner/index.ts new file mode 100644 index 000000000..f932ce5f1 --- /dev/null +++ b/packages/blockchain-ui/src/components/loadingSpinner/index.ts @@ -0,0 +1 @@ +export * from "./loadingSpinner"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.spec.tsx b/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.spec.tsx index 7251dce29..4a055f343 100755 --- a/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.spec.tsx +++ b/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.spec.tsx @@ -1,6 +1,7 @@ +import React from 'react'; import { render } from '@testing-library/react'; -import LoadingSpinner from './loadingSpinner'; +import { LoadingSpinner } from './loadingSpinner'; describe('LoadingSpinner', () => { it('should render successfully', () => { diff --git a/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.tsx b/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.tsx index 8120a5e20..55c5f21fe 100755 --- a/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.tsx +++ b/packages/blockchain-ui/src/components/loadingSpinner/loadingSpinner.tsx @@ -1,7 +1,7 @@ import { FC } from 'react'; import styled, { keyframes } from 'styled-components'; -import Image from '../image/image'; +import { Image } from '../image/image'; export interface LoadingSpinnerProps { width?: string; @@ -24,5 +24,3 @@ const Circle = styled(Image)` export const LoadingSpinner: FC = ({ width }) => { return ; }; - -export default LoadingSpinner; diff --git a/packages/blockchain-ui/src/components/menu/index.ts b/packages/blockchain-ui/src/components/menu/index.ts new file mode 100644 index 000000000..be3f5962f --- /dev/null +++ b/packages/blockchain-ui/src/components/menu/index.ts @@ -0,0 +1 @@ +export * from "./menu"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/menu/index.tsx b/packages/blockchain-ui/src/components/menu/menu.tsx similarity index 95% rename from packages/blockchain-ui/src/components/menu/index.tsx rename to packages/blockchain-ui/src/components/menu/menu.tsx index 34c6f2397..3d19f1279 100644 --- a/packages/blockchain-ui/src/components/menu/index.tsx +++ b/packages/blockchain-ui/src/components/menu/menu.tsx @@ -11,7 +11,7 @@ const Menu = () => { ); }; -export default Menu; +export { Menu }; const Wrapper = styled.div` width: 100%; diff --git a/packages/blockchain-ui/src/components/nftCard/index.stories.tsx b/packages/blockchain-ui/src/components/nftCard/index.stories.tsx index 23164efb0..a031daf10 100644 --- a/packages/blockchain-ui/src/components/nftCard/index.stories.tsx +++ b/packages/blockchain-ui/src/components/nftCard/index.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import { ComponentStory, ComponentMeta } from "@storybook/react"; -import NftCard from "."; +import { NftCard } from "."; import styled from "styled-components"; // More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export diff --git a/packages/blockchain-ui/src/components/nftCard/index.ts b/packages/blockchain-ui/src/components/nftCard/index.ts new file mode 100644 index 000000000..1022d778a --- /dev/null +++ b/packages/blockchain-ui/src/components/nftCard/index.ts @@ -0,0 +1 @@ +export * from "./nftCard"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/nftCard/index.tsx b/packages/blockchain-ui/src/components/nftCard/nftCard.tsx similarity index 96% rename from packages/blockchain-ui/src/components/nftCard/index.tsx rename to packages/blockchain-ui/src/components/nftCard/nftCard.tsx index b3a725ba5..72ef082ac 100644 --- a/packages/blockchain-ui/src/components/nftCard/index.tsx +++ b/packages/blockchain-ui/src/components/nftCard/nftCard.tsx @@ -15,7 +15,7 @@ const NftCard: FC = ({ src, size }) => { ); }; -export default NftCard; +export { NftCard }; const Container = styled.div` color: white; @@ -25,7 +25,6 @@ const Container = styled.div` border-radius: 15px; overflow: hidden; margin: 10px 15px; - `; interface ImageProps { diff --git a/packages/blockchain-ui/src/components/notification/index.ts b/packages/blockchain-ui/src/components/notification/index.ts new file mode 100644 index 000000000..eed2a0ba5 --- /dev/null +++ b/packages/blockchain-ui/src/components/notification/index.ts @@ -0,0 +1 @@ +export * from "./notification"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/notification/notification.tsx b/packages/blockchain-ui/src/components/notification/notification.tsx index 1513e6ec3..2a5b38efe 100755 --- a/packages/blockchain-ui/src/components/notification/notification.tsx +++ b/packages/blockchain-ui/src/components/notification/notification.tsx @@ -2,7 +2,7 @@ import { FunctionComponent } from "react"; import styled, { css } from "styled-components"; import { withTheme } from "blockchain-ui/theme"; -import Image from "../image/image"; +import { Image } from "../image/image"; import { regularIcons } from "../static/images/icons/regular/index"; type NotificationType = "loading" | "positive" | "negative"; diff --git a/packages/blockchain-ui/src/components/numberInput/index.ts b/packages/blockchain-ui/src/components/numberInput/index.ts new file mode 100644 index 000000000..39abe6ddd --- /dev/null +++ b/packages/blockchain-ui/src/components/numberInput/index.ts @@ -0,0 +1 @@ +export * from "./numberInput"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/pagination/Styled.ts b/packages/blockchain-ui/src/components/pagination/Styled.ts index 386be4d96..b1b40e29e 100644 --- a/packages/blockchain-ui/src/components/pagination/Styled.ts +++ b/packages/blockchain-ui/src/components/pagination/Styled.ts @@ -1,4 +1,4 @@ -import Flex from "../flex"; +import { Flex } from "../flex/flex"; import styled from "styled-components"; import { withTheme } from "blockchain-ui/theme"; diff --git a/packages/blockchain-ui/src/components/pagination/index.ts b/packages/blockchain-ui/src/components/pagination/index.ts new file mode 100644 index 000000000..d6a200277 --- /dev/null +++ b/packages/blockchain-ui/src/components/pagination/index.ts @@ -0,0 +1 @@ +export * from "./pagination"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/pagination/index.tsx b/packages/blockchain-ui/src/components/pagination/index.tsx deleted file mode 100644 index 3c003d5dc..000000000 --- a/packages/blockchain-ui/src/components/pagination/index.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import React, { FC } from 'react' -import { PageButton, Pagination } from './Styled' - -export interface PaginationProps { - pageNumber: number - setPageNumber: (i: number) => void - totalPageCount?: number - hasNext?: boolean - hasPrev?: boolean -} - -const PaginationV2: FC = ({ - pageNumber, - setPageNumber, - totalPageCount, - hasPrev, - hasNext, -}) => { - return ( - -
hasPrev && setPageNumber(pageNumber - 1)} - > - {'<'} Prev -
- {/* - {pageNumber + 1} - */} - -
- hasNext && setPageNumber(pageNumber + 1) - } - > - Next {'>'} -
-
- ) -} - -export default PaginationV2 diff --git a/packages/blockchain-ui/src/components/pagination/pagination.tsx b/packages/blockchain-ui/src/components/pagination/pagination.tsx new file mode 100644 index 000000000..8de0932b5 --- /dev/null +++ b/packages/blockchain-ui/src/components/pagination/pagination.tsx @@ -0,0 +1,29 @@ +import React, { FC } from "react"; +import { Pagination } from "./Styled"; + +export interface PaginationProps { + pageNumber: number; + setPageNumber: (i: number) => void; + totalPageCount?: number; + hasNext?: boolean; + hasPrev?: boolean; +} + +const PaginationV2: FC = ({ pageNumber, setPageNumber, totalPageCount, hasPrev, hasNext }) => { + return ( + +
hasPrev && setPageNumber(pageNumber - 1)}> + {"<"} Prev +
+ {/* + {pageNumber + 1} + */} + +
hasNext && setPageNumber(pageNumber + 1)}> + Next {">"} +
+
+ ); +}; + +export { PaginationV2 }; diff --git a/packages/blockchain-ui/src/components/progressBar/index.tsx b/packages/blockchain-ui/src/components/progressBar/index.ts similarity index 100% rename from packages/blockchain-ui/src/components/progressBar/index.tsx rename to packages/blockchain-ui/src/components/progressBar/index.ts diff --git a/packages/blockchain-ui/src/components/static/index.ts b/packages/blockchain-ui/src/components/static/index.ts new file mode 100644 index 000000000..fcb073fef --- /dev/null +++ b/packages/blockchain-ui/src/components/static/index.ts @@ -0,0 +1 @@ +export * from './types'; diff --git a/packages/blockchain-ui/src/components/tabSwitcher/index.ts b/packages/blockchain-ui/src/components/tabSwitcher/index.ts new file mode 100644 index 000000000..e81ad1e85 --- /dev/null +++ b/packages/blockchain-ui/src/components/tabSwitcher/index.ts @@ -0,0 +1,2 @@ +export * from "./tab"; +export * from "./tabSwitcher"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/tableV2/index.stories.tsx b/packages/blockchain-ui/src/components/tableV2/index.stories.tsx index d33298c80..82422f2bd 100644 --- a/packages/blockchain-ui/src/components/tableV2/index.stories.tsx +++ b/packages/blockchain-ui/src/components/tableV2/index.stories.tsx @@ -1,6 +1,6 @@ import React from "react"; import { ComponentStory, ComponentMeta } from "@storybook/react"; -import Table from "."; +import { TableComponent as Table } from "."; import { _appInvoices } from "../_mock"; import styled from "styled-components"; diff --git a/packages/blockchain-ui/src/components/tableV2/index.ts b/packages/blockchain-ui/src/components/tableV2/index.ts new file mode 100644 index 000000000..f352a726c --- /dev/null +++ b/packages/blockchain-ui/src/components/tableV2/index.ts @@ -0,0 +1 @@ +export * from "./tableV2"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/components/tableV2/index.tsx b/packages/blockchain-ui/src/components/tableV2/tableV2.tsx similarity index 96% rename from packages/blockchain-ui/src/components/tableV2/index.tsx rename to packages/blockchain-ui/src/components/tableV2/tableV2.tsx index 448afdccf..b3bd8ccf7 100644 --- a/packages/blockchain-ui/src/components/tableV2/index.tsx +++ b/packages/blockchain-ui/src/components/tableV2/tableV2.tsx @@ -10,7 +10,7 @@ import { Box, Button, Card, CardHeader, CardProps, Divider } from "@mui/material import TableHeadCustom from "./tableHeadCustom"; import { Icon as Iconify } from "@iconify/react"; import { fCurrency } from "../../utils/number"; -import Label from "../label"; +import { Label } from "../label/label"; // import palette from "theme/palette"; export type RowProps = { @@ -28,7 +28,7 @@ interface Props extends CardProps { tableLabels: any; } -export default function TableComponent({ title, subheader, tableData, tableLabels, ...other }: Props) { +export function TableComponent({ title, subheader, tableData, tableLabels, ...other }: Props) { return ( diff --git a/packages/blockchain-ui/src/components/tag/index.ts b/packages/blockchain-ui/src/components/tag/index.ts new file mode 100644 index 000000000..219d72b8c --- /dev/null +++ b/packages/blockchain-ui/src/components/tag/index.ts @@ -0,0 +1 @@ +export * from "./tag"; diff --git a/packages/blockchain-ui/src/hooks/index.ts b/packages/blockchain-ui/src/hooks/index.ts new file mode 100644 index 000000000..0d49bba58 --- /dev/null +++ b/packages/blockchain-ui/src/hooks/index.ts @@ -0,0 +1,3 @@ +import useResponsive from "./useResponsive"; + +export default useResponsive; diff --git a/packages/blockchain-ui/src/index.css b/packages/blockchain-ui/src/index.css index e9b3b506a..f337e62cd 100644 --- a/packages/blockchain-ui/src/index.css +++ b/packages/blockchain-ui/src/index.css @@ -1,5 +1,6 @@ @import url(//fonts.googleapis.com/css?family=Public+Sans); @import url("https://fonts.cdnfonts.com/css/circular-std"); +@import "./components/button/style.css"; @font-face { font-family: "CircularStd"; diff --git a/packages/blockchain-ui/src/index.tsx b/packages/blockchain-ui/src/index.ts similarity index 56% rename from packages/blockchain-ui/src/index.tsx rename to packages/blockchain-ui/src/index.ts index e2161b405..7cf2fa075 100644 --- a/packages/blockchain-ui/src/index.tsx +++ b/packages/blockchain-ui/src/index.ts @@ -1 +1,2 @@ +import "./index.css"; export * from "./components"; \ No newline at end of file diff --git a/packages/blockchain-ui/src/scroll/index.ts b/packages/blockchain-ui/src/scroll/index.ts new file mode 100644 index 000000000..67fbfe31d --- /dev/null +++ b/packages/blockchain-ui/src/scroll/index.ts @@ -0,0 +1,2 @@ +import scroll from "./scroll"; +export default scroll; diff --git a/packages/blockchain-ui/src/scroll/index.tsx b/packages/blockchain-ui/src/scroll/scroll.tsx similarity index 100% rename from packages/blockchain-ui/src/scroll/index.tsx rename to packages/blockchain-ui/src/scroll/scroll.tsx diff --git a/packages/blockchain-ui/tsconfig.json b/packages/blockchain-ui/tsconfig.json index a17e00083..3dac06868 100644 --- a/packages/blockchain-ui/tsconfig.json +++ b/packages/blockchain-ui/tsconfig.json @@ -1,25 +1,36 @@ { "extends": "../../tsconfig", "compilerOptions": { - "target": "es5", - "declaration": true, - "emitDeclarationOnly": true, - "outDir": "./dist", - "rootDir": "./src", - "lib": ["dom", "dom.iterable", "esnext"], + "target": "es6", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "rootDir": "src", "allowJs": true, + "declaration": true, + "declarationDir": "dist", + "sourceMap": true, "skipLibCheck": true, "esModuleInterop": true, - "noEmit": false, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, + "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, + "noEmit": true, "jsx": "react-jsx" }, - "include": ["src"], - "exclude": ["**/**/*.stories.tsx"], + "include": ["src/**/*", "index.ts"], + "exclude": [ + "node_modules", + "build", + "src/**/*.stories.tsx", + "src/**/*.test.tsx", + "src/**/*.spec.tsx", + ] } diff --git a/yarn.lock b/yarn.lock index f64ee1d96..bc8f22a81 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2484,7 +2484,7 @@ "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": +"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== @@ -3741,6 +3741,26 @@ "@babel/helper-module-imports" "^7.10.4" "@rollup/pluginutils" "^3.1.0" +"@rollup/plugin-commonjs@^24.0.1": + version "24.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.1.tgz#d54ba26a3e3c495dc332bd27a81f7e9e2df46f90" + integrity sha512-15LsiWRZk4eOGqvrJyu3z3DaBu5BhXIMeWnijSRvd8irrrg9SHpQ1pH+BUK4H6Z9wL9yOxZJMTLU+Au86XHxow== + dependencies: + "@rollup/pluginutils" "^5.0.1" + commondir "^1.0.1" + estree-walker "^2.0.2" + glob "^8.0.3" + is-reference "1.2.1" + magic-string "^0.27.0" + +"@rollup/plugin-image@^3.0.2": + version "3.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-image/-/plugin-image-3.0.2.tgz#8a66389510517495c5d10d392140cdefa43b27c2" + integrity sha512-eGVrD6lummWH5ENo9LWX3JY62uBb9okUNQ2htXkugrG6WjACrMUVhWvss+0wW3fwJWmFYpoEny3yL4spEdh15g== + dependencies: + "@rollup/pluginutils" "^5.0.1" + mini-svg-data-uri "^1.4.4" + "@rollup/plugin-node-resolve@^11.2.1": version "11.2.1" resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz#82aa59397a29cd4e13248b106e6a4a1880362a60" @@ -3753,6 +3773,18 @@ is-module "^1.0.0" resolve "^1.19.0" +"@rollup/plugin-node-resolve@^15.0.1": + version "15.0.1" + resolved "https://registry.yarnpkg.com/@rollup/plugin-node-resolve/-/plugin-node-resolve-15.0.1.tgz#72be449b8e06f6367168d5b3cd5e2802e0248971" + integrity sha512-ReY88T7JhJjeRVbfCyNj+NXAG3IIsVMsX9b5/9jC98dRP8/yxlZdz7mHZbHk5zHr24wZZICS5AcXsFZAXYUQEg== + dependencies: + "@rollup/pluginutils" "^5.0.1" + "@types/resolve" "1.20.2" + deepmerge "^4.2.2" + is-builtin-module "^3.2.0" + is-module "^1.0.0" + resolve "^1.22.1" + "@rollup/plugin-replace@^2.4.1": version "2.4.2" resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz#a2d539314fbc77c244858faa523012825068510a" @@ -3761,6 +3793,14 @@ "@rollup/pluginutils" "^3.1.0" magic-string "^0.25.7" +"@rollup/plugin-replace@^5.0.2": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-replace/-/plugin-replace-5.0.2.tgz#45f53501b16311feded2485e98419acb8448c61d" + integrity sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA== + dependencies: + "@rollup/pluginutils" "^5.0.1" + magic-string "^0.27.0" + "@rollup/pluginutils@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b" @@ -3770,6 +3810,23 @@ estree-walker "^1.0.1" picomatch "^2.2.2" +"@rollup/pluginutils@^4.1.2": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-4.2.1.tgz#e6c6c3aba0744edce3fb2074922d3776c0af2a6d" + integrity sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ== + dependencies: + estree-walker "^2.0.1" + picomatch "^2.2.2" + +"@rollup/pluginutils@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-5.0.2.tgz#012b8f53c71e4f6f9cb317e311df1404f56e7a33" + integrity sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^2.0.2" + picomatch "^2.3.1" + "@rushstack/eslint-patch@^1.1.0": version "1.2.0" resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.2.0.tgz#8be36a1f66f3265389e90b5f9c9962146758f728" @@ -5303,7 +5360,7 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*": +"@types/estree@*", "@types/estree@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== @@ -5337,6 +5394,13 @@ "@types/qs" "*" "@types/serve-static" "*" +"@types/fs-extra@^8.0.1": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.2.tgz#7125cc2e4bdd9bd2fc83005ffdb1d0ba00cca61f" + integrity sha512-SvSrYXfWSc7R4eqnOzbQF4TZmfpNSM9FrSWLU3EUnWBuyZqNBOrv1B1JA3byUDPUl9z4Ab3jeZG2eDdySlgNMg== + dependencies: + "@types/node" "*" + "@types/glob@*": version "8.0.1" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.0.1.tgz#6e3041640148b7764adf21ce5c7138ad454725b0" @@ -5662,6 +5726,11 @@ dependencies: "@types/node" "*" +"@types/resolve@1.20.2": + version "1.20.2" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.2.tgz#97d26e00cd4a0423b4af620abecf3e6f442b7975" + integrity sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q== + "@types/responselike@^1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" @@ -7575,7 +7644,7 @@ buffer@^5.5.0: base64-js "^1.3.1" ieee754 "^1.1.13" -builtin-modules@^3.1.0: +builtin-modules@^3.1.0, builtin-modules@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-3.3.0.tgz#cae62812b89801e9656336e46223e030386be7b6" integrity sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw== @@ -8250,7 +8319,7 @@ colord@^2.9.1: resolved "https://registry.yarnpkg.com/colord/-/colord-2.9.3.tgz#4f8ce919de456f1d5c1c368c307fe20f3e59fb43" integrity sha512-jeC1axXpnb0/2nn/Y1LPuLdgXBLH7aDcHu4KEKfqw3CUhX7ZpfBSlPKyqXE6btIgEzfWtrX3/tyBCaCvXvMkOw== -colorette@^1.2.2: +colorette@^1.1.0, colorette@^1.2.2: version "1.4.0" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.4.0.tgz#5190fbb87276259a86ad700bff2c6d6faa3fca40" integrity sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g== @@ -8398,6 +8467,13 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" +concat-with-sourcemaps@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz#d4ea93f05ae25790951b99e7b3b09e3908a4082e" + integrity sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg== + dependencies: + source-map "^0.6.1" + config-chain@^1.1.12: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" @@ -9017,11 +9093,55 @@ cssnano-preset-default@^5.2.13: postcss-svgo "^5.1.0" postcss-unique-selectors "^5.1.1" +cssnano-preset-default@^5.2.14: + version "5.2.14" + resolved "https://registry.yarnpkg.com/cssnano-preset-default/-/cssnano-preset-default-5.2.14.tgz#309def4f7b7e16d71ab2438052093330d9ab45d8" + integrity sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A== + dependencies: + css-declaration-sorter "^6.3.1" + cssnano-utils "^3.1.0" + postcss-calc "^8.2.3" + postcss-colormin "^5.3.1" + postcss-convert-values "^5.1.3" + postcss-discard-comments "^5.1.2" + postcss-discard-duplicates "^5.1.0" + postcss-discard-empty "^5.1.1" + postcss-discard-overridden "^5.1.0" + postcss-merge-longhand "^5.1.7" + postcss-merge-rules "^5.1.4" + postcss-minify-font-values "^5.1.0" + postcss-minify-gradients "^5.1.1" + postcss-minify-params "^5.1.4" + postcss-minify-selectors "^5.2.1" + postcss-normalize-charset "^5.1.0" + postcss-normalize-display-values "^5.1.0" + postcss-normalize-positions "^5.1.1" + postcss-normalize-repeat-style "^5.1.1" + postcss-normalize-string "^5.1.0" + postcss-normalize-timing-functions "^5.1.0" + postcss-normalize-unicode "^5.1.1" + postcss-normalize-url "^5.1.0" + postcss-normalize-whitespace "^5.1.1" + postcss-ordered-values "^5.1.3" + postcss-reduce-initial "^5.1.2" + postcss-reduce-transforms "^5.1.0" + postcss-svgo "^5.1.0" + postcss-unique-selectors "^5.1.1" + cssnano-utils@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/cssnano-utils/-/cssnano-utils-3.1.0.tgz#95684d08c91511edfc70d2636338ca37ef3a6861" integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== +cssnano@^5.0.1: + version "5.1.15" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.15.tgz#ded66b5480d5127fcb44dac12ea5a983755136bf" + integrity sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw== + dependencies: + cssnano-preset-default "^5.2.14" + lilconfig "^2.0.3" + yaml "^1.10.2" + cssnano@^5.0.6, cssnano@^5.1.12, cssnano@^5.1.8: version "5.1.14" resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-5.1.14.tgz#07b0af6da73641276fe5a6d45757702ebae2eb05" @@ -10230,11 +10350,21 @@ estree-to-babel@^3.1.0: "@babel/types" "^7.2.0" c8 "^7.6.0" +estree-walker@^0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-0.6.1.tgz#53049143f40c6eb918b23671d1fe3219f3a1b362" + integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== + estree-walker@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-1.0.1.tgz#31bc5d612c96b704106b477e6dd5d8aa138cb700" integrity sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg== +estree-walker@^2.0.1, estree-walker@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" + integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== + esutils@^2.0.2: version "2.0.3" resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" @@ -10478,7 +10608,7 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" -fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.2, fast-glob@^3.2.9: +fast-glob@^3.0.3, fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.2, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== @@ -10690,7 +10820,7 @@ find-cache-dir@^2.0.0, find-cache-dir@^2.1.0: make-dir "^2.0.0" pkg-dir "^3.0.0" -find-cache-dir@^3.3.1: +find-cache-dir@^3.3.1, find-cache-dir@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.2.tgz#b30c5b6eff0730731aea9bbd9dbecbd80256d64b" integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== @@ -10938,6 +11068,15 @@ fs-extra@^11.1.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^9.0.0, fs-extra@^9.0.1, fs-extra@^9.1.0: version "9.1.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" @@ -11042,6 +11181,13 @@ gauge@^4.0.3: strip-ansi "^6.0.1" wide-align "^1.1.5" +generic-names@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-4.0.0.tgz#0bd8a2fd23fe8ea16cbd0a279acd69c06933d9a3" + integrity sha512-ySFolZQfw9FoDb3ed9d80Cm9f0+r7qj+HJkWjeD9RBfpxEVTlVhol+gvaQB/78WbwYfbnNh8nWHHBSlg072y6A== + dependencies: + loader-utils "^3.2.0" + gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" @@ -11301,6 +11447,20 @@ globalthis@^1.0.0, globalthis@^1.0.3: dependencies: define-properties "^1.1.3" +globby@10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-10.0.1.tgz#4782c34cb75dd683351335c5829cc3420e606b22" + integrity sha512-sSs4inE1FB2YQiymcmTv6NWENryABjUNPeWhOvmn4SjtKybglsyPZxFB3U1/+L1bYi0rNZDqCLlHyLYDl1Pq5A== + dependencies: + "@types/glob" "^7.1.1" + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.0.3" + glob "^7.1.3" + ignore "^5.1.1" + merge2 "^1.2.3" + slash "^3.0.0" + globby@^11.0.1, globby@^11.0.2, globby@^11.0.4, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -11939,6 +12099,11 @@ iconv-lite@^0.6.2, iconv-lite@^0.6.3: dependencies: safer-buffer ">= 2.1.2 < 3.0.0" +icss-replace-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" + integrity sha512-chIaY3Vh2mh2Q3RGXttaDIzeiPvaVXJ+C4DAh/w3c37SKZ/U6PGMmuicR2EQQp9bKG8zLMCl7I+PtIoOOPp8Gg== + icss-utils@^4.0.0, icss-utils@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/icss-utils/-/icss-utils-4.1.1.tgz#21170b53789ee27447c2f47dd683081403f9a467" @@ -11985,7 +12150,7 @@ ignore@^4.0.3: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.4, ignore@^5.2.0: +ignore@^5.0.4, ignore@^5.1.1, ignore@^5.2.0: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -12002,6 +12167,13 @@ immer@^9.0.7: resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.19.tgz#67fb97310555690b5f9cd8380d38fc0aabb6b38b" integrity sha512-eY+Y0qcsB4TZKwgQzLaE/lqYMlKhv5J9dyd2RhhtGhNo2njPXDqU9XPfcNfa3MIDsdtZt5KlkIsirlo4dHsWdQ== +import-cwd@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-cwd/-/import-cwd-3.0.0.tgz#20845547718015126ea9b3676b7592fb8bd4cf92" + integrity sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg== + dependencies: + import-from "^3.0.0" + import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" @@ -12010,6 +12182,13 @@ import-fresh@^3.0.0, import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3 parent-module "^1.0.0" resolve-from "^4.0.0" +import-from@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-from/-/import-from-3.0.0.tgz#055cfec38cd5a27d8057ca51376d7d3bf0891966" + integrity sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ== + dependencies: + resolve-from "^5.0.0" + import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43" @@ -12264,6 +12443,13 @@ is-buffer@^2.0.0: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== +is-builtin-module@^3.2.0: + version "3.2.1" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" + integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== + dependencies: + builtin-modules "^3.3.0" + is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.1.5, is-callable@^1.2.7: version "1.2.7" resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" @@ -12505,11 +12691,23 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-plain-object@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-3.0.1.tgz#662d92d24c0aa4302407b0d45d21f2251c85f85b" + integrity sha512-Xnpx182SBMrr/aBik8y+GuR4U1L9FqMSojwDQwPMmxyC6bvEqly9UBCxhauBF5vNh2gwWJNX6oDV7O+OM4z34g== + is-potential-custom-element-name@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== +is-reference@1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.2.1.tgz#8b2dac0b371f4bc994fdeaba9eb542d03002d0b7" + integrity sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ== + dependencies: + "@types/estree" "*" + is-regex@^1.1.2, is-regex@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" @@ -13565,6 +13763,13 @@ jsonc-parser@3.2.0: resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== + optionalDependencies: + graceful-fs "^4.1.6" + jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" @@ -13872,6 +14077,11 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +lodash.camelcase@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" + integrity sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA== + lodash.clone@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6" @@ -14088,6 +14298,13 @@ magic-string@^0.25.0, magic-string@^0.25.7: dependencies: sourcemap-codec "^1.4.8" +magic-string@^0.27.0: + version "0.27.0" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.27.0.tgz#e4a3413b4bab6d98d2becffd48b4a257effdbbf3" + integrity sha512-8UnnX2PeRAPZuN12svgR9j7M1uWMovg/CEnIwIG0LFkXSJJe4PdfUGiTGl8V9bsBHFUtfVINcSyYxd7q+kx9fA== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.13" + make-dir@^2.0.0, make-dir@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" @@ -14442,6 +14659,11 @@ mini-css-extract-plugin@^2.4.5, mini-css-extract-plugin@^2.6.1: dependencies: schema-utils "^4.0.0" +mini-svg-data-uri@^1.4.4: + version "1.4.4" + resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939" + integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -16020,6 +16242,16 @@ postcss-colormin@^5.3.0: colord "^2.9.1" postcss-value-parser "^4.2.0" +postcss-colormin@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-5.3.1.tgz#86c27c26ed6ba00d96c79e08f3ffb418d1d1988f" + integrity sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ== + dependencies: + browserslist "^4.21.4" + caniuse-api "^3.0.0" + colord "^2.9.1" + postcss-value-parser "^4.2.0" + postcss-convert-values@^5.1.3: version "5.1.3" resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-5.1.3.tgz#04998bb9ba6b65aa31035d669a6af342c5f9d393" @@ -16170,7 +16402,7 @@ postcss-lab-function@^4.2.1: "@csstools/postcss-progressive-custom-properties" "^1.1.0" postcss-value-parser "^4.2.0" -postcss-load-config@^3.1.4: +postcss-load-config@^3.0.0, postcss-load-config@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.4.tgz#1ab2571faf84bb078877e1d07905eabe9ebda855" integrity sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg== @@ -16243,6 +16475,16 @@ postcss-merge-rules@^5.1.3: cssnano-utils "^3.1.0" postcss-selector-parser "^6.0.5" +postcss-merge-rules@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-5.1.4.tgz#2f26fa5cacb75b1402e213789f6766ae5e40313c" + integrity sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g== + dependencies: + browserslist "^4.21.4" + caniuse-api "^3.0.0" + cssnano-utils "^3.1.0" + postcss-selector-parser "^6.0.5" + postcss-minify-font-values@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz#f1df0014a726083d260d3bd85d7385fb89d1f01b" @@ -16336,6 +16578,20 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" +postcss-modules@^4.0.0: + version "4.3.1" + resolved "https://registry.yarnpkg.com/postcss-modules/-/postcss-modules-4.3.1.tgz#517c06c09eab07d133ae0effca2c510abba18048" + integrity sha512-ItUhSUxBBdNamkT3KzIZwYNNRFKmkJrofvC2nWab3CPKhYBQ1f27XXh1PAPE27Psx58jeelPsxWB/+og+KEH0Q== + dependencies: + generic-names "^4.0.0" + icss-replace-symbols "^1.1.0" + lodash.camelcase "^4.3.0" + postcss-modules-extract-imports "^3.0.0" + postcss-modules-local-by-default "^4.0.0" + postcss-modules-scope "^3.0.0" + postcss-modules-values "^4.0.0" + string-hash "^1.1.1" + postcss-nested@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-6.0.0.tgz#1572f1984736578f360cffc7eb7dca69e30d1735" @@ -16532,6 +16788,14 @@ postcss-reduce-initial@^5.1.1: browserslist "^4.21.4" caniuse-api "^3.0.0" +postcss-reduce-initial@^5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-5.1.2.tgz#798cd77b3e033eae7105c18c9d371d989e1382d6" + integrity sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg== + dependencies: + browserslist "^4.21.4" + caniuse-api "^3.0.0" + postcss-reduce-transforms@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz#333b70e7758b802f3dd0ddfe98bb1ccfef96b6e9" @@ -16778,6 +17042,11 @@ promise.prototype.finally@^3.1.0: define-properties "^1.1.4" es-abstract "^1.20.4" +promise.series@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/promise.series/-/promise.series-0.2.0.tgz#2cc7ebe959fc3a6619c04ab4dbdc9e452d864bbd" + integrity sha512-VWQJyU2bcDTgZw8kpfBpB/ejZASlCrzwz5f2hjb/zlujOEB4oeiAhHygAWq8ubsX2GVkD4kCU5V2dwOTaCY5EQ== + promise@^7.1.1, promise@^7.3.1: version "7.3.1" resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf" @@ -18005,7 +18274,50 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rollup-plugin-terser@^7.0.0: +rollup-plugin-copy@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-copy/-/rollup-plugin-copy-3.4.0.tgz#f1228a3ffb66ffad8606e2f3fb7ff23141ed3286" + integrity sha512-rGUmYYsYsceRJRqLVlE9FivJMxJ7X6jDlP79fmFkL8sJs7VVMSVyA2yfyL+PGyO/vJs4A87hwhgVfz61njI+uQ== + dependencies: + "@types/fs-extra" "^8.0.1" + colorette "^1.1.0" + fs-extra "^8.1.0" + globby "10.0.1" + is-plain-object "^3.0.0" + +rollup-plugin-generate-package-json@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/rollup-plugin-generate-package-json/-/rollup-plugin-generate-package-json-3.2.0.tgz#e9c1d358f2be6c58b49853af58205292d45a33ff" + integrity sha512-+Kq1kFVr+maxW/mZB+E+XuaieCXVZqjl2tNU9k3TtAMs3NOaeREa5sRHy67qKDmcnFtZZukIQ3dFCcnV+r0xyw== + dependencies: + read-pkg "^5.2.0" + write-pkg "^4.0.0" + +rollup-plugin-peer-deps-external@^2.2.4: + version "2.2.4" + resolved "https://registry.yarnpkg.com/rollup-plugin-peer-deps-external/-/rollup-plugin-peer-deps-external-2.2.4.tgz#8a420bbfd6dccc30aeb68c9bf57011f2f109570d" + integrity sha512-AWdukIM1+k5JDdAqV/Cxd+nejvno2FVLVeZ74NKggm3Q5s9cbbcOgUPGdbxPi4BXu7xGaZ8HG12F+thImYu/0g== + +rollup-plugin-postcss@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.2.tgz#15e9462f39475059b368ce0e49c800fa4b1f7050" + integrity sha512-05EaY6zvZdmvPUDi3uCcAQoESDcYnv8ogJJQRp6V5kZ6J6P7uAVJlrTZcaaA20wTH527YTnKfkAoPxWI/jPp4w== + dependencies: + chalk "^4.1.0" + concat-with-sourcemaps "^1.1.0" + cssnano "^5.0.1" + import-cwd "^3.0.0" + p-queue "^6.6.2" + pify "^5.0.0" + postcss-load-config "^3.0.0" + postcss-modules "^4.0.0" + promise.series "^0.2.0" + resolve "^1.19.0" + rollup-pluginutils "^2.8.2" + safe-identifier "^0.4.2" + style-inject "^0.3.0" + +rollup-plugin-terser@^7.0.0, rollup-plugin-terser@^7.0.2: version "7.0.2" resolved "https://registry.yarnpkg.com/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz#e8fbba4869981b2dc35ae7e8a502d5c6c04d324d" integrity sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ== @@ -18015,6 +18327,24 @@ rollup-plugin-terser@^7.0.0: serialize-javascript "^4.0.0" terser "^5.0.0" +rollup-plugin-typescript2@^0.34.1: + version "0.34.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.34.1.tgz#c457f155a71d133c142689213fce78694e30d0be" + integrity sha512-P4cHLtGikESmqi1CA+tdMDUv8WbQV48mzPYt77TSTOPJpERyZ9TXdDgjSDix8Fkqce6soYz3+fa4lrC93IEkcw== + dependencies: + "@rollup/pluginutils" "^4.1.2" + find-cache-dir "^3.3.2" + fs-extra "^10.0.0" + semver "^7.3.7" + tslib "^2.4.0" + +rollup-pluginutils@^2.8.2: + version "2.8.2" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz#72f2af0748b592364dbd3389e600e5a9444a351e" + integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== + dependencies: + estree-walker "^0.6.1" + rollup@^2.43.1: version "2.79.1" resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" @@ -18090,6 +18420,11 @@ safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== +safe-identifier@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/safe-identifier/-/safe-identifier-0.4.2.tgz#cf6bfca31c2897c588092d1750d30ef501d59fcb" + integrity sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w== + safe-regex-test@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" @@ -18968,6 +19303,11 @@ string-convert@^0.2.0: resolved "https://registry.yarnpkg.com/string-convert/-/string-convert-0.2.1.tgz#6982cc3049fbb4cd85f8b24568b9d9bf39eeff97" integrity sha512-u/1tdPl4yQnPBjnVrmdLo9gtuLvELKsAoRapekWggdiQNvvvum+jYF329d84NAa660KQw7pB2n36KrIKVoXa3A== +string-hash@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" + integrity sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A== + string-length@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/string-length/-/string-length-4.0.2.tgz#a8a8dc7bd5c1a82b9b3c8b87e125f66871b6e57a" @@ -19176,6 +19516,11 @@ strong-log-transformer@^2.1.0: minimist "^1.2.0" through "^2.3.4" +style-inject@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/style-inject/-/style-inject-0.3.0.tgz#d21c477affec91811cc82355832a700d22bf8dd3" + integrity sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw== + style-loader@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-1.3.0.tgz#828b4a3b3b7e7aa5847ce7bae9e874512114249e" @@ -20144,6 +20489,11 @@ universal-user-agent@^6.0.0: resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee" integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w== +universalify@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + universalify@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.2.0.tgz#6451760566fa857534745ab1dde952d1b1761be0"