@ebrains/react 0.9.3-beta → 1.1.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 +3 -3
- package/{analytics-44b1416b.esm.js → analytics-d99780e3.esm.js} +2 -2
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/components-section.entry.esm.js +23 -17
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/docs-palettes.entry.esm.js +1 -1
- package/docs-tokens.entry.esm.js +1 -1
- package/eds-accordion.entry.esm.js +11 -11
- package/eds-alert.entry.esm.js +3 -3
- package/eds-app-root.entry.esm.js +4 -4
- package/eds-avatar_28.entry.esm.js +3523 -0
- package/eds-breadcrumb.entry.esm.js +179 -0
- package/eds-card-desc_2.entry.esm.js +6 -7
- package/eds-card-generic.entry.esm.js +4 -4
- package/eds-card-project.entry.esm.js +130 -13
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +5 -5
- package/eds-code-block.entry.esm.js +7 -7
- package/eds-cookies-preference.entry.esm.js +2 -2
- package/eds-feedback.entry.esm.js +12 -7
- package/eds-frame.entry.esm.js +6 -6
- package/eds-gauge.entry.esm.js +78 -0
- 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-bookmark.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-external.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-minus.entry.esm.js +1 -1
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-paper.entry.esm.js +1 -1
- package/eds-icon-plus.entry.esm.js +1 -1
- package/eds-icon-portal.entry.esm.js +1 -1
- package/eds-icon-private.entry.esm.js +1 -1
- package/eds-icon-public.entry.esm.js +1 -1
- package/eds-icon-search.entry.esm.js +1 -1
- package/eds-icon-star.entry.esm.js +1 -1
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +1 -1
- package/eds-icon-thumbs-up.entry.esm.js +1 -1
- package/eds-icon-tutorial.entry.esm.js +1 -1
- package/eds-icon-twitter.entry.esm.js +1 -1
- package/eds-icon-unknown.entry.esm.js +1 -1
- package/eds-icon-updown.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-matomo-notice.entry.esm.js +5 -8
- package/eds-pie.entry.esm.js +131 -0
- package/eds-progress-bar.entry.esm.js +19 -8
- package/eds-rating.entry.esm.js +1 -1
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +3 -3
- package/eds-splash-screen.entry.esm.js +87 -0
- package/eds-switch.entry.esm.js +21 -11
- package/eds-timeline.entry.esm.js +5 -5
- package/eds-toast-manager.entry.esm.js +33 -2
- package/eds-toast.entry.esm.js +4 -3
- package/eds-tooltip.entry.esm.js +12 -96
- package/eds-trl.entry.esm.js +2 -2
- package/incorrect-use-of-colors.entry.esm.js +11 -8
- package/index.esm.js +1 -1
- package/index.esm2.js +51 -308
- package/logo-space.entry.esm.js +9 -9
- package/logo-variations-horizontal_2.entry.esm.js +28 -28
- package/logo-variations-tabs.entry.esm.js +1 -1
- package/logo-wrong-usage.entry.esm.js +25 -25
- package/package.json +1 -1
- package/src/components.d.ts +2 -2
- package/src/generated/components.d.ts +1 -1
- package/svg-repository.entry.esm.js +2 -2
- package/token-list_3.entry.esm.js +5 -5
- package/token-ratios.entry.esm.js +3 -3
- package/token-spacing.entry.esm.js +93 -0
- package/token-typography.entry.esm.js +2 -2
- package/color-2554aad6.esm.js +0 -122
- package/eds-avatar_27.entry.esm.js +0 -332
- package/eds-card-wrapper.entry.esm.js +0 -39
- package/eds-login_2.entry.esm.js +0 -1828
- package/eds-pagination_2.entry.esm.js +0 -493
- package/eds-tabs.entry.esm.js +0 -143
- package/toastManager-d9eee791.esm.js +0 -34
|
@@ -3,37 +3,48 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
-
const edsProgressBarCss = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1
|
|
6
|
+
const edsProgressBarCss = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.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)}.absolute{position:absolute}.relative{position:relative}.z-0{z-index:0}.z-10{z-index:10}.inset-0{inset:0rem}.pointer-events-none{pointer-events:none}";
|
|
7
7
|
const EdsProgressBarStyle0 = edsProgressBarCss;
|
|
8
8
|
const EdsProgressBar = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.value = 0;
|
|
12
|
+
this.rounded = true;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Method to update the progress value externally.
|
|
15
16
|
* @param newValue The new progress value (0-100).
|
|
16
17
|
*/
|
|
17
18
|
async updateValue(newValue) {
|
|
18
|
-
this.value = Math.min(100, Math.max(0, newValue)); // Clamp
|
|
19
|
+
this.value = Math.min(100, Math.max(0, newValue)); // Clamp 0–100
|
|
19
20
|
}
|
|
20
21
|
render() {
|
|
21
|
-
const progressValue = this.value;
|
|
22
|
+
const progressValue = Math.min(100, Math.max(0, this.value));
|
|
23
|
+
// Outer container classes (conditionally rounded)
|
|
24
|
+
const outerClasses = ['outer', 'w-full', 'h-24', 'bg-default', 'border', 'border-softer', 'overflow-hidden', this.rounded ? 'rounded-lg' : '', 'relative'].filter(Boolean).join(' ');
|
|
25
|
+
// Fill bar classes (conditionally rounded only when >0)
|
|
26
|
+
const fillClasses = ['inner', 'h-full', 'transition-all', 'duration-300', 'bg-accent', progressValue > 0 && this.rounded ? 'rounded-lg' : '', 'z-0'].filter(Boolean).join(' ');
|
|
22
27
|
return h("div", {
|
|
23
|
-
key: '
|
|
28
|
+
key: '3360c1a9e61c83fee5312d007f6d2965a8983eba',
|
|
24
29
|
role: "progressbar",
|
|
25
30
|
"aria-valuemin": "0",
|
|
26
31
|
"aria-valuemax": "100",
|
|
27
32
|
"aria-valuenow": progressValue,
|
|
28
33
|
"aria-valuetext": `${progressValue}%`,
|
|
29
|
-
class:
|
|
34
|
+
class: outerClasses
|
|
30
35
|
}, h("div", {
|
|
31
|
-
key: '
|
|
32
|
-
class:
|
|
36
|
+
key: '7210dc5931f08626b286c30ae790a3a864533632',
|
|
37
|
+
class: fillClasses,
|
|
33
38
|
style: {
|
|
34
39
|
width: `${progressValue}%`
|
|
35
40
|
}
|
|
36
|
-
},
|
|
41
|
+
}), h("div", {
|
|
42
|
+
key: '7586cd593b4e851f4605ad33b96781841ee0b1aa',
|
|
43
|
+
class: "absolute inset-0 flex items-center justify-center pointer-events-none z-10"
|
|
44
|
+
}, h("span", {
|
|
45
|
+
key: '21fa3de543e5e717ed4fd76c689aa47c3fa6a853',
|
|
46
|
+
class: "text-default f-body-02"
|
|
47
|
+
}, progressValue, "%")));
|
|
37
48
|
}
|
|
38
49
|
};
|
|
39
50
|
EdsProgressBar.style = EdsProgressBarStyle0;
|
package/eds-rating.entry.esm.js
CHANGED
|
@@ -15,13 +15,13 @@ const EdsSectionCore = class {
|
|
|
15
15
|
render() {
|
|
16
16
|
const TagType = this.tag; // Set dynamic tag type (div or section)
|
|
17
17
|
return h(TagType, {
|
|
18
|
-
key: '
|
|
18
|
+
key: '43f8d599041ae0c9761988fdec4872ec4a8ca037'
|
|
19
19
|
}, h("eds-section-heading", {
|
|
20
|
-
key: '
|
|
20
|
+
key: 'd120ddd851a0485e2edb43e2a6f508a661f35c07',
|
|
21
21
|
headingLevel: this.headingLevel,
|
|
22
22
|
sectionTitle: this.sectionTitle
|
|
23
23
|
}), h("slot", {
|
|
24
|
-
key: '
|
|
24
|
+
key: '9818b82a3eebcb741f5bccc9781e4212f2c5fa3d'
|
|
25
25
|
}));
|
|
26
26
|
}
|
|
27
27
|
};
|
|
@@ -52,7 +52,7 @@ const EdsSectionHeading = class {
|
|
|
52
52
|
const TagType = this.tag; // Dynamically set tag type for the container
|
|
53
53
|
const HeadingTag = this.headingLevel; // Dynamically set heading level
|
|
54
54
|
return h(TagType, {
|
|
55
|
-
key: '
|
|
55
|
+
key: '740ed8b3208e07091a1f4c79888e172dec33773a',
|
|
56
56
|
class: {
|
|
57
57
|
'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
|
|
58
58
|
container: this.withContainer,
|
|
@@ -60,7 +60,7 @@ const EdsSectionHeading = class {
|
|
|
60
60
|
'pt-28': !this.spacingLarge
|
|
61
61
|
}
|
|
62
62
|
}, h(HeadingTag, {
|
|
63
|
-
key: '
|
|
63
|
+
key: '4d4ceef35b7cb06bfbff2fdae47e66dd7ac10c49',
|
|
64
64
|
class: this.getHeadingClass()
|
|
65
65
|
}, this.sectionTitle));
|
|
66
66
|
}
|
package/eds-spinner.entry.esm.js
CHANGED
|
@@ -50,13 +50,13 @@ const EdsSpinner = class {
|
|
|
50
50
|
justifyContent: 'center'
|
|
51
51
|
};
|
|
52
52
|
return h(Host, {
|
|
53
|
-
key: '
|
|
53
|
+
key: 'f687ccbbb05840b7699202f3758ec4a8d0de1bc4'
|
|
54
54
|
}, h("div", {
|
|
55
|
-
key: '
|
|
55
|
+
key: '4bb5c697f1ccd90d2d65d519fcfb3ec809b106ac',
|
|
56
56
|
class: "spinner-overlay",
|
|
57
57
|
style: overlayStyle
|
|
58
58
|
}, h("span", {
|
|
59
|
-
key: '
|
|
59
|
+
key: 'a07722d9ee9c94d03d9766a4b297a498998c00be',
|
|
60
60
|
class: "spinner",
|
|
61
61
|
style: spinnerStyle
|
|
62
62
|
})));
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index.esm2.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
import 'react-dom';
|
|
5
|
+
|
|
6
|
+
const edsSplashScreenCss = ".splash-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999999;background-color:var(--grey-200);display:flex;flex-direction:column;align-items:center;justify-content:center}.logo-container{width:200px;height:200px;margin-bottom:1rem}.content-container{position:relative;width:5rem;height:5rem;display:flex;align-items:center;justify-content:center}";
|
|
7
|
+
const EdsSplashScreenStyle0 = edsSplashScreenCss;
|
|
8
|
+
const EdsSplashScreen = class {
|
|
9
|
+
constructor(hostRef) {
|
|
10
|
+
registerInstance(this, hostRef);
|
|
11
|
+
this.splash = createEvent(this, "splash", 7);
|
|
12
|
+
this.inverse = false;
|
|
13
|
+
this.initPromise = undefined;
|
|
14
|
+
this.isVisible = true;
|
|
15
|
+
}
|
|
16
|
+
// When the component loads, check if there is a promise.
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
if (this.initPromise) {
|
|
19
|
+
this.handleInitPromise(this.initPromise);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// Watch for changes on initPromise.
|
|
23
|
+
async watchInitPromise(newPromise) {
|
|
24
|
+
if (newPromise) {
|
|
25
|
+
this.handleInitPromise(newPromise);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
async handleInitPromise(promise) {
|
|
29
|
+
try {
|
|
30
|
+
await promise;
|
|
31
|
+
//console.log('Promises resolved');
|
|
32
|
+
this.hideSplash();
|
|
33
|
+
} catch (error) {
|
|
34
|
+
//console.error('Initialization error:', error);
|
|
35
|
+
this.splash.emit({
|
|
36
|
+
type: 'error',
|
|
37
|
+
message: error.message || 'Unknown error'
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
handleHideSplash() {
|
|
42
|
+
this.hideSplash();
|
|
43
|
+
}
|
|
44
|
+
hideSplash() {
|
|
45
|
+
this.isVisible = false;
|
|
46
|
+
this.splash.emit({
|
|
47
|
+
type: 'hidden',
|
|
48
|
+
message: 'Splash screen hidden successfully'
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
if (!this.isVisible) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
55
|
+
return h(Host, null, h("div", {
|
|
56
|
+
class: "splash-overlay",
|
|
57
|
+
style: {
|
|
58
|
+
background: this.inverse ? 'black' : 'var(--grey-200)'
|
|
59
|
+
}
|
|
60
|
+
}, h("div", {
|
|
61
|
+
class: "logo-container"
|
|
62
|
+
}, this.inverse ? h("eds-logo", {
|
|
63
|
+
orientation: "vertical",
|
|
64
|
+
type: "color-white"
|
|
65
|
+
}) : h("eds-logo", {
|
|
66
|
+
orientation: "vertical",
|
|
67
|
+
type: "color"
|
|
68
|
+
})), h("div", {
|
|
69
|
+
class: "content-container"
|
|
70
|
+
}, h("eds-spinner", {
|
|
71
|
+
size: "1rem",
|
|
72
|
+
thickness: "3px",
|
|
73
|
+
"border-color": "var(--grey-400)",
|
|
74
|
+
"bottom-color": "var(--grey-900)",
|
|
75
|
+
background: "none",
|
|
76
|
+
fullscreen: false
|
|
77
|
+
}))));
|
|
78
|
+
}
|
|
79
|
+
static get watchers() {
|
|
80
|
+
return {
|
|
81
|
+
"initPromise": ["watchInitPromise"]
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
EdsSplashScreen.style = EdsSplashScreenStyle0;
|
|
86
|
+
|
|
87
|
+
export { EdsSplashScreen as eds_splash_screen };
|
package/eds-switch.entry.esm.js
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'react/jsx-runtime';
|
|
4
5
|
import 'react-dom';
|
|
5
6
|
|
|
6
|
-
const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-size:
|
|
7
|
+
const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{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)}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}";
|
|
7
8
|
const EdsSwitchStyle0 = edsSwitchCss;
|
|
8
9
|
const EdsSwitch = class {
|
|
9
10
|
constructor(hostRef) {
|
|
10
11
|
registerInstance(this, hostRef);
|
|
11
|
-
this.
|
|
12
|
+
this.uiswitch = createEvent(this, "uiswitch", 7);
|
|
12
13
|
this.toggleSwitch = () => {
|
|
13
14
|
if (this.disabled) {
|
|
14
15
|
return;
|
|
15
16
|
}
|
|
16
17
|
this.checked = !this.checked;
|
|
17
|
-
this.
|
|
18
|
+
this.uiswitch.emit(this.checked);
|
|
19
|
+
sendAnalytics({
|
|
20
|
+
category: 'ui-component',
|
|
21
|
+
tag: this.el.tagName.toLowerCase(),
|
|
22
|
+
name: this.checked ? this.labelOn : this.labelOff || '',
|
|
23
|
+
action: 'checked'
|
|
24
|
+
});
|
|
18
25
|
};
|
|
19
26
|
this.checked = false;
|
|
20
27
|
this.disabled = false;
|
|
@@ -25,13 +32,13 @@ const EdsSwitch = class {
|
|
|
25
32
|
// Compute an accessible name based on state.
|
|
26
33
|
const accessibleLabel = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : 'Toggle switch';
|
|
27
34
|
return h("div", {
|
|
28
|
-
key: '
|
|
35
|
+
key: '385c1463b11e83ff5b982218e0f28c54299210fd',
|
|
29
36
|
class: "switch-container"
|
|
30
37
|
}, this.labelOff && h("span", {
|
|
31
|
-
key: '
|
|
32
|
-
class: "switch-label switch-label--off"
|
|
38
|
+
key: 'f7e825a34487a1cec466b5172d77c2802029607c',
|
|
39
|
+
class: "switch-label switch-label--off mr-8"
|
|
33
40
|
}, this.labelOff), h("button", {
|
|
34
|
-
key: '
|
|
41
|
+
key: 'fd1e8ffab675ee79edc6b99de4dfff42545d91af',
|
|
35
42
|
type: "button",
|
|
36
43
|
role: "switch",
|
|
37
44
|
"aria-checked": this.checked ? 'true' : 'false',
|
|
@@ -45,13 +52,16 @@ const EdsSwitch = class {
|
|
|
45
52
|
onClick: this.toggleSwitch,
|
|
46
53
|
disabled: this.disabled
|
|
47
54
|
}, h("span", {
|
|
48
|
-
key: '
|
|
55
|
+
key: '0d185957ffe2577ffc8798c298820c84c838a2a4',
|
|
49
56
|
class: "switch-handle"
|
|
50
57
|
})), this.labelOn && h("span", {
|
|
51
|
-
key: '
|
|
52
|
-
class: "switch-label switch-label--on"
|
|
58
|
+
key: 'f12b752ff94a363bb9593bd00cf43e7110e4399e',
|
|
59
|
+
class: "switch-label switch-label--on ml-8"
|
|
53
60
|
}, this.labelOn));
|
|
54
61
|
}
|
|
62
|
+
get el() {
|
|
63
|
+
return getElement(this);
|
|
64
|
+
}
|
|
55
65
|
};
|
|
56
66
|
EdsSwitch.style = EdsSwitchStyle0;
|
|
57
67
|
|