@ebrains/react 0.9.1-beta → 0.9.2-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/.babelrc +12 -0
- package/package.json +2 -6
- package/project.json +10 -0
- package/rollup.config.js +43 -0
- package/src/components.ts +49 -0
- package/src/generated/components.ts +47 -0
- package/src/generated/react-component-lib/attachProps.ts +125 -0
- package/src/generated/react-component-lib/case.ts +7 -0
- package/src/generated/react-component-lib/createComponent.tsx +106 -0
- package/src/generated/react-component-lib/createOverlayComponent.tsx +142 -0
- package/src/generated/react-component-lib/dev.ts +14 -0
- package/src/generated/react-component-lib/index.tsx +50 -0
- package/src/generated/react-component-lib/interfaces.ts +34 -0
- package/src/generated/react-component-lib/utils/attachProps.ts +125 -0
- package/src/generated/react-component-lib/utils/case.ts +7 -0
- package/src/generated/react-component-lib/utils/dev.ts +14 -0
- package/src/generated/react-component-lib/utils/index.tsx +50 -0
- package/src/react-component-lib/attachProps.ts +125 -0
- package/src/react-component-lib/case.ts +7 -0
- package/src/react-component-lib/createComponent.tsx +106 -0
- package/src/react-component-lib/createOverlayComponent.tsx +142 -0
- package/src/react-component-lib/dev.ts +14 -0
- package/src/react-component-lib/index.tsx +50 -0
- package/src/react-component-lib/interfaces.ts +34 -0
- package/src/react-component-lib/utils/attachProps.ts +125 -0
- package/src/react-component-lib/utils/case.ts +7 -0
- package/src/react-component-lib/utils/index.tsx +50 -0
- package/tsconfig.json +17 -0
- package/tsconfig.lib.json +23 -0
- package/analytics-44b1416b.esm.js +0 -55
- package/arrow-diagonal-black-8f0494c3.esm.js +0 -3
- package/arrow-right-9322ba8a.esm.js +0 -5
- package/bluesky-cc5edd2d.esm.js +0 -14
- package/bookmark-c200037c.esm.js +0 -16
- package/chevron-down-6144c823.esm.js +0 -12
- package/chevron-left-ca6c66e1.esm.js +0 -11
- package/chevron-right-b88ed2d4.esm.js +0 -5
- package/chevron-up-c66bd477.esm.js +0 -12
- package/close-87fc0d63.esm.js +0 -5
- package/color-2554aad6.esm.js +0 -122
- package/color-primary-palette_6.entry.esm.js +0 -778
- package/components-section.entry.esm.js +0 -165
- package/copy-03b72cb6.esm.js +0 -5
- package/correct-use-of-colors.entry.esm.js +0 -243
- package/docs-palettes.entry.esm.js +0 -29
- package/docs-tokens.entry.esm.js +0 -45
- package/eds-accordion.entry.esm.js +0 -132
- package/eds-alert.entry.esm.js +0 -112
- package/eds-app-root.entry.esm.js +0 -53
- package/eds-avatar_26.entry.esm.js +0 -306
- package/eds-card-desc_2.entry.esm.js +0 -86
- package/eds-card-generic.entry.esm.js +0 -114
- package/eds-card-project.entry.esm.js +0 -93
- package/eds-card-section.entry.esm.js +0 -56
- package/eds-card-tags.entry.esm.js +0 -27
- package/eds-card-tool.entry.esm.js +0 -105
- package/eds-card-wrapper.entry.esm.js +0 -39
- package/eds-code-block.entry.esm.js +0 -2290
- package/eds-cookies-preference.entry.esm.js +0 -47
- package/eds-feedback.entry.esm.js +0 -82
- package/eds-frame.entry.esm.js +0 -112
- package/eds-icon-arrow-diagonal.entry.esm.js +0 -21
- package/eds-icon-arrow-right.entry.esm.js +0 -21
- package/eds-icon-bluesky.entry.esm.js +0 -21
- package/eds-icon-bookmark.entry.esm.js +0 -21
- package/eds-icon-chevron-down.entry.esm.js +0 -21
- package/eds-icon-chevron-left.entry.esm.js +0 -21
- package/eds-icon-chevron-right.entry.esm.js +0 -21
- package/eds-icon-chevron-up.entry.esm.js +0 -21
- package/eds-icon-close.entry.esm.js +0 -21
- package/eds-icon-copy.entry.esm.js +0 -21
- package/eds-icon-eu.entry.esm.js +0 -21
- package/eds-icon-external.entry.esm.js +0 -21
- package/eds-icon-facebook.entry.esm.js +0 -21
- package/eds-icon-gitlab.entry.esm.js +0 -21
- package/eds-icon-linkedin.entry.esm.js +0 -21
- package/eds-icon-loader.entry.esm.js +0 -21
- package/eds-icon-mastodon.entry.esm.js +0 -21
- package/eds-icon-menu.entry.esm.js +0 -21
- package/eds-icon-minus.entry.esm.js +0 -21
- package/eds-icon-more.entry.esm.js +0 -21
- package/eds-icon-paper.entry.esm.js +0 -21
- package/eds-icon-plus.entry.esm.js +0 -21
- package/eds-icon-portal.entry.esm.js +0 -21
- package/eds-icon-private.entry.esm.js +0 -21
- package/eds-icon-public.entry.esm.js +0 -21
- package/eds-icon-search.entry.esm.js +0 -21
- package/eds-icon-star.entry.esm.js +0 -21
- package/eds-icon-success.entry.esm.js +0 -21
- package/eds-icon-thumbs-down.entry.esm.js +0 -21
- package/eds-icon-thumbs-up.entry.esm.js +0 -21
- package/eds-icon-tutorial.entry.esm.js +0 -21
- package/eds-icon-twitter.entry.esm.js +0 -21
- package/eds-icon-unknown.entry.esm.js +0 -21
- package/eds-icon-updown.entry.esm.js +0 -21
- package/eds-icon-user.entry.esm.js +0 -21
- package/eds-icon-youtube.entry.esm.js +0 -21
- package/eds-login_2.entry.esm.js +0 -1828
- package/eds-matomo-notice.entry.esm.js +0 -162
- package/eds-modal.entry.esm.js +0 -142
- package/eds-pagination_2.entry.esm.js +0 -493
- package/eds-progress-bar.entry.esm.js +0 -41
- package/eds-rating.entry.esm.js +0 -79
- package/eds-section-core_2.entry.esm.js +0 -69
- package/eds-spinner.entry.esm.js +0 -67
- package/eds-switch.entry.esm.js +0 -58
- package/eds-tabs.entry.esm.js +0 -143
- package/eds-timeline.entry.esm.js +0 -117
- package/eds-toast-manager.entry.esm.js +0 -62
- package/eds-toast.entry.esm.js +0 -92
- package/eds-tooltip.entry.esm.js +0 -125
- package/eds-trl.entry.esm.js +0 -68
- package/eu-9ddde93a.esm.js +0 -30
- package/facebook-9cb5c17f.esm.js +0 -14
- package/incorrect-use-of-colors.entry.esm.js +0 -71
- package/index-39c58238.esm.js +0 -58
- package/index.esm.d.ts +0 -1
- package/index.esm.js +0 -4
- package/index.esm2.js +0 -4836
- package/linkedin-e8650abb.esm.js +0 -28
- package/loader-c9628637.esm.js +0 -30
- package/logo-color-7f1fd803.esm.js +0 -115
- package/logo-color-margins-ff8ce71b.esm.js +0 -118
- package/logo-space.entry.esm.js +0 -48
- package/logo-variations-horizontal_2.entry.esm.js +0 -123
- package/logo-variations-tabs.entry.esm.js +0 -29
- package/logo-white-no-bg-f382f86f.esm.js +0 -1021
- package/logo-wrong-usage.entry.esm.js +0 -101
- package/mastodon-3703ec61.esm.js +0 -14
- package/menu-340ea948.esm.js +0 -11
- package/minus-b30a7c71.esm.js +0 -11
- package/mono-53f70232.esm.js +0 -11
- package/more-4449d549.esm.js +0 -13
- package/paper-8e74ea31.esm.js +0 -15
- package/plus-89c07be2.esm.js +0 -12
- package/portal-d6c8ce56.esm.js +0 -18
- package/private-1c25ff8e.esm.js +0 -25
- package/public-d4d8c585.esm.js +0 -16
- package/search-fbcd79c2.esm.js +0 -12
- package/sharedUtils-a550989c.esm.js +0 -17
- package/src/components.d.ts +0 -40
- package/src/generated/components.d.ts +0 -38
- package/src/generated/react-component-lib/attachProps.d.ts +0 -16
- package/src/generated/react-component-lib/case.d.ts +0 -2
- package/src/generated/react-component-lib/createComponent.d.ts +0 -10
- package/src/generated/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/src/generated/react-component-lib/dev.d.ts +0 -2
- package/src/generated/react-component-lib/interfaces.d.ts +0 -29
- package/src/generated/react-component-lib/utils/attachProps.d.ts +0 -16
- package/src/generated/react-component-lib/utils/case.d.ts +0 -2
- package/src/generated/react-component-lib/utils/dev.d.ts +0 -2
- package/src/generated/react-component-lib/utils/index.d.ts +0 -10
- package/src/react-component-lib/attachProps.d.ts +0 -16
- package/src/react-component-lib/case.d.ts +0 -2
- package/src/react-component-lib/createComponent.d.ts +0 -10
- package/src/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/src/react-component-lib/dev.d.ts +0 -2
- package/src/react-component-lib/interfaces.d.ts +0 -29
- package/src/react-component-lib/utils/attachProps.d.ts +0 -16
- package/src/react-component-lib/utils/case.d.ts +0 -2
- package/src/react-component-lib/utils/index.d.ts +0 -10
- package/star-0da9b5e9.esm.js +0 -5
- package/success-443809da.esm.js +0 -18
- package/svg-repository.entry.esm.js +0 -337
- package/thumbs-down-a18fd049.esm.js +0 -5
- package/thumbs-up-c19a71bc.esm.js +0 -6
- package/toastManager-d9eee791.esm.js +0 -34
- package/token-list_3.entry.esm.js +0 -385
- package/token-ratios.entry.esm.js +0 -49
- package/token-typography.entry.esm.js +0 -267
- package/tutotial-150ee1fd.esm.js +0 -27
- package/twitter-ac21b505.esm.js +0 -14
- package/unknown-ed01a24c.esm.js +0 -22
- package/up-and-down-d747abee.esm.js +0 -12
- package/user-71ebdc15.esm.js +0 -16
- package/youtube-efbfbdc4.esm.js +0 -14
- /package/src/generated/react-component-lib/{index.d.ts → index.ts} +0 -0
- /package/src/{index.d.ts → index.ts} +0 -0
- /package/src/react-component-lib/{index.d.ts → index.ts} +0 -0
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { t as toast } from './toastManager-d9eee791.esm.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react-dom';
|
|
6
|
-
|
|
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
|
-
const EdsToastManagerStyle0 = edsToastManagerCss;
|
|
9
|
-
const EdsToastManager = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.toastId = 0;
|
|
13
|
-
this.toasts = [];
|
|
14
|
-
}
|
|
15
|
-
connectedCallback() {
|
|
16
|
-
// Initialize the ToastManager singleton with this element
|
|
17
|
-
toast.init(this.hostElement);
|
|
18
|
-
// Listen for custom events
|
|
19
|
-
this.hostElement.addEventListener('show-toast', event => {
|
|
20
|
-
const {
|
|
21
|
-
message,
|
|
22
|
-
intent
|
|
23
|
-
} = event.detail;
|
|
24
|
-
this.addToast(message, intent);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Adds a new toast.
|
|
29
|
-
*/
|
|
30
|
-
addToast(message, intent) {
|
|
31
|
-
const id = this.toastId++;
|
|
32
|
-
this.toasts = [...this.toasts, {
|
|
33
|
-
id,
|
|
34
|
-
message,
|
|
35
|
-
intent
|
|
36
|
-
}];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Removes a toast by ID.
|
|
40
|
-
*/
|
|
41
|
-
removeToast(id) {
|
|
42
|
-
this.toasts = this.toasts.filter(t => t.id !== id);
|
|
43
|
-
}
|
|
44
|
-
render() {
|
|
45
|
-
return h("div", {
|
|
46
|
-
key: '0ca6de02db6bd537c7efe007c898480d07f69bc6',
|
|
47
|
-
class: "toast-container"
|
|
48
|
-
}, this.toasts.map(t => h("div", {
|
|
49
|
-
key: t.id
|
|
50
|
-
}, h("eds-toast", {
|
|
51
|
-
message: t.message,
|
|
52
|
-
intent: t.intent,
|
|
53
|
-
onClick: () => this.removeToast(t.id)
|
|
54
|
-
}))));
|
|
55
|
-
}
|
|
56
|
-
get hostElement() {
|
|
57
|
-
return getElement(this);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
EdsToastManager.style = EdsToastManagerStyle0;
|
|
61
|
-
|
|
62
|
-
export { EdsToastManager as eds_toast_manager };
|
package/eds-toast.entry.esm.js
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { c as cva } from './index-39c58238.esm.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react-dom';
|
|
6
|
-
|
|
7
|
-
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)}";
|
|
8
|
-
const EdsToastStyle0 = edsToastCss;
|
|
9
|
-
const toastStyles = cva(['relative right-4 bottom-4 w-auto p-12 rounded-lg shadow-md'], {
|
|
10
|
-
variants: {
|
|
11
|
-
intent: {
|
|
12
|
-
default: 'bg-dark text-light',
|
|
13
|
-
success: 'bg-success text-dark',
|
|
14
|
-
error: 'bg-error text-light',
|
|
15
|
-
warning: 'bg-warning text-dark'
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
defaultVariants: {
|
|
19
|
-
intent: 'default'
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
const EdsToast = class {
|
|
23
|
-
constructor(hostRef) {
|
|
24
|
-
registerInstance(this, hostRef);
|
|
25
|
-
/**
|
|
26
|
-
* Dismisses the toast.
|
|
27
|
-
*/
|
|
28
|
-
this.dismissToast = () => {
|
|
29
|
-
this.visible = false;
|
|
30
|
-
};
|
|
31
|
-
this.message = undefined;
|
|
32
|
-
this.intent = 'default';
|
|
33
|
-
this.duration = 5000;
|
|
34
|
-
this.visible = true;
|
|
35
|
-
}
|
|
36
|
-
componentDidLoad() {
|
|
37
|
-
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
38
|
-
this.emitContext(btn);
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Emits a custom event called `parentContext` for a given button element.
|
|
42
|
-
* This event provides context information about the toast component.
|
|
43
|
-
*
|
|
44
|
-
* @param btnElement - The link element to which the event will be dispatched.
|
|
45
|
-
*/
|
|
46
|
-
emitContext(btnElement) {
|
|
47
|
-
const event = new CustomEvent('parentContext', {
|
|
48
|
-
detail: {
|
|
49
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
50
|
-
identifier: null
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
btnElement.dispatchEvent(event);
|
|
54
|
-
}
|
|
55
|
-
connectedCallback() {
|
|
56
|
-
// Auto-dismiss the toast after the specified duration
|
|
57
|
-
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
58
|
-
}
|
|
59
|
-
disconnectedCallback() {
|
|
60
|
-
// Clear the timeout when the component is removed
|
|
61
|
-
clearTimeout(this.dismissTimeout);
|
|
62
|
-
}
|
|
63
|
-
render() {
|
|
64
|
-
if (!this.visible) {
|
|
65
|
-
return null;
|
|
66
|
-
}
|
|
67
|
-
const classes = toastStyles({
|
|
68
|
-
intent: this.intent
|
|
69
|
-
});
|
|
70
|
-
return h("div", {
|
|
71
|
-
class: classes,
|
|
72
|
-
role: "alert",
|
|
73
|
-
"aria-live": "assertive"
|
|
74
|
-
}, h("div", {
|
|
75
|
-
class: "flex items-center justify-between gap-4"
|
|
76
|
-
}, h("span", {
|
|
77
|
-
class: "f-ui-01"
|
|
78
|
-
}, this.message), h("eds-button", {
|
|
79
|
-
intent: "tertiary",
|
|
80
|
-
icon: "close",
|
|
81
|
-
"aria-label": "Close Toast",
|
|
82
|
-
onClick: () => this.dismissToast(),
|
|
83
|
-
"extra-class": "ml-8"
|
|
84
|
-
})));
|
|
85
|
-
}
|
|
86
|
-
get el() {
|
|
87
|
-
return getElement(this);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
EdsToast.style = EdsToastStyle0;
|
|
91
|
-
|
|
92
|
-
export { EdsToast as eds_toast };
|
package/eds-tooltip.entry.esm.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index.esm2.js';
|
|
2
|
-
import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react/jsx-runtime';
|
|
5
|
-
import 'react-dom';
|
|
6
|
-
|
|
7
|
-
const edsTooltipCss = ".relative{position:relative}.absolute{position:absolute}.rounded-sm{border-radius:8px}.rounded-xs{border-radius:4px}.bg-stronger{background-color:var(--grey-900)}.bg-strongest{background-color:var(--black)}.text-inverse{color:var(--white)}.text-default{color:var(--black)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.pointer-events-none{pointer-events:none}.-top-8{top:-0.5rem}.left-1\\/2{left:50%}.z-10{z-index:10}.block{display:block}.-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))}.-translate-y-full{--tw-translate-y:-100%;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))}.whitespace-nowrap{white-space:nowrap}.py-2{padding-top:0.125rem;padding-bottom:0.125rem}.px-4{padding-left:0.25rem;padding-right:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.p-12{padding:0.75rem}.p-16{padding:1rem}.p-20{padding:1.25rem}";
|
|
8
|
-
const EdsTooltipStyle0 = edsTooltipCss;
|
|
9
|
-
const EdsTooltip = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
registerInstance(this, hostRef);
|
|
12
|
-
this.content = undefined;
|
|
13
|
-
this.position = 'above';
|
|
14
|
-
this.isVisible = false;
|
|
15
|
-
this.isPositioned = false;
|
|
16
|
-
this.tooltipStyle = {
|
|
17
|
-
top: '0px',
|
|
18
|
-
left: '0px',
|
|
19
|
-
transform: ''
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Show the tooltip and update its position.
|
|
24
|
-
*/
|
|
25
|
-
async showTooltip() {
|
|
26
|
-
var _a;
|
|
27
|
-
await this.updateTooltipPosition();
|
|
28
|
-
this.isPositioned = true;
|
|
29
|
-
this.isVisible = true;
|
|
30
|
-
sendAnalytics({
|
|
31
|
-
category: 'ui-component',
|
|
32
|
-
parentContext: null,
|
|
33
|
-
tag: this.el.tagName.toLowerCase(),
|
|
34
|
-
name: ((_a = this.content) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
35
|
-
action: 'hover'
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Hide the tooltip.
|
|
40
|
-
*/
|
|
41
|
-
hideTooltip() {
|
|
42
|
-
this.isVisible = false;
|
|
43
|
-
this.isPositioned = false; // Reset positioning when hiding
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Hide the tooltip when the `Escape` key is pressed.
|
|
47
|
-
*/
|
|
48
|
-
handleKeyPress(event) {
|
|
49
|
-
if (event.key === 'Escape') {
|
|
50
|
-
this.isVisible = false;
|
|
51
|
-
this.isPositioned = false; // Reset positioning when hiding
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Update the tooltip's position dynamically based on the slotted element's dimensions and position.
|
|
56
|
-
*/
|
|
57
|
-
updateTooltipPosition() {
|
|
58
|
-
var _a, _b;
|
|
59
|
-
const slotElement = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('slot');
|
|
60
|
-
if (!slotElement) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
const assignedNodes = (slotElement === null || slotElement === void 0 ? void 0 : slotElement.assignedNodes({
|
|
64
|
-
flatten: true
|
|
65
|
-
})) || [];
|
|
66
|
-
const targetElement = assignedNodes.find(node => node instanceof HTMLElement);
|
|
67
|
-
if (targetElement) {
|
|
68
|
-
const targetRect = targetElement.getBoundingClientRect();
|
|
69
|
-
const tooltipElement = (_b = this.el.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('[role="tooltip"]');
|
|
70
|
-
if (tooltipElement) {
|
|
71
|
-
const tooltipWidth = tooltipElement.offsetWidth;
|
|
72
|
-
const tooltipHeight = tooltipElement.offsetHeight;
|
|
73
|
-
// Calculate position based on the preferred `position` prop
|
|
74
|
-
let top = 0;
|
|
75
|
-
let left = 0;
|
|
76
|
-
switch (this.position) {
|
|
77
|
-
case 'above':
|
|
78
|
-
top = window.scrollY - tooltipHeight - 8; // Above with offset
|
|
79
|
-
left = targetRect.left + targetRect.width / 2 - tooltipWidth / 2; // Centered horizontally
|
|
80
|
-
break;
|
|
81
|
-
case 'below':
|
|
82
|
-
top = tooltipHeight - window.scrollY + 18; // Below with offset
|
|
83
|
-
left = targetRect.left + targetRect.width / 2 - tooltipWidth / 2; // Centered horizontally
|
|
84
|
-
break;
|
|
85
|
-
/*case 'left':
|
|
86
|
-
top = targetRect.top - window.scrollY + targetRect.height / 2 - tooltipHeight / 2; // Centered vertically
|
|
87
|
-
left = targetRect.left - tooltipWidth - 8; // To the left with offset
|
|
88
|
-
break;
|
|
89
|
-
case 'right':
|
|
90
|
-
top = targetRect.top - window.scrollY + targetRect.height / 2 - tooltipHeight / 2; // Centered vertically
|
|
91
|
-
left = targetRect.right + 8; // To the right with offset
|
|
92
|
-
break;*/
|
|
93
|
-
}
|
|
94
|
-
this.tooltipStyle = {
|
|
95
|
-
top: `${top}px`,
|
|
96
|
-
left: `${left}px`,
|
|
97
|
-
transform: 'translateX(0)' // No additional horizontal adjustment needed
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
render() {
|
|
103
|
-
return h("div", {
|
|
104
|
-
key: '61455282a8a27a420e571ddb0abd31b6761d12ff',
|
|
105
|
-
class: "relative"
|
|
106
|
-
}, h("slot", {
|
|
107
|
-
key: '8a29dd5f74c6a497111786fadcad766e410a1e34'
|
|
108
|
-
}), this.isVisible && this.isPositioned && this.content && h("div", {
|
|
109
|
-
key: '34e5eef506a0d203e898027275c96f2dc3d3bd92',
|
|
110
|
-
class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6",
|
|
111
|
-
role: "tooltip",
|
|
112
|
-
style: {
|
|
113
|
-
top: this.tooltipStyle.top,
|
|
114
|
-
left: this.tooltipStyle.left,
|
|
115
|
-
transform: this.tooltipStyle.transform
|
|
116
|
-
}
|
|
117
|
-
}, this.content));
|
|
118
|
-
}
|
|
119
|
-
get el() {
|
|
120
|
-
return getElement(this);
|
|
121
|
-
}
|
|
122
|
-
};
|
|
123
|
-
EdsTooltip.style = EdsTooltipStyle0;
|
|
124
|
-
|
|
125
|
-
export { EdsTooltip as eds_tooltip };
|
package/eds-trl.entry.esm.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react-dom';
|
|
5
|
-
|
|
6
|
-
const EdsTrl = class {
|
|
7
|
-
constructor(hostRef) {
|
|
8
|
-
registerInstance(this, hostRef);
|
|
9
|
-
this.applications = undefined;
|
|
10
|
-
}
|
|
11
|
-
getParsedApplications() {
|
|
12
|
-
let apps = [];
|
|
13
|
-
// If applications is a string, attempt to parse it as JSON.
|
|
14
|
-
if (typeof this.applications === 'string') {
|
|
15
|
-
try {
|
|
16
|
-
apps = JSON.parse(this.applications || '[]');
|
|
17
|
-
} catch (error) {
|
|
18
|
-
// eslint-disable-next-line
|
|
19
|
-
console.error('Invalid applications trl JSON', error);
|
|
20
|
-
apps = [];
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
// If applications is already an array, use it directly.
|
|
24
|
-
else if (Array.isArray(this.applications)) {
|
|
25
|
-
apps = this.applications;
|
|
26
|
-
}
|
|
27
|
-
return apps;
|
|
28
|
-
}
|
|
29
|
-
calculateProgress(currentTrl) {
|
|
30
|
-
const maxTrl = 9;
|
|
31
|
-
return Math.ceil(currentTrl / maxTrl * 100); // Calculate percentage and round up
|
|
32
|
-
}
|
|
33
|
-
render() {
|
|
34
|
-
const apps = this.getParsedApplications();
|
|
35
|
-
// Map applications into table-friendly data.
|
|
36
|
-
const tableData = apps.map(app => ({
|
|
37
|
-
Application: app.name,
|
|
38
|
-
'Current TRL Stage': `TRL ${app.currentTrl}`,
|
|
39
|
-
Progress: h("div", {
|
|
40
|
-
class: "w-[200px]"
|
|
41
|
-
}, h("eds-progress-bar", {
|
|
42
|
-
value: this.calculateProgress(app.currentTrl)
|
|
43
|
-
}))
|
|
44
|
-
}));
|
|
45
|
-
const tableConfig = {
|
|
46
|
-
Application: {
|
|
47
|
-
format: 'code'
|
|
48
|
-
},
|
|
49
|
-
'Current TRL Stage': {
|
|
50
|
-
format: 'text'
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
return h("div", {
|
|
54
|
-
key: '00a54a2865be6f24f9b67bd47008551070c45438',
|
|
55
|
-
class: "container mx-auto px-4 py-8"
|
|
56
|
-
}, h("eds-table", {
|
|
57
|
-
key: '5f60e2a9e4b6bb3b16981c4be01269cd3d985086',
|
|
58
|
-
"table-data": JSON.stringify(tableData),
|
|
59
|
-
config: JSON.stringify(tableConfig),
|
|
60
|
-
"rows-per-page": "2",
|
|
61
|
-
"pagination-enabled": "true",
|
|
62
|
-
"search-enabled": "true",
|
|
63
|
-
"column-size": "default"
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export { EdsTrl as eds_trl };
|
package/eu-9ddde93a.esm.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
const euSvg = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="flag-icons-eu" viewBox="0 0 640 480">
|
|
2
|
-
<defs>
|
|
3
|
-
<g id="d">
|
|
4
|
-
<g id="b">
|
|
5
|
-
<path id="a" d="m0-1-.3 1 .5.1z"/>
|
|
6
|
-
<use xlink:href="#a" transform="scale(-1 1)"/>
|
|
7
|
-
</g>
|
|
8
|
-
<g id="c">
|
|
9
|
-
<use xlink:href="#b" transform="rotate(72)"/>
|
|
10
|
-
<use xlink:href="#b" transform="rotate(144)"/>
|
|
11
|
-
</g>
|
|
12
|
-
<use xlink:href="#c" transform="scale(-1 1)"/>
|
|
13
|
-
</g>
|
|
14
|
-
</defs>
|
|
15
|
-
<path fill="#039" d="M0 0h640v480H0z"/>
|
|
16
|
-
<g fill="#fc0" transform="translate(320 242.3) scale(23.7037)">
|
|
17
|
-
<use xlink:href="#d" width="100%" height="100%" y="-6"/>
|
|
18
|
-
<use xlink:href="#d" width="100%" height="100%" y="6"/>
|
|
19
|
-
<g id="e">
|
|
20
|
-
<use xlink:href="#d" width="100%" height="100%" x="-6"/>
|
|
21
|
-
<use xlink:href="#d" width="100%" height="100%" transform="rotate(-144 -2.3 -2.1)"/>
|
|
22
|
-
<use xlink:href="#d" width="100%" height="100%" transform="rotate(144 -2.1 -2.3)"/>
|
|
23
|
-
<use xlink:href="#d" width="100%" height="100%" transform="rotate(72 -4.7 -2)"/>
|
|
24
|
-
<use xlink:href="#d" width="100%" height="100%" transform="rotate(72 -5 .5)"/>
|
|
25
|
-
</g>
|
|
26
|
-
<use xlink:href="#e" width="100%" height="100%" transform="scale(-1 1)"/>
|
|
27
|
-
</g>
|
|
28
|
-
</svg>`;
|
|
29
|
-
|
|
30
|
-
export { euSvg as e };
|
package/facebook-9cb5c17f.esm.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const facebook = ` <svg
|
|
2
|
-
width="20"
|
|
3
|
-
height="20"
|
|
4
|
-
viewBox="0 0 20 20"
|
|
5
|
-
fill="none"
|
|
6
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
7
|
-
>
|
|
8
|
-
<path
|
|
9
|
-
d="M10.9481 19.9556C16.0263 19.4781 20 15.2031 20 10C20 4.47715 15.5228 0 10 0C4.47715 0 0 4.47715 0 10C0 14.7129 3.26027 18.6643 7.64847 19.722V12.0931H6V9.36828H7.64847V7.73228C7.64847 5.50935 8.5793 4.1875 11.2239 4.1875H13.4256V6.91266H12.0494C11.0199 6.91266 10.9518 7.29347 10.9518 8.00415L10.9481 9.36797H13.4412L13.1494 12.0928H10.9481V19.9556Z"
|
|
10
|
-
fill="currentColor"
|
|
11
|
-
/>
|
|
12
|
-
</svg>`;
|
|
13
|
-
|
|
14
|
-
export { facebook as f };
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index.esm2.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react-dom';
|
|
5
|
-
|
|
6
|
-
const primary = [{
|
|
7
|
-
background: '#9CE142'
|
|
8
|
-
}, {
|
|
9
|
-
background: '#00C959'
|
|
10
|
-
}, {
|
|
11
|
-
background: '#00A595'
|
|
12
|
-
}];
|
|
13
|
-
const purple = [{
|
|
14
|
-
background: '#C461FF'
|
|
15
|
-
}, {
|
|
16
|
-
background: '#5D3DF9'
|
|
17
|
-
}];
|
|
18
|
-
const red = [{
|
|
19
|
-
background: '#FFA543'
|
|
20
|
-
}, {
|
|
21
|
-
background: '#FF4D68'
|
|
22
|
-
}];
|
|
23
|
-
const incorrect = [{
|
|
24
|
-
background: '#3FA9F5'
|
|
25
|
-
}, ...purple, ...red];
|
|
26
|
-
const IncorrectUseOfColors = class {
|
|
27
|
-
constructor(hostRef) {
|
|
28
|
-
registerInstance(this, hostRef);
|
|
29
|
-
}
|
|
30
|
-
render() {
|
|
31
|
-
return h("div", {
|
|
32
|
-
key: '80253e3c155668ddc9ff17644feba21c6bbda657',
|
|
33
|
-
class: "container"
|
|
34
|
-
}, h("eds-alert", {
|
|
35
|
-
key: '6ebf1dbef8a8f24dd55b113225780d3763f240df',
|
|
36
|
-
message: "Note that, each of the four colour tones cannot be mixed in the same composition.",
|
|
37
|
-
intent: "error"
|
|
38
|
-
}), h("div", {
|
|
39
|
-
key: '749dff3be5134a9f314b285c11610eea9a4f4600',
|
|
40
|
-
class: "flex"
|
|
41
|
-
}, h("div", {
|
|
42
|
-
key: 'd46d147fb0b9fab7a7965015892de54f34d69e11',
|
|
43
|
-
class: "w-full"
|
|
44
|
-
}, h("ul", {
|
|
45
|
-
key: 'acb6ad9453e4e1324255a021bf42e52af29eae4f',
|
|
46
|
-
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
47
|
-
}, primary.map(color => h("li", {
|
|
48
|
-
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
49
|
-
}, h("div", {
|
|
50
|
-
class: "w-full min-h-[150px] effect-height flex items-center justify-between p-16",
|
|
51
|
-
style: {
|
|
52
|
-
backgroundColor: color.background
|
|
53
|
-
}
|
|
54
|
-
}))))), h("div", {
|
|
55
|
-
key: '42dc313b4347957c970f072167173ab564a8d4c0',
|
|
56
|
-
class: "w-full"
|
|
57
|
-
}, h("ul", {
|
|
58
|
-
key: '89328173141957bedfe051dbba174eaa0ff903d2',
|
|
59
|
-
class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
|
|
60
|
-
}, incorrect.map(color => h("li", {
|
|
61
|
-
class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
|
|
62
|
-
}, h("div", {
|
|
63
|
-
class: "w-full min-h-[90px] effect-height flex items-center justify-between p-16",
|
|
64
|
-
style: {
|
|
65
|
-
backgroundColor: color.background
|
|
66
|
-
}
|
|
67
|
-
})))))));
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export { IncorrectUseOfColors as incorrect_use_of_colors };
|
package/index-39c58238.esm.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
function r(e) {
|
|
2
|
-
var t,
|
|
3
|
-
f,
|
|
4
|
-
n = "";
|
|
5
|
-
if ("string" == typeof e || "number" == typeof e) n += e;else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
6
|
-
return n;
|
|
7
|
-
}
|
|
8
|
-
function clsx() {
|
|
9
|
-
for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
const falsyToString = value => typeof value === "boolean" ? "".concat(value) : value === 0 ? "0" : value;
|
|
13
|
-
const cx = clsx;
|
|
14
|
-
const cva = (base, config) => {
|
|
15
|
-
return props => {
|
|
16
|
-
var ref;
|
|
17
|
-
if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
18
|
-
const {
|
|
19
|
-
variants,
|
|
20
|
-
defaultVariants
|
|
21
|
-
} = config;
|
|
22
|
-
const getVariantClassNames = Object.keys(variants).map(variant => {
|
|
23
|
-
const variantProp = props === null || props === void 0 ? void 0 : props[variant];
|
|
24
|
-
const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
|
|
25
|
-
if (variantProp === null) return null;
|
|
26
|
-
const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
|
|
27
|
-
return variants[variant][variantKey];
|
|
28
|
-
});
|
|
29
|
-
const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param) => {
|
|
30
|
-
let [key, value] = param;
|
|
31
|
-
if (value === undefined) {
|
|
32
|
-
return acc;
|
|
33
|
-
}
|
|
34
|
-
acc[key] = value;
|
|
35
|
-
return acc;
|
|
36
|
-
}, {});
|
|
37
|
-
const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (ref = config.compoundVariants) === null || ref === void 0 ? void 0 : ref.reduce((acc, param1) => {
|
|
38
|
-
let {
|
|
39
|
-
class: cvClass,
|
|
40
|
-
className: cvClassName,
|
|
41
|
-
...compoundVariantOptions
|
|
42
|
-
} = param1;
|
|
43
|
-
return Object.entries(compoundVariantOptions).every(param => {
|
|
44
|
-
let [key, value] = param;
|
|
45
|
-
return Array.isArray(value) ? value.includes({
|
|
46
|
-
...defaultVariants,
|
|
47
|
-
...propsWithoutUndefined
|
|
48
|
-
}[key]) : {
|
|
49
|
-
...defaultVariants,
|
|
50
|
-
...propsWithoutUndefined
|
|
51
|
-
}[key] === value;
|
|
52
|
-
}) ? [...acc, cvClass, cvClassName] : acc;
|
|
53
|
-
}, []);
|
|
54
|
-
return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
|
|
55
|
-
};
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { cva as c };
|
package/index.esm.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./src/index";
|
package/index.esm.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { E as EdsAccordion, a as EdsAlert, b as EdsAvatar, d as EdsBlockBreak, e as EdsBreadcrumb, f as EdsButton, i as EdsCardGeneric, j as EdsCardSection, k as EdsCodeBlock, l as EdsDropdown, m as EdsFeedback, n as EdsFooter, o as EdsForm, p as EdsFullscreenMenu, q as EdsHeader, s as EdsIconWrapper, t as EdsImg, u as EdsInputField, v as EdsLink, w as EdsLogo, x as EdsMatomoNotice, y as EdsModal, z as EdsPagination, A as EdsProgressBar, B as EdsRating, C as EdsSectionCore, D as EdsSocialNetworks, F as EdsSpinner, G as EdsSplashScreen, I as EdsSteps, J as EdsStepsV2, K as EdsSwitch, L as EdsTable, M as EdsTabs, N as EdsTag, O as EdsTimeline, P as EdsToast, Q as EdsTooltip, R as EdsUser } from './index.esm2.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import 'react/jsx-runtime';
|
|
4
|
-
import 'react-dom';
|