@ebrains/components 0.5.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/dist/cjs/{analytics-223ea8e5.js → analytics-d8fb3fdd.js} +9 -0
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/eds-accordion_13.cjs.entry.js +911 -0
- package/dist/cjs/eds-alert.cjs.entry.js +97 -0
- package/dist/cjs/eds-block-break.cjs.entry.js +21 -0
- package/dist/cjs/eds-breadcrumb.cjs.entry.js +149 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +39 -0
- package/dist/cjs/eds-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/eds-footer.cjs.entry.js +41 -0
- package/dist/cjs/eds-form.cjs.entry.js +1 -1
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +100 -0
- package/dist/cjs/eds-header.cjs.entry.js +97 -0
- package/dist/cjs/eds-link.cjs.entry.js +214 -0
- package/dist/cjs/eds-login.cjs.entry.js +1 -1
- package/dist/cjs/eds-logo.cjs.entry.js +78 -0
- package/dist/cjs/eds-modal.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/eds-rating.cjs.entry.js +58 -0
- package/dist/cjs/eds-social-networks.cjs.entry.js +66 -0
- package/dist/cjs/eds-steps.cjs.entry.js +65 -0
- package/dist/cjs/eds-switch.cjs.entry.js +38 -0
- package/dist/cjs/eds-tabs-content.cjs.entry.js +3 -3
- package/dist/cjs/eds-tabs.cjs.entry.js +2 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/eds-user.cjs.entry.js +1 -1
- package/dist/cjs/index-f08e4f5c.js +52 -20
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -2
- package/dist/collection/components/eds-button/eds-button.js +21 -16
- package/dist/collection/components/eds-link/eds-link.css +6793 -6676
- package/dist/collection/components/eds-matomo-notice/eds-matomo-notice.js +207 -0
- package/dist/collection/{shared-ui → components}/eds-matomo-notice/eds-matomo-notice.stories.js +1 -1
- package/dist/collection/components/eds-steps/eds-steps.css +60 -5
- package/dist/collection/components/eds-steps/eds-steps.js +5 -4
- package/dist/collection/components/eds-tag/eds-tag.js +4 -35
- package/dist/collection/components/eds-toast/eds-toast.css +91 -0
- package/dist/collection/components/eds-toast/eds-toast.js +18 -9
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.css +236 -140
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +10 -10
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +2 -2
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.css +0 -0
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +87 -0
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.st.js +31 -0
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +7 -53
- package/dist/collection/shared-ui/eds-header/eds-header.js +2 -2
- package/dist/collection/shared-ui/eds-login/eds-login.js +1 -1
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +1 -1
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +2 -2
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.css +1 -1
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +2 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +1 -1
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +1 -1
- package/dist/components/analytics.js +9 -1
- package/dist/components/components.css +520 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/eds-accordion2.js +2 -2
- package/dist/components/eds-button2.js +11 -15
- package/dist/components/eds-card-section.js +4 -4
- package/dist/components/eds-cookies-preference.d.ts +11 -0
- package/dist/components/eds-cookies-preference.js +88 -0
- package/dist/components/eds-footer2.js +3 -13
- package/dist/components/eds-header.js +2 -2
- package/dist/components/eds-link2.js +1 -1
- package/dist/components/eds-login.js +1 -1
- package/dist/components/eds-matomo-notice.js +1 -140
- package/dist/components/eds-matomo-notice2.js +127 -0
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-steps.js +7 -6
- package/dist/components/eds-tabs-content.js +2 -2
- package/dist/components/eds-tabs.js +1 -1
- package/dist/components/eds-tag2.js +1 -9
- package/dist/components/eds-toast-manager.js +4 -3
- package/dist/components/eds-toast2.js +13 -10
- package/dist/components/eds-user-modal2.js +1 -1
- package/dist/components/eds-user.js +1 -1
- package/dist/components/p-045681d7.entry.js +1 -0
- package/dist/components/p-0a3b2576.entry.js +1 -0
- package/dist/components/{p-92e16cc9.entry.js → p-10b81c47.entry.js} +1 -1
- package/dist/components/{p-89227919.js → p-13efafb9.js} +1 -1
- package/dist/components/{p-d69ef196.entry.js → p-1ae529f3.entry.js} +1 -1
- package/dist/components/p-21d42cf3.entry.js +1 -0
- package/dist/components/p-34a65e58.entry.js +1 -0
- package/dist/components/p-3a7aa1eb.entry.js +1 -0
- package/dist/components/p-42d3c324.entry.js +1 -0
- package/dist/components/{p-f08eac56.entry.js → p-4b3fbd6d.entry.js} +1 -1
- package/dist/components/p-4ea027ac.entry.js +1 -0
- package/dist/components/p-5097066f.entry.js +1 -0
- package/dist/components/p-5a2b8b6c.entry.js +1 -0
- package/dist/components/{p-72b42d77.entry.js → p-5ff31f14.entry.js} +1 -1
- package/dist/components/{p-030f67c1.entry.js → p-659ed449.entry.js} +1 -1
- package/dist/components/{p-75795b05.entry.js → p-7b3b26b0.entry.js} +1 -1
- package/dist/components/{p-0e0e1815.entry.js → p-88751c8b.entry.js} +1 -1
- package/dist/components/{p-8b583210.entry.js → p-9579f9c2.entry.js} +1 -1
- package/dist/components/p-b50c8d49.entry.js +1 -0
- package/dist/components/{p-59405ecf.entry.js → p-bd43d83c.entry.js} +1 -1
- package/dist/components/p-c683be2c.entry.js +1 -0
- package/dist/components/{p-209fa119.entry.js → p-d2a0b896.entry.js} +1 -1
- package/dist/components/p-d56d9dda.entry.js +1 -0
- package/dist/components/p-d5850ab3.entry.js +1 -0
- package/dist/components/p-e334f5bc.entry.js +1 -0
- package/dist/components/{p-def72462.entry.js → p-fad10768.entry.js} +1 -1
- package/dist/esm/{analytics-1cde8e4a.js → analytics-44b1416b.js} +9 -1
- package/dist/esm/components.js +1 -1
- package/dist/esm/eds-accordion_13.entry.js +895 -0
- package/dist/esm/eds-alert.entry.js +93 -0
- package/dist/esm/eds-block-break.entry.js +17 -0
- package/dist/esm/eds-breadcrumb.entry.js +145 -0
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-cookies-preference.entry.js +35 -0
- package/dist/esm/eds-dropdown_2.entry.js +2 -2
- package/dist/esm/eds-footer.entry.js +37 -0
- package/dist/esm/eds-form.entry.js +1 -1
- package/dist/esm/eds-fullscreen-menu.entry.js +96 -0
- package/dist/esm/eds-header.entry.js +93 -0
- package/dist/esm/eds-link.entry.js +210 -0
- package/dist/esm/eds-login.entry.js +1 -1
- package/dist/esm/eds-logo.entry.js +74 -0
- package/dist/esm/eds-modal.entry.js +1 -1
- package/dist/esm/eds-pagination_2.entry.js +1 -1
- package/dist/esm/eds-rating.entry.js +54 -0
- package/dist/esm/eds-social-networks.entry.js +62 -0
- package/dist/esm/eds-steps.entry.js +61 -0
- package/dist/esm/eds-switch.entry.js +34 -0
- package/dist/esm/eds-tabs-content.entry.js +3 -3
- package/dist/esm/eds-tabs.entry.js +2 -2
- package/dist/esm/eds-tooltip.entry.js +1 -1
- package/dist/esm/eds-user.entry.js +1 -1
- package/dist/esm/index-e96badea.js +52 -20
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +148 -136
- package/dist/hydrate/index.mjs +148 -136
- package/dist/types/components/eds-button/eds-button.d.ts +3 -1
- package/dist/types/components/eds-matomo-notice/eds-matomo-notice.d.ts +53 -0
- package/dist/types/components/eds-steps/eds-steps.d.ts +0 -1
- package/dist/types/components/eds-tag/eds-tag.d.ts +1 -25
- package/dist/types/components/eds-toast/eds-toast.d.ts +4 -5
- package/dist/types/components.d.ts +101 -88
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +5 -5
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +1 -1
- package/dist/types/shared-ui/eds-cookies-preference/eds-cookies-preference.d.ts +27 -0
- package/dist/types/shared-ui/eds-cookies-preference/eds-cookies-preference.st.d.ts +27 -0
- package/dist/types/shared-ui/eds-footer/eds-footer.d.ts +2 -15
- package/package.json +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +0 -84
- package/dist/cjs/eds-alert_17.cjs.entry.js +0 -1392
- package/dist/cjs/eds-avatar_4.cjs.entry.js +0 -187
- package/dist/cjs/eds-card-generic.cjs.entry.js +0 -104
- package/dist/cjs/eds-card-section.cjs.entry.js +0 -55
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +0 -109
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +0 -164
- package/dist/components/p-0bafc5ae.entry.js +0 -1
- package/dist/components/p-3babd772.entry.js +0 -1
- package/dist/components/p-505ddcda.entry.js +0 -1
- package/dist/components/p-8d19a05b.entry.js +0 -1
- package/dist/components/p-9826acae.entry.js +0 -1
- package/dist/components/p-eeeb0d83.entry.js +0 -1
- package/dist/esm/eds-accordion.entry.js +0 -80
- package/dist/esm/eds-alert_17.entry.js +0 -1372
- package/dist/esm/eds-avatar_4.entry.js +0 -180
- package/dist/esm/eds-card-generic.entry.js +0 -100
- package/dist/esm/eds-card-section.entry.js +0 -51
- package/dist/esm/eds-matomo-notice.entry.js +0 -105
- package/dist/types/shared-ui/eds-matomo-notice/eds-matomo-notice.d.ts +0 -77
- /package/dist/collection/{shared-ui → components}/eds-matomo-notice/eds-matomo-notice.css +0 -0
- /package/dist/types/{shared-ui → components}/eds-matomo-notice/eds-matomo-notice.stories.d.ts +0 -0
|
@@ -84,7 +84,7 @@ const EdsLogin$1 = /*@__PURE__*/ proxyCustomElement(class EdsLogin extends HTMLE
|
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h("div", { key: '
|
|
87
|
+
return (h("div", { key: '62768f8a6cc8ac16b13f9b2bb9cf5835f7f63844', class: "block" }, !this.authenticated && (h("eds-button", { key: '31e341d628242fed472f673c0fe8346c7871515d', label: "Login", intent: "primary", "extra-class": "text-default", "aria-label": "Login", triggerClick: this.handleLogin.bind(this) }))));
|
|
88
88
|
}
|
|
89
89
|
}, [1, "eds-login", {
|
|
90
90
|
"keycloakUrl": [1, "keycloak-url"],
|
|
@@ -1,143 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as toast } from './toastManager.js';
|
|
3
|
-
import { m as matomoOptIn } from './analytics.js';
|
|
4
|
-
import { d as defineCustomElement$4 } from './eds-accordion2.js';
|
|
5
|
-
import { d as defineCustomElement$3 } from './eds-button2.js';
|
|
6
|
-
import { d as defineCustomElement$2 } from './eds-icon-wrapper2.js';
|
|
7
|
-
|
|
8
|
-
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))}}";
|
|
9
|
-
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
10
|
-
|
|
11
|
-
const EdsMatomoNotice$1 = /*@__PURE__*/ proxyCustomElement(class EdsMatomoNotice extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
this.__registerHost();
|
|
15
|
-
this.__attachShadow();
|
|
16
|
-
this.title = 'Analytics Consent';
|
|
17
|
-
this.description = 'We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.';
|
|
18
|
-
this.showNotice = true;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Lifecycle method called before the component is rendered.
|
|
22
|
-
* Checks for the presence of the "mtm_consent" cookie to determine
|
|
23
|
-
* if the notice should be displayed.
|
|
24
|
-
*/
|
|
25
|
-
componentWillLoad() {
|
|
26
|
-
this.checkConsentCookie();
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Lifecycle method called after the component has been rendered.
|
|
30
|
-
* Emits `parentContext` events for each `eds-button` in the shadow DOM.
|
|
31
|
-
*/
|
|
32
|
-
componentDidLoad() {
|
|
33
|
-
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
34
|
-
btns.forEach((b) => {
|
|
35
|
-
this.emitContext(b);
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Emits a custom `parentContext` event for a given button element.
|
|
40
|
-
* This can be used to provide context information about the component.
|
|
41
|
-
*
|
|
42
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
43
|
-
*/
|
|
44
|
-
emitContext(linkElement) {
|
|
45
|
-
const event = new CustomEvent('parentContext', {
|
|
46
|
-
detail: {
|
|
47
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
48
|
-
identifier: null
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
linkElement.dispatchEvent(event);
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Checks if the Matomo "mtm_consent" cookie exists in the browser.
|
|
55
|
-
* If the cookie is found, the notice is hidden.
|
|
56
|
-
*/
|
|
57
|
-
checkConsentCookie() {
|
|
58
|
-
const consentCookie = document.cookie.split('; ').find((row) => row.startsWith('mtm_consent='));
|
|
59
|
-
//this.showNotice = !consentCookie;
|
|
60
|
-
const sessionDeferred = sessionStorage.getItem('matomo-deferred');
|
|
61
|
-
this.showNotice = !consentCookie && !sessionDeferred;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Handles user consent for analytics tracking.
|
|
65
|
-
* Calls the `matomoOptIn` utility and shows a success toast notification.
|
|
66
|
-
*/
|
|
67
|
-
optInAnalytics() {
|
|
68
|
-
matomoOptIn();
|
|
69
|
-
toast.show('You have opted in to analytics.', 'success');
|
|
70
|
-
this.hideNotice();
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Handles user opt-out from analytics tracking.
|
|
74
|
-
* Calls the `matomoOptOut` utility and shows a warning toast notification.
|
|
75
|
-
|
|
76
|
-
private optOutAnalytics() {
|
|
77
|
-
matomoOptOut();
|
|
78
|
-
toast.show('You have opted out of analytics.', 'warning');
|
|
79
|
-
this.hideNotice();
|
|
80
|
-
}*/
|
|
81
|
-
/**
|
|
82
|
-
* Handles "Ask me later" action by storing a session storage entry
|
|
83
|
-
* and hiding the notice for the rest of the session.
|
|
84
|
-
*/
|
|
85
|
-
deferDecision() {
|
|
86
|
-
sessionStorage.setItem('matomo-deferred', 'true');
|
|
87
|
-
toast.show('You can decide later.', 'warning');
|
|
88
|
-
this.hideNotice();
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Hides the notice by updating the `showNotice` state.
|
|
92
|
-
*/
|
|
93
|
-
hideNotice() {
|
|
94
|
-
this.showNotice = false;
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Renders the Matomo consent notice with user options.
|
|
98
|
-
* Includes an accordion for the description and two buttons for user consent.
|
|
99
|
-
*/
|
|
100
|
-
render() {
|
|
101
|
-
if (!this.showNotice) {
|
|
102
|
-
return null;
|
|
103
|
-
}
|
|
104
|
-
return (h("div", { 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" }, h("eds-accordion", { title: this.title, description: this.description, switchBg: true, expanded: true }, h("div", { class: "flex items-center gap-4" }, h("eds-button", { intent: "primary", label: "Yes, I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() }), h("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))));
|
|
105
|
-
}
|
|
106
|
-
get el() { return this; }
|
|
107
|
-
static get style() { return EdsMatomoNoticeStyle0; }
|
|
108
|
-
}, [1, "eds-matomo-notice", {
|
|
109
|
-
"title": [1],
|
|
110
|
-
"description": [1],
|
|
111
|
-
"showNotice": [32]
|
|
112
|
-
}]);
|
|
113
|
-
function defineCustomElement$1() {
|
|
114
|
-
if (typeof customElements === "undefined") {
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
const components = ["eds-matomo-notice", "eds-accordion", "eds-button", "eds-icon-wrapper"];
|
|
118
|
-
components.forEach(tagName => { switch (tagName) {
|
|
119
|
-
case "eds-matomo-notice":
|
|
120
|
-
if (!customElements.get(tagName)) {
|
|
121
|
-
customElements.define(tagName, EdsMatomoNotice$1);
|
|
122
|
-
}
|
|
123
|
-
break;
|
|
124
|
-
case "eds-accordion":
|
|
125
|
-
if (!customElements.get(tagName)) {
|
|
126
|
-
defineCustomElement$4();
|
|
127
|
-
}
|
|
128
|
-
break;
|
|
129
|
-
case "eds-button":
|
|
130
|
-
if (!customElements.get(tagName)) {
|
|
131
|
-
defineCustomElement$3();
|
|
132
|
-
}
|
|
133
|
-
break;
|
|
134
|
-
case "eds-icon-wrapper":
|
|
135
|
-
if (!customElements.get(tagName)) {
|
|
136
|
-
defineCustomElement$2();
|
|
137
|
-
}
|
|
138
|
-
break;
|
|
139
|
-
} });
|
|
140
|
-
}
|
|
1
|
+
import { E as EdsMatomoNotice$1, d as defineCustomElement$1 } from './eds-matomo-notice2.js';
|
|
141
2
|
|
|
142
3
|
const EdsMatomoNotice = EdsMatomoNotice$1;
|
|
143
4
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { t as toast } from './toastManager.js';
|
|
3
|
+
import { m as matomoOptIn, a as matomoOptOut } from './analytics.js';
|
|
4
|
+
import { d as defineCustomElement$3 } from './eds-accordion2.js';
|
|
5
|
+
import { d as defineCustomElement$2 } from './eds-button2.js';
|
|
6
|
+
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
7
|
+
|
|
8
|
+
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))}}";
|
|
9
|
+
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
10
|
+
|
|
11
|
+
const EdsMatomoNotice = /*@__PURE__*/ proxyCustomElement(class EdsMatomoNotice extends HTMLElement {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
this.__attachShadow();
|
|
16
|
+
this.title = 'Analytics Consent';
|
|
17
|
+
this.description = 'We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.';
|
|
18
|
+
this.deferMsgToast = 'You can decide later.';
|
|
19
|
+
this.optInMsgToast = 'You have opted in to analytics.';
|
|
20
|
+
this.optOutMsgToast = 'You have opted out of analytics.';
|
|
21
|
+
this.forceShow = false;
|
|
22
|
+
this.showNotice = true;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Checks if the consent cookie exists.
|
|
26
|
+
*/
|
|
27
|
+
hasCookieConsent() {
|
|
28
|
+
return !!document.cookie.split('; ').find((row) => row.startsWith('mtm_consent='));
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Generate a unique storage key based on appId or the app's domain.
|
|
32
|
+
*/
|
|
33
|
+
getStorageKey() {
|
|
34
|
+
return `${window.location.host}-matomo-deferred`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Check cookies and sessionStorage (unless forceShow is true) to decide if the notice should be shown.
|
|
38
|
+
*/
|
|
39
|
+
componentWillLoad() {
|
|
40
|
+
if (this.forceShow) {
|
|
41
|
+
this.showNotice = true;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
const sessionDeferred = sessionStorage.getItem(this.getStorageKey());
|
|
45
|
+
this.showNotice = !sessionDeferred;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
componentDidLoad() {
|
|
49
|
+
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
50
|
+
btns.forEach((b) => {
|
|
51
|
+
this.emitContext(b);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
emitContext(linkElement) {
|
|
55
|
+
const event = new CustomEvent('parentContext', {
|
|
56
|
+
detail: {
|
|
57
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
58
|
+
identifier: null
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
linkElement.dispatchEvent(event);
|
|
62
|
+
}
|
|
63
|
+
optInAnalytics() {
|
|
64
|
+
matomoOptIn();
|
|
65
|
+
toast.show(this.optInMsgToast, 'success');
|
|
66
|
+
this.hideNotice();
|
|
67
|
+
}
|
|
68
|
+
optOutAnalytics() {
|
|
69
|
+
matomoOptOut();
|
|
70
|
+
toast.show(this.optOutMsgToast, 'warning');
|
|
71
|
+
this.hideNotice();
|
|
72
|
+
}
|
|
73
|
+
deferDecision() {
|
|
74
|
+
sessionStorage.setItem(this.getStorageKey(), 'true');
|
|
75
|
+
toast.show(this.deferMsgToast, 'warning');
|
|
76
|
+
this.hideNotice();
|
|
77
|
+
}
|
|
78
|
+
hideNotice() {
|
|
79
|
+
this.showNotice = false;
|
|
80
|
+
}
|
|
81
|
+
render() {
|
|
82
|
+
if (!this.showNotice) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
return (h("div", { 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" }, h("eds-accordion", { title: this.title, description: this.description, switchBg: true, expanded: true }, h("div", { class: "flex items-center gap-4" }, this.hasCookieConsent() ? (h("eds-button", { intent: "primary", label: "Opt-out", "aria-label": "Opt-out from analytics", onClick: () => this.optOutAnalytics() })) : (h("eds-button", { intent: "primary", label: "Yes, I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() })), h("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))));
|
|
86
|
+
}
|
|
87
|
+
get el() { return this; }
|
|
88
|
+
static get style() { return EdsMatomoNoticeStyle0; }
|
|
89
|
+
}, [1, "eds-matomo-notice", {
|
|
90
|
+
"title": [1],
|
|
91
|
+
"description": [1],
|
|
92
|
+
"deferMsgToast": [1, "defer-msg-toast"],
|
|
93
|
+
"optInMsgToast": [1, "opt-in-msg-toast"],
|
|
94
|
+
"optOutMsgToast": [1, "opt-out-msg-toast"],
|
|
95
|
+
"forceShow": [4, "force-show"],
|
|
96
|
+
"showNotice": [32]
|
|
97
|
+
}]);
|
|
98
|
+
function defineCustomElement() {
|
|
99
|
+
if (typeof customElements === "undefined") {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const components = ["eds-matomo-notice", "eds-accordion", "eds-button", "eds-icon-wrapper"];
|
|
103
|
+
components.forEach(tagName => { switch (tagName) {
|
|
104
|
+
case "eds-matomo-notice":
|
|
105
|
+
if (!customElements.get(tagName)) {
|
|
106
|
+
customElements.define(tagName, EdsMatomoNotice);
|
|
107
|
+
}
|
|
108
|
+
break;
|
|
109
|
+
case "eds-accordion":
|
|
110
|
+
if (!customElements.get(tagName)) {
|
|
111
|
+
defineCustomElement$3();
|
|
112
|
+
}
|
|
113
|
+
break;
|
|
114
|
+
case "eds-button":
|
|
115
|
+
if (!customElements.get(tagName)) {
|
|
116
|
+
defineCustomElement$2();
|
|
117
|
+
}
|
|
118
|
+
break;
|
|
119
|
+
case "eds-icon-wrapper":
|
|
120
|
+
if (!customElements.get(tagName)) {
|
|
121
|
+
defineCustomElement$1();
|
|
122
|
+
}
|
|
123
|
+
break;
|
|
124
|
+
} });
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { EdsMatomoNotice as E, defineCustomElement as d };
|
|
@@ -58,7 +58,7 @@ const EdsSocialNetworks = /*@__PURE__*/ proxyCustomElement(class EdsSocialNetwor
|
|
|
58
58
|
* @returns {JSX.Element} The rendered JSX for the component.
|
|
59
59
|
*/
|
|
60
60
|
render() {
|
|
61
|
-
return (h("div", { key: '
|
|
61
|
+
return (h("div", { key: '9efc31261e88c70f9c808251124178d807140594' }, h("p", { key: '383101de2aaba05e1024f3ba86d788ad5d92173c', class: "f-ui-02" }, this.title), h("ul", { key: 'e27243a4e7b8aab085c4ef091d67df57dba70664', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index) => (h("li", { key: index }, h("eds-link", { "extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm", external: true, "aria-label": network.label, url: network.url, icon: network.icon, intent: "strong" })))))));
|
|
62
62
|
}
|
|
63
63
|
static get style() { return EdsSocialNetworksStyle0; }
|
|
64
64
|
}, [1, "eds-social-networks", {
|
|
@@ -4,13 +4,14 @@ import { d as defineCustomElement$4 } from './eds-button2.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './eds-icon-wrapper2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './eds-link2.js';
|
|
6
6
|
|
|
7
|
-
const edsStepsCss = ".steps{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4{counter-increment:step;font-size:
|
|
7
|
+
const edsStepsCss = ".steps{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps h4::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:0.875rem;border:1px solid #ccc;background:#333;color:#fff;border-radius:50%}.steps blockquote{margin-top:16px;margin-bottom:16px;font-style:italic;color:#aaa;padding-left:6px}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.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)}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.text-default{color:var(--black)}.text-error{color:var(--red-700)}.text-extra-light{color:var(--grey-300)}.text-inverse{color:var(--white)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.mb-28{margin-bottom:1.75rem}";
|
|
8
8
|
const EdsStepsStyle0 = edsStepsCss;
|
|
9
9
|
|
|
10
10
|
const EdsSteps$1 = /*@__PURE__*/ proxyCustomElement(class EdsSteps extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
14
15
|
this.stepClick = createEvent(this, "stepClick", 7);
|
|
15
16
|
this.handleNext = () => {
|
|
16
17
|
if (this.activeStep < this.parsedSteps.length) {
|
|
@@ -22,9 +23,6 @@ const EdsSteps$1 = /*@__PURE__*/ proxyCustomElement(class EdsSteps extends HTMLE
|
|
|
22
23
|
this.activeStep = this.activeStep - 1;
|
|
23
24
|
}
|
|
24
25
|
};
|
|
25
|
-
this.handleReset = () => {
|
|
26
|
-
this.activeStep = 0;
|
|
27
|
-
};
|
|
28
26
|
this.steps = [];
|
|
29
27
|
this.type = 'static';
|
|
30
28
|
this.activeStep = 0;
|
|
@@ -52,16 +50,19 @@ const EdsSteps$1 = /*@__PURE__*/ proxyCustomElement(class EdsSteps extends HTMLE
|
|
|
52
50
|
}
|
|
53
51
|
return this.steps;
|
|
54
52
|
}
|
|
53
|
+
/*private handleReset = () => {
|
|
54
|
+
this.activeStep = 0;
|
|
55
|
+
};*/
|
|
55
56
|
render() {
|
|
56
57
|
const steps = this.parsedSteps;
|
|
57
58
|
if (this.type === 'linear') {
|
|
58
|
-
return (h("div", null, h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), this.activeStep === index && (h("div", { class: "content" }, h("div", { class: "f-body-02 text-lighter my-16" }, step.content), h("eds-button", { label: index === steps.length - 1 ? 'Finish' : 'Continue', class: "next-btn", onClick: this.handleNext }), h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index === 0, "extra-class": index === 0 ? 'hidden' : 'ml-8 block' }))))))), this.activeStep === steps.length && (h("div", { class: "completed" }, h("eds-alert", { intent: "success", message: "All steps completed - you're finished!" })
|
|
59
|
+
return (h("div", null, h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), this.activeStep === index && (h("div", { class: "content" }, h("div", { class: "f-body-02 text-lighter my-16" }, step.content), h("eds-button", { label: index === steps.length - 1 ? 'Finish' : 'Continue', intent: "primary", class: "next-btn", onClick: this.handleNext }), h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index === 0, "extra-class": index === 0 ? 'hidden' : 'ml-8 block' }))))))), this.activeStep === steps.length && (h("div", { class: "completed" }, h("eds-alert", { intent: "success", message: "All steps completed - you're finished!" })))));
|
|
59
60
|
}
|
|
60
61
|
// Static mode: show all steps with their content, no navigation buttons.
|
|
61
62
|
return (h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", null, step.title), h("div", { class: "content" }, h("div", { class: "f-body-02 text-lighter my-16" }, step.content)))))));
|
|
62
63
|
}
|
|
63
64
|
static get style() { return EdsStepsStyle0; }
|
|
64
|
-
}, [
|
|
65
|
+
}, [1, "eds-steps", {
|
|
65
66
|
"steps": [1],
|
|
66
67
|
"type": [1],
|
|
67
68
|
"activeStep": [32]
|
|
@@ -116,11 +116,11 @@ const EdsTabsContent$1 = /*@__PURE__*/ proxyCustomElement(class EdsTabsContent e
|
|
|
116
116
|
});
|
|
117
117
|
}
|
|
118
118
|
render() {
|
|
119
|
-
return (h("div", { key: '
|
|
119
|
+
return (h("div", { key: 'd94df79c55522088de5445587758a5eea028b313', class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']" }, h("div", { key: 'e7d01a2e6b424c25749c0d70305fb1c8c55bef74', class: "scroller-x max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28" }, h("nav", { key: 'ef8ff8a02e570dfcf8143997ace793a65917e6ca', ref: (el) => (this.tabContainer = el), class: "inline-flex", "aria-label": this.navAriaLabel }, this.parsedTabs.map((tab, index) => {
|
|
120
120
|
//const TabComponent = tab.active ? 'span' : 'a';
|
|
121
121
|
const tabProps = this.getTabOptions(tab.active, index);
|
|
122
122
|
return (h("eds-tab", Object.assign({}, tabProps, { label: tab.label, url: tab.url, active: index === this.activeIndex, ariaLabel: tab.ariaLabel, onClick: () => this.handleTabClick(index, tab.label) })));
|
|
123
|
-
})), h("slot", { key: '
|
|
123
|
+
})), h("slot", { key: '8f014081c3bc2a8a3013aea3aff32690d6f71c85' }))));
|
|
124
124
|
}
|
|
125
125
|
get el() { return this; }
|
|
126
126
|
static get watchers() { return {
|
|
@@ -126,7 +126,7 @@ const EdsTabs$1 = /*@__PURE__*/ proxyCustomElement(class EdsTabs extends HTMLEle
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
render() {
|
|
129
|
-
return (h("div", { key: '
|
|
129
|
+
return (h("div", { key: '5a0c7dbdd059b2a1efdf31e91725dd1d49c88bd4', id: `${this.id}`, class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']" }, h("div", { key: '74bb7e66b88d845359caf285430fca079abfab03', class: "scroller-x overflow-x-auto max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28" }, h("nav", { key: '71ca3465da106b2d1ed59eca28eabfe60a1ac0fc', ref: (el) => (this.tabContainer = el), class: "inline-flex", "aria-label": this.navAriaLabel }, this.parsedTabs.map((tab, index) => {
|
|
130
130
|
//const TabComponent = tab.active ? 'span' : 'a';
|
|
131
131
|
const tabProps = this.getTabOptions(tab.active, index);
|
|
132
132
|
return (h("eds-tab", Object.assign({}, tabProps, { label: tab.label || tab.ariaLabel, url: tab.url, active: index === this.activeIndex, onClick: () => this.handleTabClick(index, tab.label) })));
|
|
@@ -27,23 +27,15 @@ const EdsTag = /*@__PURE__*/ proxyCustomElement(class EdsTag extends HTMLElement
|
|
|
27
27
|
this.__registerHost();
|
|
28
28
|
this.__attachShadow();
|
|
29
29
|
this.label = undefined;
|
|
30
|
-
this.ariaLabel = '';
|
|
31
30
|
this.intent = 'default';
|
|
32
31
|
}
|
|
33
|
-
/**
|
|
34
|
-
* Render the component.
|
|
35
|
-
* @returns The rendered HTML for the tag component with the applied styles and label.
|
|
36
|
-
*/
|
|
37
32
|
render() {
|
|
38
|
-
var _a;
|
|
39
33
|
const classes = tagStyles({ intent: this.intent });
|
|
40
|
-
|
|
41
|
-
return (h("span", { key: '6a517f42aeb641c95d96ecd6c3090a317a3195c6', class: classes, "aria-label": accessibleLabel }, this.label));
|
|
34
|
+
return h("span", { key: 'b49a84a2410f464c54c01a7d26a1710de8ce326b', class: classes }, this.label);
|
|
42
35
|
}
|
|
43
36
|
static get style() { return EdsTagStyle0; }
|
|
44
37
|
}, [1, "eds-tag", {
|
|
45
38
|
"label": [1],
|
|
46
|
-
"ariaLabel": [1, "aria-label"],
|
|
47
39
|
"intent": [1]
|
|
48
40
|
}]);
|
|
49
41
|
function defineCustomElement() {
|
|
@@ -4,13 +4,14 @@ import { d as defineCustomElement$4 } from './eds-button2.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './eds-icon-wrapper2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './eds-toast2.js';
|
|
6
6
|
|
|
7
|
-
const edsToastManagerCss = ".toast-container{position:fixed;top:1rem;left:50%;transform:translateX(-50%);z-index:
|
|
7
|
+
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
8
|
const EdsToastManagerStyle0 = edsToastManagerCss;
|
|
9
9
|
|
|
10
10
|
const EdsToastManager$1 = /*@__PURE__*/ proxyCustomElement(class EdsToastManager extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
13
13
|
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
14
15
|
this.toastId = 0;
|
|
15
16
|
this.toasts = [];
|
|
16
17
|
}
|
|
@@ -37,11 +38,11 @@ const EdsToastManager$1 = /*@__PURE__*/ proxyCustomElement(class EdsToastManager
|
|
|
37
38
|
this.toasts = this.toasts.filter((t) => t.id !== id);
|
|
38
39
|
}
|
|
39
40
|
render() {
|
|
40
|
-
return (h("div", { key: '
|
|
41
|
+
return (h("div", { key: '4e8781d164dd4f8aa47d17bc9f0632c0b49c173a', class: "toast-container" }, this.toasts.map((t) => (h("div", { key: t.id }, h("eds-toast", { message: t.message, intent: t.intent, onClick: () => this.removeToast(t.id) }))))));
|
|
41
42
|
}
|
|
42
43
|
get hostElement() { return this; }
|
|
43
44
|
static get style() { return EdsToastManagerStyle0; }
|
|
44
|
-
}, [
|
|
45
|
+
}, [1, "eds-toast-manager", {
|
|
45
46
|
"toasts": [32]
|
|
46
47
|
}]);
|
|
47
48
|
function defineCustomElement$1() {
|
|
@@ -3,6 +3,9 @@ import { c as cva } from './index2.js';
|
|
|
3
3
|
import { d as defineCustomElement$2 } from './eds-button2.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
5
5
|
|
|
6
|
+
const edsToastCss = ".relative{position:relative}.right-4{right:0.25rem}.bottom-4{bottom:0.25rem}.w-auto{width:auto}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-4{gap:0.25rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.ml-8{margin-left:0.5rem}.p-12{padding:0.75rem}.rounded-lg{border-radius:16px}.shadow-md{--tw-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),\n 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),\n var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-dark{background-color:var(--grey-300)}.bg-success{background-color:var(--green-200)}.bg-error{background-color:var(--red-200)}.bg-warning{background-color:var(--yellow-200)}.text-light{color:var(--grey-700)}.text-current{color:currentColor}.text-default{color:var(--black)}";
|
|
7
|
+
const EdsToastStyle0 = edsToastCss;
|
|
8
|
+
|
|
6
9
|
const toastStyles = cva(['relative right-4 bottom-4 w-auto p-12 rounded-lg shadow-md'], {
|
|
7
10
|
variants: {
|
|
8
11
|
intent: {
|
|
@@ -20,6 +23,7 @@ const EdsToast = /*@__PURE__*/ proxyCustomElement(class EdsToast extends HTMLEle
|
|
|
20
23
|
constructor() {
|
|
21
24
|
super();
|
|
22
25
|
this.__registerHost();
|
|
26
|
+
this.__attachShadow();
|
|
23
27
|
/**
|
|
24
28
|
* Dismisses the toast.
|
|
25
29
|
*/
|
|
@@ -31,26 +35,24 @@ const EdsToast = /*@__PURE__*/ proxyCustomElement(class EdsToast extends HTMLEle
|
|
|
31
35
|
this.duration = 5000;
|
|
32
36
|
this.visible = true;
|
|
33
37
|
}
|
|
34
|
-
/**
|
|
35
|
-
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
36
|
-
* to recalculate height on window resize.
|
|
37
|
-
*/
|
|
38
38
|
componentDidLoad() {
|
|
39
|
-
|
|
40
|
-
const btn = this.el.querySelector('eds-button');
|
|
39
|
+
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
41
40
|
this.emitContext(btn);
|
|
42
41
|
}
|
|
43
42
|
/**
|
|
44
43
|
* Emits a custom event called `parentContext` for a given button element.
|
|
44
|
+
* This event provides context information about the toast component.
|
|
45
|
+
*
|
|
46
|
+
* @param btnElement - The link element to which the event will be dispatched.
|
|
45
47
|
*/
|
|
46
|
-
emitContext(
|
|
48
|
+
emitContext(btnElement) {
|
|
47
49
|
const event = new CustomEvent('parentContext', {
|
|
48
50
|
detail: {
|
|
49
51
|
componentName: this.el.tagName.toLowerCase(),
|
|
50
52
|
identifier: null
|
|
51
53
|
}
|
|
52
54
|
});
|
|
53
|
-
|
|
55
|
+
btnElement.dispatchEvent(event);
|
|
54
56
|
}
|
|
55
57
|
connectedCallback() {
|
|
56
58
|
// Auto-dismiss the toast after the specified duration
|
|
@@ -65,10 +67,11 @@ const EdsToast = /*@__PURE__*/ proxyCustomElement(class EdsToast extends HTMLEle
|
|
|
65
67
|
return null;
|
|
66
68
|
}
|
|
67
69
|
const classes = toastStyles({ intent: this.intent });
|
|
68
|
-
return (h("div", { class: classes, role: "alert", "aria-live": "assertive" }, h("div", { class: "flex items-center justify-between gap-4" }, h("
|
|
70
|
+
return (h("div", { class: classes, role: "alert", "aria-live": "assertive" }, h("div", { class: "flex items-center justify-between gap-4" }, h("span", { class: "f-ui-01" }, this.message), h("eds-button", { intent: "tertiary", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
69
71
|
}
|
|
70
72
|
get el() { return this; }
|
|
71
|
-
|
|
73
|
+
static get style() { return EdsToastStyle0; }
|
|
74
|
+
}, [1, "eds-toast", {
|
|
72
75
|
"message": [1],
|
|
73
76
|
"intent": [1],
|
|
74
77
|
"duration": [2],
|
|
@@ -34,7 +34,7 @@ const EdsUserModal = /*@__PURE__*/ proxyCustomElement(class EdsUserModal extends
|
|
|
34
34
|
}
|
|
35
35
|
render() {
|
|
36
36
|
var _a, _b, _c, _d, _e;
|
|
37
|
-
return (h("div", { key: '
|
|
37
|
+
return (h("div", { key: '866e4e08b5a5330d341845c7cd68f18845732bb6', class: "min-w-[280px] p-8" }, h("div", { key: 'c3c0c56a0ba0bb035efbc474dacc69454f2f9831', class: "flex gap-x-16 pb-16 border-b-2 border-softer" }, h("eds-avatar", { key: '053e545eb7b8f66b9b9463f77ac89083b2bc87a4', "first-name": (_a = this.parsedUser) === null || _a === void 0 ? void 0 : _a.firstname, "last-name": (_b = this.parsedUser) === null || _b === void 0 ? void 0 : _b.lastname, initials: this.initials, color: "grey", rounded: true, "initials-strong": true }), h("div", { key: 'c2d3a51f5aa92dda20058b51aaab3405a85dfbc0', class: "max-w-full" }, ((_c = this.parsedUser) === null || _c === void 0 ? void 0 : _c.fullname) && (h("p", { key: 'fcc11680037eb282316cfde3988beb7550a51059', class: "f-ui-01 text-default w-full text-ellipsis" }, this.parsedUser.fullname)), ((_d = this.parsedUser) === null || _d === void 0 ? void 0 : _d.username) && h("p", { key: '2f6aac63baecb3da750f3eb9a09f8793120d8977', class: "f-ui-03-light text-light mt-4" }, this.parsedUser.username), ((_e = this.parsedUser) === null || _e === void 0 ? void 0 : _e.email) && h("p", { key: '04f3cf2dab10351bc52c94f53c6e9b75d3d34fe7', class: "f-ui-03-light text-light mt-4" }, this.parsedUser.email))), h("div", { key: 'b5bb3171c338891669251b8cde0cdbc810562065', class: "text-default mt-16 flex w-full flex-col gap-y-8" }, h("div", { key: '7020f1d94ad9ed10d8b1e1fce88837c70ef310b8', class: "border-softer mb-10 border-b-2 pb-16" }, h("eds-link", { key: '26946fa26bd53953e99f2f61b4d9f47e60f5dc6f', label: "My EBRAINS", "aria-label": "My EBRAINS", url: "https://www.ebrains.eu/dashboard", intent: "primary", "extra-class": "w-full", external: true })), h("eds-link", { key: 1, label: "Account Settings", url: "https://iam.ebrains.eu/auth/realms/hbp/account/", intent: "secondary", icon: "arrow-diagonal", external: true, "extra-class": "w-full" }), this.hasLogout && (h("eds-link", { key: 'e53f2b7588fea91fd16c0effe81609e1ded97304', label: "Sign out", intent: "tertiary", "extra-class": "w-full justify-center", onClick: () => this.onLogout && this.onLogout() })))));
|
|
38
38
|
}
|
|
39
39
|
static get watchers() { return {
|
|
40
40
|
"user": ["parseUserProp"],
|
|
@@ -95,7 +95,7 @@ const EdsUser$1 = /*@__PURE__*/ proxyCustomElement(class EdsUser extends HTMLEle
|
|
|
95
95
|
}
|
|
96
96
|
render() {
|
|
97
97
|
var _a;
|
|
98
|
-
return (h("div", { key: '
|
|
98
|
+
return (h("div", { key: '8fe0aaf06ed421d8ca6e512247b4d15b092c895f', class: "block" }, !this.authenticated ? (h("eds-button", { label: "Login", intent: "primary", onClick: this.handleLogin, "extra-class": "text-default" })) : (h("div", { class: "flex items-center" }, h("eds-dropdown", { label: `Welcome, ${(_a = this.user) === null || _a === void 0 ? void 0 : _a.username}`, intent: "tertiary", "aria-label": "User Menu", "dropdown-pos": "right", "dropdown-offset": "false", icon: "chevron-down", class: "text-default" }, h("eds-user-modal", { user: JSON.stringify(this.user), onLogout: this.handleLogout.bind(this) }))))));
|
|
99
99
|
}
|
|
100
100
|
get hostEl() { return this; }
|
|
101
101
|
}, [0, "eds-user", {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as s}from"./p-7a8b9de5.js";const t=class{constructor(s){e(this,s),this.buttonText="Cookies Preferences",this.intent=void 0,this.showMatomoNotice=!1,this.noticeKey=0}toggleCookiesPopup(){sessionStorage.removeItem("matomo-deferred"),this.showMatomoNotice?this.noticeKey=this.noticeKey+1:this.showMatomoNotice=!0}render(){return s("div",{key:"ca5d44522f94e9ea009c657c5eae6e357cd0d13a"},s("eds-link",{key:"563a369e2ed44d08a6dd47922c1c1c888e81543a",size:"small",intent:this.intent,label:this.buttonText,onClick:()=>this.toggleCookiesPopup()}),this.showMatomoNotice&&s("eds-matomo-notice",{"force-show":!0,key:this.noticeKey}))}};t.style="";export{t as eds_cookies_preference}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as s,h as t}from"./p-7a8b9de5.js";const i=class{constructor(t){e(this,t),this.menuClose=s(this,"menuClose",7),this.links=void 0,this.menuLinks=void 0,this.homeUrl="/",this.inverseHeader=!1,this.isMenuOpen=!1}handleToggleMenu(e){this.isMenuOpen=e.detail}openMenu(){this.isMenuOpen=!0}closeMenu(){this.isMenuOpen=!1,this.menuClose.emit()}componentDidLoad(){window.addEventListener("resize",this.handleResize.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.handleResize.bind(this))}handleResize(){window.innerWidth>=1024&&(this.isMenuOpen=!1)}get parsedLinks(){if("object"==typeof this.links)return this.links;if("string"==typeof this.links)try{return JSON.parse(this.links)}catch(e){return console.error("Error parsing links prop:",e),[]}return[]}get parsedMenuLinks(){if("object"==typeof this.menuLinks)return this.menuLinks;if("string"==typeof this.menuLinks)try{return JSON.parse(this.menuLinks)}catch(e){return console.error("Error parsing menuLinks prop:",e),[]}return[]}render(){return this.isMenuOpen?t("div",{class:"eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll"},t("div",{class:"flex min-h-full flex-col"},t("div",{class:"bg-default w-full sticky top-0 "+(this.inverseHeader?"bg-strongest":"bg-default")},t("div",{class:"mx-auto flex items-center justify-between"},t("div",{class:"mr-auto w-[200px] h-[85px]"},t("eds-logo",{type:this.inverseHeader?"color-white":"color",href:this.homeUrl})),t("div",{class:"px-16"},t("eds-button",{"aria-label":"Close menu",intent:"ghostInverse",icon:"close",onClick:()=>this.closeMenu()})))),t("div",{class:"py-16 px-16"},t("nav",{class:"mt-28 flex flex-col gap-y-8"},this.parsedLinks.map(((e,s)=>t("eds-link",{label:e.label,key:s,url:e.url,intent:"tertiary",size:"large",class:"effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",onClick:()=>this.closeMenu(),icon:"arrow-right"})))),t("eds-block-break",null),t("nav",{class:"mt-28 flex flex-col gap-y-8"},this.parsedMenuLinks.map(((e,s)=>t("eds-link",{label:e.label,key:s,url:e.url,intent:"tertiary",size:"large",class:"effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",onClick:()=>this.closeMenu(),icon:"chevron-right"}))))),t("div",{class:"mt-auto"},t("eds-footer",{social:!0,"extra-class":"bg-darker"})))):null}};i.style="";export{i as eds_fullscreen_menu}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-7a8b9de5.js";import{l as a,a as
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-7a8b9de5.js";import{l as a,a as r,i as e,b as h,g as c}from"./p-8eab748d.js";import{t as o}from"./p-22f9e720.js";const n=class{constructor(i){t(this,i),this.authStatusChanged=s(this,"authStatusChanged",7),this.handleLogin=async()=>{if(!this.authenticated)try{await a(),o.show("You are authenticated","success")}catch(t){o.show(t.message,"error")}},this.handleLogout=async()=>{try{await r()}catch(t){o.show(t.message,"error")}this.authenticated=!1,this.user=null},this.keycloakUrl=void 0,this.keycloakRealm=void 0,this.keycloakClientId=void 0,this.authenticated=!1,this.user=null}async componentWillLoad(){this.keycloakUrl&&this.keycloakRealm&&this.keycloakClientId?await this.initAuth():console.error("Keycloak configuration props are missing.")}async initAuth(){try{await e({url:this.keycloakUrl,realm:this.keycloakRealm,clientId:this.keycloakClientId},!0),h()&&(this.user=c(),this.authenticated=!0,this.authStatusChanged.emit({authenticated:this.authenticated,user:this.user}))}catch(t){o.show(t.message,"error")}}render(){return i("div",{key:"62768f8a6cc8ac16b13f9b2bb9cf5835f7f63844",class:"block"},!this.authenticated&&i("eds-button",{key:"31e341d628242fed472f673c0fe8346c7871515d",label:"Login",intent:"primary","extra-class":"text-default","aria-label":"Login",triggerClick:this.handleLogin.bind(this)}))}};export{n as eds_login}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function n(){return"undefined"!=typeof window&&void 0!==window._paq}function o(o){var i;if(!n())return console.warn("Matomo is not available or not initialized."),void console.log(Object.assign({},o));const t=[];(null===(i=o.parentContext)||void 0===i?void 0:i.componentName)&&t.push(o.parentContext.componentName),t.push(o.tag||"unknown-tag"),t.push(o.name||"unknown-name");const e=t.join("/");!function(o,...i){n()?window._paq.push([o,...i]):console.warn("Matomo is not available or not initialized.")}("trackEvent",o.category,o.action,e),console.log(Object.assign({},o))}function i(){n()&&(window._paq.push(["rememberConsentGiven"]),console.log("User has opted in to tracking"))}export{i as m,o as s}
|
|
1
|
+
function n(){return"undefined"!=typeof window&&void 0!==window._paq}function o(o){var i;if(!n())return console.warn("Matomo is not available or not initialized."),void console.log(Object.assign({},o));const t=[];(null===(i=o.parentContext)||void 0===i?void 0:i.componentName)&&t.push(o.parentContext.componentName),t.push(o.tag||"unknown-tag"),t.push(o.name||"unknown-name");const e=t.join("/");!function(o,...i){n()?window._paq.push([o,...i]):console.warn("Matomo is not available or not initialized.")}("trackEvent",o.category,o.action,e),console.log(Object.assign({},o))}function i(){n()&&(window._paq.push(["rememberConsentGiven"]),console.log("User has opted in to tracking"))}function t(){n()&&(window._paq.push(["forgetConsentGiven"]),console.log("User has opted out of tracking"))}export{t as a,i as m,o as s}
|