diff --git a/index.html b/index.html
new file mode 100644
index 0000000..759c534
--- /dev/null
+++ b/index.html
@@ -0,0 +1,500 @@
+
+
+
+
+
+
+
+ Document
+
+
+
+ ReGrid
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/package.json b/package.json
index 289b831..c07457d 100644
--- a/package.json
+++ b/package.json
@@ -17,10 +17,14 @@
"babel-plugin-add-module-exports": "0.2.1",
"babel-preset-es2015": "6.24.1",
"chai": "3.5.0",
+ "css-loader": "^0.28.7",
"eslint": "3.19.0",
"eslint-loader": "1.7.1",
"mocha": "3.3.0",
- "webpack": "3.1.0",
+ "node-sass": "^4.5.3",
+ "sass-loader": "^6.0.6",
+ "style-loader": "^0.18.2",
+ "webpack": "^3.1.0",
"yargs": "7.1.0"
},
"repository": {
@@ -41,5 +45,10 @@
"bugs": {
"url": "https://github.com/netchampfaris/regrid/issues"
},
- "homepage": "https://github.com/netchampfaris/regrid"
+ "homepage": "https://github.com/netchampfaris/regrid",
+ "dependencies": {
+ "bootstrap": "^4.0.0-beta",
+ "jquery": "^3.2.1",
+ "popper.js": "^1.12.5"
+ }
}
diff --git a/src/style.scss b/src/style.scss
new file mode 100644
index 0000000..2730365
--- /dev/null
+++ b/src/style.scss
@@ -0,0 +1,73 @@
+@import "~bootstrap/scss/functions";
+@import "~bootstrap/scss/mixins";
+@import "~bootstrap/scss/variables";
+@import "~bootstrap/scss/tables";
+
+.data-table {
+ width: 100%;
+ position: relative;
+ overflow: auto;
+
+ .table {
+ border-collapse: collapse;
+ }
+
+ .table > thead > tr > td, .table > tbody > tr > td {
+ padding: 0;
+ }
+}
+
+.body-scrollable {
+ max-height: 500px;
+ overflow: auto;
+ border-bottom: 1px solid $border-color;
+}
+
+.data-table-header {
+ position: absolute;
+ top: 0;
+ left: 0;
+ background-color: white;
+ font-weight: bold;
+ cursor: col-resize;
+
+ .content span {
+ cursor: pointer;
+ }
+}
+
+.data-table-col {
+ .content {
+ padding: 8px;
+ border: 1px solid white;
+ }
+
+ &.selected .content {
+ border: 1px solid theme-color('primary');
+ }
+
+ .content.ellipsis {
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ }
+}
+
+.edit-popup {
+ position: absolute;
+ border: 1px solid gray;
+ background: white;
+ border-radius: 4px;
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+
+ padding: 12px;
+}
+
+.noselect {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+}
\ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
index c8868b7..38efa64 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -37,6 +37,16 @@ const config = {
test: /(\.jsx|\.js)$/,
loader: 'eslint-loader',
exclude: /node_modules/
+ },
+ {
+ test: /\.scss$/,
+ use: [{
+ loader: 'style-loader' // creates style nodes from JS strings
+ }, {
+ loader: 'css-loader' // translates CSS into CommonJS
+ }, {
+ loader: 'sass-loader' // compiles Sass to CSS
+ }]
}
]
},