= (props) => {
14 | const { theme, children } = props
15 |
16 | const customTheme = extendTheme({
17 | ...theme,
18 | config: { ...theme.config, cssVarPrefix: 'hyper-theme' },
19 | })
20 |
21 | return (
22 |
23 |
24 | {children}
25 |
26 | )
27 | }
28 |
29 | export default ThemeProvider
30 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/foundations/colors.ts:
--------------------------------------------------------------------------------
1 | import { Colors } from '@chakra-ui/react'
2 |
3 | const colors: Colors = {
4 | primary: {
5 | 50: '#ffffff',
6 | 100: '#d1d2fa',
7 | 200: '#babbf8',
8 | 300: '#a3a4f6',
9 | 400: '#8b8df4',
10 | 500: '#5D5FEF',
11 | 600: '#2f31ea',
12 | 700: '#171ae8',
13 | 800: '#1517d1',
14 | 900: '#1012a3',
15 | },
16 | secondary: {
17 | 50: '#EAFDED',
18 | 100: '#DCFBE7',
19 | 200: '#BBF8D6',
20 | 300: '#94ECC4',
21 | 400: '#75D9B5',
22 | 500: '#4AC1A2',
23 | 600: '#36A593',
24 | 700: '#258A84',
25 | 800: '#176D6F',
26 | 900: '#0E525C',
27 | },
28 | purple: {
29 | 50: '#FBE5FF',
30 | 100: '#F3D4FF',
31 | 200: '#D6BEFB',
32 | 300: '#BB9CF5',
33 | 400: '#A280EB',
34 | 500: '#7F58DE',
35 | 600: '#6140BE',
36 | 700: '#472C9F',
37 | 800: '#301C80',
38 | 900: '#20106A',
39 | },
40 | green: {
41 | 50: '#EAFDED',
42 | 100: '#DCFBE7',
43 | 200: '#BBF8D6',
44 | 300: '#94ECC4',
45 | 400: '#75D9B5',
46 | 500: '#4AC1A2',
47 | 600: '#36A593',
48 | 700: '#258A84',
49 | 800: '#176D6F',
50 | 900: '#0E525C',
51 | },
52 | gray: {
53 | 50: '#F7FAFC',
54 | 100: '#EDF2F7',
55 | 200: '#E2E8F0',
56 | 300: '#CBD5E0',
57 | 400: '#A0AEC0',
58 | 500: '#718096',
59 | 600: '#4A5568',
60 | 700: '#252b35',
61 | 800: '#1A202C',
62 | 900: '#171923',
63 | },
64 | }
65 |
66 | export default colors
67 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/foundations/config.ts:
--------------------------------------------------------------------------------
1 | const config = {
2 | useSystemColorMode: false,
3 | }
4 |
5 | export default config
6 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/foundations/fonts.ts:
--------------------------------------------------------------------------------
1 | const fonts = {
2 | body: 'Sora, -apple-system, system-ui, sans-serif',
3 | // body: 'Zen Tokyo Zoo',
4 | heading:
5 | 'Sora, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
6 | }
7 |
8 | export default fonts
9 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/foundations/radii.ts:
--------------------------------------------------------------------------------
1 | const radii = {
2 | none: '0',
3 | sm: '0.125rem',
4 | base: '0.75rem',
5 | md: '0.5rem',
6 | lg: '0.75rem',
7 | xl: '1.125rem',
8 | '2xl': '2.5rem',
9 | '3xl': '3.5rem',
10 | full: '9999px',
11 | }
12 |
13 | export default radii
14 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/foundations/shadows.ts:
--------------------------------------------------------------------------------
1 | const shadows = {
2 | surface: '0 0 0 1px rgba(63,63,68,0.05), 0 1px 35px 0 rgba(63,63,68,0.05)',
3 | surfaceDark: '0 0 0 1px rgba(195,195,195,0.045), 0 1px 35px 0 rgba(0,0,0,0.1)',
4 | sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
5 | outline: '0 0 0 3px rgba(125, 125, 125, 0.3)',
6 | xs: '0 0 0 1px rgba(0, 0, 0, 0.05)',
7 | base: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
8 | md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)',
9 | lg: '0 6px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
10 | xl: '0 8px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)',
11 | '2xl': '0 15px 50px -12px rgba(0, 0, 0, 0.25)',
12 | inner: 'inset 0 2px 4px 0 rgba(0,0,0,0.06)',
13 | none: 'none',
14 | }
15 |
16 | export default shadows
17 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/foundations/sizes.ts:
--------------------------------------------------------------------------------
1 | const sizes = {
2 | '3xs': '14rem',
3 | '2xs': '16rem',
4 | xs: '20rem',
5 | sm: '24rem',
6 | md: '28rem',
7 | lg: '32rem',
8 | xl: '36rem',
9 | '2xl': '42rem',
10 | '3xl': '48rem',
11 | '4xl': '56rem',
12 | '5xl': '64rem',
13 | '6xl': '72rem',
14 | '7xl': '80rem',
15 | '8xl': '90rem',
16 | container: {
17 | sm: '640px',
18 | md: '768px',
19 | lg: '1024px',
20 | xl: '1280px',
21 | },
22 | }
23 |
24 | export default sizes
25 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/index.ts:
--------------------------------------------------------------------------------
1 | import { extendTheme, ThemeOverride } from '@chakra-ui/react'
2 | import components from './components'
3 | import config from './foundations/config'
4 | import fonts from './foundations/fonts'
5 | import colors from './foundations/colors'
6 | import styles from './styles'
7 | import sizes from './foundations/sizes'
8 | import shadows from './foundations/shadows'
9 | import radii from './foundations/radii'
10 |
11 | const customTheme: ThemeOverride = {
12 | config,
13 | styles,
14 | fonts,
15 | colors,
16 | sizes,
17 | shadows,
18 | radii,
19 | components,
20 | lineHeights: {
21 | 3: '.75rem',
22 | 4: '1rem',
23 | 5: '1.25rem',
24 | 6: '1.5rem',
25 | 7: '1.75rem',
26 | 8: '2rem',
27 | 9: '2.25rem',
28 | 10: '2.5rem',
29 | normal: 'normal',
30 | none: '1',
31 | shorter: '1.25',
32 | short: '1.375',
33 | base: '1.5',
34 | tall: '1.625',
35 | taller: '2',
36 | },
37 | }
38 |
39 | export const theme = extendTheme({
40 | ...customTheme,
41 | config: {
42 | ...customTheme.config,
43 | cssVarPrefix: 'hypertheme',
44 | },
45 | })
46 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/styles.ts:
--------------------------------------------------------------------------------
1 | import { mode, Styles } from '@chakra-ui/theme-tools'
2 |
3 | const styles: Styles = {
4 | global: (props) => ({
5 | body: {
6 | // fontFamily: 'Sora',
7 | color: mode('gray.700', 'whiteAlpha.900')(props),
8 | overflowX: 'hidden',
9 | },
10 | }),
11 | }
12 | export default styles
13 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/src/utils/colors.ts:
--------------------------------------------------------------------------------
1 | import { mode, transparentize } from '@chakra-ui/theme-tools'
2 |
3 | type Dict = Record
4 |
5 | export const variantSolid = (props: Dict) => {
6 | const { colorScheme: c } = props
7 |
8 | if (c === 'gray') {
9 | const bg = mode('gray.100', 'whiteAlpha.200')(props)
10 |
11 | return {
12 | bg,
13 | _hover: {
14 | bg: mode('gray.200', 'whiteAlpha.300')(props),
15 | _disabled: {
16 | bg,
17 | },
18 | },
19 | _active: { bg: mode('gray.300', 'whiteAlpha.400')(props) },
20 | }
21 | }
22 |
23 | const { bg = `${c}.500`, color = 'white', hoverBg = `${c}.600`, activeBg = `${c}.700` } = {}
24 |
25 | const background = mode(bg, `${c}.400`)(props)
26 |
27 | return {
28 | bg: background,
29 | color: mode(color, 'gray.800')(props),
30 | _hover: {
31 | bg: mode(hoverBg, `${c}.300`)(props),
32 | _disabled: {
33 | bg: background,
34 | },
35 | },
36 | _active: { bg: mode(activeBg, `${c}.400`)(props) },
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/packages/chakra-ui-theme/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "outDir": "lib",
5 | "lib": [
6 | "dom",
7 | "dom.iterable",
8 | "esnext"
9 | ],
10 | "declaration": true,
11 | "declarationDir": "lib",
12 | "allowJs": true,
13 | "skipLibCheck": true,
14 | "esModuleInterop": true,
15 | "allowSyntheticDefaultImports": true,
16 | "strict": true,
17 | "forceConsistentCasingInFileNames": true,
18 | "module": "esnext",
19 | "moduleResolution": "node",
20 | "resolveJsonModule": true,
21 | "isolatedModules": true,
22 | "noImplicitAny": false,
23 | "noUnusedParameters": false,
24 | "noUnusedLocals": false,
25 | "noEmit": true,
26 | "jsx": "react"
27 | },
28 | "include": [
29 | "src"
30 | ],
31 | "exclude": [
32 | "node_modules",
33 | "lib",
34 | "stories"
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/.gitignore:
--------------------------------------------------------------------------------
1 | .env
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/README.md:
--------------------------------------------------------------------------------
1 | # HyperTheme Editor
2 |
3 | 
4 |
5 | Powerful visual theme editor for your next Chakra UI project.
6 |
7 | ## Features
8 |
9 | - Chakra-UI Theme Foundation Color Editor
10 | - Chakra-UI Theme Foundation Font Sizes Editor
11 | - Undo/Redo
12 | - Customizable Editor Drawer
13 | - Custom Panel Editors
14 | - Unlimited exports
15 |
16 |
17 | ## PRO Version
18 |
19 | HyperTheme Editor has also a PRO version with more features:
20 | - Font Family Editor from Google Fonts
21 | - Line Heights Editor
22 | - Letter Spacing Editor
23 | - Shadows Editor
24 | - Radii Editor
25 | - Spacing Editor
26 |
27 | Visit [`hyperthe.me`](https://hyperthe.me) for more info.
28 |
29 | ## Documentation
30 |
31 | Documentation and guides can be found [here](https://hyperthe.me/documentation).
32 |
33 | ## Getting Started
34 | ### 1. Installation
35 |
36 | Install with NPM:
37 |
38 | ```bash
39 | npm i @hypertheme-editor/chakra-ui
40 | ```
41 |
42 | or with Yarn:
43 |
44 | ```bash
45 | yarn add @hypertheme-editor/chakra-ui
46 | ```
47 |
48 | ### 2. Setup
49 |
50 | Installation is super easy and fast:
51 |
52 | - Add the component `` just below the `` component.
53 | - Add the component ``.
54 |
55 | Here's an example:
56 |
57 | ```jsx
58 | import * as React from 'react'
59 | import { ChakraProvider } from '@chakra-ui/react'
60 | import { ThemeEditorProvider, HyperThemeEditor } from '@hypertheme-editor/chakra-ui'
61 | import theme from './my-theme'
62 |
63 | function App() {
64 | return (
65 |
66 |
67 |
68 |
69 |
70 | )
71 | }
72 | ```
73 |
74 | ### 3. Next Steps
75 |
76 | Congratulations! You have a working **theme editor** on your application.
77 |
78 | HyperTheme Editor comes also with all the building blocks necessary to create custom theme editor that works with Chakra UI.
79 |
80 | To learn more read the [documentation](https://hyperthe.me/documentation).
81 |
82 | ## Contributing
83 |
84 | If you want to contribute to HyperTheme Editor, make sure to read the [contribution guide](CONTRIBUTING.md) first.
85 |
86 | ## License
87 |
88 | HyperTheme Editor is licensed under the [MIT License](https://github.com/Hyperting/hypertheme-editor/blob/main/LICENSE) by [Hyperting S.r.l.](https://hyperting.com).
89 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@hypertheme-editor/chakra-ui",
3 | "version": "0.2.2",
4 | "description": "",
5 | "main": "lib/index.js",
6 | "module": "lib/index.esm.js",
7 | "types": "lib/index.d.ts",
8 | "files": [
9 | "lib"
10 | ],
11 | "scripts": {
12 | "test": "echo \"Error: no test specified\" && exit 1",
13 | "build": "rollup -c",
14 | "start": "rollup -c -w"
15 | },
16 | "author": "marco",
17 | "license": "ISC",
18 | "peerDependencies": {
19 | "@chakra-ui/react": ">= 1.0.0",
20 | "framer-motion": ">= 4",
21 | "react": ">=16.8.6",
22 | "react-dom": ">=16.8.6"
23 | },
24 | "devDependencies": {
25 | "@babel/core": "^7.14.6",
26 | "@chakra-ui/react": "^1.6.7",
27 | "@emotion/react": "^11.4.0",
28 | "@emotion/styled": "^11.3.0",
29 | "@rollup/plugin-commonjs": "^19.0.0",
30 | "@rollup/plugin-node-resolve": "^13.0.0",
31 | "@types/react": "^17.0.14",
32 | "babel-eslint": "10.1.0",
33 | "babel-loader": "^8.2.2",
34 | "framer-motion": "^4.1.17",
35 | "react": "^17.0.2",
36 | "react-dom": "^17.0.2",
37 | "rollup": "^2.53.0",
38 | "rollup-plugin-peer-deps-external": "^2.2.4",
39 | "rollup-plugin-typescript2": "^0.31.0",
40 | "typescript": "^4.3.5"
41 | },
42 | "dependencies": {
43 | "@hypertheme-editor/chakra-ui-colors": "^0.2.2",
44 | "@hypertheme-editor/chakra-ui-core": "^0.2.2",
45 | "@hypertheme-editor/chakra-ui-font-sizes": "^0.2.2",
46 | "immer": "^9.0.6",
47 | "react-icons": "^4.2.0",
48 | "use-debouncy": "^4.2.0"
49 | },
50 | "publishConfig": {
51 | "access": "public",
52 | "registry": "https://registry.npmjs.org/"
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/rollup.config.js:
--------------------------------------------------------------------------------
1 | import peerDepsExternal from 'rollup-plugin-peer-deps-external'
2 | import resolve from '@rollup/plugin-node-resolve'
3 | import commonjs from '@rollup/plugin-commonjs'
4 | import typescript from 'rollup-plugin-typescript2'
5 |
6 | const packageJson = require('./package.json')
7 |
8 | export default {
9 | input: 'src/index.ts',
10 | output: [
11 | {
12 | file: packageJson.main,
13 | format: 'cjs',
14 | sourcemap: true,
15 | },
16 | {
17 | file: packageJson.module,
18 | format: 'esm',
19 | sourcemap: true,
20 | },
21 | ],
22 | onwarn: function (warning) {
23 | // Skip certain warnings
24 |
25 | // should intercept ... but doesn't in some rollup versions
26 | if (warning.code === 'THIS_IS_UNDEFINED') {
27 | return
28 | }
29 |
30 | // console.warn everything else
31 | console.warn(warning.message)
32 | },
33 | plugins: [
34 | peerDepsExternal(),
35 | resolve(),
36 | commonjs(),
37 | typescript({
38 | useTsconfigDeclarationDir: true,
39 | }),
40 | ],
41 | }
42 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/src/HyperThemeEditor.tsx:
--------------------------------------------------------------------------------
1 | import React, { FC } from 'react'
2 | import {
3 | ThemeEditor,
4 | ThemeEditorButton,
5 | ThemeEditorButtonProps,
6 | ThemeEditorDrawer,
7 | } from '@hypertheme-editor/chakra-ui-core'
8 | import { ThemeEditorColors } from '@hypertheme-editor/chakra-ui-colors'
9 | import { ThemeEditorFontSizes } from '@hypertheme-editor/chakra-ui-font-sizes'
10 | import { CgColorPicker } from 'react-icons/cg'
11 | import { ImFontSize } from 'react-icons/im'
12 |
13 | export type HyperThemeEditorProps = ThemeEditorButtonProps
14 |
15 | export const HyperThemeEditor: FC = (props) => {
16 | return (
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | )
25 | }
26 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/src/index.ts:
--------------------------------------------------------------------------------
1 | import { HyperThemeEditor, HyperThemeEditorProps } from './HyperThemeEditor'
2 |
3 | export * from '@hypertheme-editor/chakra-ui-core'
4 | export * from '@hypertheme-editor/chakra-ui-colors'
5 | export * from '@hypertheme-editor/chakra-ui-font-sizes'
6 |
7 | export { HyperThemeEditor }
8 |
9 | export type { HyperThemeEditorProps as HyperThemeEditorProps }
10 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/stories/Test.stories.tsx:
--------------------------------------------------------------------------------
1 | // import React from 'react'
2 | // import { ComponentStory, ComponentMeta } from '@storybook/react'
3 | // import {
4 | // defaultTheme,
5 | // ThemeEditorDrawerButton,
6 | // ThemeEditorProvider,
7 | // ThemeEditorRootPanel,
8 | // ThemeEditorColors,
9 | // ThemeEditorFontSizes,
10 | // ThemeEditorTypography,
11 | // ThemeEditorRadii,
12 | // ThemeEditorSpacing,
13 | // ThemeEditorShadows,
14 | // ThemeEditorConfig,
15 | // } from '../src'
16 |
17 | // import { Button, useColorMode } from '@chakra-ui/react'
18 | // import ColorModeToggle from '../src/components/base/ColorModeToggle'
19 | // import { CgColorPicker, CgEditShadows, CgSpaceBetween } from 'react-icons/cg'
20 | // import { ImFontSize } from 'react-icons/im'
21 | // import { BiText } from 'react-icons/bi'
22 | // import { MdRoundedCorner } from 'react-icons/md'
23 | // import { FaCog, FaSlidersH } from 'react-icons/fa'
24 |
25 | // export default {
26 | // title: 'HyperThemeEditor/chakra-ui-core/ThemeEditorDrawerButtonTest',
27 | // component: ThemeEditorDrawerButton,
28 | // argTypes: {},
29 | // } as ComponentMeta
30 |
31 | // // const Template: ComponentStory = (args) => {
32 | // // const { colorMode } = useColorMode()
33 |
34 | // // // const customTheme = extendTheme({
35 | // // // ...defaultTheme,
36 | // // // config: {
37 | // // // ...defaultTheme.config,
38 | // // // cssVarPrefix: 'hypertheme',
39 | // // // // initialColorMode: colorMode,
40 | // // // },
41 | // // // })
42 | // // return (
43 | // //
44 | // //
45 | // //
46 | // //
47 | // //
48 | // //
49 |
50 | // //
51 | // //
52 | // //
53 | // //
54 | // //
55 | // //
56 | // // )
57 | // // }
58 |
59 | // export const FreeVersion = (args) => (
60 | //
61 | //
62 | //
63 | //
64 | //
65 | //
66 | //
67 | //
68 | //
69 | //
70 | //
71 | // )
72 |
73 | // export const ProVersion = (args) => (
74 | //
75 | //
78 | //
79 | //
80 | //
81 | //
82 |
83 | //
84 | //
85 | //
86 |
87 | //
88 | //
89 | //
90 |
91 | //
92 | //
93 | //
94 |
95 | //
96 | //
97 | //
98 | //
99 | //
100 | //
101 | //
102 | //
103 |
104 | //
105 | //
106 | //
107 |
108 | //
109 | //
110 | //
111 |
112 | //
113 | //
114 | //
115 |
116 | //
117 | //
118 | //
119 |
120 | //
121 | //
122 | //
123 | //
124 | //
125 | //
126 | // )
127 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/stories/ThemeEditor.stories.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable import/no-extraneous-dependencies */
2 | import React from 'react'
3 | import { ComponentMeta } from '@storybook/react'
4 | import { Button } from '@chakra-ui/react'
5 | import { CgColorPicker, CgEditShadows, CgSpaceBetween } from 'react-icons/cg'
6 | import { ImFontSize } from 'react-icons/im'
7 | import { BiText } from 'react-icons/bi'
8 | import { MdRoundedCorner } from 'react-icons/md'
9 | import // ThemeEditorButton,
10 | // ThemeEditorProvider,
11 | // ThemeEditorRootPanel,
12 | // ThemeEditorDrawer,
13 | // ThemeEditor,
14 | '@hypertheme-editor/chakra-ui-core'
15 | import { ThemeEditorColors } from '@hypertheme-editor/chakra-ui-colors'
16 | import { ThemeEditorFontSizes } from '@hypertheme-editor/chakra-ui-font-sizes'
17 | import {
18 | HyperThemeEditor,
19 | ThemeEditorButton,
20 | ThemeEditorProvider,
21 | ThemeEditorRootPanel,
22 | ThemeEditorDrawer,
23 | ThemeEditor,
24 | } from '../src'
25 |
26 | export default {
27 | title: 'HyperThemeEditor/hypertheme-chakra-ui/ThemeEditor Community',
28 | component: ThemeEditor,
29 | argTypes: {},
30 | } as ComponentMeta
31 |
32 | export const DefaultEditor = (args) => (
33 |
34 |
35 |
36 |
37 | )
38 |
39 | export const DefaultEditorWithHiddenCredits = (args) => (
40 |
41 |
42 |
43 |
44 | )
45 |
46 | export const WithRootPanel = (args) => (
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | )
62 |
63 | export const WithoutRootPanel = (args) => (
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | )
75 |
--------------------------------------------------------------------------------
/packages/hypertheme-chakra-ui/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "outDir": "lib",
5 | "lib": [
6 | "dom",
7 | "dom.iterable",
8 | "esnext"
9 | ],
10 | "declaration": true,
11 | "declarationDir": "lib",
12 | "allowJs": true,
13 | "skipLibCheck": true,
14 | "esModuleInterop": true,
15 | "allowSyntheticDefaultImports": true,
16 | "strict": true,
17 | "forceConsistentCasingInFileNames": true,
18 | "module": "esnext",
19 | "moduleResolution": "node",
20 | "resolveJsonModule": true,
21 | "isolatedModules": true,
22 | "noImplicitAny": false,
23 | "noUnusedParameters": false,
24 | "noUnusedLocals": false,
25 | "noEmit": true,
26 | "jsx": "react"
27 | },
28 | "include": [
29 | "src"
30 | ],
31 | "exclude": [
32 | "node_modules",
33 | "lib",
34 | "stories"
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/setupTests.ts:
--------------------------------------------------------------------------------
1 | import { configure } from 'enzyme'
2 | import Adapter from '@wojtekmaj/enzyme-adapter-react-17'
3 |
4 | configure({ adapter: new Adapter() })
5 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "outDir": "lib",
5 | "lib": [
6 | "dom",
7 | "dom.iterable",
8 | "esnext"
9 | ],
10 | "declaration": true,
11 | "declarationDir": "lib",
12 | "allowJs": true,
13 | "skipLibCheck": true,
14 | "esModuleInterop": true,
15 | "allowSyntheticDefaultImports": true,
16 | "strict": true,
17 | "forceConsistentCasingInFileNames": true,
18 | "module": "esnext",
19 | "moduleResolution": "node",
20 | "resolveJsonModule": true,
21 | "isolatedModules": true,
22 | "noImplicitAny": false,
23 | "noUnusedParameters": false,
24 | "noUnusedLocals": false,
25 | "noEmit": true,
26 | "jsx": "react"
27 | },
28 | "include": [
29 | "packages",
30 | "website"
31 | ],
32 | "exclude": [
33 | "node_modules"
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------