foundation-rails 5.3.1.0 → 5.3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bower.json +2 -2
- data/lib/foundation/rails/version.rb +1 -1
- data/vendor/assets/_settings.scss +24 -7
- data/vendor/assets/javascripts/foundation/foundation.abide.js +23 -28
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +5 -5
- data/vendor/assets/javascripts/foundation/foundation.alert.js +1 -1
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +9 -1
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +1 -1
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +1 -1
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +55 -15
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +12 -5
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +19 -19
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +3 -3
- data/vendor/assets/javascripts/foundation/foundation.slider.js +1 -1
- data/vendor/assets/javascripts/foundation/foundation.tab.js +1 -1
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +2 -2
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +11 -4
- data/vendor/assets/stylesheets/foundation.scss +38 -39
- data/vendor/assets/stylesheets/foundation/_settings.scss +24 -7
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +52 -29
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +20 -20
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +43 -2
- data/vendor/assets/stylesheets/foundation/components/_global.scss +2 -2
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +0 -1
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +3 -1
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +4 -7
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +25 -27
- data/vendor/assets/stylesheets/foundation/components/_switches.scss +3 -3
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +4 -0
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +4 -1
- data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +0 -2
- data/vendor/assets/stylesheets/foundation/components/_toolbar.scss +3 -0
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +7 -6
- data/vendor/assets/stylesheets/foundation/components/_type.scss +12 -2
- metadata +29 -14
- checksums.yaml +0 -7
- data/vendor/assets/stylesheets/foundation/components/_reveal-new.scss +0 -0
data/bower.json
CHANGED
@@ -171,9 +171,14 @@ $primary-color: #008CBA;
|
|
171
171
|
// $paragraph-text-rendering: optimizeLegibility;
|
172
172
|
|
173
173
|
// We use these to style <code> tags
|
174
|
-
// $code-color:
|
174
|
+
// $code-color: #333;
|
175
175
|
// $code-font-family: Consolas, 'Liberation Mono', Courier, monospace;
|
176
|
-
// $code-font-weight: $font-weight-
|
176
|
+
// $code-font-weight: $font-weight-normal;
|
177
|
+
// $code-background-color: scale-color($secondary-color, $lightness: 70%);
|
178
|
+
// $code-border-size: 1px;
|
179
|
+
// $code-border-style: solid;
|
180
|
+
// $code-border-color: scale-color($code-background-color, $lightness: -10%);
|
181
|
+
// $code-padding: rem-calc(2) rem-calc(5) rem-calc(1);
|
177
182
|
|
178
183
|
// We use these to style anchors
|
179
184
|
// $anchor-text-decoration: none;
|
@@ -365,18 +370,26 @@ $primary-color: #008CBA;
|
|
365
370
|
// We use these to control various hover effects.
|
366
371
|
// $button-function-factor: -20%;
|
367
372
|
|
368
|
-
// We use these to control button border styles.
|
373
|
+
// We use these to control button border and hover styles.
|
369
374
|
// $button-border-width: 0px;
|
370
375
|
// $button-border-style: solid;
|
371
|
-
// $button-bg: $primary-color;
|
372
|
-
// $button-
|
376
|
+
// $button-bg-color: $primary-color;
|
377
|
+
// $button-bg-hover: scale-color($button-bg-color, $lightness: $button-function-factor);
|
378
|
+
// $button-border-color: $button-bg-hover;
|
379
|
+
// $secondary-button-bg-hover: scale-color($secondary-color, $lightness: $button-function-factor);
|
380
|
+
// $secondary-button-border-color: $secondary-button-bg-hover;
|
381
|
+
// $success-button-bg-hover: scale-color($success-color, $lightness: $button-function-factor);
|
382
|
+
// $success-button-border-color: $success-button-bg-hover;
|
383
|
+
// $alert-button-bg-hover: scale-color($alert-color, $lightness: $button-function-factor);
|
384
|
+
// $alert-button-border-color: $alert-button-bg-hover;
|
373
385
|
|
374
386
|
// We use this to set the default radius used throughout the core.
|
375
387
|
// $button-radius: $global-radius;
|
376
388
|
// $button-round: $global-rounded;
|
377
389
|
|
378
|
-
// We use this to set default opacity for disabled buttons.
|
390
|
+
// We use this to set default opacity and cursor for disabled buttons.
|
379
391
|
// $button-disabled-opacity: 0.7;
|
392
|
+
// $button-disabled-cursor: $cursor-default-value;
|
380
393
|
|
381
394
|
// Button Groups
|
382
395
|
|
@@ -536,8 +549,8 @@ $primary-color: #008CBA;
|
|
536
549
|
// $input-border-width: 1px;
|
537
550
|
// $input-border-radius: $global-radius;
|
538
551
|
// $input-disabled-bg: #ddd;
|
552
|
+
// $input-disabled-cursor: $cursor-default-value;
|
539
553
|
// $input-box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
|
540
|
-
// $input-include-glowing-effect: true;
|
541
554
|
|
542
555
|
// We use these to style the fieldset border and spacing.
|
543
556
|
// $fieldset-border-style: solid;
|
@@ -560,6 +573,9 @@ $primary-color: #008CBA;
|
|
560
573
|
// $input-prefix-font-color: #333;
|
561
574
|
// $input-prefix-font-color-alt: #fff;
|
562
575
|
|
576
|
+
// We use this setting to turn on/off HTML5 number spinners (the up/down arrows)
|
577
|
+
// $input-number-spinners: true;
|
578
|
+
|
563
579
|
// We use these to style the error states for inputs and labels
|
564
580
|
// $input-error-message-padding: rem-calc(6 9 9);
|
565
581
|
// $input-error-message-top: -1px;
|
@@ -570,6 +586,7 @@ $primary-color: #008CBA;
|
|
570
586
|
// $input-error-message-font-color-alt: #333;
|
571
587
|
|
572
588
|
// We use this to style the glowing effect of inputs when focused
|
589
|
+
// $input-include-glowing-effect: true;
|
573
590
|
// $glowing-effect-fade-time: 0.45s;
|
574
591
|
// $glowing-effect-color: $input-focus-border-color;
|
575
592
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.abide = {
|
5
5
|
name : 'abide',
|
6
6
|
|
7
|
-
version : '5.3.
|
7
|
+
version : '5.3.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
live_validate : true,
|
@@ -97,23 +97,21 @@
|
|
97
97
|
validate : function (els, e, is_ajax) {
|
98
98
|
var validations = this.parse_patterns(els),
|
99
99
|
validation_count = validations.length,
|
100
|
-
form = this.S(els[0]).closest('
|
101
|
-
settings = form.data(this.attr_name(true) + '-init') || {},
|
100
|
+
form = this.S(els[0]).closest('form'),
|
102
101
|
submit_event = /submit/.test(e.type);
|
103
102
|
|
104
|
-
form.trigger('validated').trigger('validated.fndtn.abide');
|
105
103
|
// Has to count up to make sure the focus gets applied to the top error
|
106
104
|
for (var i=0; i < validation_count; i++) {
|
107
105
|
if (!validations[i] && (submit_event || is_ajax)) {
|
108
|
-
if (settings.focus_on_invalid) els[i].focus();
|
109
|
-
form.trigger('invalid')
|
110
|
-
this.S(els[i]).closest('
|
106
|
+
if (this.settings.focus_on_invalid) els[i].focus();
|
107
|
+
form.trigger('invalid');
|
108
|
+
this.S(els[i]).closest('form').attr(this.invalid_attr, '');
|
111
109
|
return false;
|
112
110
|
}
|
113
111
|
}
|
114
112
|
|
115
113
|
if (submit_event || is_ajax) {
|
116
|
-
form.trigger('valid')
|
114
|
+
form.trigger('valid');
|
117
115
|
}
|
118
116
|
|
119
117
|
form.removeAttr(this.invalid_attr);
|
@@ -143,7 +141,7 @@
|
|
143
141
|
if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
|
144
142
|
return [el, this.settings.patterns[pattern], required];
|
145
143
|
} else if (pattern.length > 0) {
|
146
|
-
return [el, new RegExp(
|
144
|
+
return [el, new RegExp(pattern), required];
|
147
145
|
}
|
148
146
|
|
149
147
|
if (this.settings.patterns.hasOwnProperty(type)) {
|
@@ -160,7 +158,6 @@
|
|
160
158
|
validations = [],
|
161
159
|
form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
|
162
160
|
settings = form.data(this.attr_name(true) + '-init') || {};
|
163
|
-
|
164
161
|
while (i--) {
|
165
162
|
var el = el_patterns[i][0],
|
166
163
|
required = el_patterns[i][2],
|
@@ -187,36 +184,34 @@
|
|
187
184
|
validations.push(this.valid_radio(el, required));
|
188
185
|
} else if (is_checkbox && required) {
|
189
186
|
validations.push(this.valid_checkbox(el, required));
|
190
|
-
} else
|
191
|
-
|
192
|
-
|
187
|
+
} else {
|
188
|
+
|
189
|
+
if (validator) {
|
190
|
+
valid = this.settings.validators[validator].apply(this, [el, required, parent]);
|
191
|
+
validations.push(valid);
|
192
|
+
}
|
193
193
|
|
194
|
-
if (
|
195
|
-
|
196
|
-
|
194
|
+
if (el_patterns[i][1].test(value) && valid_length ||
|
195
|
+
!required && el.value.length < 1 || $(el).attr('disabled')) {
|
196
|
+
validations.push(true);
|
197
197
|
} else {
|
198
|
-
|
199
|
-
parent.addClass('error');
|
198
|
+
validations.push(false);
|
200
199
|
}
|
201
200
|
|
202
|
-
|
201
|
+
validations = [validations.every(function(valid){return valid;})];
|
203
202
|
|
204
|
-
if
|
205
|
-
!required && el.value.length < 1 || $(el).attr('disabled')) {
|
203
|
+
if(validations[0]){
|
206
204
|
this.S(el).removeAttr(this.invalid_attr);
|
207
205
|
parent.removeClass('error');
|
208
|
-
if (label.length > 0 && settings.error_labels) label.removeClass('error');
|
209
|
-
|
210
|
-
validations.push(true);
|
206
|
+
if (label.length > 0 && this.settings.error_labels) label.removeClass('error');
|
211
207
|
$(el).triggerHandler('valid');
|
212
208
|
} else {
|
213
|
-
this.S(el).attr(this.invalid_attr, '');
|
214
209
|
parent.addClass('error');
|
215
|
-
|
216
|
-
|
217
|
-
validations.push(false);
|
210
|
+
this.S(el).attr(this.invalid_attr, '');
|
211
|
+
if (label.length > 0 && this.settings.error_labels) label.addClass('error');
|
218
212
|
$(el).triggerHandler('invalid');
|
219
213
|
}
|
214
|
+
|
220
215
|
}
|
221
216
|
}
|
222
217
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.accordion = {
|
5
5
|
name : 'accordion',
|
6
6
|
|
7
|
-
version : '5.3.
|
7
|
+
version : '5.3.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
active_class: 'active',
|
@@ -24,12 +24,12 @@
|
|
24
24
|
.off('.fndtn.accordion')
|
25
25
|
.on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a', function (e) {
|
26
26
|
var accordion = S(this).closest('[' + self.attr_name() + ']'),
|
27
|
-
target = S('#' + this.href.split('#')[1]),
|
28
|
-
siblings = S('dd > .content', accordion),
|
29
|
-
aunts = $('>dd', accordion),
|
30
27
|
groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
|
31
28
|
settings = accordion.data(self.attr_name(true) + '-init'),
|
32
|
-
|
29
|
+
target = S('#' + this.href.split('#')[1]),
|
30
|
+
aunts = $('> dd', accordion),
|
31
|
+
siblings = aunts.children('.content'),
|
32
|
+
active_content = siblings.filter('.' + settings.active_class);
|
33
33
|
e.preventDefault();
|
34
34
|
|
35
35
|
if (accordion.attr(self.attr_name())) {
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.clearing = {
|
5
5
|
name : 'clearing',
|
6
6
|
|
7
|
-
version: '5.3.
|
7
|
+
version: '5.3.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
templates : {
|
@@ -21,6 +21,9 @@
|
|
21
21
|
// Default to the entire li element.
|
22
22
|
open_selectors : '',
|
23
23
|
|
24
|
+
// Image will be skipped in carousel.
|
25
|
+
skip_selector : '',
|
26
|
+
|
24
27
|
touch_label : '',
|
25
28
|
|
26
29
|
// event initializers and locks
|
@@ -441,6 +444,11 @@
|
|
441
444
|
var current = this.S('.visible', $ul),
|
442
445
|
target = current[direction]();
|
443
446
|
|
447
|
+
// Check for skip selector.
|
448
|
+
if (this.settings.skip_selector && target.find(this.settings.skip_selector).length != 0) {
|
449
|
+
target = target[direction]();
|
450
|
+
}
|
451
|
+
|
444
452
|
if (target.length) {
|
445
453
|
this.S('img', target)
|
446
454
|
.trigger('click', [current, target]).trigger('click.fndtn.clearing', [current, target])
|
@@ -4,7 +4,7 @@
|
|
4
4
|
Foundation.libs.dropdown = {
|
5
5
|
name : 'dropdown',
|
6
6
|
|
7
|
-
version : '5.3.
|
7
|
+
version : '5.3.3',
|
8
8
|
|
9
9
|
settings : {
|
10
10
|
active_class: 'open',
|
@@ -72,7 +72,7 @@
|
|
72
72
|
.on('click.fndtn.dropdown', function (e) {
|
73
73
|
var parent = S(e.target).closest('[' + self.attr_name() + '-content]');
|
74
74
|
|
75
|
-
if (S(e.target).
|
75
|
+
if (S(e.target).closest('[' + self.attr_name() + ']').length > 0) {
|
76
76
|
return;
|
77
77
|
}
|
78
78
|
if (!(S(e.target).data('revealId')) &&
|
@@ -6,7 +6,7 @@
|
|
6
6
|
Foundation.libs.joyride = {
|
7
7
|
name : 'joyride',
|
8
8
|
|
9
|
-
version : '5.3.
|
9
|
+
version : '5.3.3',
|
10
10
|
|
11
11
|
defaults : {
|
12
12
|
expose : false, // turn on or off the expose feature
|
@@ -19,6 +19,7 @@
|
|
19
19
|
start_timer_on_click : true, // true or false - true requires clicking the first button start the timer
|
20
20
|
start_offset : 0, // the index of the tooltip you want to start on (index of the li)
|
21
21
|
next_button : true, // true or false to control whether a next button is used
|
22
|
+
prev_button : true, // true or false to control whether a prev button is used
|
22
23
|
tip_animation : 'fade', // 'pop' or 'fade' in each tip
|
23
24
|
pause_after : [], // array of indexes where to pause the tour after
|
24
25
|
exposed : [], // array of expose elements
|
@@ -41,14 +42,15 @@
|
|
41
42
|
pre_ride_callback : function (){}, // A method to call before the tour starts (passed index, tip, and cloned exposed element)
|
42
43
|
post_expose_callback : function (){}, // A method to call after an element has been exposed
|
43
44
|
template : { // HTML segments for tip layout
|
44
|
-
link
|
45
|
-
timer
|
46
|
-
tip
|
47
|
-
wrapper
|
48
|
-
button
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
link : '<a href="#close" class="joyride-close-tip">×</a>',
|
46
|
+
timer : '<div class="joyride-timer-indicator-wrap"><span class="joyride-timer-indicator"></span></div>',
|
47
|
+
tip : '<div class="joyride-tip-guide"><span class="joyride-nub"></span></div>',
|
48
|
+
wrapper : '<div class="joyride-content-wrapper"></div>',
|
49
|
+
button : '<a href="#" class="small button joyride-next-tip"></a>',
|
50
|
+
prev_button : '<a href="#" class="small button joyride-prev-tip"></a>',
|
51
|
+
modal : '<div class="joyride-modal-bg"></div>',
|
52
|
+
expose : '<div class="joyride-expose-wrapper"></div>',
|
53
|
+
expose_cover : '<div class="joyride-expose-cover"></div>'
|
52
54
|
},
|
53
55
|
expose_add_class : '' // One or more space-separated class names to be added to exposed element
|
54
56
|
},
|
@@ -81,6 +83,22 @@
|
|
81
83
|
this.show();
|
82
84
|
}
|
83
85
|
|
86
|
+
}.bind(this))
|
87
|
+
.on('click.fndtn.joyride', '.joyride-prev-tip', function (e) {
|
88
|
+
e.preventDefault();
|
89
|
+
|
90
|
+
if (this.settings.$li.prev().length < 1) {
|
91
|
+
// Do nothing if there are no prev element
|
92
|
+
} else if (this.settings.timer > 0) {
|
93
|
+
clearTimeout(this.settings.automate);
|
94
|
+
this.hide();
|
95
|
+
this.show(null, true);
|
96
|
+
this.startTimer();
|
97
|
+
} else {
|
98
|
+
this.hide();
|
99
|
+
this.show(null, true);
|
100
|
+
}
|
101
|
+
|
84
102
|
}.bind(this))
|
85
103
|
|
86
104
|
.on('click.fndtn.joyride', '.joyride-close-tip', function (e) {
|
@@ -173,6 +191,7 @@
|
|
173
191
|
|
174
192
|
$blank = $(this.settings.template.tip).addClass(opts.tip_class);
|
175
193
|
content = $.trim($(opts.li).html()) +
|
194
|
+
this.prev_button_text(opts.prev_button_text, opts.index) +
|
176
195
|
this.button_text(opts.button_text) +
|
177
196
|
this.settings.template.link +
|
178
197
|
this.timer_instance(opts.index);
|
@@ -205,22 +224,40 @@
|
|
205
224
|
return txt;
|
206
225
|
},
|
207
226
|
|
227
|
+
prev_button_text : function (txt, idx) {
|
228
|
+
if (this.settings.tip_settings.prev_button) {
|
229
|
+
txt = $.trim(txt) || 'Previous';
|
230
|
+
|
231
|
+
// Add the disabled class to the button if it's the first element
|
232
|
+
if (idx == 0)
|
233
|
+
txt = $(this.settings.template.prev_button).append(txt).addClass('disabled')[0].outerHTML;
|
234
|
+
else
|
235
|
+
txt = $(this.settings.template.prev_button).append(txt)[0].outerHTML;
|
236
|
+
} else {
|
237
|
+
txt = '';
|
238
|
+
}
|
239
|
+
return txt;
|
240
|
+
},
|
241
|
+
|
208
242
|
create : function (opts) {
|
209
243
|
this.settings.tip_settings = $.extend({}, this.settings, this.data_options(opts.$li));
|
210
|
-
var buttonText = opts.$li.attr(this.add_namespace('data-button'))
|
244
|
+
var buttonText = opts.$li.attr(this.add_namespace('data-button'))
|
211
245
|
|| opts.$li.attr(this.add_namespace('data-text')),
|
246
|
+
prevButtonText = opts.$li.attr(this.add_namespace('data-button-prev'))
|
247
|
+
|| opts.$li.attr(this.add_namespace('data-prev-text')),
|
212
248
|
tipClass = opts.$li.attr('class'),
|
213
249
|
$tip_content = $(this.tip_template({
|
214
250
|
tip_class : tipClass,
|
215
251
|
index : opts.index,
|
216
252
|
button_text : buttonText,
|
253
|
+
prev_button_text : prevButtonText,
|
217
254
|
li : opts.$li
|
218
255
|
}));
|
219
256
|
|
220
257
|
$(this.settings.tip_container).append($tip_content);
|
221
258
|
},
|
222
259
|
|
223
|
-
show : function (init) {
|
260
|
+
show : function (init, is_prev) {
|
224
261
|
var $timer = null;
|
225
262
|
|
226
263
|
// are we paused?
|
@@ -231,7 +268,7 @@
|
|
231
268
|
if (this.settings.paused) {
|
232
269
|
this.settings.paused = false;
|
233
270
|
} else {
|
234
|
-
this.set_li(init);
|
271
|
+
this.set_li(init, is_prev);
|
235
272
|
}
|
236
273
|
|
237
274
|
this.settings.attempts = 0;
|
@@ -354,13 +391,16 @@
|
|
354
391
|
this.settings.$current_tip);
|
355
392
|
},
|
356
393
|
|
357
|
-
set_li : function (init) {
|
394
|
+
set_li : function (init, is_prev) {
|
358
395
|
if (init) {
|
359
396
|
this.settings.$li = this.settings.$tip_content.eq(this.settings.start_offset);
|
360
397
|
this.set_next_tip();
|
361
398
|
this.settings.$current_tip = this.settings.$next_tip;
|
362
399
|
} else {
|
363
|
-
|
400
|
+
if (is_prev)
|
401
|
+
this.settings.$li = this.settings.$li.prev();
|
402
|
+
else
|
403
|
+
this.settings.$li = this.settings.$li.next();
|
364
404
|
this.set_next_tip();
|
365
405
|
}
|
366
406
|
|
@@ -426,7 +466,7 @@
|
|
426
466
|
if (!/body/i.test(this.settings.$target.selector)) {
|
427
467
|
var topAdjustment = this.settings.tip_settings.tipAdjustmentY ? parseInt(this.settings.tip_settings.tipAdjustmentY) : 0,
|
428
468
|
leftAdjustment = this.settings.tip_settings.tipAdjustmentX ? parseInt(this.settings.tip_settings.tipAdjustmentX) : 0;
|
429
|
-
|
469
|
+
|
430
470
|
if (this.bottom()) {
|
431
471
|
if (this.rtl) {
|
432
472
|
this.settings.$next_tip.css({
|