diff --git a/bundle/package.json b/bundle/package.json index af9247ee..f9a41c4a 100644 --- a/bundle/package.json +++ b/bundle/package.json @@ -14,7 +14,7 @@ "dependencies": { "apr-main": "^4.0.3", "brule": "^3.1.0", - "cloudapi-gql": "^4.5.1", + "cloudapi-gql": "^4.6.0", "hapi": "^17.2.0", "inert": "^5.1.0", "joyent-navigation": "^1.0.0", diff --git a/commitlint.config.js b/commitlint.config.js index 79d62efb..5c048575 100644 --- a/commitlint.config.js +++ b/commitlint.config.js @@ -4,7 +4,7 @@ module.exports = { 'scope-enum': [ 2, 'always', - ['ui-toolkit', 'icons', 'my-joy-beta', 'navigation', 'bundle'] + ['ui-toolkit', 'icons', 'my-joy-beta', 'navigation', 'bundle', 'images'] ] } }; diff --git a/packages/images/.babelrc b/packages/images/.babelrc new file mode 100644 index 00000000..bc07a154 --- /dev/null +++ b/packages/images/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": "joyent-portal" +} diff --git a/packages/images/.eslintignore b/packages/images/.eslintignore new file mode 100644 index 00000000..0321eefc --- /dev/null +++ b/packages/images/.eslintignore @@ -0,0 +1,4 @@ +.nyc_output +coverage +dist +build \ No newline at end of file diff --git a/packages/images/.eslintrc b/packages/images/.eslintrc new file mode 100644 index 00000000..435e02c4 --- /dev/null +++ b/packages/images/.eslintrc @@ -0,0 +1,10 @@ +{ + "extends": "joyent-portal", + "rules": { + "no-console": 0, + "new-cap": 0, + "camelcase": 1, + "jsx-a11y/href-no-hash": 0, + "no-negated-condition": 0 + } +} diff --git a/packages/images/.gitignore b/packages/images/.gitignore new file mode 100644 index 00000000..0bb3d99c --- /dev/null +++ b/packages/images/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +/node_modules + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env +npm-debug.log* +yarn-debug.log* + +yarn-error.log* + +## Image Snapshots Diff + +**/__diff_output__ + diff --git a/packages/images/.tern-project b/packages/images/.tern-project new file mode 100644 index 00000000..8c5745d4 --- /dev/null +++ b/packages/images/.tern-project @@ -0,0 +1,15 @@ +{ + "libs": [ + "ecmascript", + "browser" + ], + "plugins": { + "doc_comment": true, + "local-scope": true, + "jsx": true, + "node": true, + "webpack": { + "configPath": "../../node_modules/joyent-react-scripts/src/webpack.config.dev.js" + } + } +} diff --git a/packages/images/.yarnclean b/packages/images/.yarnclean new file mode 100644 index 00000000..378eac25 --- /dev/null +++ b/packages/images/.yarnclean @@ -0,0 +1 @@ +build diff --git a/packages/images/README.md b/packages/images/README.md new file mode 100644 index 00000000..15c1af8e --- /dev/null +++ b/packages/images/README.md @@ -0,0 +1,20 @@ +# images + +[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg)](https://github.com/RichardLitt/standard-readme) + +## Table of Contents + +* [Usage](#usage) +* [License](#license) + +## Usage + +``` +npm run start +open http://0.0.0.0:3069 +``` + +## License + +MPL-2.0 diff --git a/packages/images/lib/index.js b/packages/images/lib/index.js new file mode 100644 index 00000000..7c81bee0 --- /dev/null +++ b/packages/images/lib/index.js @@ -0,0 +1,46 @@ +const Inert = require('inert'); +const Path = require('path'); +const Execa = require('execa'); +const { readFile } = require('mz/fs'); + +exports.register = async server => { + await Execa('npm', ['run', 'build'], { + cwd: Path.join(__dirname, '..'), + stdio: 'inherit' + }); + + const indexFile = await readFile( + Path.join(__dirname, '../build/index.html'), + 'utf-8' + ); + + await server.register(Inert); + + server.route([ + { + method: 'GET', + path: '/static/{path*}', + config: { + auth: false, + handler: { + directory: { + path: Path.join(__dirname, '../build/static/'), + redirectToSlash: true, + index: false + } + } + } + }, + { + method: '*', + path: '/{path*}', + config: { + handler: (request, h) => { + return h.response(indexFile).type('text/html'); + } + } + } + ]); +}; + +exports.pkg = require('../package.json'); diff --git a/packages/images/package.json b/packages/images/package.json new file mode 100644 index 00000000..1e1cd108 --- /dev/null +++ b/packages/images/package.json @@ -0,0 +1,49 @@ +{ + "name": "my-images-console", + "version": "1.0.0", + "license": "MPL-2.0", + "private": true, + "repository": "github:yldio/joyent-portal", + "main": "lib/index.js", + "scripts": { + "dev": "REACT_APP_GQL_PORT=4000 PORT=3070 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-ci": "eslint . --ext .js --ext .md", + "lint": "eslint . --fix --ext .js --ext .md", + "test-ci": "NODE_ENV=test joyent-react-scripts test --env=jsdom --testPathIgnorePatterns='.ui.js'", + "test": "DEFAULT_TIMEOUT_INTERVAL=100000 NODE_ENV=test joyent-react-scripts test --env=jsdom", + "prepublish": "echo 0" + }, + "dependencies": { + "@manaflair/redux-batch": "^0.1.0", + "apollo": "^0.2.2", + "date-fns": "^1.29.0", + "declarative-redux-form": "^2.0.8", + "joyent-ui-toolkit": "^5.0.0", + "lunr": "^2.1.5", + "mz": "^2.7.0", + "react": "^16.2.0", + "react-apollo": "^2.0.4", + "react-dom": "^16.2.0", + "react-redux": "^5.0.6", + "react-redux-values": "^1.1.2", + "react-router": "^4.2.0", + "react-router-dom": "^4.2.2", + "redux": "^3.7.2", + "redux-form": "^7.2.3", + "remcalc": "^1.0.10", + "styled-components-spacing": "^2.1.3", + "styled-flex-component": "^2.2.0" + }, + "devDependencies": { + "babel-preset-joyent-portal": "^6.0.3", + "eslint": "^4.16.0", + "eslint-config-joyent-portal": "^3.3.1", + "jest-image-snapshot": "^2.3.0", + "jest-styled-components": "^4.11.0-0", + "joyent-react-scripts": "^7.2.2", + "react-screenshot-renderer": "^1.1.2", + "react-test-renderer": "^16.2.0" + } +} diff --git a/packages/images/public/index.html b/packages/images/public/index.html new file mode 100644 index 00000000..4d61687c --- /dev/null +++ b/packages/images/public/index.html @@ -0,0 +1,36 @@ + + + + + + + + + + + My Joyent β + + + + + + + +
+ + + diff --git a/packages/images/public/manifest.json b/packages/images/public/manifest.json new file mode 100644 index 00000000..4372986a --- /dev/null +++ b/packages/images/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "Joyent", + "name": "My Joyent β", + "icons": [ + { + "src": "favicon.ico", + "sizes": "192x192", + "type": "image/png" + } + ], + "start_url": "./index.html", + "display": "standalone", + "theme_color": "#1E313B", + "background_color": "#FAFAFA" +} diff --git a/packages/images/src/app.js b/packages/images/src/app.js new file mode 100644 index 00000000..27e896a5 --- /dev/null +++ b/packages/images/src/app.js @@ -0,0 +1,21 @@ +import React from 'react'; +import { ThemeProvider } from 'styled-components'; +import { Provider as ReduxProvider } from 'react-redux'; +import { ApolloProvider } from 'react-apollo'; + +import { theme, RootContainer } from 'joyent-ui-toolkit'; + +import { client, store } from '@state/store'; +import Router from '@root/router'; + +export default () => ( + + + + + + + + + +); diff --git a/packages/images/src/components/menu.js b/packages/images/src/components/menu.js new file mode 100644 index 00000000..7de0b1ec --- /dev/null +++ b/packages/images/src/components/menu.js @@ -0,0 +1,48 @@ +import React from 'react'; +import { Margin } from 'styled-components-spacing'; +import { NavLink } from 'react-router-dom'; +import PropTypes from 'prop-types'; +import forceArray from 'force-array'; + +import { + SectionList, + SectionListItem, + SectionListAnchor, + ViewContainer +} from 'joyent-ui-toolkit'; + +const getMenuItems = (links = []) => + links.map(({ pathname, name }) => ( + + + {name} + + + )); + +const Menu = ({ links = [] }) => { + const _links = forceArray(links); + + if (!_links.length) { + return null; + } + + return ( + + + {getMenuItems(_links)} + + + ); +}; + +Menu.propTypes = { + links: PropTypes.arrayOf( + PropTypes.shape({ + name: PropTypes.string, + pathname: PropTypes.string + }) + ) +}; + +export default Menu; diff --git a/packages/images/src/components/summary.js b/packages/images/src/components/summary.js new file mode 100644 index 00000000..020549aa --- /dev/null +++ b/packages/images/src/components/summary.js @@ -0,0 +1,174 @@ +import React, { Fragment } from 'react'; +import { Row, Col } from 'joyent-react-styled-flexboxgrid'; +import { Margin, Padding } from 'styled-components-spacing'; +import styled, { withTheme } from 'styled-components'; +import Flex, { FlexItem } from 'styled-flex-component'; +import distanceInWordsToNow from 'date-fns/distance_in_words_to_now'; +import titleCase from 'title-case'; +import remcalc from 'remcalc'; + +import { + Card, + CardOutlet, + H2, + P, + Label, + Divider, + Button, + QueryBreakpoints, + CopiableField, + DuplicateIcon, + DeleteIcon, + DotIcon +} from 'joyent-ui-toolkit'; + +import { + Linux, + Freebsd, + Illumos, + Smart, + Windows, + Placeholder +} from 'joyent-logo-assets'; + +const { SmallOnly, Medium } = QueryBreakpoints; + +const VerticalDivider = styled.div` + width: ${remcalc(1)}; + background: ${props => props.theme.grey}; + height: ${remcalc(24)}; + display: flex; + align-self: flex-end; + margin: 0 ${remcalc(18)}; + + @media (max-width: ${remcalc(767)}) { + display: none; + } +`; + +const GreyLabel = styled(Label)` + opacity: 0.5; + padding-right: ${remcalc(3)}; +`; + +const ImageType = { + ZONE_DATASET: 'Hardware Virtual Machine', + LX_DATASET: 'Infrastructure Container', + ZVOL: 'Hardware Virtual Machine', + DOCKER: 'Docker Container', + OTHER: 'Hardware Virtual Machine' +}; + +const StateColor = { + ACTIVE: 'green', + UNACTIVATED: 'grey', + DISABLED: 'secondaryActive', + CREATING: 'primary', + FAILED: 'red' +}; + +const OS = { + SMARTOS: Smart, + LINUX: Linux, + WINDOWS: Windows, + BSD: Freebsd, + ILLUMOS: Illumos, + OTHER: Placeholder +}; + +export const Meta = ({ name, version, type, published_at, state, os }) => ( + + + + + {React.createElement(OS[os], { + width: '30', + height: '30' + })} + + + +

{name}

+
+
+ + + + + + + + Created: + + + + + + + + + + + + + +
+); + +export default withTheme(({ theme = {}, ...image }) => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

{image.description}

+
+ + + +
+
+
+ +
+)); diff --git a/packages/images/src/components/tags.js b/packages/images/src/components/tags.js new file mode 100644 index 00000000..04ef9757 --- /dev/null +++ b/packages/images/src/components/tags.js @@ -0,0 +1,24 @@ +import React from 'react'; +import { Margin } from 'styled-components-spacing'; + +import { TagItem, KeyValue } from 'joyent-ui-toolkit'; + +export const AddForm = props => ( + +); + +export const EditForm = props => ( + +); + +export default ({ norMargin, name, value, onClick, onRemoveClick, active }) => ( + + + {name ? `${name}: ${value}` : value} + + +); diff --git a/packages/images/src/components/toolbar.js b/packages/images/src/components/toolbar.js new file mode 100644 index 00000000..f3c740ed --- /dev/null +++ b/packages/images/src/components/toolbar.js @@ -0,0 +1,53 @@ +import React from 'react'; +import { Field } from 'redux-form'; +import Flex from 'styled-flex-component'; +import { Margin } from 'styled-components-spacing'; +import remcalc from 'remcalc'; + +import { + Button, + FormGroup, + Input, + FormLabel, + Divider +} from 'joyent-ui-toolkit'; + +export const Toolbar = ({ + searchable = true, + searchLabel = 'Filter', + searchPlaceholder = '', + action = false, + actionLabel = '', + actionable = false, + onActionClick +}) => ( + + + {searchLabel} + + + + + {action ? ( + + + + + ) : null} + +); + +export default ({ handleSubmit, ...rest }) => ( +
+ + + +); diff --git a/packages/images/src/containers/breadcrumb.js b/packages/images/src/containers/breadcrumb.js new file mode 100644 index 00000000..58293379 --- /dev/null +++ b/packages/images/src/containers/breadcrumb.js @@ -0,0 +1,33 @@ +import React from 'react'; +import { Link } from 'react-router-dom'; +import paramCase from 'param-case'; +import get from 'lodash.get'; + +import { Breadcrumb, BreadcrumbItem } from 'joyent-ui-toolkit'; + +export default ({ match }) => { + const image = get(match, 'params.image'); + + const links = [ + { + name: 'Images', + pathname: '/' + } + ] + .concat( + image && [ + { + name: paramCase(image), + pathname: `/${image}` + } + ] + ) + .filter(Boolean) + .map(({ name, pathname }) => ( + + {name} + + )); + + return {links}; +}; diff --git a/packages/images/src/containers/create.js b/packages/images/src/containers/create.js new file mode 100644 index 00000000..61cba9c0 --- /dev/null +++ b/packages/images/src/containers/create.js @@ -0,0 +1,3 @@ +import React from 'react'; + +export default () => (

hello world

); \ No newline at end of file diff --git a/packages/images/src/containers/list.js b/packages/images/src/containers/list.js new file mode 100644 index 00000000..d1288f7e --- /dev/null +++ b/packages/images/src/containers/list.js @@ -0,0 +1,68 @@ +import React, { Fragment } from 'react'; +import { compose, graphql } from 'react-apollo'; +import ReduxForm from 'declarative-redux-form'; +import { Link } from 'react-router-dom'; +import { Margin } from 'styled-components-spacing'; +import remcalc from 'remcalc'; + +import { + ViewContainer, + Divider, + Anchor, + StatusLoader, + Message, + MessageTitle, + MessageDescription +} from 'joyent-ui-toolkit'; + +import ToolbarForm from '@components/toolbar'; +import ListImages from '@graphql/list-images.gql'; + +// const TABLE_FORM_NAME = 'images-list-table'; +const MENU_FORM_NAME = 'images-list-menu'; + +export const List = ({ images = [], loading = false, error = null }) => ( + + + + {props => } + + {loading && !images.length ? ( + + + + + ) : null} + {error && !images.length && !loading ? ( + + + Ooops! + + An error occurred while loading your instances + + + + ) : null} +
    + {images.map(({ name }) => ( +
  • + + {name} + +
  • + ))} +
+
+); + +export default compose( + graphql(ListImages, { + props: ({ data: { images, loading, error, refetch } }) => { + return { + images, + loading, + error + }; + } + }) +)(List); diff --git a/packages/images/src/containers/menu.js b/packages/images/src/containers/menu.js new file mode 100644 index 00000000..04853cfc --- /dev/null +++ b/packages/images/src/containers/menu.js @@ -0,0 +1,21 @@ +import React from 'react'; +import get from 'lodash.get'; + +import Menu from '@components/menu'; + +const SECTIONS = [ + { name: 'Summary', pathname: 'summary' }, + { name: 'Tags', pathname: 'tags' } +]; + +export default ({ match }) => { + const imageSlug = get(match, 'params.image'); + const sections = imageSlug ? SECTIONS : []; + + const links = sections.map(({ name, pathname }) => ({ + name, + pathname: `/${imageSlug}/${pathname}` + })); + + return ; +}; diff --git a/packages/images/src/containers/summary.js b/packages/images/src/containers/summary.js new file mode 100644 index 00000000..57199fac --- /dev/null +++ b/packages/images/src/containers/summary.js @@ -0,0 +1,57 @@ +import React, { Fragment } from 'react'; +import { compose, graphql } from 'react-apollo'; +import { Margin } from 'styled-components-spacing'; +import find from 'lodash.find'; +import get from 'lodash.get'; +import remcalc from 'remcalc'; + +import { + ViewContainer, + StatusLoader, + Divider, + Message, + MessageTitle, + MessageDescription +} from 'joyent-ui-toolkit'; + +import ImageSummary from '@components/summary'; +import GetImage from '@graphql/get-image.gql'; + +export const Summary = ({ image, loading = false, error = null }) => ( + + {loading && !image ? ( + + + + + ) : null} + {error && !loading && !image ? ( + + + Ooops! + + An error occurred while loading your instance summary + + + + ) : null} + {image ? : null} + +); + +export default compose( + graphql(GetImage, { + options: ({ match }) => ({ + variables: { + name: get(match, 'params.image') + } + }), + props: ({ + data: { loading = false, error = null, variables, ...rest } + }) => ({ + image: find(get(rest, 'images', []), ['name', variables.name]), + loading, + error + }) + }) +)(Summary); diff --git a/packages/images/src/containers/tags.js b/packages/images/src/containers/tags.js new file mode 100644 index 00000000..f6672c5d --- /dev/null +++ b/packages/images/src/containers/tags.js @@ -0,0 +1,87 @@ +import React from 'react'; +import { compose, graphql } from 'react-apollo'; +import { Margin } from 'styled-components-spacing'; +import ReduxForm from 'declarative-redux-form'; +import find from 'lodash.find'; +import get from 'lodash.get'; +import remcalc from 'remcalc'; + +import { + H3, + ViewContainer, + StatusLoader, + Divider, + Message, + MessageTitle, + MessageDescription, + TagList +} from 'joyent-ui-toolkit'; + +import Tag from '@components/tags'; +import ToolbarForm from '@components/toolbar'; +import GetTags from '@graphql/get-tags.gql'; + +const MENU_FORM_NAME = 'image-tags-list-menu'; + +export const Tags = ({ tags = [], loading = false, error = null }) => ( + + + {props => ( + + + + + )} + + {error && !loading && !tags.length ? ( + + + Ooops! + + An error occurred while loading your instance tags + + + + ) : null} + {!loading ? ( + +

+ {tags.length} tag{tags.length === 1 ? '' : 's'} +

+
+ ) : null} + {loading && !tags.length ? : null} + + {tags.map(({ name, value }) => ( + + ))} + +
+); + +export default compose( + graphql(GetTags, { + options: ({ match }) => ({ + variables: { + name: get(match, 'params.image') + } + }), + props: ({ + data: { loading = false, error = null, variables, ...rest } + }) => ({ + tags: get( + find(get(rest, 'images', []), ['name', variables.name]), + 'tags', + [] + ), + loading, + error + }) + }) +)(Tags); diff --git a/packages/images/src/graphql/get-image.gql b/packages/images/src/graphql/get-image.gql new file mode 100644 index 00000000..df298c7f --- /dev/null +++ b/packages/images/src/graphql/get-image.gql @@ -0,0 +1,19 @@ +query image($name: String) { + images(name: $name) { + id + name + os + version + description + type + homepage + published_at + owner + public + state + error { + code + message + } + } +} diff --git a/packages/images/src/graphql/get-tags.gql b/packages/images/src/graphql/get-tags.gql new file mode 100644 index 00000000..76bbbcfb --- /dev/null +++ b/packages/images/src/graphql/get-tags.gql @@ -0,0 +1,11 @@ +query image($name: String) { + images(name: $name) { + id + name + tags { + id + name + value + } + } +} diff --git a/packages/images/src/graphql/list-images.gql b/packages/images/src/graphql/list-images.gql new file mode 100644 index 00000000..82b3f355 --- /dev/null +++ b/packages/images/src/graphql/list-images.gql @@ -0,0 +1,18 @@ +query images { + images(public: false) { + id + name + os + version + type + homepage + published_at + owner + public + state + error { + code + message + } + } +} diff --git a/packages/images/src/index.js b/packages/images/src/index.js new file mode 100644 index 00000000..9d35a45d --- /dev/null +++ b/packages/images/src/index.js @@ -0,0 +1,15 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import isFunction from 'lodash.isfunction'; +import isFinite from 'lodash.isfinite'; + +import { register } from './sw'; +import App from './app'; + +if (!isFunction(Number.isFinite)) { + Number.isFinite = isFinite; +} + +ReactDOM.render(, document.getElementById('root')); + +register(); diff --git a/packages/images/src/mocks/__aliases__.js b/packages/images/src/mocks/__aliases__.js new file mode 100644 index 00000000..f053ebf7 --- /dev/null +++ b/packages/images/src/mocks/__aliases__.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/packages/images/src/router.js b/packages/images/src/router.js new file mode 100644 index 00000000..6fde69e6 --- /dev/null +++ b/packages/images/src/router.js @@ -0,0 +1,42 @@ +import React from 'react'; +import { BrowserRouter, Route, Switch, Redirect } from 'react-router-dom'; +import get from 'lodash.get'; + +import { PageContainer } from 'joyent-ui-toolkit'; +import Breadcrumb from '@containers/breadcrumb'; +import Menu from '@containers/menu'; +import List from '@containers/list'; +import Summary from '@containers/summary'; +import Create from '@containers/create'; +import Tags from '@containers/tags'; + +export default () => ( + + + {/* Breadcrumb */} + + + + + {/* Menu */} + + null} /> + + + {/* Images */} + + + + + + ( + + )} + /> + + + +); diff --git a/packages/images/src/state/gen-index.js b/packages/images/src/state/gen-index.js new file mode 100644 index 00000000..327982f0 --- /dev/null +++ b/packages/images/src/state/gen-index.js @@ -0,0 +1,16 @@ +import Lunr from 'lunr'; + +Lunr.tokenizer.separator = /[\s\-|_]+/; + +export default items => + Lunr(function() { + const fields = items + .map(item => Object.keys(item)) + .reduce((all, keys) => all.concat(keys), []) + // eslint-disable-next-line no-implicit-coercion + .reduce((all, key) => (~all.indexOf(key) ? all : all.concat(key)), []) + .filter(key => !key.match(/^__/)); + + fields.forEach(field => this.field(field)); + items.forEach(item => this.add(item)); + }); diff --git a/packages/images/src/state/parse-error.js b/packages/images/src/state/parse-error.js new file mode 100644 index 00000000..a42ee0d6 --- /dev/null +++ b/packages/images/src/state/parse-error.js @@ -0,0 +1,4 @@ +export default ({ graphQLErrors = [], message = '' }) => + graphQLErrors.length + ? graphQLErrors.map(({ message }) => message).join('\n') + : message; diff --git a/packages/images/src/state/store.js b/packages/images/src/state/store.js new file mode 100644 index 00000000..380e1ee2 --- /dev/null +++ b/packages/images/src/state/store.js @@ -0,0 +1,39 @@ +import { reduxBatch } from '@manaflair/redux-batch'; +import { createStore, combineReducers, compose } from 'redux'; +import { reducer as formReducer } from 'redux-form'; +import { ApolloClient } from 'apollo-client'; +import { HttpLink } from 'apollo-link-http'; +import { InMemoryCache } from 'apollo-cache-inmemory'; +import { reducer as valuesReducer } from 'react-redux-values'; + +const { + REACT_APP_GQL_PORT = 443, + REACT_APP_GQL_PROTOCOL = 'https', + REACT_APP_GQL_HOSTNAME = window.location.hostname +} = process.env; + +export const client = new ApolloClient({ + cache: new InMemoryCache(), + link: new HttpLink({ + uri: `${REACT_APP_GQL_PROTOCOL}://${REACT_APP_GQL_HOSTNAME}:${REACT_APP_GQL_PORT}/graphql` + }) +}); + +const initialState = {}; + +export const store = createStore( + combineReducers({ + values: valuesReducer, + form: formReducer, + ui: (state = {}) => state + }), + initialState, + compose( + reduxBatch, + // If you are using the devToolsExtension, you can add it here also + // eslint-disable-next-line no-negated-condition + typeof window.__REDUX_DEVTOOLS_EXTENSION__ !== 'undefined' + ? window.__REDUX_DEVTOOLS_EXTENSION__() + : f => f + ) +); diff --git a/packages/images/src/sw.js b/packages/images/src/sw.js new file mode 100644 index 00000000..eb7a28cf --- /dev/null +++ b/packages/images/src/sw.js @@ -0,0 +1,108 @@ +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export function register() { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (!isLocalhost) { + // Is not local host. Just register service worker + registerValidSW(swUrl); + } else { + // This is running on localhost. Lets check if a service worker still exists or not. + checkValidServiceWorker(swUrl); + } + }); + } +} + +function registerValidSW(swUrl) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + if ( + response.status === 404 || + response.headers.get('content-type').indexOf('javascript') === -1 + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then(registration => { + registration.unregister(); + }); + } +} diff --git a/packages/logos/.babelrc b/packages/logos/.babelrc new file mode 100644 index 00000000..594acfe3 --- /dev/null +++ b/packages/logos/.babelrc @@ -0,0 +1,3 @@ +{ + "presets": ["joyent-portal"] +} diff --git a/packages/logos/.dockerignore b/packages/logos/.dockerignore new file mode 100644 index 00000000..06ad4916 --- /dev/null +++ b/packages/logos/.dockerignore @@ -0,0 +1,9 @@ +src/components/base/*.css +node_modules +coverage +.nyc_output +docs/static +!docs/static/index.html +docs/node_modules +dist +package-lock.json diff --git a/packages/logos/.eslintignore b/packages/logos/.eslintignore new file mode 100644 index 00000000..0dd1156c --- /dev/null +++ b/packages/logos/.eslintignore @@ -0,0 +1,4 @@ +.nyc_output +coverage +dist +styleguide \ No newline at end of file diff --git a/packages/logos/.eslintrc b/packages/logos/.eslintrc new file mode 100644 index 00000000..54492a1a --- /dev/null +++ b/packages/logos/.eslintrc @@ -0,0 +1,8 @@ +{ + "extends": "joyent-portal", + "rules": { + "no-console": 1, + "new-cap": 0, + "jsx-a11y/href-no-hash": 0 + } +} diff --git a/packages/logos/.tern-project b/packages/logos/.tern-project new file mode 100644 index 00000000..b4542e69 --- /dev/null +++ b/packages/logos/.tern-project @@ -0,0 +1,12 @@ +{ + "libs": [ + "ecmascript", + "browser" + ], + "plugins": { + "doc_comment": true, + "local-scope": true, + "jsx": true, + "node": true + } +} diff --git a/packages/logos/.yarnclean b/packages/logos/.yarnclean new file mode 100644 index 00000000..e69de29b diff --git a/packages/logos/README.md b/packages/logos/README.md new file mode 100644 index 00000000..805697ee --- /dev/null +++ b/packages/logos/README.md @@ -0,0 +1,29 @@ +# joyent-icons + +[![License: MPL 2.0](https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg)](https://opensource.org/licenses/MPL-2.0) +[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg)](https://github.com/RichardLitt/standard-readme) + +## Table of Contents + +* [Install](#install) +* [Usage](#usage) +* [License](#license) + +## Install + +``` +yarn add --dev joyent-icons +``` + +## Usage + +```js +import React from 'react'; +import { Arrow } from 'joyent-icons'; + +export default () => ; +``` + +## License + +MPL-2.0 diff --git a/packages/logos/assets/alpine.svg b/packages/logos/assets/alpine.svg new file mode 100644 index 00000000..c4e89cfd --- /dev/null +++ b/packages/logos/assets/alpine.svg @@ -0,0 +1 @@ +Artboard 1 copy 6 diff --git a/packages/logos/assets/apache.svg b/packages/logos/assets/apache.svg new file mode 100644 index 00000000..0520c3b0 --- /dev/null +++ b/packages/logos/assets/apache.svg @@ -0,0 +1 @@ +Artboard 1 copy 13 diff --git a/packages/logos/assets/brocade.svg b/packages/logos/assets/brocade.svg new file mode 100644 index 00000000..c8055720 --- /dev/null +++ b/packages/logos/assets/brocade.svg @@ -0,0 +1 @@ +Artboard 1 copy 14 diff --git a/packages/logos/assets/cassandra.svg b/packages/logos/assets/cassandra.svg new file mode 100644 index 00000000..41c42092 --- /dev/null +++ b/packages/logos/assets/cassandra.svg @@ -0,0 +1 @@ +Artboard 1 copy 15 diff --git a/packages/logos/assets/centos.svg b/packages/logos/assets/centos.svg new file mode 100644 index 00000000..19540996 --- /dev/null +++ b/packages/logos/assets/centos.svg @@ -0,0 +1 @@ +Artboard 1 diff --git a/packages/logos/assets/couchbase.svg b/packages/logos/assets/couchbase.svg new file mode 100644 index 00000000..a759b170 --- /dev/null +++ b/packages/logos/assets/couchbase.svg @@ -0,0 +1 @@ +Artboard 1 copy 7 diff --git a/packages/logos/assets/debian.svg b/packages/logos/assets/debian.svg new file mode 100644 index 00000000..df713340 --- /dev/null +++ b/packages/logos/assets/debian.svg @@ -0,0 +1 @@ +Artboard 1 copy diff --git a/packages/logos/assets/fedora.svg b/packages/logos/assets/fedora.svg new file mode 100644 index 00000000..c2b7cf56 --- /dev/null +++ b/packages/logos/assets/fedora.svg @@ -0,0 +1 @@ +Artboard 1 copy 2 \ No newline at end of file diff --git a/packages/logos/assets/freebsd.svg b/packages/logos/assets/freebsd.svg new file mode 100755 index 00000000..cf420559 --- /dev/null +++ b/packages/logos/assets/freebsd.svg @@ -0,0 +1 @@ +Artboard 1 copy 3 \ No newline at end of file diff --git a/packages/logos/assets/ghost.svg b/packages/logos/assets/ghost.svg new file mode 100644 index 00000000..4a9e2370 --- /dev/null +++ b/packages/logos/assets/ghost.svg @@ -0,0 +1 @@ +Artboard 1 copy 16 diff --git a/packages/logos/assets/illumos.svg b/packages/logos/assets/illumos.svg new file mode 100755 index 00000000..3725f8c3 --- /dev/null +++ b/packages/logos/assets/illumos.svg @@ -0,0 +1 @@ +Illumos \ No newline at end of file diff --git a/packages/logos/assets/java.svg b/packages/logos/assets/java.svg new file mode 100644 index 00000000..f0ba2899 --- /dev/null +++ b/packages/logos/assets/java.svg @@ -0,0 +1 @@ +Artboard 1 copy 17 diff --git a/packages/logos/assets/linux.svg b/packages/logos/assets/linux.svg new file mode 100755 index 00000000..5dd1b15b --- /dev/null +++ b/packages/logos/assets/linux.svg @@ -0,0 +1 @@ +Linux \ No newline at end of file diff --git a/packages/logos/assets/mariadb.svg b/packages/logos/assets/mariadb.svg new file mode 100644 index 00000000..8de3aaa2 --- /dev/null +++ b/packages/logos/assets/mariadb.svg @@ -0,0 +1 @@ +Artboard 1 copy 18 diff --git a/packages/logos/assets/mongodb.svg b/packages/logos/assets/mongodb.svg new file mode 100644 index 00000000..5bf582e2 --- /dev/null +++ b/packages/logos/assets/mongodb.svg @@ -0,0 +1 @@ +Artboard 1 copy 8 diff --git a/packages/logos/assets/multiarch.svg b/packages/logos/assets/multiarch.svg new file mode 100644 index 00000000..d13493e8 --- /dev/null +++ b/packages/logos/assets/multiarch.svg @@ -0,0 +1 @@ +Artboard 1 copy 43 diff --git a/packages/logos/assets/mysql.svg b/packages/logos/assets/mysql.svg new file mode 100644 index 00000000..db3e33c5 --- /dev/null +++ b/packages/logos/assets/mysql.svg @@ -0,0 +1 @@ +Artboard 1 copy 19 diff --git a/packages/logos/assets/nginx.svg b/packages/logos/assets/nginx.svg new file mode 100644 index 00000000..a0bc64a6 --- /dev/null +++ b/packages/logos/assets/nginx.svg @@ -0,0 +1 @@ +Artboard 1 copy 9 diff --git a/packages/my-joy-beta/src/assets/no-packages.svg b/packages/logos/assets/no-packages.svg similarity index 100% rename from packages/my-joy-beta/src/assets/no-packages.svg rename to packages/logos/assets/no-packages.svg diff --git a/packages/logos/assets/node.svg b/packages/logos/assets/node.svg new file mode 100644 index 00000000..9734a4aa --- /dev/null +++ b/packages/logos/assets/node.svg @@ -0,0 +1 @@ +Nodejs \ No newline at end of file diff --git a/packages/logos/assets/openbsd.svg b/packages/logos/assets/openbsd.svg new file mode 100755 index 00000000..90bb151d --- /dev/null +++ b/packages/logos/assets/openbsd.svg @@ -0,0 +1 @@ +Artboard 1 copy 46 \ No newline at end of file diff --git a/packages/logos/assets/percona.svg b/packages/logos/assets/percona.svg new file mode 100644 index 00000000..cefb4459 --- /dev/null +++ b/packages/logos/assets/percona.svg @@ -0,0 +1 @@ +Artboard 1 copy 11 diff --git a/packages/logos/assets/placeholder.svg b/packages/logos/assets/placeholder.svg new file mode 100644 index 00000000..0e5ed8ef --- /dev/null +++ b/packages/logos/assets/placeholder.svg @@ -0,0 +1 @@ +Artboard 1 copy 45 diff --git a/packages/logos/assets/postgresql.svg b/packages/logos/assets/postgresql.svg new file mode 100644 index 00000000..636e8bf5 --- /dev/null +++ b/packages/logos/assets/postgresql.svg @@ -0,0 +1 @@ +Artboard 1 copy 12 diff --git a/packages/logos/assets/redis.svg b/packages/logos/assets/redis.svg new file mode 100644 index 00000000..20b696cb --- /dev/null +++ b/packages/logos/assets/redis.svg @@ -0,0 +1 @@ +Artboard 1 copy 20 diff --git a/packages/logos/assets/scylladb.svg b/packages/logos/assets/scylladb.svg new file mode 100644 index 00000000..d8f0664e --- /dev/null +++ b/packages/logos/assets/scylladb.svg @@ -0,0 +1 @@ +Artboard 1 copy 44 diff --git a/packages/logos/assets/smart.svg b/packages/logos/assets/smart.svg new file mode 100644 index 00000000..d13493e8 --- /dev/null +++ b/packages/logos/assets/smart.svg @@ -0,0 +1 @@ +Artboard 1 copy 43 diff --git a/packages/logos/assets/ubuntu.svg b/packages/logos/assets/ubuntu.svg new file mode 100644 index 00000000..2edec6ea --- /dev/null +++ b/packages/logos/assets/ubuntu.svg @@ -0,0 +1 @@ +Artboard 1 copy 4 diff --git a/packages/logos/assets/windows.svg b/packages/logos/assets/windows.svg new file mode 100644 index 00000000..b54071b4 --- /dev/null +++ b/packages/logos/assets/windows.svg @@ -0,0 +1 @@ +Artboard 1 copy 5 diff --git a/packages/logos/convert.js b/packages/logos/convert.js new file mode 100644 index 00000000..c9aa4e8c --- /dev/null +++ b/packages/logos/convert.js @@ -0,0 +1,49 @@ +const HTMLtoJSX = require('htmltojsx'); +const { default: forEach } = require('apr-for-each'); +const main = require('apr-main'); +const pascalCase = require('pascal-case'); +const { readFile, writeFile } = require('mz/fs'); +const execa = require('execa'); +const globby = require('globby'); +const path = require('path'); + +const ASSETS_ROOT = path.join(__dirname, 'assets'); +const SRC_ROOT = path.join(__dirname, 'src'); + +const converter = new HTMLtoJSX({ + createClass: false +}); + +main(async () => { + const files = await globby(`${ASSETS_ROOT}/*.svg`); + + await forEach(files, async file => { + const svg = await readFile(file, 'utf-8'); + const jsx = converter.convert(svg); + + const header = jsx.match(/(^]*)/ig)[0]; + + await writeFile( + file.replace(/logos\/assets\//, '/logos/src/').replace(/\.svg$/, '.js'), + ` + import React from 'react'; + + export default (props) => (${jsx.replace(header, `${header} {...props}`)}); + ` + ); + }); + + await writeFile( + path.join(SRC_ROOT, 'index.js'), + files + .map(file => { + const name = path.basename(file).replace(/\.svg$/, ''); + return `export { default as ${pascalCase(name)} } from './${name}'`; + }) + .join('\n') + ); + + await execa('prettier', ['--write', '--single-quote', 'src/*.js'], { + cwd: __dirname + }); +}); diff --git a/packages/logos/package.json b/packages/logos/package.json new file mode 100644 index 00000000..bf751902 --- /dev/null +++ b/packages/logos/package.json @@ -0,0 +1,37 @@ +{ + "name": "joyent-logo-assets", + "version": "1.0.0", + "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": { + "test-ci": "redrun -s test", + "test": "NODE_ENV=test joyent-react-scripts test --env=jsdom", + "compile:es": "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", + "prepublish": "NODE_ENV=production npm run compile" + }, + "devDependencies": { + "apr-for-each": "^3.0.3", + "apr-main": "^4.0.3", + "babel-cli": "^6.26.0", + "babel-preset-joyent-portal": "^6.0.3", + "eslint": "^4.16.0", + "eslint-config-joyent-portal": "^3.3.1", + "execa": "^0.9.0", + "globby": "^7.1.1", + "htmltojsx": "^0.3.0", + "joyent-react-scripts": "^7.2.2", + "mz": "^2.7.0", + "prettier": "^1.10.2", + "react": "^16.2.0", + "redrun": "^5.10.0" + }, + "peerDependencies": { + "react": "^16.2.0" + } +} diff --git a/packages/logos/src/Illumos.js b/packages/logos/src/Illumos.js new file mode 100644 index 00000000..1986203a --- /dev/null +++ b/packages/logos/src/Illumos.js @@ -0,0 +1,18 @@ +import React from 'react'; + +export default props => ( + + Illumos + + + + + + +); diff --git a/packages/logos/src/Linux.js b/packages/logos/src/Linux.js new file mode 100644 index 00000000..53f01f01 --- /dev/null +++ b/packages/logos/src/Linux.js @@ -0,0 +1,24 @@ +import React from 'react'; + +export default props => ( + + + + + Linux + + + + + + +); diff --git a/packages/logos/src/alpine.js b/packages/logos/src/alpine.js new file mode 100644 index 00000000..5992a50c --- /dev/null +++ b/packages/logos/src/alpine.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 6 + + +); diff --git a/packages/logos/src/apache.js b/packages/logos/src/apache.js new file mode 100644 index 00000000..d32a9716 --- /dev/null +++ b/packages/logos/src/apache.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 13 + + +); diff --git a/packages/logos/src/brocade.js b/packages/logos/src/brocade.js new file mode 100644 index 00000000..5145a30f --- /dev/null +++ b/packages/logos/src/brocade.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 14 + + +); diff --git a/packages/logos/src/cassandra.js b/packages/logos/src/cassandra.js new file mode 100644 index 00000000..0c81f516 --- /dev/null +++ b/packages/logos/src/cassandra.js @@ -0,0 +1,29 @@ +import React from 'react'; + +export default props => ( + + + + + Artboard 1 copy 15 + + + + +); diff --git a/packages/logos/src/centos.js b/packages/logos/src/centos.js new file mode 100644 index 00000000..9c7dc3ed --- /dev/null +++ b/packages/logos/src/centos.js @@ -0,0 +1,107 @@ +import React from 'react'; + +export default props => ( + + + + + Artboard 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); diff --git a/packages/logos/src/couchbase.js b/packages/logos/src/couchbase.js new file mode 100644 index 00000000..247f959e --- /dev/null +++ b/packages/logos/src/couchbase.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 7 + + +); diff --git a/packages/logos/src/debian.js b/packages/logos/src/debian.js new file mode 100644 index 00000000..895e70eb --- /dev/null +++ b/packages/logos/src/debian.js @@ -0,0 +1,25 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy + + + + +); diff --git a/packages/logos/src/fedora.js b/packages/logos/src/fedora.js new file mode 100644 index 00000000..09492cae --- /dev/null +++ b/packages/logos/src/fedora.js @@ -0,0 +1,33 @@ +import React from 'react'; + +export default props => ( + + + + + Artboard 1 copy 2 + + + + +); diff --git a/packages/logos/src/freebsd.js b/packages/logos/src/freebsd.js new file mode 100644 index 00000000..4fc5250b --- /dev/null +++ b/packages/logos/src/freebsd.js @@ -0,0 +1,16 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 3 + + + +); diff --git a/packages/logos/src/ghost.js b/packages/logos/src/ghost.js new file mode 100644 index 00000000..78d83336 --- /dev/null +++ b/packages/logos/src/ghost.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 16 + + +); diff --git a/packages/logos/src/index.js b/packages/logos/src/index.js new file mode 100644 index 00000000..4b7e6a69 --- /dev/null +++ b/packages/logos/src/index.js @@ -0,0 +1,29 @@ +export { default as Alpine } from './alpine'; +export { default as Apache } from './apache'; +export { default as Brocade } from './brocade'; +export { default as Cassandra } from './cassandra'; +export { default as Centos } from './centos'; +export { default as Couchbase } from './couchbase'; +export { default as Debian } from './debian'; +export { default as Fedora } from './fedora'; +export { default as Freebsd } from './freebsd'; +export { default as Ghost } from './ghost'; +export { default as Illumos } from './illumos'; +export { default as Java } from './java'; +export { default as Linux } from './linux'; +export { default as Mariadb } from './mariadb'; +export { default as Mongodb } from './mongodb'; +export { default as Multiarch } from './multiarch'; +export { default as Mysql } from './mysql'; +export { default as Nginx } from './nginx'; +export { default as NoPackages } from './no-packages'; +export { default as Node } from './node'; +export { default as Openbsd } from './openbsd'; +export { default as Percona } from './percona'; +export { default as Placeholder } from './placeholder'; +export { default as Postgresql } from './postgresql'; +export { default as Redis } from './redis'; +export { default as Scylladb } from './scylladb'; +export { default as Smart } from './smart'; +export { default as Ubuntu } from './ubuntu'; +export { default as Windows } from './windows'; diff --git a/packages/logos/src/java.js b/packages/logos/src/java.js new file mode 100644 index 00000000..daed41cd --- /dev/null +++ b/packages/logos/src/java.js @@ -0,0 +1,25 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 17 + + + + +); diff --git a/packages/logos/src/mariadb.js b/packages/logos/src/mariadb.js new file mode 100644 index 00000000..afba0458 --- /dev/null +++ b/packages/logos/src/mariadb.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 18 + + +); diff --git a/packages/logos/src/mongodb.js b/packages/logos/src/mongodb.js new file mode 100644 index 00000000..f9d671a7 --- /dev/null +++ b/packages/logos/src/mongodb.js @@ -0,0 +1,52 @@ +import React from 'react'; + +export default props => ( + + + + + + + + Artboard 1 copy 8 + + + + + + + + + + + +); diff --git a/packages/logos/src/multiarch.js b/packages/logos/src/multiarch.js new file mode 100644 index 00000000..25872e22 --- /dev/null +++ b/packages/logos/src/multiarch.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 43 + + +); diff --git a/packages/logos/src/mysql.js b/packages/logos/src/mysql.js new file mode 100644 index 00000000..d489b915 --- /dev/null +++ b/packages/logos/src/mysql.js @@ -0,0 +1,21 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 19 + + + +); diff --git a/packages/logos/src/nginx.js b/packages/logos/src/nginx.js new file mode 100644 index 00000000..46dfdf9e --- /dev/null +++ b/packages/logos/src/nginx.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 9 + + +); diff --git a/packages/logos/src/no-packages.js b/packages/logos/src/no-packages.js new file mode 100644 index 00000000..453e41c2 --- /dev/null +++ b/packages/logos/src/no-packages.js @@ -0,0 +1,138 @@ +import React from 'react'; + +export default props => ( + + Guilty_Salamander + Created using Figma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +); diff --git a/packages/logos/src/node.js b/packages/logos/src/node.js new file mode 100644 index 00000000..449c759b --- /dev/null +++ b/packages/logos/src/node.js @@ -0,0 +1,63 @@ +import React from 'react'; + +export default props => ( + + + + + + + + + + + + + Nodejs + + + + + + + + +); diff --git a/packages/logos/src/openbsd.js b/packages/logos/src/openbsd.js new file mode 100644 index 00000000..437c268b --- /dev/null +++ b/packages/logos/src/openbsd.js @@ -0,0 +1,15 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 46 + + +); diff --git a/packages/logos/src/percona.js b/packages/logos/src/percona.js new file mode 100644 index 00000000..9a1bb819 --- /dev/null +++ b/packages/logos/src/percona.js @@ -0,0 +1,18 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 11 + + + +); diff --git a/packages/logos/src/placeholder.js b/packages/logos/src/placeholder.js new file mode 100644 index 00000000..62c16130 --- /dev/null +++ b/packages/logos/src/placeholder.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 45 + + +); diff --git a/packages/logos/src/postgresql.js b/packages/logos/src/postgresql.js new file mode 100644 index 00000000..1b23acdf --- /dev/null +++ b/packages/logos/src/postgresql.js @@ -0,0 +1,33 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 12 + + + + + + +); diff --git a/packages/logos/src/redis.js b/packages/logos/src/redis.js new file mode 100644 index 00000000..ac7cd4af --- /dev/null +++ b/packages/logos/src/redis.js @@ -0,0 +1,53 @@ +import React from 'react'; + +export default props => ( + + + + + Artboard 1 copy 20 + + + + + + + + + + + +); diff --git a/packages/logos/src/scylladb.js b/packages/logos/src/scylladb.js new file mode 100644 index 00000000..9879cb78 --- /dev/null +++ b/packages/logos/src/scylladb.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 44 + + +); diff --git a/packages/logos/src/smart.js b/packages/logos/src/smart.js new file mode 100644 index 00000000..25872e22 --- /dev/null +++ b/packages/logos/src/smart.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 43 + + +); diff --git a/packages/logos/src/ubuntu.js b/packages/logos/src/ubuntu.js new file mode 100644 index 00000000..fc62996d --- /dev/null +++ b/packages/logos/src/ubuntu.js @@ -0,0 +1,22 @@ +import React from 'react'; + +export default props => ( + + + + + Artboard 1 copy 4 + + + +); diff --git a/packages/logos/src/windows.js b/packages/logos/src/windows.js new file mode 100644 index 00000000..a32b06e2 --- /dev/null +++ b/packages/logos/src/windows.js @@ -0,0 +1,17 @@ +import React from 'react'; + +export default props => ( + + Artboard 1 copy 5 + + +); diff --git a/packages/my-joy-beta/package.json b/packages/my-joy-beta/package.json index 3b997c8d..1dab7da5 100644 --- a/packages/my-joy-beta/package.json +++ b/packages/my-joy-beta/package.json @@ -24,9 +24,10 @@ "constant-case": "^2.0.0", "date-fns": "^1.29.0", "declarative-redux-form": "^2.0.8", + "joyent-logo-assets": "^1.0.0", "joyent-manifest-editor": "^1.4.0", "joyent-react-styled-flexboxgrid": "^2.2.3", - "joyent-ui-toolkit": "^4.5.0", + "joyent-ui-toolkit": "^5.0.0", "lodash.find": "^4.6.0", "lodash.findindex": "^4.6.0", "lodash.get": "^4.4.2", diff --git a/packages/my-joy-beta/src/assets/alpine.svg b/packages/my-joy-beta/src/assets/alpine.svg deleted file mode 100644 index a592a2e7..00000000 --- a/packages/my-joy-beta/src/assets/alpine.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 6 diff --git a/packages/my-joy-beta/src/assets/apache.svg b/packages/my-joy-beta/src/assets/apache.svg deleted file mode 100644 index 6c9a8557..00000000 --- a/packages/my-joy-beta/src/assets/apache.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 13 diff --git a/packages/my-joy-beta/src/assets/brocade.svg b/packages/my-joy-beta/src/assets/brocade.svg deleted file mode 100644 index ce29348d..00000000 --- a/packages/my-joy-beta/src/assets/brocade.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 14 diff --git a/packages/my-joy-beta/src/assets/cassandra.svg b/packages/my-joy-beta/src/assets/cassandra.svg deleted file mode 100644 index 2c7c2241..00000000 --- a/packages/my-joy-beta/src/assets/cassandra.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 15 diff --git a/packages/my-joy-beta/src/assets/centos.svg b/packages/my-joy-beta/src/assets/centos.svg deleted file mode 100644 index 49e5147c..00000000 --- a/packages/my-joy-beta/src/assets/centos.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 diff --git a/packages/my-joy-beta/src/assets/couchbase.svg b/packages/my-joy-beta/src/assets/couchbase.svg deleted file mode 100644 index 8635fb90..00000000 --- a/packages/my-joy-beta/src/assets/couchbase.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 7 diff --git a/packages/my-joy-beta/src/assets/debian.svg b/packages/my-joy-beta/src/assets/debian.svg deleted file mode 100644 index abf4cb00..00000000 --- a/packages/my-joy-beta/src/assets/debian.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy diff --git a/packages/my-joy-beta/src/assets/fedora.svg b/packages/my-joy-beta/src/assets/fedora.svg deleted file mode 100644 index 79022386..00000000 --- a/packages/my-joy-beta/src/assets/fedora.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 2 \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/freebsd.svg b/packages/my-joy-beta/src/assets/freebsd.svg deleted file mode 100644 index dcfdb7de..00000000 --- a/packages/my-joy-beta/src/assets/freebsd.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 3 diff --git a/packages/my-joy-beta/src/assets/ghost.svg b/packages/my-joy-beta/src/assets/ghost.svg deleted file mode 100644 index c0a69bf3..00000000 --- a/packages/my-joy-beta/src/assets/ghost.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 16 diff --git a/packages/my-joy-beta/src/assets/java.svg b/packages/my-joy-beta/src/assets/java.svg deleted file mode 100644 index 1e0b7e7a..00000000 --- a/packages/my-joy-beta/src/assets/java.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 17 diff --git a/packages/my-joy-beta/src/assets/mariadb.svg b/packages/my-joy-beta/src/assets/mariadb.svg deleted file mode 100644 index a514e5e7..00000000 --- a/packages/my-joy-beta/src/assets/mariadb.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 18 diff --git a/packages/my-joy-beta/src/assets/mongodb.svg b/packages/my-joy-beta/src/assets/mongodb.svg deleted file mode 100644 index 45d0d70a..00000000 --- a/packages/my-joy-beta/src/assets/mongodb.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 8 diff --git a/packages/my-joy-beta/src/assets/multiarch.svg b/packages/my-joy-beta/src/assets/multiarch.svg deleted file mode 100644 index ec7c989f..00000000 --- a/packages/my-joy-beta/src/assets/multiarch.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 43 diff --git a/packages/my-joy-beta/src/assets/mysql.svg b/packages/my-joy-beta/src/assets/mysql.svg deleted file mode 100644 index febd4b5c..00000000 --- a/packages/my-joy-beta/src/assets/mysql.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 19 diff --git a/packages/my-joy-beta/src/assets/nginx.svg b/packages/my-joy-beta/src/assets/nginx.svg deleted file mode 100644 index 7e833f7c..00000000 --- a/packages/my-joy-beta/src/assets/nginx.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 9 diff --git a/packages/my-joy-beta/src/assets/node.svg b/packages/my-joy-beta/src/assets/node.svg deleted file mode 100644 index 16cd387b..00000000 --- a/packages/my-joy-beta/src/assets/node.svg +++ /dev/null @@ -1 +0,0 @@ -Nodejs \ No newline at end of file diff --git a/packages/my-joy-beta/src/assets/openbsd.svg b/packages/my-joy-beta/src/assets/openbsd.svg deleted file mode 100644 index 09b50623..00000000 --- a/packages/my-joy-beta/src/assets/openbsd.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 46 diff --git a/packages/my-joy-beta/src/assets/percona.svg b/packages/my-joy-beta/src/assets/percona.svg deleted file mode 100644 index cc9778a0..00000000 --- a/packages/my-joy-beta/src/assets/percona.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 11 diff --git a/packages/my-joy-beta/src/assets/placeholder.svg b/packages/my-joy-beta/src/assets/placeholder.svg deleted file mode 100644 index 3e8734b6..00000000 --- a/packages/my-joy-beta/src/assets/placeholder.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 45 diff --git a/packages/my-joy-beta/src/assets/postgresql.svg b/packages/my-joy-beta/src/assets/postgresql.svg deleted file mode 100644 index 673b52af..00000000 --- a/packages/my-joy-beta/src/assets/postgresql.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 12 diff --git a/packages/my-joy-beta/src/assets/redis.svg b/packages/my-joy-beta/src/assets/redis.svg deleted file mode 100644 index 56887cfa..00000000 --- a/packages/my-joy-beta/src/assets/redis.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 20 diff --git a/packages/my-joy-beta/src/assets/scylladb.svg b/packages/my-joy-beta/src/assets/scylladb.svg deleted file mode 100644 index d16985ba..00000000 --- a/packages/my-joy-beta/src/assets/scylladb.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 44 diff --git a/packages/my-joy-beta/src/assets/smart.svg b/packages/my-joy-beta/src/assets/smart.svg deleted file mode 100644 index ec7c989f..00000000 --- a/packages/my-joy-beta/src/assets/smart.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 43 diff --git a/packages/my-joy-beta/src/assets/ubuntu.svg b/packages/my-joy-beta/src/assets/ubuntu.svg deleted file mode 100644 index f6e9aaa5..00000000 --- a/packages/my-joy-beta/src/assets/ubuntu.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 4 diff --git a/packages/my-joy-beta/src/assets/windows.svg b/packages/my-joy-beta/src/assets/windows.svg deleted file mode 100644 index 87d416ca..00000000 --- a/packages/my-joy-beta/src/assets/windows.svg +++ /dev/null @@ -1 +0,0 @@ -Artboard 1 copy 5 diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png index a8a153e2..63bc33ce 100644 Binary files a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-method-edit-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png index 23d05a9e..e00af188 100644 Binary files a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/key-value-ui-js-key-value-submitting-1-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-5-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-5-snap.png new file mode 100644 index 00000000..06e13d30 Binary files /dev/null and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-5-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-3-snap.png b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-3-snap.png index 8605ef3f..d6efbae0 100644 Binary files a/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-3-snap.png and b/packages/my-joy-beta/src/components/__tests__/__image_snapshots__/network-ui-js-network-network-info-expanded-3-snap.png differ diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap index eaa7d311..a30310c2 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/cns.spec.js.snap @@ -697,19 +697,6 @@ Array [ margin: 0; } -.c1 + p, -.c1 + small, -.c1 + h1, -.c1 + h2, -.c1 + label, -.c1 + h3, -.c1 + h4, -.c1 + h5, -.c1 + div, -.c1 + span { - padding-bottom: 2.25rem; -} -
@@ -985,19 +972,6 @@ exports[`renders without throwing 1`] = ` margin: 0; } -.c3 + p, -.c3 + small, -.c3 + h1, -.c3 + h2, -.c3 + label, -.c3 + h3, -.c3 + h4, -.c3 + h5, -.c3 + div, -.c3 + span { - padding-bottom: 2.25rem; -} - .c1 { color: rgba(73,73,73,1); font-weight: normal; diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/firewall.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/firewall.spec.js.snap index 04e56639..458cdb49 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/firewall.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/firewall.spec.js.snap @@ -196,19 +196,6 @@ Array [ margin: 0; } -.c12 + p, -.c12 + small, -.c12 + h1, -.c12 + h2, -.c12 + label, -.c12 + h3, -.c12 + h4, -.c12 + h5, -.c12 + div, -.c12 + span { - padding-bottom: 2.25rem; -} - .c9 { color: rgba(73,73,73,1); font-weight: 700; @@ -230,21 +217,6 @@ Array [ padding-bottom: 2.25rem; } -.c18 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - .c2 { box-sizing: content-box; display: -webkit-box; @@ -293,6 +265,21 @@ Array [ cursor: default; } +.c18 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} + .c19 { border: 0.0625rem solid rgb(216,216,216); box-sizing: border-box; @@ -1695,19 +1682,6 @@ Array [ margin: 0; } -.c11 + p, -.c11 + small, -.c11 + h1, -.c11 + h2, -.c11 + label, -.c11 + h3, -.c11 + h4, -.c11 + h5, -.c11 + div, -.c11 + span { - padding-bottom: 2.25rem; -} - .c8 { color: rgba(73,73,73,1); font-weight: 700; @@ -2150,19 +2124,6 @@ Array [ margin: 0; } -.c11 + p, -.c11 + small, -.c11 + h1, -.c11 + h2, -.c11 + label, -.c11 + h3, -.c11 + h4, -.c11 + h5, -.c11 + div, -.c11 + span { - padding-bottom: 2.25rem; -} - .c8 { color: rgba(73,73,73,1); font-weight: 700; @@ -2605,19 +2566,6 @@ Array [ margin: 0; } -.c11 + p, -.c11 + small, -.c11 + h1, -.c11 + h2, -.c11 + label, -.c11 + h3, -.c11 + h4, -.c11 + h5, -.c11 + div, -.c11 + span { - padding-bottom: 2.25rem; -} - .c8 { color: rgba(73,73,73,1); font-weight: 700; @@ -3064,19 +3012,6 @@ Array [ margin: 0; } -.c11 + p, -.c11 + small, -.c11 + h1, -.c11 + h2, -.c11 + label, -.c11 + h3, -.c11 + h4, -.c11 + h5, -.c11 + div, -.c11 + span { - padding-bottom: 2.25rem; -} - .c8 { color: rgba(73,73,73,1); font-weight: 700; @@ -3532,19 +3467,6 @@ Array [ margin: 0; } -.c11 + p, -.c11 + small, -.c11 + h1, -.c11 + h2, -.c11 + label, -.c11 + h3, -.c11 + h4, -.c11 + h5, -.c11 + div, -.c11 + span { - padding-bottom: 2.25rem; -} - .c8 { color: rgba(73,73,73,1); font-weight: 700; @@ -3566,21 +3488,6 @@ Array [ padding-bottom: 2.25rem; } -.c15 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - .c1 { box-sizing: content-box; display: -webkit-box; @@ -3607,6 +3514,21 @@ Array [ cursor: default; } +.c15 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} + .c16 { border: 0.0625rem solid rgb(216,216,216); box-sizing: border-box; @@ -4106,19 +4028,6 @@ Array [ margin: 0; } -.c12 + p, -.c12 + small, -.c12 + h1, -.c12 + h2, -.c12 + label, -.c12 + h3, -.c12 + h4, -.c12 + h5, -.c12 + div, -.c12 + span { - padding-bottom: 2.25rem; -} - .c9 { color: rgba(73,73,73,1); font-weight: 700; @@ -4140,21 +4049,6 @@ Array [ padding-bottom: 2.25rem; } -.c18 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - .c2 { box-sizing: content-box; display: -webkit-box; @@ -4203,6 +4097,21 @@ Array [ cursor: default; } +.c18 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + -webkit-box-flex: 1; + -webkit-flex-grow: 1; + -ms-flex-positive: 1; + flex-grow: 1; +} + .c19 { border: 0.0625rem solid rgb(216,216,216); box-sizing: border-box; diff --git a/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap b/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap index 56f69652..d0cc7a51 100644 --- a/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap +++ b/packages/my-joy-beta/src/components/__tests__/__snapshots__/key-value.spec.js.snap @@ -1,165 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`renders without throwing 1`] = ` -.c14 { - margin-top: 0.1875rem; -} - -.c18 { - margin-top: 0.375rem; -} - -.c3 { - padding-right: 1.125rem; - padding-left: 1.125rem; -} - -.c9 { - padding: 1.125rem; -} - -.c19 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.625rem; - margin-left: -0.625rem; -} - -.c20 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c25 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c4 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - width: 100%; - height: 100%; - -webkit-flex-basis: 100%; - -ms-flex-preferred-size: 100%; - flex-basis: 100%; -} - -.c10 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; -} - -.c11 { - -webkit-order: 0; - -ms-flex-order: 0; - order: 0; - -webkit-flex-basis: auto; - -ms-flex-preferred-size: auto; - flex-basis: auto; - -webkit-box-flex: 0; - -webkit-flex-grow: 0; - -ms-flex-positive: 0; - flex-grow: 0; - -webkit-flex-shrink: 1; - -ms-flex-negative: 1; - flex-shrink: 1; - display: block; - -webkit-flex-basis: auto; - -ms-flex-preferred-size: auto; - flex-basis: auto; -} - -.c17 { - -webkit-order: 0; - -ms-flex-order: 0; - order: 0; - -webkit-flex-basis: auto; - -ms-flex-preferred-size: auto; - flex-basis: auto; - -webkit-box-flex: 0; - -webkit-flex-grow: 0; - -ms-flex-positive: 0; - flex-grow: 0; - -webkit-flex-shrink: 1; - -ms-flex-negative: 1; - flex-shrink: 1; - display: block; - -webkit-flex-basis: 0.75rem; - -ms-flex-preferred-size: 0.75rem; - flex-basis: 0.75rem; -} - .c23 { font-family: sans-serif; font-size: 100%; @@ -525,6 +366,45 @@ exports[`renders without throwing 1`] = ` float: none; } +.c19 { + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex: 1 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -0.625rem; + margin-left: -0.625rem; +} + +.c20 { + box-sizing: border-box; + -webkit-flex: 0 0 auto; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding-right: 0.625rem; + padding-left: 0.625rem; + display: block; +} + +.c25 { + box-sizing: border-box; + -webkit-flex: 0 0 auto; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding-right: 0.625rem; + padding-left: 0.625rem; + display: block; +} + .c7 { color: rgba(73,73,73,1); font-weight: 600; @@ -546,6 +426,126 @@ exports[`renders without throwing 1`] = ` margin-top: 0.75rem; } +.c14 { + margin-top: 0.1875rem; +} + +.c18 { + margin-top: 0.375rem; +} + +.c3 { + padding-right: 1.125rem; + padding-left: 1.125rem; +} + +.c9 { + padding: 1.125rem; +} + +.c4 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 100%; + height: 100%; + -webkit-flex-basis: 100%; + -ms-flex-preferred-size: 100%; + flex-basis: 100%; +} + +.c10 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; +} + +.c11 { + -webkit-order: 0; + -ms-flex-order: 0; + order: 0; + -webkit-flex-basis: auto; + -ms-flex-preferred-size: auto; + flex-basis: auto; + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + -ms-flex-positive: 0; + flex-grow: 0; + -webkit-flex-shrink: 1; + -ms-flex-negative: 1; + flex-shrink: 1; + display: block; + -webkit-flex-basis: auto; + -ms-flex-preferred-size: auto; + flex-basis: auto; +} + +.c17 { + -webkit-order: 0; + -ms-flex-order: 0; + order: 0; + -webkit-flex-basis: auto; + -ms-flex-preferred-size: auto; + flex-basis: auto; + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + -ms-flex-positive: 0; + flex-grow: 0; + -webkit-flex-shrink: 1; + -ms-flex-negative: 1; + flex-shrink: 1; + display: block; + -webkit-flex-basis: 0.75rem; + -ms-flex-preferred-size: 0.75rem; + flex-basis: 0.75rem; +} + .c0 { box-sizing: content-box; display: -webkit-box; @@ -833,187 +833,212 @@ exports[`renders without throwing 1`] = ` } } -
-

- Add metadata -

+

+ Add metadata +

+
-
-
-
- -
-
-
-
-
-
- -
- -
-
-
-
-
-
-
- - -
-
- +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ + +
+
+ +
-
+ `; exports[`renders without throwing 1`] = ` +.c7 { + color: rgba(73,73,73,1); + font-weight: 600; + line-height: 1.5rem; + font-size: 0.9375rem; + margin: 0; +} + +.c7 + p, +.c7 + small, +.c7 + h1, +.c7 + h2, +.c7 + label, +.c7 + h3, +.c7 + h4, +.c7 + h5, +.c7 + div, +.c7 + span { + margin-top: 0.75rem; +} + .c3 { padding-right: 1.125rem; padding-left: 1.125rem; @@ -1052,27 +1077,6 @@ exports[`renders without throwing 1`] = ` flex-basis: 100%; } -.c7 { - color: rgba(73,73,73,1); - font-weight: 600; - line-height: 1.5rem; - font-size: 0.9375rem; - margin: 0; -} - -.c7 + p, -.c7 + small, -.c7 + h1, -.c7 + h2, -.c7 + label, -.c7 + h3, -.c7 + h4, -.c7 + h5, -.c7 + div, -.c7 + span { - margin-top: 0.75rem; -} - .c6 { box-sizing: content-box; display: -webkit-box; @@ -1214,200 +1218,45 @@ exports[`renders without throwing 1`] = ` max-width: 98%; } -
-

- Add metadata -

+

+ Add metadata +

+
- + `; exports[`renders without throwing 1`] = ` -.c14 { - margin-top: 0.1875rem; -} - -.c18 { - margin-top: 0.375rem; -} - -.c3 { - padding-right: 1.125rem; - padding-left: 1.125rem; -} - -.c9 { - padding: 1.125rem; -} - -.c19 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.625rem; - margin-left: -0.625rem; -} - -.c20 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c25 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c4 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - width: 100%; - height: 100%; - -webkit-flex-basis: 100%; - -ms-flex-preferred-size: 100%; - flex-basis: 100%; -} - -.c10 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; -} - -.c11 { - -webkit-order: 0; - -ms-flex-order: 0; - order: 0; - -webkit-flex-basis: auto; - -ms-flex-preferred-size: auto; - flex-basis: auto; - -webkit-box-flex: 0; - -webkit-flex-grow: 0; - -ms-flex-positive: 0; - flex-grow: 0; - -webkit-flex-shrink: 1; - -ms-flex-negative: 1; - flex-shrink: 1; - display: block; - -webkit-flex-basis: auto; - -ms-flex-preferred-size: auto; - flex-basis: auto; -} - -.c17 { - -webkit-order: 0; - -ms-flex-order: 0; - order: 0; - -webkit-flex-basis: auto; - -ms-flex-preferred-size: auto; - flex-basis: auto; - -webkit-box-flex: 0; - -webkit-flex-grow: 0; - -ms-flex-positive: 0; - flex-grow: 0; - -webkit-flex-shrink: 1; - -ms-flex-negative: 1; - flex-shrink: 1; - display: block; - -webkit-flex-basis: 0.75rem; - -ms-flex-preferred-size: 0.75rem; - flex-basis: 0.75rem; -} - .c23 { font-family: sans-serif; font-size: 100%; @@ -1773,6 +1622,45 @@ exports[`renders without throwing 1`] = ` float: none; } +.c19 { + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex: 1 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -0.625rem; + margin-left: -0.625rem; +} + +.c20 { + box-sizing: border-box; + -webkit-flex: 0 0 auto; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding-right: 0.625rem; + padding-left: 0.625rem; + display: block; +} + +.c25 { + box-sizing: border-box; + -webkit-flex: 0 0 auto; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding-right: 0.625rem; + padding-left: 0.625rem; + display: block; +} + .c7 { color: rgba(73,73,73,1); font-weight: 600; @@ -1794,6 +1682,126 @@ exports[`renders without throwing 1`] = ` margin-top: 0.75rem; } +.c14 { + margin-top: 0.1875rem; +} + +.c18 { + margin-top: 0.375rem; +} + +.c3 { + padding-right: 1.125rem; + padding-left: 1.125rem; +} + +.c9 { + padding: 1.125rem; +} + +.c4 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 100%; + height: 100%; + -webkit-flex-basis: 100%; + -ms-flex-preferred-size: 100%; + flex-basis: 100%; +} + +.c10 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; +} + +.c11 { + -webkit-order: 0; + -ms-flex-order: 0; + order: 0; + -webkit-flex-basis: auto; + -ms-flex-preferred-size: auto; + flex-basis: auto; + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + -ms-flex-positive: 0; + flex-grow: 0; + -webkit-flex-shrink: 1; + -ms-flex-negative: 1; + flex-shrink: 1; + display: block; + -webkit-flex-basis: auto; + -ms-flex-preferred-size: auto; + flex-basis: auto; +} + +.c17 { + -webkit-order: 0; + -ms-flex-order: 0; + order: 0; + -webkit-flex-basis: auto; + -ms-flex-preferred-size: auto; + flex-basis: auto; + -webkit-box-flex: 0; + -webkit-flex-grow: 0; + -ms-flex-positive: 0; + flex-grow: 0; + -webkit-flex-shrink: 1; + -ms-flex-negative: 1; + flex-shrink: 1; + display: block; + -webkit-flex-basis: 0.75rem; + -ms-flex-preferred-size: 0.75rem; + flex-basis: 0.75rem; +} + .c0 { box-sizing: content-box; display: -webkit-box; @@ -2081,295 +2089,191 @@ exports[`renders without throwing 1`] = ` } } -
-

- Add metadata -

+

+ Add metadata +

+
-
-
-
- -
-
-
-
-
-
- -
- -
-
-
-
-
-
-
- - -
-
- +
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+
+ + +
+
+ +
- + `; exports[`renders without throwing 1`] = ` -.c14 { - margin-top: 0.1875rem; -} - -.c20 { - margin-top: 0.375rem; -} - -.c3 { - padding-right: 1.125rem; - padding-left: 1.125rem; -} - -.c9 { - padding: 1.125rem; -} - -.c21 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.625rem; - margin-left: -0.625rem; -} - -.c10 { - box-sizing: border-box; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex: 1 1 auto; - -ms-flex: 1 1 auto; - flex: 1 1 auto; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: wrap; - -ms-flex-wrap: wrap; - flex-wrap: wrap; - margin-right: -0.625rem; - margin-left: -0.625rem; -} - -.c11 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c26 { - box-sizing: border-box; - -webkit-flex: 0 0 auto; - -ms-flex: 0 0 auto; - flex: 0 0 auto; - padding-right: 0.625rem; - padding-left: 0.625rem; - display: block; -} - -.c4 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - -webkit-flex-wrap: nowrap; - -ms-flex-wrap: nowrap; - flex-wrap: nowrap; - -webkit-box-pack: start; - -webkit-justify-content: flex-start; - -ms-flex-pack: start; - justify-content: flex-start; - -webkit-align-content: stretch; - -ms-flex-line-pack: stretch; - align-content: stretch; - -webkit-box-pack: justify; - -webkit-justify-content: space-between; - -ms-flex-pack: justify; - justify-content: space-between; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - width: 100%; - height: 100%; - -webkit-flex-basis: 100%; - -ms-flex-preferred-size: 100%; - flex-basis: 100%; -} - .c24 { font-family: sans-serif; font-size: 100%; @@ -2747,6 +2651,64 @@ exports[`renders without throwing 1`] = ` float: none; } +.c21 { + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex: 1 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -0.625rem; + margin-left: -0.625rem; +} + +.c10 { + box-sizing: border-box; + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex: 1 1 auto; + -ms-flex: 1 1 auto; + flex: 1 1 auto; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: wrap; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -0.625rem; + margin-left: -0.625rem; +} + +.c11 { + box-sizing: border-box; + -webkit-flex: 0 0 auto; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding-right: 0.625rem; + padding-left: 0.625rem; + display: block; +} + +.c26 { + box-sizing: border-box; + -webkit-flex: 0 0 auto; + -ms-flex: 0 0 auto; + flex: 0 0 auto; + padding-right: 0.625rem; + padding-left: 0.625rem; + display: block; +} + .c7 { color: rgba(73,73,73,1); font-weight: 600; @@ -2775,6 +2737,56 @@ exports[`renders without throwing 1`] = ` height: 0.75rem; } +.c14 { + margin-top: 0.1875rem; +} + +.c20 { + margin-top: 0.375rem; +} + +.c3 { + padding-right: 1.125rem; + padding-left: 1.125rem; +} + +.c9 { + padding: 1.125rem; +} + +.c4 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-flex-wrap: nowrap; + -ms-flex-wrap: nowrap; + flex-wrap: nowrap; + -webkit-box-pack: start; + -webkit-justify-content: flex-start; + -ms-flex-pack: start; + justify-content: flex-start; + -webkit-align-content: stretch; + -ms-flex-line-pack: stretch; + align-content: stretch; + -webkit-box-pack: justify; + -webkit-justify-content: space-between; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + width: 100%; + height: 100%; + -webkit-flex-basis: 100%; + -ms-flex-preferred-size: 100%; + flex-basis: 100%; +} + .c0 { box-sizing: content-box; display: -webkit-box; @@ -3141,354 +3153,199 @@ exports[`renders without throwing 1`] = ` } } -
-

- Add metadata -

+

+ Add metadata +

+
-
-
-
- -
- -
-
-
-
-
-
-
-
- -
-