@ebrains/react 0.4.0-alpha.0 → 0.6.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/analytics-44b1416b.esm.js +55 -0
- package/color-2554aad6.esm.js +122 -0
- package/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion_13.entry.esm.js +1064 -0
- package/eds-alert.entry.esm.js +104 -0
- package/eds-block-break.entry.esm.js +22 -0
- package/eds-breadcrumb.entry.esm.js +182 -0
- package/eds-card-project.entry.esm.js +12 -11
- package/eds-card-tags.entry.esm.js +1 -1
- package/eds-card-tool.entry.esm.js +5 -6
- package/eds-card-wrapper.entry.esm.js +4 -4
- package/eds-code-block.entry.esm.js +8 -8
- package/eds-components-section.entry.esm.js +14 -2
- package/eds-cookies-preference.entry.esm.js +47 -0
- 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 +235 -0
- package/eds-footer.entry.esm.js +102 -0
- package/eds-form.entry.esm.js +410 -0
- package/eds-frame.entry.esm.js +117 -0
- package/eds-fullscreen-menu.entry.esm.js +143 -0
- package/eds-header.entry.esm.js +130 -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-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-success.entry.esm.js +1 -1
- 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/eds-input_7.entry.esm.js +529 -0
- package/eds-link.entry.esm.js +204 -0
- package/eds-login.entry.esm.js +66 -45
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-logo.entry.esm.js +87 -0
- package/eds-modal.entry.esm.js +129 -0
- package/eds-navigator.entry.esm.js +5 -5
- package/eds-pagination_2.entry.esm.js +15 -16
- package/eds-progress-bar.entry.esm.js +7 -2
- package/eds-rating.entry.esm.js +28 -18
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-social-networks.entry.esm.js +74 -0
- package/eds-steps.entry.esm.js +98 -0
- package/eds-svg-repository.entry.esm.js +1 -1
- package/eds-switch.entry.esm.js +58 -0
- package/eds-tab.entry.esm.js +1 -1
- package/eds-tabs-content.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +4 -4
- package/eds-timeline.entry.esm.js +4 -4
- package/eds-tooltip.entry.esm.js +4 -5
- package/eds-trl.entry.esm.js +2 -2
- package/eds-user.entry.esm.js +118 -0
- package/eds-vertical-stepper.entry.esm.js +81 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +63 -9
- package/{keycloak-13893af6.esm.js → keycloak-d502ec16.esm.js} +219 -168
- 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/src/components.d.ts +3 -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/color-bb472c37.esm.js +0 -423
- package/eds-accordion_33.entry.esm.js +0 -369
- package/eds-card-section.entry.esm.js +0 -70
- package/eds-matomo-notice.entry.esm.js +0 -129
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react-dom';
|
|
5
|
-
|
|
6
|
-
const edsCardSectionCss = ".w-full{width:100%}.grid-layout{display:grid;grid-template-columns:repeat(var(--container-grid-columns, var(--grid-columns)), 1fr);grid-gap:var(--inner-gutter)}.grid-col-span-12{--container-grid-columns:12;grid-column:span 12 / span 12}.gap-y-4{row-gap:0.25rem}.gap-y-8{row-gap:0.5rem}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}@media (min-width: 750px){.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:gap-y-12{row-gap:0.75rem}.md\\:pt-28{padding-top:1.75rem}}@media (min-width: 750px){.md\\:grid-col-span-4{--container-grid-columns:4;grid-column:span 4 / span 4}.md\\:grid-col-span-6{--container-grid-columns:6;grid-column:span 6 / span 6}.md\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.md\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.md\\:w-10-cols>*{--container-grid-columns:10}}@media (min-width: 900px){.lg\\:grid-col-span-5{--container-grid-columns:5;grid-column:span 5 / span 5}.lg\\:grid-col-span-6{--container-grid-columns:6;grid-column:span 6 / span 6}.lg\\:grid-col-start-7{grid-column-start:7}.lg\\:w-8-cols{width:calc(((8 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (8 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.lg\\:w-8-cols{width:calc(((8 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (8 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.lg\\:w-8-cols>*{--container-grid-columns:8}.lg\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * 100%) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.cols-container>.lg\\:w-10-cols{width:calc(((10 / var(--container-grid-columns, var(--grid-columns))) * (100% - var(--inner-gutter))) - (var(--inner-gutter) - (10 / var(--container-grid-columns, var(--grid-columns)) * var(--inner-gutter))))}.lg\\:w-10-cols>*{--container-grid-columns:10}}@media (min-width: 900px){.lg\\:order-last{order:9999}.lg\\:order-none{order:0}.lg\\:mt-0{margin-top:0rem}.lg\\:block{display:block}.lg\\:flex{display:flex}.lg\\:hidden{display:none}.lg\\:w-\\[150px\\]{width:150px}.lg\\:w-auto{width:auto}.lg\\:max-w-\\[720px\\]{max-width:720px}.lg\\:flex-row{flex-direction:row}.lg\\:flex-nowrap{flex-wrap:nowrap}.lg\\:gap-y-16{row-gap:1rem}.lg\\:px-28{padding-left:1.75rem;padding-right:1.75rem}.lg\\:\\!pl-12{padding-left:0.75rem !important}.lg\\:\\!pr-12{padding-right:0.75rem !important}}";
|
|
7
|
-
const EdsCardSectionStyle0 = edsCardSectionCss;
|
|
8
|
-
const EdsCardSection = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
registerInstance(this, hostRef);
|
|
11
|
-
this.cards = [];
|
|
12
|
-
this.cols = 4;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Parses the `cards` JSON string prop into an array of card objects.
|
|
16
|
-
* If parsing fails, returns an empty array.
|
|
17
|
-
*
|
|
18
|
-
* @returns {any[]} An array of parsed card objects.
|
|
19
|
-
*/
|
|
20
|
-
get parsedCards() {
|
|
21
|
-
// If it's already an array, return it immediately.
|
|
22
|
-
if (Array.isArray(this.cards)) {
|
|
23
|
-
return this.cards;
|
|
24
|
-
}
|
|
25
|
-
if (typeof this.cards === 'object') {
|
|
26
|
-
return this.cards;
|
|
27
|
-
} else if (typeof this.cards === 'string') {
|
|
28
|
-
try {
|
|
29
|
-
return JSON.parse(this.cards);
|
|
30
|
-
} catch (e) {
|
|
31
|
-
// eslint-disable-next-line
|
|
32
|
-
console.error('Error parsing cards prop:', e);
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return [];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Renders the card section as a grid layout.
|
|
40
|
-
* Each parsed card object is mapped to an `<eds-card-generic>` component,
|
|
41
|
-
* displaying card details such as title, description, avatar, etc.
|
|
42
|
-
*
|
|
43
|
-
* @returns {JSX.Element} The rendered section containing a list of cards.
|
|
44
|
-
*/
|
|
45
|
-
render() {
|
|
46
|
-
return h("section", {
|
|
47
|
-
key: 'da139da167230819e494a6426c2431f209a2e557',
|
|
48
|
-
class: "w-full"
|
|
49
|
-
}, h("ul", {
|
|
50
|
-
key: '3e8affe5c9aee91c4487480c72c437339265101a',
|
|
51
|
-
class: "grid-layout gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
52
|
-
}, this.parsedCards.map(card => h("li", {
|
|
53
|
-
class: `grid-col-span-12 md:grid-col-span-${this.cols} flex flex-col`
|
|
54
|
-
}, h("eds-card-generic", {
|
|
55
|
-
cardTitle: card.title,
|
|
56
|
-
description: card.description,
|
|
57
|
-
avatar: card.avatar,
|
|
58
|
-
headingLevel: card.headingLevel,
|
|
59
|
-
tags: card.tags,
|
|
60
|
-
url: card.url,
|
|
61
|
-
bg: card.bg,
|
|
62
|
-
tiny: card.tiny,
|
|
63
|
-
image: card.image,
|
|
64
|
-
withHover: card.withHover
|
|
65
|
-
})))));
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
EdsCardSection.style = EdsCardSectionStyle0;
|
|
69
|
-
|
|
70
|
-
export { EdsCardSection as eds_card_section };
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
3
|
-
import { m as matomoOptIn } from './color-bb472c37.esm.js';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react/jsx-runtime';
|
|
6
|
-
import 'react-dom';
|
|
7
|
-
import './index-39c58238.esm.js';
|
|
8
|
-
|
|
9
|
-
const edsMatomoNoticeCss = ".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.left-0{left:0rem}.left-1\\/2{left:50%}.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}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@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))}}";
|
|
10
|
-
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
11
|
-
const EdsMatomoNotice = class {
|
|
12
|
-
constructor(hostRef) {
|
|
13
|
-
registerInstance(this, hostRef);
|
|
14
|
-
this.title = 'Analytics Consent';
|
|
15
|
-
this.description = 'We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.';
|
|
16
|
-
this.showNotice = true;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Lifecycle method called before the component is rendered.
|
|
20
|
-
* Checks for the presence of the "mtm_consent" cookie to determine
|
|
21
|
-
* if the notice should be displayed.
|
|
22
|
-
*/
|
|
23
|
-
componentWillLoad() {
|
|
24
|
-
this.checkConsentCookie();
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Lifecycle method called after the component has been rendered.
|
|
28
|
-
* Emits `parentContext` events for each `eds-button` in the shadow DOM.
|
|
29
|
-
*/
|
|
30
|
-
componentDidLoad() {
|
|
31
|
-
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
32
|
-
btns.forEach(b => {
|
|
33
|
-
this.emitContext(b);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Emits a custom `parentContext` event for a given button element.
|
|
38
|
-
* This can be used to provide context information about the component.
|
|
39
|
-
*
|
|
40
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
41
|
-
*/
|
|
42
|
-
emitContext(linkElement) {
|
|
43
|
-
const event = new CustomEvent('parentContext', {
|
|
44
|
-
detail: {
|
|
45
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
46
|
-
identifier: null
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
linkElement.dispatchEvent(event);
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Checks if the Matomo "mtm_consent" cookie exists in the browser.
|
|
53
|
-
* If the cookie is found, the notice is hidden.
|
|
54
|
-
*/
|
|
55
|
-
checkConsentCookie() {
|
|
56
|
-
const consentCookie = document.cookie.split('; ').find(row => row.startsWith('mtm_consent='));
|
|
57
|
-
//this.showNotice = !consentCookie;
|
|
58
|
-
const sessionDeferred = sessionStorage.getItem('matomo-deferred');
|
|
59
|
-
this.showNotice = !consentCookie && !sessionDeferred;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Handles user consent for analytics tracking.
|
|
63
|
-
* Calls the `matomoOptIn` utility and shows a success toast notification.
|
|
64
|
-
*/
|
|
65
|
-
optInAnalytics() {
|
|
66
|
-
matomoOptIn();
|
|
67
|
-
toast.show('You have opted in to analytics.', 'success');
|
|
68
|
-
this.hideNotice();
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Handles user opt-out from analytics tracking.
|
|
72
|
-
* Calls the `matomoOptOut` utility and shows a warning toast notification.
|
|
73
|
-
|
|
74
|
-
private optOutAnalytics() {
|
|
75
|
-
matomoOptOut();
|
|
76
|
-
toast.show('You have opted out of analytics.', 'warning');
|
|
77
|
-
this.hideNotice();
|
|
78
|
-
}*/
|
|
79
|
-
/**
|
|
80
|
-
* Handles "Ask me later" action by storing a session storage entry
|
|
81
|
-
* and hiding the notice for the rest of the session.
|
|
82
|
-
*/
|
|
83
|
-
deferDecision() {
|
|
84
|
-
sessionStorage.setItem('matomo-deferred', 'true');
|
|
85
|
-
toast.show('You can decide later.', 'warning');
|
|
86
|
-
this.hideNotice();
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Hides the notice by updating the `showNotice` state.
|
|
90
|
-
*/
|
|
91
|
-
hideNotice() {
|
|
92
|
-
this.showNotice = false;
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Renders the Matomo consent notice with user options.
|
|
96
|
-
* Includes an accordion for the description and two buttons for user consent.
|
|
97
|
-
*/
|
|
98
|
-
render() {
|
|
99
|
-
if (!this.showNotice) {
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
return h("div", {
|
|
103
|
-
class: "fixed bottom-0 p-8 z-10 grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center"
|
|
104
|
-
}, h("eds-accordion", {
|
|
105
|
-
title: this.title,
|
|
106
|
-
description: this.description,
|
|
107
|
-
switchBg: true,
|
|
108
|
-
expanded: true
|
|
109
|
-
}, h("div", {
|
|
110
|
-
class: "flex items-center gap-4"
|
|
111
|
-
}, h("eds-button", {
|
|
112
|
-
intent: "primary",
|
|
113
|
-
label: "Yes, I agree",
|
|
114
|
-
"aria-label": "Opt-in for analytics",
|
|
115
|
-
onClick: () => this.optInAnalytics()
|
|
116
|
-
}), h("eds-button", {
|
|
117
|
-
intent: "ghost",
|
|
118
|
-
label: "Ask me later",
|
|
119
|
-
"aria-label": "Defer analytics decision",
|
|
120
|
-
onClick: () => this.deferDecision()
|
|
121
|
-
}))));
|
|
122
|
-
}
|
|
123
|
-
get el() {
|
|
124
|
-
return getElement(this);
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
EdsMatomoNotice.style = EdsMatomoNoticeStyle0;
|
|
128
|
-
|
|
129
|
-
export { EdsMatomoNotice as eds_matomo_notice };
|