@iris.interactive/handcook 2.9.25 → 2.9.26

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.
@@ -0,0 +1,46 @@
1
+ /*
2
+ * IRIS Interactive
3
+ *
4
+ * NOTICE OF LICENSE
5
+ *
6
+ * This source file is no subject to a specific license
7
+ * but it belongs to the company IRIS Interactive.
8
+ * You can contact IRIS Interactive at the following
9
+ * address: contact@iris-interactive.fr
10
+ *
11
+ * @author Lucas ROCHE
12
+ * @date 01/02/2022 11:01
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */
15
+
16
+ import sal from 'sal.js'
17
+ import 'sal.js/dist/sal.css';
18
+ import './scroll-reveal.component.scss';
19
+
20
+ export class HcScrollReveal {
21
+
22
+ constructor() {
23
+ const parents = document.querySelectorAll('[data-hc-scroll-reveal-parent]');
24
+
25
+ parents.forEach( parent => {
26
+ const animation = parent.getAttribute('data-hc-scroll-reveal-parent');
27
+
28
+ Array.prototype.forEach.call(parent.children, child => {
29
+ if (!child.hasAttribute('data-hc-noscroll-reveal')) {
30
+ child.setAttribute('data-hc-scroll-reveal', animation);
31
+ }
32
+ });
33
+ });
34
+
35
+ sal({
36
+ threshold: 0.1,
37
+ selector: '[data-hc-scroll-reveal]',
38
+ animateClassName: 'scroll-reveal-animate'
39
+ });
40
+ }
41
+ }
42
+
43
+ const hc_scroll_reveal = function () {
44
+ return new HcScrollReveal();
45
+ }
46
+ export default hc_scroll_reveal;
@@ -0,0 +1,174 @@
1
+ /**
2
+ * Settings
3
+ */
4
+
5
+ $scroll-reveal-animation-duration: 0.4s !default;
6
+ $scroll-reveal-animation-delay: 0s !default;
7
+ $scroll-reveal-slide-offset: 20% !default;
8
+ $scroll-reveal-zoom-in-scale: 0.5 !default;
9
+ $scroll-reveal-zoom-out-scale: 1.1 !default;
10
+ $scroll-reveal-flip-rotate: 91deg !default;
11
+
12
+ /**
13
+ * Easings
14
+ */
15
+
16
+ $scroll-reveal-easings: (
17
+ linear: linear,
18
+ ease: ease,
19
+ ease-in: ease-in,
20
+ ease-out: ease-out,
21
+ ease-in-out: ease-in-out,
22
+
23
+ ease-in-cubic: cubic-bezier(.55, .055, .675, .19),
24
+ ease-out-cubic: cubic-bezier(.215, .61, .355, 1),
25
+ ease-in-out-cubic: cubic-bezier(.645, .045, .355, 1),
26
+
27
+ ease-in-circ: cubic-bezier(.6, .04, .98, .335),
28
+ ease-out-circ: cubic-bezier(.075, .82, .165, 1),
29
+ ease-in-out-circ: cubic-bezier(.785, .135, .15, .86),
30
+
31
+ ease-in-expo: cubic-bezier(.95, .05, .795, .035),
32
+ ease-out-expo: cubic-bezier(.19, 1, .22, 1),
33
+ ease-in-out-expo: cubic-bezier(1, 0, 0, 1),
34
+
35
+ ease-in-quad: cubic-bezier(.55, .085, .68, .53),
36
+ ease-out-quad: cubic-bezier(.25, .46, .45, .94),
37
+ ease-in-out-quad: cubic-bezier(.455, .03, .515, .955),
38
+
39
+ ease-in-quart: cubic-bezier(.895, .03, .685, .22),
40
+ ease-out-quart: cubic-bezier(.165, .84, .44, 1),
41
+ ease-in-out-quart: cubic-bezier(.77, 0, .175, 1),
42
+
43
+ ease-in-quint: cubic-bezier(.755, .05, .855, .06),
44
+ ease-out-quint: cubic-bezier(.23, 1, .32, 1),
45
+ ease-in-out-quint: cubic-bezier(.86, 0, .07, 1),
46
+
47
+ ease-in-sine: cubic-bezier(.47, 0, .745, .715),
48
+ ease-out-sine: cubic-bezier(.39, .575, .565, 1),
49
+ ease-in-out-sine: cubic-bezier(.445, .05, .55, .95),
50
+
51
+ ease-in-back: cubic-bezier(.6, -.28, .735, .045),
52
+ ease-out-back: cubic-bezier(.175, .885, .32, 1.275),
53
+ ease-in-out-back: cubic-bezier(.68, -.55, .265, 1.55)
54
+ );
55
+
56
+ /**
57
+ * Core
58
+ */
59
+
60
+ [data-hc-scroll-reveal] {
61
+ transition-duration: $scroll-reveal-animation-duration;
62
+ transition-delay: $scroll-reveal-animation-delay;
63
+ transition-duration: var(--hc-scroll-revea-duration, $scroll-reveal-animation-duration);
64
+ transition-delay: var(--hc-scroll-reveal-delay, $scroll-reveal-animation-delay);
65
+ transition-timing-function: var(--hc-scroll-revea-easing, map-get($scroll-reveal-easings, 'ease'));
66
+ }
67
+
68
+ @for $i from 4 through 40 {
69
+ [data-hc-scroll-reveal][data-hc-scroll-reveal-duration='#{$i * 50}'] {
70
+ transition-duration: #{$i * 0.05}s;
71
+ }
72
+ }
73
+
74
+ @for $i from 1 through 20 {
75
+ [data-hc-scroll-reveal][data-hc-scroll-reveal-delay='#{$i * 50}'] {
76
+ transition-delay: #{$i * 0.05}s;
77
+ }
78
+ }
79
+
80
+ @each $key, $value in $scroll-reveal-easings {
81
+ [data-hc-scroll-reveal][data-hc-scroll-reveal-easing='#{$key}'] {
82
+ transition-timing-function: $value;
83
+ }
84
+ }
85
+
86
+ /**
87
+ * Animations
88
+ */
89
+
90
+ // Fade
91
+ [data-hc-scroll-reveal|='fade'] {
92
+ opacity: 0;
93
+ transition-property: opacity;
94
+ }
95
+
96
+ [data-hc-scroll-reveal|='fade'].scroll-reveal-animate,
97
+ body.sal-disabled [data-hc-scroll-reveal|='fade'] {
98
+ opacity: 1;
99
+ }
100
+
101
+ // Slide
102
+ [data-hc-scroll-reveal|='slide'] {
103
+ opacity: 0;
104
+ transition-property: opacity, transform;
105
+ }
106
+
107
+ [data-hc-scroll-reveal='slide-up'] {
108
+ transform: translateY($scroll-reveal-slide-offset);
109
+ }
110
+
111
+ [data-hc-scroll-reveal='slide-down'] {
112
+ transform: translateY(-$scroll-reveal-slide-offset);
113
+ }
114
+
115
+ [data-hc-scroll-reveal='slide-left'] {
116
+ transform: translateX($scroll-reveal-slide-offset);
117
+ }
118
+
119
+ [data-hc-scroll-reveal='slide-right'] {
120
+ transform: translateX(-$scroll-reveal-slide-offset);
121
+ }
122
+
123
+ [data-hc-scroll-reveal|='slide'].scroll-reveal-animate,
124
+ body.sal-disabled [data-hc-scroll-reveal|='slide'] {
125
+ opacity: 1;
126
+ transform: none;
127
+ }
128
+
129
+ // Zoom
130
+ [data-hc-scroll-reveal|='zoom'] {
131
+ opacity: 0;
132
+ transition-property: opacity, transform;
133
+ }
134
+
135
+ [data-hc-scroll-reveal='zoom-in'] {
136
+ transform: scale($scroll-reveal-zoom-in-scale);
137
+ }
138
+
139
+ [data-hc-scroll-reveal='zoom-out'] {
140
+ transform: scale($scroll-reveal-zoom-out-scale);
141
+ }
142
+
143
+ [data-hc-scroll-reveal|='zoom'].scroll-reveal-animate,
144
+ body.sal-disabled [data-hc-scroll-reveal|='zoom'] {
145
+ opacity: 1;
146
+ transform: none;
147
+ }
148
+
149
+ // Flip
150
+ [data-hc-scroll-reveal|='flip'] {
151
+ backface-visibility: hidden;
152
+ transition-property: transform;
153
+ }
154
+
155
+ [data-hc-scroll-reveal='flip-left'] {
156
+ transform: perspective(2000px) rotateY(-$scroll-reveal-flip-rotate);
157
+ }
158
+
159
+ [data-hc-scroll-reveal='flip-right'] {
160
+ transform: perspective(2000px) rotateY($scroll-reveal-flip-rotate);
161
+ }
162
+
163
+ [data-hc-scroll-reveal='flip-up'] {
164
+ transform: perspective(2000px) rotateX(-$scroll-reveal-flip-rotate);
165
+ }
166
+
167
+ [data-hc-scroll-reveal='flip-down'] {
168
+ transform: perspective(2000px) rotateX($scroll-reveal-flip-rotate);
169
+ }
170
+
171
+ [data-hc-scroll-reveal|='flip'].scroll-reveal-animate,
172
+ body.sal-disabled [data-hc-scroll-reveal|='flip'] {
173
+ transform: none;
174
+ }
@@ -1 +1 @@
1
- (()=>{"use strict";var t={812:(t,e,o)=>{function a(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function r(t,e,o){return e&&a(t.prototype,e),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var n=r((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));l(n,"tooltip","[data-hc-tooltip], [data-hc-popover]"),l(n,"popover","[data-hc-popover]"),l(n,"scrollSmooth","[data-hc-smooth-scroll]"),l(n,"modal","[data-hc-modal]"),l(n,"modalClose","[data-hc-modal-close]"),l(n,"lightboxAttr","data-hc-lightbox"),l(n,"lightbox","[".concat(n.lightboxAttr,"]")),l(n,"dropdown","[data-hc-dropdown]"),l(n,"collapse","[data-hc-collapse]"),l(n,"collapseItem","[data-hc-collapse-item]"),l(n,"popin","[data-hc-popin]"),l(n,"tab","[data-hc-tab]"),l(n,"toggle","[data-hc-toggle]"),l(n,"slider","[data-hc-slider]"),l(n,"scrollspy","[data-hc-scrollspy]"),l(n,"scrollspyNav","[data-hc-scrollspy-nav]"),l(n,"scrollspyNavItem","[data-hc-scrollspy-nav-item]")},539:(t,e,o)=>{function a(t,e){for(var o=0;o<e.length;o++){var a=e[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function r(t,e,o){return e&&a(t.prototype,e),o&&a(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var n=r((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}));l(n,"attrHref","data-hc-smooth-scroll-href"),l(n,"attrShift","data-hc-smooth-scroll-shift")}},e={};function o(a){var r=e[a];if(void 0!==r)return r.exports;var l=e[a]={exports:{}};return t[a](l,l.exports,o),l.exports}o.d=(t,e)=>{for(var a in e)o.o(e,a)&&!o.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:e[a]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o(812),o(539)})();
1
+ (()=>{"use strict";var t={812:(t,a,o)=>{function r(t,a,o){return a in t?Object.defineProperty(t,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[a]=o,t}var e=function t(){!function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,t)};r(e,"tooltip","[data-hc-tooltip], [data-hc-popover]"),r(e,"popover","[data-hc-popover]"),r(e,"scrollSmooth","[data-hc-smooth-scroll]"),r(e,"modal","[data-hc-modal]"),r(e,"modalClose","[data-hc-modal-close]"),r(e,"lightboxAttr","data-hc-lightbox"),r(e,"lightbox","[".concat(e.lightboxAttr,"]")),r(e,"dropdown","[data-hc-dropdown]"),r(e,"collapse","[data-hc-collapse]"),r(e,"collapseItem","[data-hc-collapse-item]"),r(e,"popin","[data-hc-popin]"),r(e,"tab","[data-hc-tab]"),r(e,"toggle","[data-hc-toggle]"),r(e,"slider","[data-hc-slider]"),r(e,"scrollspy","[data-hc-scrollspy]"),r(e,"scrollspyNav","[data-hc-scrollspy-nav]"),r(e,"scrollspyNavItem","[data-hc-scrollspy-nav-item]")},539:(t,a,o)=>{function r(t,a,o){return a in t?Object.defineProperty(t,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[a]=o,t}var e=function t(){!function(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}(this,t)};r(e,"attrHref","data-hc-smooth-scroll-href"),r(e,"attrShift","data-hc-smooth-scroll-shift")}},a={};function o(r){var e=a[r];if(void 0!==e)return e.exports;var l=a[r]={exports:{}};return t[r](l,l.exports,o),l.exports}o.d=(t,a)=>{for(var r in a)o.o(a,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:a[r]})},o.o=(t,a)=>Object.prototype.hasOwnProperty.call(t,a),o(812),o(539)})();