@iris.interactive/handcook 2.9.46 → 2.9.48

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Welcome to HandCook 👨‍🍳
2
- ![Version](https://img.shields.io/badge/version-2.9.46-blue.svg?cacheSeconds=2592000)
2
+ ![Version](https://img.shields.io/badge/version-2.9.48-blue.svg?cacheSeconds=2592000)
3
3
  ![Prerequisite](https://img.shields.io/badge/node-%3E%3D%2012.14.0-blue.svg)
4
4
  [![License: UNLICENSED](https://img.shields.io/badge/License-UNLICENSED-yellow.svg)](#)
5
5
  [![Twitter: captain\_iris](https://img.shields.io/twitter/follow/captain\_iris.svg?style=social)](https://twitter.com/captain\_iris)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "2.9.46",
3
+ "version": "2.9.48",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {
package/public/index.html CHANGED
@@ -417,7 +417,7 @@
417
417
  </div>
418
418
  </div>
419
419
  </article>
420
- <article data-hc-scroll-reveal-parent class="component__wrapper" style="display: grid; grid-template-columns: repeat(3, 1fr); grid-gap:30px;">
420
+ <article data-hc-scroll-reveal-parent data-hc-scroll-reveal-interval="300" class="component__wrapper" style="display: grid; grid-template-columns: repeat(3, 1fr); grid-gap:30px;">
421
421
  <div style="height: 300px; background: #000"></div>
422
422
  <div style="height: 300px; background: #000"></div>
423
423
  <div style="height: 300px; background: #000"></div>
@@ -15,6 +15,7 @@
15
15
 
16
16
  import ScrollReveal from 'scrollreveal'
17
17
  import ElementEnum from "../../enumerators/element.enum";
18
+ import './scroll-reveal.component.scss';
18
19
 
19
20
  export class HcScrollReveal {
20
21
 
@@ -1 +1,21 @@
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 Stephan JAMBOU
12
+ * @date 22/02/2022 14:57
13
+ * @copyright Copyright (c) 2002-2022 IRIS Interactive, Inc. (http://www.iris-interactive.fr)
14
+ */
1
15
 
16
+ //ScrollReveal
17
+ [data-hc-scroll-reveal-parent],
18
+ [data-hc-scroll-reveal-child],
19
+ [data-hc-scroll-reveal] {
20
+ visibility: hidden;
21
+ }
@@ -42,12 +42,20 @@ export class HcTooltip {
42
42
  options.trigger = options.trigger != '' ? options.trigger : (element.hasAttribute(TooltipEnum.attrPopover) ? "click" : "mouseenter focus");
43
43
  options.content = options.content != '' ? options.content : (element.hasAttribute(TooltipEnum.attrContent) ? element.getAttribute(TooltipEnum.attrContent) : '');
44
44
  options.placement = options.placement != '' ? options.placement : (element.hasAttribute(TooltipEnum.attrPlacement) ? element.getAttribute(TooltipEnum.attrPlacement) : 'bottom');
45
+ let backgroundColor = element.hasAttribute(TooltipEnum.attrBackgroundColor) ? element.getAttribute(TooltipEnum.attrBackgroundColor) : '';
46
+ let color = element.hasAttribute(TooltipEnum.attrColor) ? element.getAttribute(TooltipEnum.attrColor) : '';
45
47
  if (options.trigger === 'click') {
46
48
  element.addEventListener('click', (e) => {
47
49
  e.preventDefault();
48
50
  });
49
51
  }
50
52
  options.onShow = (instance) => {
53
+ if (backgroundColor) {
54
+ instance.popper.querySelector('.tippy-box').style.setProperty('--iris--tooltip--background-color', 'var('+backgroundColor+')');
55
+ }
56
+ if (color) {
57
+ instance.popper.querySelector('.tippy-box').style.setProperty('--iris--tooltip-color', 'var('+color+')');
58
+ }
51
59
  instance.reference.dispatchEvent(this.showEvent);
52
60
  }
53
61
  options.onShown = (instance) => {
@@ -99,4 +107,4 @@ export class HcTooltip {
99
107
  const hc_tooltip = function (trigger, options) {
100
108
  return new HcTooltip(trigger, options);
101
109
  }
102
- export default hc_tooltip;
110
+ export default hc_tooltip;
@@ -1 +1 @@
1
- (()=>{"use strict";var t={812:(t,e,o)=>{function r(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var a=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};r(a,"tooltip","[data-hc-tooltip], [data-hc-popover]"),r(a,"popover","[data-hc-popover]"),r(a,"scrollSmooth","[data-hc-smooth-scroll]"),r(a,"modal","[data-hc-modal]"),r(a,"modalClose","[data-hc-modal-close]"),r(a,"lightboxAttr","data-hc-lightbox"),r(a,"lightbox","[".concat(a.lightboxAttr,"]")),r(a,"dropdown","[data-hc-dropdown]"),r(a,"collapse","[data-hc-collapse]"),r(a,"collapseItem","[data-hc-collapse-item]"),r(a,"popin","[data-hc-popin]"),r(a,"tab","[data-hc-tab]"),r(a,"toggle","[data-hc-toggle]"),r(a,"slider","[data-hc-slider]"),r(a,"scrollspy","[data-hc-scrollspy]"),r(a,"scrollspyNav","[data-hc-scrollspy-nav]"),r(a,"scrollspyNavItem","[data-hc-scrollspy-nav-item]"),r(a,"scrollRevealParent","[data-hc-scroll-reveal-parent]"),r(a,"scrollReveal","[data-hc-scroll-reveal]")},95:(t,e,o)=>{o.d(e,{Z:()=>n});var r=o(645),a=o.n(r)()((function(t){return t[1]}));a.push([t.id,'.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}',""]);const n=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=t(e);return e[2]?"@media ".concat(e[2]," {").concat(o,"}"):o})).join("")},e.i=function(t,o,r){"string"==typeof t&&(t=[[null,t,""]]);var a={};if(r)for(var n=0;n<this.length;n++){var i=this[n][0];null!=i&&(a[i]=!0)}for(var c=0;c<t.length;c++){var l=[].concat(t[c]);r&&a[l[0]]||(o&&(l[2]?l[2]="".concat(o," and ").concat(l[2]):l[2]=o),e.push(l))}},e}},514:(t,e,o)=>{var r=o(379),a=o.n(r),n=o(95),i={insert:"head",singleton:!1};a()(n.Z,i),n.Z.locals},379:(t,e,o)=>{var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},n=function(){var t={};return function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}t[e]=o}return t[e]}}(),i=[];function c(t){for(var e=-1,o=0;o<i.length;o++)if(i[o].identifier===t){e=o;break}return e}function l(t,e){for(var o={},r=[],a=0;a<t.length;a++){var n=t[a],l=e.base?n[0]+e.base:n[0],p=o[l]||0,s="".concat(l," ").concat(p);o[l]=p+1;var d=c(s),f={css:n[1],media:n[2],sourceMap:n[3]};-1!==d?(i[d].references++,i[d].updater(f)):i.push({identifier:s,updater:m(f,e),references:1}),r.push(s)}return r}function p(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var a=o.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var i=n(t.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(e)}return e}var s,d=(s=[],function(t,e){return s[t]=e,s.filter(Boolean).join("\n")});function f(t,e,o,r){var a=o?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=d(e,a);else{var n=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n)}}function u(t,e,o){var r=o.css,a=o.media,n=o.sourceMap;if(a?t.setAttribute("media",a):t.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var h=null,b=0;function m(t,e){var o,r,a;if(e.singleton){var n=b++;o=h||(h=p(e)),r=f.bind(null,o,n,!1),a=f.bind(null,o,n,!0)}else o=p(e),r=u.bind(null,o,e),a=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(o)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else a()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=a());var o=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<o.length;r++){var a=c(o[r]);i[a].references--}for(var n=l(t,e),p=0;p<o.length;p++){var s=c(o[p]);0===i[s].references&&(i[s].updater(),i.splice(s,1))}o=n}}}}},e={};function o(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={id:r,exports:{}};return t[r](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{o(514),o(812);function t(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var e=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};t(e,"attrPopover","data-hc-popover"),t(e,"attrContent","data-hc-tooltip-content"),t(e,"attrPlacement","data-hc-tooltip-placement")})()})();
1
+ (()=>{"use strict";var t={812:(t,e,o)=>{function r(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var a=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};r(a,"tooltip","[data-hc-tooltip], [data-hc-popover]"),r(a,"popover","[data-hc-popover]"),r(a,"scrollSmooth","[data-hc-smooth-scroll]"),r(a,"modal","[data-hc-modal]"),r(a,"modalClose","[data-hc-modal-close]"),r(a,"lightboxAttr","data-hc-lightbox"),r(a,"lightbox","[".concat(a.lightboxAttr,"]")),r(a,"dropdown","[data-hc-dropdown]"),r(a,"collapse","[data-hc-collapse]"),r(a,"collapseItem","[data-hc-collapse-item]"),r(a,"popin","[data-hc-popin]"),r(a,"tab","[data-hc-tab]"),r(a,"toggle","[data-hc-toggle]"),r(a,"slider","[data-hc-slider]"),r(a,"scrollspy","[data-hc-scrollspy]"),r(a,"scrollspyNav","[data-hc-scrollspy-nav]"),r(a,"scrollspyNavItem","[data-hc-scrollspy-nav-item]"),r(a,"scrollRevealParent","[data-hc-scroll-reveal-parent]"),r(a,"scrollReveal","[data-hc-scroll-reveal]")},95:(t,e,o)=>{o.d(e,{Z:()=>n});var r=o(645),a=o.n(r)()((function(t){return t[1]}));a.push([t.id,'.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{background-color:#333;border-radius:4px;color:#fff;font-size:14px;line-height:1.4;outline:0;position:relative;transition-property:transform,visibility,opacity;white-space:normal}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{border-top-color:initial;border-width:8px 8px 0;bottom:-7px;left:0;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{border-bottom-color:initial;border-width:0 8px 8px;left:0;top:-7px;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-left-color:initial;border-width:8px 0 8px 8px;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{border-right-color:initial;border-width:8px 8px 8px 0;left:-7px;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{color:#333;height:16px;width:16px}.tippy-arrow:before{border-color:transparent;border-style:solid;content:"";position:absolute}.tippy-content{padding:5px 9px;position:relative;z-index:1}',""]);const n=a},645:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var o=t(e);return e[2]?"@media ".concat(e[2]," {").concat(o,"}"):o})).join("")},e.i=function(t,o,r){"string"==typeof t&&(t=[[null,t,""]]);var a={};if(r)for(var n=0;n<this.length;n++){var i=this[n][0];null!=i&&(a[i]=!0)}for(var c=0;c<t.length;c++){var l=[].concat(t[c]);r&&a[l[0]]||(o&&(l[2]?l[2]="".concat(o," and ").concat(l[2]):l[2]=o),e.push(l))}},e}},514:(t,e,o)=>{var r=o(379),a=o.n(r),n=o(95),i={insert:"head",singleton:!1};a()(n.Z,i),n.Z.locals},379:(t,e,o)=>{var r,a=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},n=function(){var t={};return function(e){if(void 0===t[e]){var o=document.querySelector(e);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(t){o=null}t[e]=o}return t[e]}}(),i=[];function c(t){for(var e=-1,o=0;o<i.length;o++)if(i[o].identifier===t){e=o;break}return e}function l(t,e){for(var o={},r=[],a=0;a<t.length;a++){var n=t[a],l=e.base?n[0]+e.base:n[0],p=o[l]||0,d="".concat(l," ").concat(p);o[l]=p+1;var s=c(d),f={css:n[1],media:n[2],sourceMap:n[3]};-1!==s?(i[s].references++,i[s].updater(f)):i.push({identifier:d,updater:m(f,e),references:1}),r.push(d)}return r}function p(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var a=o.nc;a&&(r.nonce=a)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var i=n(t.insert||"head");if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(e)}return e}var d,s=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function f(t,e,o,r){var a=o?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=s(e,a);else{var n=document.createTextNode(a),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(n,i[e]):t.appendChild(n)}}function u(t,e,o){var r=o.css,a=o.media,n=o.sourceMap;if(a?t.setAttribute("media",a):t.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var h=null,b=0;function m(t,e){var o,r,a;if(e.singleton){var n=b++;o=h||(h=p(e)),r=f.bind(null,o,n,!1),a=f.bind(null,o,n,!0)}else o=p(e),r=u.bind(null,o,e),a=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(o)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else a()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=a());var o=l(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<o.length;r++){var a=c(o[r]);i[a].references--}for(var n=l(t,e),p=0;p<o.length;p++){var d=c(o[p]);0===i[d].references&&(i[d].updater(),i.splice(d,1))}o=n}}}}},e={};function o(r){var a=e[r];if(void 0!==a)return a.exports;var n=e[r]={id:r,exports:{}};return t[r](n,n.exports,o),n.exports}o.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return o.d(e,{a:e}),e},o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{o(514),o(812);function t(t,e,o){return e in t?Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}):t[e]=o,t}var e=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)};t(e,"attrPopover","data-hc-popover"),t(e,"attrContent","data-hc-tooltip-content"),t(e,"attrPlacement","data-hc-tooltip-placement"),t(e,"attrBackgroundColor","data-hc-tooltip-background-color"),t(e,"attrColor","data-hc-tooltip-color")})()})();
@@ -18,4 +18,6 @@ export default class TooltipEnum {
18
18
  static attrPopover = "data-hc-popover";
19
19
  static attrContent = "data-hc-tooltip-content";
20
20
  static attrPlacement = "data-hc-tooltip-placement";
21
+ static attrBackgroundColor = "data-hc-tooltip-background-color";
22
+ static attrColor = "data-hc-tooltip-color";
21
23
  }