@ebrains/react 0.9.3-beta → 1.0.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 +22 -16
- 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 +2 -2
- package/eds-alert.entry.esm.js +1 -1
- package/eds-app-root.entry.esm.js +4 -4
- package/eds-avatar_34.entry.esm.js +3594 -0
- package/eds-card-project.entry.esm.js +130 -13
- package/eds-card-tool.entry.esm.js +5 -5
- 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-matomo-notice.entry.esm.js +5 -8
- package/eds-pagination_2.entry.esm.js +10 -10
- 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-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 +39 -314
- 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-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-desc_2.entry.esm.js +0 -86
- package/eds-card-generic.entry.esm.js +0 -114
- package/eds-card-wrapper.entry.esm.js +0 -39
- package/eds-login_2.entry.esm.js +0 -1828
- package/eds-tabs.entry.esm.js +0 -143
- package/eds-tooltip.entry.esm.js +0 -125
- package/toastManager-d9eee791.esm.js +0 -34
|
@@ -1,9 +1,40 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
3
2
|
import 'react';
|
|
4
3
|
import 'react/jsx-runtime';
|
|
5
4
|
import 'react-dom';
|
|
6
5
|
|
|
6
|
+
class ToastManager {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.toastManagerElement = null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Initialize the ToastManager with a reference to the `eds-toast-manager` component.
|
|
12
|
+
*/
|
|
13
|
+
init(toastManagerElement) {
|
|
14
|
+
this.toastManagerElement = toastManagerElement;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Display a toast.
|
|
18
|
+
* @param message - The message to display.
|
|
19
|
+
* @param intent - The type of the toast ('success', 'error', 'warning', 'default').
|
|
20
|
+
*/
|
|
21
|
+
show(message, intent = 'default') {
|
|
22
|
+
if (!this.toastManagerElement) {
|
|
23
|
+
// eslint-disable-next-line
|
|
24
|
+
console.error('ToastManager is not initialized. Ensure <eds-toast-manager> is rendered.');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const event = new CustomEvent('show-toast', {
|
|
28
|
+
detail: {
|
|
29
|
+
message,
|
|
30
|
+
intent
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
this.toastManagerElement.dispatchEvent(event);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Export a singleton instance
|
|
37
|
+
const toast = new ToastManager();
|
|
7
38
|
const edsToastManagerCss = ".toast-container{position:fixed;top:1rem;left:50%;transform:translateX(-50%);z-index:99999;display:flex;flex-direction:column;align-items:center;gap:1rem;width:100%;max-width:36rem;}.toast-wrapper{width:100%;padding:0 1rem;}.eds-toast{box-shadow:0px 4px 6px rgba(0, 0, 0, 0.1);border-radius:0.5rem;animation:fade-in 0.3s ease-out;}@keyframes fade-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}";
|
|
8
39
|
const EdsToastManagerStyle0 = edsToastManagerCss;
|
|
9
40
|
const EdsToastManager = class {
|
|
@@ -43,7 +74,7 @@ const EdsToastManager = class {
|
|
|
43
74
|
}
|
|
44
75
|
render() {
|
|
45
76
|
return h("div", {
|
|
46
|
-
key: '
|
|
77
|
+
key: 'b86b71e71fa88b56acab6d7060e7b05beec344e1',
|
|
47
78
|
class: "toast-container"
|
|
48
79
|
}, this.toasts.map(t => h("div", {
|
|
49
80
|
key: t.id
|
package/eds-toast.entry.esm.js
CHANGED
|
@@ -30,7 +30,7 @@ const EdsToast = class {
|
|
|
30
30
|
};
|
|
31
31
|
this.message = undefined;
|
|
32
32
|
this.intent = 'default';
|
|
33
|
-
this.duration =
|
|
33
|
+
this.duration = undefined;
|
|
34
34
|
this.visible = true;
|
|
35
35
|
}
|
|
36
36
|
componentDidLoad() {
|
|
@@ -53,8 +53,9 @@ const EdsToast = class {
|
|
|
53
53
|
btnElement.dispatchEvent(event);
|
|
54
54
|
}
|
|
55
55
|
connectedCallback() {
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
if (this.duration && this.duration > 0) {
|
|
57
|
+
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
58
|
+
}
|
|
58
59
|
}
|
|
59
60
|
disconnectedCallback() {
|
|
60
61
|
// Clear the timeout when the component is removed
|
package/eds-trl.entry.esm.js
CHANGED
|
@@ -51,10 +51,10 @@ const EdsTrl = class {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
return h("div", {
|
|
54
|
-
key: '
|
|
54
|
+
key: '8a798c644632d3168af51aa8a0775b7455ab5b52',
|
|
55
55
|
class: "container mx-auto px-4 py-8"
|
|
56
56
|
}, h("eds-table", {
|
|
57
|
-
key: '
|
|
57
|
+
key: '82a692c0f7e46fe7438a594a7b5c567855c0e308',
|
|
58
58
|
"table-data": JSON.stringify(tableData),
|
|
59
59
|
config: JSON.stringify(tableConfig),
|
|
60
60
|
"rows-per-page": "2",
|
|
@@ -29,20 +29,23 @@ const IncorrectUseOfColors = class {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
return h("div", {
|
|
32
|
-
key: '
|
|
32
|
+
key: '3503dcc0e2d3f5b08eec400e74484e5725d7b4af',
|
|
33
33
|
class: "container"
|
|
34
|
+
}, h("div", {
|
|
35
|
+
key: '657857e8826e60c498450326306234c59b4e770b',
|
|
36
|
+
class: "mb-8"
|
|
34
37
|
}, h("eds-alert", {
|
|
35
|
-
key: '
|
|
38
|
+
key: '88512240affc65314593f8573b3a13f58fb2806d',
|
|
36
39
|
message: "Note that, each of the four colour tones cannot be mixed in the same composition.",
|
|
37
40
|
intent: "error"
|
|
38
|
-
}), h("div", {
|
|
39
|
-
key: '
|
|
41
|
+
})), h("div", {
|
|
42
|
+
key: '8614d445187d2614e5833b8c89c66b178762574e',
|
|
40
43
|
class: "flex"
|
|
41
44
|
}, h("div", {
|
|
42
|
-
key: '
|
|
45
|
+
key: '1b36d52dbcbb65e1edb4513899ec898d691193c0',
|
|
43
46
|
class: "w-full"
|
|
44
47
|
}, h("ul", {
|
|
45
|
-
key: '
|
|
48
|
+
key: '13fb2eaca0ad3fb93487f6c0c976142a18870b4d',
|
|
46
49
|
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
47
50
|
}, primary.map(color => h("li", {
|
|
48
51
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
@@ -52,10 +55,10 @@ const IncorrectUseOfColors = class {
|
|
|
52
55
|
backgroundColor: color.background
|
|
53
56
|
}
|
|
54
57
|
}))))), h("div", {
|
|
55
|
-
key: '
|
|
58
|
+
key: 'adec93113e4c02168906e1da65f48c20e9b2c7dc',
|
|
56
59
|
class: "w-full"
|
|
57
60
|
}, h("ul", {
|
|
58
|
-
key: '
|
|
61
|
+
key: 'd0b43589866f53c92084b270afb3571ed2723fc8',
|
|
59
62
|
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
60
63
|
}, incorrect.map(color => h("li", {
|
|
61
64
|
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
package/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { E as EdsAccordion, a as EdsAlert, b as EdsAvatar, d as EdsBlockBreak, e as EdsBreadcrumb, f as EdsButton, i as EdsCardGeneric, j as EdsCardSection, k as EdsCodeBlock, l as EdsDropdown, m as EdsFeedback, n as EdsFooter, o as EdsForm, p as EdsFullscreenMenu, q as
|
|
1
|
+
export { E as EdsAccordion, a as EdsAlert, b as EdsAvatar, d as EdsBlockBreak, e as EdsBreadcrumb, f as EdsButton, i as EdsCardGeneric, j as EdsCardSection, k as EdsCodeBlock, l as EdsDropdown, m as EdsFeedback, n as EdsFooter, o as EdsForm, p as EdsFullscreenMenu, q as EdsGauge, s as EdsHeader, t as EdsIconWrapper, u as EdsImg, v as EdsInputField, w as EdsLink, x as EdsLogo, y as EdsMatomoNotice, z as EdsModal, A as EdsPagination, B as EdsPie, C as EdsProgressBar, D as EdsRating, F as EdsSocialNetworks, G as EdsSpinner, I as EdsSplashScreen, J as EdsSteps, K as EdsStepsV2, L as EdsSwitch, M as EdsTable, N as EdsTabs, O as EdsTag, P as EdsToast, Q as EdsTooltip, R as EdsUser } from './index.esm2.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|