diff --git a/.cz-config.js b/.cz-config.js new file mode 100644 index 0000000..7d9cfd4 --- /dev/null +++ b/.cz-config.js @@ -0,0 +1,20 @@ +'use strict'; + +module.exports = { + + types: [ + {value: 'feat', name: 'feat: A new feature'}, + {value: 'fix', name: 'fix: A bug fix'}, + {value: 'docs', name: 'docs: Documentation only changes'}, + {value: 'style', name: 'style: Changes that do not affect the meaning of the code\n (white-space, formatting, missing semi-colons, etc)'}, + {value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature'}, + {value: 'perf', name: 'perf: A code change that improves performance'}, + {value: 'test', name: 'test: Adding missing tests'}, + {value: 'chore', name: 'chore: Changes to the build process or auxiliary tools\n and libraries such as documentation generation'}, + {value: 'revert', name: 'revert: Revert to a commit'}, + {value: 'WIP', name: 'WIP: Work in progress'} + ], + + allowBreakingChanges: ['feat', 'fix', 'perf'] + +}; diff --git a/.gitignore b/.gitignore index 626e5af..5bf790f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,17 @@ .DS_Store -node_modules/ -tmp/ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log +node_modules +tmp diff --git a/.npmignore b/.npmignore index 73832b7..240a576 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ -demo -test \ No newline at end of file +test +docs +.* diff --git a/.travis.yml b/.travis.yml index afffc56..0760cfb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,4 @@ language: node_js -node_js: - - "0.8.23" -before_install: - - "npm install -g mocha" - - "npm install -g grunt-cli" \ No newline at end of file +node_js: "6" +after_success: + - npm run semantic-release diff --git a/Gruntfile.js b/Gruntfile.js deleted file mode 100644 index 3b9a6c9..0000000 --- a/Gruntfile.js +++ /dev/null @@ -1,94 +0,0 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ - -/*global module:false*/ - -module.exports = function(grunt) { - - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - - clean: { - release: ['css'], - }, - - topcoat: { - options: { - browsers: ['last 2 versions'], - namespace: 'topcoat', - license: grunt.file.read('test/fixtures/license.txt') - }, - compile: { - files: [{ - expand: true, - cwd: 'test/fixtures', - src: ['*.css'], - dest: 'css/', - ext: '.css' - } - ] - } - }, - - topdoc: { - usageguides: { - options: { - source: 'css', - destination: "demo", - template: "node_modules/topdoc-theme/", - templateData: { - "title": "Topcoat", - "subtitle": "CSS for clean and fast web apps", - "homeURL": "http://topcoat.io", - "debug": true - }, - } - } - }, - - cssmin: { - minify: { - expand: true, - cwd: 'css', - src: ['*.css', '!*.min.css'], - dest: 'css', - ext: '.min.css' - } - }, - - simplemocha: { - all: { - src: ['test/*.test.js'] - } - } - - }); - - // These plugins provide necessary tasks. - grunt.loadNpmTasks('grunt-simple-mocha'); - grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-contrib-cssmin'); - grunt.loadNpmTasks('grunt-topcoat'); - grunt.loadNpmTasks('grunt-topdoc'); - - grunt.registerTask('default', ['clean', 'build', 'test','release']); - grunt.registerTask('build', ['topcoat']); - grunt.registerTask('test', ['simplemocha']); - grunt.registerTask('release', ['cssmin', 'topdoc']); - -}; \ No newline at end of file diff --git a/css/mobile-dark.css b/css/mobile-dark-navigation-bar.css similarity index 72% rename from css/mobile-dark.css rename to css/mobile-dark-navigation-bar.css index 529cea1..a10c1d0 100644 --- a/css/mobile-dark.css +++ b/css/mobile-dark-navigation-bar.css @@ -1,20 +1,4 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/@font-face { +@font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Regular.otf'); } @@ -31,14 +15,22 @@ font-weight: 600; } -body { - font: 16px "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - font-weight: 400; +html { + font-size: 16px; } body { margin: 0; padding: 0; + font-family: "Source Sans Pro", + "HelveticaNeue-Light", + "Helvetica Neue Light", + "Helvetica Neue", + Helvetica, + Arial, + "Lucida Grande", + sans-serif; + font-weight: 400; background: hsla(200, 2%, 30%, 1); } @@ -68,7 +60,6 @@ body { .topcoat-navigation-bar, .topcoat-navigation-bar__item { - -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; } @@ -130,4 +121,4 @@ body { font-size: 1.3rem; font-weight: 400; color: hsla(0, 100%, 100%, 1); -} \ No newline at end of file +} diff --git a/test/expected/mobile-light.css b/css/mobile-light-navigation-bar.css similarity index 72% rename from test/expected/mobile-light.css rename to css/mobile-light-navigation-bar.css index aa2213f..ad9d076 100644 --- a/test/expected/mobile-light.css +++ b/css/mobile-light-navigation-bar.css @@ -1,20 +1,4 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/@font-face { +@font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Regular.otf'); } @@ -31,14 +15,22 @@ font-weight: 600; } -body { - font: 16px "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - font-weight: 400; +html { + font-size: 16px; } body { margin: 0; padding: 0; + font-family: "Source Sans Pro", + "HelveticaNeue-Light", + "Helvetica Neue Light", + "Helvetica Neue", + Helvetica, + Arial, + "Lucida Grande", + sans-serif; + font-weight: 400; background: hsla(180, 5%, 88%, 1); } @@ -68,7 +60,6 @@ body { .topcoat-navigation-bar, .topcoat-navigation-bar__item { - -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; } @@ -130,4 +121,4 @@ body { font-size: 1.3rem; font-weight: 400; color: hsla(0, 0%, 27%, 1); -} \ No newline at end of file +} diff --git a/demo/iframe.jade b/demo/iframe.jade deleted file mode 100644 index edf5402..0000000 --- a/demo/iframe.jade +++ /dev/null @@ -1,11 +0,0 @@ -!!! 5 -html - head - meta(charset = 'utf-8') - meta('http-equiv' = 'X-UA-Compatible', content = 'IE=edge,chrome=1') - title=project.title - meta(name="viewport", content="user-scalable=no,initial-scale = 1.0,maximum-scale = 1.0") - //- style. - //if lt IE 9 - script(src = '//html5shiv.googlecode.com/svn/trunk/html5.js') - body!=component.markup \ No newline at end of file diff --git a/demo/index.html b/demo/index.html deleted file mode 100644 index 8b16d9b..0000000 --- a/demo/index.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - Topcoat - - - - - - -
-
-
- -
- -
- -
-
-
-
-
-
-

Topcoat

-

CSS for clean and fast web apps

-
- -
-
-
- -
- -
-
- - \ No newline at end of file diff --git a/demo/mobile-light.html b/demo/mobile-light.html deleted file mode 100644 index 5d6ae1d..0000000 --- a/demo/mobile-light.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - Topcoat - - - - - - -
-
-
- -
- -
- -
-
-
-
-
-
-

Topcoat

-

CSS for clean and fast web apps

-
- -
-
-
- -
- -
-
- - \ No newline at end of file diff --git a/demo/topcoat-navigation-bar-mobile-light.html b/demo/topcoat-navigation-bar-mobile-light.html deleted file mode 100644 index 05219b2..0000000 --- a/demo/topcoat-navigation-bar-mobile-light.html +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - Topcoat - - - - - - - -
-
-
- -
- -
- -
-
-
-
-
-
-

Topcoat

-

CSS for clean and fast web apps

-
- -
-
-
- -
- -
-
- - - - \ No newline at end of file diff --git a/demo/css/brackets.css b/docs/css/brackets.css similarity index 100% rename from demo/css/brackets.css rename to docs/css/brackets.css diff --git a/demo/css/main.css b/docs/css/main.css similarity index 91% rename from demo/css/main.css rename to docs/css/main.css index 5097e1d..41a4ea9 100644 --- a/demo/css/main.css +++ b/docs/css/main.css @@ -283,25 +283,11 @@ section.examples li { #pageNav li { border-bottom: 1px solid #58595A; } - -select.docNav { - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - border-radius: 3px; - background: #595B5B; - background-image: none; - box-shadow: 0 0 0 1px #303233; +iframe.componentframe{ + width: 100%; + height: auto; + min-height: 400px; border: none; - border-top: 2px solid #666767; - color: #FFF; - text-shadow: 0 -1px 0 #000; - overflow: hidden; - font-size: 14px; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 20px; - -webkit-appearance: none; - -moz-appearance: button; } @media screen and (min-width: 650px) { #site.open { @@ -380,24 +366,6 @@ select.docNav { body.light #pageNav li { border-bottom: 1px solid #E0E0E0; } - select.docNav { - background: #595B5B; - box-shadow: 0 0 0 1px #303233; - border: none; - border-top: 2px solid #666767; - color: #FFF; - text-shadow: 0 -1px 0 #000; - padding: 3px 20px 4px 8px; - -webkit-appearance: none; - } - body.light select.docNav { - box-shadow: 0 0 0 1px #949696; - background: #DDE1E1; - border-top: 1px solid #FFF; - color: #454545; - text-shadow: 0 -1px 0 #FFF; - width: 192px; - } } @media screen and (min-width: 880px) { #content { diff --git a/demo/css/theme.css b/docs/css/theme.css similarity index 100% rename from demo/css/theme.css rename to docs/css/theme.css diff --git a/docs/css/topcoat-select.css b/docs/css/topcoat-select.css new file mode 100644 index 0000000..905e835 --- /dev/null +++ b/docs/css/topcoat-select.css @@ -0,0 +1,171 @@ +/** +* +* Copyright 2012 Adobe Systems Inc.; +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +* +*/ +.topcoat-select { + padding: 0; + margin: 0; + font: inherit; + color: inherit; + background: transparent; + border: none; +} + +.topcoat-select { + vertical-align: top; + outline: none; +} + +.topcoat-select { + cursor: default; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.topcoat-select { + -moz-box-sizing: border-box; + box-sizing: border-box; + background-clip: padding-box; +} + +.topcoat-select { + position: relative; + display: inline-block; + vertical-align: top; +} + +.topcoat-select:disabled { + opacity: 0.3; + cursor: default; + pointer-events: none; +} + +.topcoat-select { + -moz-appearance: none; + -webkit-appearance: none; +} + +.topcoat-select::-ms-expand { + display: none; +} + +/* topdoc + name: Topcoat Select + description: A component that lets you select things + modifiers: + :disabled: Disabled state + :focus: Focused + :invalid: Hover state + markup: + + + tags: + - desktop + - mobile + - text + - input +*/ + +.topcoat-select { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + appearance: button; + text-indent: 0.01px; + text-overflow: ''; + padding: .06rem 1.4rem .06rem 0.4rem; + font-size: 12px; + font-weight: 400; + height: 1.313rem; + letter-spacing: 0; + color: hsla(0, 0%, 27%, 1); + text-shadow: 0 1px hsla(0, 100%, 100%, 1); + border-radius: 4px; + background-color: hsla(165, 8%, 91%, 1); + box-shadow: inset 0 1px hsla(0, 100%, 100%, 1); + border: 1px solid hsla(168, 8%, 65%, 1); + background-image: url('img/dropdown.svg'); + background-repeat: no-repeat; + background-position: center right; + min-width: 3.4rem; +} + +.topcoat-select:hover { + background-color: hsla(180, 7%, 94%, 1); +} + +.topcoat-select:active { + background-color: hsla(180, 5%, 83%, 1); + box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.1); +} + +.topcoat-select:focus { + border: 1px solid hsla(227, 100%, 50%, 1); + box-shadow: 0 0 0 2px hsla(208, 82%, 69%, 1); + outline: 0; +} +.dark .topcoat-select { + color: hsla(180, 2%, 78%, 1); + text-shadow: 0 -1px hsla(0, 0%, 0%, 0.69); + background-color: hsla(180, 1%, 35%, 1); + box-shadow: inset 0 1px hsla(0, 0%, 45%, 1); + border: 1px solid hsla(180, 1%, 20%, 1); +} +.dark .topcoat-select:hover { + background-color: hsla(200, 2%, 39%, 1); +} +.dark .topcoat-select:active { + background-color: hsla(210, 2%, 25%, 1); + box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.05); +} +@media screen and (max-width: 650px) { + .topcoat-select { + color: hsla(180, 2%, 78%, 1); + text-shadow: 0 -1px hsla(0, 0%, 0%, 0.69); + background-color: hsla(180, 1%, 35%, 1); + box-shadow: inset 0 1px hsla(0, 0%, 45%, 1); + border: 1px solid hsla(180, 1%, 20%, 1); + padding: 0.7rem 1.4rem 0.7rem 1rem; + font-size: 16px; + height: 3rem; + letter-spacing: 1px; + border-radius: 6px; + } + .topcoat-select:hover { + background-color: hsla(200, 2%, 39%, 1); + } + .topcoat-select:active { + background-color: hsla(210, 2%, 25%, 1); + box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.05); + } +} + + + diff --git a/demo/fonts/sourcecodepro-regular-webfont.eot b/docs/fonts/sourcecodepro-regular-webfont.eot similarity index 100% rename from demo/fonts/sourcecodepro-regular-webfont.eot rename to docs/fonts/sourcecodepro-regular-webfont.eot diff --git a/demo/fonts/sourcecodepro-regular-webfont.svg b/docs/fonts/sourcecodepro-regular-webfont.svg similarity index 100% rename from demo/fonts/sourcecodepro-regular-webfont.svg rename to docs/fonts/sourcecodepro-regular-webfont.svg diff --git a/demo/fonts/sourcecodepro-regular-webfont.ttf b/docs/fonts/sourcecodepro-regular-webfont.ttf similarity index 100% rename from demo/fonts/sourcecodepro-regular-webfont.ttf rename to docs/fonts/sourcecodepro-regular-webfont.ttf diff --git a/demo/fonts/sourcecodepro-regular-webfont.woff b/docs/fonts/sourcecodepro-regular-webfont.woff similarity index 100% rename from demo/fonts/sourcecodepro-regular-webfont.woff rename to docs/fonts/sourcecodepro-regular-webfont.woff diff --git a/demo/fonts/sourcesanspro-light-webfont.eot b/docs/fonts/sourcesanspro-light-webfont.eot similarity index 100% rename from demo/fonts/sourcesanspro-light-webfont.eot rename to docs/fonts/sourcesanspro-light-webfont.eot diff --git a/demo/fonts/sourcesanspro-light-webfont.svg b/docs/fonts/sourcesanspro-light-webfont.svg similarity index 100% rename from demo/fonts/sourcesanspro-light-webfont.svg rename to docs/fonts/sourcesanspro-light-webfont.svg diff --git a/demo/fonts/sourcesanspro-light-webfont.ttf b/docs/fonts/sourcesanspro-light-webfont.ttf similarity index 100% rename from demo/fonts/sourcesanspro-light-webfont.ttf rename to docs/fonts/sourcesanspro-light-webfont.ttf diff --git a/demo/fonts/sourcesanspro-light-webfont.woff b/docs/fonts/sourcesanspro-light-webfont.woff similarity index 100% rename from demo/fonts/sourcesanspro-light-webfont.woff rename to docs/fonts/sourcesanspro-light-webfont.woff diff --git a/demo/fonts/sourcesanspro-regular-webfont.eot b/docs/fonts/sourcesanspro-regular-webfont.eot similarity index 100% rename from demo/fonts/sourcesanspro-regular-webfont.eot rename to docs/fonts/sourcesanspro-regular-webfont.eot diff --git a/demo/fonts/sourcesanspro-regular-webfont.svg b/docs/fonts/sourcesanspro-regular-webfont.svg similarity index 100% rename from demo/fonts/sourcesanspro-regular-webfont.svg rename to docs/fonts/sourcesanspro-regular-webfont.svg diff --git a/demo/fonts/sourcesanspro-regular-webfont.ttf b/docs/fonts/sourcesanspro-regular-webfont.ttf similarity index 100% rename from demo/fonts/sourcesanspro-regular-webfont.ttf rename to docs/fonts/sourcesanspro-regular-webfont.ttf diff --git a/demo/fonts/sourcesanspro-regular-webfont.woff b/docs/fonts/sourcesanspro-regular-webfont.woff similarity index 100% rename from demo/fonts/sourcesanspro-regular-webfont.woff rename to docs/fonts/sourcesanspro-regular-webfont.woff diff --git a/demo/fonts/sourcesanspro-semibold-webfont.eot b/docs/fonts/sourcesanspro-semibold-webfont.eot similarity index 100% rename from demo/fonts/sourcesanspro-semibold-webfont.eot rename to docs/fonts/sourcesanspro-semibold-webfont.eot diff --git a/demo/fonts/sourcesanspro-semibold-webfont.svg b/docs/fonts/sourcesanspro-semibold-webfont.svg similarity index 100% rename from demo/fonts/sourcesanspro-semibold-webfont.svg rename to docs/fonts/sourcesanspro-semibold-webfont.svg diff --git a/demo/fonts/sourcesanspro-semibold-webfont.ttf b/docs/fonts/sourcesanspro-semibold-webfont.ttf similarity index 100% rename from demo/fonts/sourcesanspro-semibold-webfont.ttf rename to docs/fonts/sourcesanspro-semibold-webfont.ttf diff --git a/demo/fonts/sourcesanspro-semibold-webfont.woff b/docs/fonts/sourcesanspro-semibold-webfont.woff similarity index 100% rename from demo/fonts/sourcesanspro-semibold-webfont.woff rename to docs/fonts/sourcesanspro-semibold-webfont.woff diff --git a/demo/fonts/stylesheet.css b/docs/fonts/stylesheet.css similarity index 100% rename from demo/fonts/stylesheet.css rename to docs/fonts/stylesheet.css diff --git a/docs/img/dropdown.svg b/docs/img/dropdown.svg new file mode 100644 index 0000000..8d7d517 --- /dev/null +++ b/docs/img/dropdown.svg @@ -0,0 +1,8 @@ + + + + + + diff --git a/demo/img/listview_icon.svg b/docs/img/listview_icon.svg similarity index 100% rename from demo/img/listview_icon.svg rename to docs/img/listview_icon.svg diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..d4f6af0 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,76 @@ + + + + + + Topcoat + + + + + + +
+
+
+ +
+ +
+ +
+
+
+
+
+
+

Topcoat

+

CSS for clean and fast web apps

+
+ +
+
+
+ +
+ +
+
+ + \ No newline at end of file diff --git a/demo/js/main.js b/docs/js/main.js similarity index 95% rename from demo/js/main.js rename to docs/js/main.js index 6dcdbd8..b7de87f 100644 --- a/demo/js/main.js +++ b/docs/js/main.js @@ -24,7 +24,7 @@ window.onload = function(){ cl.add('open'); } }; - var docNavs = document.getElementsByClassName('docNav'); + var docNavs = document.getElementsByClassName('topcoat-select'); for (var j = docNavs.length - 1; j >= 0; j--) { docNavs[j].onchange = function(e){ window.location.href = e.target[e.target.selectedIndex].value; diff --git a/demo/js/rainbow-custom.min.js b/docs/js/rainbow-custom.min.js similarity index 100% rename from demo/js/rainbow-custom.min.js rename to docs/js/rainbow-custom.min.js diff --git a/demo/js/rainbow.linenumbers.min.js b/docs/js/rainbow.linenumbers.min.js similarity index 100% rename from demo/js/rainbow.linenumbers.min.js rename to docs/js/rainbow.linenumbers.min.js diff --git a/docs/mobile-light-navigation-bar.html b/docs/mobile-light-navigation-bar.html new file mode 100644 index 0000000..b5abac2 --- /dev/null +++ b/docs/mobile-light-navigation-bar.html @@ -0,0 +1,76 @@ + + + + + + Topcoat + + + + + + +
+
+
+ +
+ +
+ +
+
+
+
+
+
+

Topcoat

+

CSS for clean and fast web apps

+
+ +
+
+
+ +
+ +
+
+ + \ No newline at end of file diff --git a/package.json b/package.json index 4aef557..7243c85 100644 --- a/package.json +++ b/package.json @@ -1,21 +1,24 @@ { "name": "topcoat-navigation-bar", - "version": "0.6.0", + "version": "0.0.0-development", "description": "Topcoat navigation bar skin", - "main": "index.html", - "style": "src/navigation-bar.css", + "style": "src/topcoat-navigation-bar", "directories": { - "test": "test", - "lib": "src", - "bin": "css" + "test": "test" }, "scripts": { - "test": "grunt test", - "prepublish": "grunt" + "test": "mocha test/", + "build:mobile-dark": "rsn --namespace='topcoat' -o ./css/mobile-dark-navigation-bar.css -p [topcoat-variables-shared,topcoat-variables-mobile,topcoat-variables-dark,topcoat-fonts,topcoat-root] ./src/topcoat-navigation-bar.css", + "build:mobile-light": "rsn --namespace='topcoat' -o ./css/mobile-light-navigation-bar.css -p [topcoat-variables-shared,topcoat-variables-mobile,topcoat-variables-light,topcoat-fonts,topcoat-root] ./src/topcoat-navigation-bar.css", + "build": "rm -rfv ./css/* && npm run build:mobile-dark && npm run build:mobile-light", + "pretest": "npm run build", + "prepublish": "npm run topdoc", + "topdoc": "npm run build && rm -rfv ./demo/* && topdoc -s ./css -d ./docs -p 'Topcoat Navigation Bar' -t './node_modules/topdoc-theme'", + "semantic-release": "semantic-release pre && npm publish && semantic-release post" }, "repository": { "type": "git", - "url": "git://github.com/topcoat/navigation-bar.git" + "url": "https://github.com/topcoat/navigation-bar.git" }, "keywords": [ "css", @@ -24,26 +27,37 @@ "navigation", "bar" ], - "author": "Kristofer Joseph (http://twitter.com/dam)", + "author": "Kristofer Joseph (http://kristoferjoseph.com/)", "contributors": [ - "Kristofer Joseph (http://twitter.com/dam)", - "Garth Braithwaite (http://garthdb.com/)" + "Garth Braithwaite (http://garthdb.com)", + "Andrei Oprea (http://andreio.net/)" ], - "license": "Apache2", + "license": "Apache-2.0", + "bugs": { + "url": "https://github.com/topcoat/topcoat/issues" + }, + "homepage": "http://topcoat.io", "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-clean": "~0.4.1", - "grunt-contrib-cssmin": "~0.6.2", - "grunt-simple-mocha": "~0.4.0", - "topcoat-theme-mobile-dark": "~0.1.8", - "topcoat-theme-mobile-light": "~0.1.7", - "topcoat-theme-desktop-light": "~0.1.9", - "topcoat-theme-desktop-dark": "~0.1.7", - "topdoc-theme": "~0.4.2", - "grunt-topdoc": "~0.2.0", - "grunt-topcoat": "~0.1.1" + "autoprefixer": "^6.4.0", + "cz-customizable": "^4.0.0", + "mocha": "^3.0.2", + "resin": "^1.2.1", + "semantic-release": "^6.3.2", + "topcoat-fonts": "^0.3.0", + "topcoat-root": "^1.0.0", + "topcoat-variables-dark": "^1.1.2", + "topcoat-variables-light": "^1.1.0", + "topcoat-variables-mobile": "^1.1.0", + "topcoat-variables-shared": "^1.1.0", + "topdoc": "^0.4.0", + "topdoc-theme": "^0.5.0" + }, + "config": { + "commitizen": { + "path": "./node_modules/cz-customizable" + } }, "dependencies": { - "topcoat-navigation-bar-base": "~0.6.0" + "topcoat-navigation-bar-base": "^1.0.0" } } diff --git a/src/navigation-bar.css b/src/navigation-bar.css deleted file mode 100644 index 57ea44b..0000000 --- a/src/navigation-bar.css +++ /dev/null @@ -1,59 +0,0 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ -@import "topcoat-navigation-bar-base"; -/* topdoc - name: Navigation Bar - description: A place where navigation goes to drink - markup: -
-
-

Header

-
-
- tags: - - desktop - - light - - mobile - - navigation - - bar -*/ - -.navigation-bar { - extend: %navigation-bar; - height: var(height--large); - padding-left: var(padding--navigation-bar); - padding-right: var(padding--navigation-bar); - background: var(background-color); - color: var(color--navigation-bar); - box-shadow: var(box-shadow--navigation-bar); - text-align: center; -} - -.navigation-bar__item { - extend: %navigation-bar__item; - margin: var(margin); - line-height: var(line-height--large); - vertical-align: top; -} - -.navigation-bar__title { - extend: %navigation-bar__title; - font-size: var(font-size--large); - font-weight: var(font-weight--large); - color: var(color--navigation-bar); -} diff --git a/src/topcoat-navigation-bar.css b/src/topcoat-navigation-bar.css new file mode 100644 index 0000000..bf3d3c7 --- /dev/null +++ b/src/topcoat-navigation-bar.css @@ -0,0 +1,42 @@ +@import "topcoat-navigation-bar-base"; +/* topdoc + name: Navigation Bar + description: A place where navigation goes to drink + markup: +
+
+

Header

+
+
+ tags: + - desktop + - light + - mobile + - navigation + - bar +*/ + +.navigation-bar { + @extend: %navigation-bar; + height: var(--height--large); + padding-left: var(--padding--navigation-bar); + padding-right: var(--padding--navigation-bar); + background: var(--background-color); + color: var(--color--navigation-bar); + box-shadow: var(--box-shadow--navigation-bar); + text-align: center; +} + +.navigation-bar__item { + @extend: %navigation-bar__item; + margin: var(--margin); + line-height: var(--line-height--large); + vertical-align: top; +} + +.navigation-bar__title { + @extend: %navigation-bar__title; + font-size: var(--font-size--large); + font-weight: var(--font-weight--large); + color: var(--color--navigation-bar); +} diff --git a/test/expected/mobile-dark.css b/test/expected/mobile-dark-navigation-bar.css similarity index 72% rename from test/expected/mobile-dark.css rename to test/expected/mobile-dark-navigation-bar.css index 529cea1..a10c1d0 100644 --- a/test/expected/mobile-dark.css +++ b/test/expected/mobile-dark-navigation-bar.css @@ -1,20 +1,4 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/@font-face { +@font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Regular.otf'); } @@ -31,14 +15,22 @@ font-weight: 600; } -body { - font: 16px "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - font-weight: 400; +html { + font-size: 16px; } body { margin: 0; padding: 0; + font-family: "Source Sans Pro", + "HelveticaNeue-Light", + "Helvetica Neue Light", + "Helvetica Neue", + Helvetica, + Arial, + "Lucida Grande", + sans-serif; + font-weight: 400; background: hsla(200, 2%, 30%, 1); } @@ -68,7 +60,6 @@ body { .topcoat-navigation-bar, .topcoat-navigation-bar__item { - -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; } @@ -130,4 +121,4 @@ body { font-size: 1.3rem; font-weight: 400; color: hsla(0, 100%, 100%, 1); -} \ No newline at end of file +} diff --git a/css/mobile-light.css b/test/expected/mobile-light-navigation-bar.css similarity index 72% rename from css/mobile-light.css rename to test/expected/mobile-light-navigation-bar.css index aa2213f..ad9d076 100644 --- a/css/mobile-light.css +++ b/test/expected/mobile-light-navigation-bar.css @@ -1,20 +1,4 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/@font-face { +@font-face { font-family: "Source Sans Pro"; src: url('../font/SourceSansPro-Regular.otf'); } @@ -31,14 +15,22 @@ font-weight: 600; } -body { - font: 16px "Source Sans Pro", "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; - font-weight: 400; +html { + font-size: 16px; } body { margin: 0; padding: 0; + font-family: "Source Sans Pro", + "HelveticaNeue-Light", + "Helvetica Neue Light", + "Helvetica Neue", + Helvetica, + Arial, + "Lucida Grande", + sans-serif; + font-weight: 400; background: hsla(180, 5%, 88%, 1); } @@ -68,7 +60,6 @@ body { .topcoat-navigation-bar, .topcoat-navigation-bar__item { - -moz-box-sizing: border-box; box-sizing: border-box; background-clip: padding-box; } @@ -130,4 +121,4 @@ body { font-size: 1.3rem; font-weight: 400; color: hsla(0, 0%, 27%, 1); -} \ No newline at end of file +} diff --git a/test/fixtures/license.txt b/test/fixtures/license.txt deleted file mode 100644 index c0b7f2e..0000000 --- a/test/fixtures/license.txt +++ /dev/null @@ -1,17 +0,0 @@ -/** -* -* Copyright 2012 Adobe Systems Inc.; -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ \ No newline at end of file diff --git a/test/fixtures/mobile-dark.css b/test/fixtures/mobile-dark.css deleted file mode 100644 index b76ed6f..0000000 --- a/test/fixtures/mobile-dark.css +++ /dev/null @@ -1,2 +0,0 @@ -@import "topcoat-theme-mobile-dark"; -@import ".."; \ No newline at end of file diff --git a/test/fixtures/mobile-light.css b/test/fixtures/mobile-light.css deleted file mode 100644 index 5a7fccd..0000000 --- a/test/fixtures/mobile-light.css +++ /dev/null @@ -1,2 +0,0 @@ -@import "topcoat-theme-mobile-light"; -@import ".."; \ No newline at end of file diff --git a/test/navigation-bar.test.js b/test/navigation-bar.test.js deleted file mode 100644 index 71c6890..0000000 --- a/test/navigation-bar.test.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * - * Copyright 2012 Adobe Systems Inc.; - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/*global require, describe, it*/ - -var grunt = require('grunt'), - assert = require('assert'); - -describe('Topcoat Navigation Bar', function() { - - it('should output correct mobile dark css', function() { - var actual = grunt.file.read('css/mobile-dark.css'); - var expected = grunt.file.read('test/expected/mobile-dark.css'); - assert.equal(actual, expected, 'should generate correct css'); - }); - - it('should output correct mobile light css', function() { - var actual = grunt.file.read('css/mobile-light.css'); - var expected = grunt.file.read('test/expected/mobile-light.css'); - assert.equal(actual, expected, 'should generate correct css'); - }); - - it('should not have any unrendered variables', function() { - var actual = grunt.file.read('css/mobile-light.css'); - assert.equal(actual.match(/var-[a-z-]*[a-z]+/g), null, 'should not have missing vars'); - }); - - it('should not have any unrendered variables', function() { - var actual = grunt.file.read('css/mobile-dark.css'); - assert.equal(actual.match(/var-[a-z-]*[a-z]+/g), null, 'should not have missing vars'); - }); - -}); - diff --git a/test/perf/navigation-bar-test.jade b/test/perf/navigation-bar-test.jade deleted file mode 100644 index 5c97e21..0000000 --- a/test/perf/navigation-bar-test.jade +++ /dev/null @@ -1,18 +0,0 @@ --var repeats = 200 -!!! -html - head - title TopCoat navigation bar test - | - body - -while (repeats > 0) - -var repeats = repeats - 1 - div.topcoat-navigation-bar - div.topcoat-navigation-bar__item.left.quarter - a.topcoat-icon-button--quiet - span.topcoat-icon.topcoat-icon--menu-stack - div.topcoat-navigation-bar__item.center.half - h1.topcoat-navigation-bar__title Title - div.topcoat-navigation-bar__item.right.quarter - a.topcoat-icon-button--quiet - span.topcoat-icon.topcoat-icon--menu-stack diff --git a/test/perf/navigation-bar-test.test.html b/test/perf/navigation-bar-test.test.html deleted file mode 100644 index 7116844..0000000 --- a/test/perf/navigation-bar-test.test.html +++ /dev/null @@ -1 +0,0 @@ -TopCoat navigation bar test

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

Title

\ No newline at end of file diff --git a/test/perf/topcoat_navigation-bar.test.html b/test/perf/topcoat_navigation-bar.test.html deleted file mode 100644 index ffacd77..0000000 --- a/test/perf/topcoat_navigation-bar.test.html +++ /dev/null @@ -1 +0,0 @@ -

Title

\ No newline at end of file diff --git a/test/perf/topcoat_navigation-bar.test.jade b/test/perf/topcoat_navigation-bar.test.jade deleted file mode 100644 index 2db6eef..0000000 --- a/test/perf/topcoat_navigation-bar.test.jade +++ /dev/null @@ -1,9 +0,0 @@ -div.topcoat-navigation-bar - div.topcoat-navigation-bar__item.left.quarter - a.topcoat-icon-button--quiet - span.topcoat-icon.topcoat-icon--menu-stack - div.topcoat-navigation-bar__item.center.half - h1.topcoat-navigation-bar__title Title - div.topcoat-navigation-bar__item.right.quarter - a.topcoat-icon-button--quiet - span.topcoat-icon.topcoat-icon--menu-stack diff --git a/test/topcoat-navigation-bar.test.js b/test/topcoat-navigation-bar.test.js new file mode 100644 index 0000000..3bf2c61 --- /dev/null +++ b/test/topcoat-navigation-bar.test.js @@ -0,0 +1,32 @@ +var assert = require('assert'); +var fs = require('fs'); + +function read(file) { + return fs.readFileSync(file, 'utf8'); +} + +describe('Topcoat Navigation Bar', function() { + + it('should output correct mobile dark css', function() { + var actual = read('css/mobile-dark-navigation-bar.css'); + var expected = read('test/expected/mobile-dark-navigation-bar.css'); + assert.equal(actual, expected, 'should generate correct css'); + }); + + it('should output correct mobile light css', function() { + var actual = read('css/mobile-light-navigation-bar.css'); + var expected = read('test/expected/mobile-light-navigation-bar.css'); + assert.equal(actual, expected, 'should generate correct css'); + }); + + it('should not have any unrendered variables', function() { + var actual = read('css/mobile-light-navigation-bar.css'); + assert.equal(actual.match(/var-[a-z-]*[a-z]+/g), null, 'should not have missing vars'); + }); + + it('should not have any unrendered variables', function() { + var actual = read('css/mobile-dark-navigation-bar.css'); + assert.equal(actual.match(/var-[a-z-]*[a-z]+/g), null, 'should not have missing vars'); + }); + +});