@iris.interactive/handcook 9.0.2-alpha → 9.0.3-alpha

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.
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 21/02/2022 09:57
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import{Fancybox as e}from"@fancyapps/ui";import"@fancyapps/ui/dist/fancybox.css";import"./lightbox.component.scss";import t from"../../enumerators/element.enum";export class HcLightbox{constructor(o=t.lightbox,r={}){o===t.lightbox&&Object.assign(r,{groupAttr:t.lightboxAttr,l10n:this.getTranslation()}),e.bind(o,r),this.attachEventToShowButton()}attachEventToShowButton(){for(let e of document.querySelectorAll("[data-hc-lightbox-show]"))e.addEventListener("click",t=>{t.preventDefault(),document.querySelector(`${e.getAttribute("href")} img`).click()})}getTranslation(){let e=document.querySelector("html")?.getAttribute("lang");return"string"==typeof e&&!1!==e.indexOf("fr-FR")?{CLOSE:"Fermer",NEXT:"Suivant",PREV:"Pr\xe9c\xe9dent",MODAL:"Vous pouvez fermer la modal avec la touche echap",ERROR:"Quelque chose c'est mal pass\xe9. Merci d'essayer plus tard\n",IMAGE_ERROR:"Image introuvable",ELEMENT_NOT_FOUND:"\xc9lement HTML introuvable",AJAX_NOT_FOUND:"Erreur de chargement AJAX : Introuvable",AJAX_FORBIDDEN:"Erreur de chargement AJAX : Interdit",IFRAME_ERROR:"Erreur du chargement de la page",TOGGLE_ZOOM:"Zoome/dezoome",TOGGLE_THUMBS:"Affiche/cache les miniatures",TOGGLE_SLIDESHOW:"Active/d\xe9sactive le d\xe9filement automatique",TOGGLE_FULLSCREEN:"Bascule le mode plein \xe9cran",DOWNLOAD:"T\xe9l\xe9charger"}:{CLOSE:"Close",NEXT:"Next",PREV:"Previous",MODAL:"You can close this modal content with the ESC key",ERROR:"Something Went Wrong, Please Try Again Later",IMAGE_ERROR:"Image Not Found",ELEMENT_NOT_FOUND:"HTML Element Not Found",AJAX_NOT_FOUND:"Error Loading AJAX : Not Found",AJAX_FORBIDDEN:"Error Loading AJAX : Forbidden",IFRAME_ERROR:"Error Loading Page",TOGGLE_ZOOM:"Toggle zoom level",TOGGLE_THUMBS:"Toggle thumbnails",TOGGLE_SLIDESHOW:"Toggle slideshow",TOGGLE_FULLSCREEN:"Toggle full-screen mode",DOWNLOAD:"Download"}}}let hc_lightbox=(e=t.lightbox,o={})=>new HcLightbox(e,o);export default hc_lightbox;
14
+ */import{Fancybox as t}from"@fancyapps/ui";import"@fancyapps/ui/dist/fancybox/fancybox.css";import"./lightbox.component.scss";import o from"../../enumerators/element.enum";export class HcLightbox{constructor(e=o.lightbox,c={}){e===o.lightbox&&Object.assign(c,{groupAttr:o.lightboxAttr,l10n:o.lightboxl10n}),t.bind(e,c),this.attachEventToShowButton()}attachEventToShowButton(){for(let t of document.querySelectorAll("[data-hc-lightbox-show]"))t.addEventListener("click",o=>{o.preventDefault(),document.querySelector(`${t.getAttribute("href")} img`).click()})}}let hc_lightbox=(t=o.lightbox,e={})=>new HcLightbox(t,e);export default hc_lightbox;
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 01/02/2022 11:01
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */import{Fancybox as t}from"@fancyapps/ui";import e from"../../enumerators/element.enum";import"@fancyapps/ui/dist/fancybox.css";import"./modal.component.scss";export class HcModal{options={};constructor(t=e.modal,o={}){this.initOptions(),this.initElements(t,o)}initOptions(){this.options={src:"",type:"inline",parentEl:null,autoFocus:!1}}initElements(o,s){for(let n of document.querySelectorAll(o)){this.initOptions(),Object.assign(this.options,s),this.options.src=""!==this.options.src?this.options.src:n.hasAttribute("href")?n.getAttribute("href"):n.hasAttribute("data-src")?n.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):n.hasAttribute("data-hc-modal-parent")?document.querySelector(n.getAttribute("data-hc-modal-parent")):null,this.options.autoFocus=!!n.hasAttribute("data-hc-modal-autofocus");let o=`${e.modal}[${n.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;t.bind(o,this.bindFancyboxEvents(this.options))}for(let t of document.querySelectorAll(e.modalClose))t.addEventListener("click",t=>{t.preventDefault();let e=""===t.currentTarget.dataset.hcModalClose||t.currentTarget.dataset.hcModalClose;HcModal.close(e)})}bindFancyboxEvents(t={}){return Object.assign({},t,{on:HcModal.fancyboxEventHandlers()})}static show(e){t.show([e],{on:HcModal.fancyboxEventHandlers()})}static close(e){t.close(e),document.dispatchEvent(HcModal.hideEvent())}static showEvent(t={}){return new CustomEvent("show.hc.modal",{detail:t})}static hideEvent(t={}){return new CustomEvent("hide.hc.modal",{detail:t})}static fancyboxEventHandlers(){return{done:t=>{let e=t.getSlide()||{};document.dispatchEvent(HcModal.showEvent({src:e.src,type:e.type}))},closing:t=>{let e=t.getSlide()||{};document.dispatchEvent(HcModal.hideEvent({src:e.src,type:e.type})),document.activeElement?.blur()}}}}let hc_modal=(t,e)=>new HcModal(t,e);export default hc_modal;
14
+ */import{Fancybox as t}from"@fancyapps/ui";import e from"../../enumerators/element.enum";import"@fancyapps/ui/dist/fancybox/fancybox.css";import"./modal.component.scss";export class HcModal{options={};constructor(t=e.modal,o={}){this.initOptions(),this.initElements(t,o)}initOptions(){this.options={src:"",type:"inline",parentEl:null,autoFocus:!0,trapFocus:!0,l10n:e.modall10n}}initElements(o,s){for(let n of document.querySelectorAll(o)){this.initOptions(),Object.assign(this.options,s),this.options.src=""!==this.options.src?this.options.src:n.hasAttribute("href")?n.getAttribute("href"):n.hasAttribute("data-src")?n.dataset.src:"",this.options.parentEl=null!==this.options.parentEl?document.querySelector(this.options.parentEl):n.hasAttribute("data-hc-modal-parent")?document.querySelector(n.getAttribute("data-hc-modal-parent")):null,this.options.autoFocus="false"!==n.getAttribute("data-hc-modal-autofocus");let o=`${e.modal}[${n.hasAttribute("data-src")?"data-src":"href"}="${this.options.src}"]`;t.bind(o,this.bindFancyboxEvents(this.options))}for(let t of document.querySelectorAll(e.modalClose))t.addEventListener("click",t=>{t.preventDefault();let e=""===t.currentTarget.dataset.hcModalClose||t.currentTarget.dataset.hcModalClose;HcModal.close(e)})}bindFancyboxEvents(t={}){return Object.assign({},t,{on:HcModal.fancyboxEventHandlers()})}static show(e){t.show([e],{on:HcModal.fancyboxEventHandlers()})}static close(e){t.close(e),document.dispatchEvent(HcModal.hideEvent())}static showEvent(t={}){return new CustomEvent("show.hc.modal",{detail:t})}static hideEvent(t={}){return new CustomEvent("hide.hc.modal",{detail:t})}static fancyboxEventHandlers(){return{done:t=>{let e=t.getSlide()||{};document.dispatchEvent(HcModal.showEvent({src:e.src,type:e.type}))},closing:t=>{let e=t.getSlide()||{};document.dispatchEvent(HcModal.hideEvent({src:e.src,type:e.type})),document.activeElement?.blur()},close:t=>{let e=t.getSlide()||{};document.dispatchEvent(HcModal.hideEvent({src:e.src,type:e.type}))}}}}let hc_modal=(t,e)=>new HcModal(t,e);export default hc_modal;
@@ -11,4 +11,4 @@
11
11
  * @author Lucas ROCHE
12
12
  * @date 01/02/2022 10:36
13
13
  * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
- */export default class a{static tooltip="[data-hc-tooltip], [data-hc-popover]";static popover="[data-hc-popover]";static scrollSmooth="[data-hc-smooth-scroll]";static modal="[data-hc-modal]";static modalClose="[data-hc-modal-close]";static lightboxAttr="data-hc-lightbox";static lightbox=`[${a.lightboxAttr}]`;static dropdown="[data-hc-dropdown]";static collapse="[data-hc-collapse]";static collapseItem="[data-hc-collapse-item]";static popin="[data-hc-popin]";static tab="[data-hc-tab]";static toggle="[data-hc-toggle]";static slider="[data-hc-slider]";static scrollspy="[data-hc-scrollspy]";static scrollspyNav="[data-hc-scrollspy-nav]";static scrollspyNavItem="[data-hc-scrollspy-nav-item]";static scrollspyNavItemHref="[data-hc-scrollspy-nav-item-href]";static scrollReveal="[data-hc-scroll-reveal]";static scrollRevealDisable="[data-hc-noscroll-reveal]";static scrollRevealParent="[data-hc-scroll-reveal-parent]";static scrollRevealChildren=`${a.scrollRevealParent} > *:not(${a.scrollRevealDisable}):not(${a.scrollRevealParent}):not(${a.scrollReveal})`;static overlay="[data-hc-overlay]"}
14
+ */export default class a{static tooltip="[data-hc-tooltip], [data-hc-popover]";static popover="[data-hc-popover]";static scrollSmooth="[data-hc-smooth-scroll]";static modal="[data-hc-modal]";static modalClose="[data-hc-modal-close]";static lightboxAttr="data-hc-lightbox";static lightbox=`[${a.lightboxAttr}]`;static dropdown="[data-hc-dropdown]";static collapse="[data-hc-collapse]";static collapseItem="[data-hc-collapse-item]";static popin="[data-hc-popin]";static tab="[data-hc-tab]";static toggle="[data-hc-toggle]";static slider="[data-hc-slider]";static scrollspy="[data-hc-scrollspy]";static scrollspyNav="[data-hc-scrollspy-nav]";static scrollspyNavItem="[data-hc-scrollspy-nav-item]";static scrollspyNavItemHref="[data-hc-scrollspy-nav-item-href]";static scrollReveal="[data-hc-scroll-reveal]";static scrollRevealDisable="[data-hc-noscroll-reveal]";static scrollRevealParent="[data-hc-scroll-reveal-parent]";static scrollRevealChildren=`${a.scrollRevealParent} > *:not(${a.scrollRevealDisable}):not(${a.scrollRevealParent}):not(${a.scrollReveal})`;static overlay="[data-hc-overlay]";static commonFancyboxl10n={CLOSE:IRISCollectionTheme.translate?.modal.close??"Fermer la modale",NEXT:IRISCollectionTheme.translate?.modal.next??"Suivant",PREV:IRISCollectionTheme.translate?.modal.prev??"Pr\xe9c\xe9dent",ERROR:IRISCollectionTheme.translate?.modal.error??"Quelque chose c'est mal pass\xe9. Merci d'essayer plus tard\n",IMAGE_ERROR:IRISCollectionTheme.translate?.modal.imageError??"Image introuvable",ELEMENT_NOT_FOUND:IRISCollectionTheme.translate?.modal.elementNotFound??"\xc9lement HTML introuvable",AJAX_NOT_FOUND:IRISCollectionTheme.translate?.modal.ajaxNotFound??"Erreur de chargement AJAX : Introuvable",AJAX_FORBIDDEN:IRISCollectionTheme.translate?.modal.ajaxForbidden??"Erreur de chargement AJAX : Interdit",IFRAME_ERROR:IRISCollectionTheme.translate?.modal.iframeError??"Erreur du chargement de la page",TOGGLE_ZOOM:IRISCollectionTheme.translate?.modal.toggleZoom??"Modifier le niveau de zoom",TOGGLE_THUMBS:IRISCollectionTheme.translate?.modal.toggleThumbs??"Afficher/cacher les miniatures",TOGGLE_SLIDESHOW:IRISCollectionTheme.translate?.modal.toggleSlideshow??"Activer/d\xe9sactiver le d\xe9filement automatique",TOGGLE_FULLSCREEN:IRISCollectionTheme.translate?.modal.toggleFullscreen??"Mode plein \xe9cran",DOWNLOAD:IRISCollectionTheme.translate?.modal.download??"T\xe9l\xe9charger"};static modall10n={...a.commonFancyboxl10n,MODAL:IRISCollectionTheme.translate?.modal.modal??"Vous pouvez fermer cette modale avec la touche \xc9chap"};static lightboxl10n={...a.commonFancyboxl10n,MODAL:IRISCollectionTheme.translate?.lightbox.modal??"Slider avec une liste d'images"}}
@@ -1,7 +1,5 @@
1
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
2
  * webpackChunkName: "scripts/hc_swiper_v11"
3
- * webpackMode: "weak"
4
3
  */"swiper-11/bundle");return await import(/* @preserve
5
4
  * webpackChunkName: "styles/hc_swiper_v11"
6
- * webpackMode: "weak"
7
5
  */"swiper-11/css/bundle"),new t(...e)}}
@@ -65,12 +65,13 @@ $viewport-borders: (
65
65
 
66
66
  /* Breakpoint
67
67
  / ================================================== */
68
- $breakpoint-desktop: 1000.1px; // min-width
69
- $breakpoint-xlarge: $container / (1-(($margin-xlarge/100%) * 2)) + 1; // min-width
70
- $breakpoint-large: $container / (1-(($margin-xlarge/100%) * 2)); // max-width
71
- $breakpoint-medium: 1000px; // max-width
72
- $breakpoint-small: 650px; // max-width
73
- $breakpoint-xsmall: 370px; // max-width
68
+ $breakpoint-desktop: 1000.1px;
69
+ $breakpoint-xlarge: $container / (1-(($margin-xlarge/100%) * 2)) + 1;
70
+ $breakpoint-large: $container / (1-(($margin-xlarge/100%) * 2));
71
+ $breakpoint-xmedium: 1024px;
72
+ $breakpoint-medium: 1000px;
73
+ $breakpoint-small: 650px;
74
+ $breakpoint-xsmall: 370px;
74
75
 
75
76
  /* Global
76
77
  / ================================================== */
@@ -16,7 +16,7 @@
16
16
 
17
17
  /* Breakpoints
18
18
  /* ============================================= */
19
- @mixin breakpoint($point) {
19
+ @mixin breakpoint($point, $type: max-width) {
20
20
 
21
21
  @if $point == "xlarge" {
22
22
  @media screen and (min-width: #{variables.$breakpoint-xlarge}) {
@@ -27,23 +27,27 @@
27
27
  @content;
28
28
  }
29
29
  } @else if $point == "large" {
30
- @media screen and (max-width: #{variables.$breakpoint-large}) {
30
+ @media screen and (#{$type}: #{variables.$breakpoint-large}) {
31
+ @content;
32
+ }
33
+ } @else if $point == "xmedium" {
34
+ @media screen and (#{$type}: #{variables.$breakpoint-xmedium}) {
31
35
  @content;
32
36
  }
33
37
  } @else if $point == "medium" {
34
- @media screen and (max-width: #{variables.$breakpoint-medium}) {
38
+ @media screen and (#{$type}: #{variables.$breakpoint-medium}) {
35
39
  @content;
36
40
  }
37
41
  } @else if $point == "small" {
38
- @media screen and (max-width: #{variables.$breakpoint-small}) {
42
+ @media screen and (#{$type}: #{variables.$breakpoint-small}) {
39
43
  @content;
40
44
  }
41
45
  } @else if $point == "xsmall" {
42
- @media screen and (max-width: #{variables.$breakpoint-xsmall}) {
46
+ @media screen and (#{$type}: #{variables.$breakpoint-xsmall}) {
43
47
  @content;
44
48
  }
45
49
  } @else {
46
- @media screen and (max-width: $point) {
50
+ @media screen and (#{$type}: $point) {
47
51
  @content;
48
52
  }
49
53
  }