-
-
+ let overlayStyle = {}
+ if(!this.props.isOpen) {
+ overlayStyle['display'] = 'none';
+ }
+
+ return
+
{this.props.children}
-
}
}
diff --git a/src/index.jsx b/src/index.jsx
index bd9f49d7..147313c3 100644
--- a/src/index.jsx
+++ b/src/index.jsx
@@ -2,8 +2,7 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './favicon.ico'
-import './style.scss'
-import './index.css'
+import './styles/index.scss'
import App from './components/App';
ReactDOM.render(
, document.querySelector("#app"));
diff --git a/src/style.scss b/src/style.scss
deleted file mode 100644
index a7fd0b55..00000000
--- a/src/style.scss
+++ /dev/null
@@ -1,222 +0,0 @@
-$color-black: #1c1f24;
-$color-gray: #26282e;
-$color-midgray: #36383e;
-$color-lowgray: #8e8e8e;
-$color-white: #f0f0f0;
-$margin-1: 3px;
-$margin-2: 5px;
-$margin-3: 10px;
-$margin-4: 30px;
-$margin-5: 40px;
-$font-size-1: 24px;
-$font-size-2: 20px;
-$font-size-3: 18px;
-$font-size-4: 16px;
-$font-size-5: 14px;
-$font-size-6: 12px;
-$font-family: Roboto, sans-serif;
-.maputnik-toolbar {
- position: fixed;
- height: 40px;
- width: 100%;
- z-index: 100;
- left: 0;
- top: 0;
- background-color: $color-black;
-}
-.maputnik-layer-list-container {
- padding: 0;
- margin: 0;
- padding-bottom: $margin-5;
-}
-.maputnik-layer-list-item {
- font-weight: 400;
- color: $color-lowgray;
- font-size: $font-size-6;
- border-width: 0px 0px 1px;
- border-style: solid;
- border-color: lighten($color-black, 0.1);
- user-select: none;
- list-style: none;
- z-index: 2000;
- cursor: pointer;
- position: relative;
- padding: 5px 10px;
- background-color: $color-black;
- line-height: 1.3;
- display: flex;
- flex-direction: row;
-}
-.maputnik-icon-action {
- display: inline;
- margin-left: $margin-1;
-}
-.maputnik-scroll-container {
- overflow-x: visible;
- overflow-y: scroll;
- bottom: 0px;
- left: 0px;
- right: 0px;
- top: 1px;
- position: absolute;
-}
-.maputnik-layout {
- font-family: $font-family;
- color: $color-white;
-}
-.maputnik-layout-list {
- position: fixed;
- bottom: 0px;
- height: 100%;
- top: 40px;
- left: 0px;
- z-index: 1;
- width: 200px;
- overflow: hidden;
- background-color: $color-black;
-}
-.maputnik-layout-drawer {
- position: fixed;
- bottom: 0px;
- height: 100%;
- top: 40px;
- left: 200px;
- z-index: 1;
- width: 350px;
- background-color: $color-black;
-}
-.maputnik-layout-bottom {
- position: fixed;
- height: 50px;
- bottom: 0px;
- left: 550px;
- z-index: 1;
- width: 100%;
- background-color: $color-black;
-}
-.maputnik-layer-editor-group {
- font-weight: bold;
- font-size: $font-size-5;
- background-color: darken($color-gray, 1.5);
- color: $color-lowgray;
- cursor: pointer;
- user-select: none;
- padding: $margin-2;
- display: flex;
- flex-direction: row;
- line-height: 20px;
-}
-.maputnik-map {
- position: fixed !important;
- top: 40px;
- right: 0px;
- bottom: 0px;
- height: 100%;
- width: 75%;
-}
-.maputnik-toolbar-link {
- display: inline-block;
- padding: $margin-3;
- font-size: $font-size-5;
- cursor: pointer;
- color: $color-white;
- text-decoration: none;
-}
-.maputnik-toolbar-action {
- @extend .maputnik-toolbar-link;
- &:hover {
- background-color: $color-gray;
- }
-}
-.maputnik-doc-wrapper {
- display: inline-block;
- box-sizing: border-box;
- font-size: $font-size-6;
- line-height: 2;
- color: $color-lowgray;
- user-select: none;
- position: relative;
- vertical-align: top;
- width: 50%;
-}
-.maputnik-base {
- display: inline-block;
- box-sizing: border-box;
- font-size: $font-size-6;
- line-height: 2;
- padding-left: $margin-2;
- padding-right: $margin-2;
-}
-.maputnik-input {
- @extend .maputnik-base;
- border: none;
- background-color: $color-gray;
- color: $color-lowgray;
-}
-.maputnik-string {
- @extend .maputnik-input;
- width: 50%;
-}
-.maputnik-number {
- @extend .maputnik-input;
-}
-.maputnik-color {
- @extend .maputnik-input;
-}
-.maputnik-color-wrapper {
- position: relative;
- display: inline;
-}
-.maputnik-color-picker-offset {
-}
-.maputnik-color-picker-overlay {
-}
-.maputnik-button {
- cursor: pointer;
- background-color: $color-midgray;
- color: $color-lowgray;
- font-size: $font-size-6;
- padding: $margin-2;
- user-select: none;
- border-radius: 2px;
- box-sizing: border-box;
-}
-.maputnik-layer-list-item-id {
- width: 115px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
-}
-.maputnik-filter-editor-property {
- display: inline-block;
- width: '22%';
-}
-.maputnik-filter-editor-operator {
- display: inline-block;
- width: 19%;
- margin-left: 2%;
-}
-.maputnik-filter-editor-args {
- display: inline-block;
- width: 54%;
- margin-left: 2%;
-}
-.maputnik-modal {
- min-width: 350px;
- max-width: 600px;
- background-color: $color-black;
- box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3);
-}
-.maputnik-modal-header {
- background-color: $color-gray;
- display: flex;
- flex-direction: row;
- padding: $margin-3;
- font-size: $font-size-5;
-}
-.maputnik-modal-header-toggle {
- cursor: pointer;
-}
-.maputnik-modal-content {
- padding: $margin-3;
-}
diff --git a/src/styles/_base.scss b/src/styles/_base.scss
new file mode 100644
index 00000000..3c15e2ab
--- /dev/null
+++ b/src/styles/_base.scss
@@ -0,0 +1,58 @@
+@font-face {
+ font-family: 'Roboto';
+ src: url('../fonts/Roboto-Regular.ttf') format('truetype');
+ font-weight: normal;
+ font-style: normal;
+}
+
+@font-face {
+ font-family: 'Roboto';
+ src: url('../fonts/Roboto-Medium.ttf') format('truetype');
+ font-weight: bold;
+ font-style: normal;
+}
+
+html {
+ color: $color-white;
+ font-size: $font-size-2;
+ box-sizing: border-box;
+}
+
+*, *:before, *:after {
+ box-sizing: inherit;
+}
+
+p {
+ font-size: $font-size-6;
+ padding-top: $margin-2;
+ padding-bottom: $margin-2;
+ color: $color-lowgray;
+}
+
+h1 {
+ font-size: $font-size-2;
+ margin-bottom: $margin-3;
+}
+
+h2 {
+ font-size: $font-size-3;
+ margin-bottom: $margin-3;
+}
+
+h3 {
+ font-size: $font-size-4;
+ margin-bottom: $margin-3;
+}
+
+h4 {
+ font-size: $font-size-5;
+ margin-bottom: $margin-3;
+}
+
+input:focus {
+ color: $color-white !important;
+ outline: #8e8e8e auto 1px !important;
+}
+label:hover {
+ color: $color-white;
+}
diff --git a/src/styles/_components.scss b/src/styles/_components.scss
new file mode 100644
index 00000000..822ec8eb
--- /dev/null
+++ b/src/styles/_components.scss
@@ -0,0 +1,57 @@
+
+.maputnik-icon-text {
+ padding-left: $margin-1;
+}
+
+.maputnik-icon-action {
+ display: inline;
+ margin-left: $margin-1;
+}
+.maputnik-map {
+ position: fixed !important;
+ top: 40px;
+ right: 0px;
+ bottom: 0px;
+ height: 100%;
+ width: 75%;
+}
+.maputnik-doc-wrapper {
+ display: inline-block;
+ box-sizing: border-box;
+ font-size: $font-size-6;
+ line-height: 2;
+ color: $color-lowgray;
+ user-select: none;
+ position: relative;
+ vertical-align: top;
+ width: 50%;
+}
+.maputnik-button {
+ cursor: pointer;
+ background-color: $color-midgray;
+ color: $color-lowgray;
+ font-size: $font-size-6;
+ padding: $margin-2;
+ user-select: none;
+ border-radius: 2px;
+ box-sizing: border-box;
+
+ &:hover {
+ background-color: lighten($color-midgray, 6);
+ color: $color-white;
+ }
+}
+
+.maputnik-big-button {
+ margin-top: $margin-3;
+ display: inline-block;
+ padding: $margin-3;
+ font-size: $font-size-5;
+}
+.maputnik-input-block {
+ margin: $margin-3;
+}
+
+.maputnik-space {
+ flex-grow: 1;
+}
diff --git a/src/styles/_input.scss b/src/styles/_input.scss
new file mode 100644
index 00000000..2c26cc21
--- /dev/null
+++ b/src/styles/_input.scss
@@ -0,0 +1,34 @@
+.maputnik-base {
+ display: inline-block;
+ box-sizing: border-box;
+ font-size: $font-size-6;
+ line-height: 2;
+ padding-left: $margin-2;
+ padding-right: $margin-2;
+}
+.maputnik-input {
+ @extend .maputnik-base;
+ border: none;
+ background-color: $color-gray;
+ color: $color-lowgray;
+}
+.maputnik-string {
+ @extend .maputnik-input;
+ width: 50%;
+}
+.maputnik-number {
+ @extend .maputnik-input;
+}
+
+//COLOR PICKER
+.maputnik-color {
+ @extend .maputnik-input;
+}
+.maputnik-color-wrapper {
+ position: relative;
+ display: inline;
+}
+.maputnik-color-picker-offset {
+}
+.maputnik-color-picker-overlay {
+}
diff --git a/src/styles/_layer.scss b/src/styles/_layer.scss
new file mode 100644
index 00000000..5fb4ef19
--- /dev/null
+++ b/src/styles/_layer.scss
@@ -0,0 +1,74 @@
+
+// LAYER LIST
+.maputnik-layer-list-container {
+ padding: 0;
+ margin: 0;
+ padding-bottom: $margin-5;
+}
+.maputnik-layer-list-item {
+ font-weight: 400;
+ color: $color-lowgray;
+ font-size: $font-size-6;
+ border-width: 0px 0px 1px;
+ border-style: solid;
+ border-color: lighten($color-black, 0.1);
+ user-select: none;
+ list-style: none;
+ z-index: 2000;
+ cursor: pointer;
+ position: relative;
+ padding: 5px 10px;
+ background-color: $color-black;
+ line-height: 1.3;
+ display: flex;
+ flex-direction: row;
+}
+
+.maputnik-icon-action svg {
+ fill: $color-black;
+}
+
+.maputnik-layer-list-item:hover, .maputnik-layer-list-item-selected {
+ background-color: lighten($color-black, 0.8);
+
+ .maputnik-icon-action svg {
+ fill: $color-midgray;
+ &:hover {
+ fill: $color-lowgray;
+ }
+ }
+}
+.maputnik-layer-list-item-id {
+ width: 115px;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+}
+
+// FILTER EDITOR
+.maputnik-layer-editor-group {
+ font-weight: bold;
+ font-size: $font-size-5;
+ background-color: darken($color-gray, 1.5);
+ color: $color-lowgray;
+ cursor: pointer;
+ user-select: none;
+ padding: $margin-2;
+ display: flex;
+ flex-direction: row;
+ line-height: 20px;
+}
+.maputnik-filter-editor-property {
+ display: inline-block;
+ width: '22%';
+}
+.maputnik-filter-editor-operator {
+ display: inline-block;
+ width: 19%;
+ margin-left: 2%;
+}
+.maputnik-filter-editor-args {
+ display: inline-block;
+ width: 54%;
+ margin-left: 2%;
+}
diff --git a/src/styles/_layout.scss b/src/styles/_layout.scss
new file mode 100644
index 00000000..463bfa4a
--- /dev/null
+++ b/src/styles/_layout.scss
@@ -0,0 +1,46 @@
+//SCROLLING
+.maputnik-scroll-container {
+ overflow-x: visible;
+ overflow-y: scroll;
+ bottom: 0px;
+ left: 0px;
+ right: 0px;
+ top: 1px;
+ position: absolute;
+}
+
+//APP LAYOUT
+.maputnik-layout {
+ font-family: $font-family;
+ color: $color-white;
+}
+.maputnik-layout-list {
+ position: fixed;
+ bottom: 0px;
+ height: 100%;
+ top: 40px;
+ left: 0px;
+ z-index: 1;
+ width: 200px;
+ overflow: hidden;
+ background-color: $color-black;
+}
+.maputnik-layout-drawer {
+ position: fixed;
+ bottom: 0px;
+ height: 100%;
+ top: 40px;
+ left: 200px;
+ z-index: 1;
+ width: 350px;
+ background-color: $color-black;
+}
+.maputnik-layout-bottom {
+ position: fixed;
+ height: 50px;
+ bottom: 0px;
+ left: 550px;
+ z-index: 1;
+ width: 100%;
+ background-color: $color-black;
+}
diff --git a/src/styles/_modal.scss b/src/styles/_modal.scss
new file mode 100644
index 00000000..89b0c387
--- /dev/null
+++ b/src/styles/_modal.scss
@@ -0,0 +1,102 @@
+//MODAL
+.maputnik-modal {
+ min-width: 350px;
+ max-width: 600px;
+ background-color: $color-black;
+ box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3);
+ z-index: 3;
+}
+.maputnik-modal-section {
+ padding-top: $margin-3;
+ padding-bottom: $margin-3;
+}
+.maputnik-modal-header {
+ background-color: $color-gray;
+ display: flex;
+ flex-direction: row;
+ padding: $margin-3;
+}
+.maputnik-modal-header-title {
+ font-size: $font-size-5;
+ margin: 0;
+}
+
+.maputnik-modal-header-toggle {
+ cursor: pointer;
+}
+.maputnik-modal-content {
+ padding: $margin-3;
+}
+
+.maputnik-modal-header-space {
+ @extend .maputnik-space;
+}
+
+//OVERLAY
+.maputnik-overlay-viewport {
+ position: fixed;
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+ left: 0px;
+ z-index: 2;
+ opacity: 0.875;
+ background-color: rgb(28, 31, 36);
+}
+
+.maputnik-overlay {
+ top: 0px;
+ right: 0px;
+ bottom: 0px;
+ left: 0px;
+ position: fixed;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+//OPEN MODAL
+.maputnik-upload-button {
+ @extend .maputnik-big-button;
+}
+.maputnik-public-style {
+ vertical-align: top;
+ margin-top: 10px;
+ margin-right: 10px;
+ background-color: $color-gray;
+ display: inline-block;
+ width: 180px;
+ font-size: $font-size-2;
+ color: $color-lowgray;
+}
+.maputnik-public-style-button {
+ background-color: $color-gray;
+ padding: $margin-3;
+ display: block;
+
+ &:hover {
+ background-color: $color-midgray;
+ }
+}
+.maputnik-public-style-header {
+ display: flex;
+ flex-direction: row;
+}
+
+.maputnik-public-style-thumbnail {
+ display: block;
+ margin-top: $margin-2;
+ max-width: 100%;
+}
+
+//ADD MODAL
+.maputnik-add-layer-button {
+ margin-right: $margin-3;
+ float: right;
+ display: inline-block;
+ margin-top: 3;
+ margin-bottom: $margin-3;
+ text-align: right;
+ @extend .maputnik-big-button;
+}
diff --git a/src/styles/_picker.scss b/src/styles/_picker.scss
new file mode 100644
index 00000000..f1691b2c
--- /dev/null
+++ b/src/styles/_picker.scss
@@ -0,0 +1,12 @@
+
+
+.chrome-picker {
+ background-color: #1c1f24 !important;
+ font-family: inherit !important;
+}
+
+.chrome-picker input {
+ background-color: rgb(38, 40, 46) !important;
+ color: rgb(142, 142, 142) !important;
+ box-shadow: none !important;
+}
diff --git a/src/index.css b/src/styles/_reset.scss
similarity index 55%
rename from src/index.css
rename to src/styles/_reset.scss
index 5f64e618..6e3e66ce 100644
--- a/src/index.css
+++ b/src/styles/_reset.scss
@@ -1,17 +1,3 @@
-@font-face {
- font-family: 'Roboto';
- src: url('./fonts/Roboto-Regular.ttf') format('truetype');
- font-weight: normal;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: url('./fonts/Roboto-Medium.ttf') format('truetype');
- font-weight: bold;
- font-style: normal;
-}
-
html {
background-color: rgb(28, 31, 36);
}
@@ -60,32 +46,3 @@ table {
border-collapse: collapse;
border-spacing: 0;
}
-
-.chrome-picker {
- background-color: #1c1f24 !important;
- font-family: inherit !important;
-}
-
-.chrome-picker input {
- background-color: rgb(38, 40, 46) !important;
- color: rgb(142, 142, 142) !important;
- box-shadow: none !important;
-}
-
-::-webkit-scrollbar {
- background-color: #26282e;
- width: 5px;
-}
-
-::-webkit-scrollbar-thumb {
- border-radius: 6px;
- -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
- background-color: #666;
- padding-left: 2px;
- padding-right: 2px;
-}
-
-input:focus {
- color: white !important;
- outline: #8e8e8e auto 1px !important;
-}
diff --git a/src/styles/_scrollbar.scss b/src/styles/_scrollbar.scss
new file mode 100644
index 00000000..7f9f9d6c
--- /dev/null
+++ b/src/styles/_scrollbar.scss
@@ -0,0 +1,12 @@
+::-webkit-scrollbar {
+ background-color: #26282e;
+ width: 5px;
+}
+
+::-webkit-scrollbar-thumb {
+ border-radius: 6px;
+ -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
+ background-color: #666;
+ padding-left: 2px;
+ padding-right: 2px;
+}
diff --git a/src/styles/_toolbar.scss b/src/styles/_toolbar.scss
new file mode 100644
index 00000000..0e2d5c60
--- /dev/null
+++ b/src/styles/_toolbar.scss
@@ -0,0 +1,47 @@
+// TOOLBAR
+.maputnik-toolbar {
+ position: fixed;
+ height: $toolbar-height;
+ width: 100%;
+ z-index: 100;
+ left: 0;
+ top: 0;
+ background-color: $color-black;
+}
+
+.maputnik-toolbar-logo {
+ width: 180px;
+ text-align: left;
+ background-color: $color-black;
+ padding: $margin-2;
+ height: $toolbar-height;
+
+ h1 {
+ display: inline;
+ }
+
+ img {
+ width: 30px;
+ height: 30px;
+ padding-right: $margin-2;
+ vertical-align: middle;
+ }
+}
+
+.maputnik-toolbar-link {
+ vertical-align: top;
+ height: $toolbar-height;
+ display: inline-block;
+ padding: $margin-3;
+ font-size: $font-size-5;
+ cursor: pointer;
+ color: $color-white;
+ text-decoration: none;
+ &:hover {
+ background-color: $color-midgray;
+ }
+}
+
+.maputnik-toolbar-action {
+ @extend .maputnik-toolbar-link;
+}
diff --git a/src/styles/index.scss b/src/styles/index.scss
new file mode 100644
index 00000000..953354e1
--- /dev/null
+++ b/src/styles/index.scss
@@ -0,0 +1,31 @@
+$color-black: #1c1f24;
+$color-gray: #26282e;
+$color-midgray: #36383e;
+$color-lowgray: #8e8e8e;
+$color-white: #f0f0f0;
+$margin-1: 3px;
+$margin-2: 5px;
+$margin-3: 10px;
+$margin-4: 30px;
+$margin-5: 40px;
+$font-size-1: 24px;
+$font-size-2: 20px;
+$font-size-3: 18px;
+$font-size-4: 16px;
+$font-size-5: 14px;
+$font-size-6: 12px;
+$font-family: Roboto, sans-serif;
+
+$toolbar-height: 40px;
+
+@import 'reset';
+@import 'base';
+
+@import 'components';
+@import 'scrollbar';
+@import 'picker';
+@import 'toolbar';
+@import 'modal';
+@import 'layout';
+@import 'layer';
+@import 'input';