├── .eslintignore ├── site ├── README.md ├── next-env.d.ts ├── manifest.json ├── static │ └── favicons │ │ ├── favicon.ico │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── apple-touch-icon.png │ │ └── safari-pinned-tab.svg ├── next.config.js ├── tsconfig.json ├── .gitignore ├── pages │ ├── _app.tsx │ └── index.tsx ├── package.json ├── components │ └── HtmlHead.tsx └── build-manifest.js ├── babel.config.js ├── .gitignore ├── design-system └── textfield │ ├── CHANGELOG.md │ ├── package.json │ └── src │ └── index.tsx ├── elemental-ui ├── radio │ ├── package.json │ └── src │ │ └── index.tsx ├── reset │ ├── package.json │ └── src │ │ └── index.tsx ├── button │ ├── package.json │ └── src │ │ └── index.tsx ├── checkbox │ ├── package.json │ └── src │ │ └── index.tsx ├── textarea │ ├── package.json │ └── src │ │ └── index.tsx └── textinput │ ├── package.json │ └── src │ └── index.tsx ├── .changeset ├── README.md └── config.js ├── tsconfig.json ├── TODO.md ├── .eslintrc.json ├── LICENSE ├── .circleci └── config.yml ├── package.json └── README.md /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist -------------------------------------------------------------------------------- /site/README.md: -------------------------------------------------------------------------------- 1 | # Design System Website -------------------------------------------------------------------------------- /site/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /site/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "@elemental/textfield", 4 | "@unstyled/textfield" 5 | ] 6 | } -------------------------------------------------------------------------------- /site/static/favicons/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-systems-framework/design-system/HEAD/site/static/favicons/favicon.ico -------------------------------------------------------------------------------- /site/static/favicons/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-systems-framework/design-system/HEAD/site/static/favicons/favicon-16x16.png -------------------------------------------------------------------------------- /site/static/favicons/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-systems-framework/design-system/HEAD/site/static/favicons/favicon-32x32.png -------------------------------------------------------------------------------- /site/static/favicons/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/design-systems-framework/design-system/HEAD/site/static/favicons/apple-touch-icon.png -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@babel/preset-env', 4 | '@babel/preset-react', 5 | '@babel/preset-typescript', 6 | ], 7 | }; 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # misc 7 | .DS_Store 8 | .env 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | 13 | dist/ 14 | -------------------------------------------------------------------------------- /design-system/textfield/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # @design-system/textfield 2 | 3 | ## 0.1.2 4 | 5 | ### Patch Changes 6 | 7 | - af4c756: Convert to TypeScript 8 | 9 | ## 0.1.1 10 | 11 | ### Patch Changes 12 | 13 | - 10564ac: Change to test release automation 14 | -------------------------------------------------------------------------------- /site/next.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | webpack(config, options) { 3 | config.module.rules.push({ 4 | test: /\.+(js|jsx|ts|tsx)$/, 5 | use: options.defaultLoaders.babel, 6 | exclude: [/node_modules/], 7 | }); 8 | return config; 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /site/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | // next creates a tsconfig even if there's one in a higher directory 3 | "extends": "../tsconfig.json", 4 | "compilerOptions": { 5 | // it also sets things so we need to do this 6 | "allowJs": false, 7 | "strict": true 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /site/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | node_modules 5 | 6 | # production 7 | /build 8 | /dist 9 | /.next 10 | 11 | # misc 12 | .DS_Store 13 | .env 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | -------------------------------------------------------------------------------- /site/pages/_app.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import App, { Container } from 'next/app'; 3 | 4 | export default class CustomApp extends App { 5 | render() { 6 | const { Component, pageProps } = this.props; 7 | return ( 8 | 9 | 10 | 11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@design-system/site", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next", 7 | "build": "next build", 8 | "start": "next start" 9 | }, 10 | "dependencies": { 11 | "glob": "^7.1.3", 12 | "glob-promise": "^3.4.0", 13 | "next": "^9.0.2", 14 | "react": "^16.8.9", 15 | "react-dom": "^16.8.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /elemental-ui/radio/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@elemental-ui/radio", 3 | "version": "0.0.1", 4 | "main": "dist/radio.cjs.js", 5 | "module": "dist/radio.esm.js", 6 | "author": "Thinkmill", 7 | "license": "MIT", 8 | "dependencies": { 9 | "@babel/runtime": "^7.4.3", 10 | "@emotion/core": "^10.0.7", 11 | "@types/react": "^16.8.23" 12 | }, 13 | "peerDependencies": { 14 | "react": "^16.8.9" 15 | }, 16 | "devDependencies": { 17 | "react": "^16.8.9" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /elemental-ui/reset/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@elemental-ui/reset", 3 | "version": "0.0.1", 4 | "main": "dist/reset.cjs.js", 5 | "module": "dist/reset.esm.js", 6 | "author": "Thinkmill", 7 | "license": "MIT", 8 | "dependencies": { 9 | "@babel/runtime": "^7.4.3", 10 | "@emotion/core": "^10.0.7", 11 | "@types/react": "^16.8.23" 12 | }, 13 | "peerDependencies": { 14 | "react": "^16.8.9" 15 | }, 16 | "devDependencies": { 17 | "react": "^16.8.9" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /elemental-ui/button/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@elemental-ui/button", 3 | "version": "0.0.1", 4 | "main": "dist/button.cjs.js", 5 | "module": "dist/button.esm.js", 6 | "author": "Thinkmill", 7 | "license": "MIT", 8 | "dependencies": { 9 | "@babel/runtime": "^7.4.3", 10 | "@emotion/core": "^10.0.7", 11 | "@types/react": "^16.8.23" 12 | }, 13 | "peerDependencies": { 14 | "react": "^16.8.9" 15 | }, 16 | "devDependencies": { 17 | "react": "^16.8.9" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /elemental-ui/checkbox/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@elemental-ui/checkbox", 3 | "version": "0.0.1", 4 | "main": "dist/checkbox.cjs.js", 5 | "module": "dist/checkbox.esm.js", 6 | "author": "Thinkmill", 7 | "license": "MIT", 8 | "dependencies": { 9 | "@babel/runtime": "^7.4.3", 10 | "@emotion/core": "^10.0.7", 11 | "@types/react": "^16.8.23" 12 | }, 13 | "peerDependencies": { 14 | "react": "^16.8.9" 15 | }, 16 | "devDependencies": { 17 | "react": "^16.8.9" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /elemental-ui/textarea/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@elemental-ui/textarea", 3 | "version": "0.0.1", 4 | "main": "dist/textarea.cjs.js", 5 | "module": "dist/textarea.esm.js", 6 | "author": "Thinkmill", 7 | "license": "MIT", 8 | "dependencies": { 9 | "@babel/runtime": "^7.4.3", 10 | "@emotion/core": "^10.0.7", 11 | "@types/react": "^16.8.23" 12 | }, 13 | "peerDependencies": { 14 | "react": "^16.8.9" 15 | }, 16 | "devDependencies": { 17 | "react": "^16.8.9" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /elemental-ui/textinput/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@elemental-ui/textinput", 3 | "version": "0.0.1", 4 | "main": "dist/textinput.cjs.js", 5 | "module": "dist/textinput.esm.js", 6 | "author": "Thinkmill", 7 | "license": "MIT", 8 | "dependencies": { 9 | "@babel/runtime": "^7.4.3", 10 | "@emotion/core": "^10.0.7", 11 | "@types/react": "^16.8.23" 12 | }, 13 | "peerDependencies": { 14 | "react": "^16.8.9" 15 | }, 16 | "devDependencies": { 17 | "react": "^16.8.9" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /design-system/textfield/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@design-system/textfield", 3 | "version": "0.1.2", 4 | "main": "dist/textfield.cjs.js", 5 | "module": "dist/textfield.esm.js", 6 | "license": "MIT", 7 | "dependencies": { 8 | "@babel/runtime": "^7.4.3", 9 | "@emotion/core": "^10.0.7", 10 | "@types/react": "^16.8.23" 11 | }, 12 | "peerDependencies": { 13 | "react": "^16.8.9" 14 | }, 15 | "devDependencies": { 16 | "react": "^16.8.9", 17 | "react-dom": "^16.8.3" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works with mono-repos or single package repos to help you verion and release your code. You can find the full documentation for it [in our repository](https://github.com/changesets/changesets) 4 | 5 | We have a quick list of common questions to get you started engaging with this project in [our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) 6 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "skipLibCheck": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "node", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve" 14 | }, 15 | "exclude": ["node_modules"], 16 | "include": ["./site/next-env.d.ts", "**/*.ts", "**/*.tsx"] 17 | } 18 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # design-system 2 | 3 | ## TODO 4 | 5 | ### Infra: 6 | - [ ] Setup CI 7 | - [ ] Setup Netlify and integrate with CI 8 | - [ ] Setup build step for non website workspaces. 9 | - [ ] Integrate with change-sets 10 | - [ ] Setup initial dev workflow with Next.js 11 | - [ ] Setup dev loop external of Next.js site* 12 | 13 | ### Unstyled Components: 14 | - [ ] Button 15 | - [ ] Textfield 16 | - [ ] ??? 17 | ### Elemental Components: 18 | - [ ] Button 19 | - [ ] Textfield 20 | 21 | \* = probably not high priority till we decide to make this thing public) 22 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["standard", "standard-react", "prettier", "prettier/react"], 3 | "plugins": ["prettier"], 4 | "parser": "babel-eslint", 5 | "rules": { 6 | "prettier/prettier": "error", 7 | "react/prop-types": 0, 8 | "react/no-unused-prop-types": 0, 9 | "standard/computed-property-even-spacing": 0, 10 | "no-template-curly-in-string": 0, 11 | "camelcase": 0, 12 | "import/no-duplicates": 0, 13 | "import/no-unresolved": 2 14 | }, 15 | "env": { 16 | "browser": true 17 | }, 18 | "overrides": [ 19 | { 20 | "files": ["*.test.js", "**/__tests__/**"], 21 | "env": { 22 | "jest": true 23 | } 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /site/components/HtmlHead.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Head from 'next/head'; 3 | 4 | type Props = { 5 | title: string; 6 | children?: React.ReactNode; 7 | }; 8 | 9 | export default ({ title = 'Design System™', children }: Props) => ( 10 | 11 | {title} 12 | 18 | 24 | 25 | {children} 26 | 27 | ); 28 | -------------------------------------------------------------------------------- /elemental-ui/reset/src/index.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Global, css } from '@emotion/core'; 3 | 4 | // TODO: Pull these font stacks from a theme package 5 | 6 | const resetCSS = css` 7 | html { 8 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 9 | 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 10 | 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; 11 | line-height: 1.5; 12 | } 13 | pre, 14 | code, 15 | kbd, 16 | samp { 17 | font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', 18 | monospace; 19 | } 20 | `; 21 | 22 | export default function Reset() { 23 | return ; 24 | } 25 | -------------------------------------------------------------------------------- /site/build-manifest.js: -------------------------------------------------------------------------------- 1 | const { workspaces } = require('../package.json'); 2 | const fs = require('fs'); 3 | const path = require('path'); 4 | const glob = require('glob-promise'); 5 | 6 | (async () => { 7 | try { 8 | const files = await Promise.all( 9 | workspaces.map(async key => { 10 | const globPath = path.resolve(__dirname, `../${key}`); 11 | if (key === 'site') return; 12 | const filePaths = await glob(globPath); 13 | return filePaths.map(filePath => { 14 | const { name } = require(path.resolve(filePath, './package.json')); 15 | return name; 16 | }); 17 | }) 18 | ); 19 | const formattedFiles = files 20 | .reduce((acc, curr) => acc.concat(curr), []) 21 | .filter(f => f); 22 | fs.writeFileSync( 23 | 'manifest.json', 24 | JSON.stringify({ files: formattedFiles }, null, 1) 25 | ); 26 | } catch (e) { 27 | console.error(e); 28 | } 29 | })(); 30 | -------------------------------------------------------------------------------- /site/pages/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import HtmlHead from '../components/HtmlHead'; 3 | import Reset from '@elemental-ui/reset'; 4 | import Button from '@elemental-ui/button'; 5 | import Checkbox from '@elemental-ui/checkbox'; 6 | import Radio from '@elemental-ui/radio'; 7 | import Textarea from '@elemental-ui/textarea'; 8 | import TextInput from '@elemental-ui/textinput'; 9 | 10 | const Home = () => ( 11 | <> 12 | 13 | 14 |

Design System™

15 |
16 |

Button

17 | 18 |

Checkbox

19 | 20 | 21 |

Radio

22 | 23 | 24 |

Textarea

25 |