hootstrap 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52febde69e1cf0a8d39dc73fe217a21a7c7aa1ac67bfa628258ff63a074fefcc
4
- data.tar.gz: 7ec8d1e8a88a6d6fbf31a35b5b1b50492109d7ac6d54cd7c9bc1eee37d2d28cb
3
+ metadata.gz: f19c828b069142d218ec9d13ce456a4f165f56abddd3aa50bc5dc571c89424cf
4
+ data.tar.gz: '038aec5f56af7e6ac00eb2302ca999242ea02b6faec27d4972b27a9cfbe21c37'
5
5
  SHA512:
6
- metadata.gz: 80d18958dde2d40b8b62e130c11d1e8f2a27996b842b58e44c83c0659769347afc3321fc7664e8ea8d5f1c8595fdab67ebc4b504cdfa76e74c9d012502dedf2f
7
- data.tar.gz: 3f4590d82e52505f2936af89c5be6a32f643b3e905fb3973e24b121517ec4fca588c1f7445f4ea4a71f007d12e27e1e9ce48d0fab4756460d4ef52dd76c2e584
6
+ metadata.gz: 1773f8b98db3ba6794b5c40330cbc69596f20d3116a36abe16e4c2e6ce3af70634b19f045af395f30887d427baf49150149e8dec94dcb77cecab7a5aa0c0454c
7
+ data.tar.gz: '01421259bd2d87af50e77dbbb0ee2ebe83f710c1ad14f21af0d4b1ceca6e5f8f187349a801c9070790078ab0899b695afb0f796353252d63f899b86c9a05b24d'
@@ -1,8 +1,7 @@
1
1
  //= require ./utils/closest
2
2
  //= require ./utils/dynamicListener
3
- //= require ./utils/turbolinks
4
3
 
5
- document.addEventListener(HootstrapEvent, () => {
4
+ document.addEventListener(Hootstrap.turbolinks.event, () => {
6
5
  addDynamicEventListener(
7
6
  document.body,
8
7
  'click',
@@ -1,7 +1,6 @@
1
1
  //= require ./utils/dynamicListener
2
- //= require ./utils/turbolinks
3
2
 
4
- document.addEventListener(HootstrapEvent, () => {
3
+ document.addEventListener(Hootstrap.turbolinks.event, () => {
5
4
  let activeDropdown = {};
6
5
 
7
6
  addDynamicEventListener(
@@ -1,7 +1,6 @@
1
1
  //= require ./utils/dynamicListener
2
- //= require ./utils/turbolinks
3
2
 
4
- document.addEventListener(HootstrapEvent, () => {
3
+ document.addEventListener(Hootstrap.turbolinks.event, () => {
5
4
  let confirmed = false;
6
5
 
7
6
  addDynamicEventListener(document.body, 'click', '[data-prompt]', handleClick);
@@ -0,0 +1,9 @@
1
+ // Override Turbolinks default timeout for the progress bar.
2
+ //
3
+ // Shows the Progress Bar after every page change.
4
+
5
+ if (Hootstrap.turbolinks.enabled) {
6
+ Turbolinks.BrowserAdapter.prototype.showProgressBarAfterDelay = function() {
7
+ return (this.progressBarTimeout = setTimeout(this.showProgressBar, 0));
8
+ };
9
+ }
@@ -1,5 +1,8 @@
1
+ const turbolinksEnabled =
2
+ window.Turbolinks != null && window.Turbolinks.supported;
3
+
1
4
  function checkTurbolinks() {
2
- if (window.Turbolinks != null && window.Turbolinks.supported) {
5
+ if (turbolinksEnabled) {
3
6
  if (window.Turbolinks.EVENTS != null) {
4
7
  return 'page:change';
5
8
  } else {
@@ -10,4 +13,9 @@ function checkTurbolinks() {
10
13
  }
11
14
  }
12
15
 
13
- window.HootstrapEvent = checkTurbolinks();
16
+ window.Hootstrap = {
17
+ turbolinks: {
18
+ enabled: turbolinksEnabled,
19
+ event: checkTurbolinks()
20
+ }
21
+ };
@@ -1,5 +1,7 @@
1
+ //= require hootstrap/utils/turbolinks
1
2
  //= require hootstrap/alerts
2
3
  //= require hootstrap/dropdown
3
4
  //= require hootstrap/modal
4
5
  //= require hootstrap/rails
5
6
  //= require hootstrap/toast
7
+ //= require hootstrap/turbolinks-progress-bar
@@ -1,5 +1,5 @@
1
- @import "hootstrap/base/variables";
2
- @import "hootstrap/base/mixins/background";
3
- @import "hootstrap/base/mixins/button";
4
- @import "hootstrap/base/mixins/toast";
5
- @import "hootstrap/base/mixins/tooltip";
1
+ @import 'hootstrap/base/variables';
2
+ @import 'hootstrap/base/mixins/background';
3
+ @import 'hootstrap/base/mixins/button';
4
+ @import 'hootstrap/base/mixins/toast';
5
+ @import 'hootstrap/base/mixins/tooltip';
@@ -768,6 +768,7 @@ $toast-width: 400px;
768
768
  // Progress bars
769
769
 
770
770
  $progress-height: 1rem;
771
+ $progress-height-sm: 0.125rem;
771
772
  $progress-font-size: .75rem;
772
773
  $progress-bg: $gray-200;
773
774
  $progress-border-radius: $border-radius;
@@ -1,6 +1,7 @@
1
- @import "hootstrap/components/alert";
2
- @import "hootstrap/components/badge";
3
- @import "hootstrap/components/button";
4
- @import "hootstrap/components/forms";
5
- @import "hootstrap/components/loader";
6
- @import "hootstrap/components/tooltip";
1
+ @import 'hootstrap/components/alert';
2
+ @import 'hootstrap/components/badge';
3
+ @import 'hootstrap/components/button';
4
+ @import 'hootstrap/components/forms';
5
+ @import 'hootstrap/components/loader';
6
+ @import 'hootstrap/components/progress-bar';
7
+ @import 'hootstrap/components/tooltip';
@@ -0,0 +1,4 @@
1
+ .turbolinks-progress-bar {
2
+ background-color: $progress-bar-bg;
3
+ height: $progress-height-sm;
4
+ }
@@ -26,3 +26,7 @@
26
26
  color: $page-subtitle-color;
27
27
  margin-bottom: 0;
28
28
  }
29
+
30
+ .page-actions {
31
+ margin-top: $spacer * 1.5;
32
+ }
@@ -1 +1 @@
1
- @import "hootstrap/reset/html";
1
+ @import 'hootstrap/reset/html';
@@ -1,5 +1,5 @@
1
- @import "hootstrap/utils/background";
2
- @import "hootstrap/utils/flex";
3
- @import "hootstrap/utils/opacity";
4
- @import "hootstrap/utils/sizing";
5
- @import "hootstrap/utils/typography";
1
+ @import 'hootstrap/utils/background';
2
+ @import 'hootstrap/utils/flex';
3
+ @import 'hootstrap/utils/opacity';
4
+ @import 'hootstrap/utils/sizing';
5
+ @import 'hootstrap/utils/typography';
@@ -1,9 +1,9 @@
1
- @import "bootstrap/functions";
2
- @import "hootstrap/base/base";
3
- @import "bootstrap/variables";
4
- @import "bootstrap";
1
+ @import 'bootstrap/functions';
2
+ @import 'hootstrap/base/base';
3
+ @import 'bootstrap/variables';
4
+ @import 'bootstrap';
5
5
 
6
- @import "hootstrap/reset/base";
7
- @import "hootstrap/components/base";
8
- @import "hootstrap/patterns/base";
9
- @import "hootstrap/utils/base";
6
+ @import 'hootstrap/reset/base';
7
+ @import 'hootstrap/components/base';
8
+ @import 'hootstrap/patterns/base';
9
+ @import 'hootstrap/utils/base';
@@ -1,3 +1,3 @@
1
1
  module Hootstrap
2
- VERSION = '0.4.0'
2
+ VERSION = '0.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Licata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-13 00:00:00.000000000 Z
11
+ date: 2018-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -68,6 +68,7 @@ files:
68
68
  - assets/javascripts/hootstrap/modal.js
69
69
  - assets/javascripts/hootstrap/rails.js
70
70
  - assets/javascripts/hootstrap/toast.js
71
+ - assets/javascripts/hootstrap/turbolinks-progress-bar.js
71
72
  - assets/javascripts/hootstrap/utils/closest.js
72
73
  - assets/javascripts/hootstrap/utils/dynamicListener.js
73
74
  - assets/javascripts/hootstrap/utils/turbolinks.js
@@ -84,6 +85,7 @@ files:
84
85
  - assets/stylesheets/hootstrap/components/_button.scss
85
86
  - assets/stylesheets/hootstrap/components/_forms.scss
86
87
  - assets/stylesheets/hootstrap/components/_loader.scss
88
+ - assets/stylesheets/hootstrap/components/_progress-bar.scss
87
89
  - assets/stylesheets/hootstrap/components/_tooltip.scss
88
90
  - assets/stylesheets/hootstrap/patterns/_base.scss
89
91
  - assets/stylesheets/hootstrap/patterns/_card.scss