@ebrains/react 0.9.1-beta → 0.9.3-beta
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/components-section.entry.esm.js +1 -1
- 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 +9 -9
- package/eds-alert.entry.esm.js +2 -2
- package/eds-app-root.entry.esm.js +4 -4
- package/{eds-avatar_26.entry.esm.js → eds-avatar_27.entry.esm.js} +53 -27
- package/eds-card-desc_2.entry.esm.js +4 -4
- package/eds-card-project.entry.esm.js +10 -10
- 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-cookies-preference.entry.esm.js +2 -2
- package/eds-feedback.entry.esm.js +5 -5
- package/eds-frame.entry.esm.js +4 -4
- 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-login_2.entry.esm.js +2 -2
- package/eds-matomo-notice.entry.esm.js +3 -3
- package/eds-pagination_2.entry.esm.js +12 -12
- package/eds-progress-bar.entry.esm.js +2 -2
- 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-switch.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +4 -4
- package/eds-timeline.entry.esm.js +5 -5
- package/eds-toast-manager.entry.esm.js +1 -1
- package/eds-tooltip.entry.esm.js +3 -3
- package/eds-trl.entry.esm.js +2 -2
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm2.js +3 -6
- 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/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/eds-modal.entry.esm.js +0 -142
package/eds-modal.entry.esm.js
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react-dom';
|
|
6
|
-
|
|
7
|
-
const edsModalCss = ".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.fixed{position:fixed}.inset-0{inset:0rem}.z-10{z-index:10}.z-50{z-index:50}.z-50{z-index:50}.z-9999999{z-index:9999999}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.left-20{left:1.25rem}.right-20{right:1.25rem}.top-1\\/2{top:50%}.top-20{top:1.25rem}.bottom-20{bottom:1.25rem}.grow{flex-grow:1}.-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))}.-translate-y-1\\/2{--tw-translate-y:-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))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-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))}.md\\:-translate-y-1\\/2{--tw-translate-y:-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))}.md\\:gap-y-12{row-gap:0.75rem}}";
|
|
8
|
-
const EdsModalStyle0 = edsModalCss;
|
|
9
|
-
const EdsModal = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.isOpen = false;
|
|
13
|
-
this.heading = '';
|
|
14
|
-
this.truncate = true;
|
|
15
|
-
this.truncateLines = '1';
|
|
16
|
-
this.position = 'middle';
|
|
17
|
-
}
|
|
18
|
-
getTruncateClass() {
|
|
19
|
-
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Returns the Tailwind CSS classes to position the modal based on the `position` prop.
|
|
23
|
-
*
|
|
24
|
-
* @private
|
|
25
|
-
* @returns {string} The concatenated CSS classes for modal positioning.
|
|
26
|
-
*/
|
|
27
|
-
getModalPositionClasses() {
|
|
28
|
-
switch (this.position) {
|
|
29
|
-
case 'top':
|
|
30
|
-
return 'md:left-1/2 top-20 md:-translate-x-1/2';
|
|
31
|
-
case 'bottom':
|
|
32
|
-
return 'md:left-1/2 bottom-20 md:-translate-x-1/2';
|
|
33
|
-
case 'left':
|
|
34
|
-
return 'left-20 top-1/2 -translate-y-1/2';
|
|
35
|
-
case 'right':
|
|
36
|
-
return 'right-20 top-1/2 -translate-y-1/2';
|
|
37
|
-
case 'middle':
|
|
38
|
-
default:
|
|
39
|
-
return 'md:left-1/2 top-1/2 md:-translate-x-1/2 -translate-y-1/2';
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Opens the modal.
|
|
44
|
-
*/
|
|
45
|
-
async open() {
|
|
46
|
-
var _a;
|
|
47
|
-
this.isOpen = true;
|
|
48
|
-
sendAnalytics({
|
|
49
|
-
category: 'ui-component',
|
|
50
|
-
parentContext: null,
|
|
51
|
-
tag: this.el.tagName.toLowerCase(),
|
|
52
|
-
name: ((_a = this.heading) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
53
|
-
action: 'opened'
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Closes the modal.
|
|
58
|
-
*/
|
|
59
|
-
async close() {
|
|
60
|
-
var _a;
|
|
61
|
-
this.isOpen = false;
|
|
62
|
-
sendAnalytics({
|
|
63
|
-
category: 'ui-component',
|
|
64
|
-
parentContext: null,
|
|
65
|
-
tag: this.el.tagName.toLowerCase(),
|
|
66
|
-
name: ((_a = this.heading) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
67
|
-
action: 'closed'
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Toggles the modal open or closed.
|
|
72
|
-
*/
|
|
73
|
-
async toggle() {
|
|
74
|
-
this.isOpen = !this.isOpen;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Listens for global custom events to open the modal.
|
|
78
|
-
*/
|
|
79
|
-
handleGlobalOpen() {
|
|
80
|
-
this.open();
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Listens for global custom events to close the modal.
|
|
84
|
-
*/
|
|
85
|
-
handleGlobalClose() {
|
|
86
|
-
this.close();
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Closes the modal when the Escape key is pressed.
|
|
90
|
-
*/
|
|
91
|
-
handleKeyDown(event) {
|
|
92
|
-
if (this.isOpen && event.key === 'Escape') {
|
|
93
|
-
this.close();
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
render() {
|
|
97
|
-
// Generate a unique id for the title so we can reference it for aria-labelledby.
|
|
98
|
-
const titleId = `modal-title-${this.el.tagName.toLowerCase()}`;
|
|
99
|
-
return h("div", {
|
|
100
|
-
key: '3965b74182a1015d34ebc0d5692ab89de44774e6',
|
|
101
|
-
id: "eds-modal",
|
|
102
|
-
class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-9999999 flex`,
|
|
103
|
-
role: "dialog",
|
|
104
|
-
"aria-modal": "true",
|
|
105
|
-
"aria-labelledby": titleId
|
|
106
|
-
}, this.isOpen && h("div", {
|
|
107
|
-
key: 'c0df46234deb0945ba266e8f36a0b3944bd6d7bd',
|
|
108
|
-
class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
109
|
-
,
|
|
110
|
-
|
|
111
|
-
onClick: () => this.close()
|
|
112
|
-
}), h("div", {
|
|
113
|
-
key: '7fd65a4651ca67101b3a3e08ffd439070ccb8a96',
|
|
114
|
-
class: `container max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center`
|
|
115
|
-
}, h("div", {
|
|
116
|
-
key: '80102734c692934c486fd2e2d707286dd5660c69',
|
|
117
|
-
class: "flex justify-between items-center border-b-2 border-softer pb-8"
|
|
118
|
-
}, h("span", {
|
|
119
|
-
key: 'b98138881f6eb4ee1fad3614eda4c91e5349b563',
|
|
120
|
-
id: titleId,
|
|
121
|
-
class: `f-heading-04 text-lighter ${this.getTruncateClass()}`
|
|
122
|
-
}, this.heading), h("eds-button", {
|
|
123
|
-
key: '82f08e8ec6cbcb291c5d984ae97622d364bff5d0',
|
|
124
|
-
intent: "tertiary",
|
|
125
|
-
icon: "close",
|
|
126
|
-
"aria-label": "Close modal",
|
|
127
|
-
onClick: () => this.close(),
|
|
128
|
-
"extra-class": "ml-8"
|
|
129
|
-
})), h("div", {
|
|
130
|
-
key: '2ea2fc21a8b734c40b1de4a20025a50f7369d375',
|
|
131
|
-
class: "pt-8"
|
|
132
|
-
}, h("slot", {
|
|
133
|
-
key: 'ca0fa40b4076af9eea37c6b088d26751173e815c'
|
|
134
|
-
}))));
|
|
135
|
-
}
|
|
136
|
-
get el() {
|
|
137
|
-
return getElement(this);
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
|
-
EdsModal.style = EdsModalStyle0;
|
|
141
|
-
|
|
142
|
-
export { EdsModal as eds_modal };
|