@ebrains/react 0.0.1-alpha.0 → 0.2.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/README.md +4 -48
- package/arrow-diagonal-black-8f0494c3.esm.js +3 -0
- package/arrow-right-9322ba8a.esm.js +5 -0
- package/bluesky-cc5edd2d.esm.js +14 -0
- package/chevron-down-6144c823.esm.js +12 -0
- package/chevron-left-ca6c66e1.esm.js +11 -0
- package/chevron-right-b88ed2d4.esm.js +5 -0
- package/chevron-up-c66bd477.esm.js +12 -0
- package/close-87fc0d63.esm.js +5 -0
- package/color-0ba8ed56.esm.js +423 -0
- package/color-primary-palette_6.entry.esm.js +756 -0
- package/copy-03b72cb6.esm.js +5 -0
- package/correct-use-of-colors.entry.esm.js +243 -0
- package/eds-accordion.entry.esm.js +132 -0
- package/eds-alert_28.entry.esm.js +227 -0
- package/eds-block-break.entry.esm.js +22 -0
- package/eds-breadcrumb.entry.esm.js +169 -0
- package/eds-card-project.entry.esm.js +92 -0
- package/eds-card-section.entry.esm.js +60 -0
- package/eds-card-tags.entry.esm.js +27 -0
- package/eds-card-tool.entry.esm.js +106 -0
- package/eds-card-wrapper.entry.esm.js +39 -0
- package/eds-code-block.entry.esm.js +2243 -0
- package/eds-components-section.entry.esm.js +113 -0
- package/eds-docs-palettes.entry.esm.js +29 -0
- package/eds-docs-tokens.entry.esm.js +45 -0
- package/eds-footer.entry.esm.js +110 -0
- package/eds-frame.entry.esm.js +117 -0
- package/eds-fullscreen-menu.entry.esm.js +143 -0
- package/eds-icon-arrow-diagonal.entry.esm.js +21 -0
- package/eds-icon-arrow-right.entry.esm.js +21 -0
- package/eds-icon-bluesky.entry.esm.js +21 -0
- package/eds-icon-chevron-down.entry.esm.js +21 -0
- package/eds-icon-chevron-left.entry.esm.js +21 -0
- package/eds-icon-chevron-right.entry.esm.js +21 -0
- package/eds-icon-chevron-up.entry.esm.js +21 -0
- package/eds-icon-close.entry.esm.js +21 -0
- package/eds-icon-copy.entry.esm.js +21 -0
- package/eds-icon-eu.entry.esm.js +21 -0
- package/eds-icon-facebook.entry.esm.js +21 -0
- package/eds-icon-gitlab.entry.esm.js +21 -0
- package/eds-icon-linkedin.entry.esm.js +21 -0
- package/eds-icon-loader.entry.esm.js +21 -0
- package/eds-icon-mastodon.entry.esm.js +21 -0
- package/eds-icon-menu.entry.esm.js +21 -0
- package/eds-icon-more.entry.esm.js +21 -0
- package/eds-icon-search.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +21 -0
- package/eds-icon-user.entry.esm.js +21 -0
- package/eds-icon-youtube.entry.esm.js +21 -0
- package/eds-login.entry.esm.js +84 -0
- package/eds-matomo-notice.entry.esm.js +129 -0
- package/eds-modal.entry.esm.js +114 -0
- package/eds-navigator.entry.esm.js +72 -0
- package/eds-pagination.entry.esm.js +258 -0
- package/eds-rating.entry.esm.js +71 -0
- package/eds-section-core_2.entry.esm.js +69 -0
- package/eds-social-networks.entry.esm.js +74 -0
- package/eds-svg-repository.entry.esm.js +316 -0
- package/eds-tab.entry.esm.js +41 -0
- package/eds-table.entry.esm.js +196 -0
- package/eds-tabs-content.entry.esm.js +145 -0
- package/eds-tabs.entry.esm.js +136 -0
- package/eds-tooltip.entry.esm.js +116 -0
- package/eu-9ddde93a.esm.js +30 -0
- package/facebook-9cb5c17f.esm.js +14 -0
- package/incorrect-use-of-colors.entry.esm.js +70 -0
- package/index-39c58238.esm.js +58 -0
- package/index.esm.js +3 -2668
- package/index.esm2.js +4783 -0
- package/keycloak-13893af6.esm.js +1594 -0
- package/linkedin-e8650abb.esm.js +28 -0
- package/loader-c9628637.esm.js +30 -0
- package/logo-color-7f1fd803.esm.js +115 -0
- package/logo-color-margins-ff8ce71b.esm.js +118 -0
- package/logo-space.entry.esm.js +32 -0
- package/logo-variations-horizontal.entry.esm.js +50 -0
- package/logo-variations-vertical.entry.esm.js +53 -0
- package/logo-white-no-bg-f382f86f.esm.js +1021 -0
- package/logo-wrong-usage.entry.esm.js +137 -0
- package/mastodon-3703ec61.esm.js +14 -0
- package/menu-340ea948.esm.js +11 -0
- package/mono-53f70232.esm.js +11 -0
- package/more-4449d549.esm.js +13 -0
- package/package.json +1 -1
- package/search-fbcd79c2.esm.js +12 -0
- package/src/components.d.ts +38 -0
- package/src/index.d.ts +1 -1
- package/src/react-component-lib/attachProps.d.ts +16 -0
- package/src/react-component-lib/case.d.ts +2 -0
- package/src/react-component-lib/createComponent.d.ts +10 -0
- package/src/react-component-lib/createOverlayComponent.d.ts +21 -0
- package/src/react-component-lib/dev.d.ts +2 -0
- package/src/react-component-lib/index.d.ts +2 -0
- package/src/react-component-lib/interfaces.d.ts +29 -0
- package/src/react-component-lib/utils/attachProps.d.ts +16 -0
- package/src/react-component-lib/utils/case.d.ts +2 -0
- package/src/react-component-lib/utils/index.d.ts +10 -0
- package/success-443809da.esm.js +18 -0
- package/toastManager-d9eee791.esm.js +34 -0
- package/token-list_3.entry.esm.js +385 -0
- package/token-ratios.entry.esm.js +49 -0
- package/token-spacing.entry.esm.js +93 -0
- package/token-typography.entry.esm.js +264 -0
- package/twitter-ac21b505.esm.js +14 -0
- package/user-71ebdc15.esm.js +16 -0
- package/youtube-efbfbdc4.esm.js +14 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const EdsComponentsOverview = () => h("div", {
|
|
7
|
+
class: "static-content container"
|
|
8
|
+
}, h("eds-alert", {
|
|
9
|
+
message: "EBRAINS Design System makes it easy to implement and use its components across any framework or no framework at all. We\n accomplish this by using standardized web platform APIs and Web Components.",
|
|
10
|
+
intent: "default"
|
|
11
|
+
}), h("h2", null, "Load the module"), h("p", null, "Integrating EDSs components to a project without a JavaScript framework is straight forward. If you\u2019re working on a simple HTML page, you can start using the components immediately by adding the tags below to the", ' ', h("code", null, "head"), "."), h("eds-code-block", {
|
|
12
|
+
code: '<script type="module" href="https://unpkg.com/@ebrains/components@0.0.1/loader"/></script>',
|
|
13
|
+
language: "javascript",
|
|
14
|
+
"copy-label": "Copy Code"
|
|
15
|
+
}), h("h2", null, "Load the styles"), h("p", null, "To directly use the produced css framework with a few predefined custom utility classes, add the tag below to the", ' ', h("code", null, "head")), h("eds-code-block", {
|
|
16
|
+
code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/output.css"/>',
|
|
17
|
+
language: "css",
|
|
18
|
+
"copy-label": "Copy Code"
|
|
19
|
+
}), h("h2", null, "Load the fonts"), h("p", null, "To load the correct webfonts as well, add either one of these tags to the ", h("code", null, "head")), h("eds-code-block", {
|
|
20
|
+
code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/base/fonts.css"/>',
|
|
21
|
+
language: "css",
|
|
22
|
+
"copy-label": "Copy Code"
|
|
23
|
+
}), h("h2", null, "Component Usage"), h("p", null, "Once included, components can be used in your markup like any other regular HTML elements:"), h("eds-code-block", {
|
|
24
|
+
code: '<eds-button label="my bytton" intent="primary"></eds-button>',
|
|
25
|
+
language: "html",
|
|
26
|
+
"copy-label": "Copy Code"
|
|
27
|
+
}));
|
|
28
|
+
const EdsDocsInstallation = () => h("div", null, 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."), h("eds-code-block", {
|
|
29
|
+
code: "npm install @ebrains/components",
|
|
30
|
+
language: "html",
|
|
31
|
+
"copy-label": "Copy Code"
|
|
32
|
+
}), h("p", null, "TBD"));
|
|
33
|
+
const EdsDocsUsage = () => h("div", null, h("h1", null, "Usage with basic HTML "), h("p", null, "TBD"));
|
|
34
|
+
const EdsDocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p", null, "Learn how to use our components in a React Application."), "Simple install the package below and check out the examples", h("eds-code-block", {
|
|
35
|
+
code: "npm install @ebrains/react",
|
|
36
|
+
language: "javascript",
|
|
37
|
+
"copy-label": "Copy Code"
|
|
38
|
+
}), h("eds-section-core", {
|
|
39
|
+
"section-title": "Example React App",
|
|
40
|
+
"heading-level": "h3"
|
|
41
|
+
}, h("eds-code-block", {
|
|
42
|
+
code: '\nimport { EdsHeader } from "@ebrains/react";\n\ninterface User {\n firstname: string;\n lastname: string;\n // Add any other properties your user object might have\n}\n\ninterface AuthStatus {\n authenticated: boolean;\n user: User | null;\n}\n\nimport { useEffect, useState } from "react";\n\nexport function App() {\n\n const [authStatus, setAuthStatus] = useState<AuthStatus>({\n authenticated: false,\n user: null,\n });\n \n const [activeTabIndex, setActiveTabIndex] = useState<number>(0);\n\n // Use useEffect to render Stencil components dynamically after the component mounts\n useEffect(() => {\n \n const handleAuthStatusChange = (event: CustomEvent) => {\n console.log(event.detail);\n setAuthStatus(event.detail); // Set the entire object\n };\n\n const handleTabChange = (\n event: CustomEvent<{ index: number; name: string }>,\n ) => {\n console.log(event.detail);\n setActiveTabIndex(event.detail.index);\n };\n\n document.addEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n document.addEventListener("tabChange", handleTabChange as EventListener);\n\n return () => {\n document.removeEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n document.removeEventListener(\n "tabChange",\n handleTabChange as EventListener,\n );\n };\n }, []); // Empty dependency array ensures this runs only once after mounting\n\n return (\n <div id="main">\n <EdsHeader\n home-url="/"\n user-feature={false}\n keycloak-url="http://localhost:8080"\n keycloak-realm="nigeor-realm"\n keycloak-client-id="stencil-app"\n links="[\n { "label": "About", "url": "/about" },\n { "label": "Focus Areas", "url": "/focus-areas" },\n { "label": "News & Events", "url": "/news-and-events" },\n { "label": "Contact", "url": "/contact" }\n ]"\n ></EdsHeader>\n\n <div> \n User is{" "} {authStatus.authenticated ? "authenticated" : "not authenticated"}\n </div>\n {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}\n </div>\n </div>\n );\n}\n\nexport default App;\n',
|
|
43
|
+
language: "javascript",
|
|
44
|
+
"copy-label": "Copy Code"
|
|
45
|
+
})));
|
|
46
|
+
const EdsDocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", null, "Learn how to use our components in a Vue Application."), h("eds-code-block", {
|
|
47
|
+
code: "npm install @ebrains/vue",
|
|
48
|
+
language: "javascript",
|
|
49
|
+
"copy-label": "Copy Code"
|
|
50
|
+
}), h("p", null, "Define the custom elements"), h("eds-code-block", {
|
|
51
|
+
code: "import { defineCustomElements } from '@ebrains/components/loader';\ndefineCustomElements();",
|
|
52
|
+
language: "javascript",
|
|
53
|
+
"copy-label": "Copy Code"
|
|
54
|
+
}), h("eds-section-core", {
|
|
55
|
+
"section-title": "Example Vue App",
|
|
56
|
+
"heading-level": "h3"
|
|
57
|
+
}, h("eds-code-block", {
|
|
58
|
+
code: '\n<template>\n <h1 className="f-heading-02">Vue App</h1>\n\n <EdsHeader \n home-url="/" \n user-feature=false \n keycloak-url="http://localhost:8080" \n keycloak-realm="nigeor-realm"\n keycloak-client-id="stencil-app" \n links="[\n { "label": "About", "url": "/about" },\n { "label": "Focus Areas", "url": "/focus-areas" },\n { "label": "News & Events", "url": "/news-and-events" },\n { "label": "Contact", "url": "/contact" }\n ]">\n </EdsHeader>\n\n</template>\n\n<script>\n\nimport { EdsHeader } from "@ebrains/vue";\n\nexport default {\n name: "App",\n components: {\n EdsHeader,\n }\n};\n</script>\n',
|
|
59
|
+
language: "javascript",
|
|
60
|
+
"copy-label": "Copy Code"
|
|
61
|
+
})));
|
|
62
|
+
const EdsDocsAngular = () => h("div", null, h("h2", null, "Angular Wrappers"), h("p", null, "Learn how to use our components in a Angular Application."), h("eds-code-block", {
|
|
63
|
+
code: "npm install @ebrains/angular",
|
|
64
|
+
language: "javascript",
|
|
65
|
+
"copy-label": "Copy Code"
|
|
66
|
+
}), h("p", null, "Define the custom elements"), h("eds-code-block", {
|
|
67
|
+
code: "import { defineCustomElements } from '@ebrains/components/loader';\ndefineCustomElements();",
|
|
68
|
+
language: "javascript",
|
|
69
|
+
"copy-label": "Copy Code"
|
|
70
|
+
}), h("p", null, "Angular Custom Elements Schema"), h("eds-code-block", {
|
|
71
|
+
code: 'import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";',
|
|
72
|
+
language: "javascript",
|
|
73
|
+
"copy-label": "Copy Code"
|
|
74
|
+
}), h("eds-section-core", {
|
|
75
|
+
"section-title": "Example Angular App",
|
|
76
|
+
"heading-level": "h3"
|
|
77
|
+
}, h("eds-code-block", {
|
|
78
|
+
code: '\n<div class="container">\n <h1 class="f-heading-01">{{ title }}</h1>\n <eds-breadcrumb\n intent="tertiary"\n items="[\n { "label": "Home", "url": "#" },\n { "label": "Products", "url": "#" },\n ]">\n </eds-breadcrumb>\n <eds-footer></eds-footer>\n</div>',
|
|
79
|
+
language: "javascript",
|
|
80
|
+
"copy-label": "Copy Code"
|
|
81
|
+
})));
|
|
82
|
+
const EdsComponentsSection = class {
|
|
83
|
+
constructor(hostRef) {
|
|
84
|
+
registerInstance(this, hostRef);
|
|
85
|
+
this.tabIndex = undefined;
|
|
86
|
+
}
|
|
87
|
+
renderContent() {
|
|
88
|
+
switch (this.tabIndex) {
|
|
89
|
+
case 0:
|
|
90
|
+
return h(EdsComponentsOverview, null);
|
|
91
|
+
case 1:
|
|
92
|
+
return h(EdsDocsInstallation, null);
|
|
93
|
+
case 2:
|
|
94
|
+
return h(EdsDocsUsage, null);
|
|
95
|
+
case 3:
|
|
96
|
+
return h(EdsDocsReact, null);
|
|
97
|
+
case 4:
|
|
98
|
+
return h(EdsDocsVue, null);
|
|
99
|
+
case 5:
|
|
100
|
+
return h(EdsDocsAngular, null);
|
|
101
|
+
default:
|
|
102
|
+
return h("p", null, "Content not available.");
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
render() {
|
|
106
|
+
return h("div", {
|
|
107
|
+
key: 'faa14dc7bb5d966ea1328f60d8ca88b3c406ad51',
|
|
108
|
+
class: "container"
|
|
109
|
+
}, this.renderContent());
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export { EdsComponentsSection as eds_components_section };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const EdsDocsPalettes = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.tabIndex = undefined;
|
|
10
|
+
}
|
|
11
|
+
renderContent() {
|
|
12
|
+
switch (this.tabIndex) {
|
|
13
|
+
case 0:
|
|
14
|
+
return h("div", null, h("h2", null, "Primary Palette"), h("color-primary-palette", null), h("h2", null, "Secondary Palette"), h("color-secondary-palette", null), h("h2", null, "Support Palette"), h("color-support-palette", null));
|
|
15
|
+
case 1:
|
|
16
|
+
return h("div", null, h("h2", null, "Primary Palette"), h("gradient-primary-palette", null), h("h2", null, "Secondary Palette"), h("gradient-secondary-palette", null), h("h2", null, "Support Palette"), h("gradient-support-palette", null));
|
|
17
|
+
default:
|
|
18
|
+
return h("p", null, "Content not available.");
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return h("div", {
|
|
23
|
+
key: 'c11e0de66c41770e7ebca46d3fb7ab11b454511e',
|
|
24
|
+
class: "container"
|
|
25
|
+
}, this.renderContent());
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export { EdsDocsPalettes as eds_docs_palettes };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const EdsDocsContent = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.tabIndex = undefined;
|
|
10
|
+
}
|
|
11
|
+
renderContent() {
|
|
12
|
+
switch (this.tabIndex) {
|
|
13
|
+
case 0:
|
|
14
|
+
return h("token-list", {
|
|
15
|
+
show: "background"
|
|
16
|
+
});
|
|
17
|
+
case 1:
|
|
18
|
+
return h("token-list", {
|
|
19
|
+
show: "text"
|
|
20
|
+
});
|
|
21
|
+
case 2:
|
|
22
|
+
return h("token-list", {
|
|
23
|
+
show: "border"
|
|
24
|
+
});
|
|
25
|
+
case 3:
|
|
26
|
+
return h("token-radii", null);
|
|
27
|
+
case 4:
|
|
28
|
+
return h("token-list", {
|
|
29
|
+
show: "outline"
|
|
30
|
+
});
|
|
31
|
+
case 5:
|
|
32
|
+
return h("token-shadows", null);
|
|
33
|
+
default:
|
|
34
|
+
return h("p", null, "Content not available.");
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return h("div", {
|
|
39
|
+
key: 'ef9cf093af7bc730b73f3561b36187f70aea29a7',
|
|
40
|
+
class: "container"
|
|
41
|
+
}, this.renderContent());
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export { EdsDocsContent as eds_docs_tokens };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const edsFooterCss = "";
|
|
7
|
+
const EdsFooterStyle0 = edsFooterCss;
|
|
8
|
+
const EdsFooter = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
/**
|
|
12
|
+
* Scrolls the page smoothly back to the top.
|
|
13
|
+
* Called when the "Back to top" button is clicked.
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
this.backToTop = () => {
|
|
17
|
+
window.scrollTo({
|
|
18
|
+
top: 0,
|
|
19
|
+
behavior: 'smooth'
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
this.extraClass = '';
|
|
23
|
+
this.social = false;
|
|
24
|
+
this.hasCookiesSetUp = false;
|
|
25
|
+
this.enableScrollTop = false;
|
|
26
|
+
this.fundedBy = 'EBRAINS is funded by the Horizon Europe Framework Programme.';
|
|
27
|
+
this.rightsReserved = `${new Date().getFullYear()} EBRAINS. All rights reserved.`;
|
|
28
|
+
this.cookiesPreference = 'Cookies Preferences';
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Toggles the cookie preferences popup, if available.
|
|
32
|
+
* The actual implementation for handling cookie preferences should be defined here.
|
|
33
|
+
* @private
|
|
34
|
+
*/
|
|
35
|
+
toggleCookiesPopup() {
|
|
36
|
+
// Implement logic for handling cookie preferences
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Renders the footer component with optional sections and elements,
|
|
40
|
+
* including social network links, a Horizon Europe funding acknowledgment, and
|
|
41
|
+
* legal links such as "Cookies Preferences" and copyright information.
|
|
42
|
+
*
|
|
43
|
+
* @returns {JSX.Element} The rendered JSX for the footer component.
|
|
44
|
+
*/
|
|
45
|
+
render() {
|
|
46
|
+
return h("footer", {
|
|
47
|
+
key: 'efffa9b96cc2a094255fcb6d08ec45c7c7f09ec4',
|
|
48
|
+
class: `${this.extraClass} pb-banner`
|
|
49
|
+
}, this.social ? h("div", {
|
|
50
|
+
class: "border-softest border-t-2 pt-20 pb-28 md:pt-28"
|
|
51
|
+
}, h("div", {
|
|
52
|
+
class: "container pb-20 xl:pb-40 "
|
|
53
|
+
}, h("div", {
|
|
54
|
+
class: "grid-layout"
|
|
55
|
+
}, h("div", {
|
|
56
|
+
class: "grid-col-span-12 lg:grid-col-span-5"
|
|
57
|
+
}, h("eds-social-networks", {
|
|
58
|
+
class: "mt-28"
|
|
59
|
+
})), h("nav", {
|
|
60
|
+
"aria-label": "Secondary nav",
|
|
61
|
+
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"
|
|
62
|
+
})))) : null, h("div", {
|
|
63
|
+
key: 'c3942c635dff3dc8cb47a21f20aca52acfaa3e18',
|
|
64
|
+
class: `border-softest ${this.social ? 'border-t-2' : ''} pt-20 pb-28 md:pt-28`
|
|
65
|
+
}, h("div", {
|
|
66
|
+
key: '57e963272659ce2e63294c969f3724a03aef667e',
|
|
67
|
+
class: "container flex flex-wrap items-center gap-20 lg:flex-nowrap"
|
|
68
|
+
}, h("div", {
|
|
69
|
+
key: 'c3e5cfe07fe9eb90450f7a87be1b95ed00ef38ce',
|
|
70
|
+
class: "flex items-center gap-x-12"
|
|
71
|
+
}, h("a", {
|
|
72
|
+
key: 'b0d0c65115b611f78d2b468559c16eb60f538907',
|
|
73
|
+
target: "_blank",
|
|
74
|
+
rel: "noopener noreferrer",
|
|
75
|
+
class: "effect-focus focus-visible:rounded-xs flex w-[54px] ml-0",
|
|
76
|
+
href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en"
|
|
77
|
+
}, h("eds-img", {
|
|
78
|
+
key: '6cb5d067f07b456a8d828f3f42f2730e3e5374e0',
|
|
79
|
+
width: 54,
|
|
80
|
+
height: 41,
|
|
81
|
+
src: "https://www.ebrains.eu/flags/4x3/eu.svg"
|
|
82
|
+
}))), h("div", {
|
|
83
|
+
key: 'e5b768b0fb96fcdcb786d33fc808368005935491',
|
|
84
|
+
class: "f-ui-04 text-light order-last w-full lg:order-none lg:w-auto"
|
|
85
|
+
}, h("p", {
|
|
86
|
+
key: '777263c2f4bde43d38690f41391eaf8e51d945fa'
|
|
87
|
+
}, this.fundedBy), h("div", {
|
|
88
|
+
key: 'a415687d08edf8f3e03a6edce9c45f58662c8595',
|
|
89
|
+
class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap"
|
|
90
|
+
}, h("span", {
|
|
91
|
+
key: 'c0b6498ad4f5e1f4f1945ebb971f9dd81cc74c77',
|
|
92
|
+
class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline"
|
|
93
|
+
}, "\u00A9 ", this.rightsReserved), this.hasCookiesSetUp && h("button", {
|
|
94
|
+
key: '10133d180bfb0d8a6354ea2cbea318a2c46fc463',
|
|
95
|
+
class: "effect-focus !no-underline underline-offset-4 hover:!underline",
|
|
96
|
+
onClick: () => this.toggleCookiesPopup()
|
|
97
|
+
}, this.cookiesPreference))), h("div", {
|
|
98
|
+
key: '917d0980f91a8c42a75bae301b0a18e3777dd021',
|
|
99
|
+
class: "ml-auto pl-12"
|
|
100
|
+
}, this.enableScrollTop ? h("eds-button", {
|
|
101
|
+
"aria-label": "Back to top",
|
|
102
|
+
intent: "ghostInverse",
|
|
103
|
+
icon: "chevron-up",
|
|
104
|
+
onClick: this.backToTop
|
|
105
|
+
}) : null))));
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
EdsFooter.style = EdsFooterStyle0;
|
|
109
|
+
|
|
110
|
+
export { EdsFooter as eds_footer };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const EdsFrame = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
registerInstance(this, hostRef);
|
|
9
|
+
this.frameLabel = undefined;
|
|
10
|
+
this.urlLabel = 'Open in Storybook';
|
|
11
|
+
this.errorMessage = 'Could not load the requested Storybook content. Please check the URL or try again later.';
|
|
12
|
+
this.storybookUrl = undefined;
|
|
13
|
+
this.storyPath = undefined;
|
|
14
|
+
this.intent = 'strong';
|
|
15
|
+
this.tiny = false;
|
|
16
|
+
this.size = 'auto';
|
|
17
|
+
this.bg = true;
|
|
18
|
+
this.iframeError = false;
|
|
19
|
+
}
|
|
20
|
+
articleClasses() {
|
|
21
|
+
return [this.tiny ? 'min-h-120' : 'min-h-156', this.bg ? 'bg-inverse' : 'bg-default', 'rounded border-softer effect-focus-within relative flex grow flex-col border-2', 'w-full h-full'].join(' ');
|
|
22
|
+
}
|
|
23
|
+
getFrameHeight() {
|
|
24
|
+
switch (this.size) {
|
|
25
|
+
case 'sm':
|
|
26
|
+
return '100px';
|
|
27
|
+
case 'md':
|
|
28
|
+
return '200px';
|
|
29
|
+
case 'lg':
|
|
30
|
+
return '400px';
|
|
31
|
+
case 'xl':
|
|
32
|
+
return '700px';
|
|
33
|
+
default:
|
|
34
|
+
return 'auto';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
async checkIframeAvailability() {
|
|
38
|
+
try {
|
|
39
|
+
const response = await fetch(this.frameSrc, {
|
|
40
|
+
method: 'GET'
|
|
41
|
+
});
|
|
42
|
+
if (!response.ok) {
|
|
43
|
+
throw new Error('Failed to load');
|
|
44
|
+
}
|
|
45
|
+
} catch (error) {
|
|
46
|
+
this.iframeError = true;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
componentWillLoad() {
|
|
50
|
+
this.checkIframeAvailability();
|
|
51
|
+
}
|
|
52
|
+
componentDidLoad() {
|
|
53
|
+
// Emit context for each eds-link element after the component is fully loaded
|
|
54
|
+
const links = this.el.querySelectorAll('eds-link');
|
|
55
|
+
links.forEach(link => {
|
|
56
|
+
this.emitContext(link);
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Emits a custom event called `parentContext` for a given link element.
|
|
61
|
+
* This event provides context information about the breadcrumb component.
|
|
62
|
+
*
|
|
63
|
+
* @param linkElement - The link element to which the event will be dispatched.
|
|
64
|
+
*/
|
|
65
|
+
emitContext(linkElement) {
|
|
66
|
+
const event = new CustomEvent('parentContext', {
|
|
67
|
+
detail: {
|
|
68
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
69
|
+
identifier: this.frameLabel
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
linkElement.dispatchEvent(event);
|
|
73
|
+
}
|
|
74
|
+
get storyLink() {
|
|
75
|
+
return `${this.storybookUrl}/?path=/story/${this.storyPath}`;
|
|
76
|
+
}
|
|
77
|
+
get frameSrc() {
|
|
78
|
+
return `${this.storybookUrl}/iframe.html?id=${this.storyPath}&viewMode=story`;
|
|
79
|
+
}
|
|
80
|
+
render() {
|
|
81
|
+
return h("div", {
|
|
82
|
+
key: '0c3a43efc1a125af5999af88c4eb071b5c3bc6c5',
|
|
83
|
+
class: this.articleClasses()
|
|
84
|
+
}, h("div", {
|
|
85
|
+
key: '32303d5e2c2f3b01efe1ceaf828346f873bea6b6',
|
|
86
|
+
class: "effect-height flex items-center justify-between py-8 px-12"
|
|
87
|
+
}, h("span", {
|
|
88
|
+
key: '75f7f6750413dad4af2ea62c12ffb994491d5d01',
|
|
89
|
+
class: "f-ui-02"
|
|
90
|
+
}, this.frameLabel), !this.iframeError ? h("eds-link", {
|
|
91
|
+
label: this.urlLabel,
|
|
92
|
+
url: this.storyLink,
|
|
93
|
+
intent: this.intent,
|
|
94
|
+
class: "ml-auto",
|
|
95
|
+
external: true,
|
|
96
|
+
disabled: false,
|
|
97
|
+
icon: "arrow-diagonal"
|
|
98
|
+
}) : null), h("div", {
|
|
99
|
+
key: '1fd99f6eda026814910b0cd93635616b7d3ffe09',
|
|
100
|
+
class: "border-softer border-t-2"
|
|
101
|
+
}, this.iframeError ? h("div", {
|
|
102
|
+
class: "container ml-8 mr-8 mt-16"
|
|
103
|
+
}, this.errorMessage) : h("iframe", {
|
|
104
|
+
src: this.frameSrc,
|
|
105
|
+
width: "100%",
|
|
106
|
+
height: this.getFrameHeight(),
|
|
107
|
+
title: this.frameLabel,
|
|
108
|
+
frameBorder: "0",
|
|
109
|
+
allowFullScreen: true
|
|
110
|
+
})));
|
|
111
|
+
}
|
|
112
|
+
get el() {
|
|
113
|
+
return getElement(this);
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export { EdsFrame as eds_frame };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const edsFullscreenMenuCss = "";
|
|
7
|
+
const EdsFullscreenMenuStyle0 = edsFullscreenMenuCss;
|
|
8
|
+
const EdsFullscreenMenu = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.menuClose = createEvent(this, "menuClose", 7);
|
|
12
|
+
this.links = undefined;
|
|
13
|
+
this.menuLinks = undefined;
|
|
14
|
+
this.homeUrl = '/';
|
|
15
|
+
this.inverseHeader = false;
|
|
16
|
+
this.isMenuOpen = false;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Listens for the toggleMenu event to open or close the menu.
|
|
20
|
+
* This event is emitted by the eds-header component.
|
|
21
|
+
*/
|
|
22
|
+
handleToggleMenu(event) {
|
|
23
|
+
this.isMenuOpen = event.detail; // Set isMenuOpen based on the event payload
|
|
24
|
+
}
|
|
25
|
+
/** Opens the menu */
|
|
26
|
+
openMenu() {
|
|
27
|
+
this.isMenuOpen = true;
|
|
28
|
+
}
|
|
29
|
+
/** Closes the menu */
|
|
30
|
+
closeMenu() {
|
|
31
|
+
this.isMenuOpen = false;
|
|
32
|
+
this.menuClose.emit();
|
|
33
|
+
}
|
|
34
|
+
// Lifecycle method to add the resize event listener when component loads
|
|
35
|
+
componentDidLoad() {
|
|
36
|
+
window.addEventListener('resize', this.handleResize.bind(this));
|
|
37
|
+
}
|
|
38
|
+
// Lifecycle method to remove the resize event listener when component unloads
|
|
39
|
+
disconnectedCallback() {
|
|
40
|
+
window.removeEventListener('resize', this.handleResize.bind(this));
|
|
41
|
+
}
|
|
42
|
+
// Function to close the menu if screen width is larger than a defined breakpoint (1024px)
|
|
43
|
+
handleResize() {
|
|
44
|
+
if (window.innerWidth >= 1024) {
|
|
45
|
+
this.isMenuOpen = false;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Parses the `links` prop into an array of link objects.
|
|
50
|
+
* Returns an empty array if parsing fails or if `links` is not a valid JSON string or object.
|
|
51
|
+
*
|
|
52
|
+
* @returns {any[]} Array of parsed link objects
|
|
53
|
+
*/
|
|
54
|
+
get parsedLinks() {
|
|
55
|
+
if (typeof this.links === 'object') {
|
|
56
|
+
return this.links;
|
|
57
|
+
} else if (typeof this.links === 'string') {
|
|
58
|
+
try {
|
|
59
|
+
return JSON.parse(this.links);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
// eslint-disable-next-line
|
|
62
|
+
console.error('Error parsing links prop:', e);
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Parses the `menuLinks` prop into an array of link objects.
|
|
70
|
+
* Returns an empty array if parsing fails or if `menuLinks` is not a valid JSON string or object.
|
|
71
|
+
*
|
|
72
|
+
* @returns {any[]} Array of parsed menu link objects
|
|
73
|
+
*/
|
|
74
|
+
get parsedMenuLinks() {
|
|
75
|
+
if (typeof this.menuLinks === 'object') {
|
|
76
|
+
return this.menuLinks;
|
|
77
|
+
} else if (typeof this.menuLinks === 'string') {
|
|
78
|
+
try {
|
|
79
|
+
return JSON.parse(this.menuLinks);
|
|
80
|
+
} catch (e) {
|
|
81
|
+
// eslint-disable-next-line
|
|
82
|
+
console.error('Error parsing menuLinks prop:', e);
|
|
83
|
+
return [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
return this.isMenuOpen ? h("div", {
|
|
90
|
+
class: "eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll"
|
|
91
|
+
}, h("div", {
|
|
92
|
+
class: "flex min-h-full flex-col"
|
|
93
|
+
}, h("div", {
|
|
94
|
+
class: `bg-default w-full sticky top-0 ${this.inverseHeader ? 'bg-strongest' : 'bg-default'}`
|
|
95
|
+
}, h("div", {
|
|
96
|
+
class: "mx-auto flex items-center justify-between"
|
|
97
|
+
}, h("div", {
|
|
98
|
+
class: "mr-auto w-[200px] h-[85px]"
|
|
99
|
+
}, h("eds-logo", {
|
|
100
|
+
type: this.inverseHeader ? 'color-white' : 'color',
|
|
101
|
+
href: this.homeUrl
|
|
102
|
+
})), h("div", {
|
|
103
|
+
class: "px-16"
|
|
104
|
+
}, h("eds-button", {
|
|
105
|
+
"aria-label": "Close menu",
|
|
106
|
+
intent: "ghostInverse",
|
|
107
|
+
icon: "close",
|
|
108
|
+
onClick: () => this.closeMenu()
|
|
109
|
+
})))), h("div", {
|
|
110
|
+
class: "py-16 px-16"
|
|
111
|
+
}, h("nav", {
|
|
112
|
+
class: "mt-28 flex flex-col gap-y-8"
|
|
113
|
+
}, this.parsedLinks.map((link, index) => h("eds-link", {
|
|
114
|
+
label: link.label,
|
|
115
|
+
key: index,
|
|
116
|
+
url: link.url,
|
|
117
|
+
intent: "tertiary",
|
|
118
|
+
size: "large",
|
|
119
|
+
class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",
|
|
120
|
+
onClick: () => this.closeMenu(),
|
|
121
|
+
icon: "arrow-right"
|
|
122
|
+
}))), h("eds-block-break", null), h("nav", {
|
|
123
|
+
class: "mt-28 flex flex-col gap-y-8"
|
|
124
|
+
}, this.parsedMenuLinks.map((link, index) => h("eds-link", {
|
|
125
|
+
label: link.label,
|
|
126
|
+
key: index,
|
|
127
|
+
url: link.url,
|
|
128
|
+
intent: "tertiary",
|
|
129
|
+
size: "large",
|
|
130
|
+
class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",
|
|
131
|
+
onClick: () => this.closeMenu(),
|
|
132
|
+
icon: "chevron-right"
|
|
133
|
+
})))), h("div", {
|
|
134
|
+
class: "mt-auto"
|
|
135
|
+
}, h("eds-footer", {
|
|
136
|
+
social: true,
|
|
137
|
+
"extra-class": "bg-darker"
|
|
138
|
+
})))) : null;
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
EdsFullscreenMenu.style = EdsFullscreenMenuStyle0;
|
|
142
|
+
|
|
143
|
+
export { EdsFullscreenMenu as eds_fullscreen_menu };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { a as arrowDiagonal } from './arrow-diagonal-black-8f0494c3.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconArrowDiagonal = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.addClass = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '08ebdce5cfbe75bf4bfab8f72493e2178be55c3c',
|
|
15
|
+
class: this.addClass,
|
|
16
|
+
innerHTML: arrowDiagonal
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconArrowDiagonal as eds_icon_arrow_diagonal };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { a as arrowRight } from './arrow-right-9322ba8a.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconArrowRight = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '6d704324784e6c3d9c221dcaf83bd86a8a6a94ab',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: arrowRight
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconArrowRight as eds_icon_arrow_right };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { b as bluesky } from './bluesky-cc5edd2d.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconBluesky = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '8b5d4cfeedf6d7e9bea48d7ba892527d484c858d',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: bluesky
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconBluesky as eds_icon_bluesky };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { c as chevronDown } from './chevron-down-6144c823.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconChevronDown = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'bc01e9e10033245e02403b6b919911018eef9919',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: chevronDown
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconChevronDown as eds_icon_chevron_down };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { c as chevronLeft } from './chevron-left-ca6c66e1.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconChevronLeft = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'd74bd0b2ddfd5bd61c97309aebb71d7c29f0cf43',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: chevronLeft
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconChevronLeft as eds_icon_chevron_left };
|