Skip to content

Commit

Permalink
Updated distribution to version 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Semantic-Pusher-Robot committed Jul 1, 2015
1 parent 261eca0 commit 422f652
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 36 deletions.
2 changes: 1 addition & 1 deletion definitions/elements/input.less
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
.ui.labeled.input > .label {
flex: 0 0 auto;
margin: 0;
font-size: @medium;
font-size: @relativeMedium;
}
.ui.labeled.input > .label:not(.corner) {
padding-top: @verticalPadding;
Expand Down
76 changes: 51 additions & 25 deletions definitions/modules/dimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,8 @@ $.fn.dimmer = function(parameters) {

initialize: function() {
module.debug('Initializing dimmer', settings);
if(settings.on == 'hover') {
$dimmable
.on('mouseenter' + eventNamespace, module.show)
.on('mouseleave' + eventNamespace, module.hide)
;
}
else if(settings.on == 'click') {
$dimmable
.on(clickEvent + eventNamespace, module.toggle)
;
}
if( module.is.page() ) {
module.debug('Setting as a page dimmer', $dimmable);
module.set.pageDimmer();
}

if( module.is.closable() ) {
module.verbose('Adding dimmer close event', $dimmer);
$dimmable
.on(clickEvent + eventNamespace, selector.dimmer, module.event.click)
;
}
module.bind.events();
module.set.dimmable();
module.instantiate();
},
Expand All @@ -118,14 +98,48 @@ $.fn.dimmer = function(parameters) {

destroy: function() {
module.verbose('Destroying previous module', $dimmer);
$module
.removeData(moduleNamespace)
;
module.unbind.events();
module.remove.variation();
$dimmable
.off(eventNamespace)
;
},

bind: {
events: function() {
if(settings.on == 'hover') {
$dimmable
.on('mouseenter' + eventNamespace, module.show)
.on('mouseleave' + eventNamespace, module.hide)
;
}
else if(settings.on == 'click') {
$dimmable
.on(clickEvent + eventNamespace, module.toggle)
;
}
if( module.is.page() ) {
module.debug('Setting as a page dimmer', $dimmable);
module.set.pageDimmer();
}

if( module.is.closable() ) {
module.verbose('Adding dimmer close event', $dimmer);
$dimmable
.on(clickEvent + eventNamespace, selector.dimmer, module.event.click)
;
}
}
},

unbind: {
events: function() {
$module
.removeData(moduleNamespace)
;
}
},

event: {
click: function(event) {
module.verbose('Determining if event occured on dimmer', event);
Expand Down Expand Up @@ -367,11 +381,11 @@ $.fn.dimmer = function(parameters) {
set: {
opacity: function(opacity) {
var
opacity = settings.opacity || opacity,
color = $dimmer.css('background-color'),
colorArray = color.split(','),
isRGBA = (colorArray && colorArray.length == 4)
;
opacity = settings.opacity || opacity;
if(isRGBA) {
colorArray[3] = opacity + ')';
color = colorArray.join(',');
Expand All @@ -396,6 +410,12 @@ $.fn.dimmer = function(parameters) {
},
disabled: function() {
$dimmer.addClass(className.disabled);
},
variation: function(variation) {
variation = variation || settings.variation;
if(variation) {
$dimmer.addClass(variation);
}
}
},

Expand All @@ -410,6 +430,12 @@ $.fn.dimmer = function(parameters) {
},
disabled: function() {
$dimmer.removeClass(className.disabled);
},
variation: function(variation) {
variation = variation || settings.variation;
if(variation) {
$dimmer.removeClass(variation);
}
}
},

Expand Down
3 changes: 1 addition & 2 deletions definitions/modules/dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ $.fn.dropdown = function(parameters) {
if( $module.is('select') ) {
module.setup.select();
module.setup.returnedObject();
console.log($module);
}
if( module.is.search() && !module.has.search() ) {
module.verbose('Adding search input');
Expand Down Expand Up @@ -315,7 +314,6 @@ $.fn.dropdown = function(parameters) {
.detach()
.prependTo($module)
;
console.log($module);
}
if($input.is('[multiple]')) {
module.set.multiple();
Expand Down Expand Up @@ -1677,6 +1675,7 @@ $.fn.dropdown = function(parameters) {

restore: {
defaults: function() {
module.clear();
module.restore.defaultText();
module.restore.defaultValue();
},
Expand Down
6 changes: 3 additions & 3 deletions definitions/modules/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,9 @@
}

@media only screen and (max-width : @computerBreakpoint) {
.ui.scrolling.modal {
margin-top: @mobileScrollingMargin;
margin-bottom: @mobileScrollingMargin;
.modals.dimmer .ui.scrolling.modal {
margin-top: @mobileScrollingMargin !important;
margin-bottom: @mobileScrollingMargin !important;
}
}

Expand Down
21 changes: 21 additions & 0 deletions package.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Package.onUse(function(api) {
'_site/collections/table.variables',
'_site/elements/button.overrides',
'_site/elements/button.variables',
'_site/elements/container.overrides',
'_site/elements/container.variables',
'_site/elements/divider.overrides',
'_site/elements/divider.variables',
'_site/elements/flag.overrides',
Expand Down Expand Up @@ -69,6 +71,8 @@ Package.onUse(function(api) {
'_site/modules/dimmer.variables',
'_site/modules/dropdown.overrides',
'_site/modules/dropdown.variables',
'_site/modules/embed.overrides',
'_site/modules/embed.variables',
'_site/modules/modal.overrides',
'_site/modules/modal.variables',
'_site/modules/nag.overrides',
Expand Down Expand Up @@ -118,6 +122,7 @@ Package.onUse(function(api) {
'definitions/collections/message.less',
'definitions/collections/table.less',
'definitions/elements/button.less',
'definitions/elements/container.less',
'definitions/elements/divider.less',
'definitions/elements/flag.less',
'definitions/elements/header.less',
Expand All @@ -142,6 +147,8 @@ Package.onUse(function(api) {
'definitions/modules/dimmer.less',
'definitions/modules/dropdown.js',
'definitions/modules/dropdown.less',
'definitions/modules/embed.js',
'definitions/modules/embed.less',
'definitions/modules/modal.js',
'definitions/modules/modal.less',
'definitions/modules/nag.js',
Expand Down Expand Up @@ -201,6 +208,8 @@ Package.onUse(function(api) {
'themes/bootstrap3/elements/button.variables',
'themes/chubby/collections/form.overrides',
'themes/chubby/collections/form.variables',
'themes/chubby/collections/menu.overrides',
'themes/chubby/collections/menu.variables',
'themes/chubby/elements/button.overrides',
'themes/chubby/elements/button.variables',
'themes/chubby/elements/header.overrides',
Expand All @@ -219,6 +228,8 @@ Package.onUse(function(api) {
'themes/classic/modules/progress.variables',
'themes/classic/views/card.overrides',
'themes/classic/views/card.variables',
'themes/colored/modules/checkbox.overrides',
'themes/colored/modules/checkbox.variables',
'themes/default/assets/fonts/icons.eot',
'themes/default/assets/fonts/icons.otf',
'themes/default/assets/fonts/icons.svg',
Expand All @@ -240,6 +251,8 @@ Package.onUse(function(api) {
'themes/default/collections/table.variables',
'themes/default/elements/button.overrides',
'themes/default/elements/button.variables',
'themes/default/elements/container.overrides',
'themes/default/elements/container.variables',
'themes/default/elements/divider.overrides',
'themes/default/elements/divider.variables',
'themes/default/elements/flag.overrides',
Expand Down Expand Up @@ -280,6 +293,8 @@ Package.onUse(function(api) {
'themes/default/modules/dimmer.variables',
'themes/default/modules/dropdown.overrides',
'themes/default/modules/dropdown.variables',
'themes/default/modules/embed.overrides',
'themes/default/modules/embed.variables',
'themes/default/modules/modal.overrides',
'themes/default/modules/modal.variables',
'themes/default/modules/nag.overrides',
Expand Down Expand Up @@ -340,12 +355,18 @@ Package.onUse(function(api) {
'themes/github/elements/step.variables',
'themes/gmail/collections/message.overrides',
'themes/gmail/collections/message.variables',
'themes/instagram/views/card.overrides',
'themes/instagram/views/card.variables',
'themes/material/collections/menu.overrides',
'themes/material/collections/menu.variables',
'themes/material/elements/button.overrides',
'themes/material/elements/button.variables',
'themes/material/elements/header.overrides',
'themes/material/elements/header.variables',
'themes/material/globals/site.overrides',
'themes/material/globals/site.variables',
'themes/material/modules/dropdown.overrides',
'themes/material/modules/dropdown.variables',
'themes/material/modules/modal.overrides',
'themes/material/modules/modal.variables',
'themes/pulsar/elements/loader.overrides',
Expand Down
8 changes: 4 additions & 4 deletions themes/default/elements/label.variables
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@
@tiny : @10px;
@small : @11px;
@medium : @12px;
@large : @medium;
@big : @large;
@huge : @big;
@massive : @huge;
@large : @absoluteMedium;
@big : @absoluteBig;
@huge : @absoluteHuge;
@massive : @absoluteMassive;
13 changes: 12 additions & 1 deletion themes/default/globals/site.variables
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
Em Sizes
--------------------*/

/* Exact pixel values expressed in em */
/* Rounds sizes to closest pixel, then expresses that exact value in terms of @emSize */
@mini : unit( round(@miniSize * @emSize) / @emSize, rem);
@tiny : unit( round(@tinySize * @emSize) / @emSize, rem);
@small : unit( round(@smallSize * @emSize) / @emSize, rem);
Expand All @@ -340,6 +340,7 @@
@huge : unit( round(@hugeSize * @emSize) / @emSize, rem);
@massive : unit( round(@massiveSize * @emSize) / @emSize, rem);

/* em */
@relativeMini : unit( round(@miniSize * @emSize) / @emSize, em);
@relativeTiny : unit( round(@tinySize * @emSize) / @emSize, em);
@relativeSmall : unit( round(@smallSize * @emSize) / @emSize, em);
Expand All @@ -349,6 +350,16 @@
@relativeHuge : unit( round(@hugeSize * @emSize) / @emSize, em);
@relativeMassive : unit( round(@massiveSize * @emSize) / @emSize, em);

/* rem */
@absoluteMini : unit( round(@miniSize * @emSize) / @emSize, rem);
@absoluteTiny : unit( round(@tinySize * @emSize) / @emSize, rem);
@absoluteSmall : unit( round(@smallSize * @emSize) / @emSize, rem);
@absoluteMedium : unit( round(@mediumSize * @emSize) / @emSize, rem);
@absoluteLarge : unit( round(@largeSize * @emSize) / @emSize, rem);
@absoluteBig : unit( round(@bigSize * @emSize) / @emSize, rem);
@absoluteHuge : unit( round(@hugeSize * @emSize) / @emSize, rem);
@absoluteMassive : unit( round(@massiveSize * @emSize) / @emSize, rem);


/*-------------------
Exact Pixel Values
Expand Down

0 comments on commit 422f652

Please sign in to comment.