diff --git a/package.json b/package.json
index 3a8ccd50..6285959c 100644
--- a/package.json
+++ b/package.json
@@ -37,7 +37,6 @@
"react-icon-base": "^2.0.4",
"react-icons": "^2.2.1",
"react-sortable-hoc": "^0.4.5",
- "rebass": "^0.3.1",
"request": "^2.79.0"
},
"babel": {
diff --git a/src/components/About.jsx b/src/components/About.jsx
deleted file mode 100644
index e2abf582..00000000
--- a/src/components/About.jsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react'
-import theme from './theme.js'
-
-import Heading from 'rebass/dist/Heading'
-import Container from 'rebass/dist/Container'
-import Input from 'rebass/dist/Input'
-import Toolbar from 'rebass/dist/Toolbar'
-import NavItem from 'rebass/dist/NavItem'
-import Space from 'rebass/dist/Space'
-
-/** About page with basic infos and links to github repo */
-export class About extends React.Component {
- render() {
- return
-
-
- About
-
-
-
- Maputnik – Visual Map Editor for Mapbox GL
-
- A free and open visual editor for the Mapbox GL styles targeted at developers and map designers. Creating your own custom map is easy with Maputnik.
-
-
- The source code is openly licensed and available on GitHub .
-
-
-
- }
-}
diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx
index 0bca8fbe..dc425afd 100644
--- a/src/components/Layout.jsx
+++ b/src/components/Layout.jsx
@@ -1,7 +1,7 @@
import React from 'react'
import ScrollContainer from './ScrollContainer'
-import theme from '../config/rebass'
+import theme from '../config/theme'
import colors from '../config/colors'
export default class Layout extends React.Component {
@@ -13,13 +13,11 @@ export default class Layout extends React.Component {
}
static childContextTypes = {
- rebass: React.PropTypes.object,
reactIconBase: React.PropTypes.object
}
getChildContext() {
return {
- rebass: theme,
reactIconBase: { size: 20 }
}
}
diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx
index 842ec6a6..74e02074 100644
--- a/src/components/Toolbar.jsx
+++ b/src/components/Toolbar.jsx
@@ -1,8 +1,6 @@
import React from 'react'
import FileReaderInput from 'react-file-reader-input'
-import Button from 'rebass/dist/Button'
-
import MdFileDownload from 'react-icons/lib/md/file-download'
import MdFileUpload from 'react-icons/lib/md/file-upload'
import MdOpenInBrowser from 'react-icons/lib/md/open-in-browser'
@@ -27,6 +25,11 @@ const InlineBlock = props =>
+const ToolbarAction = props =>
+ {props.children}
+
+
export default class Toolbar extends React.Component {
static propTypes = {
mapStyle: React.PropTypes.object.isRequired,
@@ -62,10 +65,10 @@ export default class Toolbar extends React.Component {
saveButton() {
if(this.props.mapStyle.layers.length > 0) {
return
-
+
Save
-
+
}
return null
@@ -73,10 +76,10 @@ export default class Toolbar extends React.Component {
downloadButton() {
return
-
+
Download
-
+
}
@@ -111,48 +114,48 @@ export default class Toolbar extends React.Component {
toggle={() => this.toggleSettings.bind(this)}
/>
-
Maputnik
-
+
-
+
Open
-
+
{this.downloadButton()}
{this.saveButton()}
-
+
Tilesets
-
+
-
+
Style Settings
-
+
-
+
Inspect
-
+
-
+
Help
-
+
}
diff --git a/src/components/fields/SpecField.jsx b/src/components/fields/SpecField.jsx
index 023825aa..509a425d 100644
--- a/src/components/fields/SpecField.jsx
+++ b/src/components/fields/SpecField.jsx
@@ -9,7 +9,6 @@ import ColorField from './ColorField'
import StringField from './StringField'
import input from '../../config/input.js'
-import theme from '../../config/rebass.js'
function labelFromFieldName(fieldName) {
let label = fieldName.split('-').slice(1).join(' ')
diff --git a/src/components/layers/LayerEditor.jsx b/src/components/layers/LayerEditor.jsx
index a6576cfa..f725223f 100644
--- a/src/components/layers/LayerEditor.jsx
+++ b/src/components/layers/LayerEditor.jsx
@@ -6,7 +6,8 @@ import PropertyGroup from '../fields/PropertyGroup'
import LayerEditorGroup from './LayerEditorGroup'
import layout from '../../config/layout.json'
-import theme from '../../config/rebass.js'
+import { margins, fontSizes } from '../../config/scales'
+import colors from '../../config/colors'
class UnsupportedLayer extends React.Component {
render() {
@@ -62,8 +63,8 @@ export default class LayerEditor extends React.Component {
getChildContext () {
return {
reactIconBase: {
- size: theme.fontSizes[4],
- color: theme.colors.lowgray,
+ size: fontSizes[4],
+ color: colors.lowgray,
}
}
}
@@ -142,7 +143,7 @@ export default class LayerEditor extends React.Component {
}
return
{propertyGroups}
{dataGroup}
diff --git a/src/components/modals/TilesetsModal.jsx b/src/components/modals/TilesetsModal.jsx
index 080eb5ab..cbf448e3 100644
--- a/src/components/modals/TilesetsModal.jsx
+++ b/src/components/modals/TilesetsModal.jsx
@@ -3,8 +3,8 @@ import React from 'react'
import Modal from './Modal'
import publicTilesets from '../../config/tilesets.json'
-import theme from '../../config/rebass'
import colors from '../../config/colors'
+import { margins } from '../../config/scales'
class TilesetsModal extends React.Component {
static propTypes = {
@@ -20,13 +20,8 @@ class TilesetsModal extends React.Component {
render() {
const tilesetOptions = publicTilesets.map(tileset => {
return
#{tileset.id}
diff --git a/src/components/sources/editor.jsx b/src/components/sources/editor.jsx
deleted file mode 100644
index 43f92b2b..00000000
--- a/src/components/sources/editor.jsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import React from 'react'
-
-import Input from 'rebass/dist/Input'
-import Toolbar from 'rebass/dist/Toolbar'
-import NavItem from 'rebass/dist/NavItem'
-import Space from 'rebass/dist/Space'
-
-import Collapse from 'react-collapse'
-import PureRenderMixin from 'react-addons-pure-render-mixin';
-
-import theme from '../theme.js'
-
-
-class UnsupportedSource extends React.Component {
- render() {
- return
- }
-}
-
-class VectorSource extends React.Component {
- static propTypes = {
- source: React.PropTypes.object.isRequired,
- onSourceChanged: React.PropTypes.func.isRequired,
- }
-
- constructor(props) {
- super(props);
- this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
- }
-
- render() {
- return
- this.props.onSourceChanged(this.props.source.set('url', e.target.value))}
- name="url" label="TileJSON url"
- value={this.props.source.get("url")}
- />
-
-
-
- }
-}
-
-export class SourceEditor extends React.Component {
- static propTypes = {
- sourceId: React.PropTypes.string.isRequired,
- source: React.PropTypes.object.isRequired,
- onSourceChanged: React.PropTypes.func.isRequired,
- }
-
- constructor(props) {
- super(props);
- this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
- this.state = {
- isOpened: false,
- }
- }
-
- toggleLayer() {
- this.setState({isOpened: !this.state.isOpened})
- }
-
- sourceFromType(type) {
- if (type === "vector") {
- return
this.props.onSourceChanged(this.props.sourceId, s)}
- source={this.props.source}
- />
- }
- return
- }
-
- render() {
- return
-
-
- #{this.props.sourceId}
-
-
-
-
-
- {this.sourceFromType(this.props.source.get('type'))}
-
-
-
- }
-}
-
diff --git a/src/components/sources/list.jsx b/src/components/sources/list.jsx
deleted file mode 100644
index cc6306e5..00000000
--- a/src/components/sources/list.jsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import React from 'react'
-
-import Heading from 'rebass/dist/Heading'
-import Toolbar from 'rebass/dist/Toolbar'
-import NavItem from 'rebass/dist/NavItem'
-import Space from 'rebass/dist/Space'
-
-import { SourceEditor } from './editor.jsx'
-import scrollbars from '../scrollbars.scss'
-import PureRenderMixin from 'react-addons-pure-render-mixin';
-
-// List of collapsible layer editors
-export class SourceList extends React.Component {
- static propTypes = {
- sources: React.PropTypes.object.isRequired,
- onSourcesChanged: React.PropTypes.func.isRequired,
- }
-
- constructor(props) {
- super(props)
- this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
- }
-
- onSourceChanged(sourceId, changedSource) {
- const changedSources = this.props.sources.set(sourceId, changedSource)
- this.props.onSourcesChanged(changedSources)
- }
-
- render() {
- const sourceEditors = this.props.sources.map((source, sourceId) => {
- return
- }).toIndexedSeq()
-
- return
-
-
- Sources
-
-
-
- {sourceEditors}
-
- }
-}
diff --git a/src/config/input.js b/src/config/input.js
index 1cc46c06..8619d815 100644
--- a/src/config/input.js
+++ b/src/config/input.js
@@ -1,8 +1,9 @@
-import theme from './rebass.js'
+import colors from './colors'
+import { margins, fontSizes } from './scales'
const base = {
display: 'inline-block',
- fontSize: theme.fontSizes[5],
+ fontSize: fontSizes[5],
lineHeight: 2,
paddingLeft: 5,
paddingRight: 5,
@@ -11,28 +12,28 @@ const base = {
const label = {
...base,
width: '40%',
- color: theme.colors.lowgray,
+ color: colors.lowgray,
userSelect: 'none',
}
const property = {
- marginTop: theme.scale[2],
- marginBottom: theme.scale[2],
+ marginTop: margins[2],
+ marginBottom: margins[2],
}
const input = {
...base,
border: 'none',
width: '47%',
- backgroundColor: theme.colors.gray,
- color: theme.colors.lowgray,
+ backgroundColor: colors.gray,
+ color: colors.lowgray,
}
const checkbox = {
...base,
border: '1px solid rgb(36, 36, 36)',
- backgroundColor: theme.colors.gray,
- color: theme.colors.lowgray,
+ backgroundColor: colors.gray,
+ color: colors.lowgray,
}
const select = {
diff --git a/src/config/rebass.js b/src/config/rebass.js
deleted file mode 100644
index 7ed2c77d..00000000
--- a/src/config/rebass.js
+++ /dev/null
@@ -1,66 +0,0 @@
-import colors from './colors'
-import { margins, fontSizes } from './scales'
-
-const border = {
- borderColor: colors.black,
- borderRadius: 0,
-}
-
-const dark = {
- name: 'Dark',
- color: colors.white,
- fontFamily: 'Roboto, sans-serif',
- scale: margins,
- fontSizes: fontSizes,
- colors,
- inverted: colors.midGray,
- ...border,
-
- Block: {
- backgroundColor: colors.gray,
- ...border,
- borderLeft: 0,
- borderRight: 0,
- marginBottom: 0,
- paddingBottom: 0,
- },
- PanelHeader: {
- marginRight: -10,
- marginBottom: 0,
- fontSize: fontSizes[5],
- fontWeight: 400,
- color: colors.white,
- },
- Panel: {
- backgroundColor: colors.gray,
- },
- Button: {
- color: '#00d9f7',
- },
- Menu: {
- color: '#00d9f7',
- backgroundColor: '#000'
- },
- Message: {
- color: '#111',
- opacity: 15/16
- },
- Header: {
- fontWeight: 400,
- },
- ButtonCircle : {
- },
- Toolbar: {
- fontWeight: 400,
- minHeight: margins[3]
- },
- Label: {
- fontWeight: 300,
- },
- Input: {
- fontWeight: 300,
- fontSize: fontSizes[5],
- }
-}
-
-export default dark
diff --git a/src/config/theme.js b/src/config/theme.js
new file mode 100644
index 00000000..7173b430
--- /dev/null
+++ b/src/config/theme.js
@@ -0,0 +1,9 @@
+import colors from './colors'
+import { margins, fontSizes } from './scales'
+
+const dark = {
+ color: colors.white,
+ fontFamily: 'Roboto, sans-serif',
+}
+
+export default dark
diff --git a/webpack.production.config.js b/webpack.production.config.js
index c2e00172..a98afeee 100644
--- a/webpack.production.config.js
+++ b/webpack.production.config.js
@@ -40,7 +40,6 @@ module.exports = {
"react-file-reader-input",
//TODO: Icons raise multi vendor errors?
//"react-icons",
- "rebass",
// Open Layers
'openlayers',
'ol-mapbox-style'