dta_rapid 0.3.5 → 0.4.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.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/_includes/buttons/link-button.html +1 -7
- data/_includes/buttons/upload-button.html +26 -4
- data/_includes/callouts/calendar-callout.html +5 -0
- data/_includes/callouts/container-callout.html +5 -0
- data/_includes/callouts/paragraph-callout.html +1 -0
- data/_includes/forms/control-input.html +26 -0
- data/_includes/forms/date-field.html +2 -1
- data/_includes/forms/text-field.html +5 -5
- data/_includes/navigation/breadcrumbs.html +10 -12
- data/_includes/navigation/inpage.html +8 -0
- data/_layouts/default.html +10 -7
- data/assets/style.scss +9 -30
- metadata +9 -139
- data/_includes/forms/radio-field.html +0 -20
- data/_includes/typography/callout.html +0 -1
- data/_layouts/conversational.html +0 -19
- data/_sass/_colors.scss +0 -76
- data/_sass/_easings.scss +0 -26
- data/_sass/_forms.scss +0 -79
- data/_sass/_grid-settings.scss +0 -143
- data/_sass/_mixins.scss +0 -6
- data/_sass/_normalize.scss +0 -424
- data/_sass/_print.scss +0 -77
- data/_sass/_typography.scss +0 -118
- data/_sass/_validation.scss +0 -8
- data/_sass/_variables.scss +0 -35
- data/_sass/components/_accordian.scss +0 -68
- data/_sass/components/_badge.scss +0 -11
- data/_sass/components/_breadcrumbs.scss +0 -57
- data/_sass/components/_button.scss +0 -72
- data/_sass/components/_callout.scss +0 -25
- data/_sass/components/_multiple-choice.scss +0 -60
- data/_sass/components/_scroll-form.scss +0 -49
- data/_sass/components/_table.scss +0 -25
- data/_sass/components/_text-field.scss +0 -7
- data/_sass/components/_upload-button.scss +0 -7
- data/_sass/mixins/_clearfix.scss +0 -7
- data/_sass/mixins/_ellipsis.scss +0 -8
- data/_sass/mixins/_flex-layout.scss +0 -14
- data/_sass/mixins/_omega-reset.scss +0 -11
- data/_sass/mixins/_prefixer.scss +0 -35
- data/_sass/mixins/_wrapper-padding.scss +0 -11
- data/_sass/vendor/bourbon/_bourbon-deprecate.scss +0 -19
- data/_sass/vendor/bourbon/_bourbon-deprecated-upcoming.scss +0 -425
- data/_sass/vendor/bourbon/_bourbon.scss +0 -90
- data/_sass/vendor/bourbon/addons/_border-color.scss +0 -29
- data/_sass/vendor/bourbon/addons/_border-radius.scss +0 -48
- data/_sass/vendor/bourbon/addons/_border-style.scss +0 -28
- data/_sass/vendor/bourbon/addons/_border-width.scss +0 -28
- data/_sass/vendor/bourbon/addons/_buttons.scss +0 -69
- data/_sass/vendor/bourbon/addons/_clearfix.scss +0 -25
- data/_sass/vendor/bourbon/addons/_ellipsis.scss +0 -30
- data/_sass/vendor/bourbon/addons/_font-stacks.scss +0 -31
- data/_sass/vendor/bourbon/addons/_hide-text.scss +0 -27
- data/_sass/vendor/bourbon/addons/_margin.scss +0 -29
- data/_sass/vendor/bourbon/addons/_padding.scss +0 -29
- data/_sass/vendor/bourbon/addons/_position.scss +0 -51
- data/_sass/vendor/bourbon/addons/_prefixer.scss +0 -66
- data/_sass/vendor/bourbon/addons/_retina-image.scss +0 -27
- data/_sass/vendor/bourbon/addons/_size.scss +0 -51
- data/_sass/vendor/bourbon/addons/_text-inputs.scss +0 -118
- data/_sass/vendor/bourbon/addons/_timing-functions.scss +0 -34
- data/_sass/vendor/bourbon/addons/_triangle.scss +0 -63
- data/_sass/vendor/bourbon/addons/_word-wrap.scss +0 -29
- data/_sass/vendor/bourbon/css3/_animation.scss +0 -61
- data/_sass/vendor/bourbon/css3/_appearance.scss +0 -5
- data/_sass/vendor/bourbon/css3/_backface-visibility.scss +0 -5
- data/_sass/vendor/bourbon/css3/_background-image.scss +0 -44
- data/_sass/vendor/bourbon/css3/_background.scss +0 -57
- data/_sass/vendor/bourbon/css3/_border-image.scss +0 -61
- data/_sass/vendor/bourbon/css3/_calc.scss +0 -6
- data/_sass/vendor/bourbon/css3/_columns.scss +0 -67
- data/_sass/vendor/bourbon/css3/_filter.scss +0 -6
- data/_sass/vendor/bourbon/css3/_flex-box.scss +0 -327
- data/_sass/vendor/bourbon/css3/_font-face.scss +0 -29
- data/_sass/vendor/bourbon/css3/_font-feature-settings.scss +0 -6
- data/_sass/vendor/bourbon/css3/_hidpi-media-query.scss +0 -12
- data/_sass/vendor/bourbon/css3/_hyphens.scss +0 -6
- data/_sass/vendor/bourbon/css3/_image-rendering.scss +0 -15
- data/_sass/vendor/bourbon/css3/_keyframes.scss +0 -38
- data/_sass/vendor/bourbon/css3/_linear-gradient.scss +0 -40
- data/_sass/vendor/bourbon/css3/_perspective.scss +0 -12
- data/_sass/vendor/bourbon/css3/_placeholder.scss +0 -10
- data/_sass/vendor/bourbon/css3/_radial-gradient.scss +0 -40
- data/_sass/vendor/bourbon/css3/_selection.scss +0 -44
- data/_sass/vendor/bourbon/css3/_text-decoration.scss +0 -27
- data/_sass/vendor/bourbon/css3/_transform.scss +0 -21
- data/_sass/vendor/bourbon/css3/_transition.scss +0 -81
- data/_sass/vendor/bourbon/css3/_user-select.scss +0 -5
- data/_sass/vendor/bourbon/functions/_assign-inputs.scss +0 -16
- data/_sass/vendor/bourbon/functions/_contains-falsy.scss +0 -25
- data/_sass/vendor/bourbon/functions/_contains.scss +0 -31
- data/_sass/vendor/bourbon/functions/_is-length.scss +0 -16
- data/_sass/vendor/bourbon/functions/_is-light.scss +0 -26
- data/_sass/vendor/bourbon/functions/_is-number.scss +0 -16
- data/_sass/vendor/bourbon/functions/_is-size.scss +0 -18
- data/_sass/vendor/bourbon/functions/_modular-scale.scss +0 -74
- data/_sass/vendor/bourbon/functions/_px-to-em.scss +0 -24
- data/_sass/vendor/bourbon/functions/_px-to-rem.scss +0 -26
- data/_sass/vendor/bourbon/functions/_shade.scss +0 -24
- data/_sass/vendor/bourbon/functions/_strip-units.scss +0 -22
- data/_sass/vendor/bourbon/functions/_tint.scss +0 -24
- data/_sass/vendor/bourbon/functions/_transition-property-name.scss +0 -37
- data/_sass/vendor/bourbon/functions/_unpack.scss +0 -32
- data/_sass/vendor/bourbon/helpers/_convert-units.scss +0 -26
- data/_sass/vendor/bourbon/helpers/_directional-values.scss +0 -108
- data/_sass/vendor/bourbon/helpers/_font-source-declaration.scss +0 -53
- data/_sass/vendor/bourbon/helpers/_gradient-positions-parser.scss +0 -24
- data/_sass/vendor/bourbon/helpers/_linear-angle-parser.scss +0 -35
- data/_sass/vendor/bourbon/helpers/_linear-gradient-parser.scss +0 -51
- data/_sass/vendor/bourbon/helpers/_linear-positions-parser.scss +0 -77
- data/_sass/vendor/bourbon/helpers/_linear-side-corner-parser.scss +0 -41
- data/_sass/vendor/bourbon/helpers/_radial-arg-parser.scss +0 -74
- data/_sass/vendor/bourbon/helpers/_radial-gradient-parser.scss +0 -55
- data/_sass/vendor/bourbon/helpers/_radial-positions-parser.scss +0 -28
- data/_sass/vendor/bourbon/helpers/_render-gradients.scss +0 -31
- data/_sass/vendor/bourbon/helpers/_shape-size-stripper.scss +0 -15
- data/_sass/vendor/bourbon/helpers/_str-to-num.scss +0 -55
- data/_sass/vendor/bourbon/settings/_asset-pipeline.scss +0 -7
- data/_sass/vendor/bourbon/settings/_deprecation-warnings.scss +0 -8
- data/_sass/vendor/bourbon/settings/_prefixer.scss +0 -9
- data/_sass/vendor/bourbon/settings/_px-to-em.scss +0 -1
- data/_sass/vendor/neat/_neat-helpers.scss +0 -8
- data/_sass/vendor/neat/_neat.scss +0 -23
- data/_sass/vendor/neat/functions/_new-breakpoint.scss +0 -49
- data/_sass/vendor/neat/functions/_private.scss +0 -114
- data/_sass/vendor/neat/grid/_box-sizing.scss +0 -15
- data/_sass/vendor/neat/grid/_direction-context.scss +0 -33
- data/_sass/vendor/neat/grid/_display-context.scss +0 -28
- data/_sass/vendor/neat/grid/_fill-parent.scss +0 -22
- data/_sass/vendor/neat/grid/_media.scss +0 -92
- data/_sass/vendor/neat/grid/_omega.scss +0 -87
- data/_sass/vendor/neat/grid/_outer-container.scss +0 -38
- data/_sass/vendor/neat/grid/_pad.scss +0 -25
- data/_sass/vendor/neat/grid/_private.scss +0 -35
- data/_sass/vendor/neat/grid/_row.scss +0 -52
- data/_sass/vendor/neat/grid/_shift.scss +0 -50
- data/_sass/vendor/neat/grid/_span-columns.scss +0 -94
- data/_sass/vendor/neat/grid/_to-deprecate.scss +0 -97
- data/_sass/vendor/neat/grid/_visual-grid.scss +0 -42
- data/_sass/vendor/neat/settings/_disable-warnings.scss +0 -13
- data/_sass/vendor/neat/settings/_grid.scss +0 -51
- data/_sass/vendor/neat/settings/_visual-grid.scss +0 -27
- data/assets/js/bundle.js +0 -424
- data/assets/js/main.js +0 -5
- data/assets/js/questions.js +0 -22
- data/assets/js/scroll-form.js +0 -52
- data/assets/js/scrolling.js +0 -22
@@ -1,97 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
@mixin breakpoint($query:$feature $value $columns, $total-columns: $grid-columns) {
|
4
|
-
@include -neat-warn("The breakpoint() mixin was renamed to media() in Neat 1.0. Please update your project with the new syntax before the next version bump.");
|
5
|
-
|
6
|
-
@if length($query) == 1 {
|
7
|
-
@media screen and ($default-feature: nth($query, 1)) {
|
8
|
-
$default-grid-columns: $grid-columns;
|
9
|
-
$grid-columns: $total-columns;
|
10
|
-
@content;
|
11
|
-
$grid-columns: $default-grid-columns;
|
12
|
-
}
|
13
|
-
} @else if length($query) == 2 {
|
14
|
-
@media screen and (nth($query, 1): nth($query, 2)) {
|
15
|
-
$default-grid-columns: $grid-columns;
|
16
|
-
$grid-columns: $total-columns;
|
17
|
-
@content;
|
18
|
-
$grid-columns: $default-grid-columns;
|
19
|
-
}
|
20
|
-
} @else if length($query) == 3 {
|
21
|
-
@media screen and (nth($query, 1): nth($query, 2)) {
|
22
|
-
$default-grid-columns: $grid-columns;
|
23
|
-
$grid-columns: nth($query, 3);
|
24
|
-
@content;
|
25
|
-
$grid-columns: $default-grid-columns;
|
26
|
-
}
|
27
|
-
} @else if length($query) == 4 {
|
28
|
-
@media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
|
29
|
-
$default-grid-columns: $grid-columns;
|
30
|
-
$grid-columns: $total-columns;
|
31
|
-
@content;
|
32
|
-
$grid-columns: $default-grid-columns;
|
33
|
-
}
|
34
|
-
} @else if length($query) == 5 {
|
35
|
-
@media screen and (nth($query, 1): nth($query, 2)) and (nth($query, 3): nth($query, 4)) {
|
36
|
-
$default-grid-columns: $grid-columns;
|
37
|
-
$grid-columns: nth($query, 5);
|
38
|
-
@content;
|
39
|
-
$grid-columns: $default-grid-columns;
|
40
|
-
}
|
41
|
-
} @else {
|
42
|
-
@include -neat-warn("Wrong number of arguments for breakpoint(). Read the documentation for more details.");
|
43
|
-
}
|
44
|
-
}
|
45
|
-
|
46
|
-
@mixin nth-omega($nth, $display: block, $direction: default) {
|
47
|
-
@include -neat-warn("The nth-omega() mixin is deprecated. Please use omega() instead.");
|
48
|
-
@include omega($nth $display, $direction);
|
49
|
-
}
|
50
|
-
|
51
|
-
/// Resets the active display property to `block`. Particularly useful when changing the display property in a single row.
|
52
|
-
///
|
53
|
-
/// @example scss - Usage
|
54
|
-
/// .element {
|
55
|
-
/// @include row(table);
|
56
|
-
/// // Context changed to table display
|
57
|
-
/// }
|
58
|
-
///
|
59
|
-
/// @include reset-display;
|
60
|
-
/// // Context is reset to block display
|
61
|
-
|
62
|
-
@mixin reset-display {
|
63
|
-
$container-display-table: false !global;
|
64
|
-
@include -neat-warn("Resetting $display will be deprecated in future versions in favor of the display(){...} mixin.");
|
65
|
-
}
|
66
|
-
|
67
|
-
/// Resets the active layout direction to the default value set in `$default-layout-direction`. Particularly useful when changing the layout direction in a single row.
|
68
|
-
///
|
69
|
-
/// @example scss - Usage
|
70
|
-
/// .element {
|
71
|
-
/// @include row($direction: RTL);
|
72
|
-
/// // Context changed to right-to-left
|
73
|
-
/// }
|
74
|
-
///
|
75
|
-
/// @include reset-layout-direction;
|
76
|
-
/// // Context is reset to left-to-right
|
77
|
-
|
78
|
-
@mixin reset-layout-direction {
|
79
|
-
$layout-direction: $default-layout-direction !global;
|
80
|
-
@include -neat-warn("Resetting $direction will be deprecated in future versions in favor of the direction(){...} mixin.");
|
81
|
-
}
|
82
|
-
|
83
|
-
/// Resets both the active layout direction and the active display property.
|
84
|
-
///
|
85
|
-
/// @example scss - Usage
|
86
|
-
/// .element {
|
87
|
-
/// @include row(table, RTL);
|
88
|
-
/// // Context changed to table table and right-to-left
|
89
|
-
/// }
|
90
|
-
///
|
91
|
-
/// @include reset-all;
|
92
|
-
/// // Context is reset to block display and left-to-right
|
93
|
-
|
94
|
-
@mixin reset-all {
|
95
|
-
@include reset-display;
|
96
|
-
@include reset-layout-direction;
|
97
|
-
}
|
@@ -1,42 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
@mixin grid-column-gradient($values...) {
|
4
|
-
background-image: -webkit-linear-gradient(left, $values);
|
5
|
-
background-image: -moz-linear-gradient(left, $values);
|
6
|
-
background-image: -ms-linear-gradient(left, $values);
|
7
|
-
background-image: -o-linear-gradient(left, $values);
|
8
|
-
background-image: unquote("linear-gradient(to left, #{$values})");
|
9
|
-
}
|
10
|
-
|
11
|
-
@if $visual-grid == true or $visual-grid == yes {
|
12
|
-
body:before {
|
13
|
-
@include grid-column-gradient(gradient-stops($grid-columns));
|
14
|
-
content: "";
|
15
|
-
display: inline-block;
|
16
|
-
height: 100%;
|
17
|
-
left: 0;
|
18
|
-
margin: 0 auto;
|
19
|
-
max-width: $max-width;
|
20
|
-
opacity: $visual-grid-opacity;
|
21
|
-
pointer-events: none;
|
22
|
-
position: fixed;
|
23
|
-
right: 0;
|
24
|
-
width: 100%;
|
25
|
-
|
26
|
-
@if $visual-grid-index == back {
|
27
|
-
z-index: -1;
|
28
|
-
}
|
29
|
-
|
30
|
-
@else if $visual-grid-index == front {
|
31
|
-
z-index: 9999;
|
32
|
-
}
|
33
|
-
|
34
|
-
@each $breakpoint in $visual-grid-breakpoints {
|
35
|
-
@if $breakpoint {
|
36
|
-
@include media($breakpoint) {
|
37
|
-
@include grid-column-gradient(gradient-stops($grid-columns));
|
38
|
-
}
|
39
|
-
}
|
40
|
-
}
|
41
|
-
}
|
42
|
-
}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Disable all deprecation warnings. Defaults to `false`. Set with a `!global` flag.
|
4
|
-
///
|
5
|
-
/// @type Bool
|
6
|
-
|
7
|
-
$disable-warnings: false !default;
|
8
|
-
|
9
|
-
@mixin -neat-warn($message) {
|
10
|
-
@if $disable-warnings == false {
|
11
|
-
@warn "#{$message}";
|
12
|
-
}
|
13
|
-
}
|
@@ -1,51 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about `modular-scale()` see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with a `!global` flag.
|
4
|
-
///
|
5
|
-
/// @type Number (Unit)
|
6
|
-
|
7
|
-
$column: modular-scale(3, 1em, $golden) !default;
|
8
|
-
|
9
|
-
/// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about `modular-scale()` see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with the `!global` flag.
|
10
|
-
///
|
11
|
-
/// @type Number (Unit)
|
12
|
-
|
13
|
-
$gutter: modular-scale(1, 1em, $golden) !default;
|
14
|
-
|
15
|
-
/// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag.
|
16
|
-
///
|
17
|
-
/// @type Number (Unitless)
|
18
|
-
|
19
|
-
$grid-columns: 12 !default;
|
20
|
-
|
21
|
-
/// Sets the max-width property of the element that includes `outer-container()`. Set with the `!global` flag.
|
22
|
-
///
|
23
|
-
/// @type Number (Unit)
|
24
|
-
///
|
25
|
-
$max-width: 1200px !default;
|
26
|
-
|
27
|
-
/// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag.
|
28
|
-
///
|
29
|
-
/// @type Bool
|
30
|
-
///
|
31
|
-
/// @example css - CSS Output
|
32
|
-
/// html {
|
33
|
-
/// box-sizing: border-box; }
|
34
|
-
///
|
35
|
-
/// *, *::after, *::before {
|
36
|
-
/// box-sizing: inherit;
|
37
|
-
/// }
|
38
|
-
|
39
|
-
$border-box-sizing: true !default;
|
40
|
-
|
41
|
-
/// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag.
|
42
|
-
///
|
43
|
-
/// @type String
|
44
|
-
|
45
|
-
$default-feature: min-width; // Default @media feature for the breakpoint() mixin
|
46
|
-
|
47
|
-
///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag.
|
48
|
-
///
|
49
|
-
///@type String
|
50
|
-
|
51
|
-
$default-layout-direction: LTR !default;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
@charset "UTF-8";
|
2
|
-
|
3
|
-
/// Displays the visual grid when set to true. The overlaid grid may be few pixels off depending on the browser's rendering engine and pixel rounding algorithm. Set with the `!global` flag.
|
4
|
-
///
|
5
|
-
/// @type Bool
|
6
|
-
|
7
|
-
$visual-grid: false !default;
|
8
|
-
|
9
|
-
/// Sets the visual grid color. Set with `!global` flag.
|
10
|
-
///
|
11
|
-
/// @type Color
|
12
|
-
|
13
|
-
$visual-grid-color: #eee !default;
|
14
|
-
|
15
|
-
/// Sets the `z-index` property of the visual grid. Can be `back` (behind content) or `front` (in front of content). Set with `!global` flag.
|
16
|
-
///
|
17
|
-
/// @type String
|
18
|
-
|
19
|
-
$visual-grid-index: back !default;
|
20
|
-
|
21
|
-
/// Sets the opacity property of the visual grid. Set with `!global` flag.
|
22
|
-
///
|
23
|
-
/// @type Number (unitless)
|
24
|
-
|
25
|
-
$visual-grid-opacity: 0.4 !default;
|
26
|
-
|
27
|
-
$visual-grid-breakpoints: () !default;
|
data/assets/js/bundle.js
DELETED
@@ -1,424 +0,0 @@
|
|
1
|
-
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.technologic = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
2
|
-
'use strict';
|
3
|
-
|
4
|
-
var scrollForm = require('./scroll-form');
|
5
|
-
|
6
|
-
scrollForm.init();
|
7
|
-
|
8
|
-
module.exports = scrollForm;
|
9
|
-
|
10
|
-
},{"./scroll-form":3}],2:[function(require,module,exports){
|
11
|
-
"use strict";
|
12
|
-
|
13
|
-
var questions = function questions() {
|
14
|
-
|
15
|
-
var CONTAINER_ID = "container";
|
16
|
-
var CLASS_NAME = "scroll-form__questionset";
|
17
|
-
var ACTIVE_CLASS = "scroll-form__questionset--active";
|
18
|
-
|
19
|
-
return {
|
20
|
-
getContainer: function getContainer() {
|
21
|
-
return document.getElementById(CONTAINER_ID);
|
22
|
-
},
|
23
|
-
getQuestion: function getQuestion(index) {
|
24
|
-
return document.getElementsByClassName(CLASS_NAME)[index];
|
25
|
-
},
|
26
|
-
setActiveQuestion: function setActiveQuestion(index) {
|
27
|
-
var questionList = [].slice.call(document.getElementsByClassName(CLASS_NAME));
|
28
|
-
questionList.forEach(function (elm) {
|
29
|
-
return elm.classList.remove(ACTIVE_CLASS);
|
30
|
-
});
|
31
|
-
this.getQuestion(index).classList.add(ACTIVE_CLASS);
|
32
|
-
}
|
33
|
-
};
|
34
|
-
};
|
35
|
-
|
36
|
-
module.exports = questions();
|
37
|
-
|
38
|
-
},{}],3:[function(require,module,exports){
|
39
|
-
'use strict';
|
40
|
-
|
41
|
-
var scrolling = require('./scrolling');
|
42
|
-
var questions = require('./questions');
|
43
|
-
|
44
|
-
var scrollForm = function scrollForm() {
|
45
|
-
|
46
|
-
// TODO index() = function () {}
|
47
|
-
|
48
|
-
var scroller = void 0;
|
49
|
-
var currentPosition = 0;
|
50
|
-
|
51
|
-
var speed = 400;
|
52
|
-
|
53
|
-
var init = function init() {
|
54
|
-
var container = questions.getContainer();
|
55
|
-
var firstQuestion = questions.getQuestion(0);
|
56
|
-
|
57
|
-
scroller = scrolling.createScroller(container, 0, 0);
|
58
|
-
|
59
|
-
scrolling.scrollTo(scroller, firstQuestion, speed, function () {
|
60
|
-
return questions.setActiveQuestion(0);
|
61
|
-
});
|
62
|
-
};
|
63
|
-
|
64
|
-
var next = function next() {
|
65
|
-
var nextPosition = currentPosition + 1;
|
66
|
-
var newTarget = questions.getQuestion(nextPosition);
|
67
|
-
|
68
|
-
if (newTarget) {
|
69
|
-
scrolling.scrollTo(scroller, newTarget, speed, function () {
|
70
|
-
return questions.setActiveQuestion(nextPosition);
|
71
|
-
});
|
72
|
-
currentPosition += 1;
|
73
|
-
}
|
74
|
-
};
|
75
|
-
|
76
|
-
var prev = function prev() {
|
77
|
-
var prevPosition = currentPosition - 1;
|
78
|
-
var newTarget = questions.getQuestion(prevPosition);
|
79
|
-
|
80
|
-
if (newTarget) {
|
81
|
-
scrolling.scrollTo(scroller, newTarget, speed, function () {
|
82
|
-
return questions.setActiveQuestion(prevPosition);
|
83
|
-
});
|
84
|
-
currentPosition -= 1;
|
85
|
-
}
|
86
|
-
};
|
87
|
-
|
88
|
-
return {
|
89
|
-
init: init,
|
90
|
-
next: next,
|
91
|
-
prev: prev
|
92
|
-
};
|
93
|
-
};
|
94
|
-
|
95
|
-
module.exports = scrollForm();
|
96
|
-
|
97
|
-
},{"./questions":2,"./scrolling":4}],4:[function(require,module,exports){
|
98
|
-
'use strict';
|
99
|
-
|
100
|
-
var zenscroll = require('zenscroll');
|
101
|
-
|
102
|
-
var scrolling = function scrolling() {
|
103
|
-
|
104
|
-
var createScroller = function createScroller(container, speed, offset) {
|
105
|
-
return zenscroll.createScroller(container, speed, offset);
|
106
|
-
};
|
107
|
-
|
108
|
-
var scrollTo = function scrollTo(scroller, element, speed, callback) {
|
109
|
-
scroller.center(element, speed, 0, callback);
|
110
|
-
};
|
111
|
-
|
112
|
-
return {
|
113
|
-
scrollTo: scrollTo,
|
114
|
-
createScroller: createScroller
|
115
|
-
};
|
116
|
-
};
|
117
|
-
|
118
|
-
module.exports = scrolling();
|
119
|
-
|
120
|
-
},{"zenscroll":5}],5:[function(require,module,exports){
|
121
|
-
/**
|
122
|
-
* Zenscroll 3.3.0
|
123
|
-
* https://github.com/zengabor/zenscroll/
|
124
|
-
*
|
125
|
-
* Copyright 2015–2016 Gabor Lenard
|
126
|
-
*
|
127
|
-
* This is free and unencumbered software released into the public domain.
|
128
|
-
*
|
129
|
-
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
130
|
-
* distribute this software, either in source code form or as a compiled
|
131
|
-
* binary, for any purpose, commercial or non-commercial, and by any
|
132
|
-
* means.
|
133
|
-
*
|
134
|
-
* In jurisdictions that recognize copyright laws, the author or authors
|
135
|
-
* of this software dedicate any and all copyright interest in the
|
136
|
-
* software to the public domain. We make this dedication for the benefit
|
137
|
-
* of the public at large and to the detriment of our heirs and
|
138
|
-
* successors. We intend this dedication to be an overt act of
|
139
|
-
* relinquishment in perpetuity of all present and future rights to this
|
140
|
-
* software under copyright law.
|
141
|
-
*
|
142
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
143
|
-
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
144
|
-
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
145
|
-
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
146
|
-
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
147
|
-
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
148
|
-
* OTHER DEALINGS IN THE SOFTWARE.
|
149
|
-
*
|
150
|
-
* For more information, please refer to <http://unlicense.org>
|
151
|
-
*
|
152
|
-
*/
|
153
|
-
|
154
|
-
/*jshint devel:true, asi:true */
|
155
|
-
|
156
|
-
/*global define, module */
|
157
|
-
|
158
|
-
|
159
|
-
(function (root, factory) {
|
160
|
-
if (typeof define === "function" && define.amd) {
|
161
|
-
define([], factory())
|
162
|
-
} else if (typeof module === "object" && module.exports) {
|
163
|
-
module.exports = factory()
|
164
|
-
} else {
|
165
|
-
root.zenscroll = factory()
|
166
|
-
}
|
167
|
-
}(this, function () {
|
168
|
-
"use strict"
|
169
|
-
|
170
|
-
// Detect if the browser already supports native smooth scrolling (e.g., Firefox 36+ and Chrome 49+) and it is enabled:
|
171
|
-
var isNativeSmoothScrollEnabledOn = function (elem) {
|
172
|
-
return ("getComputedStyle" in window) &&
|
173
|
-
window.getComputedStyle(elem)["scroll-behavior"] === "smooth"
|
174
|
-
}
|
175
|
-
|
176
|
-
// Exit if it’s not a browser environment:
|
177
|
-
if (typeof window === "undefined" || !("document" in window)) {
|
178
|
-
return {}
|
179
|
-
}
|
180
|
-
|
181
|
-
var createScroller = function (scrollContainer, defaultDuration, edgeOffset) {
|
182
|
-
|
183
|
-
defaultDuration = defaultDuration || 999 //ms
|
184
|
-
if (!edgeOffset && edgeOffset !== 0) {
|
185
|
-
// When scrolling, this amount of distance is kept from the edges of the scrollContainer:
|
186
|
-
edgeOffset = 9 //px
|
187
|
-
}
|
188
|
-
|
189
|
-
var scrollTimeoutId
|
190
|
-
var setScrollTimeoutId = function (newValue) {
|
191
|
-
scrollTimeoutId = newValue
|
192
|
-
}
|
193
|
-
var docElem = document.documentElement
|
194
|
-
|
195
|
-
var getScrollTop = function () {
|
196
|
-
if (scrollContainer) {
|
197
|
-
return scrollContainer.scrollTop
|
198
|
-
} else {
|
199
|
-
return window.scrollY || docElem.scrollTop
|
200
|
-
}
|
201
|
-
}
|
202
|
-
|
203
|
-
var getViewHeight = function () {
|
204
|
-
if (scrollContainer) {
|
205
|
-
return Math.min(scrollContainer.offsetHeight, window.innerHeight)
|
206
|
-
} else {
|
207
|
-
return window.innerHeight || docElem.clientHeight
|
208
|
-
}
|
209
|
-
}
|
210
|
-
|
211
|
-
var getRelativeTopOf = function (elem) {
|
212
|
-
if (scrollContainer) {
|
213
|
-
return elem.offsetTop
|
214
|
-
} else {
|
215
|
-
return elem.getBoundingClientRect().top + getScrollTop() - docElem.offsetTop
|
216
|
-
}
|
217
|
-
}
|
218
|
-
|
219
|
-
/**
|
220
|
-
* Immediately stops the current smooth scroll operation
|
221
|
-
*/
|
222
|
-
var stopScroll = function () {
|
223
|
-
clearTimeout(scrollTimeoutId)
|
224
|
-
setScrollTimeoutId(0)
|
225
|
-
}
|
226
|
-
|
227
|
-
/**
|
228
|
-
* Scrolls to a specific vertical position in the document.
|
229
|
-
*
|
230
|
-
* @param {endY} The vertical position within the document.
|
231
|
-
* @param {duration} Optionally the duration of the scroll operation.
|
232
|
-
* If 0 or not provided it is automatically calculated based on the
|
233
|
-
* distance and the default duration.
|
234
|
-
* @param {onDone} Callback function to be invoken once the scroll finishes.
|
235
|
-
*/
|
236
|
-
var scrollToY = function (endY, duration, onDone) {
|
237
|
-
stopScroll()
|
238
|
-
if (isNativeSmoothScrollEnabledOn(scrollContainer ? scrollContainer : document.body)) {
|
239
|
-
(scrollContainer || window).scrollTo(0, endY)
|
240
|
-
if (onDone) {
|
241
|
-
onDone()
|
242
|
-
}
|
243
|
-
} else {
|
244
|
-
var startY = getScrollTop()
|
245
|
-
var distance = Math.max(endY,0) - startY
|
246
|
-
duration = duration || Math.min(Math.abs(distance), defaultDuration)
|
247
|
-
var startTime = new Date().getTime();
|
248
|
-
(function loopScroll() {
|
249
|
-
setScrollTimeoutId(setTimeout(function () {
|
250
|
-
var p = Math.min((new Date().getTime() - startTime) / duration, 1) // percentage
|
251
|
-
var y = Math.max(Math.floor(startY + distance*(p < 0.5 ? 2*p*p : p*(4 - p*2)-1)), 0)
|
252
|
-
if (scrollContainer) {
|
253
|
-
scrollContainer.scrollTop = y
|
254
|
-
} else {
|
255
|
-
window.scrollTo(0, y)
|
256
|
-
}
|
257
|
-
if (p < 1 && (getViewHeight() + y) < (scrollContainer || docElem).scrollHeight) {
|
258
|
-
loopScroll()
|
259
|
-
} else {
|
260
|
-
setTimeout(stopScroll, 99) // with cooldown time
|
261
|
-
if (onDone) {
|
262
|
-
onDone()
|
263
|
-
}
|
264
|
-
}
|
265
|
-
}, 9))
|
266
|
-
})()
|
267
|
-
}
|
268
|
-
}
|
269
|
-
|
270
|
-
/**
|
271
|
-
* Scrolls to the top of a specific element.
|
272
|
-
*
|
273
|
-
* @param {elem} The element.
|
274
|
-
* @param {duration} Optionally the duration of the scroll operation.
|
275
|
-
* A value of 0 is ignored.
|
276
|
-
* @param {onDone} Callback function to be invoken once the scroll finishes.
|
277
|
-
* @returns {endY} The new vertical scoll position that will be valid once the scroll finishes.
|
278
|
-
*/
|
279
|
-
var scrollToElem = function (elem, duration, onDone) {
|
280
|
-
var endY = getRelativeTopOf(elem) - edgeOffset
|
281
|
-
scrollToY(endY, duration, onDone)
|
282
|
-
return endY
|
283
|
-
}
|
284
|
-
|
285
|
-
/**
|
286
|
-
* Scrolls an element into view if necessary.
|
287
|
-
*
|
288
|
-
* @param {elem} The element.
|
289
|
-
* @param {duration} Optionally the duration of the scroll operation.
|
290
|
-
* A value of 0 is ignored.
|
291
|
-
* @param {onDone} Callback function to be invoken once the scroll finishes.
|
292
|
-
*/
|
293
|
-
var scrollIntoView = function (elem, duration, onDone) {
|
294
|
-
var elemHeight = elem.getBoundingClientRect().height
|
295
|
-
var elemTop = getRelativeTopOf(elem)
|
296
|
-
var elemBottom = elemTop + elemHeight
|
297
|
-
var containerHeight = getViewHeight()
|
298
|
-
var containerTop = getScrollTop()
|
299
|
-
var containerBottom = containerTop + containerHeight
|
300
|
-
if ((elemTop - edgeOffset) < containerTop || (elemHeight + edgeOffset) > containerHeight) {
|
301
|
-
// Element is clipped at top or is higher than screen.
|
302
|
-
scrollToElem(elem, duration, onDone)
|
303
|
-
} else if ((elemBottom + edgeOffset) > containerBottom) {
|
304
|
-
// Element is clipped at the bottom.
|
305
|
-
scrollToY(elemBottom - containerHeight + edgeOffset, duration, onDone)
|
306
|
-
} else if (onDone) {
|
307
|
-
onDone()
|
308
|
-
}
|
309
|
-
}
|
310
|
-
|
311
|
-
/**
|
312
|
-
* Scrolls to the center of an element.
|
313
|
-
*
|
314
|
-
* @param {elem} The element.
|
315
|
-
* @param {duration} Optionally the duration of the scroll operation.
|
316
|
-
* @param {offset} Optionally the offset of the top of the element from the center of the screen.
|
317
|
-
* A value of 0 is ignored.
|
318
|
-
* @param {onDone} Callback function to be invoken once the scroll finishes.
|
319
|
-
*/
|
320
|
-
var scrollToCenterOf = function (elem, duration, offset, onDone) {
|
321
|
-
scrollToY(
|
322
|
-
Math.max(
|
323
|
-
getRelativeTopOf(elem) - getViewHeight()/2 + (offset || elem.getBoundingClientRect().height/2),
|
324
|
-
0
|
325
|
-
),
|
326
|
-
duration,
|
327
|
-
onDone
|
328
|
-
)
|
329
|
-
}
|
330
|
-
|
331
|
-
/**
|
332
|
-
* Changes default settings for this scroller.
|
333
|
-
*
|
334
|
-
* @param {newDefaultDuration} New value for default duration, used for each scroll method by default.
|
335
|
-
* Ignored if 0 or falsy.
|
336
|
-
* @param {newEdgeOffset} New value for the edge offset, used by each scroll method by default.
|
337
|
-
*/
|
338
|
-
var setup = function (newDefaultDuration, newEdgeOffset) {
|
339
|
-
if (newDefaultDuration) {
|
340
|
-
defaultDuration = newDefaultDuration
|
341
|
-
}
|
342
|
-
if (newEdgeOffset === 0 || newEdgeOffset) {
|
343
|
-
edgeOffset = newEdgeOffset
|
344
|
-
}
|
345
|
-
}
|
346
|
-
|
347
|
-
return {
|
348
|
-
setup: setup,
|
349
|
-
to: scrollToElem,
|
350
|
-
toY: scrollToY,
|
351
|
-
intoView: scrollIntoView,
|
352
|
-
center: scrollToCenterOf,
|
353
|
-
stop: stopScroll,
|
354
|
-
moving: function () { return !!scrollTimeoutId },
|
355
|
-
getY: getScrollTop
|
356
|
-
}
|
357
|
-
|
358
|
-
}
|
359
|
-
|
360
|
-
// Create a scroller for the browser window, omitting parameters:
|
361
|
-
var defaultScroller = createScroller()
|
362
|
-
|
363
|
-
// Create listeners for the documentElement only & exclude IE8-
|
364
|
-
if ("addEventListener" in window && !(isNativeSmoothScrollEnabledOn(document.body) || window.noZensmooth)) {
|
365
|
-
if ("scrollRestoration" in history) {
|
366
|
-
history.scrollRestoration = "manual"
|
367
|
-
window.addEventListener("popstate", function (event) {
|
368
|
-
if (event.state && "scrollY" in event.state) {
|
369
|
-
defaultScroller.toY(event.state.scrollY)
|
370
|
-
}
|
371
|
-
}, false)
|
372
|
-
}
|
373
|
-
var replaceUrl = function (hash, newY) {
|
374
|
-
try {
|
375
|
-
history.replaceState({scrollY:defaultScroller.getY()}, "") // remember the scroll position before scrolling
|
376
|
-
history.pushState({scrollY:newY}, "", window.location.href.split("#")[0] + hash) // remember the new scroll position (which will be after scrolling)
|
377
|
-
} catch (e) {
|
378
|
-
// To avoid the Security exception in Chrome when the page was opened via the file protocol, e.g., file://index.html
|
379
|
-
}
|
380
|
-
}
|
381
|
-
window.addEventListener("click", function (event) {
|
382
|
-
var anchor = event.target
|
383
|
-
while (anchor && anchor.tagName !== "A") {
|
384
|
-
anchor = anchor.parentNode
|
385
|
-
}
|
386
|
-
// Only handle links that were clicked with the primary button, without modifier keys:
|
387
|
-
if (!anchor || event.which !== 1 || event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {
|
388
|
-
return
|
389
|
-
}
|
390
|
-
var href = anchor.getAttribute("href") || ""
|
391
|
-
if (href.indexOf("#") === 0) {
|
392
|
-
if (href === "#") {
|
393
|
-
event.preventDefault()
|
394
|
-
defaultScroller.toY(0)
|
395
|
-
replaceUrl("", 0)
|
396
|
-
} else {
|
397
|
-
var targetId = anchor.hash.substring(1)
|
398
|
-
var targetElem = document.getElementById(targetId)
|
399
|
-
if (targetElem) {
|
400
|
-
event.preventDefault()
|
401
|
-
replaceUrl("#" + targetId, defaultScroller.to(targetElem))
|
402
|
-
}
|
403
|
-
}
|
404
|
-
}
|
405
|
-
}, false)
|
406
|
-
}
|
407
|
-
|
408
|
-
return {
|
409
|
-
// Expose the "constructor" that can create a new scroller:
|
410
|
-
createScroller: createScroller,
|
411
|
-
// Surface the methods of the default scroller:
|
412
|
-
setup: defaultScroller.setup,
|
413
|
-
to: defaultScroller.to,
|
414
|
-
toY: defaultScroller.toY,
|
415
|
-
intoView: defaultScroller.intoView,
|
416
|
-
center: defaultScroller.center,
|
417
|
-
stop: defaultScroller.stop,
|
418
|
-
moving: defaultScroller.moving
|
419
|
-
}
|
420
|
-
|
421
|
-
}));
|
422
|
-
|
423
|
-
},{}]},{},[1])(1)
|
424
|
-
});
|