diff --git a/demo/demo.css b/demo/demo.css index 78558f5..846df99 100644 --- a/demo/demo.css +++ b/demo/demo.css @@ -20,7 +20,8 @@ h1 { padding-left: 15px; } .b-change-theme { - padding: 20px; } + padding: 20px; + margin-bottom: 20px; } .b-change-theme__link { font-size: 16px; line-height: 20px; @@ -107,3 +108,17 @@ th.sortable { top: 0; bottom: 6px; margin: auto 0; } + +.col-wrap { + font-size: 0; + padding: 25px 0; } + .col-wrap .col2 { + vertical-align: top; + display: inline-block; + width: 50%; + padding: 0 15px; } + .col-wrap .col3 { + vertical-align: top; + display: inline-block; + width: 33.33%; + padding: 0 15px; } diff --git a/demo/index.html b/demo/index.html index b0fc361..36716cf 100644 --- a/demo/index.html +++ b/demo/index.html @@ -11,140 +11,130 @@

Angular Data Grid

- Material Design Bootstrap + Material Design
-
-
-
+
+
+
- +
-
-
-
- - -
- - - - -
-
-
- - -
- - - - -
+
+
+
+ +
-
-
- - found : {{filtered.length}} items - - +
+
+
+ + +
- - - - - - - - - - - - - - - - - - - - - - -
- Order # - - Date Placed - - Purchase Order # - - - - Total - -
- - - View - Order -
-
+
+
+
+
+ + found : {{filtered.length}} items + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ Order # + + Date Placed + + Purchase Order # + + + + Total + +
+ + + View + Order +
+
+
Angular Data Grid ng-model="paginationOptions.currentPage" ng-change="reloadGrid()" items-per-page="paginationOptions.itemsPerPage"> +
+
@@ -160,6 +152,7 @@

Angular Data Grid

+
diff --git a/dist/material.css b/dist/material.css index 823b576..b84d354 100644 --- a/dist/material.css +++ b/dist/material.css @@ -1,6 +1,8 @@ table { border-collapse: collapse; border-spacing: 0; + width: 100%; + font-size: 16px; margin: 8px; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 2px 1px -1px rgba(0, 0, 0, 0.12); } @@ -93,3 +95,139 @@ th.sortable { .items-per-page a { cursor: pointer; } + +.pagination-prev a { + font-size: 0; + width: 30px; + position: relative; } + .pagination-prev a:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin: center; + border-left: 2px solid #333; + border-bottom: 2px solid #333; + transform: rotate(45deg); } + +.pagination-next a { + font-size: 0; + width: 30px; + position: relative; } + .pagination-next a:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin: center; + border-left: 2px solid #333; + border-bottom: 2px solid #333; + transform: rotate(-135deg); } + +.pagination-first a { + font-size: 0; + width: 30px; + position: relative; } + .pagination-first a:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin: center; + border-left: 2px solid #333; + border-bottom: 2px solid #333; + transform: rotate(45deg); } + .pagination-first a:after { + left: 4px; + width: 2px; + height: 14px; + content: ''; + top: 0; + bottom: 0; + position: absolute; + margin: auto 0; + background: #333; } + +.pagination-last a { + font-size: 0; + width: 30px; + position: relative; } + .pagination-last a:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin: center; + border-left: 2px solid #333; + border-bottom: 2px solid #333; + transform: rotate(-135deg); } + .pagination-last a:after { + right: 4px; + width: 2px; + height: 14px; + content: ''; + top: 0; + bottom: 0; + position: absolute; + margin: auto 0; + background: #333; } + +.form-group { + position: relative; } + +input:not([type]), input[type=text], input[type=password], input[type=email], input[type=url], input[type=time], input[type=date], input[type=datetime-local], input[type=tel], input[type=number], input[type=search], textarea.materialize-textarea { + background-color: transparent; + border: none; + border-bottom: 1px solid #444; + border-radius: 0; + outline: none; + height: 3rem; + width: 100%; + font-size: 1rem; + margin: 0 0 15px 0; + padding: 0; + box-shadow: none; + box-sizing: content-box; + transition: all .2s; } + input:not([type]):focus, input[type=text]:focus, input[type=password]:focus, input[type=email]:focus, input[type=url]:focus, input[type=time]:focus, input[type=date]:focus, input[type=datetime-local]:focus, input[type=tel]:focus, input[type=number]:focus, input[type=search]:focus, textarea.materialize-textarea:focus { + border-bottom: 1px solid #106cc8; + box-shadow: 0 1px 0 0 #106cc8; } + input:not([type]):focus ~ .input-label, input[type=text]:focus ~ .input-label, input[type=password]:focus ~ .input-label, input[type=email]:focus ~ .input-label, input[type=url]:focus ~ .input-label, input[type=time]:focus ~ .input-label, input[type=date]:focus ~ .input-label, input[type=datetime-local]:focus ~ .input-label, input[type=tel]:focus ~ .input-label, input[type=number]:focus ~ .input-label, input[type=search]:focus ~ .input-label, textarea.materialize-textarea:focus ~ .input-label { + -webkit-transform: translateY(-140%) scale(1); + transform: translateY(-140%) scale(1); + color: #106cc8; } + +.input-label { + color: #444; + position: absolute; + top: 0.8rem; + left: 0; + font-size: 1rem; + cursor: text; + transition: all .2s; + transform: scale(1.25); + transform-origin: left bottom; } diff --git a/index.html b/index.html index 1ad4606..f16c8d0 100644 --- a/index.html +++ b/index.html @@ -128,18 +128,6 @@

Angular Data Grid

- - - - - - - - - - - - diff --git a/src/css/demo.scss b/src/css/demo.scss index 05c77cc..1b60d93 100644 --- a/src/css/demo.scss +++ b/src/css/demo.scss @@ -21,6 +21,7 @@ h1 { } .b-change-theme { padding: 20px; + margin-bottom: 20px; &__link { font-size: 16px; line-height: 20px; @@ -123,4 +124,20 @@ th.sortable { margin: auto 0; } } +} +.col-wrap { + font-size: 0; + padding: 25px 0; + .col2 { + vertical-align: top; + display: inline-block; + width: 50%; + padding: 0 15px; + } + .col3 { + vertical-align: top; + display: inline-block; + width: 33.33%; + padding: 0 15px; + } } \ No newline at end of file diff --git a/src/css/material.scss b/src/css/material.scss index b68987d..fa69a9a 100644 --- a/src/css/material.scss +++ b/src/css/material.scss @@ -3,6 +3,8 @@ table { border-collapse: collapse; border-spacing: 0; + width: 100%; + font-size: 16px; margin: 8px; box-shadow: 0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12); } @@ -52,7 +54,7 @@ table { .pagination-page { transition: background .1s ease-out, color .1s ease-out; &.active { - background: $activeBg; + background: $activeColor; a { color: $activeText; } @@ -61,7 +63,7 @@ table { .pagination { transition: background .1s ease-out, color .1s ease-out; .active { - background: $activeBg; + background: $activeColor; a { color: $activeText; } @@ -107,7 +109,7 @@ th.sortable { .items-per-page { .active { - background: $activeBg; + background: $activeColor; a { color: $activeText; } @@ -115,4 +117,150 @@ th.sortable { a { cursor: pointer; } +} + +.pagination-prev a { + font-size: 0; + width: 30px; + position: relative; + &:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin:center; + border-left: 2px solid $iconsColor; + border-bottom: 2px solid $iconsColor; + transform: rotate(45deg); + } +} +.pagination-next a { + font-size: 0; + width: 30px; + position: relative; + &:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin:center; + border-left: 2px solid $iconsColor; + border-bottom: 2px solid $iconsColor; + transform: rotate(-135deg); + } +} +.pagination-first a { + font-size: 0; + width: 30px; + position: relative; + &:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin:center; + border-left: 2px solid $iconsColor; + border-bottom: 2px solid $iconsColor; + transform: rotate(45deg); + } + &:after { + left: 4px; + width: 2px; + height: 14px; + content: ''; + top: 0; + bottom: 0; + position: absolute; + margin: auto 0; + background: $iconsColor; + } +} +.pagination-last a { + font-size: 0; + width: 30px; + position: relative; + &:before { + left: 0; + top: 0; + bottom: 0; + right: 0; + margin: auto; + position: absolute; + display: block; + width: 10px; + height: 10px; + content: ''; + transform-origin:center; + border-left: 2px solid $iconsColor; + border-bottom: 2px solid $iconsColor; + transform: rotate(-135deg); + } + &:after { + right: 4px; + width: 2px; + height: 14px; + content: ''; + top: 0; + bottom: 0; + position: absolute; + margin: auto 0; + background: $iconsColor; + } +} + +.form-group { + position: relative; +} +input:not([type]), input[type=text], input[type=password], input[type=email], input[type=url], input[type=time], input[type=date], input[type=datetime-local], input[type=tel], input[type=number], input[type=search], textarea.materialize-textarea { + background-color: transparent; + border: none; + border-bottom: 1px solid $textColor; + border-radius: 0; + outline: none; + height: 3rem; + width: 100%; + font-size: 1rem; + margin: 0 0 15px 0; + padding: 0; + box-shadow: none; + box-sizing: content-box; + transition: all .2s; + &:focus { + border-bottom: 1px solid $activeColor; + box-shadow: 0 1px 0 0 $activeColor; + &~.input-label{ + -webkit-transform: translateY(-140%) scale(1); + transform: translateY(-140%) scale(1); + color: $activeColor; + } + } +} +.input-label { + color: $textColor; + position: absolute; + top: 0.8rem; + left: 0; + font-size: 1rem; + cursor: text; + transition: all .2s; + transform: scale(1.25); + transform-origin: left bottom; } \ No newline at end of file diff --git a/src/css/variables.scss b/src/css/variables.scss index 0ed9536..6217f6b 100644 --- a/src/css/variables.scss +++ b/src/css/variables.scss @@ -1,3 +1,4 @@ -$activeBg: rgb(16,108,200); +$activeColor: rgb(16,108,200); $activeText: #fff; -$textColor: #444; \ No newline at end of file +$textColor: #444; +$iconsColor: #333; \ No newline at end of file