Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@20minutes/hela

Package Overview
Dependencies
Maintainers
2
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@20minutes/hela - npm Package Compare versions

Comparing version 0.1.142 to 0.1.143

46

dist/js/scripts.es.js

@@ -19,7 +19,7 @@ var k = Object.defineProperty;

});
}, D = (e) => {
}, C = (e) => {
var s;
const t = e.querySelector(".js-expandButton__label");
e.setAttribute("aria-expanded", "true"), t.innerHTML = "Voir moins", (s = e.previousElementSibling) == null || s.setAttribute("aria-hidden", "false");
}, C = (e) => {
}, D = (e) => {
var s;

@@ -30,3 +30,3 @@ const t = e.querySelector(".js-expandButton__label");

const t = e.currentTarget;
return e.preventDefault(), t.getAttribute("aria-expanded") === "true" ? C(t) : D(t);
return e.preventDefault(), t.getAttribute("aria-expanded") === "true" ? D(t) : C(t);
}, R = (e = document.querySelector(

@@ -215,20 +215,18 @@ ".js-expandButton"

}
function $() {
function w() {
for (const e of document.querySelectorAll("[data-a11y-dialog]"))
new q(e);
}
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", $) : $());
const V = (e = document.querySelector(".js-modal")) => {
if (e) {
const t = new q(e), s = {
x: 0,
y: 0
};
t.on("show", () => {
s.x = window.scrollX, s.y = window.scrollY, document.body.style.top = `-${s.y}px`, document.body.classList.add("noscroll");
}).on("hide", () => {
document.body.classList.remove("noscroll"), document.body.style.top = "", window.scroll(s.x, s.y);
});
}
}, z = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
typeof document < "u" && (document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", w) : w());
const V = () => document.querySelectorAll(".js-modal").forEach((e) => {
const t = new q(e), s = {
x: 0,
y: 0
};
t.on("show", () => {
s.x = window.scrollX, s.y = window.scrollY, document.body.classList.add("noscroll"), document.body.style.top = `-${s.y}px`;
}).on("hide", () => {
document.body.classList.remove("noscroll"), document.body.style.top = "", (window.scrollY !== s.y || window.scrollX !== s.x) && window.scroll(s.x, s.y);
});
}), z = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
const i = e.scrollLeft > 0, n = e.scrollLeft + e.clientWidth < e.scrollWidth;

@@ -284,3 +282,3 @@ i && n ? (t.classList.add("o-nav-button--visible"), s.classList.add("o-nav-button--visible")) : i ? (t.classList.remove("o-nav-button--visible"), s.classList.add("o-nav-button--visible")) : n ? (t.classList.add("o-nav-button--visible"), s.classList.remove("o-nav-button--visible")) : (t.classList.remove("o-nav-button--visible"), s.classList.remove("o-nav-button--visible"));

}
}, U = ({
}, X = ({
navigatedList: e,

@@ -329,3 +327,3 @@ nextBtn: t,

}
}, X = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
}, U = ({ navigatedList: e, nextBtn: t, prevBtn: s }) => {
z({

@@ -358,3 +356,3 @@ navigatedList: e,

"click",
U.bind(!1, {
X.bind(!1, {
navigatedList: d,

@@ -398,3 +396,3 @@ nextBtn: u,

"resize",
X.bind(!1, {
U.bind(!1, {
navigatedList: i,

@@ -509,3 +507,3 @@ nextBtn: n,

}), s.setAttribute("aria-selected", "true"), a && a.removeAttribute("aria-hidden");
}, w = (e) => e.code === "ArrowLeft" || e.keyCode === 39, T = (e) => e.code === "ArrowRight" || e.keyCode === 37, de = (e = document.querySelector(".js-tabs")) => {
}, $ = (e) => e.code === "ArrowLeft" || e.keyCode === 39, T = (e) => e.code === "ArrowRight" || e.keyCode === 37, de = (e = document.querySelector(".js-tabs")) => {
if (e) {

@@ -522,3 +520,3 @@ const t = e.querySelectorAll('[role="tab"]');

s.addEventListener("keydown", (n) => {
n instanceof KeyboardEvent && (w(n) || T(n)) && (t[i].setAttribute("tabindex", "-1"), w(n) ? (i += 1, i >= t.length && (i = 0)) : T(n) && (i -= 1, i < 0 && (i = t.length - 1)), t[i].setAttribute("tabindex", "0"), t[i].focus());
n instanceof KeyboardEvent && ($(n) || T(n)) && (t[i].setAttribute("tabindex", "-1"), $(n) ? (i += 1, i >= t.length && (i = 0)) : T(n) && (i -= 1, i < 0 && (i = t.length - 1)), t[i].setAttribute("tabindex", "0"), t[i].focus());
});

@@ -525,0 +523,0 @@ }

@@ -1,1 +0,1 @@

(function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f.scripts={}))})(this,function(f){"use strict";var ue=Object.defineProperty;var fe=(f,d,m)=>d in f?ue(f,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):f[d]=m;var _=(f,d,m)=>(fe(f,typeof d!="symbol"?d+"":d,m),m);var d=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(d||{});const m=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,s=t.parentElement,i=s==null?void 0:s.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i==null||i.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i==null||i.setAttribute("aria-hidden","false"))},I=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach(s=>{s.addEventListener("click",i=>{m(i)})})},j=e=>{var s;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","true"),t.innerHTML="Voir moins",(s=e.previousElementSibling)==null||s.setAttribute("aria-hidden","false")},W=e=>{var s;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","false"),t.innerHTML="Voir plus",(s=e.previousElementSibling)==null||s.setAttribute("aria-hidden","true")},D=e=>{const t=e.currentTarget;return e.preventDefault(),t.getAttribute("aria-expanded")==="true"?W(t):j(t)},C=(e=document.querySelector(".js-expandButton"))=>{e&&document.querySelectorAll(".js-expandButton").forEach(s=>s.addEventListener("click",D))},F=e=>{const t=e.querySelector(".js-live-form__textarea"),s=e.querySelector("#live-form-submit-section");t==null||t.setAttribute("aria-expanded","true"),s==null||s.setAttribute("aria-hidden","false")},O=()=>{const e=document.querySelector(".js-live-form");if(e){const t=e.querySelector(".js-live-form__textarea textarea");t==null||t.addEventListener("focus",F.bind(!1,e))}},r={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var R=[`a[href]${r.inert}${r.negTabIndex}`,`area[href]${r.inert}${r.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${r.inert}${r.negTabIndex}${r.disabled}`,`input[type="radio"]${r.inert}${r.negTabIndex}${r.disabled}`,`select${r.inert}${r.negTabIndex}${r.disabled}`,`textarea${r.inert}${r.negTabIndex}${r.disabled}`,`button${r.inert}${r.negTabIndex}${r.disabled}`,`details${r.inert} > summary:first-of-type${r.negTabIndex}`,`iframe${r.inert}${r.negTabIndex}`,`audio[controls]${r.inert}${r.negTabIndex}`,`video[controls]${r.inert}${r.negTabIndex}`,`[contenteditable]${r.inert}${r.negTabIndex}`,`[tabindex]${r.inert}${r.negTabIndex}`];function L(e){(e.querySelector("[autofocus]")||e).focus()}function H(e){const t=y(e,!0),s=t?y(e,!1)||t:null;return[t,s]}function y(e,t){if(t&&T(e))return e;if(K(e))if(e.shadowRoot){let s=$(e.shadowRoot,t);for(;s;){const i=y(s,t);if(i)return i;s=w(s,t)}}else if(e.localName==="slot"){const s=e.assignedElements({flatten:!0});t||s.reverse();for(const i of s){const n=y(i,t);if(n)return n}}else{let s=$(e,t);for(;s;){const i=y(s,t);if(i)return i;s=w(s,t)}}return!t&&T(e)?e:null}function $(e,t){return t?e.firstElementChild:e.lastElementChild}function w(e,t){return t?e.nextElementSibling:e.previousElementSibling}const M=e=>e.matches("details:not([open]) *")&&!e.matches("details>summary:first-of-type")?!0:!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),T=e=>{var t;return(t=e.shadowRoot)!=null&&t.delegatesFocus?!1:e.matches(R.join(","))&&!M(e)};function K(e){return e.shadowRoot&&e.getAttribute("tabindex")==="-1"?!1:!e.matches(":disabled,[hidden],[inert]")}function S(e=document){const t=e.activeElement;return t?t.shadowRoot?S(t.shadowRoot)||document.activeElement:t:null}function P(e,t){const[s,i]=H(e);if(!s)return t.preventDefault();const n=S();t.shiftKey&&n===s?(i.focus(),t.preventDefault()):!t.shiftKey&&n===i&&(s.focus(),t.preventDefault())}class A{constructor(t){_(this,"$el");_(this,"id");_(this,"previouslyFocused");_(this,"shown");this.$el=t,this.id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this.fire("destroy"),this}show(t){var s;return this.shown?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=S(),((s=this.previouslyFocused)==null?void 0:s.tagName)==="BODY"&&(t!=null&&t.target)&&(this.previouslyFocused=t.target),L(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this.fire("show",t),this)}hide(t){var s,i;return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),(i=(s=this.previouslyFocused)==null?void 0:s.focus)==null||i.call(s),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.fire("hide",t),this):this}on(t,s,i){return this.$el.addEventListener(t,s,i),this}off(t,s,i){return this.$el.removeEventListener(t,s,i),this}fire(t,s){this.$el.dispatchEvent(new CustomEvent(t,{detail:s,cancelable:!0}))}handleTriggerClicks(t){const s=t.target;s.closest(`[data-a11y-dialog-show="${this.id}"]`)&&this.show(t),(s.closest(`[data-a11y-dialog-hide="${this.id}"]`)||s.closest("[data-a11y-dialog-hide]")&&s.closest('[aria-modal="true"]')===this.$el)&&this.hide(t)}bindKeypress(t){var s;((s=document.activeElement)==null?void 0:s.closest('[aria-modal="true"]'))===this.$el&&(t.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&(t.preventDefault(),this.hide(t)),t.key==="Tab"&&P(this.$el,t))}maintainFocus(t){t.target.closest('[aria-modal="true"], [data-a11y-dialog-ignore-focus-trap]')||L(this.$el)}}function q(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new A(e)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",q):q());const B=(e=document.querySelector(".js-modal"))=>{if(e){const t=new A(e),s={x:0,y:0};t.on("show",()=>{s.x=window.scrollX,s.y=window.scrollY,document.body.style.top=`-${s.y}px`,document.body.classList.add("noscroll")}).on("hide",()=>{document.body.classList.remove("noscroll"),document.body.style.top="",window.scroll(s.x,s.y)})}},N=({navigatedList:e,nextBtn:t,prevBtn:s})=>{const i=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth;i&&n?(t.classList.add("o-nav-button--visible"),s.classList.add("o-nav-button--visible")):i?(t.classList.remove("o-nav-button--visible"),s.classList.add("o-nav-button--visible")):n?(t.classList.add("o-nav-button--visible"),s.classList.remove("o-nav-button--visible")):(t.classList.remove("o-nav-button--visible"),s.classList.remove("o-nav-button--visible"))},V=({navigatedList:e,nextBtn:t,prevBtn:s,sliderVariant:i})=>{if(e){const n=e.closest(".js-overview-bar-container"),c=n==null?void 0:n.querySelector(".c-stepper"),a=c==null?void 0:c.querySelectorAll(".c-stepper__item");if(a){const o=Array.from(a).findIndex(l=>l.classList.contains("c-stepper__item--loading"));if(o<0)a[0].classList.add("c-stepper__item--loading");else{a[o].classList.remove("c-stepper__item--loading"),a[o].classList.add("c-stepper__item--loaded");const l=a[o].querySelector(".c-stepper__loader");l&&l instanceof HTMLElement&&(l.style.transition="width 0s linear"),o+1<a.length&&a[o+1].classList.add("c-stepper__item--loading")}}if(e.scrollWidth-e.clientWidth>e.clientWidth){let o=e.scrollLeft;switch(i){case"partners":o+=e.clientWidth+32;break;case"rubrics":o+=e.clientWidth-36;break;case"overviewbar":o+=e.clientWidth-20;break;default:o+=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:o,behavior:"smooth"}),s.classList.add("o-nav-button--visible"),o+e.clientWidth>=e.scrollWidth&&t.classList.remove("o-nav-button--visible")}else{const o=e.scrollWidth-e.clientWidth;e.scrollTo({left:o,behavior:"smooth"}),t.classList.remove("o-nav-button--visible"),s.classList.add("o-nav-button--visible")}}},z=({navigatedList:e,nextBtn:t,prevBtn:s,sliderVariant:i,delay:n})=>{if(e){const c=e.closest(".js-overview-bar-container"),a=c==null?void 0:c.querySelector(".c-stepper"),o=a==null?void 0:a.querySelectorAll(".c-stepper__item");if(o){const l=Array.from(o).findIndex(u=>u.classList.contains("c-stepper__item--loading"));l<0?o[0].classList.add("c-stepper__item--loading"):(o[l].classList.remove("c-stepper__item--loading"),o[l].classList.remove("c-stepper__item--loaded"),l-1>0&&(o[l-1].classList.remove("c-stepper__item--loading"),o[l-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const u=o[l-1].querySelector(".c-stepper__loader");o[l-1].classList.add("c-stepper__item--loading"),u&&u instanceof HTMLElement&&(u.style.transition=`width ${n/1e3}s linear`)},0)))}if(e.clientWidth<e.scrollLeft){let l=e.scrollLeft;switch(i){case"partners":l-=e.clientWidth+32;break;case"rubrics":l-=e.clientWidth-36;break;case"overviewbar":l-=e.clientWidth-24;break;default:l-=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:l,behavior:"smooth"}),t.classList.add("o-nav-button--visible"),l===0&&s.classList.remove("o-nav-button--visible")}else e.scrollTo({left:0,behavior:"smooth"}),s.classList.remove("o-nav-button--visible"),e.clientWidth<e.scrollWidth&&t.classList.add("o-nav-button--visible")}},Y=({navigatedList:e,nextBtn:t,prevBtn:s})=>{N({navigatedList:e,nextBtn:t,prevBtn:s})},U=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:s}=t.dataset,{sliderAuto:i}=t.dataset,{sliderDelay:n}=t.dataset,c=n?parseInt(n,10):3e3,a=t.closest(".js-overview-bar-container"),o=a==null?void 0:a.querySelector(".c-stepper"),l=o==null?void 0:o.querySelectorAll(".c-stepper__item");if(t){const u=t.querySelector(".js-navigation-container__list"),h=t.querySelector(".o-nav-button--next-button"),p=t.querySelector(".o-nav-button--previous-button");if(u&&u.clientWidth<u.scrollWidth&&(h==null||h.classList.add("o-nav-button--visible")),h==null||h.addEventListener("click",V.bind(!1,{navigatedList:u,nextBtn:h,prevBtn:p,sliderVariant:s})),p==null||p.addEventListener("click",z.bind(!1,{navigatedList:u,nextBtn:h,prevBtn:p,sliderVariant:s,delay:c})),i==="true"&&h){const de=o?o.querySelector(".c-stepper__item--loading"):null;l&&(l.forEach(v=>{const b=v.querySelector(".c-stepper__loader");b&&b instanceof HTMLElement&&(b.style.transition=`width ${c/1e3}s linear`)}),de||l[0].classList.add("c-stepper__item--loading")),setInterval(()=>{h.classList.contains("o-nav-button--visible")?h.click():u&&p&&(u.scrollLeft=0,l&&(l.forEach(v=>{const b=v.querySelector(".c-stepper__loader");b&&b instanceof HTMLElement&&(b.style.transition="width 0s linear"),v.classList.remove("c-stepper__item--loading"),v.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{b&&b instanceof HTMLElement&&(b.style.transition=`width ${c/1e3}s linear`)},0)}),setTimeout(()=>{l[0].classList.add("c-stepper__item--loading")},0)),p.click())},c)}}}},X=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:s}=t.dataset;if(t){const i=t.querySelector(".js-navigation-container__list"),n=t.querySelector(".o-nav-button--next-button"),c=t.querySelector(".o-nav-button--previous-button");window.addEventListener("resize",Y.bind(!1,{navigatedList:i,nextBtn:n,prevBtn:c,sliderVariant:s}))}}},G=()=>{const e=document.querySelectorAll(".js-header-link"),t=document.querySelector(".js-overlay");if(t)for(const s of e)s.addEventListener("mouseenter",()=>{const i=s.querySelector(".js-sub-menu");if(i){if(window.getComputedStyle(i).getPropertyValue("display")!=="none"){setTimeout(()=>t.classList.remove("u-hidden"),300);return}t.classList.add("u-hidden")}}),s.addEventListener("mouseleave",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)})},J=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),{documentElement:s}=document;if(!t)return;let i=s.scrollHeight-s.clientHeight;if(!i)return;const n=s.scrollTop;e&&(i=e.scrollHeight-s.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const c=Math.round(n/i*100);t.style.width=`${c}%`,c>=100&&(t.style.width="100%")},Q=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",J)};let g,E=0;const Z=()=>{g=null,document.body.getBoundingClientRect().top>E+2&&(g="up"),document.body.getBoundingClientRect().top<E-2&&(g="down"),E=document.body.getBoundingClientRect().top;const e=document.querySelector(".c-read-also-banner");if(e){const t=e.dataset.bannerLimitTop||"0";g==="up"&&-document.body.getBoundingClientRect().top>=parseInt(t,10)&&(e.classList.remove("c-read-also-banner__scrolldirection--down"),e.style.paddingTop="0.75em",e.style.paddingBottom="0.75em",e.style.borderWidth="1px",e.classList.contains("c-read-also-banner__scrolldirection--up")||e.classList.add("c-read-also-banner__scrolldirection--up")),(g==="down"||-document.body.getBoundingClientRect().top<=parseInt(t,10))&&(e.classList.remove("c-read-also-banner__scrolldirection--up"),e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderWidth="0",e.classList.contains("c-read-also-banner__scrolldirection--down")||e.classList.add("c-read-also-banner__scrolldirection--down"))}},ee=(e=document.querySelector(".c-read-also-banner"))=>{if(e){let t;window.addEventListener("scroll",()=>{clearTimeout(t),t=setTimeout(Z,100)})}},te=e=>{var i;e.preventDefault();const t=e.currentTarget,s=(i=t.closest(".js-search-toggle"))==null?void 0:i.querySelector(".c-search-form");t.setAttribute("aria-hidden","true"),s==null||s.setAttribute("aria-hidden","false")},se=(e=document.querySelector(".js-search-toggle"))=>{if(e){const t=e.querySelector(".c-header__search-button");t==null||t.addEventListener("click",te)}},ie=()=>{if(typeof navigator.share=="function"){const e=document.title,t=window.location.href;navigator.share({title:e,url:t}).then(()=>{console.log("Contenu partagé avec succès")}).catch(s=>{console.log(s)})}},oe=(e=document.querySelector(".js-mobile-share-button"))=>{e&&e.addEventListener("click",ie)},ne=e=>{const{target:t}=e;if(t instanceof Element){const s=t.closest(".c-search-form--button");s&&(e.preventDefault(),s.classList.remove("c-search-form--button"))}},re=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",t=>ne(t))},le=({tabsContainerElement:e,event:t})=>{t.preventDefault();const s=t.target,i=e.querySelectorAll('[role="tab"]'),n=e.querySelectorAll('[role="tabpanel"]'),c=s.getAttribute("aria-controls"),a=Object.values(n).find(o=>o.id===c);i.forEach(o=>{o.setAttribute("aria-selected","false")}),n.forEach(o=>{o.setAttribute("aria-hidden","true")}),s.setAttribute("aria-selected","true"),a&&a.removeAttribute("aria-hidden")},x=e=>e.code==="ArrowLeft"||e.keyCode===39,k=e=>e.code==="ArrowRight"||e.keyCode===37,ce=(e=document.querySelector(".js-tabs"))=>{if(e){const t=e.querySelectorAll('[role="tab"]');t.forEach(i=>{i.addEventListener("click",n=>{le({tabsContainerElement:e,event:n})})});const s=e.querySelector('[role="tablist"]');if(s&&t.length>0){let i=0;s.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(x(n)||k(n))&&(t[i].setAttribute("tabindex","-1"),x(n)?(i+=1,i>=t.length&&(i=0)):k(n)&&(i-=1,i<0&&(i=t.length-1)),t[i].setAttribute("tabindex","0"),t[i].focus())})}}},ae=()=>{C(),ce(),I(),Q(),se(),oe(),B(),ee(),O(),re(),U(),X(),window.layout===d.DESKTOP&&G()};f.initScripts=ae,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});
(function(f,d){typeof exports=="object"&&typeof module<"u"?d(exports):typeof define=="function"&&define.amd?define(["exports"],d):(f=typeof globalThis<"u"?globalThis:f||self,d(f.scripts={}))})(this,function(f){"use strict";var ue=Object.defineProperty;var fe=(f,d,m)=>d in f?ue(f,d,{enumerable:!0,configurable:!0,writable:!0,value:m}):f[d]=m;var _=(f,d,m)=>(fe(f,typeof d!="symbol"?d+"":d,m),m);var d=(e=>(e.MOBILE="mobile",e.DESKTOP="desktop",e))(d||{});const m=e=>{e.stopImmediatePropagation(),e.preventDefault();const t=e.currentTarget,s=t.parentElement,i=s==null?void 0:s.querySelector(`#${t.getAttribute("aria-controls")}`);t.getAttribute("aria-expanded")==="true"?(t.setAttribute("aria-expanded","false"),i==null||i.setAttribute("aria-hidden","true")):(t.setAttribute("aria-expanded","true"),i==null||i.setAttribute("aria-hidden","false"))},I=(e=document.querySelector(".js-collapse__button"))=>{e&&document.querySelectorAll(".c-collapse__button").forEach(s=>{s.addEventListener("click",i=>{m(i)})})},j=e=>{var s;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","true"),t.innerHTML="Voir moins",(s=e.previousElementSibling)==null||s.setAttribute("aria-hidden","false")},W=e=>{var s;const t=e.querySelector(".js-expandButton__label");e.setAttribute("aria-expanded","false"),t.innerHTML="Voir plus",(s=e.previousElementSibling)==null||s.setAttribute("aria-hidden","true")},C=e=>{const t=e.currentTarget;return e.preventDefault(),t.getAttribute("aria-expanded")==="true"?W(t):j(t)},D=(e=document.querySelector(".js-expandButton"))=>{e&&document.querySelectorAll(".js-expandButton").forEach(s=>s.addEventListener("click",C))},F=e=>{const t=e.querySelector(".js-live-form__textarea"),s=e.querySelector("#live-form-submit-section");t==null||t.setAttribute("aria-expanded","true"),s==null||s.setAttribute("aria-hidden","false")},O=()=>{const e=document.querySelector(".js-live-form");if(e){const t=e.querySelector(".js-live-form__textarea textarea");t==null||t.addEventListener("focus",F.bind(!1,e))}},r={inert:":not([inert]):not([inert] *)",negTabIndex:':not([tabindex^="-"])',disabled:":not(:disabled)"};var R=[`a[href]${r.inert}${r.negTabIndex}`,`area[href]${r.inert}${r.negTabIndex}`,`input:not([type="hidden"]):not([type="radio"])${r.inert}${r.negTabIndex}${r.disabled}`,`input[type="radio"]${r.inert}${r.negTabIndex}${r.disabled}`,`select${r.inert}${r.negTabIndex}${r.disabled}`,`textarea${r.inert}${r.negTabIndex}${r.disabled}`,`button${r.inert}${r.negTabIndex}${r.disabled}`,`details${r.inert} > summary:first-of-type${r.negTabIndex}`,`iframe${r.inert}${r.negTabIndex}`,`audio[controls]${r.inert}${r.negTabIndex}`,`video[controls]${r.inert}${r.negTabIndex}`,`[contenteditable]${r.inert}${r.negTabIndex}`,`[tabindex]${r.inert}${r.negTabIndex}`];function L(e){(e.querySelector("[autofocus]")||e).focus()}function H(e){const t=y(e,!0),s=t?y(e,!1)||t:null;return[t,s]}function y(e,t){if(t&&T(e))return e;if(K(e))if(e.shadowRoot){let s=w(e.shadowRoot,t);for(;s;){const i=y(s,t);if(i)return i;s=$(s,t)}}else if(e.localName==="slot"){const s=e.assignedElements({flatten:!0});t||s.reverse();for(const i of s){const n=y(i,t);if(n)return n}}else{let s=w(e,t);for(;s;){const i=y(s,t);if(i)return i;s=$(s,t)}}return!t&&T(e)?e:null}function w(e,t){return t?e.firstElementChild:e.lastElementChild}function $(e,t){return t?e.nextElementSibling:e.previousElementSibling}const M=e=>e.matches("details:not([open]) *")&&!e.matches("details>summary:first-of-type")?!0:!(e.offsetWidth||e.offsetHeight||e.getClientRects().length),T=e=>{var t;return(t=e.shadowRoot)!=null&&t.delegatesFocus?!1:e.matches(R.join(","))&&!M(e)};function K(e){return e.shadowRoot&&e.getAttribute("tabindex")==="-1"?!1:!e.matches(":disabled,[hidden],[inert]")}function S(e=document){const t=e.activeElement;return t?t.shadowRoot?S(t.shadowRoot)||document.activeElement:t:null}function P(e,t){const[s,i]=H(e);if(!s)return t.preventDefault();const n=S();t.shiftKey&&n===s?(i.focus(),t.preventDefault()):!t.shiftKey&&n===i&&(s.focus(),t.preventDefault())}class A{constructor(t){_(this,"$el");_(this,"id");_(this,"previouslyFocused");_(this,"shown");this.$el=t,this.id=this.$el.getAttribute("data-a11y-dialog")||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0)),this.fire("destroy"),this}show(t){var s;return this.shown?this:(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=S(),((s=this.previouslyFocused)==null?void 0:s.tagName)==="BODY"&&(t!=null&&t.target)&&(this.previouslyFocused=t.target),L(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0),this.fire("show",t),this)}hide(t){var s,i;return this.shown?(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),(i=(s=this.previouslyFocused)==null?void 0:s.focus)==null||i.call(s),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.fire("hide",t),this):this}on(t,s,i){return this.$el.addEventListener(t,s,i),this}off(t,s,i){return this.$el.removeEventListener(t,s,i),this}fire(t,s){this.$el.dispatchEvent(new CustomEvent(t,{detail:s,cancelable:!0}))}handleTriggerClicks(t){const s=t.target;s.closest(`[data-a11y-dialog-show="${this.id}"]`)&&this.show(t),(s.closest(`[data-a11y-dialog-hide="${this.id}"]`)||s.closest("[data-a11y-dialog-hide]")&&s.closest('[aria-modal="true"]')===this.$el)&&this.hide(t)}bindKeypress(t){var s;((s=document.activeElement)==null?void 0:s.closest('[aria-modal="true"]'))===this.$el&&(t.key==="Escape"&&this.$el.getAttribute("role")!=="alertdialog"&&(t.preventDefault(),this.hide(t)),t.key==="Tab"&&P(this.$el,t))}maintainFocus(t){t.target.closest('[aria-modal="true"], [data-a11y-dialog-ignore-focus-trap]')||L(this.$el)}}function q(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new A(e)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",q):q());const B=()=>document.querySelectorAll(".js-modal").forEach(e=>{const t=new A(e),s={x:0,y:0};t.on("show",()=>{s.x=window.scrollX,s.y=window.scrollY,document.body.classList.add("noscroll"),document.body.style.top=`-${s.y}px`}).on("hide",()=>{document.body.classList.remove("noscroll"),document.body.style.top="",(window.scrollY!==s.y||window.scrollX!==s.x)&&window.scroll(s.x,s.y)})}),N=({navigatedList:e,nextBtn:t,prevBtn:s})=>{const i=e.scrollLeft>0,n=e.scrollLeft+e.clientWidth<e.scrollWidth;i&&n?(t.classList.add("o-nav-button--visible"),s.classList.add("o-nav-button--visible")):i?(t.classList.remove("o-nav-button--visible"),s.classList.add("o-nav-button--visible")):n?(t.classList.add("o-nav-button--visible"),s.classList.remove("o-nav-button--visible")):(t.classList.remove("o-nav-button--visible"),s.classList.remove("o-nav-button--visible"))},V=({navigatedList:e,nextBtn:t,prevBtn:s,sliderVariant:i})=>{if(e){const n=e.closest(".js-overview-bar-container"),c=n==null?void 0:n.querySelector(".c-stepper"),a=c==null?void 0:c.querySelectorAll(".c-stepper__item");if(a){const o=Array.from(a).findIndex(l=>l.classList.contains("c-stepper__item--loading"));if(o<0)a[0].classList.add("c-stepper__item--loading");else{a[o].classList.remove("c-stepper__item--loading"),a[o].classList.add("c-stepper__item--loaded");const l=a[o].querySelector(".c-stepper__loader");l&&l instanceof HTMLElement&&(l.style.transition="width 0s linear"),o+1<a.length&&a[o+1].classList.add("c-stepper__item--loading")}}if(e.scrollWidth-e.clientWidth>e.clientWidth){let o=e.scrollLeft;switch(i){case"partners":o+=e.clientWidth+32;break;case"rubrics":o+=e.clientWidth-36;break;case"overviewbar":o+=e.clientWidth-20;break;default:o+=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:o,behavior:"smooth"}),s.classList.add("o-nav-button--visible"),o+e.clientWidth>=e.scrollWidth&&t.classList.remove("o-nav-button--visible")}else{const o=e.scrollWidth-e.clientWidth;e.scrollTo({left:o,behavior:"smooth"}),t.classList.remove("o-nav-button--visible"),s.classList.add("o-nav-button--visible")}}},z=({navigatedList:e,nextBtn:t,prevBtn:s,sliderVariant:i,delay:n})=>{if(e){const c=e.closest(".js-overview-bar-container"),a=c==null?void 0:c.querySelector(".c-stepper"),o=a==null?void 0:a.querySelectorAll(".c-stepper__item");if(o){const l=Array.from(o).findIndex(u=>u.classList.contains("c-stepper__item--loading"));l<0?o[0].classList.add("c-stepper__item--loading"):(o[l].classList.remove("c-stepper__item--loading"),o[l].classList.remove("c-stepper__item--loaded"),l-1>0&&(o[l-1].classList.remove("c-stepper__item--loading"),o[l-1].classList.remove("c-stepper__item--loaded"),setTimeout(()=>{const u=o[l-1].querySelector(".c-stepper__loader");o[l-1].classList.add("c-stepper__item--loading"),u&&u instanceof HTMLElement&&(u.style.transition=`width ${n/1e3}s linear`)},0)))}if(e.clientWidth<e.scrollLeft){let l=e.scrollLeft;switch(i){case"partners":l-=e.clientWidth+32;break;case"rubrics":l-=e.clientWidth-36;break;case"overviewbar":l-=e.clientWidth-24;break;default:l-=Math.ceil(e.clientWidth*.6);break}e.scrollTo({left:l,behavior:"smooth"}),t.classList.add("o-nav-button--visible"),l===0&&s.classList.remove("o-nav-button--visible")}else e.scrollTo({left:0,behavior:"smooth"}),s.classList.remove("o-nav-button--visible"),e.clientWidth<e.scrollWidth&&t.classList.add("o-nav-button--visible")}},Y=({navigatedList:e,nextBtn:t,prevBtn:s})=>{N({navigatedList:e,nextBtn:t,prevBtn:s})},X=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:s}=t.dataset,{sliderAuto:i}=t.dataset,{sliderDelay:n}=t.dataset,c=n?parseInt(n,10):3e3,a=t.closest(".js-overview-bar-container"),o=a==null?void 0:a.querySelector(".c-stepper"),l=o==null?void 0:o.querySelectorAll(".c-stepper__item");if(t){const u=t.querySelector(".js-navigation-container__list"),h=t.querySelector(".o-nav-button--next-button"),p=t.querySelector(".o-nav-button--previous-button");if(u&&u.clientWidth<u.scrollWidth&&(h==null||h.classList.add("o-nav-button--visible")),h==null||h.addEventListener("click",V.bind(!1,{navigatedList:u,nextBtn:h,prevBtn:p,sliderVariant:s})),p==null||p.addEventListener("click",z.bind(!1,{navigatedList:u,nextBtn:h,prevBtn:p,sliderVariant:s,delay:c})),i==="true"&&h){const de=o?o.querySelector(".c-stepper__item--loading"):null;l&&(l.forEach(v=>{const b=v.querySelector(".c-stepper__loader");b&&b instanceof HTMLElement&&(b.style.transition=`width ${c/1e3}s linear`)}),de||l[0].classList.add("c-stepper__item--loading")),setInterval(()=>{h.classList.contains("o-nav-button--visible")?h.click():u&&p&&(u.scrollLeft=0,l&&(l.forEach(v=>{const b=v.querySelector(".c-stepper__loader");b&&b instanceof HTMLElement&&(b.style.transition="width 0s linear"),v.classList.remove("c-stepper__item--loading"),v.classList.remove("c-stepper__item--loaded"),setTimeout(()=>{b&&b instanceof HTMLElement&&(b.style.transition=`width ${c/1e3}s linear`)},0)}),setTimeout(()=>{l[0].classList.add("c-stepper__item--loading")},0)),p.click())},c)}}}},U=()=>{const e=document.querySelectorAll(".js-navigation-container");for(const t of Array.from(e)){const{sliderVariant:s}=t.dataset;if(t){const i=t.querySelector(".js-navigation-container__list"),n=t.querySelector(".o-nav-button--next-button"),c=t.querySelector(".o-nav-button--previous-button");window.addEventListener("resize",Y.bind(!1,{navigatedList:i,nextBtn:n,prevBtn:c,sliderVariant:s}))}}},G=()=>{const e=document.querySelectorAll(".js-header-link"),t=document.querySelector(".js-overlay");if(t)for(const s of e)s.addEventListener("mouseenter",()=>{const i=s.querySelector(".js-sub-menu");if(i){if(window.getComputedStyle(i).getPropertyValue("display")!=="none"){setTimeout(()=>t.classList.remove("u-hidden"),300);return}t.classList.add("u-hidden")}}),s.addEventListener("mouseleave",()=>{setTimeout(()=>t.classList.add("u-hidden"),300)})},J=()=>{const e=document.querySelector(".js-limit-scroll-progress-bar"),t=document.querySelector(".c-progress__bar"),{documentElement:s}=document;if(!t)return;let i=s.scrollHeight-s.clientHeight;if(!i)return;const n=s.scrollTop;e&&(i=e.scrollHeight-s.clientHeight+(window.pageYOffset+e.getBoundingClientRect().top));const c=Math.round(n/i*100);t.style.width=`${c}%`,c>=100&&(t.style.width="100%")},Q=()=>{document.querySelector(".c-progress")&&window.addEventListener("scroll",J)};let g,E=0;const Z=()=>{g=null,document.body.getBoundingClientRect().top>E+2&&(g="up"),document.body.getBoundingClientRect().top<E-2&&(g="down"),E=document.body.getBoundingClientRect().top;const e=document.querySelector(".c-read-also-banner");if(e){const t=e.dataset.bannerLimitTop||"0";g==="up"&&-document.body.getBoundingClientRect().top>=parseInt(t,10)&&(e.classList.remove("c-read-also-banner__scrolldirection--down"),e.style.paddingTop="0.75em",e.style.paddingBottom="0.75em",e.style.borderWidth="1px",e.classList.contains("c-read-also-banner__scrolldirection--up")||e.classList.add("c-read-also-banner__scrolldirection--up")),(g==="down"||-document.body.getBoundingClientRect().top<=parseInt(t,10))&&(e.classList.remove("c-read-also-banner__scrolldirection--up"),e.style.paddingTop="0",e.style.paddingBottom="0",e.style.borderWidth="0",e.classList.contains("c-read-also-banner__scrolldirection--down")||e.classList.add("c-read-also-banner__scrolldirection--down"))}},ee=(e=document.querySelector(".c-read-also-banner"))=>{if(e){let t;window.addEventListener("scroll",()=>{clearTimeout(t),t=setTimeout(Z,100)})}},te=e=>{var i;e.preventDefault();const t=e.currentTarget,s=(i=t.closest(".js-search-toggle"))==null?void 0:i.querySelector(".c-search-form");t.setAttribute("aria-hidden","true"),s==null||s.setAttribute("aria-hidden","false")},se=(e=document.querySelector(".js-search-toggle"))=>{if(e){const t=e.querySelector(".c-header__search-button");t==null||t.addEventListener("click",te)}},ie=()=>{if(typeof navigator.share=="function"){const e=document.title,t=window.location.href;navigator.share({title:e,url:t}).then(()=>{console.log("Contenu partagé avec succès")}).catch(s=>{console.log(s)})}},oe=(e=document.querySelector(".js-mobile-share-button"))=>{e&&e.addEventListener("click",ie)},ne=e=>{const{target:t}=e;if(t instanceof Element){const s=t.closest(".c-search-form--button");s&&(e.preventDefault(),s.classList.remove("c-search-form--button"))}},re=(e=document.querySelector(".c-search-form--button"))=>{e&&e.addEventListener("click",t=>ne(t))},le=({tabsContainerElement:e,event:t})=>{t.preventDefault();const s=t.target,i=e.querySelectorAll('[role="tab"]'),n=e.querySelectorAll('[role="tabpanel"]'),c=s.getAttribute("aria-controls"),a=Object.values(n).find(o=>o.id===c);i.forEach(o=>{o.setAttribute("aria-selected","false")}),n.forEach(o=>{o.setAttribute("aria-hidden","true")}),s.setAttribute("aria-selected","true"),a&&a.removeAttribute("aria-hidden")},x=e=>e.code==="ArrowLeft"||e.keyCode===39,k=e=>e.code==="ArrowRight"||e.keyCode===37,ce=(e=document.querySelector(".js-tabs"))=>{if(e){const t=e.querySelectorAll('[role="tab"]');t.forEach(i=>{i.addEventListener("click",n=>{le({tabsContainerElement:e,event:n})})});const s=e.querySelector('[role="tablist"]');if(s&&t.length>0){let i=0;s.addEventListener("keydown",n=>{n instanceof KeyboardEvent&&(x(n)||k(n))&&(t[i].setAttribute("tabindex","-1"),x(n)?(i+=1,i>=t.length&&(i=0)):k(n)&&(i-=1,i<0&&(i=t.length-1)),t[i].setAttribute("tabindex","0"),t[i].focus())})}}},ae=()=>{D(),ce(),I(),Q(),se(),oe(),B(),ee(),O(),re(),X(),U(),window.layout===d.DESKTOP&&G()};f.initScripts=ae,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});

@@ -1,1 +0,1 @@

export declare const listenerOfModal: (modalContainer?: null | HTMLDivElement) => void;
export declare const listenerOfModal: () => void;

@@ -16,2 +16,3 @@ import React from 'react';

export declare const ErrorFill: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./Alert").AlertProps>;
export declare const WarningFill: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./Alert").AlertProps>;
export declare const SuccessWithIcon: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("./Alert").AlertProps>;

@@ -146,2 +146,5 @@ export declare const tokenVariables: {

};
info: {
value: string;
};
instagram: {

@@ -148,0 +151,0 @@ value: string;

{
"name": "@20minutes/hela",
"version": "0.1.142",
"version": "0.1.143",
"repository": "git@github.com:20minutes/hela.git",

@@ -65,24 +65,24 @@ "license": "MIT",

"@20minutes/eslint-config": "^1.2.6",
"@aws-sdk/client-s3": "3.417.0",
"@babel/core": "^7.22.20",
"@aws-sdk/client-s3": "3.420.0",
"@babel/core": "^7.23.0",
"@babel/eslint-parser": "^7.22.15",
"@babel/plugin-transform-typescript": "^7.22.15",
"@csstools/postcss-sass": "^5.0.1",
"@octokit/core": "5.0.0",
"@storybook/addon-actions": "^7.4.3",
"@storybook/addon-essentials": "^7.4.3",
"@storybook/addon-links": "^7.4.3",
"@storybook/addon-mdx-gfm": "^7.4.3",
"@storybook/blocks": "^7.4.3",
"@storybook/react": "^7.4.3",
"@storybook/react-vite": "^7.4.3",
"@octokit/core": "5.0.1",
"@storybook/addon-actions": "^7.4.5",
"@storybook/addon-essentials": "^7.4.5",
"@storybook/addon-links": "^7.4.5",
"@storybook/addon-mdx-gfm": "^7.4.5",
"@storybook/blocks": "^7.4.5",
"@storybook/react": "^7.4.5",
"@storybook/react-vite": "^7.4.5",
"@svgr/cli": "^8.1.0",
"@testing-library/react": "^14.0.0",
"@types/merge-stream": "^1.1.2",
"@types/node": "^20.6.3",
"@types/react": "^18.2.22",
"@types/node": "^20.7.0",
"@types/react": "^18.2.23",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"@vitejs/plugin-react": "^4.0.4",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"@vitejs/plugin-react": "^4.1.0",
"@whitespace/storybook-addon-html": "^5.1.6",

@@ -93,6 +93,6 @@ "autoprefixer": "^10.4.16",

"babel-preset-react": "^6.24.1",
"eslint": "^8.49.0",
"eslint": "^8.50.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-babel": "^5.3.1",

@@ -117,4 +117,4 @@ "eslint-plugin-import": "^2.28.1",

"rollup-plugin-visualizer": "^5.9.2",
"sass": "^1.67.0",
"storybook": "^7.4.3",
"sass": "^1.68.0",
"storybook": "^7.4.5",
"style-dictionary": "^3.8.0",

@@ -128,5 +128,5 @@ "stylelint": "^15.10.3",

"vite": "^4.4.9",
"vite-plugin-dts": "^3.5.3",
"vite-plugin-dts": "^3.6.0",
"vite-tsconfig-paths": "^4.2.1",
"vitest": "^0.34.4"
"vitest": "^0.34.5"
},

@@ -133,0 +133,0 @@ "resolutions": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc