@iris.interactive/handcook 8.0.0-alpha.3 → 8.0.0-alpha.5

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.
@@ -1,14 +1 @@
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 22/02/2022 14:16
13
- * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import a from"vanilla-lazyload";export class HcLazyload{static instance;constructor(t={}){let c=Object.assign({elements_selector:"[data-hc-src], [data-hc-bg], [data-hc-bg-hidpi], [data-hc-srcset]",data_src:"hc-src",data_bg:"hc-bg",data_bg_hidpi:"hc-bg-hidpi",data_srcset:"hc-srcset"},t);this.lazyLoadInstance=new a(c)}static getInstance(a={}){return HcLazyload.instance||(HcLazyload.instance=new HcLazyload(a)),HcLazyload.instance.lazyLoadInstance}static update(a={}){let t=HcLazyload.getInstance(a);t&&"function"==typeof t.update&&t.update()}static loadAll(a={}){let t=HcLazyload.getInstance(a);t&&"function"==typeof t.loadAll&&t.loadAll()}}let hc_lazyload=(a={})=>HcLazyload.getInstance(a);export default hc_lazyload;
1
+ export class HcLazyload{static instance;constructor(){HcLazyload.init()}static init(){let t=document.querySelectorAll("[data-hc-src]");for(let e=0;e<t.length;e++){let a=t[e];a.setAttribute("loading","lazy"),a.setAttribute("src",a.getAttribute("data-hc-src")),a.removeAttribute("data-hc-src")}let e=document.querySelectorAll("[data-hc-srcset]");for(let t=0;t<e.length;t++){let a=e[t];a.setAttribute("srcset",a.getAttribute("data-hc-srcset")),a.removeAttribute("data-hc-srcset")}let a=new IntersectionObserver((t,e)=>{for(let a=0;a<t.length;a++){let c=t[a];if(c.isIntersecting){let t=c.target;t.style.backgroundImage=`url(${t.getAttribute("data-hc-bg")})`,e.unobserve(t),t.removeAttribute("data-hc-bg")}}},{root:null,rootMargin:"200px"}),c=document.querySelectorAll("[data-hc-bg]");for(let t=0;t<c.length;t++)a.observe(c[t])}static getInstance(){HcLazyload.instance||(HcLazyload.instance=new HcLazyload)}static update(){HcLazyload.instance?HcLazyload.init():HcLazyload.instance=new HcLazyload}static loadAll(){HcLazyload.instance?HcLazyload.init():HcLazyload.instance=new HcLazyload}}let hc_lazyload=function(){return HcLazyload.getInstance()};export default hc_lazyload;
@@ -58,7 +58,7 @@
58
58
 
59
59
  /* Text icon
60
60
  /* ============================================= */
61
- @mixin text-icon($icon: '', $format: '', $alignment: '', $icon-position: before) {
61
+ @mixin text-icon($icon: '', $format: '', $alignment: '', $icon-position: before, $font: 'customer-font') {
62
62
  display: inline-flex;
63
63
  align-items: center;
64
64
 
@@ -79,7 +79,7 @@
79
79
  @if $icon != '' {
80
80
  &:#{$icon-position} {
81
81
  color: #{variables.$icon-color};
82
- @include fi(#{$icon});
82
+ @include fi(#{$icon}, #{$font});
83
83
  }
84
84
  }
85
85
 
@@ -1,7 +0,0 @@
1
- export default class e{constructor(){throw Error("Use `await Swiper.create()` instead of `new Swiper()`")}static async create(...e){let{default:t}=await import(/* @preserve
2
- * webpackChunkName: "scripts/hc_swiper_v8"
3
- * webpackMode: "weak"
4
- */"swiper-8/bundle");return await import(/* @preserve
5
- * webpackChunkName: "styles/hc_swiper_v8"
6
- * webpackMode: "weak"
7
- */"swiper-8/css/bundle"),new t(...e)}}