@ebrains/react 0.7.0-alpha.0 → 0.9.0-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/README.md +3 -3
- package/bookmark-c200037c.esm.js +16 -0
- package/color-primary-palette_6.entry.esm.js +163 -141
- package/components-section.entry.esm.js +165 -0
- package/correct-use-of-colors.entry.esm.js +49 -49
- package/{eds-docs-palettes.entry.esm.js → docs-palettes.entry.esm.js} +3 -3
- package/{eds-docs-tokens.entry.esm.js → docs-tokens.entry.esm.js} +3 -3
- package/eds-accordion.entry.esm.js +132 -0
- package/eds-alert.entry.esm.js +14 -6
- package/eds-app-root.entry.esm.js +4 -4
- package/eds-avatar_24.entry.esm.js +275 -0
- package/eds-breadcrumb.entry.esm.js +6 -3
- package/{eds-avatar_4.entry.esm.js → eds-card-desc_3.entry.esm.js} +6 -66
- package/eds-card-generic.entry.esm.js +1 -1
- 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 +9 -9
- package/eds-frame.entry.esm.js +11 -17
- package/eds-icon-arrow-diagonal.entry.esm.js +3 -3
- package/eds-icon-arrow-right.entry.esm.js +1 -1
- package/eds-icon-bookmark.entry.esm.js +21 -0
- 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 +21 -0
- package/eds-icon-gitlab.entry.esm.js +1 -1
- package/eds-icon-loader.entry.esm.js +1 -1
- package/eds-icon-menu.entry.esm.js +1 -1
- package/eds-icon-minus.entry.esm.js +21 -0
- package/eds-icon-more.entry.esm.js +1 -1
- package/eds-icon-paper.entry.esm.js +21 -0
- package/eds-icon-plus.entry.esm.js +21 -0
- package/eds-icon-portal.entry.esm.js +21 -0
- package/eds-icon-private.entry.esm.js +21 -0
- package/eds-icon-public.entry.esm.js +21 -0
- 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 +21 -0
- package/eds-icon-unknown.entry.esm.js +21 -0
- package/eds-icon-updown.entry.esm.js +21 -0
- package/eds-login_2.entry.esm.js +27 -15
- package/eds-matomo-notice.entry.esm.js +162 -0
- package/eds-modal.entry.esm.js +13 -13
- package/eds-pagination_2.entry.esm.js +493 -0
- package/eds-section-core_2.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 +7 -4
- package/eds-toast-manager.entry.esm.js +1 -1
- package/eds-tooltip.entry.esm.js +3 -3
- package/eds-trl.entry.esm.js +3 -3
- package/incorrect-use-of-colors.entry.esm.js +9 -9
- package/index.esm.js +1 -1
- package/index.esm2.js +66 -46
- package/logo-space.entry.esm.js +28 -12
- package/logo-variations-horizontal_2.entry.esm.js +73 -66
- package/{eds-logo-variations.entry.esm.js → logo-variations-tabs.entry.esm.js} +3 -3
- package/logo-wrong-usage.entry.esm.js +71 -107
- package/minus-b30a7c71.esm.js +11 -0
- package/package.json +1 -1
- package/paper-8e74ea31.esm.js +15 -0
- package/plus-89c07be2.esm.js +12 -0
- package/portal-d6c8ce56.esm.js +18 -0
- package/private-1c25ff8e.esm.js +25 -0
- package/public-d4d8c585.esm.js +16 -0
- package/src/components.d.ts +1 -5
- package/{eds-svg-repository.entry.esm.js → svg-repository.entry.esm.js} +35 -29
- package/token-list_3.entry.esm.js +9 -9
- package/token-ratios.entry.esm.js +3 -3
- package/token-typography.entry.esm.js +10 -7
- package/tutotial-150ee1fd.esm.js +27 -0
- package/unknown-ed01a24c.esm.js +22 -0
- package/up-and-down-d747abee.esm.js +12 -0
- package/eds-accordion_22.entry.esm.js +0 -269
- package/eds-components-section.entry.esm.js +0 -158
- package/eds-dropdown.entry.esm.js +0 -156
- package/eds-form.entry.esm.js +0 -410
- package/eds-steps.entry.esm.js +0 -89
- package/eds-user.entry.esm.js +0 -95
- package/eds-vertical-stepper.entry.esm.js +0 -81
- package/formUtils-ac68474d.esm.js +0 -247
- package/token-spacing.entry.esm.js +0 -93
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { p as paper } from './paper-8e74ea31.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconPaper = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'cb9f7af8825527f86c200203611dae752cb3d647',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: paper
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconPaper as eds_icon_paper };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { p as plus } from './plus-89c07be2.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconPlus = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '75a9d03500e01cc9d5f7b19a5afd2491ad2e6fee',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: plus
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconPlus as eds_icon_plus };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { p as portal } from './portal-d6c8ce56.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconPortal = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '260c4eeb69ff79d943571c1461346b9019ea513a',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: portal
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconPortal as eds_icon_portal };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { p as privat } from './private-1c25ff8e.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconPrivate = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'd57700e721a421e4c970a1e643d92548fcf2b18c',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: privat
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconPrivate as eds_icon_private };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { p as pub } from './public-d4d8c585.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconPublic = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'b3a338684e00d2d612a49734cbb3cfd8e44b4eee',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: pub
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconPublic as eds_icon_public };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { t as tutorial } from './tutotial-150ee1fd.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconTutorial = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '9db1730236b54d01a4264e92465f9a953325f7ca',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: tutorial
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconTutorial as eds_icon_tutorial };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { u as unknown } from './unknown-ed01a24c.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconUnknown = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '259a1fae59093dd4e1fd6d26e07aae0e8c3de2fd',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: unknown
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconUnknown as eds_icon_unknown };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { u as upDonw } from './up-and-down-d747abee.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconUpdown = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '9383784da3e52d22395288f8eba5b6f4ee826aa5',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: upDonw
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconUpdown as eds_icon_updown };
|
package/eds-login_2.entry.esm.js
CHANGED
|
@@ -1732,10 +1732,10 @@ const EdsLogin = class {
|
|
|
1732
1732
|
}
|
|
1733
1733
|
render() {
|
|
1734
1734
|
return h("div", {
|
|
1735
|
-
key: '
|
|
1735
|
+
key: 'ac10895096f36f2fb3a79622972d5a8c519685eb',
|
|
1736
1736
|
class: "block"
|
|
1737
1737
|
}, !this.authenticated && h("eds-button", {
|
|
1738
|
-
key: '
|
|
1738
|
+
key: '55aab5ee63214d6a1ccdefc303273df99aa309cf',
|
|
1739
1739
|
label: "Login",
|
|
1740
1740
|
intent: "primary",
|
|
1741
1741
|
"extra-class": "text-default",
|
|
@@ -1754,21 +1754,28 @@ const EdsSplashScreen = class {
|
|
|
1754
1754
|
this.initPromise = undefined;
|
|
1755
1755
|
this.isVisible = true;
|
|
1756
1756
|
}
|
|
1757
|
+
// When the component loads, check if there is a promise.
|
|
1757
1758
|
componentWillLoad() {
|
|
1758
|
-
// If an initialization promise is provided, wait for it.
|
|
1759
1759
|
if (this.initPromise) {
|
|
1760
|
-
this.initPromise
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1760
|
+
this.handleInitPromise(this.initPromise);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
// Watch for changes on initPromise.
|
|
1764
|
+
async watchInitPromise(newPromise) {
|
|
1765
|
+
if (newPromise) {
|
|
1766
|
+
this.handleInitPromise(newPromise);
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
async handleInitPromise(promise) {
|
|
1770
|
+
try {
|
|
1771
|
+
await promise;
|
|
1772
|
+
//console.log('Promises resolved');
|
|
1773
|
+
this.hideSplash();
|
|
1774
|
+
} catch (error) {
|
|
1775
|
+
//console.error('Initialization error:', error);
|
|
1776
|
+
this.splash.emit({
|
|
1777
|
+
type: 'error',
|
|
1778
|
+
message: error.message || 'Unknown error'
|
|
1772
1779
|
});
|
|
1773
1780
|
}
|
|
1774
1781
|
}
|
|
@@ -1810,6 +1817,11 @@ const EdsSplashScreen = class {
|
|
|
1810
1817
|
fullscreen: false
|
|
1811
1818
|
}))));
|
|
1812
1819
|
}
|
|
1820
|
+
static get watchers() {
|
|
1821
|
+
return {
|
|
1822
|
+
"initPromise": ["watchInitPromise"]
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1813
1825
|
};
|
|
1814
1826
|
EdsSplashScreen.style = EdsSplashScreenStyle0;
|
|
1815
1827
|
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
|
|
2
|
+
import { m as matomoOptIn, a as matomoOptOut } from './analytics-44b1416b.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
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}.z-\\[999999\\]{z-index:999999}.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))}}";
|
|
8
|
+
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
9
|
+
const EdsMatomoNotice = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
registerInstance(this, hostRef);
|
|
12
|
+
this.consent = createEvent(this, "consent", 7);
|
|
13
|
+
this.title = 'Analytics Consent';
|
|
14
|
+
this.description = "We use anonymous analytics to improve our services. No data is collected unless you give your consent. If you don't wish to send data right now, you can always re-enable analytics later by clicking the Cookies Preference button in the footer. However, by opting in today, you're joining a community that shapes our product's future—all while keeping your data completely anonymous.";
|
|
15
|
+
this.optOutMessage = "You are already part of our community, and your anonymous data helps shape our product's future! Rest assured, your privacy is fully protected.";
|
|
16
|
+
this.forceShow = false;
|
|
17
|
+
this.showNotice = true;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Listens for global custom events to open the matomo-consent.
|
|
21
|
+
*/
|
|
22
|
+
toggleCookiesConsent() {
|
|
23
|
+
this.showNotice = !this.showNotice;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Checks if the consent cookie exists.
|
|
27
|
+
*/
|
|
28
|
+
hasCookieConsent() {
|
|
29
|
+
return !!document.cookie.split('; ').find(row => row.startsWith('mtm_consent='));
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Checks if the user has opted out after has opted in.
|
|
33
|
+
*/
|
|
34
|
+
optedOut() {
|
|
35
|
+
return !!document.cookie.split('; ').find(row => row.startsWith('mtm_consent_removed'));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Generate a unique storage key based on appId or the app's domain.
|
|
39
|
+
*/
|
|
40
|
+
getStorageKey() {
|
|
41
|
+
return `${window.location.host}-matomo-deferred`;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Check cookies and sessionStorage (unless forceShow is true) to decide if the notice should be shown.
|
|
45
|
+
*/
|
|
46
|
+
componentWillLoad() {
|
|
47
|
+
// If a decision has been made previously (opted in or out), don't show the notice.
|
|
48
|
+
const consentGiven = localStorage.getItem('matomo-consent-given');
|
|
49
|
+
if (consentGiven === 'out' || this.optedOut()) {
|
|
50
|
+
this.showNotice = false;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (this.forceShow) {
|
|
54
|
+
// If forceShow is true, always show the notice
|
|
55
|
+
this.showNotice = true;
|
|
56
|
+
} else {
|
|
57
|
+
// If user has already consented, hide the notice
|
|
58
|
+
// eslint-disable-next-line
|
|
59
|
+
if (this.hasCookieConsent()) {
|
|
60
|
+
this.showNotice = false;
|
|
61
|
+
} else {
|
|
62
|
+
// Otherwise check if user deferred in this session
|
|
63
|
+
const sessionDeferred = sessionStorage.getItem(this.getStorageKey());
|
|
64
|
+
this.showNotice = !sessionDeferred;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
componentDidLoad() {
|
|
69
|
+
const btns = this.el.shadowRoot.querySelectorAll('eds-button');
|
|
70
|
+
btns.forEach(b => {
|
|
71
|
+
this.emitContext(b);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
emitContext(linkElement) {
|
|
75
|
+
const event = new CustomEvent('parentContext', {
|
|
76
|
+
detail: {
|
|
77
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
78
|
+
identifier: null
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
linkElement.dispatchEvent(event);
|
|
82
|
+
}
|
|
83
|
+
optInAnalytics() {
|
|
84
|
+
matomoOptIn();
|
|
85
|
+
localStorage.removeItem('matomo-consent-given');
|
|
86
|
+
this.hideNotice();
|
|
87
|
+
this.consent.emit('in');
|
|
88
|
+
}
|
|
89
|
+
optOutAnalytics() {
|
|
90
|
+
matomoOptOut();
|
|
91
|
+
this.hideNotice();
|
|
92
|
+
this.consent.emit('out');
|
|
93
|
+
}
|
|
94
|
+
noThanks() {
|
|
95
|
+
localStorage.setItem('matomo-consent-given', 'out');
|
|
96
|
+
this.hideNotice();
|
|
97
|
+
}
|
|
98
|
+
deferDecision() {
|
|
99
|
+
sessionStorage.setItem(this.getStorageKey(), 'true');
|
|
100
|
+
this.hideNotice();
|
|
101
|
+
this.consent.emit('defer');
|
|
102
|
+
}
|
|
103
|
+
keepMeIn() {
|
|
104
|
+
this.hideNotice();
|
|
105
|
+
}
|
|
106
|
+
hideNotice() {
|
|
107
|
+
this.showNotice = false;
|
|
108
|
+
}
|
|
109
|
+
render() {
|
|
110
|
+
if (!this.showNotice) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
return h("div", {
|
|
114
|
+
class: "fixed bottom-0 p-8 z-[999999] grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center"
|
|
115
|
+
}, h("eds-accordion", {
|
|
116
|
+
title: this.title,
|
|
117
|
+
description: this.hasCookieConsent() ? this.optOutMessage : this.description,
|
|
118
|
+
switchBg: true,
|
|
119
|
+
expanded: true
|
|
120
|
+
}, this.hasCookieConsent() ? h("div", {
|
|
121
|
+
class: "flex items-center gap-4"
|
|
122
|
+
}, this.optedOut() ? h("eds-button", {
|
|
123
|
+
intent: "primary",
|
|
124
|
+
label: "Opt me in again",
|
|
125
|
+
"aria-label": "Opt me in again",
|
|
126
|
+
onClick: () => this.optInAnalytics()
|
|
127
|
+
}) : h("eds-button", {
|
|
128
|
+
intent: "primary",
|
|
129
|
+
label: "Keep Me In",
|
|
130
|
+
"aria-label": "Keep Me In",
|
|
131
|
+
onClick: () => this.keepMeIn()
|
|
132
|
+
}), h("eds-button", {
|
|
133
|
+
intent: "ghostInverse",
|
|
134
|
+
label: "Opt-out",
|
|
135
|
+
"aria-label": "Opt-out from analytics",
|
|
136
|
+
onClick: () => this.optOutAnalytics()
|
|
137
|
+
})) : h("div", {
|
|
138
|
+
class: "flex items-center gap-4"
|
|
139
|
+
}, h("eds-button", {
|
|
140
|
+
intent: "primary",
|
|
141
|
+
label: "I agree",
|
|
142
|
+
"aria-label": "Opt-in for analytics",
|
|
143
|
+
onClick: () => this.optInAnalytics()
|
|
144
|
+
}), h("eds-button", {
|
|
145
|
+
intent: "ghost",
|
|
146
|
+
label: "No, thanks",
|
|
147
|
+
"aria-label": "Opt-out from analytics",
|
|
148
|
+
onClick: () => this.noThanks()
|
|
149
|
+
}), h("eds-button", {
|
|
150
|
+
intent: "ghost",
|
|
151
|
+
label: "Ask me later",
|
|
152
|
+
"aria-label": "Defer analytics decision",
|
|
153
|
+
onClick: () => this.deferDecision()
|
|
154
|
+
}))));
|
|
155
|
+
}
|
|
156
|
+
get el() {
|
|
157
|
+
return getElement(this);
|
|
158
|
+
}
|
|
159
|
+
};
|
|
160
|
+
EdsMatomoNotice.style = EdsMatomoNoticeStyle0;
|
|
161
|
+
|
|
162
|
+
export { EdsMatomoNotice as eds_matomo_notice };
|
package/eds-modal.entry.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import 'react';
|
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react-dom';
|
|
6
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}.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}";
|
|
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
8
|
const EdsModalStyle0 = edsModalCss;
|
|
9
9
|
const EdsModal = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -27,16 +27,16 @@ const EdsModal = class {
|
|
|
27
27
|
getModalPositionClasses() {
|
|
28
28
|
switch (this.position) {
|
|
29
29
|
case 'top':
|
|
30
|
-
return 'left-1/2 top-20
|
|
30
|
+
return 'md:left-1/2 top-20 md:-translate-x-1/2';
|
|
31
31
|
case 'bottom':
|
|
32
|
-
return 'left-1/2 bottom-20
|
|
32
|
+
return 'md:left-1/2 bottom-20 md:-translate-x-1/2';
|
|
33
33
|
case 'left':
|
|
34
34
|
return 'left-20 top-1/2 -translate-y-1/2';
|
|
35
35
|
case 'right':
|
|
36
36
|
return 'right-20 top-1/2 -translate-y-1/2';
|
|
37
37
|
case 'middle':
|
|
38
38
|
default:
|
|
39
|
-
return 'left-1/2 top-1/2
|
|
39
|
+
return 'md:left-1/2 top-1/2 md:-translate-x-1/2 -translate-y-1/2';
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
@@ -97,40 +97,40 @@ const EdsModal = class {
|
|
|
97
97
|
// Generate a unique id for the title so we can reference it for aria-labelledby.
|
|
98
98
|
const titleId = `modal-title-${this.el.tagName.toLowerCase()}`;
|
|
99
99
|
return h("div", {
|
|
100
|
-
key: '
|
|
100
|
+
key: 'eb2b985e84912dabea52a9a62eb908087004c958',
|
|
101
101
|
id: "eds-modal",
|
|
102
|
-
class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-
|
|
102
|
+
class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-9999999 flex`,
|
|
103
103
|
role: "dialog",
|
|
104
104
|
"aria-modal": "true",
|
|
105
105
|
"aria-labelledby": titleId
|
|
106
106
|
}, this.isOpen && h("div", {
|
|
107
|
-
key: '
|
|
107
|
+
key: 'ad47334539d1a8a8694f34ba1e90a38b7dce07ab',
|
|
108
108
|
class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
109
109
|
,
|
|
110
110
|
|
|
111
111
|
onClick: () => this.close()
|
|
112
112
|
}), h("div", {
|
|
113
|
-
key: '
|
|
113
|
+
key: '69d449b6ec986b5cfd73e50cc060363236035915',
|
|
114
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
115
|
}, h("div", {
|
|
116
|
-
key: '
|
|
116
|
+
key: '17395806ef17a06b5465174055087178db9f5356',
|
|
117
117
|
class: "flex justify-between items-center border-b-2 border-softer pb-8"
|
|
118
118
|
}, h("span", {
|
|
119
|
-
key: '
|
|
119
|
+
key: 'daa5d63b73eab57b9b58ca06d0197f1a7002ca15',
|
|
120
120
|
id: titleId,
|
|
121
121
|
class: `f-heading-04 text-lighter ${this.getTruncateClass()}`
|
|
122
122
|
}, this.title), h("eds-button", {
|
|
123
|
-
key: '
|
|
123
|
+
key: '267ee7d1f10819c19af5eed6715465f2ba5f4831',
|
|
124
124
|
intent: "tertiary",
|
|
125
125
|
icon: "close",
|
|
126
126
|
"aria-label": "Close modal",
|
|
127
127
|
onClick: () => this.close(),
|
|
128
128
|
"extra-class": "ml-8"
|
|
129
129
|
})), h("div", {
|
|
130
|
-
key: '
|
|
130
|
+
key: 'fbd3351c851ab1089035117cca2b3ad769c26d18',
|
|
131
131
|
class: "pt-8"
|
|
132
132
|
}, h("slot", {
|
|
133
|
-
key: '
|
|
133
|
+
key: '9958a61e24320183bef12aef381791f11e421597'
|
|
134
134
|
}))));
|
|
135
135
|
}
|
|
136
136
|
get el() {
|