@ebrains/vue 0.2.0-alpha.0 → 0.3.0-alpha.0
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/{color-primary-palette_6.entry-CfqMCd3g.mjs → color-primary-palette_6.entry-WwN9tuB9.mjs} +17 -17
- package/color-primary-palette_6.entry-_ANGnnBl.js +1 -0
- package/correct-use-of-colors.entry-B312hpv9.js +1 -0
- package/correct-use-of-colors.entry-BjxRVkfm.mjs +59 -0
- package/{eds-accordion.entry-BsT7Ved4.mjs → eds-accordion.entry-RvtdAQT0.mjs} +1 -1
- package/{eds-accordion.entry-BvDNoDvv.js → eds-accordion.entry-h9ApF51u.js} +1 -1
- package/eds-alert.entry-C6VZ3ss6.js +608 -0
- package/eds-alert.entry-D5o-ZjCb.mjs +688 -0
- package/eds-avatar_17.entry-08AUpBqo.mjs +15630 -0
- package/eds-avatar_17.entry-BQZz43q9.js +14540 -0
- package/eds-card-desc_3.entry-D7hiMZ09.mjs +87 -0
- package/eds-card-desc_3.entry-Dxs_izUN.js +1 -0
- package/eds-card-generic.entry-0IAAHjtS.mjs +63 -0
- package/eds-card-generic.entry-DZYZP5oa.js +1 -0
- package/{eds-card-project.entry-CKYhNPPH.mjs → eds-card-project.entry-Ckgpwy2Y.mjs} +1 -1
- package/{eds-card-project.entry-XK15egnP.js → eds-card-project.entry-D7P4K88F.js} +1 -1
- package/{eds-card-section.entry-B7jR75ty.js → eds-card-section.entry-B90kv8Pj.js} +1 -1
- package/{eds-card-section.entry-x8CPk5NZ.mjs → eds-card-section.entry-DnktDeDm.mjs} +15 -9
- package/{eds-card-tags.entry-CndclGXB.js → eds-card-tags.entry-CnHitp9l.js} +1 -1
- package/{eds-card-tags.entry-Bvn8dDXI.mjs → eds-card-tags.entry-XboLA5-P.mjs} +1 -1
- package/{eds-card-tool.entry-DZqHML8u.js → eds-card-tool.entry-CbreK2xg.js} +1 -1
- package/{eds-card-tool.entry-DFuXjfhh.mjs → eds-card-tool.entry-CmRu6pmc.mjs} +1 -1
- package/{eds-card-wrapper.entry-DNnlCvMe.mjs → eds-card-wrapper.entry-Buesg37A.mjs} +1 -1
- package/{eds-card-wrapper.entry-C_r0u0Fd.js → eds-card-wrapper.entry-rBHdbwzh.js} +1 -1
- package/{eds-code-block.entry-DwfHDe4j.mjs → eds-code-block.entry-DKnuVY85.mjs} +1 -1
- package/{eds-code-block.entry-ClmjgThG.js → eds-code-block.entry-M3x0FsRB.js} +1 -1
- package/{eds-components-section.entry-BSRNSdwF.mjs → eds-components-section.entry-BAWU9rKy.mjs} +93 -42
- package/eds-components-section.entry-BEBky2Me.js +132 -0
- package/{eds-docs-palettes.entry-Gi9kzOYC.js → eds-docs-palettes.entry-D3DdXkoo.js} +1 -1
- package/{eds-docs-palettes.entry-BlQEI2Bl.mjs → eds-docs-palettes.entry-etHagd2P.mjs} +2 -2
- package/{eds-docs-tokens.entry-G6O1zRxS.js → eds-docs-tokens.entry--gW4Z293.js} +1 -1
- package/{eds-docs-tokens.entry-Bxzd9uSz.mjs → eds-docs-tokens.entry-CIGNTs97.mjs} +2 -2
- package/eds-form.entry-D8FLPsaS.js +7153 -0
- package/eds-form.entry-zewjTpaa.mjs +7319 -0
- package/{eds-frame.entry-Bz-23eT7.js → eds-frame.entry-BlOnLCrI.js} +1 -1
- package/{eds-frame.entry-YVbNIAAz.mjs → eds-frame.entry-SCGm_pju.mjs} +1 -1
- package/{eds-icon-arrow-diagonal.entry-Ky6NoFbS.mjs → eds-icon-arrow-diagonal.entry-CEffhVkn.mjs} +1 -1
- package/{eds-icon-arrow-diagonal.entry-C06V6TIW.js → eds-icon-arrow-diagonal.entry-abxXXnCe.js} +1 -1
- package/{eds-icon-arrow-right.entry-Dv17zi29.js → eds-icon-arrow-right.entry-4zl098Gq.js} +1 -1
- package/{eds-icon-arrow-right.entry-BPHnm7pX.mjs → eds-icon-arrow-right.entry-DrA5pZ5q.mjs} +1 -1
- package/{eds-icon-bluesky.entry-DQshm0EA.js → eds-icon-bluesky.entry-BDD9os2p.js} +1 -1
- package/{eds-icon-bluesky.entry-7_AzEVLl.mjs → eds-icon-bluesky.entry-CRey5aEK.mjs} +1 -1
- package/{eds-icon-chevron-down.entry-BlnVbI1I.js → eds-icon-chevron-down.entry-DA_Mq25N.js} +1 -1
- package/{eds-icon-chevron-down.entry-DkcBkTRK.mjs → eds-icon-chevron-down.entry-DCd5FfEN.mjs} +1 -1
- package/{eds-icon-chevron-left.entry-BTxaVVnF.js → eds-icon-chevron-left.entry-CiGlPKup.js} +1 -1
- package/{eds-icon-chevron-left.entry-BwhZiPKE.mjs → eds-icon-chevron-left.entry-Lmfmw6QC.mjs} +1 -1
- package/{eds-icon-chevron-right.entry-BPKLFXW0.mjs → eds-icon-chevron-right.entry-B2HI3b59.mjs} +1 -1
- package/{eds-icon-chevron-right.entry-c4irNhqS.js → eds-icon-chevron-right.entry-DMwxsQGs.js} +1 -1
- package/{eds-icon-chevron-up.entry-oja5yYhS.mjs → eds-icon-chevron-up.entry-CwavCcA0.mjs} +1 -1
- package/{eds-icon-chevron-up.entry-CFiZyc6u.js → eds-icon-chevron-up.entry-D9pmuoVK.js} +1 -1
- package/{eds-icon-close.entry-DQD_dDo5.js → eds-icon-close.entry-JIzBTjIa.js} +1 -1
- package/{eds-icon-close.entry-5BdzrFmk.mjs → eds-icon-close.entry-pxvkbolY.mjs} +1 -1
- package/{eds-icon-copy.entry-jpUaAQ7k.mjs → eds-icon-copy.entry-Begn9c9I.mjs} +1 -1
- package/{eds-icon-copy.entry-CQ237xrq.js → eds-icon-copy.entry-Ccrvu27o.js} +1 -1
- package/{eds-icon-eu.entry-CjCnJWwP.js → eds-icon-eu.entry-C0ZIqXHV.js} +1 -1
- package/{eds-icon-eu.entry-gJ234Xni.mjs → eds-icon-eu.entry-CLI94rkv.mjs} +1 -1
- package/{eds-icon-facebook.entry-BHUSe9LK.js → eds-icon-facebook.entry-BIZwxPBr.js} +1 -1
- package/{eds-icon-facebook.entry-Ch94iA-s.mjs → eds-icon-facebook.entry-o2SylrAp.mjs} +1 -1
- package/{eds-icon-gitlab.entry-j6RBYOBc.js → eds-icon-gitlab.entry-BJi35Zov.js} +1 -1
- package/{eds-icon-gitlab.entry-B06LmNCU.mjs → eds-icon-gitlab.entry-BWfZkXKF.mjs} +1 -1
- package/{eds-icon-linkedin.entry-DouHzclR.js → eds-icon-linkedin.entry-B4ev6evD.js} +1 -1
- package/{eds-icon-linkedin.entry-CMW1rKpG.mjs → eds-icon-linkedin.entry-Z4gD9HGr.mjs} +1 -1
- package/{eds-icon-loader.entry-BlGbpEzt.js → eds-icon-loader.entry-BFeh0vtX.js} +1 -1
- package/{eds-icon-loader.entry-Cx_ffiBq.mjs → eds-icon-loader.entry-DgIgWpYk.mjs} +1 -1
- package/{eds-icon-mastodon.entry-Cpl3lSng.js → eds-icon-mastodon.entry-BLCaUfQY.js} +1 -1
- package/{eds-icon-mastodon.entry-C4ITVPfN.mjs → eds-icon-mastodon.entry-C_2paQis.mjs} +1 -1
- package/{eds-icon-menu.entry-DvQARmJU.mjs → eds-icon-menu.entry-CNtaXAOo.mjs} +1 -1
- package/{eds-icon-menu.entry-BcPeEfV2.js → eds-icon-menu.entry-CzF-GJXn.js} +1 -1
- package/{eds-icon-more.entry-BoAVOpyT.mjs → eds-icon-more.entry-4gqxzs_k.mjs} +1 -1
- package/{eds-icon-more.entry-m61loZHO.js → eds-icon-more.entry-C-v0Cjp9.js} +1 -1
- package/{eds-icon-search.entry-D-nQvhug.mjs → eds-icon-search.entry-D070uKfZ.mjs} +1 -1
- package/{eds-icon-search.entry-BJMtVlnR.js → eds-icon-search.entry-iLCAU3Et.js} +1 -1
- package/{eds-icon-success.entry-D8S7QlRm.mjs → eds-icon-success.entry-Ci0RTnP5.mjs} +1 -1
- package/{eds-icon-success.entry-DvIchNgX.js → eds-icon-success.entry-DSukl_w-.js} +1 -1
- package/{eds-icon-twitter.entry-DD48tnaV.mjs → eds-icon-twitter.entry-D6I83zuS.mjs} +1 -1
- package/{eds-icon-twitter.entry-CD1nT3iI.js → eds-icon-twitter.entry-I9FRjdSE.js} +1 -1
- package/{eds-icon-user.entry-DSPBBAZa.mjs → eds-icon-user.entry-BI7Uw3Pp.mjs} +1 -1
- package/{eds-icon-user.entry-DDRH46_Z.js → eds-icon-user.entry-DcLB78T6.js} +1 -1
- package/{eds-icon-youtube.entry-BRyOsCV-.mjs → eds-icon-youtube.entry-CR4ml_RW.mjs} +1 -1
- package/{eds-icon-youtube.entry-CfpQHgDF.js → eds-icon-youtube.entry-DAke-XDg.js} +1 -1
- package/eds-input_7.entry-BV0VagCj.js +7167 -0
- package/eds-input_7.entry-CRNkC-uR.mjs +7368 -0
- package/{eds-login.entry-CY0ZugpF.js → eds-login.entry-DOeyfoyM.js} +1 -1
- package/{eds-login.entry-bC6f6bvF.mjs → eds-login.entry-DmJw6ABI.mjs} +7 -7
- package/eds-logo-variations.entry-U65PDVhE.js +1 -0
- package/eds-logo-variations.entry-o4lyGmhR.mjs +22 -0
- package/{eds-matomo-notice.entry-DanLI8VZ.js → eds-matomo-notice.entry-tzuOtKT9.js} +1 -1
- package/{eds-matomo-notice.entry-DGHq-ICP.mjs → eds-matomo-notice.entry-y5SvHzsZ.mjs} +1 -1
- package/{eds-modal.entry-TMxTmjgT.js → eds-modal.entry-B7Ph4m3y.js} +1 -1
- package/{eds-modal.entry-Bikh63fB.mjs → eds-modal.entry-BW8crUoC.mjs} +1 -1
- package/{eds-navigator.entry-D-fIKqub.mjs → eds-navigator.entry-CvKDpQVM.mjs} +1 -1
- package/{eds-navigator.entry-CUAf3hTM.js → eds-navigator.entry-DixbL3UY.js} +1 -1
- package/eds-pagination_2.entry-CRrIKRa-.mjs +241 -0
- package/eds-pagination_2.entry-DoZ-NFBH.js +1 -0
- package/eds-progress-bar.entry-Bmjv2r3W.js +1 -0
- package/eds-progress-bar.entry-sdqDGSI3.mjs +21 -0
- package/{eds-rating.entry-B2lhi19L.mjs → eds-rating.entry-J5lQt6oj.mjs} +1 -1
- package/{eds-rating.entry-BdE-bKae.js → eds-rating.entry-dK5fopCq.js} +1 -1
- package/{eds-section-core_2.entry-BRNJshCh.js → eds-section-core_2.entry-DBjBQ_AT.js} +1 -1
- package/{eds-section-core_2.entry-CqFyAWoq.mjs → eds-section-core_2.entry-cwkrHET8.mjs} +1 -1
- package/{eds-svg-repository.entry-BdZya_DA.js → eds-svg-repository.entry-BEJBJ538.js} +12 -12
- package/{eds-svg-repository.entry-qaL9fhLI.mjs → eds-svg-repository.entry-UvAba6M3.mjs} +71 -65
- package/{eds-tab.entry-BqqMdTQv.mjs → eds-tab.entry-CR1nFyrH.mjs} +1 -1
- package/{eds-tab.entry-C6q7naM_.js → eds-tab.entry-uQka8MTr.js} +1 -1
- package/{eds-tabs-content.entry-D9b289Td.mjs → eds-tabs-content.entry-BKT7-iAV.mjs} +3 -3
- package/{eds-tabs-content.entry-H__1SNbo.js → eds-tabs-content.entry-CTM0EjTl.js} +1 -1
- package/{eds-tabs.entry-KsWwc6xS.mjs → eds-tabs.entry-BKx8xHJ8.mjs} +23 -6
- package/eds-tabs.entry-BWxSN8SV.js +1 -0
- package/eds-timeline.entry-B7jxBFA4.mjs +51 -0
- package/eds-timeline.entry-D9KWrb_r.js +1 -0
- package/{eds-tooltip.entry-BI1EvTiw.js → eds-tooltip.entry-CfhqHRxF.js} +1 -1
- package/{eds-tooltip.entry-ByxJjA_6.mjs → eds-tooltip.entry-DJqN6_P4.mjs} +1 -1
- package/eds-trl.entry-COK7rgVS.mjs +36 -0
- package/eds-trl.entry-CoySvAJL.js +1 -0
- package/generated/components.d.ts +2 -0
- package/incorrect-use-of-colors.entry-D7xAYXu2.js +1 -0
- package/incorrect-use-of-colors.entry-DsNEjuWo.mjs +42 -0
- package/{index-DQrtrXyM.mjs → index-Dg2DO7q4.mjs} +235 -206
- package/index-Dvww9rdy.js +21 -0
- package/index.js +1 -1
- package/index.mjs +21 -19
- package/{logo-space.entry-OauRHmO8.mjs → logo-space.entry-Cf-keXHv.mjs} +4 -4
- package/{logo-space.entry-DpgwdyOK.js → logo-space.entry-DC5fUroI.js} +1 -1
- package/logo-variations-horizontal_2.entry-BWau6qh4.js +7 -0
- package/logo-variations-horizontal_2.entry-xvJ8Iiu5.mjs +29 -0
- package/logo-wrong-usage.entry-RcSb8NIe.mjs +14 -0
- package/logo-wrong-usage.entry-sU8NISwX.js +1 -0
- package/package.json +2 -2
- package/{token-list_3.entry-CVZDegic.js → token-list_3.entry-BkOkChEb.js} +1 -1
- package/{token-list_3.entry-Ca9muGhp.mjs → token-list_3.entry-CheMK1r_.mjs} +4 -4
- package/{token-ratios.entry-DGMJ2vJj.js → token-ratios.entry-Dfz4q4qy.js} +1 -1
- package/{token-ratios.entry-D3JWYlHy.mjs → token-ratios.entry-rSMXHIix.mjs} +2 -2
- package/token-spacing.entry-ByzbVlGi.js +1 -0
- package/token-spacing.entry-DvopunO1.mjs +12 -0
- package/{token-typography.entry-C8CdhyIM.js → token-typography.entry-AjIHL4M4.js} +1 -1
- package/{token-typography.entry-DwUOTznz.mjs → token-typography.entry-CExckWkx.mjs} +2 -2
- package/color-primary-palette_6.entry-CoXWiKJ3.js +0 -1
- package/correct-use-of-colors.entry-CfXsWbhB.js +0 -1
- package/correct-use-of-colors.entry-CotQESQa.mjs +0 -59
- package/eds-alert_28.entry-Ctl9tHqr.js +0 -29465
- package/eds-alert_28.entry-DbTB72ow.mjs +0 -30921
- package/eds-block-break.entry-B8gP4ig9.mjs +0 -13
- package/eds-block-break.entry-L9LG-PtO.js +0 -1
- package/eds-breadcrumb.entry-C6mAAYNs.js +0 -1
- package/eds-breadcrumb.entry-Dio_2hx4.mjs +0 -114
- package/eds-components-section.entry-8sEheaoX.js +0 -130
- package/eds-footer.entry-9xXgg22T.mjs +0 -29
- package/eds-footer.entry-DqnRHQ32.js +0 -1
- package/eds-fullscreen-menu.entry-4kxB1p-j.mjs +0 -74
- package/eds-fullscreen-menu.entry-DwOubHgX.js +0 -1
- package/eds-pagination.entry-C8g4pxcm.js +0 -1
- package/eds-pagination.entry-D6iJH84k.mjs +0 -128
- package/eds-social-networks.entry-6VfWBLuR.js +0 -1
- package/eds-social-networks.entry-BgiRVGXx.mjs +0 -50
- package/eds-table.entry-BojRZdP2.mjs +0 -112
- package/eds-table.entry-ShWS4LWJ.js +0 -1
- package/eds-tabs.entry-DGHlnSwh.js +0 -1
- package/incorrect-use-of-colors.entry-C7xABbpE.js +0 -1
- package/incorrect-use-of-colors.entry-DNOV6p4p.mjs +0 -42
- package/index-BGGkUjck.js +0 -21
- package/logo-variations-horizontal.entry-BG8fM5Bs.js +0 -4
- package/logo-variations-horizontal.entry-BicKkgRN.mjs +0 -16
- package/logo-variations-vertical.entry-CXVFf9-0.mjs +0 -16
- package/logo-variations-vertical.entry-DJ-IpAyZ.js +0 -4
- package/logo-wrong-usage.entry-7MfyIkPp.js +0 -1
- package/logo-wrong-usage.entry-CH7JMqbI.mjs +0 -14
- package/token-spacing.entry-CdrdqAOb.js +0 -1
- package/token-spacing.entry-CjITQ8pH.mjs +0 -12
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { r as e, h as o } from "./index-DQrtrXyM.mjs";
|
|
2
|
-
const l = ".border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-softest{border-color:rgba(0, 0, 0, .05)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.w-full{width:100%}.border-t-2{border-top-width:2px}", s = l, t = class {
|
|
3
|
-
constructor(r) {
|
|
4
|
-
e(this, r), this.extraClass = "";
|
|
5
|
-
}
|
|
6
|
-
render() {
|
|
7
|
-
return o("hr", { key: "85b5253d4abb77072424452d2ff6a0d631e67652", class: `border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}` });
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
t.style = s;
|
|
11
|
-
export {
|
|
12
|
-
t as eds_block_break
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-BGGkUjck.js"),l=".border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-softest{border-color:rgba(0, 0, 0, .05)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.w-full{width:100%}.border-t-2{border-top-width:2px}",t=l,e=class{constructor(o){r.registerInstance(this,o),this.extraClass=""}render(){return r.h("hr",{key:"85b5253d4abb77072424452d2ff6a0d631e67652",class:`border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}`})}};e.style=t;exports.eds_block_break=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BGGkUjck.js"),h="blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}",d=h,l=class{constructor(e){i.registerInstance(this,e),this.updateScreenSize=()=>{const t=window.innerWidth;t<769?(this.maxVisibleItems=3,this.isSmallScreen=!0):t<=1024?(this.maxVisibleItems=4,this.isSmallScreen=!0):(this.maxVisibleItems=6,this.isSmallScreen=!1)},this.items=[],this.intent="ghost",this.parsedItems=[],this.isSmallScreen=!1,this.maxVisibleItems=6}parseItems(e){try{typeof e=="string"?this.parsedItems=JSON.parse(e):this.parsedItems=e}catch{this.parsedItems=[]}}componentWillLoad(){this.parseItems(this.items),this.updateScreenSize(),window.addEventListener("resize",this.updateScreenSize)}disconnectedCallback(){window.removeEventListener("resize",this.updateScreenSize)}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-link").forEach(t=>{this.emitContext(t)})}emitContext(e){const t=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});e.dispatchEvent(t)}getTruncatedItems(){const e=this.parsedItems.length;if(e>this.maxVisibleItems){const t=this.parsedItems[0],s=this.parsedItems.slice(-2),n={label:"...",url:"",isHidden:!0};if(this.maxVisibleItems===3)return[this.truncateLabel(t),n,...s.map((r,a)=>a===s.length-1?r:this.truncateLabel(r))];if(this.maxVisibleItems===4){const r=this.parsedItems[Math.floor(e/2)];return[this.truncateLabel(t),this.truncateLabel(r),n,...s.map((a,c)=>c===s.length-1?a:this.truncateLabel(a))]}}return this.parsedItems.map((t,s)=>s===this.parsedItems.length-1?t:this.truncateLabel(t))}truncateLabel(e){return e.label.length>15?Object.assign(Object.assign({},e),{label:`${e.label.slice(0,15)}...`}):e}render(){const e=this.getTruncatedItems();return i.h("nav",{key:"b3f515670374a7451981638d658f8e37f07ab10c","aria-label":"Breadcrumb"},i.h("ol",{key:"999b2035f3c996016e753be3826881a11054e184",class:"flex items-center space-x-2"},e.map((t,s)=>{const n=s===e.length-1;return i.h("li",{class:"flex items-center"},t.isHidden?i.h("span",{class:"truncate px-2 ","aria-hidden":"true"},"..."):i.h("eds-link",{label:t.label,url:t.url,intent:this.intent,current:n,"aria-label":t.label,size:"small","icon-small":"false"}),!n&&!t.isHidden&&i.h("eds-icon-wrapper",{icon:"chevron-right",class:"w-20 h-20"}))})))}get el(){return i.getElement(this)}static get watchers(){return{items:["parseItems"]}}};l.style=d;exports.eds_breadcrumb=l;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { r as c, h as i, g as d } from "./index-DQrtrXyM.mjs";
|
|
2
|
-
const h = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.hidden{display:none}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.125rem * var(--tw-space-x-reverse));margin-left:calc(0.125rem * calc(1 - var(--tw-space-x-reverse)))}.px-2{padding-left:0.125rem;padding-right:0.125rem}.w-20{width:1.25rem}.w-28{width:1.75rem}.w-32{width:2rem}.w-44{width:2.75rem}.h-20{height:1.25rem}.h-24{height:1.5rem}.h-28{height:1.75rem}.h-32{height:2rem}@media (min-width: 750px){.md\\:block{display:block}}", m = h, o = class {
|
|
3
|
-
constructor(e) {
|
|
4
|
-
c(this, e), this.updateScreenSize = () => {
|
|
5
|
-
const t = window.innerWidth;
|
|
6
|
-
t < 769 ? (this.maxVisibleItems = 3, this.isSmallScreen = !0) : t <= 1024 ? (this.maxVisibleItems = 4, this.isSmallScreen = !0) : (this.maxVisibleItems = 6, this.isSmallScreen = !1);
|
|
7
|
-
}, this.items = [], this.intent = "ghost", this.parsedItems = [], this.isSmallScreen = !1, this.maxVisibleItems = 6;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Watch for changes to the `items` prop and parse it when it changes.
|
|
11
|
-
* Converts the `items` string into an array of objects if it is a JSON string.
|
|
12
|
-
* If the format is invalid, it logs an error and sets an empty array.
|
|
13
|
-
*
|
|
14
|
-
* @param newValue - The new value for the `items` prop.
|
|
15
|
-
*/
|
|
16
|
-
parseItems(e) {
|
|
17
|
-
try {
|
|
18
|
-
typeof e == "string" ? this.parsedItems = JSON.parse(e) : this.parsedItems = e;
|
|
19
|
-
} catch {
|
|
20
|
-
this.parsedItems = [];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Lifecycle method that runs when the component is about to be loaded.
|
|
25
|
-
* It parses the initial `items` prop value.
|
|
26
|
-
*/
|
|
27
|
-
componentWillLoad() {
|
|
28
|
-
this.parseItems(this.items), this.updateScreenSize(), window.addEventListener("resize", this.updateScreenSize);
|
|
29
|
-
}
|
|
30
|
-
disconnectedCallback() {
|
|
31
|
-
window.removeEventListener("resize", this.updateScreenSize);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Lifecycle method that runs when the component has fully loaded.
|
|
35
|
-
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
36
|
-
*/
|
|
37
|
-
componentDidLoad() {
|
|
38
|
-
this.el.shadowRoot.querySelectorAll("eds-link").forEach((t) => {
|
|
39
|
-
this.emitContext(t);
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
44
|
-
* This event provides context information about the breadcrumb component.
|
|
45
|
-
*
|
|
46
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
47
|
-
*/
|
|
48
|
-
emitContext(e) {
|
|
49
|
-
const t = new CustomEvent("parentContext", {
|
|
50
|
-
detail: {
|
|
51
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
52
|
-
identifier: null
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
e.dispatchEvent(t);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Truncates breadcrumb items based on the maxVisibleItems value.
|
|
59
|
-
* Truncates `label` to 10 characters if `isSmallScreen` is true, except for the last label.
|
|
60
|
-
*/
|
|
61
|
-
getTruncatedItems() {
|
|
62
|
-
const e = this.parsedItems.length;
|
|
63
|
-
if (e > this.maxVisibleItems) {
|
|
64
|
-
const t = this.parsedItems[0], s = this.parsedItems.slice(-2), n = { label: "...", url: "", isHidden: !0 };
|
|
65
|
-
if (this.maxVisibleItems === 3)
|
|
66
|
-
return [
|
|
67
|
-
this.truncateLabel(t),
|
|
68
|
-
n,
|
|
69
|
-
...s.map((r, a) => a === s.length - 1 ? r : this.truncateLabel(r))
|
|
70
|
-
];
|
|
71
|
-
if (this.maxVisibleItems === 4) {
|
|
72
|
-
const r = this.parsedItems[Math.floor(e / 2)];
|
|
73
|
-
return [
|
|
74
|
-
this.truncateLabel(t),
|
|
75
|
-
this.truncateLabel(r),
|
|
76
|
-
n,
|
|
77
|
-
...s.map((a, l) => l === s.length - 1 ? a : this.truncateLabel(a))
|
|
78
|
-
];
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
return this.parsedItems.map((t, s) => s === this.parsedItems.length - 1 ? t : this.truncateLabel(t));
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Truncates the label of a breadcrumb item to a maximum of 10 characters
|
|
85
|
-
* if the screen is small.
|
|
86
|
-
*/
|
|
87
|
-
truncateLabel(e) {
|
|
88
|
-
return e.label.length > 15 ? Object.assign(Object.assign({}, e), { label: `${e.label.slice(0, 15)}...` }) : e;
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Render method for the breadcrumb component.
|
|
92
|
-
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
93
|
-
* The last link is disabled and marked as the current page.
|
|
94
|
-
*/
|
|
95
|
-
render() {
|
|
96
|
-
const e = this.getTruncatedItems();
|
|
97
|
-
return i("nav", { key: "b3f515670374a7451981638d658f8e37f07ab10c", "aria-label": "Breadcrumb" }, i("ol", { key: "999b2035f3c996016e753be3826881a11054e184", class: "flex items-center space-x-2" }, e.map((t, s) => {
|
|
98
|
-
const n = s === e.length - 1;
|
|
99
|
-
return i("li", { class: "flex items-center" }, t.isHidden ? i("span", { class: "truncate px-2 ", "aria-hidden": "true" }, "...") : i("eds-link", { label: t.label, url: t.url, intent: this.intent, current: n, "aria-label": t.label, size: "small", "icon-small": "false" }), !n && !t.isHidden && i("eds-icon-wrapper", { icon: "chevron-right", class: "w-20 h-20" }));
|
|
100
|
-
})));
|
|
101
|
-
}
|
|
102
|
-
get el() {
|
|
103
|
-
return d(this);
|
|
104
|
-
}
|
|
105
|
-
static get watchers() {
|
|
106
|
-
return {
|
|
107
|
-
items: ["parseItems"]
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
o.style = m;
|
|
112
|
-
export {
|
|
113
|
-
o as eds_breadcrumb
|
|
114
|
-
};
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),t=()=>e.h("div",{class:"static-content container"},e.h("eds-alert",{message:`EBRAINS Design System makes it easy to implement and use its components across any framework or no framework at all. We
|
|
2
|
-
accomplish this by using standardized web platform APIs and Web Components.`,intent:"default"}),e.h("h2",null,"Load the module"),e.h("p",null,"Integrating EDSs components to a project without a JavaScript framework is straight forward. If you’re working on a simple HTML page, you can start using the components immediately by adding the tags below to the"," ",e.h("code",null,"head"),"."),e.h("eds-code-block",{code:'<script type="module" href="https://unpkg.com/@ebrains/components@0.0.1/loader"/><\/script>',language:"javascript","copy-label":"Copy Code"}),e.h("h2",null,"Load the styles"),e.h("p",null,"To directly use the produced css framework with a few predefined custom utility classes, add the tag below to the"," ",e.h("code",null,"head")),e.h("eds-code-block",{code:'<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/output.css"/>',language:"css","copy-label":"Copy Code"}),e.h("h2",null,"Load the fonts"),e.h("p",null,"To load the correct webfonts as well, add either one of these tags to the ",e.h("code",null,"head")),e.h("eds-code-block",{code:'<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/base/fonts.css"/>',language:"css","copy-label":"Copy Code"}),e.h("h2",null,"Component Usage"),e.h("p",null,"Once included, components can be used in your markup like any other regular HTML elements:"),e.h("eds-code-block",{code:'<eds-button label="my bytton" intent="primary"></eds-button>',language:"html","copy-label":"Copy Code"})),a=()=>e.h("div",null,e.h("p",null,"To start using the EBRAINS Design System, include the following scripts and styles in your project. You can also install it via npm for use with modern build tools."),e.h("eds-code-block",{code:"npm install @ebrains/components",language:"html","copy-label":"Copy Code"}),e.h("p",null,"TBD")),s=()=>e.h("div",null,e.h("h1",null,"Usage with basic HTML "),e.h("p",null,"TBD")),o=()=>e.h("div",null,e.h("h2",null,"React Wrappers"),e.h("p",null,"Learn how to use our components in a React Application."),"Simple install the package below and check out the examples",e.h("eds-code-block",{code:"npm install @ebrains/react",language:"javascript","copy-label":"Copy Code"}),e.h("eds-section-core",{"section-title":"Example React App","heading-level":"h3"},e.h("eds-code-block",{code:`
|
|
3
|
-
import { EdsHeader } from "@ebrains/react";
|
|
4
|
-
|
|
5
|
-
interface User {
|
|
6
|
-
firstname: string;
|
|
7
|
-
lastname: string;
|
|
8
|
-
// Add any other properties your user object might have
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
interface AuthStatus {
|
|
12
|
-
authenticated: boolean;
|
|
13
|
-
user: User | null;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
import { useEffect, useState } from "react";
|
|
17
|
-
|
|
18
|
-
export function App() {
|
|
19
|
-
|
|
20
|
-
const [authStatus, setAuthStatus] = useState<AuthStatus>({
|
|
21
|
-
authenticated: false,
|
|
22
|
-
user: null,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const [activeTabIndex, setActiveTabIndex] = useState<number>(0);
|
|
26
|
-
|
|
27
|
-
// Use useEffect to render Stencil components dynamically after the component mounts
|
|
28
|
-
useEffect(() => {
|
|
29
|
-
|
|
30
|
-
const handleAuthStatusChange = (event: CustomEvent) => {
|
|
31
|
-
console.log(event.detail);
|
|
32
|
-
setAuthStatus(event.detail); // Set the entire object
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const handleTabChange = (
|
|
36
|
-
event: CustomEvent<{ index: number; name: string }>,
|
|
37
|
-
) => {
|
|
38
|
-
console.log(event.detail);
|
|
39
|
-
setActiveTabIndex(event.detail.index);
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
document.addEventListener(
|
|
43
|
-
"authStatusChanged",
|
|
44
|
-
handleAuthStatusChange as EventListener,
|
|
45
|
-
);
|
|
46
|
-
document.addEventListener("tabChange", handleTabChange as EventListener);
|
|
47
|
-
|
|
48
|
-
return () => {
|
|
49
|
-
document.removeEventListener(
|
|
50
|
-
"authStatusChanged",
|
|
51
|
-
handleAuthStatusChange as EventListener,
|
|
52
|
-
);
|
|
53
|
-
document.removeEventListener(
|
|
54
|
-
"tabChange",
|
|
55
|
-
handleTabChange as EventListener,
|
|
56
|
-
);
|
|
57
|
-
};
|
|
58
|
-
}, []); // Empty dependency array ensures this runs only once after mounting
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<div id="main">
|
|
62
|
-
<EdsHeader
|
|
63
|
-
home-url="/"
|
|
64
|
-
user-feature={false}
|
|
65
|
-
keycloak-url="http://localhost:8080"
|
|
66
|
-
keycloak-realm="nigeor-realm"
|
|
67
|
-
keycloak-client-id="stencil-app"
|
|
68
|
-
links="[
|
|
69
|
-
{ "label": "About", "url": "/about" },
|
|
70
|
-
{ "label": "Focus Areas", "url": "/focus-areas" },
|
|
71
|
-
{ "label": "News & Events", "url": "/news-and-events" },
|
|
72
|
-
{ "label": "Contact", "url": "/contact" }
|
|
73
|
-
]"
|
|
74
|
-
></EdsHeader>
|
|
75
|
-
|
|
76
|
-
<div>
|
|
77
|
-
User is{" "} {authStatus.authenticated ? "authenticated" : "not authenticated"}
|
|
78
|
-
</div>
|
|
79
|
-
{authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export default App;
|
|
86
|
-
`,language:"javascript","copy-label":"Copy Code"}))),l=()=>e.h("div",null,e.h("h2",null,"Vue Wrappers"),e.h("p",null,"Learn how to use our components in a Vue Application."),e.h("eds-code-block",{code:"npm install @ebrains/vue",language:"javascript","copy-label":"Copy Code"}),e.h("p",null,"Define the custom elements"),e.h("eds-code-block",{code:`import { defineCustomElements } from '@ebrains/components/loader';
|
|
87
|
-
defineCustomElements();`,language:"javascript","copy-label":"Copy Code"}),e.h("eds-section-core",{"section-title":"Example Vue App","heading-level":"h3"},e.h("eds-code-block",{code:`
|
|
88
|
-
<template>
|
|
89
|
-
<h1 className="f-heading-02">Vue App</h1>
|
|
90
|
-
|
|
91
|
-
<EdsHeader
|
|
92
|
-
home-url="/"
|
|
93
|
-
user-feature=false
|
|
94
|
-
keycloak-url="http://localhost:8080"
|
|
95
|
-
keycloak-realm="nigeor-realm"
|
|
96
|
-
keycloak-client-id="stencil-app"
|
|
97
|
-
links="[
|
|
98
|
-
{ "label": "About", "url": "/about" },
|
|
99
|
-
{ "label": "Focus Areas", "url": "/focus-areas" },
|
|
100
|
-
{ "label": "News & Events", "url": "/news-and-events" },
|
|
101
|
-
{ "label": "Contact", "url": "/contact" }
|
|
102
|
-
]">
|
|
103
|
-
</EdsHeader>
|
|
104
|
-
|
|
105
|
-
</template>
|
|
106
|
-
|
|
107
|
-
<script>
|
|
108
|
-
|
|
109
|
-
import { EdsHeader } from "@ebrains/vue";
|
|
110
|
-
|
|
111
|
-
export default {
|
|
112
|
-
name: "App",
|
|
113
|
-
components: {
|
|
114
|
-
EdsHeader,
|
|
115
|
-
}
|
|
116
|
-
};
|
|
117
|
-
<\/script>
|
|
118
|
-
`,language:"javascript","copy-label":"Copy Code"}))),c=()=>e.h("div",null,e.h("h2",null,"Angular Wrappers"),e.h("p",null,"Learn how to use our components in a Angular Application."),e.h("eds-code-block",{code:"npm install @ebrains/angular",language:"javascript","copy-label":"Copy Code"}),e.h("p",null,"Define the custom elements"),e.h("eds-code-block",{code:`import { defineCustomElements } from '@ebrains/components/loader';
|
|
119
|
-
defineCustomElements();`,language:"javascript","copy-label":"Copy Code"}),e.h("p",null,"Angular Custom Elements Schema"),e.h("eds-code-block",{code:'import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";',language:"javascript","copy-label":"Copy Code"}),e.h("eds-section-core",{"section-title":"Example Angular App","heading-level":"h3"},e.h("eds-code-block",{code:`
|
|
120
|
-
<div class="container">
|
|
121
|
-
<h1 class="f-heading-01">{{ title }}</h1>
|
|
122
|
-
<eds-breadcrumb
|
|
123
|
-
intent="tertiary"
|
|
124
|
-
items="[
|
|
125
|
-
{ "label": "Home", "url": "#" },
|
|
126
|
-
{ "label": "Products", "url": "#" },
|
|
127
|
-
]">
|
|
128
|
-
</eds-breadcrumb>
|
|
129
|
-
<eds-footer></eds-footer>
|
|
130
|
-
</div>`,language:"javascript","copy-label":"Copy Code"}))),r=class{constructor(n){e.registerInstance(this,n),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h(t,null);case 1:return e.h(a,null);case 2:return e.h(s,null);case 3:return e.h(o,null);case 4:return e.h(l,null);case 5:return e.h(c,null);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"faa14dc7bb5d966ea1328f60d8ca88b3c406ad51",class:"container"},this.renderContent())}};exports.eds_components_section=r;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { r as o, h as e } from "./index-DQrtrXyM.mjs";
|
|
2
|
-
const a = "", t = a, r = class {
|
|
3
|
-
constructor(s) {
|
|
4
|
-
o(this, s), this.backToTop = () => {
|
|
5
|
-
window.scrollTo({ top: 0, behavior: "smooth" });
|
|
6
|
-
}, this.extraClass = "", this.social = !1, this.hasCookiesSetUp = !1, this.enableScrollTop = !1, this.fundedBy = "EBRAINS is funded by the Horizon Europe Framework Programme.", this.rightsReserved = `${(/* @__PURE__ */ new Date()).getFullYear()} EBRAINS. All rights reserved.`, this.cookiesPreference = "Cookies Preferences";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Toggles the cookie preferences popup, if available.
|
|
10
|
-
* The actual implementation for handling cookie preferences should be defined here.
|
|
11
|
-
* @private
|
|
12
|
-
*/
|
|
13
|
-
toggleCookiesPopup() {
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Renders the footer component with optional sections and elements,
|
|
17
|
-
* including social network links, a Horizon Europe funding acknowledgment, and
|
|
18
|
-
* legal links such as "Cookies Preferences" and copyright information.
|
|
19
|
-
*
|
|
20
|
-
* @returns {JSX.Element} The rendered JSX for the footer component.
|
|
21
|
-
*/
|
|
22
|
-
render() {
|
|
23
|
-
return e("footer", { key: "efffa9b96cc2a094255fcb6d08ec45c7c7f09ec4", class: `${this.extraClass} pb-banner` }, this.social ? e("div", { class: "border-softest border-t-2 pt-20 pb-28 md:pt-28" }, e("div", { class: "container pb-20 xl:pb-40 " }, e("div", { class: "grid-layout" }, e("div", { class: "grid-col-span-12 lg:grid-col-span-5" }, e("eds-social-networks", { class: "mt-28" })), e("nav", { "aria-label": "Secondary nav", class: "grid-col-span-12 lg:grid-col-span-6 lg:grid-col-start-7 grid-layout mt-28 gap-y-12 lg:mt-0" })))) : null, e("div", { key: "c3942c635dff3dc8cb47a21f20aca52acfaa3e18", class: `border-softest ${this.social ? "border-t-2" : ""} pt-20 pb-28 md:pt-28` }, e("div", { key: "57e963272659ce2e63294c969f3724a03aef667e", class: "container flex flex-wrap items-center gap-20 lg:flex-nowrap" }, e("div", { key: "c3e5cfe07fe9eb90450f7a87be1b95ed00ef38ce", class: "flex items-center gap-x-12" }, e("a", { key: "b0d0c65115b611f78d2b468559c16eb60f538907", target: "_blank", rel: "noopener noreferrer", class: "effect-focus focus-visible:rounded-xs flex w-[54px] ml-0", href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en" }, e("eds-img", { key: "6cb5d067f07b456a8d828f3f42f2730e3e5374e0", width: 54, height: 41, src: "https://www.ebrains.eu/flags/4x3/eu.svg" }))), e("div", { key: "e5b768b0fb96fcdcb786d33fc808368005935491", class: "f-ui-04 text-light order-last w-full lg:order-none lg:w-auto" }, e("p", { key: "777263c2f4bde43d38690f41391eaf8e51d945fa" }, this.fundedBy), e("div", { key: "a415687d08edf8f3e03a6edce9c45f58662c8595", class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap" }, e("span", { key: "c0b6498ad4f5e1f4f1945ebb971f9dd81cc74c77", class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline" }, "© ", this.rightsReserved), this.hasCookiesSetUp && e("button", { key: "10133d180bfb0d8a6354ea2cbea318a2c46fc463", class: "effect-focus !no-underline underline-offset-4 hover:!underline", onClick: () => this.toggleCookiesPopup() }, this.cookiesPreference))), e("div", { key: "917d0980f91a8c42a75bae301b0a18e3777dd021", class: "ml-auto pl-12" }, this.enableScrollTop ? e("eds-button", { "aria-label": "Back to top", intent: "ghostInverse", icon: "chevron-up", onClick: this.backToTop }) : null))));
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
r.style = t;
|
|
27
|
-
export {
|
|
28
|
-
r as eds_footer
|
|
29
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),a="",t=a,s=class{constructor(o){e.registerInstance(this,o),this.backToTop=()=>{window.scrollTo({top:0,behavior:"smooth"})},this.extraClass="",this.social=!1,this.hasCookiesSetUp=!1,this.enableScrollTop=!1,this.fundedBy="EBRAINS is funded by the Horizon Europe Framework Programme.",this.rightsReserved=`${new Date().getFullYear()} EBRAINS. All rights reserved.`,this.cookiesPreference="Cookies Preferences"}toggleCookiesPopup(){}render(){return e.h("footer",{key:"efffa9b96cc2a094255fcb6d08ec45c7c7f09ec4",class:`${this.extraClass} pb-banner`},this.social?e.h("div",{class:"border-softest border-t-2 pt-20 pb-28 md:pt-28"},e.h("div",{class:"container pb-20 xl:pb-40 "},e.h("div",{class:"grid-layout"},e.h("div",{class:"grid-col-span-12 lg:grid-col-span-5"},e.h("eds-social-networks",{class:"mt-28"})),e.h("nav",{"aria-label":"Secondary nav",class:"grid-col-span-12 lg:grid-col-span-6 lg:grid-col-start-7 grid-layout mt-28 gap-y-12 lg:mt-0"})))):null,e.h("div",{key:"c3942c635dff3dc8cb47a21f20aca52acfaa3e18",class:`border-softest ${this.social?"border-t-2":""} pt-20 pb-28 md:pt-28`},e.h("div",{key:"57e963272659ce2e63294c969f3724a03aef667e",class:"container flex flex-wrap items-center gap-20 lg:flex-nowrap"},e.h("div",{key:"c3e5cfe07fe9eb90450f7a87be1b95ed00ef38ce",class:"flex items-center gap-x-12"},e.h("a",{key:"b0d0c65115b611f78d2b468559c16eb60f538907",target:"_blank",rel:"noopener noreferrer",class:"effect-focus focus-visible:rounded-xs flex w-[54px] ml-0",href:"https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en"},e.h("eds-img",{key:"6cb5d067f07b456a8d828f3f42f2730e3e5374e0",width:54,height:41,src:"https://www.ebrains.eu/flags/4x3/eu.svg"}))),e.h("div",{key:"e5b768b0fb96fcdcb786d33fc808368005935491",class:"f-ui-04 text-light order-last w-full lg:order-none lg:w-auto"},e.h("p",{key:"777263c2f4bde43d38690f41391eaf8e51d945fa"},this.fundedBy),e.h("div",{key:"a415687d08edf8f3e03a6edce9c45f58662c8595",class:"mt-4 flex flex-wrap gap-12 lg:flex-nowrap"},e.h("span",{key:"c0b6498ad4f5e1f4f1945ebb971f9dd81cc74c77",class:"effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline"},"© ",this.rightsReserved),this.hasCookiesSetUp&&e.h("button",{key:"10133d180bfb0d8a6354ea2cbea318a2c46fc463",class:"effect-focus !no-underline underline-offset-4 hover:!underline",onClick:()=>this.toggleCookiesPopup()},this.cookiesPreference))),e.h("div",{key:"917d0980f91a8c42a75bae301b0a18e3777dd021",class:"ml-auto pl-12"},this.enableScrollTop?e.h("eds-button",{"aria-label":"Back to top",intent:"ghostInverse",icon:"chevron-up",onClick:this.backToTop}):null))))}};s.style=t;exports.eds_footer=s;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { r as t, c as i, h as e } from "./index-DQrtrXyM.mjs";
|
|
2
|
-
const r = "", l = r, o = class {
|
|
3
|
-
constructor(s) {
|
|
4
|
-
t(this, s), this.menuClose = i(this, "menuClose", 7), this.links = void 0, this.menuLinks = void 0, this.homeUrl = "/", this.inverseHeader = !1, this.isMenuOpen = !1;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Listens for the toggleMenu event to open or close the menu.
|
|
8
|
-
* This event is emitted by the eds-header component.
|
|
9
|
-
*/
|
|
10
|
-
handleToggleMenu(s) {
|
|
11
|
-
this.isMenuOpen = s.detail;
|
|
12
|
-
}
|
|
13
|
-
/** Opens the menu */
|
|
14
|
-
openMenu() {
|
|
15
|
-
this.isMenuOpen = !0;
|
|
16
|
-
}
|
|
17
|
-
/** Closes the menu */
|
|
18
|
-
closeMenu() {
|
|
19
|
-
this.isMenuOpen = !1, this.menuClose.emit();
|
|
20
|
-
}
|
|
21
|
-
// Lifecycle method to add the resize event listener when component loads
|
|
22
|
-
componentDidLoad() {
|
|
23
|
-
window.addEventListener("resize", this.handleResize.bind(this));
|
|
24
|
-
}
|
|
25
|
-
// Lifecycle method to remove the resize event listener when component unloads
|
|
26
|
-
disconnectedCallback() {
|
|
27
|
-
window.removeEventListener("resize", this.handleResize.bind(this));
|
|
28
|
-
}
|
|
29
|
-
// Function to close the menu if screen width is larger than a defined breakpoint (1024px)
|
|
30
|
-
handleResize() {
|
|
31
|
-
window.innerWidth >= 1024 && (this.isMenuOpen = !1);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Parses the `links` prop into an array of link objects.
|
|
35
|
-
* Returns an empty array if parsing fails or if `links` is not a valid JSON string or object.
|
|
36
|
-
*
|
|
37
|
-
* @returns {any[]} Array of parsed link objects
|
|
38
|
-
*/
|
|
39
|
-
get parsedLinks() {
|
|
40
|
-
if (typeof this.links == "object")
|
|
41
|
-
return this.links;
|
|
42
|
-
if (typeof this.links == "string")
|
|
43
|
-
try {
|
|
44
|
-
return JSON.parse(this.links);
|
|
45
|
-
} catch (s) {
|
|
46
|
-
return console.error("Error parsing links prop:", s), [];
|
|
47
|
-
}
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Parses the `menuLinks` prop into an array of link objects.
|
|
52
|
-
* Returns an empty array if parsing fails or if `menuLinks` is not a valid JSON string or object.
|
|
53
|
-
*
|
|
54
|
-
* @returns {any[]} Array of parsed menu link objects
|
|
55
|
-
*/
|
|
56
|
-
get parsedMenuLinks() {
|
|
57
|
-
if (typeof this.menuLinks == "object")
|
|
58
|
-
return this.menuLinks;
|
|
59
|
-
if (typeof this.menuLinks == "string")
|
|
60
|
-
try {
|
|
61
|
-
return JSON.parse(this.menuLinks);
|
|
62
|
-
} catch (s) {
|
|
63
|
-
return console.error("Error parsing menuLinks prop:", s), [];
|
|
64
|
-
}
|
|
65
|
-
return [];
|
|
66
|
-
}
|
|
67
|
-
render() {
|
|
68
|
-
return this.isMenuOpen ? e("div", { class: "eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll" }, e("div", { class: "flex min-h-full flex-col" }, e("div", { class: `bg-default w-full sticky top-0 ${this.inverseHeader ? "bg-strongest" : "bg-default"}` }, e("div", { class: "mx-auto flex items-center justify-between" }, e("div", { class: "mr-auto w-[200px] h-[85px]" }, e("eds-logo", { type: this.inverseHeader ? "color-white" : "color", href: this.homeUrl })), e("div", { class: "px-16" }, e("eds-button", { "aria-label": "Close menu", intent: "ghostInverse", icon: "close", onClick: () => this.closeMenu() })))), e("div", { class: "py-16 px-16" }, e("nav", { class: "mt-28 flex flex-col gap-y-8" }, this.parsedLinks.map((s, n) => e("eds-link", { label: s.label, key: n, url: s.url, intent: "tertiary", size: "large", class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit", onClick: () => this.closeMenu(), icon: "arrow-right" }))), e("eds-block-break", null), e("nav", { class: "mt-28 flex flex-col gap-y-8" }, this.parsedMenuLinks.map((s, n) => e("eds-link", { label: s.label, key: n, url: s.url, intent: "tertiary", size: "large", class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit", onClick: () => this.closeMenu(), icon: "chevron-right" })))), e("div", { class: "mt-auto" }, e("eds-footer", { social: !0, "extra-class": "bg-darker" })))) : null;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
o.style = l;
|
|
72
|
-
export {
|
|
73
|
-
o as eds_fullscreen_menu
|
|
74
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),i="",r=i,t=class{constructor(s){e.registerInstance(this,s),this.menuClose=e.createEvent(this,"menuClose",7),this.links=void 0,this.menuLinks=void 0,this.homeUrl="/",this.inverseHeader=!1,this.isMenuOpen=!1}handleToggleMenu(s){this.isMenuOpen=s.detail}openMenu(){this.isMenuOpen=!0}closeMenu(){this.isMenuOpen=!1,this.menuClose.emit()}componentDidLoad(){window.addEventListener("resize",this.handleResize.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.handleResize.bind(this))}handleResize(){window.innerWidth>=1024&&(this.isMenuOpen=!1)}get parsedLinks(){if(typeof this.links=="object")return this.links;if(typeof this.links=="string")try{return JSON.parse(this.links)}catch(s){return console.error("Error parsing links prop:",s),[]}return[]}get parsedMenuLinks(){if(typeof this.menuLinks=="object")return this.menuLinks;if(typeof this.menuLinks=="string")try{return JSON.parse(this.menuLinks)}catch(s){return console.error("Error parsing menuLinks prop:",s),[]}return[]}render(){return this.isMenuOpen?e.h("div",{class:"eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll"},e.h("div",{class:"flex min-h-full flex-col"},e.h("div",{class:`bg-default w-full sticky top-0 ${this.inverseHeader?"bg-strongest":"bg-default"}`},e.h("div",{class:"mx-auto flex items-center justify-between"},e.h("div",{class:"mr-auto w-[200px] h-[85px]"},e.h("eds-logo",{type:this.inverseHeader?"color-white":"color",href:this.homeUrl})),e.h("div",{class:"px-16"},e.h("eds-button",{"aria-label":"Close menu",intent:"ghostInverse",icon:"close",onClick:()=>this.closeMenu()})))),e.h("div",{class:"py-16 px-16"},e.h("nav",{class:"mt-28 flex flex-col gap-y-8"},this.parsedLinks.map((s,n)=>e.h("eds-link",{label:s.label,key:n,url:s.url,intent:"tertiary",size:"large",class:"effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",onClick:()=>this.closeMenu(),icon:"arrow-right"}))),e.h("eds-block-break",null),e.h("nav",{class:"mt-28 flex flex-col gap-y-8"},this.parsedMenuLinks.map((s,n)=>e.h("eds-link",{label:s.label,key:n,url:s.url,intent:"tertiary",size:"large",class:"effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",onClick:()=>this.closeMenu(),icon:"chevron-right"})))),e.h("div",{class:"mt-auto"},e.h("eds-footer",{social:!0,"extra-class":"bg-darker"})))):null}};t.style=r;exports.eds_fullscreen_menu=t;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-BGGkUjck.js"),l="ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}",h=l,r=class{constructor(t){i.registerInstance(this,t),this.currentPage=void 0,this.lastPage=void 0,this.perPage=10,this.total=0,this.url="",this.mode="default",this.prevLabel="Prev",this.nextLabel="Next",this.prevUrl="",this.nextUrl="",this.links=[]}componentWillLoad(){this.mode==="default"&&this.generateLinks()}componentDidLoad(){const t=this.hostEl.shadowRoot.querySelectorAll("eds-link");t.length>0&&(this.emitContext(t[0]),t.length>1&&this.emitContext(t[t.length-1]))}emitContext(t){const e=new CustomEvent("parentContext",{detail:{componentName:this.hostEl.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(e)}onPageOrLastPageChange(){this.mode==="default"&&this.generateLinks()}isFirstPage(){return this.currentPage===1}isLastPage(){return this.currentPage===this.lastPage}generateLink(t){const e=this.url.includes("?");return{ariaLabel:`Page ${t}`,url:`${this.url}${e?"&":"?"}page=${t}`,label:t.toString(),current:this.currentPage===t,disabled:!1}}generateLinks(){this.lastPage&&this.lastPage>5?this.links=this.getPaginationGenerator(this.currentPage||1,this.lastPage).map(t=>typeof t=="number"?this.generateLink(t):t):this.lastPage&&(this.links=Array.from({length:this.lastPage}).map((t,e)=>this.generateLink(e+1)))}getPaginationGenerator(t,e){const a=[];if(e<=5)for(let s=1;s<=e;s++)a.push(s);else{a.push(1),t-1>2&&a.push("...");for(let s=Math.max(2,t-1);s<=Math.min(e-1,t+1);s++)a.push(s);t+1<e-1&&a.push("..."),a.push(e)}return a}pageResults(){return this.total>0?this.total>this.perPage?`${this.perPage*((this.currentPage||1)-1)+1} - ${this.perPage*(this.currentPage||1)>=this.total?this.total:this.perPage*(this.currentPage||1)} of ${this.total}`:`${this.total}`:""}handlePageClick(t,e){if(this.mode!=="navigator"&&(t.preventDefault(),e!==this.currentPage)){this.links=this.links.map(a=>typeof a=="object"?Object.assign(Object.assign({},a),{current:parseInt(a.label)===e}):a);const n=new CustomEvent("pageChange",{detail:e,bubbles:!0,composed:!0});this.hostEl.dispatchEvent(n),this.currentPage=e}}render(){return i.h("div",{key:"2385b59b0a8b2bbdc40bfc5032b846c0ec20065e"},this.total>0&&this.mode==="default"&&i.h("p",{key:"6aea281a4df247874f354469bbabae039424ad9e",class:"f-ui-03 text-lightest mb-28 w-full text-center"},i.h("span",{key:"eeb5f0ea902505c3853a30d51026cef9d9785e48",class:"sr-only"},"Results:"),this.pageResults()),this.mode==="navigator"||this.lastPage&&this.lastPage>1?i.h("nav",{"aria-label":"Pagination"},i.h("ul",{class:"flex items-center justify-center gap-x-8"},i.h("li",{class:"mr-auto"},i.h("eds-link",{label:this.prevLabel,url:this.mode==="navigator"?this.prevUrl||"#":this.isFirstPage()?"#":this.generateLink(this.currentPage-1).url,disabled:this.mode==="navigator"?!this.prevUrl:this.isFirstPage(),"aria-label":"Previous page",icon:"chevron-left","icon-pos":"left",size:"small","icon-small":"true",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pr-12",onClick:t=>{this.mode==="default"&&(this.isFirstPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)-1))}})),this.mode==="default"&&this.links.map((t,e)=>i.h("li",{key:e,class:"f-ui-02 flex h-36 items-center justify-center"},typeof t=="string"?i.h("span",{class:"flex items-center justify-center"},t):i.h("eds-link",{url:t.url,"aria-label":t.ariaLabel,label:t.label,current:t.current,size:"small",class:"!p-8",intent:t.current?"secondary":"ghost",onClick:n=>this.handlePageClick(n,parseInt(t.label))}))),i.h("li",{class:"ml-auto"},i.h("eds-link",{label:this.nextLabel,url:this.mode==="navigator"?this.nextUrl||"#":this.isLastPage()?"#":this.generateLink(this.currentPage+1).url,disabled:this.mode==="navigator"?!this.nextUrl:this.isLastPage(),"aria-label":"Next page",size:"small","icon-small":"true",icon:"chevron-right",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors",onClick:t=>{this.mode==="default"&&(this.isLastPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)+1))}})))):null)}get hostEl(){return i.getElement(this)}static get watchers(){return{currentPage:["onPageOrLastPageChange"],lastPage:["onPageOrLastPageChange"]}}};r.style=h;exports.eds_pagination=r;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { r, h as a, g as l } from "./index-DQrtrXyM.mjs";
|
|
2
|
-
const h = "ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}", o = h, g = class {
|
|
3
|
-
constructor(t) {
|
|
4
|
-
r(this, t), this.currentPage = void 0, this.lastPage = void 0, this.perPage = 10, this.total = 0, this.url = "", this.mode = "default", this.prevLabel = "Prev", this.nextLabel = "Next", this.prevUrl = "", this.nextUrl = "", this.links = [];
|
|
5
|
-
}
|
|
6
|
-
/** Lifecycle hook to generate pagination links on component load */
|
|
7
|
-
componentWillLoad() {
|
|
8
|
-
this.mode === "default" && this.generateLinks();
|
|
9
|
-
}
|
|
10
|
-
componentDidLoad() {
|
|
11
|
-
const t = this.hostEl.shadowRoot.querySelectorAll("eds-link");
|
|
12
|
-
t.length > 0 && (this.emitContext(t[0]), t.length > 1 && this.emitContext(t[t.length - 1]));
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
16
|
-
* This event provides context information about the breadcrumb component.
|
|
17
|
-
*
|
|
18
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
19
|
-
*/
|
|
20
|
-
emitContext(t) {
|
|
21
|
-
const e = new CustomEvent("parentContext", {
|
|
22
|
-
detail: {
|
|
23
|
-
componentName: this.hostEl.tagName.toLowerCase(),
|
|
24
|
-
identifier: null
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
t.dispatchEvent(e);
|
|
28
|
-
}
|
|
29
|
-
onPageOrLastPageChange() {
|
|
30
|
-
this.mode === "default" && this.generateLinks();
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Checks if the current page is the first page
|
|
34
|
-
* @returns {boolean} - true if current page is the first page
|
|
35
|
-
*/
|
|
36
|
-
isFirstPage() {
|
|
37
|
-
return this.currentPage === 1;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Checks if the current page is the last page
|
|
41
|
-
* @returns {boolean} - true if current page is the last page
|
|
42
|
-
*/
|
|
43
|
-
isLastPage() {
|
|
44
|
-
return this.currentPage === this.lastPage;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Generates a pagination link object
|
|
48
|
-
* @param {number} page - Page number for the link
|
|
49
|
-
* @returns {Link} - Link object with page details
|
|
50
|
-
*/
|
|
51
|
-
generateLink(t) {
|
|
52
|
-
const e = this.url.includes("?");
|
|
53
|
-
return {
|
|
54
|
-
ariaLabel: `Page ${t}`,
|
|
55
|
-
url: `${this.url}${e ? "&" : "?"}page=${t}`,
|
|
56
|
-
label: t.toString(),
|
|
57
|
-
current: this.currentPage === t,
|
|
58
|
-
disabled: !1
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
/** Generates pagination links based on the last page and current page */
|
|
62
|
-
generateLinks() {
|
|
63
|
-
this.lastPage && this.lastPage > 5 ? this.links = this.getPaginationGenerator(this.currentPage || 1, this.lastPage).map((t) => typeof t == "number" ? this.generateLink(t) : t) : this.lastPage && (this.links = Array.from({ length: this.lastPage }).map((t, e) => this.generateLink(e + 1)));
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Creates a pagination range based on delta, current, and total pages
|
|
67
|
-
* @param {number} current - Current page number
|
|
68
|
-
* @param {number} total - Total number of pages
|
|
69
|
-
* @param {number} delta - Range of pages to display around the current page
|
|
70
|
-
* @returns {(number | string)[]} - Range of page numbers or ellipses
|
|
71
|
-
*/
|
|
72
|
-
getPaginationGenerator(t, e) {
|
|
73
|
-
const i = [];
|
|
74
|
-
if (e <= 5)
|
|
75
|
-
for (let s = 1; s <= e; s++)
|
|
76
|
-
i.push(s);
|
|
77
|
-
else {
|
|
78
|
-
i.push(1), t - 1 > 2 && i.push("...");
|
|
79
|
-
for (let s = Math.max(2, t - 1); s <= Math.min(e - 1, t + 1); s++)
|
|
80
|
-
i.push(s);
|
|
81
|
-
t + 1 < e - 1 && i.push("..."), i.push(e);
|
|
82
|
-
}
|
|
83
|
-
return i;
|
|
84
|
-
}
|
|
85
|
-
/**
|
|
86
|
-
* Formats the current page results information for display
|
|
87
|
-
* @returns {string} - Formatted page result information
|
|
88
|
-
*/
|
|
89
|
-
pageResults() {
|
|
90
|
-
return this.total > 0 ? this.total > this.perPage ? `${this.perPage * ((this.currentPage || 1) - 1) + 1} - ${this.perPage * (this.currentPage || 1) >= this.total ? this.total : this.perPage * (this.currentPage || 1)} of ${this.total}` : `${this.total}` : "";
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Handles a page click event, updating the current page and dispatching an event
|
|
94
|
-
* @param {MouseEvent} event - Click event
|
|
95
|
-
* @param {number} newPage - New page number
|
|
96
|
-
*/
|
|
97
|
-
handlePageClick(t, e) {
|
|
98
|
-
if (this.mode !== "navigator" && (t.preventDefault(), e !== this.currentPage)) {
|
|
99
|
-
this.links = this.links.map((i) => typeof i == "object" ? Object.assign(Object.assign({}, i), { current: parseInt(i.label) === e }) : i);
|
|
100
|
-
const n = new CustomEvent("pageChange", {
|
|
101
|
-
detail: e,
|
|
102
|
-
bubbles: !0,
|
|
103
|
-
composed: !0
|
|
104
|
-
});
|
|
105
|
-
this.hostEl.dispatchEvent(n), this.currentPage = e;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
render() {
|
|
109
|
-
return a("div", { key: "2385b59b0a8b2bbdc40bfc5032b846c0ec20065e" }, this.total > 0 && this.mode === "default" && a("p", { key: "6aea281a4df247874f354469bbabae039424ad9e", class: "f-ui-03 text-lightest mb-28 w-full text-center" }, a("span", { key: "eeb5f0ea902505c3853a30d51026cef9d9785e48", class: "sr-only" }, "Results:"), this.pageResults()), this.mode === "navigator" || this.lastPage && this.lastPage > 1 ? a("nav", { "aria-label": "Pagination" }, a("ul", { class: "flex items-center justify-center gap-x-8" }, a("li", { class: "mr-auto" }, a("eds-link", { label: this.prevLabel, url: this.mode === "navigator" ? this.prevUrl || "#" : this.isFirstPage() ? "#" : this.generateLink(this.currentPage - 1).url, disabled: this.mode === "navigator" ? !this.prevUrl : this.isFirstPage(), "aria-label": "Previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pr-12", onClick: (t) => {
|
|
110
|
-
this.mode === "default" && (this.isFirstPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) - 1));
|
|
111
|
-
} })), this.mode === "default" && this.links.map((t, e) => a("li", { key: e, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof t == "string" ? a("span", { class: "flex items-center justify-center" }, t) : a("eds-link", { url: t.url, "aria-label": t.ariaLabel, label: t.label, current: t.current, size: "small", class: "!p-8", intent: t.current ? "secondary" : "ghost", onClick: (n) => this.handlePageClick(n, parseInt(t.label)) }))), a("li", { class: "ml-auto" }, a("eds-link", { label: this.nextLabel, url: this.mode === "navigator" ? this.nextUrl || "#" : this.isLastPage() ? "#" : this.generateLink(this.currentPage + 1).url, disabled: this.mode === "navigator" ? !this.nextUrl : this.isLastPage(), "aria-label": "Next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors", onClick: (t) => {
|
|
112
|
-
this.mode === "default" && (this.isLastPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) + 1));
|
|
113
|
-
} })))) : null);
|
|
114
|
-
}
|
|
115
|
-
get hostEl() {
|
|
116
|
-
return l(this);
|
|
117
|
-
}
|
|
118
|
-
static get watchers() {
|
|
119
|
-
return {
|
|
120
|
-
currentPage: ["onPageOrLastPageChange"],
|
|
121
|
-
lastPage: ["onPageOrLastPageChange"]
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
};
|
|
125
|
-
g.style = o;
|
|
126
|
-
export {
|
|
127
|
-
g as eds_pagination
|
|
128
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),n="blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.mt-12{margin-top:0.75rem}.mt-16{margin-top:1rem}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.gap-4{gap:0.25rem}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.effect-focus{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.hover\\:text-default:hover{color:var(--black)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:8px}",l=n,i=class{constructor(t){e.registerInstance(this,t),this.socialNetworks=[{label:"Twitter",url:"https://twitter.com/ebrains_eu",icon:"twitter"},{label:"Linkedin",url:"https://www.linkedin.com/company/ebrains-eu/about/",icon:"linkedin"},{label:"Facebook",url:"https://www.facebook.com/people/Ebrains_eu/100046659909324/",icon:"facebook"},{label:"Youtube",url:"https://www.youtube.com/channel/UC6E796cVVR5Xrs2A5jJmleQ",icon:"youtube"},{label:"Mastodon",url:"https://mastodon.social/@ebrains",icon:"mastodon"},{label:"Bluesky",url:"https://bsky.app/profile/ebrains.bsky.social",icon:"bluesky"}],this.title="Follow EBRAINS to keep up-to-date"}render(){return e.h("div",{key:"6169559327b728fd0f3a51a2b8a6439f80fba8fc"},e.h("p",{key:"df2e008500097af1b85660fe8b3fac122f5018a4",class:"f-ui-02"},this.title),e.h("ul",{key:"df01a2802412c4db4e5442fdfc0b6ef3f15c4109",class:"mt-12 flex gap-4"},this.socialNetworks.map((t,o)=>e.h("li",{key:o},e.h("eds-link",{"extra-class":"effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm",external:!0,"aria-label":t.label,url:t.url,icon:t.icon,intent:"strong"})))))}};i.style=l;exports.eds_social_networks=i;
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { r as o, h as t } from "./index-DQrtrXyM.mjs";
|
|
2
|
-
const n = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.mt-12{margin-top:0.75rem}.mt-16{margin-top:1rem}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.gap-4{gap:0.25rem}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.effect-focus{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.hover\\:text-default:hover{color:var(--black)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:8px}", l = n, r = class {
|
|
3
|
-
constructor(e) {
|
|
4
|
-
o(this, e), this.socialNetworks = [
|
|
5
|
-
{
|
|
6
|
-
label: "Twitter",
|
|
7
|
-
url: "https://twitter.com/ebrains_eu",
|
|
8
|
-
icon: "twitter"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
label: "Linkedin",
|
|
12
|
-
url: "https://www.linkedin.com/company/ebrains-eu/about/",
|
|
13
|
-
icon: "linkedin"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
label: "Facebook",
|
|
17
|
-
url: "https://www.facebook.com/people/Ebrains_eu/100046659909324/",
|
|
18
|
-
icon: "facebook"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
label: "Youtube",
|
|
22
|
-
url: "https://www.youtube.com/channel/UC6E796cVVR5Xrs2A5jJmleQ",
|
|
23
|
-
icon: "youtube"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
label: "Mastodon",
|
|
27
|
-
url: "https://mastodon.social/@ebrains",
|
|
28
|
-
icon: "mastodon"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
label: "Bluesky",
|
|
32
|
-
url: "https://bsky.app/profile/ebrains.bsky.social",
|
|
33
|
-
icon: "bluesky"
|
|
34
|
-
}
|
|
35
|
-
], this.title = "Follow EBRAINS to keep up-to-date";
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Renders the component's HTML structure with links to EBRAINS social profiles.
|
|
39
|
-
* Each social network link uses the `eds-link` component with specific classes and styles.
|
|
40
|
-
*
|
|
41
|
-
* @returns {JSX.Element} The rendered JSX for the component.
|
|
42
|
-
*/
|
|
43
|
-
render() {
|
|
44
|
-
return t("div", { key: "6169559327b728fd0f3a51a2b8a6439f80fba8fc" }, t("p", { key: "df2e008500097af1b85660fe8b3fac122f5018a4", class: "f-ui-02" }, this.title), t("ul", { key: "df01a2802412c4db4e5442fdfc0b6ef3f15c4109", class: "mt-12 flex gap-4" }, this.socialNetworks.map((e, i) => t("li", { key: i }, t("eds-link", { "extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm", external: !0, "aria-label": e.label, url: e.url, icon: e.icon, intent: "strong" })))));
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
r.style = l;
|
|
48
|
-
export {
|
|
49
|
-
r as eds_social_networks
|
|
50
|
-
};
|