Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
parent
93e3a48004
commit
b38dea0597
25901 changed files with 9982925 additions and 369 deletions
24
gaia/distros/spark/apps/sharing/components/gaia-progress/bower.json
Executable file
24
gaia/distros/spark/apps/sharing/components/gaia-progress/bower.json
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "gaia-progress",
|
||||
"main": "gaia-progress.js",
|
||||
"version": "0.0.0",
|
||||
"authors": [
|
||||
"Wilson Page <wilsonpage@me.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
],
|
||||
"devDependencies": {
|
||||
"base": "gaia-components/base",
|
||||
"gaia-fonts": "gaia-components/gaia-font#~0.2.1",
|
||||
"gaia-theme": "gaia-components/gaia-theme#~0.4.4"
|
||||
},
|
||||
"dependencies": {
|
||||
"gaia-component": "gaia-components/gaia-component#~0.3.0"
|
||||
}
|
||||
}
|
||||
130
gaia/distros/spark/apps/sharing/components/gaia-progress/gaia-progress.js
Executable file
130
gaia/distros/spark/apps/sharing/components/gaia-progress/gaia-progress.js
Executable file
|
|
@ -0,0 +1,130 @@
|
|||
;(function(define){define(['require','exports','module','gaia-component'],function(require,exports,module){
|
||||
/*jshint esnext:true*/
|
||||
|
||||
/**
|
||||
* Dependencies
|
||||
*/
|
||||
|
||||
var component = require('gaia-component');
|
||||
|
||||
/**
|
||||
* Exports
|
||||
*/
|
||||
|
||||
module.exports = component.register('gaia-progress', {
|
||||
created: function() {
|
||||
this.setupShadowRoot();
|
||||
|
||||
this.els = {
|
||||
inner: this.shadowRoot.querySelector('.inner'),
|
||||
bar: this.shadowRoot.querySelector('.bar'),
|
||||
};
|
||||
|
||||
this.els.inner.setAttribute('role', 'progressbar');
|
||||
this.els.inner.setAttribute('aria-valuemin', '0');
|
||||
this.els.inner.setAttribute('aria-valuemax', '100');
|
||||
|
||||
this.value = this.getAttribute('value') || 0;
|
||||
},
|
||||
|
||||
fillTime: 2000,
|
||||
|
||||
attrs: {
|
||||
value: {
|
||||
get: function() { return this._value || 0; },
|
||||
set: function(value) {
|
||||
|
||||
// Clamp it
|
||||
value = Math.min(100, Math.max(0, Number(value)));
|
||||
|
||||
if (value) {
|
||||
var delta = Math.abs(this.value - value);
|
||||
var duration = (delta / 100) * this.fillTime;
|
||||
this.els.bar.style.transform = `translateX(${value}%)`;
|
||||
this.els.bar.style.transitionDuration = duration + 'ms';
|
||||
this.els.inner.setAttribute('aria-valuenow', value);
|
||||
} else {
|
||||
this.els.inner.removeAttribute('aria-valuenow');
|
||||
}
|
||||
|
||||
this.els.inner.classList.toggle('no-value', !value);
|
||||
this._value = value;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
template: `
|
||||
<div class="inner">
|
||||
<div class="bar"></div>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
:host {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
height: 4px;
|
||||
}
|
||||
|
||||
.inner {
|
||||
height: 100%;
|
||||
background:
|
||||
var(--border-color,
|
||||
var(--background-plus))
|
||||
}
|
||||
|
||||
.bar {
|
||||
position: relative;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
background: var(--highlight-color);
|
||||
transition: transform 0ms linear;
|
||||
}
|
||||
|
||||
.bar:after {
|
||||
position: absolute;
|
||||
left: 100%;
|
||||
top: -8px;
|
||||
|
||||
display: block;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
|
||||
border-top: 8px solid transparent;
|
||||
border-bottom: 8px solid transparent;
|
||||
border-left: 8px solid var(--highlight-color);
|
||||
}
|
||||
|
||||
.no-value .bar {
|
||||
left: 0;
|
||||
|
||||
width: calc(100% + 150px);
|
||||
animation: moving-backward 1500ms infinite linear;
|
||||
background: repeating-linear-gradient(
|
||||
135deg,
|
||||
var(--highlight-color),
|
||||
var(--highlight-color) 50px,
|
||||
var(--border-color, var(--background-plus)) 50px,
|
||||
var(--border-color, var(--background-plus)) 100px);
|
||||
}
|
||||
|
||||
</style>
|
||||
`,
|
||||
|
||||
globalCss: `
|
||||
@keyframes moving-backward {
|
||||
0% { transform: translateX(0); }
|
||||
100% { transform: translateX(-142px); }
|
||||
}
|
||||
`
|
||||
});
|
||||
|
||||
});})(typeof define=='function'&&define.amd?define
|
||||
:(function(n,w){'use strict';return typeof module=='object'?function(c){
|
||||
c(require,exports,module);}:function(c){var m={exports:{}};c(function(n){
|
||||
return w[n];},m.exports,m);w[n]=m.exports;};})('gaia-progress',this));
|
||||
41
gaia/distros/spark/apps/sharing/components/gaia-progress/index.html
Executable file
41
gaia/distros/spark/apps/sharing/components/gaia-progress/index.html
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>gaia-progress</title>
|
||||
<link rel="stylesheet" type="text/css" href="bower_components/base/base.css">
|
||||
<link rel="stylesheet" type="text/css" href="bower_components/gaia-theme/gaia-theme.css">
|
||||
<link rel="stylesheet" type="text/css" href="bower_components/gaia-fonts/style.css">
|
||||
<script src="bower_components/gaia-theme/lib/gaia-theme-selector.js"></script>
|
||||
<script src="bower_components/gaia-component/gaia-component.js"></script>
|
||||
<script src="gaia-progress.js"></script>
|
||||
<style>
|
||||
|
||||
body {
|
||||
padding: var(--base-m);
|
||||
padding-top: var(--base-l);
|
||||
}
|
||||
|
||||
gaia-progress {
|
||||
margin-bottom: var(--base-s);
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<gaia-theme-selector></gaia-theme-selector>
|
||||
|
||||
<gaia-progress id="progress" value="10"></gaia-progress>
|
||||
<gaia-progress></gaia-progress>
|
||||
|
||||
<button id="btn">Load some</button>
|
||||
|
||||
<script>
|
||||
btn.onclick = function() {
|
||||
var amount = 10;
|
||||
progress.value += amount;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
37
gaia/distros/spark/apps/sharing/components/gaia-progress/package.json
Executable file
37
gaia/distros/spark/apps/sharing/components/gaia-progress/package.json
Executable file
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "gaia-progress",
|
||||
"homepage": "https://github.com/gaia-components/gaia-progress",
|
||||
"license": "ISC",
|
||||
"main": "script.js",
|
||||
"directories": {
|
||||
"example": "examples",
|
||||
"test": "test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"bower": "^1.3.5",
|
||||
"browserify": "^5.11.2",
|
||||
"karma": "^0.12.16",
|
||||
"karma-firefox-launcher": "^0.1.3",
|
||||
"karma-mocha": "^0.1.3",
|
||||
"karma-sinon-chai": "^0.1.6",
|
||||
"mozilla-download": "^0.4.3"
|
||||
},
|
||||
"scripts": {
|
||||
"install": "bower install",
|
||||
"test": "./node_modules/karma/bin/karma start test/karma.conf.js --single-run",
|
||||
"test-dev": "./node_modules/karma/bin/karma start test/karma.conf.js",
|
||||
"build": "mkdir -p dist && browserify gaia-progress.js --outfile ./dist/gaia-progress.js --standalone GaiaHeader"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/gaia-components/gaia-progress.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/gaia-components/gaia-progress/issues"
|
||||
},
|
||||
"browser": {
|
||||
"gaia-component": "./bower_components/gaia-component/gaia-component.js",
|
||||
"gaia-icons": "./bower_components/gaia-icons/gaia-icons.js",
|
||||
"pressed": "./bower_components/pressed/pressed.js"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue