diff --git a/.eslintignore b/.eslintignore index 91c1db38..8f24d4ab 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,3 +1,4 @@ packages/*/** +prototypes/*/** artifacts reports diff --git a/.eslintrc b/.eslintrc index 58fb4f4b..2d9d8311 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,6 +1,7 @@ { "extends": "joyent-portal", "rules": { + "jsx-a11y/href-no-hash": 0, "new-cap": 0, "no-console": 0 } diff --git a/package.json b/package.json index b31b12c0..cfdf9074 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "format-staged": "./scripts/format --staged", "lint-license": "./scripts/license-to-fail", "lint-docs": "./scripts/quality-docs", - "lint-ci:root": "eslint scripts/*", - "lint:root": "eslint . --fix", + "lint-ci:root": "eslint . --ext .js --ext .md", + "lint:root": "eslint . --fix --ext .js --ext .md", "lint-ci:packages": "lerna run lint-ci", "lint:packages": "lerna run lint", "lint-ci": "redrun -s lint-ci:*", @@ -20,19 +20,17 @@ "test": "lerna run test", "clean": "lerna clean --yes", "bootstrap": "lerna bootstrap", - "dev": - "lerna run dev --stream --parallel --scope my-joy-beta --scope cloudapi-gql", - "start": - "lerna run start --stream --parallel --scope my-joy-beta --scope cloudapi-gql", + "dev": "lerna run dev --stream --parallel --scope my-joy-beta --scope cloudapi-gql", + "start": "lerna run start --stream --parallel --scope my-joy-beta --scope cloudapi-gql", "commitmsg": "commitlint -e", "precommit": "cross-env CI=1 redrun -s lint-staged format-staged", "postinstall": "lerna run prepublish", "commit": "commit" }, "devDependencies": { - "@commitlint/cli": "^3.2.0", - "@commitlint/config-angular": "^3.1.1", - "@commitlint/prompt-cli": "^3.2.0", + "@commitlint/cli": "^4.2.1", + "@commitlint/config-angular": "^4.2.1", + "@commitlint/prompt-cli": "^4.2.1", "apr-awaitify": "^1.0.4", "apr-filter": "^1.0.5", "apr-for-each": "^1.0.6", @@ -40,36 +38,33 @@ "apr-map": "^1.0.5", "apr-parallel": "^1.0.5", "apr-reduce": "^1.0.5", - "babel-eslint": "^7.2.3", + "babel-eslint": "^8.0.1", "checksum": "^0.1.1", - "cross-env": "^5.0.5", - "eslint": "^4.5.0", - "eslint-config-joyent-portal": "^3.0.0", - "eslint-config-prettier": "^2.3.0", - "eslint-config-react-app": "^2.0.0", - "eslint-config-xo-space": "^0.16.0", - "eslint-gh-status-reporter": "^1.0.7", - "eslint-plugin-flowtype": "^2.35.1", - "eslint-plugin-graphql": "^1.3.0", - "eslint-plugin-import": "^2.7.0", + "cross-env": "^5.1.0", + "eslint": "^4.9.0", + "eslint-config-joyent-portal": "^3.2.0", + "eslint-config-prettier": "^2.6.0", + "eslint-config-react-app": "^2.0.1", + "eslint-config-xo-space": "^0.17.0", + "eslint-plugin-flowtype": "^2.39.1", + "eslint-plugin-graphql": "^1.4.0-1", + "eslint-plugin-import": "^2.8.0", "eslint-plugin-jsx-a11y": "^6.0.2", "eslint-plugin-markdown": "^1.0.0-beta.6", - "eslint-plugin-prettier": "^2.2.0", - "eslint-plugin-react": "^7.3.0", + "eslint-plugin-prettier": "^2.3.1", + "eslint-plugin-react": "^7.4.0", "execa": "^0.8.0", "force-array": "^3.1.0", "husky": "^0.14.3", - "lerna": "^2.1.2", + "lerna": "^2.4.0", "license-to-fail": "^2.2.0", - "lighthouse-gh-status-reporter": "^1.0.12", "lodash.uniq": "^4.5.0", - "prettier": "1.6.1", + "prettier": "1.7.4", "quality-docs": "^3.3.0", "read-pkg": "^2.0.0", - "redrun": "^5.9.17", + "redrun": "^5.9.18", "staged-git-files": "0.0.4", - "stylelint-gh-status-reporter": "^1.0.7", - "yargs": "^8.0.2" + "yargs": "^10.0.3" }, "workspaces": [ "packages/*", @@ -81,6 +76,7 @@ "lodash.defaults": "4.2.0", "lodash.assign": "4.2.0", "graphql": "0.11.7", + "isarray": "'2.0.2", "moment": "2.19.1", "codemirror": "5.30.0", "react": "16.0.0", diff --git a/packages/cloudapi-gql/.eslintrc b/packages/cloudapi-gql/.eslintrc index 24c8df08..bffc018b 100644 --- a/packages/cloudapi-gql/.eslintrc +++ b/packages/cloudapi-gql/.eslintrc @@ -2,6 +2,7 @@ "extends": "joyent-portal", "plugins": ["graphql"], "rules": { + "jsx-a11y/href-no-hash": 0, "graphql/template-strings": ["error", { "env": "apollo" }], diff --git a/packages/cloudapi-gql/package.json b/packages/cloudapi-gql/package.json index ee5c34c5..f1ea3962 100644 --- a/packages/cloudapi-gql/package.json +++ b/packages/cloudapi-gql/package.json @@ -19,7 +19,7 @@ "dependencies": { "@2fd/graphdoc": "^2.4.0", "apollo-errors": "^1.5.1", - "apollo-server-hapi": "^1.1.6", + "apollo-server-hapi": "^1.1.7", "apr-awaitify": "^1.0.4", "boom": "^6.0.0", "bunyan": "^1.8.12", @@ -29,8 +29,8 @@ "good": "^7.3.0", "good-console": "^6.4.0", "good-squeeze": "^5.0.2", - "graphql-playground": "^1.0.8", - "graphql-tools": "^2.3.0", + "graphql-playground": "^1.0.33", + "graphql-tools": "^2.6.1", "graphql-voyager": "^1.0.0-rc.9", "hapi": "^16.6.2", "hasha": "^3.0.0", @@ -41,10 +41,10 @@ "triton": "^5.4.0" }, "devDependencies": { - "eslint": "^4.8.0", - "eslint-config-joyent-portal": "3.1.0", + "eslint": "^4.9.0", + "eslint-config-joyent-portal": "^3.2.0", "eslint-plugin-graphql": "^1.4.0-1", - "graphql-faker": "^1.4.0", + "graphql-faker": "^1.5.0", "nodemon": "^1.12.1", "prettier": "^1.7.4" }, diff --git a/packages/my-joy-beta/.eslintrc b/packages/my-joy-beta/.eslintrc index c3898f24..8dbd2da5 100644 --- a/packages/my-joy-beta/.eslintrc +++ b/packages/my-joy-beta/.eslintrc @@ -7,6 +7,7 @@ // temp "no-undef": 1, "no-debugger": 1, - "no-negated-condition": 0 + "no-negated-condition": 0, + "jsx-a11y/href-no-hash": 0 } } diff --git a/packages/my-joy-beta/package.json b/packages/my-joy-beta/package.json index f5b03194..ac37f14e 100644 --- a/packages/my-joy-beta/package.json +++ b/packages/my-joy-beta/package.json @@ -9,23 +9,21 @@ "dev": "REACT_APP_GQL_PORT=4000 PORT=3069 REACT_APP_GQL_PROTOCOL=http joyent-react-scripts start", "start": "PORT=3069 joyent-react-scripts start", "build": "NODE_ENV=production joyent-react-scripts build", - "lint:css": "stylelint './src/**/*.js'", - "lint:js": "eslint . --fix", - "lint": "redrun -s lint:*", - "test": "NODE_ENV=test ./test/run --env=jsdom", + "lint-ci": "eslint . --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", + "lint": "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", "test-ci": "echo 0 `# NODE_ENV=test ./test/run --env=jsdom --coverage`", + "test": "NODE_ENV=test ./test/run --env=jsdom", "prepublish": "echo 0" }, "dependencies": { "@manaflair/redux-batch": "^0.1.0", "apollo": "^0.2.2", - "eslint-plugin-markdown": "^1.0.0-beta.6", - "joyent-ui-toolkit": "^2.0.0", + "joyent-ui-toolkit": "^2.0.1", "lodash.find": "^4.6.0", "lodash.get": "^4.4.2", "lodash.isstring": "^4.0.1", "lodash.sortby": "^4.7.0", - "lunr": "^2.1.3", + "lunr": "^2.1.4", "moment": "^2.19.1", "normalized-styled-components": "^1.0.17", "param-case": "^2.1.1", @@ -33,7 +31,7 @@ "react": "^16.0.0", "react-apollo": "^1.4.16", "react-dom": "^16.0.0", - "react-json-view": "^1.13.0", + "react-json-view": "^1.13.1", "react-redux": "^5.0.6", "react-router": "^4.2.0", "react-router-dom": "^4.2.2", @@ -41,14 +39,14 @@ "redux-actions": "^2.2.1", "redux-form": "^7.1.1", "remcalc": "^1.0.9", - "styled-components": "^2.2.1", + "styled-components": "^2.2.2", "title-case": "^2.1.1" }, "devDependencies": { "babel-plugin-inline-react-svg": "^0.4.0", "babel-preset-joyent-portal": "^3.3.3", - "eslint": "^4.8.0", - "eslint-config-joyent-portal": "3.1.0", + "eslint": "^4.9.0", + "eslint-config-joyent-portal": "^3.2.0", "jest": "^21.2.1", "jest-alias-preprocessor": "^1.1.1", "jest-cli": "^21.2.1", @@ -56,12 +54,12 @@ "jest-junit": "^3.1.0", "jest-matcher-utils": "^21.2.1", "jest-snapshot": "^21.2.1", - "jest-styled-components": "^4.7.0", + "jest-styled-components": "^4.9.0", "jest-transform-graphql": "^2.1.0", - "joyent-react-scripts": "^2.2.1", + "joyent-react-scripts": "^2.6.0", "react-test-renderer": "^16.0.0", "redrun": "^5.9.18", - "serve": "^6.2.0", + "serve": "^6.3.1", "stylelint": "^8.2.0", "stylelint-config-joyent-portal": "^2.0.1" } diff --git a/packages/my-joy-beta/src/components/instances/create-snapshot.js b/packages/my-joy-beta/src/components/instances/create-snapshot.js index bf60bc32..279b5f9a 100644 --- a/packages/my-joy-beta/src/components/instances/create-snapshot.js +++ b/packages/my-joy-beta/src/components/instances/create-snapshot.js @@ -16,12 +16,12 @@ export default ({ onCancel = () => {} }) => { const _error = error && - !submitting && ( - - Ooops! - {error} - - ); + !submitting && ( + + Ooops! + {error} + + ); return (
diff --git a/packages/my-joy-beta/src/components/instances/item.js b/packages/my-joy-beta/src/components/instances/item.js index 4f691049..6c76a729 100644 --- a/packages/my-joy-beta/src/components/instances/item.js +++ b/packages/my-joy-beta/src/components/instances/item.js @@ -8,10 +8,16 @@ import { CardTitle, CardLabel, CardView, + CardOptions, Checkbox, FormGroup, QueryBreakpoints, - StatusLoader + StatusLoader, + PopoverContainer, + PopoverTarget, + PopoverItem, + PopoverDivider, + Popover } from 'joyent-ui-toolkit'; const { SmallOnly, Small } = QueryBreakpoints; @@ -65,6 +71,18 @@ export default ({ name, state, primary_ip, loading, last, first }) => ( )} + + + + + + Scale + Restart + Stop + + Delete + + ); diff --git a/packages/my-joy-beta/src/components/instances/list.js b/packages/my-joy-beta/src/components/instances/list.js index 834b7dd1..cb5a3ebe 100644 --- a/packages/my-joy-beta/src/components/instances/list.js +++ b/packages/my-joy-beta/src/components/instances/list.js @@ -86,12 +86,12 @@ export default ({ ) : null; const _error = error && - !submitting && ( - - Ooops! - {error} - - ); + !submitting && ( + + Ooops! + {error} + + ); return ( diff --git a/packages/my-joy-beta/src/components/instances/snapshots.js b/packages/my-joy-beta/src/components/instances/snapshots.js index 2740cb6d..3788d9f0 100644 --- a/packages/my-joy-beta/src/components/instances/snapshots.js +++ b/packages/my-joy-beta/src/components/instances/snapshots.js @@ -51,11 +51,11 @@ export default ({ const _snapshots = forceArray(snapshots); const _loading = !_snapshots.length && - loading && ( - - - - ); + loading && ( + + + + ); const items = _snapshots.map((snapshot, i, all) => { const { name } = snapshot; @@ -75,12 +75,12 @@ export default ({ }); const _error = error && - !submitting && ( - - Ooops! - {error} - - ); + !submitting && ( + + Ooops! + {error} + + ); return ( - Ooops! - - An error occurred while loading your instance - - - ); + !instance && + !_loading && ( + + Ooops! + + An error occurred while loading your instance + + + ); const _form = !loading && - !_error && ( - - ); + !_error && ( + + ); return ( diff --git a/packages/my-joy-beta/src/containers/instances/snapshots.js b/packages/my-joy-beta/src/containers/instances/snapshots.js index 8417e643..df99ff38 100644 --- a/packages/my-joy-beta/src/containers/instances/snapshots.js +++ b/packages/my-joy-beta/src/containers/instances/snapshots.js @@ -43,15 +43,15 @@ const Snapshots = ({ const _loading = !_values.length && loading; const _error = error && - !_loading && - !_values.length && ( - - Ooops! - - An error occurred while loading your instance snapshots - - - ); + !_loading && + !_values.length && ( + + Ooops! + + An error occurred while loading your instance snapshots + + + ); return ( @@ -81,15 +81,13 @@ export default compose( const { name } = variables; const instance = find(get(rest, 'machines', []), ['name', name]); - const snapshots = get( - instance, - 'snapshots', - [] - ).map(({ created, updated, ...rest }) => ({ - ...rest, - created: moment.utc(created).unix(), - updated: moment.utc(updated).unix() - })); + const snapshots = get(instance, 'snapshots', []).map( + ({ created, updated, ...rest }) => ({ + ...rest, + created: moment.utc(created).unix(), + updated: moment.utc(updated).unix() + }) + ); const index = GenIndex( snapshots.map(({ name, ...rest }) => ({ ...rest, id: name })) diff --git a/packages/my-joy-beta/src/containers/instances/summary.js b/packages/my-joy-beta/src/containers/instances/summary.js index a937eaa6..30bd6267 100644 --- a/packages/my-joy-beta/src/containers/instances/summary.js +++ b/packages/my-joy-beta/src/containers/instances/summary.js @@ -24,15 +24,15 @@ const Summary = ({ instance, loading, error }) => { const _summary = !_loading && instance && ; const _error = error && - !_loading && - !instance && ( - - Ooops! - - An error occurred while loading your instance summary - - - ); + !_loading && + !instance && ( + + Ooops! + + An error occurred while loading your instance summary + + + ); return ( diff --git a/packages/ui-toolkit/.eslintrc b/packages/ui-toolkit/.eslintrc index f6ae023e..54492a1a 100644 --- a/packages/ui-toolkit/.eslintrc +++ b/packages/ui-toolkit/.eslintrc @@ -1,6 +1,7 @@ { "extends": "joyent-portal", "rules": { + "no-console": 1, "new-cap": 0, "jsx-a11y/href-no-hash": 0 } diff --git a/packages/ui-toolkit/README.md b/packages/ui-toolkit/README.md index 370ad785..57b116a7 100644 --- a/packages/ui-toolkit/README.md +++ b/packages/ui-toolkit/README.md @@ -21,6 +21,7 @@ yarn add --dev joyent-portal-ui-toolkit ## Usage ```js +import React from 'react'; import { H1 } from 'joyent-portal-ui-toolkit'; export default () =>

Hello World

; diff --git a/packages/ui-toolkit/etc/style.css b/packages/ui-toolkit/etc/style.css index 9a3496b5..e416d5de 100644 --- a/packages/ui-toolkit/etc/style.css +++ b/packages/ui-toolkit/etc/style.css @@ -1,4 +1,5 @@ @import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); +@import url('https://fonts.googleapis.com/css?family=Libre+Franklin'); body .rsg--sidebar-4 { padding: 36px 30px; diff --git a/packages/ui-toolkit/package.json b/packages/ui-toolkit/package.json index fb74e98f..ad0d2f16 100644 --- a/packages/ui-toolkit/package.json +++ b/packages/ui-toolkit/package.json @@ -1,25 +1,31 @@ { "name": "joyent-ui-toolkit", - "version": "2.0.0", + "version": "2.0.1", "license": "MPL-2.0", "repository": "github:yldio/joyent-portal", "main": "dist/umd/index.js", "jsnext:main": "dist/es/index.js", "module": "dist/es/index.js", "scripts": { - "lint:css": "echo 0", - "lint:js": "eslint . --fix", - "lint": "redrun -s lint:*", + "lint-ci": + "eslint . --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", + "lint": + "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", "test-ci": "echo 0", "test": "echo 0", "test:visual": "run-p serve jest", "jest": "jest", "serve": "http-server styleguide -p 6060 -s", - "copy-fonts": "rm -rf dist; mkdir -p dist/es/typography; mkdir -p dist/umd/typography; cp -r src/typography/libre-franklin dist/es/typography; cp -r src/typography/libre-franklin dist/umd/typography", - "compile-watch:es": "NODE_ENV=development babel src --out-dir dist/es --source-maps inline --watch", - "compile:es": "NODE_ENV=development babel src --out-dir dist/es --source-maps inline", - "compile:umd": "NODE_ENV=test babel src --out-dir dist/umd --source-maps inline", - "compile-watch:umd": "NODE_ENV=test babel src --out-dir dist/umd --source-maps inline --watch", + "copy-fonts": + "rm -rf dist; mkdir -p dist/es/typography; mkdir -p dist/umd/typography; cp -r src/typography/libre-franklin dist/es/typography; cp -r src/typography/libre-franklin dist/umd/typography", + "compile-watch:es": + "NODE_ENV=development babel src --out-dir dist/es --source-maps inline --watch", + "compile:es": + "NODE_ENV=development babel src --out-dir dist/es --source-maps inline", + "compile:umd": + "NODE_ENV=test babel src --out-dir dist/umd --source-maps inline", + "compile-watch:umd": + "NODE_ENV=test babel src --out-dir dist/umd --source-maps inline --watch", "compile": "redrun -p compile:*", "watch": "redrun copy-fonts && redrun -p compile-watch:*", "styleguide:build": "NODE_ENV=production styleguidist build", @@ -40,66 +46,52 @@ "prop-types": "^15.6.0", "react-bundle": "^1.0.4", "react-input-range": "^1.2.1", - "react-popper": "^0.7.3", - "react-responsive": "^2.0.0", + "react-popper": "^0.7.4", + "react-responsive": "^3.0.0", "react-styled-flexboxgrid": "^2.1.0", "redrun": "^5.9.18", "remcalc": "^1.0.9", "rnd-id": "^1.1.1", - "styled-components": "^2.2.1", + "styled-components": "^2.2.2", "styled-is": "^1.1.0", "unitcalc": "^1.1.1" }, "devDependencies": { "babel-cli": "^6.26.0", - "babel-core": "^6.26.0", - "babel-loader": "^7.1.2", - "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-inline-react-svg": "^0.4.0", "babel-plugin-lodash": "^3.2.11", "babel-plugin-transform-es3-member-expression-literals": "^6.22.0", "babel-plugin-transform-es3-property-literals": "^6.22.0", "babel-preset-es2015": "^6.24.1", "babel-preset-joyent-portal": "^3.3.3", - "babel-preset-stage-0": "^6.24.1", - "chart.js": "^2.7.0", - "codemirror": "^5.30.0", - "css-loader": "^0.28.7", + "codemirror": "^5.31.0", "eslint": "^4.9.0", - "eslint-config-joyent-portal": "3.1.0", - "file-loader": "^1.1.5", + "eslint-config-joyent-portal": "^3.2.0", "http-server": "^0.10.0", "jest": "^21.2.1", "jest-diff": "^21.2.1", "jest-image-snapshot": "^1.0.1", "jest-matcher-utils": "^21.2.1", "jest-snapshot": "^21.2.1", - "jest-styled-components": "^4.7.1", - "lodash-webpack-plugin": "^0.11.4", + "jest-styled-components": "^4.9.0", + "joyent-react-scripts": "^2.6.0", "navalia": "^1.2.0", "react": "^16.0.0", - "react-docgen": "^2.19.0", + "react-docgen": "^3.0.0-beta8", "react-docgen-displayname-handler": "^1.0.1", "react-dom": "^16.0.0", "react-redux": "^5.0.6", "react-router-dom": "^4.2.2", - "react-scripts": "^1.0.14", "react-styleguidist": "^6.0.31", "react-test-renderer": "^16.0.0", "redux": "^3.7.2", "redux-form": "^7.1.1", "serve-static": "^1.13.1", - "snapguidist": "^2.1.0", - "style-loader": "^0.19.0", "stylelint": "^8.2.0", "stylelint-config-joyent-portal": "^2.0.1", - "svg-inline-loader": "^0.8.0", - "uglifyjs-webpack-plugin": "^1.0.0-beta.3", - "url-loader": "^0.6.2", "webpack": "^3.8.1" }, "peerDependencies": { - "chart.js": "^2.7.0", "react": "^16.0.0", "react-dom": "^16.0.0", "react-router-dom": "^4.2.2", diff --git a/packages/ui-toolkit/src/baseline/readme.md b/packages/ui-toolkit/src/baseline/readme.md index 032537b8..56a6e32a 100644 --- a/packages/ui-toolkit/src/baseline/readme.md +++ b/packages/ui-toolkit/src/baseline/readme.md @@ -65,7 +65,8 @@ accordingly. #### examples ``` -const Button = require('../button').default; +const React = require('react'); +const { default: Button } = require('../button'); diff --git a/packages/ui-toolkit/src/boxes/index.js b/packages/ui-toolkit/src/boxes/index.js index 4530d597..9b6bec5e 100644 --- a/packages/ui-toolkit/src/boxes/index.js +++ b/packages/ui-toolkit/src/boxes/index.js @@ -2,18 +2,51 @@ import { css } from 'styled-components'; import remcalc from 'remcalc'; export const borderRadius = remcalc(4); -export const bottomShadow = `0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.05)`; -export const bottomShadowDarker = `0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.1)`; -export const insetShaddow = `inset 0 ${remcalc(3)} 0 0 rgba(0, 0, 0, 0.05)`; -export const tooltipShadow = `0 ${remcalc(2)} ${remcalc(6)} ${remcalc( - 1 -)} rgba(0, 0, 0, 0.1)`; -export const modalShadow = `0 0 ${remcalc(6)} ${remcalc(1)} rgba(0, 0, 0, 0.1)`; + +export const bottomShadow = ` + /* trick prettier */ + 0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.05) +`; + +export const bottomShadowDarker = ` + /* trick prettier */ + 0 ${remcalc(2)} 0 0 rgba(0, 0, 0, 0.1) +`; + +export const insetShadow = ` + /* trick prettier */ + inset 0 ${remcalc(3)} 0 0 rgba(0, 0, 0, 0.05) +`; + +export const tooltipShadow = ` + /* trick prettier */ + 0 ${remcalc(2)} ${remcalc(6)} ${remcalc(1)} rgba(0, 0, 0, 0.1) +`; + +export const modalShadow = ` + /* trick prettier */ + 0 0 ${remcalc(6)} ${remcalc(1)} rgba(0, 0, 0, 0.1) +`; export const border = { - checked: css`${remcalc(1)} solid ${props => props.theme.primary};`, - unchecked: css`${remcalc(1)} solid ${props => props.theme.grey};`, - confirmed: css`${remcalc(1)} solid ${props => props.theme.grey};`, - error: css`${remcalc(1)} solid ${props => props.theme.red};`, - secondary: css`${remcalc(1)} solid ${props => props.theme.secondaryActive};` + checked: css` + /* trick prettier */ + ${remcalc(1)} solid ${props => props.theme.primary}; + `, + unchecked: css` + /* trick prettier */ + ${remcalc(1)} solid ${props => props.theme.grey}; + `, + confirmed: css` + /* trick prettier */ + ${remcalc(1)} solid ${props => props.theme.grey}; + `, + error: css` + /* trick prettier */ + ${remcalc(1)} solid ${props => props.theme.red}; + `, + secondary: css` + /* trick prettier */ + ${remcalc(1)} solid ${props => props.theme.secondaryActive}; + ` }; diff --git a/packages/ui-toolkit/src/breadcrumb/usage.md b/packages/ui-toolkit/src/breadcrumb/usage.md index fd3973d6..4772f419 100644 --- a/packages/ui-toolkit/src/breadcrumb/usage.md +++ b/packages/ui-toolkit/src/breadcrumb/usage.md @@ -1,6 +1,7 @@ ``` -const Breadcrumb = require('./index.js').default; -const BreadcrumbItem = require('./item.js').default; +const React = require('react'); +const { default: Breadcrumb } = require('./index.js'); +const { default: BreadcrumbItem } = require('./item.js'); Home diff --git a/packages/ui-toolkit/src/button/usage.md b/packages/ui-toolkit/src/button/usage.md index ffa7ffc4..87f798a2 100644 --- a/packages/ui-toolkit/src/button/usage.md +++ b/packages/ui-toolkit/src/button/usage.md @@ -1,4 +1,7 @@ ```jsx +const React = require('react'); +const { default: Button } = require('./'); + @@ -9,6 +12,9 @@ #### Button > Secondary ```jsx +const React = require('react'); +const { default: Button } = require('./'); + @@ -21,6 +27,9 @@ #### Button > Tertiary ```jsx +const React = require('react'); +const { default: Button } = require('./'); + @@ -37,6 +46,9 @@ #### Button > Disabled ```jsx +const React = require('react'); +const { default: Button } = require('./'); + @@ -49,6 +61,9 @@ #### Button > Loading ```jsx +const React = require('react'); +const { default: Button } = require('./'); +