diff --git a/packages/ui-toolkit/etc/joyent-white.png b/packages/ui-toolkit/etc/joyent-white.png deleted file mode 100644 index 7dcb0232..00000000 Binary files a/packages/ui-toolkit/etc/joyent-white.png and /dev/null differ diff --git a/packages/ui-toolkit/etc/style.css b/packages/ui-toolkit/etc/style.css deleted file mode 100644 index 1e534934..00000000 --- a/packages/ui-toolkit/etc/style.css +++ /dev/null @@ -1,102 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); -@import url('https://fonts.googleapis.com/css?family=Libre+Franklin'); - -body { - overflow-x: hidden; -} - -body .rsg--sidebar-4 { - padding: 36px 30px; -} - -body h1.rsg--root-10, h2.rsg--root-10, h3.rsg--root-10, h3.rsg--para-24 { - margin-bottom: 0; - padding-bottom: 24px; -} - -main.rsg--content-3 { - padding-top: 60px; - max-width: 1400px; -} - -h4.rsg--h4-29, -h6.rsg--h6-31 { - margin-bottom: 0; - font-weight: 600; - padding-bottom: 12px; -} - -li.rsg--li-35 { - padding-bottom: 6px; -} - -p.rsg--p-32 { - margin-bottom: 0; - padding-bottom: 36px; -} - -.rsg--sidebar-4 a.rsg--link-48 { - color: #fff; - font-size: 15px; -} - -.rsg--sidebar-4 a.rsg--heading-71 { - font-size: 17px; - margin-bottom: 12px; - display: block; -} - -.rsg--sidebar-4 .rsg--logo-5 { - border: none; - padding: 0; -} - -.rsg--sidebar-4 .rsg--search-66 { - padding: 30px 0; -} - -.rsg--sidebar-4 .rsg--isChild-70 { - padding-left: 16px; -} - -.rsg--sidebar-4 .rsg--input-67 { - background: #FFFFFF; - border: 1px solid #D8D8D8; - box-sizing: border-box; - box-shadow: 0px 2px 0px rgba(0, 0, 0, 0.05), inset 0px 3px 0px rgba(0, 0, 0, 0.05); - border-radius: 4px; - box-shadow: none; - padding: 8px 16px; - width: 240px; - color: #494949; - height: 48px; -} - -.rsg--sidebar-4 .rsg--list-68 { - padding: 0; -} - - -.rsg--sidebar-4 ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ - color: #494949; - opacity: 0.5; -} -.rsg--sidebar-4 ::-moz-placeholder { /* Firefox 19+ */ - color: #494949; - opacity: 0.5; -} -.rsg--sidebar-4 :-ms-input-placeholder { /* IE 10+ */ - color: #494949; - opacity: 0.5; -} -.rsg--sidebar-4 :-moz-placeholder { /* Firefox 18- */ - color: #494949; - opacity: 0.5; -} -body .cm-s-base16-light.CodeMirror { - background: #fafafa; - color: #494949; - border-color: #d8d8d8; - padding: 9px 18px; - line-height: 16px; -} diff --git a/packages/ui-toolkit/package.json b/packages/ui-toolkit/package.json index ebd82915..04e5edf2 100644 --- a/packages/ui-toolkit/package.json +++ b/packages/ui-toolkit/package.json @@ -7,17 +7,20 @@ "jsnext:main": "dist/es/index.js", "module": "dist/es/index.js", "scripts": { - "lint-ci": "eslint . --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", - "lint": "eslint . --fix --ext .js --ext .md && echo 0 `# stylelint './src/**/*.js'`", + "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", - "compile:es": "babel src --out-dir dist/es", + "compile:es": "NODE_ENV='production' babel src --out-dir dist/es", "compile:umd": "UMD=1 babel src --out-dir dist/umd", "compile": "redrun -p compile:*", - "dev": "NODE_ENV=development npm run compile -- -- --watch --source-maps inline", + "dev": + "NODE_ENV=development npm run compile -- -- --watch --source-maps inline", "styleguide:build": "NODE_ENV=production styleguidist build", "styleguide": "NODE_ENV=development styleguidist server", "prepublish": "NODE_ENV=production npm run compile" diff --git a/packages/ui-toolkit/src/message/Readme.md b/packages/ui-toolkit/src/message/Readme.md index 0fcb37f7..2170f8a7 100644 --- a/packages/ui-toolkit/src/message/Readme.md +++ b/packages/ui-toolkit/src/message/Readme.md @@ -11,7 +11,7 @@ const { Message, Title, Description } = require('.'); sure that you choose the data center that suits your requirements. Learn more -; + ``` #### Error diff --git a/packages/ui-toolkit/src/message/index.js b/packages/ui-toolkit/src/message/index.js index b1ca3e2a..f6ec4b38 100644 --- a/packages/ui-toolkit/src/message/index.js +++ b/packages/ui-toolkit/src/message/index.js @@ -43,7 +43,7 @@ const Outlet = styled.div` const Close = styled(CloseButton)` position: absolute; right: ${unitcalc(0.5)}; - top: ${unitcalc(0.5)}; + margin: 0; `; export const Message = ({ onCloseClick, children, ...type }) => ( diff --git a/packages/ui-toolkit/src/popover/Readme.md b/packages/ui-toolkit/src/popover/Readme.md index 2dbe652c..0553a45a 100644 --- a/packages/ui-toolkit/src/popover/Readme.md +++ b/packages/ui-toolkit/src/popover/Readme.md @@ -3,7 +3,7 @@ const React = require('react'); const { default: Popover, Container, Target, Item, Divider } = require('./'); const { Row, Col } = require('react-styled-flexboxgrid'); - + Hello diff --git a/packages/ui-toolkit/src/popover/item.js b/packages/ui-toolkit/src/popover/item.js index b3c6eff9..73824388 100644 --- a/packages/ui-toolkit/src/popover/item.js +++ b/packages/ui-toolkit/src/popover/item.js @@ -1,20 +1,16 @@ import React, { Component } from 'react'; -import remcalc from 'remcalc'; import is, { isNot } from 'styled-is'; import PropTypes from 'prop-types'; - -import { H4 as BaseH4 } from '../text/headings'; +import styled from 'styled-components'; +import remcalc from 'remcalc'; import Baseline from '../baseline'; -const BaseItem = BaseH4.extend` - font-size: ${remcalc(16)}; - text-align: left; +const BaseItem = styled.span` + display: block; - font-style: normal; - font-weight: normal; - line-height: normal; - - color: ${props => props.theme.secondary}; + &:not(:last-child) { + margin-bottom: ${remcalc(12)}; + } ${isNot('disabled')` cursor: pointer; diff --git a/packages/ui-toolkit/src/styleguide/component.js b/packages/ui-toolkit/src/styleguide/component.js index 904d7074..81d5dc85 100644 --- a/packages/ui-toolkit/src/styleguide/component.js +++ b/packages/ui-toolkit/src/styleguide/component.js @@ -19,7 +19,7 @@ const Header = styled.header` const Main = styled.div` padding: ${remcalc(50)} ${remcalc(120)}; - h4 { + h4[class*='rsg--heading'] { margin: 0; line-height: ${remcalc(26)}; font-size: ${remcalc(21)}; diff --git a/packages/ui-toolkit/src/styleguide/section.js b/packages/ui-toolkit/src/styleguide/section.js index e573b268..833b47fe 100644 --- a/packages/ui-toolkit/src/styleguide/section.js +++ b/packages/ui-toolkit/src/styleguide/section.js @@ -33,7 +33,7 @@ export default allProps => { const Tag = depth === 2 ? CardStyled : 'div'; const TagMain = depth === 2 ? Main : 'div'; return ( - + {name && depth !== 1 && (
diff --git a/packages/ui-toolkit/src/styleguide/wrapper.js b/packages/ui-toolkit/src/styleguide/wrapper.js index f5a3e603..d6afcde7 100644 --- a/packages/ui-toolkit/src/styleguide/wrapper.js +++ b/packages/ui-toolkit/src/styleguide/wrapper.js @@ -1,11 +1,24 @@ import React from 'react'; -import { ThemeProvider } from 'styled-components'; +import { ThemeProvider, injectGlobal } from 'styled-components'; import theme from '../theme'; import Base from '../base'; import { RootContainer } from '../layout'; import 'codemirror/mode/jsx/jsx'; +injectGlobal` +@import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); +@import url('https://fonts.googleapis.com/css?family=Libre+Franklin'); + + button { + cursor: pointer; + } + + code, .CodeMirror-line * { + font-family: 'Roboto Mono'; + } +`; + const StyledBase = Base.extend` /* trick prettier */ background-color: transparent; diff --git a/packages/ui-toolkit/src/tooltip/Readme.md b/packages/ui-toolkit/src/tooltip/Readme.md index 58ee9e2b..a27b889b 100644 --- a/packages/ui-toolkit/src/tooltip/Readme.md +++ b/packages/ui-toolkit/src/tooltip/Readme.md @@ -3,7 +3,7 @@ const React = require('react'); const { default: Tooltip, Container, Target } = require('./'); const { Row, Col } = require('react-styled-flexboxgrid'); - + Hello @@ -47,7 +47,7 @@ const { default: Tooltip, Container, Target } = require('./'); const { Row, Col } = require('react-styled-flexboxgrid'); - + Hover here diff --git a/packages/ui-toolkit/styleguide.config.js b/packages/ui-toolkit/styleguide.config.js index 9e6d9633..81a24761 100644 --- a/packages/ui-toolkit/styleguide.config.js +++ b/packages/ui-toolkit/styleguide.config.js @@ -10,7 +10,6 @@ const path = require('path'); module.exports = { highlightTheme: 'base16-light', - require: [path.join(__dirname, 'etc/style.css')], webpackConfig: Object.assign(webpackConfig, { resolve: Object.assign(webpackConfig.resolve, { alias: Object.assign(webpackConfig.resolve.alias, {