Skip to content
This repository was archived by the owner on Dec 22, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
8023286
Update README.md
adavie1 Feb 10, 2017
5c1afb6
Update rg-alerts.js
adavie1 Feb 10, 2017
a930342
Update rg-bubble.js
adavie1 Feb 10, 2017
eff8462
Update rg-alerts.js
adavie1 Feb 10, 2017
2a674da
Update rg-bubble.js
adavie1 Feb 10, 2017
7cb953d
3.6.0 - In Progress
adavie1 Feb 10, 2017
1ad1029
3.6.0 - Fixed and tested
adavie1 Feb 10, 2017
ce5f008
3.6.0 - Fixed, part tested
adavie1 Feb 10, 2017
cf08d52
3.6.1 -- Added a new tag "rg-alert"
adavie1 Feb 12, 2017
48fdafb
3.5.0
adavie1 Feb 12, 2017
72d9b0c
3.2 - Code Editor
adavie1 Feb 12, 2017
7eaf8c2
Delete rg-drawer.spec.js
adavie1 Feb 13, 2017
d835e28
Delete rg-drawer.tag
adavie1 Feb 13, 2017
7440d67
3.6.0
adavie1 Feb 13, 2017
1ef52de
3.6.0
adavie1 Feb 13, 2017
ec077a7
3.6.1 -- Added new single alert tag
adavie1 Feb 13, 2017
2d4a2df
3.5.8 - Still Buggy
adavie1 Feb 13, 2017
1f4b65a
3.6.0
adavie1 Feb 13, 2017
80832d0
3.6.0
adavie1 Feb 13, 2017
64cf6b3
3.6.0
adavie1 Feb 19, 2017
0c40684
3.6.0
adavie1 Feb 19, 2017
8799a49
3.6.0
adavie1 Feb 19, 2017
4a1a974
3.6.0
adavie1 Feb 19, 2017
9e8910b
3.6.0
adavie1 Feb 19, 2017
1a6580e
3.6.0 Partial - all prior to pagination is 3.6.0
adavie1 Feb 20, 2017
60578fa
3.6.0
adavie1 Feb 20, 2017
a70da00
3.6.0 - Partial until rg_pagination
adavie1 Feb 21, 2017
9113049
3.6.0
adavie1 Feb 22, 2017
4e7272e
3.6.0
adavie1 Feb 22, 2017
cb261e4
3.6.0
adavie1 Feb 22, 2017
33025d9
3.6.0
adavie1 Feb 23, 2017
a902d1b
3.6.0
adavie1 Feb 23, 2017
16ac20b
3.6.0
adavie1 Feb 23, 2017
e3e6435
3.6.0
adavie1 Feb 23, 2017
b3519ca
3.5.9
adavie1 Feb 23, 2017
9037a37
3.6.0 inclusive of toasts - credit-card still buggy
adavie1 Feb 23, 2017
a4af573
3.6.0 inclusive of toasts
adavie1 Feb 23, 2017
5bbe323
3.6.0 including toasts, credit card still buggy
adavie1 Feb 23, 2017
d42332e
3.6.0
adavie1 Feb 23, 2017
4744588
3.6.0 - credit card still buggy, all else OK
adavie1 Feb 23, 2017
86c3a3d
3.6.0 - credit card still buggy.
adavie1 Feb 23, 2017
d61fc90
3.6.0
adavie1 Feb 24, 2017
d90c8f4
3.6.0
adavie1 Feb 24, 2017
19bdfd7
3.6.0 - depends on rg-utils.js
adavie1 Feb 24, 2017
b25542d
3.6.0 - depends on rg-utils.js
adavie1 Feb 24, 2017
a297252
3.6.0 - depends on rg-utils.js
adavie1 Feb 24, 2017
5aab2e6
3.6.0 - depends on rg-utils.js
adavie1 Feb 24, 2017
cd21497
3.6.0 - includes rg-utils code as well
adavie1 Feb 24, 2017
8b07f13
Create rg-address.js
adavie1 Feb 24, 2017
0c03142
Create rg-accordion.js
adavie1 Feb 24, 2017
27484d5
Create rg-avatars.js
adavie1 Feb 24, 2017
16153c8
Create rg-cards.js
adavie1 Feb 24, 2017
8872e51
Create rg-headings.js
adavie1 Feb 24, 2017
42b9008
Create rg-inputs.js
adavie1 Feb 24, 2017
d3868cc
Create rg-medias.js
adavie1 Feb 24, 2017
d6e7507
Create rg-image.js
adavie1 Feb 24, 2017
a426c7e
Create rg-panel.js
adavie1 Feb 24, 2017
845e6e1
Create rg-nav.js
adavie1 Feb 24, 2017
2f2596e
Create rg-overlay.js
adavie1 Feb 24, 2017
fc50de3
Create rg-progress.js
adavie1 Feb 24, 2017
6cc466d
Create rg-range.js
adavie1 Feb 24, 2017
2dfc726
Create rg-table.js
adavie1 Feb 24, 2017
cdb7860
Create rg-tooltip.js
adavie1 Feb 24, 2017
444f3d7
Create rg-tree.js
adavie1 Feb 24, 2017
2e6b3f3
Create rg-badge.js
adavie1 Feb 24, 2017
e4ceff8
Create rg-typography.js
adavie1 Feb 24, 2017
573d897
3.6.0 - some tags depend on this code
adavie1 Feb 24, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Would you like to own this Open Source Project?
If so please get in touch via Github issues. I can transfer the ownership of this **organisation**, the associated npm packages and it's twitter account (https://twitter.com/riotcomponents) to anyone who can take it further than my time permits
## Forked RiotGear
The orginal RG implementation is based on Blaze CSS 1.x. Many users in the community are using Blaze CSS 2.x, which breaks RG.

# <a href="http://riotgear.js.org">RiotGear</a>

Expand Down
1 change: 1 addition & 0 deletions dist/rg-accordion/rg-accordion.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions dist/rg-address/rg-address.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

77 changes: 45 additions & 32 deletions dist/rg-alerts/rg-alerts.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,47 @@
riot.tag2('rg-alerts', '<div class="alerts"> <div each="{opts.alerts}" class="alerts__alert {\'alerts__alert--\' + type}" if="{isvisible}" onclick="{select}"> <button class="button button--close" if="{dismissable != false}" onclick="{parent.dismiss}"> &times; </button> {text} </div> </div>', '', '', function(opts) {
var _this = this;

this.on('update', function () {
if (!opts.alerts) return;
opts.alerts.forEach(function (alert) {
if (typeof alert.isvisible === 'undefined') alert.isvisible = true;
if (alert.timeout) {
alert.startTimer = function () {
alert.timer = setTimeout(function () {
_this.dismiss({
item: alert
});
}, alert.timeout);
};
alert.startTimer();
}
});
});
// Single Alert
riot.tag("rg-alert", '<div class="c-alert if={opts.type} {\'c-alert--\' + opts.type}"><button ref="closeButton" class="c-button c-button--close" hide={opts.dismissable==false} onclick="{dismiss}">&times;</button>{opts.text}</div>', "", "", function(opts) {
var _this = this;

this.on("mount", function() {
if (this.opts.dismissable)
this.refs.closeButton.hidden = false ;
else
this.refs.closeButton.hidden = true ;

this.update() ;
});


if (typeof opts.dismissable == "string") {
opts.dismissable = Boolean(opts.dismissable);
}

if (typeof this.opts.dismissable != "boolean") {
this.opts.dismissable = true;
}

this.dismiss = function (e) {
var alert = e.item;
alert.isvisible = false;
clearTimeout(alert.timer);
_this.trigger('dismiss', alert);
_this.update();
};

this.select = function (e) {
var alert = e.item;
if (alert.onclick) alert.onclick(alert);
_this.trigger('select', alert);
};
if (typeof opts.timeout == "string")
opts.timeout = Number(opts.timeout);

if (typeof opts.timeout == "number" && opts.timeout > 0) {
this.startTimer = function() {
this.timer = setTimeout(function() {
_this.dismiss();
}, opts.timeout)
};
this.startTimer()
}


this.dismiss = function(e) {
if (this.opts.timeout)
clearTimeout(this.startTimer);

this.unmount();
} // onSelect
});

// Multiple Alets
riot.tag("rg-alerts", '<div each="{opts.alerts}"><rg-alert text="{text}" type="{type}" dismissable={dismissable} timeout={timeout}></rg-alert> </div>', "", "",
function() {
});
1 change: 1 addition & 0 deletions dist/rg-avatars/rg-avatars.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions dist/rg-badge/rg-badge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

35 changes: 16 additions & 19 deletions dist/rg-bubble/rg-bubble.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
riot.tag2('rg-bubble', '<div class="context"> <div class="bubble bubble--top" if="{isvisible}"> {opts.bubble.text} </div> <div class="content" onmouseover="{showBubble}" onmouseout="{hideBubble}" onclick="{toggleBubble}"> <yield></yield> </div> </div>', 'rg-bubble .context,[riot-tag="rg-bubble"] .context,[data-is="rg-bubble"] .context,rg-bubble .content,[riot-tag="rg-bubble"] .content,[data-is="rg-bubble"] .content{ display: inline-block; position: relative; } rg-bubble .bubble,[riot-tag="rg-bubble"] .bubble,[data-is="rg-bubble"] .bubble{ position: absolute; top: -70px; left: 50%; transform: translate3d(-50%, 0, 0); }', '', function(opts) {
var _this = this;

this.showBubble = function () {
clearTimeout(_this._timer);
_this.isvisible = true;
};

this.hideBubble = function () {
_this._timer = setTimeout(function () {
_this.isvisible = false;
_this.update();
}, 1000);
};

this.toggleBubble = function () {
_this.isvisible = !_this.isvisible;
};
});
riot.tag2("rg-bubble", '<div class="context"> <div class="c-bubble c-bubble--top" if="{isvisible}"> {opts.bubble.text} </div> <div class="content" onmouseover="{showBubble}" onmouseout="{hideBubble}" onclick="{toggleBubble}"> <yield></yield> </div> </div>', 'rg-bubble .context,[riot-tag="rg-bubble"] .context,[data-is="rg-bubble"] .context,rg-bubble .content,[riot-tag="rg-bubble"] .content,[data-is="rg-bubble"] .content{ display: inline-block; position: relative; } rg-bubble .c-bubble,[riot-tag="rg-bubble"] .c-bubble,[data-is="rg-bubble"] .c-bubble{ position: absolute; top: -70px; left: 50%; transform: translate3d(-50%, 0, 0); }', "", function(opts) {
var _this = this;
this.showBubble = function() {
clearTimeout(_this._timer);
_this.isvisible = true
};
this.hideBubble = function() {
_this._timer = setTimeout(function() {
_this.isvisible = false;
_this.update()
}, 1e3)
};
this.toggleBubble = function() {
_this.isvisible = !_this.isvisible
}
});
1 change: 1 addition & 0 deletions dist/rg-cards/rg-cards.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

81 changes: 38 additions & 43 deletions dist/rg-chart/rg-chart.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,39 @@
riot.tag2('rg-chart', '<canvas></canvas>', 'rg-chart,[riot-tag="rg-chart"],[data-is="rg-chart"]{ display: inline-block; width: 100%; }', '', function(opts) {
var _this = this;

Chart.defaults.global.responsive = true;

this.on('mount', function () {
drawChart();
});

this.on('loaded', function (c) {
_this.on('unmount', function () {
c.destroy();
});
});

var drawChart = function drawChart() {
if (!opts.chart) opts.chart = {};

var ctx = _this.root.querySelector('canvas').getContext('2d');
var chart = new Chart(ctx);
var c = null;
switch (opts.chart.type) {
case 'line':
c = chart.Line(opts.chart.data, opts.chart.options);
break;
case 'radar':
c = chart.Radar(opts.chart.data, opts.chart.options);
break;
case 'polar':
c = chart.PolarArea(opts.chart.data, opts.chart.options);
break;
case 'pie':
c = chart.Pie(opts.chart.data, opts.chart.options);
break;
case 'doughnut':
c = chart.Doughnut(opts.chart.data, opts.chart.options);
break;
default:
c = chart.Bar(opts.chart.data, opts.chart.options);
break;
}
_this.trigger('loaded', c);
};
riot.tag2("rg-chart", "<canvas></canvas>", 'rg-chart,[riot-tag="rg-chart"],[data-is="rg-chart"]{ display: inline-block; width: 100%; }', "", function(opts) {
var _this = this;
Chart.defaults.global.responsive = true;
this.on("mount", function() {
drawChart()
});
this.on("loaded", function(c) {
_this.on("unmount", function() {
c.destroy()
})
});
var drawChart = function drawChart() {
if (!opts.chart) opts.chart = {};
var ctx = _this.root.querySelector("canvas").getContext("2d");
var chart = new Chart(ctx);
var c = null;
switch (opts.chart.type) {
case "line":
c = chart.Line(opts.chart.data, opts.chart.options);
break;
case "radar":
c = chart.Radar(opts.chart.data, opts.chart.options);
break;
case "polar":
c = chart.PolarArea(opts.chart.data, opts.chart.options);
break;
case "pie":
c = chart.Pie(opts.chart.data, opts.chart.options);
break;
case "doughnut":
c = chart.Doughnut(opts.chart.data, opts.chart.options);
break;
default:
c = chart.Bar(opts.chart.data, opts.chart.options);
break
}
_this.trigger("loaded", c)
}
});
Loading