@ebrains/react 0.6.0-alpha.0 → 0.8.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.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion_17.entry.esm.js +196 -0
- package/eds-alert.entry.esm.js +14 -6
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-breadcrumb.entry.esm.js +8 -16
- package/eds-card-desc_3.entry.esm.js +125 -0
- package/eds-card-generic.entry.esm.js +114 -0
- package/eds-card-project.entry.esm.js +10 -10
- package/eds-card-section.entry.esm.js +56 -0
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +4 -4
- package/eds-card-wrapper.entry.esm.js +4 -4
- package/eds-code-block.entry.esm.js +7 -7
- package/eds-components-section.entry.esm.js +27 -24
- package/eds-cookies-preference.entry.esm.js +2 -2
- package/eds-docs-palettes.entry.esm.js +1 -1
- package/eds-docs-tokens.entry.esm.js +1 -1
- package/eds-feedback.entry.esm.js +82 -0
- package/eds-form.entry.esm.js +339 -276
- package/eds-frame.entry.esm.js +34 -33
- package/eds-icon-arrow-diagonal.entry.esm.js +3 -3
- package/eds-icon-arrow-right.entry.esm.js +1 -1
- package/eds-icon-bluesky.entry.esm.js +1 -1
- package/eds-icon-chevron-down.entry.esm.js +1 -1
- package/eds-icon-chevron-left.entry.esm.js +1 -1
- package/eds-icon-chevron-right.entry.esm.js +1 -1
- package/eds-icon-chevron-up.entry.esm.js +1 -1
- package/eds-icon-close.entry.esm.js +1 -1
- package/eds-icon-copy.entry.esm.js +1 -1
- package/eds-icon-eu.entry.esm.js +1 -1
- package/eds-icon-facebook.entry.esm.js +1 -1
- package/eds-icon-gitlab.entry.esm.js +1 -1
- package/eds-icon-linkedin.entry.esm.js +1 -1
- package/eds-icon-loader.entry.esm.js +1 -1
- package/eds-icon-mastodon.entry.esm.js +1 -1
- package/eds-icon-menu.entry.esm.js +1 -1
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-star.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +21 -0
- package/eds-icon-thumbs-up.entry.esm.js +21 -0
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-user.entry.esm.js +1 -1
- package/eds-icon-youtube.entry.esm.js +1 -1
- package/eds-input_7.entry.esm.js +77 -37
- package/{keycloak-d502ec16.esm.js → eds-login_2.entry.esm.js} +172 -1
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-modal.entry.esm.js +22 -9
- package/eds-pagination_2.entry.esm.js +49 -28
- package/eds-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +37 -37
- package/eds-section-core_2.entry.esm.js +6 -6
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-svg-repository.entry.esm.js +18 -7
- package/eds-switch.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +14 -26
- package/eds-timeline.entry.esm.js +9 -23
- package/eds-toast-manager.entry.esm.js +62 -0
- package/eds-toast.entry.esm.js +92 -0
- package/eds-tooltip.entry.esm.js +3 -3
- package/eds-trl.entry.esm.js +3 -3
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +47 -55
- package/logo-space.entry.esm.js +4 -4
- package/logo-variations-horizontal_2.entry.esm.js +26 -26
- package/logo-wrong-usage.entry.esm.js +37 -37
- package/package.json +1 -1
- package/sharedUtils-a550989c.esm.js +17 -0
- package/src/components.d.ts +4 -3
- package/star-0da9b5e9.esm.js +5 -0
- package/thumbs-down-a18fd049.esm.js +5 -0
- package/thumbs-up-c19a71bc.esm.js +6 -0
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +26 -26
- package/token-typography.entry.esm.js +2 -2
- package/README.md +0 -7
- package/eds-accordion_13.entry.esm.js +0 -1064
- package/eds-block-break.entry.esm.js +0 -22
- package/eds-dropdown_2.entry.esm.js +0 -235
- package/eds-footer.entry.esm.js +0 -102
- package/eds-fullscreen-menu.entry.esm.js +0 -143
- package/eds-header.entry.esm.js +0 -130
- package/eds-link.entry.esm.js +0 -204
- package/eds-login.entry.esm.js +0 -97
- package/eds-logo.entry.esm.js +0 -87
- package/eds-navigator.entry.esm.js +0 -72
- package/eds-social-networks.entry.esm.js +0 -74
- package/eds-steps.entry.esm.js +0 -98
- package/eds-tab.entry.esm.js +0 -41
- package/eds-tabs-content.entry.esm.js +0 -145
- package/eds-user.entry.esm.js +0 -118
- package/eds-vertical-stepper.entry.esm.js +0 -81
package/eds-login.entry.esm.js
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
|
|
2
|
-
import { l as login, a as logout, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak-d502ec16.esm.js';
|
|
3
|
-
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react/jsx-runtime';
|
|
6
|
-
import 'react-dom';
|
|
7
|
-
|
|
8
|
-
const EdsLogin = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
|
|
12
|
-
/**
|
|
13
|
-
* Handles user login by invoking the Keycloak `login` function.
|
|
14
|
-
* Only triggers login if the user is not already authenticated.
|
|
15
|
-
*/
|
|
16
|
-
this.handleLogin = async () => {
|
|
17
|
-
if (!this.authenticated) {
|
|
18
|
-
try {
|
|
19
|
-
await login();
|
|
20
|
-
toast.show('You are authenticated', 'success');
|
|
21
|
-
} catch (error) {
|
|
22
|
-
toast.show(error.message, 'error');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Handles user logout by invoking the Keycloak `logout` function.
|
|
28
|
-
* Resets the `authenticated` state to `false` after logout.
|
|
29
|
-
*/
|
|
30
|
-
this.handleLogout = async () => {
|
|
31
|
-
try {
|
|
32
|
-
await logout();
|
|
33
|
-
} catch (error) {
|
|
34
|
-
toast.show(error.message, 'error');
|
|
35
|
-
}
|
|
36
|
-
this.authenticated = false;
|
|
37
|
-
this.user = null;
|
|
38
|
-
};
|
|
39
|
-
this.keycloakUrl = undefined;
|
|
40
|
-
this.keycloakRealm = undefined;
|
|
41
|
-
this.keycloakClientId = undefined;
|
|
42
|
-
this.authenticated = false;
|
|
43
|
-
this.user = null;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Lifecycle method that runs when the component is about to load.
|
|
47
|
-
* It initializes authentication by calling the `initAuth` method.
|
|
48
|
-
*/
|
|
49
|
-
async componentWillLoad() {
|
|
50
|
-
// Check if required props are provided (optional check)
|
|
51
|
-
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
52
|
-
// eslint-disable-next-line
|
|
53
|
-
console.error('Keycloak configuration props are missing.');
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
await this.initAuth();
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
60
|
-
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
61
|
-
* Emits `authStatusChanged` event with the authentication status.
|
|
62
|
-
*/
|
|
63
|
-
async initAuth() {
|
|
64
|
-
try {
|
|
65
|
-
await initKeycloak({
|
|
66
|
-
url: this.keycloakUrl,
|
|
67
|
-
realm: this.keycloakRealm,
|
|
68
|
-
clientId: this.keycloakClientId
|
|
69
|
-
}, true);
|
|
70
|
-
if (isAuthenticated()) {
|
|
71
|
-
this.user = getUser();
|
|
72
|
-
this.authenticated = true;
|
|
73
|
-
this.authStatusChanged.emit({
|
|
74
|
-
authenticated: this.authenticated,
|
|
75
|
-
user: this.user
|
|
76
|
-
}); // Emit auth status change
|
|
77
|
-
}
|
|
78
|
-
} catch (error) {
|
|
79
|
-
toast.show(error.message, 'error');
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
render() {
|
|
83
|
-
return h("div", {
|
|
84
|
-
key: '62768f8a6cc8ac16b13f9b2bb9cf5835f7f63844',
|
|
85
|
-
class: "block"
|
|
86
|
-
}, !this.authenticated && h("eds-button", {
|
|
87
|
-
key: '31e341d628242fed472f673c0fe8346c7871515d',
|
|
88
|
-
label: "Login",
|
|
89
|
-
intent: "primary",
|
|
90
|
-
"extra-class": "text-default",
|
|
91
|
-
"aria-label": "Login",
|
|
92
|
-
triggerClick: this.handleLogin.bind(this)
|
|
93
|
-
}));
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
export { EdsLogin as eds_login };
|
package/eds-logo.entry.esm.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { h as hLogoColor } from './logo-color-7f1fd803.esm.js';
|
|
3
|
-
import { h as hLogoBlack, a as hLogoColorWhite, b as hLogoWhite, c as hLogoWhiteNoBg, v as vLogoColor, d as vLogoBlack, e as vLogoColorWhite, f as vLogoWhite, g as vLogoWhiteNoBg } from './logo-white-no-bg-f382f86f.esm.js';
|
|
4
|
-
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import 'react/jsx-runtime';
|
|
7
|
-
import 'react-dom';
|
|
8
|
-
|
|
9
|
-
const edsLogoCss = ".w-\\[130px\\]{width:130px}.mr-auto{margin-right:auto}.text-current{color:currentColor}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.h-full{height:100%}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}@media (min-width: 900px){.lg\\:w-\\[150px\\]{width:150px}}";
|
|
10
|
-
const EdsLogoStyle0 = edsLogoCss;
|
|
11
|
-
const EdsLogo = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
this.href = '/';
|
|
15
|
-
this.orientation = 'horizontal';
|
|
16
|
-
this.type = undefined;
|
|
17
|
-
this.label = 'Home';
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Handles the click event on the logo link.
|
|
21
|
-
* Emits a `matomoEvent` for analytics tracking with details about the interaction.
|
|
22
|
-
* - `category`: Component type (e.g., "ui-component").
|
|
23
|
-
* - `tag`: The HTML tag name of the component.
|
|
24
|
-
* - `name`: Event name, set as "logo".
|
|
25
|
-
* - `action`: The action, set as "click".
|
|
26
|
-
*/
|
|
27
|
-
handleClick() {
|
|
28
|
-
sendAnalytics({
|
|
29
|
-
category: 'ui-component',
|
|
30
|
-
tag: this.el.tagName.toLowerCase(),
|
|
31
|
-
name: 'logo',
|
|
32
|
-
action: 'click'
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Determines the appropriate SVG content based on the `orientation` and `type` props.
|
|
37
|
-
*/
|
|
38
|
-
getLogo() {
|
|
39
|
-
const logos = {
|
|
40
|
-
horizontal: {
|
|
41
|
-
color: hLogoColor,
|
|
42
|
-
black: hLogoBlack,
|
|
43
|
-
'color-white': hLogoColorWhite,
|
|
44
|
-
white: hLogoWhite,
|
|
45
|
-
'no-bg': hLogoWhiteNoBg
|
|
46
|
-
},
|
|
47
|
-
vertical: {
|
|
48
|
-
color: vLogoColor,
|
|
49
|
-
black: vLogoBlack,
|
|
50
|
-
'color-white': vLogoColorWhite,
|
|
51
|
-
white: vLogoWhite,
|
|
52
|
-
'no-bg': vLogoWhiteNoBg
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
// Validate the orientation and type
|
|
56
|
-
const validOrientation = logos[this.orientation];
|
|
57
|
-
if (!validOrientation) {
|
|
58
|
-
//console.error(`Invalid orientation "${this.orientation}". Falling back to "horizontal".`);
|
|
59
|
-
return hLogoColor; // Default fallback logo
|
|
60
|
-
}
|
|
61
|
-
const validLogo = validOrientation[this.type];
|
|
62
|
-
if (!validLogo) {
|
|
63
|
-
//console.error(`Invalid type "${this.type}" for orientation "${this.orientation}". Falling back to "color".`);
|
|
64
|
-
return validOrientation['color']; // Fallback to color logo
|
|
65
|
-
}
|
|
66
|
-
return validLogo;
|
|
67
|
-
}
|
|
68
|
-
render() {
|
|
69
|
-
const logoContent = this.getLogo();
|
|
70
|
-
return h("a", {
|
|
71
|
-
key: 'ee8de4071b0137020341982b4c5cb2c938f1c4df',
|
|
72
|
-
href: this.href,
|
|
73
|
-
onClick: () => this.handleClick(),
|
|
74
|
-
class: "eds-logo-wrapper",
|
|
75
|
-
"aria-label": this.label
|
|
76
|
-
}, h("div", {
|
|
77
|
-
key: '1eb620afbcc5a2a5c6914cc1c91a45ca62d0068c',
|
|
78
|
-
innerHTML: logoContent
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
get el() {
|
|
82
|
-
return getElement(this);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
EdsLogo.style = EdsLogoStyle0;
|
|
86
|
-
|
|
87
|
-
export { EdsLogo as eds_logo };
|
|
@@ -1,72 +0,0 @@
|
|
|
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 EdsNavigator = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.prevLabel = undefined;
|
|
10
|
-
this.nextLabel = undefined;
|
|
11
|
-
this.prevUrl = undefined;
|
|
12
|
-
this.nextUrl = undefined;
|
|
13
|
-
this.linkSize = 'small';
|
|
14
|
-
this.linkIntent = 'tertiary';
|
|
15
|
-
}
|
|
16
|
-
componentDidLoad() {
|
|
17
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
18
|
-
const links = this.el.querySelectorAll('eds-link');
|
|
19
|
-
links.forEach(link => {
|
|
20
|
-
this.emitContext(link);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Emits a custom event 'parentContext' for a given link element with the component's context.
|
|
25
|
-
* @param linkElement - The eds-link element to emit the event for.
|
|
26
|
-
*/
|
|
27
|
-
emitContext(linkElement) {
|
|
28
|
-
const event = new CustomEvent('parentContext', {
|
|
29
|
-
detail: {
|
|
30
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
31
|
-
identifier: null
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
linkElement.dispatchEvent(event);
|
|
35
|
-
}
|
|
36
|
-
render() {
|
|
37
|
-
return h("ul", {
|
|
38
|
-
key: '712287e683436cc98c2d6ef195501add1929522e',
|
|
39
|
-
class: "flex lg:flex grow items-center justify-center gap-x-8"
|
|
40
|
-
}, this.prevLabel && h("eds-link", {
|
|
41
|
-
key: '4fda36ce37897284d7062f88133f147831d96a6f',
|
|
42
|
-
label: this.prevLabel,
|
|
43
|
-
url: this.prevUrl || undefined,
|
|
44
|
-
disabled: !this.prevUrl,
|
|
45
|
-
"aria-label": this.prevLabel,
|
|
46
|
-
size: this.linkSize,
|
|
47
|
-
intent: this.linkIntent,
|
|
48
|
-
class: "mr-auto !p-8 lg:!pr-12"
|
|
49
|
-
}, h("eds-icon-wrapper", {
|
|
50
|
-
key: '9bfa6bbbdc68641f65bec49f207d96f075b9a5b0',
|
|
51
|
-
icon: "chevron-left"
|
|
52
|
-
}), this.prevLabel), this.nextLabel && h("eds-link", {
|
|
53
|
-
key: '6ee8ebee011a2c30a74645b072c7c37929d0a55f',
|
|
54
|
-
label: this.nextLabel,
|
|
55
|
-
url: this.nextUrl || undefined,
|
|
56
|
-
disabled: !this.nextUrl,
|
|
57
|
-
"aria-label": this.nextLabel,
|
|
58
|
-
size: this.linkSize,
|
|
59
|
-
intent: this.linkIntent,
|
|
60
|
-
class: "ml-auto !p-8 lg:!pl-12"
|
|
61
|
-
}, this.nextLabel, h("eds-icon-wrapper", {
|
|
62
|
-
key: '44ebd4dcce0e367df7d9035bb445e49fde35e913',
|
|
63
|
-
icon: "chevron-right",
|
|
64
|
-
class: "w-20 h-20"
|
|
65
|
-
})));
|
|
66
|
-
}
|
|
67
|
-
get el() {
|
|
68
|
-
return getElement(this);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export { EdsNavigator as eds_navigator };
|
|
@@ -1,74 +0,0 @@
|
|
|
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 edsSocialNetworksCss = "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}";
|
|
7
|
-
const EdsSocialNetworksStyle0 = edsSocialNetworksCss;
|
|
8
|
-
const EdsSocialNetworks = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
/**
|
|
12
|
-
* Array of social network objects, each containing label, URL, and icon.
|
|
13
|
-
* These are used to render the social network links.
|
|
14
|
-
*
|
|
15
|
-
* @private
|
|
16
|
-
* @type {SocialNetworks[]}
|
|
17
|
-
*/
|
|
18
|
-
this.socialNetworks = [{
|
|
19
|
-
label: 'Twitter',
|
|
20
|
-
url: 'https://twitter.com/ebrains_eu',
|
|
21
|
-
icon: 'twitter'
|
|
22
|
-
}, {
|
|
23
|
-
label: 'Linkedin',
|
|
24
|
-
url: 'https://www.linkedin.com/company/ebrains-eu/about/',
|
|
25
|
-
icon: 'linkedin'
|
|
26
|
-
}, {
|
|
27
|
-
label: 'Facebook',
|
|
28
|
-
url: 'https://www.facebook.com/people/Ebrains_eu/100046659909324/',
|
|
29
|
-
icon: 'facebook'
|
|
30
|
-
}, {
|
|
31
|
-
label: 'Youtube',
|
|
32
|
-
url: 'https://www.youtube.com/channel/UC6E796cVVR5Xrs2A5jJmleQ',
|
|
33
|
-
icon: 'youtube'
|
|
34
|
-
}, {
|
|
35
|
-
label: 'Mastodon',
|
|
36
|
-
url: 'https://mastodon.social/@ebrains',
|
|
37
|
-
icon: 'mastodon'
|
|
38
|
-
}, {
|
|
39
|
-
label: 'Bluesky',
|
|
40
|
-
url: 'https://bsky.app/profile/ebrains.bsky.social',
|
|
41
|
-
icon: 'bluesky'
|
|
42
|
-
}];
|
|
43
|
-
this.title = 'Follow EBRAINS to keep up-to-date';
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Renders the component's HTML structure with links to EBRAINS social profiles.
|
|
47
|
-
* Each social network link uses the `eds-link` component with specific classes and styles.
|
|
48
|
-
*
|
|
49
|
-
* @returns {JSX.Element} The rendered JSX for the component.
|
|
50
|
-
*/
|
|
51
|
-
render() {
|
|
52
|
-
return h("div", {
|
|
53
|
-
key: '9efc31261e88c70f9c808251124178d807140594'
|
|
54
|
-
}, h("p", {
|
|
55
|
-
key: '383101de2aaba05e1024f3ba86d788ad5d92173c',
|
|
56
|
-
class: "f-ui-02"
|
|
57
|
-
}, this.title), h("ul", {
|
|
58
|
-
key: 'e27243a4e7b8aab085c4ef091d67df57dba70664',
|
|
59
|
-
class: "mt-12 flex gap-4"
|
|
60
|
-
}, this.socialNetworks.map((network, index) => h("li", {
|
|
61
|
-
key: index
|
|
62
|
-
}, h("eds-link", {
|
|
63
|
-
"extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm",
|
|
64
|
-
external: true,
|
|
65
|
-
"aria-label": network.label,
|
|
66
|
-
url: network.url,
|
|
67
|
-
icon: network.icon,
|
|
68
|
-
intent: "strong"
|
|
69
|
-
})))));
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
EdsSocialNetworks.style = EdsSocialNetworksStyle0;
|
|
73
|
-
|
|
74
|
-
export { EdsSocialNetworks as eds_social_networks };
|
package/eds-steps.entry.esm.js
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
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 edsStepsCss = ".steps{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps h4::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:0.875rem;border:1px solid #ccc;background:#333;color:#fff;border-radius:50%}.steps blockquote{margin-top:16px;margin-bottom:16px;font-style:italic;color:#aaa;padding-left:6px}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.text-default{color:var(--black)}.text-error{color:var(--red-700)}.text-extra-light{color:var(--grey-300)}.text-inverse{color:var(--white)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.mb-28{margin-bottom:1.75rem}";
|
|
7
|
-
const EdsStepsStyle0 = edsStepsCss;
|
|
8
|
-
const EdsSteps = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.stepClick = createEvent(this, "stepClick", 7);
|
|
12
|
-
this.handleNext = () => {
|
|
13
|
-
if (this.activeStep < this.parsedSteps.length) {
|
|
14
|
-
this.activeStep = this.activeStep + 1;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
this.handleBack = () => {
|
|
18
|
-
if (this.activeStep > 0) {
|
|
19
|
-
this.activeStep = this.activeStep - 1;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
this.steps = [];
|
|
23
|
-
this.type = 'static';
|
|
24
|
-
this.activeStep = 0;
|
|
25
|
-
}
|
|
26
|
-
handleStepClick(index) {
|
|
27
|
-
this.stepClick.emit(index);
|
|
28
|
-
// In linear mode, update the active step on header click.
|
|
29
|
-
if (this.type === 'linear') {
|
|
30
|
-
this.activeStep = index;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Parse the JSON string into an array of steps.
|
|
35
|
-
*/
|
|
36
|
-
get parsedSteps() {
|
|
37
|
-
if (typeof this.steps === 'string') {
|
|
38
|
-
try {
|
|
39
|
-
const stepsStr = this.steps;
|
|
40
|
-
return JSON.parse(stepsStr);
|
|
41
|
-
} catch (error) {
|
|
42
|
-
//console.error('Invalid steps JSON', error);
|
|
43
|
-
return [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return this.steps;
|
|
47
|
-
}
|
|
48
|
-
/*private handleReset = () => {
|
|
49
|
-
this.activeStep = 0;
|
|
50
|
-
};*/
|
|
51
|
-
render() {
|
|
52
|
-
const steps = this.parsedSteps;
|
|
53
|
-
if (this.type === 'linear') {
|
|
54
|
-
return h("div", null, h("div", {
|
|
55
|
-
class: "steps"
|
|
56
|
-
}, steps.map((step, index) => h("div", {
|
|
57
|
-
class: "step mb-28",
|
|
58
|
-
key: index
|
|
59
|
-
}, h("h3", {
|
|
60
|
-
onClick: () => this.handleStepClick(index)
|
|
61
|
-
}, step.title), this.activeStep === index && h("div", {
|
|
62
|
-
class: "content"
|
|
63
|
-
}, h("div", {
|
|
64
|
-
class: "f-body-02 text-lighter my-16"
|
|
65
|
-
}, step.content), h("eds-button", {
|
|
66
|
-
label: index === steps.length - 1 ? 'Finish' : 'Continue',
|
|
67
|
-
intent: "primary",
|
|
68
|
-
class: "next-btn",
|
|
69
|
-
onClick: this.handleNext
|
|
70
|
-
}), h("eds-button", {
|
|
71
|
-
label: "Back",
|
|
72
|
-
intent: "ghostInverse",
|
|
73
|
-
onClick: this.handleBack,
|
|
74
|
-
disabled: index === 0,
|
|
75
|
-
"extra-class": index === 0 ? 'hidden' : 'ml-8 block'
|
|
76
|
-
}))))), this.activeStep === steps.length && h("div", {
|
|
77
|
-
class: "completed"
|
|
78
|
-
}, h("eds-alert", {
|
|
79
|
-
intent: "success",
|
|
80
|
-
message: "All steps completed - you're finished!"
|
|
81
|
-
})));
|
|
82
|
-
}
|
|
83
|
-
// Static mode: show all steps with their content, no navigation buttons.
|
|
84
|
-
return h("div", {
|
|
85
|
-
class: "steps"
|
|
86
|
-
}, steps.map((step, index) => h("div", {
|
|
87
|
-
class: "step mb-28",
|
|
88
|
-
key: index
|
|
89
|
-
}, h("h3", null, step.title), h("div", {
|
|
90
|
-
class: "content"
|
|
91
|
-
}, h("div", {
|
|
92
|
-
class: "f-body-02 text-lighter my-16"
|
|
93
|
-
}, step.content)))));
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
EdsSteps.style = EdsStepsStyle0;
|
|
97
|
-
|
|
98
|
-
export { EdsSteps as eds_steps };
|
package/eds-tab.entry.esm.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
-
import { c as cva } from './index-39c58238.esm.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react-dom';
|
|
6
|
-
|
|
7
|
-
const EdsTab = class {
|
|
8
|
-
constructor(hostRef) {
|
|
9
|
-
registerInstance(this, hostRef);
|
|
10
|
-
this.tabCva = cva(['cursor-pointer',
|
|
11
|
-
//'px-16 py-12',
|
|
12
|
-
//'border-b-2',
|
|
13
|
-
'text-gray-700', 'hover:text-black', 'focus:outline-none', 'focus-visible:ring'], {
|
|
14
|
-
variants: {
|
|
15
|
-
active: {
|
|
16
|
-
true: 'border-blue-500 font-bold text-blue-600',
|
|
17
|
-
false: 'border-transparent'
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
defaultVariants: {
|
|
21
|
-
active: false
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
this.label = undefined;
|
|
25
|
-
this.url = undefined;
|
|
26
|
-
this.active = false;
|
|
27
|
-
this.ariaLabel = undefined;
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
return h("a", {
|
|
31
|
-
key: 'a55be2a07e554ab13a0d7e913710382d6126da57',
|
|
32
|
-
"aria-label": this.label,
|
|
33
|
-
"aria-current": this.active,
|
|
34
|
-
class: this.tabCva({
|
|
35
|
-
active: this.active
|
|
36
|
-
})
|
|
37
|
-
}, this.label);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export { EdsTab as eds_tab };
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
|
-
import { c as cva } from './index-39c58238.esm.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react/jsx-runtime';
|
|
6
|
-
import 'react-dom';
|
|
7
|
-
|
|
8
|
-
const EdsTabsContent = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.tabContentChange = createEvent(this, "tabContentChange", 7);
|
|
12
|
-
// cva configuration
|
|
13
|
-
this.tabCva = cva(['relative px-16 py-12', 'f-ui-03 whitespace-nowrap', 'effect-color', 'focus-visible:text-default hover:text-default', 'border-2', "after:content-[''] after:absolute after:inset-0 after:rounded-t-lg after:border-3 after:border-accent after:opacity-0", 'outline-none focus:outline-none focus-visible:outline-none focus-visible:after:opacity-100'], {
|
|
14
|
-
variants: {
|
|
15
|
-
position: {
|
|
16
|
-
left: 'rounded-tl-lg border-r-0 pr-28 -mr-16 after:right-16',
|
|
17
|
-
right: 'rounded-tr-lg border-l-0 pl-28 -ml-16 after:left-16',
|
|
18
|
-
center: '',
|
|
19
|
-
first: 'rounded-t-lg'
|
|
20
|
-
},
|
|
21
|
-
active: {
|
|
22
|
-
false: 'text-lighter bg-dark hover:bg-darker border-softest',
|
|
23
|
-
true: ['bg-default text-default z-99', 'rounded-t-lg', "before:content-[''] before:absolute before:-bottom-2 z-1 before:inset-x-0 before:h-3 before:bg-default", 'border-[#d2d2d2]']
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
this.navAriaLabel = 'Tabs';
|
|
28
|
-
this.tabs = undefined;
|
|
29
|
-
this.parsedTabs = [];
|
|
30
|
-
this.activeIndex = -1;
|
|
31
|
-
}
|
|
32
|
-
componentWillLoad() {
|
|
33
|
-
this.parseTabs();
|
|
34
|
-
this.setActiveIndex();
|
|
35
|
-
}
|
|
36
|
-
parseTabs() {
|
|
37
|
-
try {
|
|
38
|
-
this.parsedTabs = JSON.parse(this.tabs);
|
|
39
|
-
} catch (error) {
|
|
40
|
-
//console.error('Invalid JSON format for tabs:', error);
|
|
41
|
-
this.parsedTabs = [];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
componentDidLoad() {
|
|
45
|
-
this.initializeTabContentVisibility();
|
|
46
|
-
this.el.addEventListener('tabContentChange', e => {
|
|
47
|
-
this.updateTabContentVisibility(e.detail.index);
|
|
48
|
-
});
|
|
49
|
-
this.scrollToActiveTab();
|
|
50
|
-
}
|
|
51
|
-
initializeTabContentVisibility() {
|
|
52
|
-
const allContent = this.el.querySelectorAll('.tab-content');
|
|
53
|
-
allContent.forEach((content, index) => {
|
|
54
|
-
content.setAttribute('style', `display: ${index === this.activeIndex ? 'block' : 'none'}`);
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
updateTabContentVisibility(index) {
|
|
58
|
-
const allContent = this.el.querySelectorAll('.tab-content');
|
|
59
|
-
allContent.forEach((content, contentIndex) => {
|
|
60
|
-
content.setAttribute('style', `display: ${contentIndex === index ? 'block' : 'none'}`);
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
setActiveIndex() {
|
|
64
|
-
this.activeIndex = this.parsedTabs.findIndex(tab => tab.active);
|
|
65
|
-
}
|
|
66
|
-
scrollToActiveTab() {
|
|
67
|
-
var _a;
|
|
68
|
-
const activeTab = (_a = this.tabContainer) === null || _a === void 0 ? void 0 : _a.querySelector('[data-tab-active]');
|
|
69
|
-
if (activeTab) {
|
|
70
|
-
setTimeout(() => {
|
|
71
|
-
activeTab.scrollIntoView({
|
|
72
|
-
inline: 'center',
|
|
73
|
-
block: 'nearest'
|
|
74
|
-
});
|
|
75
|
-
}, 316);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
getTabOptions(active, index) {
|
|
79
|
-
const position = active ? 'center' : this.activeIndex === -1 && index === 0 ? 'first' : index < this.activeIndex ? 'left' : 'right';
|
|
80
|
-
return Object.assign({
|
|
81
|
-
class: this.tabCva({
|
|
82
|
-
active,
|
|
83
|
-
position
|
|
84
|
-
}),
|
|
85
|
-
style: {
|
|
86
|
-
zIndex: `${active ? this.parsedTabs.length + 99 : position === 'left' ? index : this.parsedTabs.length + 1 - index}`
|
|
87
|
-
}
|
|
88
|
-
}, active ? {
|
|
89
|
-
'data-tab-active': 'true'
|
|
90
|
-
} : {});
|
|
91
|
-
}
|
|
92
|
-
handleTabClick(index, tabLabel) {
|
|
93
|
-
// Update the active index and set all tabs' active state accordingly
|
|
94
|
-
this.activeIndex = index;
|
|
95
|
-
this.parsedTabs = this.parsedTabs.map((tab, tabIndex) => Object.assign(Object.assign({}, tab), {
|
|
96
|
-
active: tabIndex === index
|
|
97
|
-
}));
|
|
98
|
-
this.tabContentChange.emit({
|
|
99
|
-
index: index,
|
|
100
|
-
name: tabLabel
|
|
101
|
-
});
|
|
102
|
-
sendAnalytics({
|
|
103
|
-
category: 'ui-component',
|
|
104
|
-
tag: this.el.tagName.toLowerCase(),
|
|
105
|
-
name: (tabLabel === null || tabLabel === void 0 ? void 0 : tabLabel.toLowerCase()) || '',
|
|
106
|
-
action: 'click'
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
render() {
|
|
110
|
-
return h("div", {
|
|
111
|
-
key: 'd94df79c55522088de5445587758a5eea028b313',
|
|
112
|
-
class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']"
|
|
113
|
-
}, h("div", {
|
|
114
|
-
key: 'e7d01a2e6b424c25749c0d70305fb1c8c55bef74',
|
|
115
|
-
class: "scroller-x max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28"
|
|
116
|
-
}, h("nav", {
|
|
117
|
-
key: 'ef8ff8a02e570dfcf8143997ace793a65917e6ca',
|
|
118
|
-
ref: el => this.tabContainer = el,
|
|
119
|
-
class: "inline-flex",
|
|
120
|
-
"aria-label": this.navAriaLabel
|
|
121
|
-
}, this.parsedTabs.map((tab, index) => {
|
|
122
|
-
//const TabComponent = tab.active ? 'span' : 'a';
|
|
123
|
-
const tabProps = this.getTabOptions(tab.active, index);
|
|
124
|
-
return h("eds-tab", Object.assign({}, tabProps, {
|
|
125
|
-
label: tab.label,
|
|
126
|
-
url: tab.url,
|
|
127
|
-
active: index === this.activeIndex,
|
|
128
|
-
ariaLabel: tab.ariaLabel,
|
|
129
|
-
onClick: () => this.handleTabClick(index, tab.label)
|
|
130
|
-
}));
|
|
131
|
-
})), h("slot", {
|
|
132
|
-
key: '8f014081c3bc2a8a3013aea3aff32690d6f71c85'
|
|
133
|
-
})));
|
|
134
|
-
}
|
|
135
|
-
get el() {
|
|
136
|
-
return getElement(this);
|
|
137
|
-
}
|
|
138
|
-
static get watchers() {
|
|
139
|
-
return {
|
|
140
|
-
"tabs": ["parseTabs"]
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export { EdsTabsContent as eds_tabs_content };
|