Skip to content
This repository has been archived by the owner on Jun 24, 2022. It is now read-only.

Commit

Permalink
Version 6.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
imperavi authored and imperavi committed Sep 2, 2016
1 parent 335791d commit 9fb659c
Show file tree
Hide file tree
Showing 18 changed files with 367 additions and 245 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ Kube supports the latest, stable releases of all major browsers:
- Internet Explorer 11

##Quick Start
- [Quick Start Guide](https://imperavi.com/kube/docs/quick-start/) — Setup in under a minute
- [Developing with Kube](https://imperavi.com/kube/docs/quick-start/#h-development) — Getting started with custom development
- [Theming](https://imperavi.com/kube/docs/quick-start/#h-theming) — Easily create custom styles and themes
- [Quick Start Guide](https://imperavi.com/kube/docs/started/) — Setup in under a minute
- [Developing with Kube](https://imperavi.com/kube/docs/started/#h-development) — Getting started with custom development
- [Theming](https://imperavi.com/kube/docs/started/#h-theming) — Easily create custom styles and themes

##License
You have our permission to use Kube in whatever projects you wish commercial, for sale, or otherwise, in whichever way you like. Official license information can be found in [LICENSE.md](LICENSE.md) (spoiler: it's the MIT License)
You have our permission to use Kube in whatever projects you wish commercial, for sale, or otherwise, in whichever way you like. Official license information can be find in [LICENSE.md](LICENSE.md) (spoiler: it's the MIT License)
45 changes: 28 additions & 17 deletions dist/css/kube.css
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ h6,
font-size: 12px;
line-height: 20px;
text-transform: uppercase;
letter-spacing: .08em; }
letter-spacing: 0.05em; }

p + h2,
p + h3,
Expand Down Expand Up @@ -834,9 +834,9 @@ sub {
@media (max-width: 768px) {
.row {
margin-left: 0; }
.col,
[class^="col-"],
[class*=" col-"] {
.col:not(th):not(td),
[class^="col-"]:not(th):not(td),
[class*=" col-"]:not(th):not(td) {
flex-basis: 100%;
max-width: 100%;
width: 100%; }
Expand Down Expand Up @@ -866,6 +866,10 @@ th {
td {
vertical-align: top; }

tr.align-middle td,
td.align-middle {
vertical-align: middle; }

th,
td {
padding: 16px;
Expand Down Expand Up @@ -1069,7 +1073,7 @@ select.big {
margin-top: 4px;
color: rgba(0, 0, 0, 0.5);
font-size: 12px;
line-height: 20px;
line-height: 16px;
font-weight: normal; }

ul.desc {
Expand Down Expand Up @@ -1138,22 +1142,25 @@ button,
text-decoration: none;
cursor: pointer;
display: inline-block;
line-height: 38px;
height: 40px;
padding: 0 28px;
line-height: 1.125rem;
min-height: 40px;
padding: 10px 28px;
border: 1px solid transparent;
vertical-align: middle;
-webkit-appearance: none;
color: #000;
background-color: #eee;
border-radius: 4px; }

input.button {
height: auto; }

button:hover,
.button:hover {
outline: none;
color: rgba(0, 0, 0, 0.6);
text-decoration: none;
box-shadow: inset 0 0 0 30px rgba(0, 0, 0, 0.1); }
box-shadow: inset 0 0 0 40px rgba(0, 0, 0, 0.125); }

.button:disabled,
.button.disabled {
Expand Down Expand Up @@ -1182,17 +1189,15 @@ button:hover,

.button.small {
font-size: 12px;
line-height: 32px;
height: 32px;
padding: 0 20px; }
min-height: 32px;
padding: 6px 20px; }
.button.small.upper {
font-size: 10px; }

.button.big {
font-size: 18px;
line-height: 46px;
height: 48px;
padding: 0 48px; }
min-height: 48px;
padding: 14px 48px; }
.button.big.upper {
font-size: 13px; }

Expand Down Expand Up @@ -1734,10 +1739,10 @@ h6 .label {
background: #fff;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
border-radius: 8px;
overflow: auto;
max-height: 300px;
margin: 0;
padding: 0; }
padding: 0;
overflow: hidden; }

.dropdown.dropdown-mobile {
position: fixed;
Expand All @@ -1752,6 +1757,9 @@ h6 .label {
.dropdown .close {
margin: 20px auto; }

.dropdown.open {
overflow: auto; }

.dropdown ul {
list-style: none;
margin: 0; }
Expand Down Expand Up @@ -1881,6 +1889,9 @@ h6 .label {
.visible {
visibility: visible; }

.black {
color: #000; }

.muted {
color: rgba(0, 0, 0, 0.5) !important; }

Expand Down
2 changes: 1 addition & 1 deletion dist/css/kube.min.css

Large diffs are not rendered by default.

71 changes: 59 additions & 12 deletions dist/js/kube.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@
var SuperKube = {
pluginsByClass: {},
classByPlugin: {},
directLoad: {
'message': 'open'
},
plugin: function(name, obj)
{
obj.pluginName = name;
Expand Down Expand Up @@ -297,7 +300,20 @@
}
else
{
return $.error('No such method "' + options + '" for ' + name);
var direct = false;
for (var key in SuperKube.directLoad)
{
if (name === key && options === SuperKube.directLoad[key])
{
direct = true;
SuperKube.directPluginLoad(this, name);
}
}

if (!direct)
{
return $.error('No such method "' + options + '" for ' + name);
}
}
});
}
Expand Down Expand Up @@ -341,6 +357,11 @@
});

return plugin;
},
directPluginLoad: function(target, name)
{
var element = document.createElement('span');
$(element)[name]({ target: target, show: true });
}
};

Expand Down Expand Up @@ -614,6 +635,8 @@
this.$element.hide();
}



if (this.opts.name === 'show' || this.opts.name === 'hide')
{
this.opts.timing = 'linear';
Expand Down Expand Up @@ -670,7 +693,9 @@
},
complete: function(type, make, callback)
{
this.$element.one(type.toLowerCase() + ' webkit' + type + ' o' + type + ' MS' + type, $.proxy(function()
var event = type.toLowerCase() + ' webkit' + type + ' o' + type + ' MS' + type;

this.$element.one(event, $.proxy(function()
{
if (typeof make === 'function')
{
Expand All @@ -695,6 +720,8 @@
callback(this);
}

this.$element.off(event);

}, this));
}
};
Expand Down Expand Up @@ -1126,14 +1153,14 @@
this.setPosition();
this.toggleCaretOpen();

this.$target.addClass('open').animation(this.opts.animation.open, $.proxy(this.opened, this));
this.$target.animation(this.opts.animation.open, $.proxy(this.opened, this));

},
opened: function()
{
this.enableEvents();
this.$target.addClass('open');
this.callback('opened');

},
handleKeyboard: function(e)
{
Expand All @@ -1154,15 +1181,13 @@
},
close: function(e)
{

if (this.isClosed())
{
return;
}

if (e)
{

if (this.shouldNotBeClosed(e.target))
{
return;
Expand Down Expand Up @@ -1206,6 +1231,7 @@
right: '16px',
position: 'right', // center
click: true,
show: false,
delay: 3, // message autohide delay - seconds or false
animation: {
open: {
Expand Down Expand Up @@ -1236,6 +1262,12 @@
// close link
this.$close = this.getCloseLink();
this.$close.on('click.component.message', $.proxy(this.close, this));

// direct call
if (this.opts.show)
{
this.open();
}
},
getCloseLink: function()
{
Expand Down Expand Up @@ -1335,7 +1367,6 @@
});

}(Kube));

// Direct Load
(function($)
{
Expand All @@ -1356,7 +1387,6 @@
{
options.show = true;
$(this.element).modal(options);

}
};

Expand Down Expand Up @@ -2311,6 +2341,7 @@

this.text = this.$element.text();
this.$target = this.getTarget();
this.hideOnSmall = this.$target.hasClass('hide-on-small');
this.$element.on('click.component.toggleme', $.proxy(this.toggle, this));
},
getTarget: function()
Expand Down Expand Up @@ -2350,7 +2381,7 @@
{
return !this.$target.hasClass('open');
},
open: function(e)
open: function()
{
if (this.isOpened())
{
Expand All @@ -2361,7 +2392,7 @@
this.$target.removeClass('hide-on-small').animation(this.opts.animation.open, $.proxy(this.opened, this));

// changes the text of $element with a less delay to smooth
setTimeout($.proxy(this.setOpenedText, this), this.opts.animation.open.duration * 500);
setTimeout($.proxy(this.setOpenedText, this), this.opts.animation.open.duration * 500);
},
opened: function()
{
Expand All @@ -2375,20 +2406,36 @@
this.$element.text(this.opts.text);
}
},
close: function(e)
close: function()
{
if (this.isClosed())
{
return;
}

this.callback('close');

if (this.opts.animation.close === 'hide')
{
this.setClosedText();
}

this.$target.animation(this.opts.animation.close, $.proxy(this.closed, this));
},
closed: function()
{
this.$target.removeClass('open');
this.setClosedText();

if (this.opts.animation.close !== 'hide')
{
this.setClosedText();
}

if (this.hideOnSmall)
{
this.$target.addClass('hide-on-small').show();
}

this.callback('closed');
},
setClosedText: function()
Expand Down
4 changes: 2 additions & 2 deletions dist/js/kube.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 9fb659c

Please sign in to comment.