@ebrains/react 0.6.0-alpha.0 → 0.7.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/color-primary-palette_6.entry.esm.js +106 -106
- package/correct-use-of-colors.entry.esm.js +33 -33
- package/eds-accordion_22.entry.esm.js +269 -0
- package/eds-app-root.entry.esm.js +53 -0
- package/eds-avatar_4.entry.esm.js +185 -0
- package/eds-breadcrumb.entry.esm.js +4 -15
- package/eds-card-generic.entry.esm.js +114 -0
- package/eds-card-section.entry.esm.js +56 -0
- package/eds-components-section.entry.esm.js +1 -1
- package/eds-cookies-preference.entry.esm.js +2 -2
- 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 → eds-dropdown.entry.esm.js} +19 -98
- package/eds-feedback.entry.esm.js +82 -0
- package/eds-form.entry.esm.js +253 -253
- package/eds-frame.entry.esm.js +34 -33
- 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-star.entry.esm.js +21 -0
- package/eds-icon-success.entry.esm.js +1 -1
- package/eds-icon-thumbs-down.entry.esm.js +21 -0
- package/eds-icon-thumbs-up.entry.esm.js +21 -0
- 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/{keycloak-d502ec16.esm.js → eds-login_2.entry.esm.js} +172 -1
- package/eds-logo-variations.entry.esm.js +1 -1
- package/eds-modal.entry.esm.js +22 -9
- package/eds-progress-bar.entry.esm.js +2 -2
- package/eds-rating.entry.esm.js +37 -37
- package/eds-section-core_2.entry.esm.js +5 -5
- package/eds-spinner.entry.esm.js +67 -0
- package/eds-steps.entry.esm.js +8 -17
- package/eds-svg-repository.entry.esm.js +8 -2
- package/eds-switch.entry.esm.js +5 -5
- package/eds-tabs.entry.esm.js +14 -26
- package/eds-timeline.entry.esm.js +6 -23
- package/eds-toast-manager.entry.esm.js +62 -0
- package/eds-toast.entry.esm.js +92 -0
- package/eds-tooltip.entry.esm.js +3 -3
- package/eds-trl.entry.esm.js +2 -2
- package/eds-user.entry.esm.js +64 -87
- package/eds-vertical-stepper.entry.esm.js +5 -5
- package/formUtils-ac68474d.esm.js +247 -0
- package/incorrect-use-of-colors.entry.esm.js +7 -7
- package/index.esm.js +1 -1
- package/index.esm2.js +46 -46
- 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/sharedUtils-a550989c.esm.js +17 -0
- package/src/components.d.ts +4 -1
- package/star-0da9b5e9.esm.js +5 -0
- package/thumbs-down-a18fd049.esm.js +5 -0
- package/thumbs-up-c19a71bc.esm.js +6 -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/eds-accordion_13.entry.esm.js +0 -1064
- package/eds-block-break.entry.esm.js +0 -22
- package/eds-footer.entry.esm.js +0 -102
- package/eds-fullscreen-menu.entry.esm.js +0 -143
- package/eds-header.entry.esm.js +0 -130
- package/eds-input_7.entry.esm.js +0 -529
- package/eds-link.entry.esm.js +0 -204
- package/eds-login.entry.esm.js +0 -97
- package/eds-logo.entry.esm.js +0 -87
- package/eds-navigator.entry.esm.js +0 -72
- package/eds-pagination_2.entry.esm.js +0 -472
- package/eds-social-networks.entry.esm.js +0 -74
- package/eds-tab.entry.esm.js +0 -41
- package/eds-tabs-content.entry.esm.js +0 -145
package/eds-frame.entry.esm.js
CHANGED
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react-dom';
|
|
5
5
|
|
|
6
|
+
const edsFrameCss = ".bg-inverse{background-color:var(--white)}.min-h-156{min-height:156px}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:12px}.border-soft{border-color:rgba(0, 0, 0, .15 )}.border-softer{border-color:rgba(0, 0, 0, .1 )}.border-softest{border-color:rgba(0, 0, 0, .05 )}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.flex{display:flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.border-2{border-width:2px}.w-full{width:100%}.h-full{height:100%}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.items-center{align-items:center}.justify-between{justify-content:space-between}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.px-12{padding-left:0.75rem;padding-right:0.75rem}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.ml-auto{margin-left:auto}.border-t-2{border-top-width:2px}.border{border:1px solid rgba(0, 0, 0, .1 )}.border-2{border:1px solid rgba(0, 0, 0, .1 )}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}.mt-16{margin-top:1rem}";
|
|
7
|
+
const EdsFrameStyle0 = edsFrameCss;
|
|
6
8
|
const EdsFrame = class {
|
|
7
9
|
constructor(hostRef) {
|
|
8
10
|
registerInstance(this, hostRef);
|
|
@@ -12,13 +14,36 @@ const EdsFrame = class {
|
|
|
12
14
|
this.storybookUrl = undefined;
|
|
13
15
|
this.storyPath = undefined;
|
|
14
16
|
this.intent = 'strong';
|
|
15
|
-
this.tiny = false;
|
|
16
17
|
this.size = 'auto';
|
|
17
|
-
this.bg = true;
|
|
18
18
|
this.iframeError = false;
|
|
19
19
|
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
this.checkIframeAvailability();
|
|
22
|
+
}
|
|
23
|
+
componentDidLoad() {
|
|
24
|
+
// Emit context for each eds-link element after the component is fully loaded
|
|
25
|
+
const links = this.el.querySelectorAll('eds-link');
|
|
26
|
+
links.forEach(link => {
|
|
27
|
+
this.emitContext(link);
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Emits a custom event called `parentContext` for a given link element.
|
|
32
|
+
* This event provides context information about the breadcrumb component.
|
|
33
|
+
*
|
|
34
|
+
* @param linkElement - The link element to which the event will be dispatched.
|
|
35
|
+
*/
|
|
36
|
+
emitContext(linkElement) {
|
|
37
|
+
const event = new CustomEvent('parentContext', {
|
|
38
|
+
detail: {
|
|
39
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
40
|
+
identifier: this.frameLabel
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
linkElement.dispatchEvent(event);
|
|
44
|
+
}
|
|
20
45
|
articleClasses() {
|
|
21
|
-
return [
|
|
46
|
+
return ['bg-inverse min-h-156 rounded border-softer effect-focus-within relative flex grow flex-col border-2', 'w-full h-full'].join(' ');
|
|
22
47
|
}
|
|
23
48
|
getFrameHeight() {
|
|
24
49
|
switch (this.size) {
|
|
@@ -46,31 +71,6 @@ const EdsFrame = class {
|
|
|
46
71
|
this.iframeError = true;
|
|
47
72
|
}
|
|
48
73
|
}
|
|
49
|
-
componentWillLoad() {
|
|
50
|
-
this.checkIframeAvailability();
|
|
51
|
-
}
|
|
52
|
-
componentDidLoad() {
|
|
53
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
54
|
-
const links = this.el.querySelectorAll('eds-link');
|
|
55
|
-
links.forEach(link => {
|
|
56
|
-
this.emitContext(link);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
61
|
-
* This event provides context information about the breadcrumb component.
|
|
62
|
-
*
|
|
63
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
64
|
-
*/
|
|
65
|
-
emitContext(linkElement) {
|
|
66
|
-
const event = new CustomEvent('parentContext', {
|
|
67
|
-
detail: {
|
|
68
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
69
|
-
identifier: this.frameLabel
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
linkElement.dispatchEvent(event);
|
|
73
|
-
}
|
|
74
74
|
get storyLink() {
|
|
75
75
|
return `${this.storybookUrl}/?path=/story/${this.storyPath}`;
|
|
76
76
|
}
|
|
@@ -79,13 +79,13 @@ const EdsFrame = class {
|
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
81
|
return h("div", {
|
|
82
|
-
key: '
|
|
82
|
+
key: 'e4b72fab30dcf1eeee6fdf3c63719599eafedb6d',
|
|
83
83
|
class: this.articleClasses()
|
|
84
84
|
}, h("div", {
|
|
85
|
-
key: '
|
|
85
|
+
key: 'f8643db32120c14dd18b3d44ae530a83e81e59e0',
|
|
86
86
|
class: "effect-height flex items-center justify-between py-8 px-12"
|
|
87
87
|
}, h("span", {
|
|
88
|
-
key: '
|
|
88
|
+
key: '7b40c644e142e6a6356e4d6a683b9c1c57104f5d',
|
|
89
89
|
class: "f-ui-02"
|
|
90
90
|
}, this.frameLabel), !this.iframeError ? h("eds-link", {
|
|
91
91
|
label: this.urlLabel,
|
|
@@ -96,8 +96,8 @@ const EdsFrame = class {
|
|
|
96
96
|
disabled: false,
|
|
97
97
|
icon: "arrow-diagonal"
|
|
98
98
|
}) : null), h("div", {
|
|
99
|
-
key: '
|
|
100
|
-
class: "border-softer
|
|
99
|
+
key: '8a1fe80134dadd38d113968ad0c825a6f9426921',
|
|
100
|
+
class: "border-softer"
|
|
101
101
|
}, this.iframeError ? h("div", {
|
|
102
102
|
class: "container ml-8 mr-8 mt-16"
|
|
103
103
|
}, this.errorMessage) : h("iframe", {
|
|
@@ -113,5 +113,6 @@ const EdsFrame = class {
|
|
|
113
113
|
return getElement(this);
|
|
114
114
|
}
|
|
115
115
|
};
|
|
116
|
+
EdsFrame.style = EdsFrameStyle0;
|
|
116
117
|
|
|
117
118
|
export { EdsFrame as eds_frame };
|
package/eds-icon-eu.entry.esm.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { s as star } from './star-0da9b5e9.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconStar = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'cb31d12146ff577195650b502f51005092404a30',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: star
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconStar as eds_icon_star };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { t as thumbsDown } from './thumbs-down-a18fd049.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconThumbsDown = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: '62cee210c76ea8c63367ad8ab9a9322707c933fd',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: thumbsDown
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconThumbsDown as eds_icon_thumbs_down };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
+
import { t as thumbsUp } from './thumbs-up-c19a71bc.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
7
|
+
const EdsIconThumbsUp = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.class = '';
|
|
11
|
+
}
|
|
12
|
+
render() {
|
|
13
|
+
return h("span", {
|
|
14
|
+
key: 'f72d46f6685d3251254eaa0a2c2ce8aaca177a2e',
|
|
15
|
+
class: this.class,
|
|
16
|
+
innerHTML: thumbsUp
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export { EdsIconThumbsUp as eds_icon_thumbs_up };
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index.esm2.js';
|
|
2
|
+
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react-dom';
|
|
6
|
+
|
|
1
7
|
/*
|
|
2
8
|
* Copyright 2016 Red Hat, Inc. and/or its affiliates
|
|
3
9
|
* and other contributors as indicated by the @author tags.
|
|
@@ -1641,5 +1647,170 @@ async function checkServerAvailability(url) {
|
|
|
1641
1647
|
return false;
|
|
1642
1648
|
}
|
|
1643
1649
|
}
|
|
1650
|
+
const EdsLogin = class {
|
|
1651
|
+
constructor(hostRef) {
|
|
1652
|
+
registerInstance(this, hostRef);
|
|
1653
|
+
this.keycloak = createEvent(this, "keycloak", 7);
|
|
1654
|
+
this.auth = createEvent(this, "auth", 7);
|
|
1655
|
+
/**
|
|
1656
|
+
* Handles user login by invoking the Keycloak `login` function.
|
|
1657
|
+
* Only triggers login if the user is not already authenticated.
|
|
1658
|
+
*/
|
|
1659
|
+
this.handleLogin = async () => {
|
|
1660
|
+
if (!this.authenticated) {
|
|
1661
|
+
try {
|
|
1662
|
+
await login();
|
|
1663
|
+
} catch (error) {
|
|
1664
|
+
toast.show(error.message, 'error');
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
};
|
|
1668
|
+
/**
|
|
1669
|
+
* Handles user logout by invoking the Keycloak `logout` function.
|
|
1670
|
+
* Resets the `authenticated` state to `false` after logout.
|
|
1671
|
+
*/
|
|
1672
|
+
this.handleLogout = async () => {
|
|
1673
|
+
try {
|
|
1674
|
+
await logout();
|
|
1675
|
+
} catch (error) {
|
|
1676
|
+
toast.show(error.message, 'error');
|
|
1677
|
+
}
|
|
1678
|
+
this.authenticated = false;
|
|
1679
|
+
this.user = null;
|
|
1680
|
+
};
|
|
1681
|
+
this.keycloakUrl = undefined;
|
|
1682
|
+
this.keycloakRealm = undefined;
|
|
1683
|
+
this.keycloakClientId = undefined;
|
|
1684
|
+
this.authenticated = false;
|
|
1685
|
+
this.user = null;
|
|
1686
|
+
this.serverAvailable = false;
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* Lifecycle method that runs when the component is about to load.
|
|
1690
|
+
* It initializes authentication by calling the `initAuth` method.
|
|
1691
|
+
*/
|
|
1692
|
+
async componentWillLoad() {
|
|
1693
|
+
// Check if required props are provided (optional check)
|
|
1694
|
+
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
1695
|
+
// eslint-disable-next-line
|
|
1696
|
+
console.error('Keycloak configuration props are missing.');
|
|
1697
|
+
return;
|
|
1698
|
+
}
|
|
1699
|
+
this.serverAvailable = await checkServerAvailability(`${this.keycloakUrl}/realms/${this.keycloakRealm}`);
|
|
1700
|
+
if (!this.serverAvailable) {
|
|
1701
|
+
toast.show('Keycloak server is unavailable.', 'error');
|
|
1702
|
+
return; // Do not proceed further
|
|
1703
|
+
}
|
|
1704
|
+
await this.initAuth();
|
|
1705
|
+
}
|
|
1706
|
+
/**
|
|
1707
|
+
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
1708
|
+
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
1709
|
+
* Emits `authStatusChanged` event with the authentication status.
|
|
1710
|
+
*/
|
|
1711
|
+
async initAuth() {
|
|
1712
|
+
try {
|
|
1713
|
+
const res = await initKeycloak({
|
|
1714
|
+
url: this.keycloakUrl,
|
|
1715
|
+
realm: this.keycloakRealm,
|
|
1716
|
+
clientId: this.keycloakClientId
|
|
1717
|
+
}, true);
|
|
1718
|
+
this.keycloak.emit({
|
|
1719
|
+
init: res
|
|
1720
|
+
});
|
|
1721
|
+
if (isAuthenticated()) {
|
|
1722
|
+
this.user = getUser();
|
|
1723
|
+
this.authenticated = true;
|
|
1724
|
+
this.auth.emit({
|
|
1725
|
+
authenticated: this.authenticated,
|
|
1726
|
+
user: this.user
|
|
1727
|
+
}); // Emit auth status change
|
|
1728
|
+
}
|
|
1729
|
+
} catch (error) {
|
|
1730
|
+
toast.show(error.message, 'error');
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
render() {
|
|
1734
|
+
return h("div", {
|
|
1735
|
+
key: '074566b791eeb9ea4a0558b4ed83a96e4b673356',
|
|
1736
|
+
class: "block"
|
|
1737
|
+
}, !this.authenticated && h("eds-button", {
|
|
1738
|
+
key: '3a05ff97a90d73204eb77c5dad0d328294d72d3e',
|
|
1739
|
+
label: "Login",
|
|
1740
|
+
intent: "primary",
|
|
1741
|
+
"extra-class": "text-default",
|
|
1742
|
+
"aria-label": "Login",
|
|
1743
|
+
triggerClick: this.handleLogin.bind(this)
|
|
1744
|
+
}));
|
|
1745
|
+
}
|
|
1746
|
+
};
|
|
1747
|
+
const edsSplashScreenCss = ".splash-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999999;background-color:var(--grey-200);display:flex;flex-direction:column;align-items:center;justify-content:center}.logo-container{width:200px;height:200px;margin-bottom:1rem}.content-container{position:relative;width:5rem;height:5rem;display:flex;align-items:center;justify-content:center}";
|
|
1748
|
+
const EdsSplashScreenStyle0 = edsSplashScreenCss;
|
|
1749
|
+
const EdsSplashScreen = class {
|
|
1750
|
+
constructor(hostRef) {
|
|
1751
|
+
registerInstance(this, hostRef);
|
|
1752
|
+
this.splash = createEvent(this, "splash", 7);
|
|
1753
|
+
this.inverse = false;
|
|
1754
|
+
this.initPromise = undefined;
|
|
1755
|
+
this.isVisible = true;
|
|
1756
|
+
}
|
|
1757
|
+
componentWillLoad() {
|
|
1758
|
+
// If an initialization promise is provided, wait for it.
|
|
1759
|
+
if (this.initPromise) {
|
|
1760
|
+
this.initPromise.then(() => {
|
|
1761
|
+
// eslint-disable-next-line
|
|
1762
|
+
console.log('Promises resolved');
|
|
1763
|
+
this.hideSplash();
|
|
1764
|
+
}).catch(error => {
|
|
1765
|
+
// eslint-disable-next-line
|
|
1766
|
+
console.error('Initialization error:', error);
|
|
1767
|
+
this.splash.emit({
|
|
1768
|
+
type: 'error',
|
|
1769
|
+
message: error.message || 'Unknown error'
|
|
1770
|
+
});
|
|
1771
|
+
//this.hideSplash();
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
handleHideSplash() {
|
|
1776
|
+
this.hideSplash();
|
|
1777
|
+
}
|
|
1778
|
+
hideSplash() {
|
|
1779
|
+
this.isVisible = false;
|
|
1780
|
+
this.splash.emit({
|
|
1781
|
+
type: 'hidden',
|
|
1782
|
+
message: 'Splash screen hidden successfully'
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
render() {
|
|
1786
|
+
if (!this.isVisible) {
|
|
1787
|
+
return null;
|
|
1788
|
+
}
|
|
1789
|
+
return h(Host, null, h("div", {
|
|
1790
|
+
class: "splash-overlay",
|
|
1791
|
+
style: {
|
|
1792
|
+
background: this.inverse ? 'black' : 'var(--grey-200)'
|
|
1793
|
+
}
|
|
1794
|
+
}, h("div", {
|
|
1795
|
+
class: "logo-container"
|
|
1796
|
+
}, this.inverse ? h("eds-logo", {
|
|
1797
|
+
orientation: "vertical",
|
|
1798
|
+
type: "color-white"
|
|
1799
|
+
}) : h("eds-logo", {
|
|
1800
|
+
orientation: "vertical",
|
|
1801
|
+
type: "color"
|
|
1802
|
+
})), h("div", {
|
|
1803
|
+
class: "content-container"
|
|
1804
|
+
}, h("eds-spinner", {
|
|
1805
|
+
size: "1rem",
|
|
1806
|
+
thickness: "3px",
|
|
1807
|
+
"border-color": "var(--grey-400)",
|
|
1808
|
+
"bottom-color": "var(--grey-900)",
|
|
1809
|
+
background: "none",
|
|
1810
|
+
fullscreen: false
|
|
1811
|
+
}))));
|
|
1812
|
+
}
|
|
1813
|
+
};
|
|
1814
|
+
EdsSplashScreen.style = EdsSplashScreenStyle0;
|
|
1644
1815
|
|
|
1645
|
-
export {
|
|
1816
|
+
export { EdsLogin as eds_login, EdsSplashScreen as eds_splash_screen };
|
package/eds-modal.entry.esm.js
CHANGED
|
@@ -73,6 +73,18 @@ const EdsModal = class {
|
|
|
73
73
|
async toggle() {
|
|
74
74
|
this.isOpen = !this.isOpen;
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Listens for global custom events to open the modal.
|
|
78
|
+
*/
|
|
79
|
+
handleGlobalOpen() {
|
|
80
|
+
this.open();
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Listens for global custom events to close the modal.
|
|
84
|
+
*/
|
|
85
|
+
handleGlobalClose() {
|
|
86
|
+
this.close();
|
|
87
|
+
}
|
|
76
88
|
/**
|
|
77
89
|
* Closes the modal when the Escape key is pressed.
|
|
78
90
|
*/
|
|
@@ -85,39 +97,40 @@ const EdsModal = class {
|
|
|
85
97
|
// Generate a unique id for the title so we can reference it for aria-labelledby.
|
|
86
98
|
const titleId = `modal-title-${this.el.tagName.toLowerCase()}`;
|
|
87
99
|
return h("div", {
|
|
88
|
-
key: '
|
|
100
|
+
key: '980f396b79c32a36005b5f7813cc52b2e97457fa',
|
|
101
|
+
id: "eds-modal",
|
|
89
102
|
class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex`,
|
|
90
103
|
role: "dialog",
|
|
91
104
|
"aria-modal": "true",
|
|
92
105
|
"aria-labelledby": titleId
|
|
93
106
|
}, this.isOpen && h("div", {
|
|
94
|
-
key: '
|
|
107
|
+
key: 'a2e4bb022c17c66266809f1a8dd706523a6ff07b',
|
|
95
108
|
class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
|
|
96
109
|
,
|
|
97
110
|
|
|
98
111
|
onClick: () => this.close()
|
|
99
112
|
}), h("div", {
|
|
100
|
-
key: '
|
|
101
|
-
class: `max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center`
|
|
113
|
+
key: '53c0c2a9559a6a5116f88caa2a7d92810560521e',
|
|
114
|
+
class: `container max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center`
|
|
102
115
|
}, h("div", {
|
|
103
|
-
key: '
|
|
116
|
+
key: '576b58f6bd78a969436c6a892f4dfec84a486cc4',
|
|
104
117
|
class: "flex justify-between items-center border-b-2 border-softer pb-8"
|
|
105
118
|
}, h("span", {
|
|
106
|
-
key: '
|
|
119
|
+
key: '63e682d4297a346426dc7559cf0d80e21cc51f4c',
|
|
107
120
|
id: titleId,
|
|
108
121
|
class: `f-heading-04 text-lighter ${this.getTruncateClass()}`
|
|
109
122
|
}, this.title), h("eds-button", {
|
|
110
|
-
key: '
|
|
123
|
+
key: 'eed35b30903d65694f2944431e7f387a8ef3f3e9',
|
|
111
124
|
intent: "tertiary",
|
|
112
125
|
icon: "close",
|
|
113
126
|
"aria-label": "Close modal",
|
|
114
127
|
onClick: () => this.close(),
|
|
115
128
|
"extra-class": "ml-8"
|
|
116
129
|
})), h("div", {
|
|
117
|
-
key: '
|
|
130
|
+
key: '6c6e673640ed2ef2ae6139ae1931a4b0a0db9aa9',
|
|
118
131
|
class: "pt-8"
|
|
119
132
|
}, h("slot", {
|
|
120
|
-
key: '
|
|
133
|
+
key: 'eaaf2c17470681dc799b74f5eaebbe2496564c0e'
|
|
121
134
|
}))));
|
|
122
135
|
}
|
|
123
136
|
get el() {
|