summaryrefslogtreecommitdiffstats
path: root/themes
diff options
context:
space:
mode:
authorAleksi Hietanen <aleksi@vaadin.com>2017-02-23 09:34:59 +0200
committerPekka Hyvönen <pekka@vaadin.com>2017-02-23 09:34:59 +0200
commit6783bca88d4cf0c8944e84a0fef0a219c0b9a4d0 (patch)
tree4fe5a5752482f73c902beb4b5e05e647a2b6203b /themes
parent813a99cfeff9d9cd70d77bd5d9ae75f5fa7b2ff5 (diff)
downloadvaadin-framework-6783bca88d4cf0c8944e84a0fef0a219c0b9a4d0.tar.gz
vaadin-framework-6783bca88d4cf0c8944e84a0fef0a219c0b9a4d0.zip
Add initial implementation of TreeGrid (#8572)
* Add initial implementation of TreeGrid * Refactor TreeGrid and related classes * Fix potential class cast exception in TreeGrid#getDataProvider * Add smoke tests for TreeGrid * Add communication constants for TreeGrid Use shared constant values for hierarchy data serialization and deserialization * Fix event ordering in TreeGrid, add javadocs, keyboard navigation test * TreeGrid improvements * Add TreeGrid.getDataProvider to StateGetDoesNotMarkDirtyTest exclude list * Merge remote-tracking branch 'github/master' into tree-grid * Remove getEscalator override from TreeGrid
Diffstat (limited to 'themes')
-rw-r--r--themes/src/main/themes/VAADIN/themes/valo/components/_all.scss3
-rw-r--r--themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss61
2 files changed, 64 insertions, 0 deletions
diff --git a/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss b/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss
index 52f1d696aa..6211d39a92 100644
--- a/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss
+++ b/themes/src/main/themes/VAADIN/themes/valo/components/_all.scss
@@ -34,6 +34,7 @@
@import "textfield";
@import "textarea";
@import "tree";
+@import "treegrid";
@import "treetable";
@import "twincolselect";
@import "upload";
@@ -144,6 +145,8 @@
@if v-is-included(tree) {
@include valo-tree;
}
+
+ @include treegrid;
@if v-is-included(table) or v-is-included(treetable) {
@include valo-table;
diff --git a/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss b/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss
new file mode 100644
index 0000000000..15c53f8cc9
--- /dev/null
+++ b/themes/src/main/themes/VAADIN/themes/valo/components/_treegrid.scss
@@ -0,0 +1,61 @@
+/** Expander button visual - expanded */
+$tg-expander-char-expanded: '\f0d7' !default;
+
+/** Expander button visual - collapsed */
+$tg-expander-char-collapsed: '\f0da' !default;
+
+/** Expander button width */
+$tg-expander-width: 10px !default;
+
+/** Expander button right side padding */
+$tg-expander-padding: 10px !default;
+
+@mixin treegrid {
+
+ // Expander with and item indentation constants
+ $indent: $tg-expander-width + $tg-expander-padding;
+
+ // Classname for depth styling
+ $class-depth: depth !default;
+
+ .v-tree-grid-expander {
+ display: inline-block;
+ width: $tg-expander-width;
+ padding-right: $tg-expander-padding;
+
+ &::before {
+ display: inline-block;
+ padding-right: 4px;
+ font-family: FontAwesome;
+ }
+
+ // Expander for expanded item
+ &.expanded {
+ &::before {
+ content: $tg-expander-char-expanded;
+ }
+ }
+
+ // Expander for collapsed item
+ &.collapsed {
+ &::before {
+ content: $tg-expander-char-collapsed;
+ }
+ }
+ }
+
+ // Hierarchy depth styling
+ .v-tree-grid-node {
+ @for $i from 0 through 15 {
+ &.#{$class-depth}-#{$i} {
+ padding-left: $indent * $i;
+ }
+ }
+ }
+
+ // Expander and cell content in same line
+ .v-tree-grid-cell-content {
+ display: inline-block;
+ }
+}
+