2017-11-23 14:18:38 +02:00
|
|
|
const { NODE_ENV } = process.env;
|
|
|
|
|
|
|
|
const env = NODE_ENV === 'production' ? 'prod' : 'dev';
|
|
|
|
|
|
|
|
// const resolvePkg = require('resolve-pkg');
|
|
|
|
const webpackConfig = require(`joyent-react-scripts/config/webpack.config.${env}.js`);
|
2017-05-18 21:21:33 +03:00
|
|
|
const { defaultHandlers } = require('react-docgen');
|
|
|
|
const dnHandler = require('react-docgen-displayname-handler');
|
|
|
|
const path = require('path');
|
|
|
|
|
2017-09-26 14:12:15 +03:00
|
|
|
module.exports = {
|
2017-10-11 14:01:26 +03:00
|
|
|
highlightTheme: 'base16-light',
|
2017-10-04 20:30:10 +03:00
|
|
|
require: [path.join(__dirname, 'etc/style.css')],
|
2017-05-18 21:21:33 +03:00
|
|
|
webpackConfig: Object.assign(webpackConfig, {
|
|
|
|
resolve: Object.assign(webpackConfig.resolve, {
|
|
|
|
alias: Object.assign(webpackConfig.resolve.alias, {
|
|
|
|
'rsg-components/Wrapper': path.join(__dirname, 'src/styleguide/wrapper')
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}),
|
|
|
|
title: 'UI Toolkit',
|
|
|
|
sections: [
|
|
|
|
{
|
2017-10-04 16:27:57 +03:00
|
|
|
name: 'Get Started',
|
2017-09-26 14:12:15 +03:00
|
|
|
sections: [
|
|
|
|
{
|
|
|
|
name: 'Overview',
|
|
|
|
content: 'src/overview.md'
|
|
|
|
},
|
|
|
|
{
|
2017-10-03 17:30:45 +03:00
|
|
|
name: 'Download',
|
|
|
|
content: 'src/download.md'
|
2017-09-26 14:12:15 +03:00
|
|
|
},
|
|
|
|
{
|
2017-10-03 17:30:45 +03:00
|
|
|
name: 'Contribute',
|
|
|
|
content: 'src/contribute.md'
|
2017-09-26 14:12:15 +03:00
|
|
|
},
|
|
|
|
{
|
2017-10-03 17:30:45 +03:00
|
|
|
name: 'Support',
|
|
|
|
content: 'src/support.md'
|
2017-09-26 14:12:15 +03:00
|
|
|
},
|
|
|
|
{
|
2017-10-03 17:30:45 +03:00
|
|
|
name: 'FAQ',
|
|
|
|
content: 'src/faq.md'
|
2017-09-26 14:12:15 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Base',
|
|
|
|
sections: [
|
|
|
|
{
|
|
|
|
name: 'Typography',
|
|
|
|
content: 'src/text/Readme.md'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Baseline',
|
|
|
|
content: 'src/baseline/readme.md'
|
|
|
|
},
|
|
|
|
{
|
2017-10-03 17:30:45 +03:00
|
|
|
name: 'Colors',
|
2017-09-26 14:12:15 +03:00
|
|
|
content: 'src/theme/colors.md'
|
2017-11-23 14:18:38 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Icons',
|
|
|
|
content: 'src/icons/Readme.md'
|
2017-09-26 14:12:15 +03:00
|
|
|
}
|
|
|
|
]
|
2017-05-18 21:21:33 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Components',
|
|
|
|
components: () => [
|
2017-10-31 12:03:44 +02:00
|
|
|
'src/card/card.js',
|
2017-10-31 12:29:15 +02:00
|
|
|
'src/table/index.js',
|
2017-06-07 00:22:10 +03:00
|
|
|
'src/breadcrumb/index.js',
|
2017-10-04 19:19:35 +03:00
|
|
|
'src/button/index.js',
|
2017-05-18 21:21:33 +03:00
|
|
|
'src/form/checkbox.js',
|
2017-10-04 19:19:35 +03:00
|
|
|
'src/header/index.js',
|
|
|
|
'src/form/input.js',
|
|
|
|
'src/message/index.js',
|
2017-06-27 17:22:05 +03:00
|
|
|
'src/progress-bar/index.js',
|
2017-10-30 13:52:53 +02:00
|
|
|
'src/popover/index.js',
|
2017-05-18 21:21:33 +03:00
|
|
|
'src/form/radio.js',
|
2017-10-04 19:19:35 +03:00
|
|
|
'src/section-list/index.js',
|
2017-05-18 21:21:33 +03:00
|
|
|
'src/form/select.js',
|
2017-10-19 16:36:18 +03:00
|
|
|
'src/form/toggle.js',
|
2017-10-30 13:52:53 +02:00
|
|
|
'src/tooltip/index.js'
|
2017-05-18 21:21:33 +03:00
|
|
|
]
|
|
|
|
}
|
|
|
|
],
|
2017-09-26 14:12:15 +03:00
|
|
|
theme: {
|
|
|
|
color: {
|
|
|
|
base: '#494949',
|
|
|
|
link: '#3B46CC',
|
2017-10-04 20:30:10 +03:00
|
|
|
linkHover: '#5a62c5',
|
|
|
|
sidebarBackground: '#1E313B'
|
2017-09-26 14:12:15 +03:00
|
|
|
},
|
|
|
|
fontSize: {
|
|
|
|
base: 15,
|
|
|
|
text: 15,
|
|
|
|
small: 13,
|
|
|
|
h1: 36,
|
|
|
|
h2: 30,
|
|
|
|
h3: 26,
|
|
|
|
h4: 15,
|
|
|
|
h5: 14,
|
|
|
|
h6: 12
|
|
|
|
},
|
|
|
|
fontFamily: {
|
2017-10-04 20:30:10 +03:00
|
|
|
base: ['"Libre Franklin", -apple-system, sans-serif'],
|
|
|
|
monospace: [
|
|
|
|
'Roboto Mono',
|
|
|
|
'Consolas',
|
|
|
|
'"Liberation Mono"',
|
|
|
|
'Menlo',
|
|
|
|
'monospace'
|
|
|
|
]
|
|
|
|
},
|
|
|
|
sidebarWidth: 300,
|
|
|
|
spaceFactor: 6
|
2017-09-26 14:12:15 +03:00
|
|
|
},
|
|
|
|
styles: {
|
2017-10-04 20:30:10 +03:00
|
|
|
Styleguide: {
|
|
|
|
sidebar: {
|
|
|
|
color: '#FFFFFF'
|
|
|
|
}
|
|
|
|
},
|
2017-09-26 14:12:15 +03:00
|
|
|
Logo: {
|
2017-10-04 20:30:10 +03:00
|
|
|
border: 'none',
|
2017-09-26 14:12:15 +03:00
|
|
|
logo: {
|
|
|
|
'text-indent': -999,
|
|
|
|
'background-image': 'url("./etc/joyent-white.png")',
|
|
|
|
'background-size': 'cover',
|
|
|
|
width: 180,
|
|
|
|
'background-position': 0,
|
|
|
|
height: 39,
|
|
|
|
padding: 0,
|
2017-10-04 20:30:10 +03:00
|
|
|
margin: '0 auto'
|
2017-09-26 14:12:15 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2017-05-18 21:21:33 +03:00
|
|
|
handlers: componentPath =>
|
|
|
|
defaultHandlers.concat(dnHandler.createDisplayNameHandler(componentPath))
|
2017-09-26 14:12:15 +03:00
|
|
|
};
|