@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
|
@@ -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-tooltip.entry.esm.js
CHANGED
|
@@ -1,119 +1,35 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-
|
|
2
|
+
import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom';
|
|
6
6
|
|
|
7
|
-
const edsTooltipCss = ".relative{position:relative}.absolute{position:absolute}.
|
|
7
|
+
const edsTooltipCss = ".relative{position:relative}.absolute{position:absolute}.inline-block{display:inline-block}.rounded-xs{border-radius:4px}.bg-strongest{background-color:var(--black)}.text-inverse{color:var(--white)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.pointer-events-none{pointer-events:none}.left-1\\/2{left:50%}.z-10{z-index:10}.transform{transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.whitespace-nowrap{white-space:nowrap}.p-6{padding:0.375rem}.bottom-full{bottom:100%}.mb-2{margin-bottom:0.125rem}.opacity-0{opacity:0}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-150{transition-duration:150ms}.ease-in-out{transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1)}.group:hover .group-hover\\:opacity-100{opacity:1}";
|
|
8
8
|
const EdsTooltipStyle0 = edsTooltipCss;
|
|
9
9
|
const EdsTooltip = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
registerInstance(this, hostRef);
|
|
12
12
|
this.content = undefined;
|
|
13
|
-
this.position = 'above';
|
|
14
|
-
this.isVisible = false;
|
|
15
|
-
this.isPositioned = false;
|
|
16
|
-
this.tooltipStyle = {
|
|
17
|
-
top: '0px',
|
|
18
|
-
left: '0px',
|
|
19
|
-
transform: ''
|
|
20
|
-
};
|
|
21
13
|
}
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
*/
|
|
25
|
-
async showTooltip() {
|
|
26
|
-
var _a;
|
|
27
|
-
await this.updateTooltipPosition();
|
|
28
|
-
this.isPositioned = true;
|
|
29
|
-
this.isVisible = true;
|
|
14
|
+
/** fire analytics on every hover */
|
|
15
|
+
handleHover() {
|
|
30
16
|
sendAnalytics({
|
|
31
17
|
category: 'ui-component',
|
|
32
|
-
parentContext: null,
|
|
33
18
|
tag: this.el.tagName.toLowerCase(),
|
|
34
|
-
name:
|
|
19
|
+
name: this.content.toLowerCase(),
|
|
35
20
|
action: 'hover'
|
|
36
21
|
});
|
|
37
22
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Hide the tooltip.
|
|
40
|
-
*/
|
|
41
|
-
hideTooltip() {
|
|
42
|
-
this.isVisible = false;
|
|
43
|
-
this.isPositioned = false; // Reset positioning when hiding
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Hide the tooltip when the `Escape` key is pressed.
|
|
47
|
-
*/
|
|
48
|
-
handleKeyPress(event) {
|
|
49
|
-
if (event.key === 'Escape') {
|
|
50
|
-
this.isVisible = false;
|
|
51
|
-
this.isPositioned = false; // Reset positioning when hiding
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Update the tooltip's position dynamically based on the slotted element's dimensions and position.
|
|
56
|
-
*/
|
|
57
|
-
updateTooltipPosition() {
|
|
58
|
-
var _a, _b;
|
|
59
|
-
const slotElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot');
|
|
60
|
-
if (!slotElement) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const assignedNodes = (slotElement === null || slotElement === void 0 ? void 0 : slotElement.assignedNodes({
|
|
64
|
-
flatten: true
|
|
65
|
-
})) || [];
|
|
66
|
-
const targetElement = assignedNodes.find(node => node instanceof HTMLElement);
|
|
67
|
-
if (targetElement) {
|
|
68
|
-
const targetRect = targetElement.getBoundingClientRect();
|
|
69
|
-
const tooltipElement = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('[role="tooltip"]');
|
|
70
|
-
if (tooltipElement) {
|
|
71
|
-
const tooltipWidth = tooltipElement.offsetWidth;
|
|
72
|
-
const tooltipHeight = tooltipElement.offsetHeight;
|
|
73
|
-
// Calculate position based on the preferred `position` prop
|
|
74
|
-
let top = 0;
|
|
75
|
-
let left = 0;
|
|
76
|
-
switch (this.position) {
|
|
77
|
-
case 'above':
|
|
78
|
-
top = window.scrollY - tooltipHeight - 8; // Above with offset
|
|
79
|
-
left = targetRect.left + targetRect.width / 2 - tooltipWidth / 2; // Centered horizontally
|
|
80
|
-
break;
|
|
81
|
-
case 'below':
|
|
82
|
-
top = tooltipHeight - window.scrollY + 18; // Below with offset
|
|
83
|
-
left = targetRect.left + targetRect.width / 2 - tooltipWidth / 2; // Centered horizontally
|
|
84
|
-
break;
|
|
85
|
-
/*case 'left':
|
|
86
|
-
top = targetRect.top - window.scrollY + targetRect.height / 2 - tooltipHeight / 2; // Centered vertically
|
|
87
|
-
left = targetRect.left - tooltipWidth - 8; // To the left with offset
|
|
88
|
-
break;
|
|
89
|
-
case 'right':
|
|
90
|
-
top = targetRect.top - window.scrollY + targetRect.height / 2 - tooltipHeight / 2; // Centered vertically
|
|
91
|
-
left = targetRect.right + 8; // To the right with offset
|
|
92
|
-
break;*/
|
|
93
|
-
}
|
|
94
|
-
this.tooltipStyle = {
|
|
95
|
-
top: `${top}px`,
|
|
96
|
-
left: `${left}px`,
|
|
97
|
-
transform: 'translateX(0)' // No additional horizontal adjustment needed
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
23
|
render() {
|
|
103
24
|
return h("div", {
|
|
104
|
-
key: '
|
|
105
|
-
class: "relative"
|
|
25
|
+
key: 'cf17cd61cd5888d6ea12bf6be0fb8c841072b4d6',
|
|
26
|
+
class: "relative inline-block group"
|
|
106
27
|
}, h("slot", {
|
|
107
|
-
key: '
|
|
108
|
-
}),
|
|
109
|
-
key: '
|
|
110
|
-
class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none
|
|
111
|
-
role: "tooltip"
|
|
112
|
-
style: {
|
|
113
|
-
top: this.tooltipStyle.top,
|
|
114
|
-
left: this.tooltipStyle.left,
|
|
115
|
-
transform: this.tooltipStyle.transform
|
|
116
|
-
}
|
|
28
|
+
key: '7a41d90940fff4e8b887ec4a3240371466f219a5'
|
|
29
|
+
}), h("div", {
|
|
30
|
+
key: 'ccf06592f4c977030b0cf54cce48d13889c059f3',
|
|
31
|
+
class: "absolute bottom-full left-1/2 \n transform -translate-x-1/2 mb-2\n rounded-xs bg-strongest text-inverse \n f-ui-03-light pointer-events-none \n z-10 whitespace-nowrap p-6 opacity-0 transition-opacity duration-150 ease-in-out\n group-hover:opacity-100",
|
|
32
|
+
role: "tooltip"
|
|
117
33
|
}, this.content));
|
|
118
34
|
}
|
|
119
35
|
get el() {
|
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';
|