From 032eafe7b2c73ccf692d88999d591e25971d77ff Mon Sep 17 00:00:00 2001 From: heyjul3s Date: Tue, 2 Feb 2021 15:08:28 +1100 Subject: [PATCH 1/3] Minor Fixes - Fix width sizing for Container - Fix Tagline margins - Fix FlexTable margins - Add more cols to Flex demos - Add more item to Grid demos - Fix TS ver for Specs --- docs/components/FlexTable.tsx | 8 +++++--- docs/components/Global/Container.tsx | 4 +++- docs/components/Global/Tagline/Tagline.tsx | 2 +- docs/page-content/Flex/examples/FlexAlignmentDemo.tsx | 4 ++-- docs/page-content/Generator/Generator.tsx | 4 ++++ docs/page-content/Grid/examples/GridDemo.tsx | 6 ++++++ docs/page-content/HomePage/content/Specs/Specs.tsx | 2 +- 7 files changed, 22 insertions(+), 8 deletions(-) diff --git a/docs/components/FlexTable.tsx b/docs/components/FlexTable.tsx index 2c23e8b..320efb7 100644 --- a/docs/components/FlexTable.tsx +++ b/docs/components/FlexTable.tsx @@ -54,12 +54,14 @@ export function FlexTableCell({ prop, subProp, content }) { return ( <> - {prop} - {subProp} + + {prop} + + {subProp} - {content} + {content} ); diff --git a/docs/components/Global/Container.tsx b/docs/components/Global/Container.tsx index 442666d..bb3dee4 100644 --- a/docs/components/Global/Container.tsx +++ b/docs/components/Global/Container.tsx @@ -3,20 +3,22 @@ import { theme } from '../../theme'; export const Container = styled.div` margin: 0 auto; - width: 100%; max-width: ${theme.container[0]}; padding-left: 1em; padding-right: 1em; @media (min-width: 576px) { + width: 100%; max-width: ${theme.container[1]}; } @media (min-width: 768px) { + width: 100%; max-width: ${theme.container[2]}; } @media (min-width: 992px) { + width: 100%; max-width: ${theme.container[3]}; } `; diff --git a/docs/components/Global/Tagline/Tagline.tsx b/docs/components/Global/Tagline/Tagline.tsx index 130b2ee..3094bdd 100644 --- a/docs/components/Global/Tagline/Tagline.tsx +++ b/docs/components/Global/Tagline/Tagline.tsx @@ -4,7 +4,7 @@ import { TaglineProps } from './typings'; export function Tagline({ align = 'center' }: TaglineProps) { return ( - + a light, modular and extensible ReactJS UI primitives library ); diff --git a/docs/page-content/Flex/examples/FlexAlignmentDemo.tsx b/docs/page-content/Flex/examples/FlexAlignmentDemo.tsx index ce989cc..2443449 100644 --- a/docs/page-content/Flex/examples/FlexAlignmentDemo.tsx +++ b/docs/page-content/Flex/examples/FlexAlignmentDemo.tsx @@ -6,11 +6,11 @@ export function FlexAlignmentDemo() { return ( <> - + - + diff --git a/docs/page-content/Generator/Generator.tsx b/docs/page-content/Generator/Generator.tsx index 58e0338..10d27bd 100644 --- a/docs/page-content/Generator/Generator.tsx +++ b/docs/page-content/Generator/Generator.tsx @@ -154,7 +154,11 @@ export function GeneratorContent() { component if a configuration object is passed as an argument for the{' '} base parameter. + + +
+ + + ); } @@ -22,6 +24,10 @@ export function ColumnWidthMqDemo() { + + + + ); } diff --git a/docs/page-content/HomePage/content/Specs/Specs.tsx b/docs/page-content/HomePage/content/Specs/Specs.tsx index 8b9d3de..6cf15a7 100644 --- a/docs/page-content/HomePage/content/Specs/Specs.tsx +++ b/docs/page-content/HomePage/content/Specs/Specs.tsx @@ -25,7 +25,7 @@ export function Specs() { title="Peer Dependencies" content={[ 'react >= 17.0.1', - 'typescript >= 4.1.2', + 'typescript >= 4.1.3', 'styled-components >= 5.2.1', 'styled-system >= 5.1.5' ]} From 195c07835889d906bbc6c623b79eba95580ee9c9 Mon Sep 17 00:00:00 2001 From: heyjul3s Date: Tue, 2 Feb 2021 15:49:14 +1100 Subject: [PATCH 2/3] Fix padding for Container --- docs/components/Global/Layout.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/components/Global/Layout.tsx b/docs/components/Global/Layout.tsx index e42cbc2..8e0697e 100644 --- a/docs/components/Global/Layout.tsx +++ b/docs/components/Global/Layout.tsx @@ -34,7 +34,12 @@ export function Layout({ {router.pathname === '/' &&
}
- + {children}
From ac79224c7a89378dbf851111f125d7634d9488ad Mon Sep 17 00:00:00 2001 From: heyjul3s Date: Tue, 2 Feb 2021 16:24:35 +1100 Subject: [PATCH 3/3] Fix Path Aliasing - remove babel-plugin-module-resolver - remove module-resolver config from babelrc - add eslint config and point path alias resolution to tsconfig - add path aliasing to tsconfig --- docs/.babelrc | 18 +--------- docs/.eslintrc.js | 8 +++++ docs/package.json | 1 - docs/pages/index.tsx | 2 +- docs/tsconfig.json | 9 +++++ docs/yarn.lock | 83 +++----------------------------------------- 6 files changed, 24 insertions(+), 97 deletions(-) create mode 100644 docs/.eslintrc.js diff --git a/docs/.babelrc b/docs/.babelrc index 5db405e..854cb73 100644 --- a/docs/.babelrc +++ b/docs/.babelrc @@ -1,20 +1,4 @@ { "presets": ["next/babel"], - "plugins": [ - [ - "module-resolver", - { - "root": ["./src"], - "alias": { - "@components": "./components", - "@page-content": "./page-content", - "@assets": "./assets", - "@public": "./public", - "@pages": "./pages", - "@theme": "./theme" - } - } - ], - ["styled-components", { "ssr": true }] - ] + "plugins": [["styled-components", { "ssr": true }]] } diff --git a/docs/.eslintrc.js b/docs/.eslintrc.js new file mode 100644 index 0000000..6ba7af1 --- /dev/null +++ b/docs/.eslintrc.js @@ -0,0 +1,8 @@ +module.exports = { + ignorePatterns: ['node_modules/', '.next/'], + settings: { + 'import/resolver': { + typescript: {} + } + } +}; diff --git a/docs/package.json b/docs/package.json index fbc0c20..8725e37 100644 --- a/docs/package.json +++ b/docs/package.json @@ -31,7 +31,6 @@ "@types/react": "^17.0.0", "@types/styled-components": "^5.1.7", "@types/styled-system": "^5.1.10", - "babel-plugin-module-resolver": "^4.1.0", "babel-plugin-styled-components": "^1.12.0", "typescript": "^4.1.3" }, diff --git a/docs/pages/index.tsx b/docs/pages/index.tsx index 12bec9a..99d90bb 100644 --- a/docs/pages/index.tsx +++ b/docs/pages/index.tsx @@ -3,7 +3,7 @@ import { FlexRow, FlexCol } from 'artifak'; import { Layout, DesktopNav } from '@components'; import { useRouter } from 'next/router'; import { content } from '@page-content'; -import { HomePage } from '@page-content/HomePage/HomePage'; +import { HomePage } from '../page-content/HomePage/HomePage'; export default function Home() { const router = useRouter(); diff --git a/docs/tsconfig.json b/docs/tsconfig.json index 19ea059..31d01c8 100644 --- a/docs/tsconfig.json +++ b/docs/tsconfig.json @@ -21,6 +21,15 @@ "exclude": ["node_modules"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "compilerOptions": { + "baseUrl": "./", + "paths": { + "@components": ["./components"], + "@page-content": ["./page-content"], + "@assets": ["./assets"], + "@public": ["./public"], + "@pages": ["./pages"], + "@theme": ["./theme"] + }, "lib": ["dom", "dom.iterable", "esnext"], "noEmit": true, "isolatedModules": true, diff --git a/docs/yarn.lock b/docs/yarn.lock index c3d1576..a0bea6c 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -953,17 +953,6 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -babel-plugin-module-resolver@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/babel-plugin-module-resolver/-/babel-plugin-module-resolver-4.1.0.tgz#22a4f32f7441727ec1fbf4967b863e1e3e9f33e2" - integrity sha512-MlX10UDheRr3lb3P0WcaIdtCSRlxdQsB1sBqL7W0raF070bGl1HQQq5K3T2vf2XAYie+ww+5AKC/WrkjRO2knA== - dependencies: - find-babel-config "^1.2.0" - glob "^7.1.6" - pkg-up "^3.1.0" - reselect "^4.0.0" - resolve "^1.13.1" - "babel-plugin-styled-components@>= 1": version "1.11.1" resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.11.1.tgz#5296a9e557d736c3186be079fff27c6665d63d76" @@ -1274,15 +1263,10 @@ camelize@^1.0.0: resolved "https://registry.yarnpkg.com/camelize/-/camelize-1.0.0.tgz#164a5483e630fa4321e5af07020e531831b2609b" integrity sha1-FkpUg+Yw+kMh5a8HAg5TGDGyYJs= -caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001113: - version "1.0.30001146" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001146.tgz#c61fcb1474520c1462913689201fb292ba6f447c" - integrity sha512-VAy5RHDfTJhpxnDdp2n40GPPLp3KqNrXz1QqFv4J64HvArKs8nuNMOWkB3ICOaBTU/Aj4rYAo/ytdQDDFF/Pug== - -caniuse-lite@^1.0.30001154: - version "1.0.30001165" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001165.tgz#32955490d2f60290bb186bb754f2981917fa744f" - integrity sha512-8cEsSMwXfx7lWSUMA2s08z9dIgsnR5NAqjXP23stdsU3AUWkCr/rr4s4OFtHXn5XXr6+7kam3QFVoYyXNPdJPA== +caniuse-lite@^1.0.30001093, caniuse-lite@^1.0.30001113, caniuse-lite@^1.0.30001154: + version "1.0.30001181" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001181.tgz" + integrity sha512-m5ul/ARCX50JB8BSNM+oiPmQrR5UmngaQ3QThTTp5HcIIQGP/nPBs82BYLE+tigzm3VW+F4BJIhUyaVtEweelQ== chalk@2.4.2, chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" @@ -2165,14 +2149,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -find-babel-config@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/find-babel-config/-/find-babel-config-1.2.0.tgz#a9b7b317eb5b9860cda9d54740a8c8337a2283a2" - integrity sha512-jB2CHJeqy6a820ssiqwrKMeyC6nNdmrcgkKWJWmpoxpE8RKciYJXCcXRq1h2AzCo5I5BJeN2tkGEO3hLTuePRA== - dependencies: - json5 "^0.5.1" - path-exists "^3.0.0" - find-cache-dir@3.3.1: version "3.3.1" resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" @@ -2290,11 +2266,6 @@ fsevents@~2.1.2: resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -2339,7 +2310,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.1.3, glob@^7.1.4: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -2414,13 +2385,6 @@ has-values@^1.0.0: is-number "^3.0.0" kind-of "^4.0.0" -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - hash-base@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" @@ -2659,13 +2623,6 @@ is-buffer@^1.1.5: resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== -is-core-module@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a" - integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ== - dependencies: - has "^1.0.3" - is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" @@ -2825,11 +2782,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - json5@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe" @@ -3509,11 +3461,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - pbkdf2@^3.0.3: version "3.1.1" resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.1.tgz#cb8724b0fada984596856d1a6ebafd3584654b94" @@ -3554,13 +3501,6 @@ pkg-dir@^4.1.0: dependencies: find-up "^4.0.0" -pkg-up@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-3.1.0.tgz#100ec235cc150e4fd42519412596a28512a0def5" - integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== - dependencies: - find-up "^3.0.0" - platform@1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.6.tgz#48b4ce983164b209c2d45a107adb31f473a6e7a7" @@ -4011,11 +3951,6 @@ repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= -reselect@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.0.0.tgz#f2529830e5d3d0e021408b246a206ef4ea4437f7" - integrity sha512-qUgANli03jjAyGlnbYVAV5vvnOmJnODyABz51RdBN7M4WaVu8mecZWgyQNkG8Yqe3KRGRt0l4K4B3XVEULC4CA== - resolve-url-loader@3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/resolve-url-loader/-/resolve-url-loader-3.1.2.tgz#235e2c28e22e3e432ba7a5d4e305c59a58edfc08" @@ -4037,14 +3972,6 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.13.1: - version "1.19.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" - integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== - dependencies: - is-core-module "^2.1.0" - path-parse "^1.0.6" - ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc"