@iris.interactive/handcook 2.6.0 → 2.6.1
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.
- package/mix-manifest.json +1 -13
- package/package.json +1 -1
- package/public/scripts/components/collapse/collapse.component.js +76 -1
- package/public/scripts/components/collapse/collapse.component.scss +19 -0
- package/public/scripts/components/dropdown/dropdown.component.js +72 -1
- package/public/scripts/components/dropdown/dropdown.component.scss +48 -0
- package/public/scripts/components/lazyload/lazyload.component.js +28 -1
- package/public/scripts/components/lightbox/lightbox.component.js +36 -1
- package/public/scripts/components/modal/modal.component.js +46 -1
- package/public/scripts/components/modal/modal.component.scss +20 -0
- package/public/scripts/components/slider/slider.component.js +156 -1
- package/public/scripts/components/smooth-scroll/smooth-scroll.component.js +65 -1
- package/public/scripts/components/tab/tab.component.js +73 -1
- package/public/scripts/components/tab/tab.component.scss +23 -0
- package/public/scripts/components/toggle/toggle.component.js +51 -1
- package/public/scripts/components/tooltip/tooltip.component.js +102 -1
- package/public/scripts/enumerators/element.enum.js +28 -1
- package/public/scripts/enumerators/tooltip.enum.js +21 -1
- package/public/scripts/handcook.js +39 -1
- package/public/scripts/index.js +22316 -1
- package/public/styles/scss/style.css +161 -2
- package/public/styles/style.css +166 -1
package/mix-manifest.json
CHANGED
|
@@ -1,20 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"/public/scripts/handcook.js": "/public/scripts/handcook.js",
|
|
3
|
-
"/public/scripts/enumerators/element.enum.js": "/public/scripts/enumerators/element.enum.js",
|
|
4
|
-
"/public/scripts/enumerators/tooltip.enum.js": "/public/scripts/enumerators/tooltip.enum.js",
|
|
5
|
-
"/public/scripts/components/collapse/collapse.component.js": "/public/scripts/components/collapse/collapse.component.js",
|
|
6
|
-
"/public/scripts/components/dropdown/dropdown.component.js": "/public/scripts/components/dropdown/dropdown.component.js",
|
|
7
|
-
"/public/scripts/components/lazyload/lazyload.component.js": "/public/scripts/components/lazyload/lazyload.component.js",
|
|
8
|
-
"/public/scripts/components/lightbox/lightbox.component.js": "/public/scripts/components/lightbox/lightbox.component.js",
|
|
9
|
-
"/public/scripts/components/modal/modal.component.js": "/public/scripts/components/modal/modal.component.js",
|
|
10
|
-
"/public/scripts/components/slider/slider.component.js": "/public/scripts/components/slider/slider.component.js",
|
|
11
|
-
"/public/scripts/components/smooth-scroll/smooth-scroll.component.js": "/public/scripts/components/smooth-scroll/smooth-scroll.component.js",
|
|
12
|
-
"/public/scripts/components/tab/tab.component.js": "/public/scripts/components/tab/tab.component.js",
|
|
13
|
-
"/public/scripts/components/toggle/toggle.component.js": "/public/scripts/components/toggle/toggle.component.js",
|
|
14
|
-
"/public/scripts/components/tooltip/tooltip.component.js": "/public/scripts/components/tooltip/tooltip.component.js",
|
|
15
2
|
"/public/scripts/index.js": "/public/scripts/index.js",
|
|
16
3
|
"/public/styles/style.css": "/public/styles/style.css",
|
|
17
4
|
"/public/index.html": "/public/index.html",
|
|
5
|
+
"/public/scripts/handcook.js": "/public/scripts/handcook.js",
|
|
18
6
|
"/public/styles/scss/_utils.scss": "/public/styles/scss/_utils.scss",
|
|
19
7
|
"/public/styles/scss/_variables.scss": "/public/styles/scss/_variables.scss",
|
|
20
8
|
"/public/styles/scss/handcook.scss": "/public/styles/scss/handcook.scss",
|
package/package.json
CHANGED
|
@@ -1 +1,76 @@
|
|
|
1
|
-
(()=>{"use strict";var e={812:(e,t,n)=>{function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var o=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)};r(o,"tooltip","[data-hc-tooltip], [data-hc-popover]"),r(o,"popover","[data-hc-popover]"),r(o,"scrollSmooth","data-hc-smooth-scroll"),r(o,"modal","[data-hc-modal]"),r(o,"lightbox","[data-hc-lightbox]"),r(o,"dropdown","[data-hc-dropdown]"),r(o,"collapse","[data-hc-collapse]"),r(o,"collapseItem","[data-hc-collapse-item]"),r(o,"tab","[data-hc-tab]"),r(o,"toggle","[data-hc-toggle]"),r(o,"slider","[data-hc-slider]")},49:(e,t,n)=>{n.d(t,{Z:()=>s});var r=n(385),o=n(147),i=n(930);const s=class{constructor(e){(e=(0,o.sb)(e))&&(this._element=e,r.Z.set(this._element,this.constructor.DATA_KEY,this))}dispose(){r.Z.remove(this._element,this.constructor.DATA_KEY),i.Z.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((e=>{this[e]=null}))}_queueCallback(e,t,n=!0){(0,o.e0)(e,t,n)}static getInstance(e){return r.Z.get((0,o.sb)(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,"object"==typeof t?t:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}},385:(e,t,n)=>{n.d(t,{Z:()=>o});const r=new Map,o={set(e,t,n){r.has(e)||r.set(e,new Map);const o=r.get(e);o.has(t)||0===o.size?o.set(t,n):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(o.keys())[0]}.`)},get:(e,t)=>r.has(e)&&r.get(e).get(t)||null,remove(e,t){if(!r.has(e))return;const n=r.get(e);n.delete(t),0===n.size&&r.delete(e)}}},930:(e,t,n)=>{n.d(t,{Z:()=>_});var r=n(147);const o=/[^.]*(?=\..*)\.|.*/,i=/\..*/,s=/::\d+$/,a={};let l=1;const c={mouseenter:"mouseover",mouseleave:"mouseout"},u=/^(mouseenter|mouseleave)/i,d=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function h(e,t){return t&&`${t}::${l++}`||e.uidEvent||l++}function f(e){const t=h(e);return e.uidEvent=t,a[t]=a[t]||{},a[t]}function p(e,t,n=null){const r=Object.keys(e);for(let o=0,i=r.length;o<i;o++){const i=e[r[o]];if(i.originalHandler===t&&i.delegationSelector===n)return i}return null}function g(e,t,n){const r="string"==typeof t,o=r?n:t;let i=b(e);return d.has(i)||(i=e),[r,o,i]}function m(e,t,n,r,i){if("string"!=typeof t||!e)return;if(n||(n=r,r=null),u.test(t)){const e=e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)};r?r=e(r):n=e(n)}const[s,a,l]=g(t,n,r),c=f(e),d=c[l]||(c[l]={}),m=p(d,a,s?n:null);if(m)return void(m.oneOff=m.oneOff&&i);const v=h(a,t.replace(o,"")),b=s?function(e,t,n){return function r(o){const i=e.querySelectorAll(t);for(let{target:s}=o;s&&s!==this;s=s.parentNode)for(let a=i.length;a--;)if(i[a]===s)return o.delegateTarget=s,r.oneOff&&y.off(e,o.type,t,n),n.apply(s,[o]);return null}}(e,n,r):function(e,t){return function n(r){return r.delegateTarget=e,n.oneOff&&y.off(e,r.type,t),t.apply(e,[r])}}(e,n);b.delegationSelector=s?n:null,b.originalHandler=a,b.oneOff=i,b.uidEvent=v,d[v]=b,e.addEventListener(l,b,s)}function v(e,t,n,r,o){const i=p(t[n],r,o);i&&(e.removeEventListener(n,i,Boolean(o)),delete t[n][i.uidEvent])}function b(e){return e=e.replace(i,""),c[e]||e}const y={on(e,t,n,r){m(e,t,n,r,!1)},one(e,t,n,r){m(e,t,n,r,!0)},off(e,t,n,r){if("string"!=typeof t||!e)return;const[o,i,a]=g(t,n,r),l=a!==t,c=f(e),u=t.startsWith(".");if(void 0!==i){if(!c||!c[a])return;return void v(e,c,a,i,o?n:null)}u&&Object.keys(c).forEach((n=>{!function(e,t,n,r){const o=t[n]||{};Object.keys(o).forEach((i=>{if(i.includes(r)){const r=o[i];v(e,t,n,r.originalHandler,r.delegationSelector)}}))}(e,c,n,t.slice(1))}));const d=c[a]||{};Object.keys(d).forEach((n=>{const r=n.replace(s,"");if(!l||t.includes(r)){const t=d[n];v(e,c,a,t.originalHandler,t.delegationSelector)}}))},trigger(e,t,n){if("string"!=typeof t||!e)return null;const o=(0,r.KF)(),i=b(t),s=t!==i,a=d.has(i);let l,c=!0,u=!0,h=!1,f=null;return s&&o&&(l=o.Event(t,n),o(e).trigger(l),c=!l.isPropagationStopped(),u=!l.isImmediatePropagationStopped(),h=l.isDefaultPrevented()),a?(f=document.createEvent("HTMLEvents"),f.initEvent(i,c,!0)):f=new CustomEvent(t,{bubbles:c,cancelable:!0}),void 0!==n&&Object.keys(n).forEach((e=>{Object.defineProperty(f,e,{get:()=>n[e]})})),h&&f.preventDefault(),u&&e.dispatchEvent(f),f.defaultPrevented&&void 0!==l&&l.preventDefault(),f}},_=y},357:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(147);const o={find:(e,t=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(t,e)),findOne:(e,t=document.documentElement)=>Element.prototype.querySelector.call(t,e),children:(e,t)=>[].concat(...e.children).filter((e=>e.matches(t))),parents(e,t){const n=[];let r=e.parentNode;for(;r&&r.nodeType===Node.ELEMENT_NODE&&3!==r.nodeType;)r.matches(t)&&n.push(r),r=r.parentNode;return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((e=>`${e}:not([tabindex^="-"])`)).join(", ");return this.find(t,e).filter((e=>!(0,r.pK)(e)&&(0,r.pn)(e)))}}},147:(e,t,n)=>{n.d(t,{sb:()=>l,K:()=>i,dG:()=>s,zE:()=>c,pn:()=>u,pK:()=>d,nq:()=>h,KF:()=>f,pF:()=>g,e0:()=>v});const r="transitionend",o=e=>{let t=e.getAttribute("data-bs-target");if(!t||"#"===t){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&"#"!==n?n.trim():null}return t},i=e=>{const t=o(e);return t&&document.querySelector(t)?t:null},s=e=>{const t=o(e);return t?document.querySelector(t):null},a=e=>!(!e||"object"!=typeof e)&&(void 0!==e.jquery&&(e=e[0]),void 0!==e.nodeType),l=e=>a(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?document.querySelector(e):null,c=(e,t,n)=>{Object.keys(n).forEach((r=>{const o=n[r],i=t[r],s=i&&a(i)?"element":null==(l=i)?`${l}`:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(o).test(s))throw new TypeError(`${e.toUpperCase()}: Option "${r}" provided type "${s}" but expected type "${o}".`)}))},u=e=>!(!a(e)||0===e.getClientRects().length)&&"visible"===getComputedStyle(e).getPropertyValue("visibility"),d=e=>!e||e.nodeType!==Node.ELEMENT_NODE||(!!e.classList.contains("disabled")||(void 0!==e.disabled?e.disabled:e.hasAttribute("disabled")&&"false"!==e.getAttribute("disabled"))),h=e=>{e.offsetHeight},f=()=>{const{jQuery:e}=window;return e&&!document.body.hasAttribute("data-bs-no-jquery")?e:null},p=[],g=e=>{var t;t=()=>{const t=f();if(t){const n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}},"loading"===document.readyState?(p.length||document.addEventListener("DOMContentLoaded",(()=>{p.forEach((e=>e()))})),p.push(t)):t()},m=e=>{"function"==typeof e&&e()},v=(e,t,n=!0)=>{if(!n)return void m(e);const o=(e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const r=Number.parseFloat(t),o=Number.parseFloat(n);return r||o?(t=t.split(",")[0],n=n.split(",")[0],1e3*(Number.parseFloat(t)+Number.parseFloat(n))):0})(t)+5;let i=!1;const s=({target:n})=>{n===t&&(i=!0,t.removeEventListener(r,s),m(e))};t.addEventListener(r,s),setTimeout((()=>{i||t.dispatchEvent(new Event(r))}),o)}},973:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(645),o=n.n(r)()((function(e){return e[1]}));o.push([e.id,"/*!\n * IRIS Interactive\n *\n * NOTICE OF LICENSE\n *\n * This source file is no subject to a specific license\n * but it belongs to the company IRIS Interactive.\n * You can contact IRIS Interactive at the following\n * address: contact@iris-interactive.fr\n *\n * @author Lucas ROCHE\n * @date 22/02/2022 08:25\n * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)\n */.fade{transition:opacity .15s linear}@media (prefers-reduced-motion:reduce){.fade{transition:none}}.fade:not(.show){opacity:0}.collapse:not(.show){display:none}.collapsing{height:0;overflow:hidden;transition:height .35s ease}@media (prefers-reduced-motion:reduce){.collapsing{transition:none}}.collapsing.collapse-horizontal{height:auto;transition:width .35s ease;width:0}@media (prefers-reduced-motion:reduce){.collapsing.collapse-horizontal{transition:none}}",""]);const i=o},645:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(o[s]=!0)}for(var a=0;a<e.length;a++){var l=[].concat(e[a]);r&&o[l[0]]||(n&&(l[2]?l[2]="".concat(n," and ").concat(l[2]):l[2]=n),t.push(l))}},t}},379:(e,t,n)=>{var r,o=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},i=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;n<s.length;n++)if(s[n].identifier===e){t=n;break}return t}function l(e,t){for(var n={},r=[],o=0;o<e.length;o++){var i=e[o],l=t.base?i[0]+t.base:i[0],c=n[l]||0,u="".concat(l," ").concat(c);n[l]=c+1;var d=a(u),h={css:i[1],media:i[2],sourceMap:i[3]};-1!==d?(s[d].references++,s[d].updater(h)):s.push({identifier:u,updater:m(h,t),references:1}),r.push(u)}return r}function c(e){var t=document.createElement("style"),r=e.attributes||{};if(void 0===r.nonce){var o=n.nc;o&&(r.nonce=o)}if(Object.keys(r).forEach((function(e){t.setAttribute(e,r[e])})),"function"==typeof e.insert)e.insert(t);else{var s=i(e.insert||"head");if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(t)}return t}var u,d=(u=[],function(e,t){return u[e]=t,u.filter(Boolean).join("\n")});function h(e,t,n,r){var o=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(e.styleSheet)e.styleSheet.cssText=d(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}function f(e,t,n){var r=n.css,o=n.media,i=n.sourceMap;if(o?e.setAttribute("media",o):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}var p=null,g=0;function m(e,t){var n,r,o;if(t.singleton){var i=g++;n=p||(p=c(t)),r=h.bind(null,n,i,!1),o=h.bind(null,n,i,!0)}else n=c(t),r=f.bind(null,n,t),o=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=o());var n=l(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var r=0;r<n.length;r++){var o=a(n[r]);s[o].references--}for(var i=l(e,t),c=0;c<n.length;c++){var u=a(n[c]);0===s[u].references&&(s[u].updater(),s.splice(u,1))}n=i}}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,exports:{}};return e[r](i,i.exports,n),i.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{n(812);var e=n(379),t=n.n(e),r=n(973),o={insert:"head",singleton:!1};t()(r.Z,o);r.Z.locals;var i=n(147),s=n(385),a=n(930);function l(e){return"true"===e||"false"!==e&&(e===Number(e).toString()?Number(e):""===e||"null"===e?null:e)}function c(e){return e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`))}const u={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${c(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${c(t)}`)},getDataAttributes(e){if(!e)return{};const t={};return Object.keys(e.dataset).filter((e=>e.startsWith("bs"))).forEach((n=>{let r=n.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),t[r]=l(e.dataset[n])})),t},getDataAttribute:(e,t)=>l(e.getAttribute(`data-bs-${c(t)}`)),offset(e){const t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset,left:t.left+window.pageXOffset}},position:e=>({top:e.offsetTop,left:e.offsetLeft})};var d=n(357),h=n(49);const f="collapse",p="bs.collapse",g={toggle:!0,parent:null},m={toggle:"boolean",parent:"(null|element)"},v="show",b="collapse",y="collapsing",_="collapsed",E=":scope .collapse .collapse",w='[data-bs-toggle="collapse"]';class A extends h.Z{constructor(e,t){super(e),this._isTransitioning=!1,this._config=this._getConfig(t),this._triggerArray=[];const n=d.Z.find(w);for(let e=0,t=n.length;e<t;e++){const t=n[e],r=(0,i.K)(t),o=d.Z.find(r).filter((e=>e===this._element));null!==r&&o.length&&(this._selector=r,this._triggerArray.push(t))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return g}static get NAME(){return f}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let e,t=[];if(this._config.parent){const e=d.Z.find(E,this._config.parent);t=d.Z.find(".collapse.show, .collapse.collapsing",this._config.parent).filter((t=>!e.includes(t)))}const n=d.Z.findOne(this._selector);if(t.length){const r=t.find((e=>n!==e));if(e=r?A.getInstance(r):null,e&&e._isTransitioning)return}if(a.Z.trigger(this._element,"show.bs.collapse").defaultPrevented)return;t.forEach((t=>{n!==t&&A.getOrCreateInstance(t,{toggle:!1}).hide(),e||s.Z.set(t,p,null)}));const r=this._getDimension();this._element.classList.remove(b),this._element.classList.add(y),this._element.style[r]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const o=`scroll${r[0].toUpperCase()+r.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(y),this._element.classList.add(b,v),this._element.style[r]="",a.Z.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[r]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(a.Z.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,(0,i.nq)(this._element),this._element.classList.add(y),this._element.classList.remove(b,v);const t=this._triggerArray.length;for(let e=0;e<t;e++){const t=this._triggerArray[e],n=(0,i.dG)(t);n&&!this._isShown(n)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0;this._element.style[e]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(y),this._element.classList.add(b),a.Z.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(e=this._element){return e.classList.contains(v)}_getConfig(e){return(e={...g,...u.getDataAttributes(this._element),...e}).toggle=Boolean(e.toggle),e.parent=(0,i.sb)(e.parent),(0,i.zE)(f,e,m),e}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const e=d.Z.find(E,this._config.parent);d.Z.find(w,this._config.parent).filter((t=>!e.includes(t))).forEach((e=>{const t=(0,i.dG)(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}))}_addAriaAndCollapsedClass(e,t){e.length&&e.forEach((e=>{t?e.classList.remove(_):e.classList.add(_),e.setAttribute("aria-expanded",t)}))}static jQueryInterface(e){return this.each((function(){const t={};"string"==typeof e&&/show|hide/.test(e)&&(t.toggle=!1);const n=A.getOrCreateInstance(this,t);if("string"==typeof e){if(void 0===n[e])throw new TypeError(`No method named "${e}"`);n[e]()}}))}}a.Z.on(document,"click.bs.collapse.data-api",w,(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const t=(0,i.K)(this);d.Z.find(t).forEach((e=>{A.getOrCreateInstance(e,{toggle:!1}).toggle()}))})),(0,i.pF)(A)})()})();
|
|
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 21/02/2022 17:30
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import ElementEnum from "../../enumerators/element.enum";
|
|
17
|
+
import "./collapse.component.scss";
|
|
18
|
+
import Collapse from "bootstrap/js/src/collapse";
|
|
19
|
+
|
|
20
|
+
export class HcCollapse {
|
|
21
|
+
|
|
22
|
+
showEvent;
|
|
23
|
+
shownEvent;
|
|
24
|
+
hideEvent;
|
|
25
|
+
hiddenEvent;
|
|
26
|
+
|
|
27
|
+
constructor(elements = ElementEnum.collapse, type = "collapse") {
|
|
28
|
+
this.createEvent();
|
|
29
|
+
const collapseElementList = [].slice.call(document.querySelectorAll(elements));
|
|
30
|
+
const collapseList = collapseElementList.map(function (collapseElement) {
|
|
31
|
+
const parent = collapseElement.getAttribute('data-hc-collapse-parent');
|
|
32
|
+
let option = {
|
|
33
|
+
toggle: false
|
|
34
|
+
};
|
|
35
|
+
if (parent !== null) {
|
|
36
|
+
option.parent = parent;
|
|
37
|
+
}
|
|
38
|
+
return new Collapse(collapseElement, option);
|
|
39
|
+
});
|
|
40
|
+
collapseList.map(function (collapse) {
|
|
41
|
+
document.querySelectorAll(`[data-hc-collapse-trigger="${collapse._element.getAttribute("data-hc-collapse")}"]`).forEach(trigger => {
|
|
42
|
+
trigger.addEventListener('click', function (e) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
collapse.toggle();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
document.querySelectorAll('[data-hc-collapse]').forEach(trigger => {
|
|
49
|
+
trigger.addEventListener('hide.bs.collapse', (e) => {
|
|
50
|
+
trigger.dispatchEvent(this.hideEvent);
|
|
51
|
+
});
|
|
52
|
+
trigger.addEventListener('hidden.bs.collapse', (e) => {
|
|
53
|
+
trigger.dispatchEvent(this.hiddenEvent);
|
|
54
|
+
});
|
|
55
|
+
trigger.addEventListener('show.bs.collapse', (e) => {
|
|
56
|
+
trigger.dispatchEvent(this.showEvent);
|
|
57
|
+
});
|
|
58
|
+
trigger.addEventListener('shown.bs.collapse', (e) => {
|
|
59
|
+
trigger.dispatchEvent(this.shownEvent);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
createEvent() {
|
|
65
|
+
this.showEvent = new Event("show.hc.collapse");
|
|
66
|
+
this.shownEvent = new Event("shown.hc.collapse");
|
|
67
|
+
this.hideEvent = new Event("hide.hc.collapse");
|
|
68
|
+
this.hiddenEvent = new Event("hidden.hc.collapse");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const hc_collapse = function (trigger) {
|
|
74
|
+
return new HcCollapse(trigger);
|
|
75
|
+
};
|
|
76
|
+
export default hc_collapse;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 08:25
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
@import "~bootstrap/scss/functions";
|
|
17
|
+
@import "~bootstrap/scss/variables";
|
|
18
|
+
@import "~bootstrap/scss/mixins";
|
|
19
|
+
@import "~bootstrap/scss/transitions";
|
|
@@ -1 +1,72 @@
|
|
|
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 21/02/2022 10:14
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
import ElementEnum from "../../enumerators/element.enum";
|
|
18
|
+
import tippy from "tippy.js";
|
|
19
|
+
import "tippy.js/dist/tippy.css";
|
|
20
|
+
import "./dropdown.component.scss";
|
|
21
|
+
|
|
22
|
+
export class HcDropdown {
|
|
23
|
+
|
|
24
|
+
showEvent;
|
|
25
|
+
shownEvent;
|
|
26
|
+
hideEvent;
|
|
27
|
+
hiddenEvent;
|
|
28
|
+
|
|
29
|
+
instances = [];
|
|
30
|
+
|
|
31
|
+
constructor(elements = ElementEnum.dropdown) {
|
|
32
|
+
this.createEvent();
|
|
33
|
+
document.querySelectorAll(elements).forEach(element => {
|
|
34
|
+
|
|
35
|
+
const template = document.querySelector(element.dataset.hcDropdownMenu);
|
|
36
|
+
const tippyObject = tippy(element, {
|
|
37
|
+
trigger: 'click',
|
|
38
|
+
allowHTML: true,
|
|
39
|
+
content: template.innerHTML,
|
|
40
|
+
arrow: false,
|
|
41
|
+
placement: "bottom",
|
|
42
|
+
theme: "dropdown",
|
|
43
|
+
interactive: true,
|
|
44
|
+
onShow: (instance) => {
|
|
45
|
+
instance.reference.dispatchEvent(this.showEvent)
|
|
46
|
+
},
|
|
47
|
+
onShown: (instance) => {
|
|
48
|
+
instance.reference.dispatchEvent(this.shownEvent)
|
|
49
|
+
},
|
|
50
|
+
onHide: (instance) => {
|
|
51
|
+
instance.reference.dispatchEvent(this.hideEvent)
|
|
52
|
+
},
|
|
53
|
+
onHidden: (instance) => {
|
|
54
|
+
instance.reference.dispatchEvent(this.hiddenEvent)
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
this.instances.push(tippyObject);
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
createEvent() {
|
|
62
|
+
this.showEvent = new Event('show.hc.dropdown');
|
|
63
|
+
this.shownEvent = new Event('shown.hc.dropdown');
|
|
64
|
+
this.hideEvent = new Event('hide.hc.dropdown');
|
|
65
|
+
this.hiddenEvent = new Event('hidden.hc.dropdown');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const hc_dropdown = function (trigger) {
|
|
70
|
+
return new HcDropdown(trigger);
|
|
71
|
+
}
|
|
72
|
+
export default hc_dropdown;
|
|
@@ -0,0 +1,48 @@
|
|
|
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 24/02/2022 14:19
|
|
13
|
+
* @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
.tippy-box[data-theme~=dropdown] {
|
|
17
|
+
color: #26323d;
|
|
18
|
+
box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);
|
|
19
|
+
background-color: #fff
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.tippy-box[data-theme~=dropdown] .tippy-content {
|
|
23
|
+
padding: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.tippy-box[data-theme~=dropdown][data-placement^=top] > .tippy-arrow:before {
|
|
27
|
+
border-top-color: #fff
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.tippy-box[data-theme~=dropdown][data-placement^=bottom] > .tippy-arrow:before {
|
|
31
|
+
border-bottom-color: #fff
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.tippy-box[data-theme~=dropdown][data-placement^=left] > .tippy-arrow:before {
|
|
35
|
+
border-left-color: #fff
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.tippy-box[data-theme~=dropdown][data-placement^=right] > .tippy-arrow:before {
|
|
39
|
+
border-right-color: #fff
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.tippy-box[data-theme~=dropdown] > .tippy-backdrop {
|
|
43
|
+
background-color: #fff
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.tippy-box[data-theme~=dropdown] > .tippy-svg-arrow {
|
|
47
|
+
fill: #fff
|
|
48
|
+
}
|
|
@@ -1 +1,28 @@
|
|
|
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
|
+
*/
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
import LazyLoad from "vanilla-lazyload";
|
|
18
|
+
|
|
19
|
+
const hc_lazyload = function() {
|
|
20
|
+
return new LazyLoad({
|
|
21
|
+
elements_selector: '[data-hc-src], [data-hc-bg], [data-hc-bg-hidpi]',
|
|
22
|
+
data_src: 'hc-src',
|
|
23
|
+
data_bg: 'hc-bg',
|
|
24
|
+
data_bg_hidpi: 'hc-bg-hidpi'
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default hc_lazyload;
|