@ebrains/react 0.6.0-alpha.0 → 0.7.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_22.entry.esm.js +269 -0
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-avatar_4.entry.esm.js +185 -0
- package/eds-breadcrumb.entry.esm.js +4 -15
- package/eds-card-generic.entry.esm.js +114 -0
- package/eds-card-section.entry.esm.js +56 -0
- package/eds-components-section.entry.esm.js +1 -1
- 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-dropdown_2.entry.esm.js → eds-dropdown.entry.esm.js} +19 -98
- package/eds-feedback.entry.esm.js +82 -0
- package/eds-form.entry.esm.js +253 -253
- package/eds-frame.entry.esm.js +34 -33
- package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
- 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/{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-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +37 -37
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-steps.entry.esm.js +8 -17
- package/eds-svg-repository.entry.esm.js +8 -2
- package/eds-switch.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +14 -26
- package/eds-timeline.entry.esm.js +6 -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 +2 -2
- package/eds-user.entry.esm.js +64 -87
- package/eds-vertical-stepper.entry.esm.js +5 -5
- package/formUtils-ac68474d.esm.js +247 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +46 -46
- 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 -1
- 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/eds-accordion_13.entry.esm.js +0 -1064
- package/eds-block-break.entry.esm.js +0 -22
- 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-input_7.entry.esm.js +0 -529
- 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-pagination_2.entry.esm.js +0 -472
- package/eds-social-networks.entry.esm.js +0 -74
- package/eds-tab.entry.esm.js +0 -41
- package/eds-tabs-content.entry.esm.js +0 -145
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 };
|