@ebrains/components 0.3.0-alpha.0 → 0.4.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/{color-3ffe3072.js → color-88793e49.js} +2 -2
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/eds-accordion_33.cjs.entry.js +2670 -0
- package/dist/cjs/eds-card-project.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-section.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +48 -1
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +33 -15
- package/dist/cjs/eds-rating.cjs.entry.js +5 -7
- package/dist/cjs/eds-tabs-content.cjs.entry.js +1 -1
- package/dist/cjs/eds-tabs.cjs.entry.js +1 -1
- package/dist/cjs/eds-timeline.cjs.entry.js +3 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +11 -1
- package/dist/cjs/eds-trl.cjs.entry.js +7 -8
- package/dist/cjs/index-f08e4f5c.js +2 -34
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/eds-accordion/eds-accordion.js +11 -20
- package/dist/collection/components/eds-alert/eds-alert.js +5 -7
- package/dist/collection/components/eds-alert/eds-alert.stories.js +4 -4
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +24 -22
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +2 -1
- package/dist/collection/components/eds-button/eds-button.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +9 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +14 -8
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +1 -1
- package/dist/collection/components/eds-code-block/eds-code-block.js +57 -2
- package/dist/collection/components/eds-code-block/eds-code-block.stories.js +78 -0
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +11 -21
- package/dist/collection/components/eds-form/eds-form.js +41 -31
- package/dist/collection/components/eds-form/eds-form.stories.js +0 -3
- package/dist/collection/components/eds-frame/eds-frame.stories.js +19 -18
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +4 -1
- package/dist/collection/components/eds-link/eds-link.js +3 -4
- package/dist/collection/components/eds-modal/eds-modal.css +16 -0
- package/dist/collection/components/eds-modal/eds-modal.js +71 -29
- package/dist/collection/components/eds-modal/eds-modal.stories.js +34 -18
- package/dist/collection/components/eds-pagination/eds-pagination.js +13 -9
- package/dist/collection/components/eds-rating/eds-rating.js +8 -10
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.stories.js +12 -11
- package/dist/collection/components/eds-table/eds-table.js +20 -7
- package/dist/collection/components/eds-timeline/eds-timeline.js +3 -2
- package/dist/collection/components/eds-toast/eds-toast.js +21 -0
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +10 -1
- package/dist/collection/components/eds-trl/eds-trl.js +7 -8
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +7 -6
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +8 -39
- package/dist/components/analytics.js +2 -2
- package/dist/components/components.css +12 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/eds-accordion2.js +12 -20
- package/dist/components/eds-alert2.js +5 -7
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +2 -1
- package/dist/components/eds-button2.js +1 -1
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +3 -3
- package/dist/components/eds-card-section.js +3 -3
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +48 -1
- package/dist/components/eds-dropdown2.js +12 -21
- package/dist/components/eds-form.js +37 -12
- package/dist/components/eds-input-select2.js +1 -1
- package/dist/components/eds-link2.js +3 -4
- package/dist/components/eds-modal.js +56 -30
- package/dist/components/eds-pagination2.js +13 -9
- package/dist/components/eds-rating.js +6 -8
- package/dist/components/eds-table2.js +20 -6
- package/dist/components/eds-timeline.js +3 -2
- package/dist/components/eds-toast2.js +21 -0
- package/dist/components/eds-tooltip.js +11 -1
- package/dist/components/eds-trl.js +7 -8
- package/dist/components/p-2dda1ec4.entry.js +1 -0
- package/dist/components/{p-d9788b54.entry.js → p-35ec730b.entry.js} +1 -1
- package/dist/components/{p-e6bfbf51.entry.js → p-5398d652.entry.js} +2 -2
- package/dist/components/{p-e20ed2c7.entry.js → p-610db2b2.entry.js} +1 -1
- package/dist/components/p-832dc95a.entry.js +1 -0
- package/dist/components/p-855aa1a3.entry.js +1 -0
- package/dist/components/{p-52ac3456.entry.js → p-8ddc67a1.entry.js} +1 -1
- package/dist/components/p-ab32b3fc.entry.js +1 -0
- package/dist/components/p-b04eff31.entry.js +1 -0
- package/dist/components/p-b86a4985.js +1 -0
- package/dist/components/{p-2e8459ef.entry.js → p-ba6bafef.entry.js} +1 -1
- package/dist/components/{p-6fc62452.entry.js → p-c3b294a0.entry.js} +1 -1
- package/dist/components/p-c6038449.entry.js +1 -0
- package/dist/components/p-c72c8fb0.entry.js +1 -0
- package/dist/components/p-dd6daa96.entry.js +1 -0
- package/dist/components/{p-73bd0c97.entry.js → p-df94285c.entry.js} +1 -1
- package/dist/esm/{color-0ba8ed56.js → color-bb472c37.js} +2 -2
- package/dist/esm/components.js +1 -1
- package/dist/esm/eds-accordion_33.entry.js +2634 -0
- package/dist/esm/eds-card-project.entry.js +1 -1
- package/dist/esm/eds-card-section.entry.js +3 -3
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +1 -1
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +49 -2
- package/dist/esm/eds-matomo-notice.entry.js +1 -1
- package/dist/esm/eds-pagination_2.entry.js +33 -15
- package/dist/esm/eds-rating.entry.js +5 -7
- package/dist/esm/eds-tabs-content.entry.js +1 -1
- package/dist/esm/eds-tabs.entry.js +1 -1
- package/dist/esm/eds-timeline.entry.js +3 -2
- package/dist/esm/eds-tooltip.entry.js +11 -1
- package/dist/esm/eds-trl.entry.js +7 -8
- package/dist/esm/index-e96badea.js +2 -34
- package/dist/esm/loader.js +1 -1
- package/dist/hydrate/index.js +560 -427
- package/dist/hydrate/index.mjs +560 -427
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +5 -12
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +0 -18
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +8 -0
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +6 -2
- package/dist/types/components/eds-code-block/eds-code-block.d.ts +43 -3
- package/dist/types/components/eds-code-block/eds-code-block.stories.d.ts +54 -0
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +0 -7
- package/dist/types/components/eds-form/eds-form.d.ts +3 -6
- package/dist/types/components/eds-form/eds-form.stories.d.ts +0 -5
- package/dist/types/components/eds-frame/eds-frame.stories.d.ts +0 -2
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +3 -0
- package/dist/types/components/eds-link/eds-link.d.ts +1 -1
- package/dist/types/components/eds-modal/eds-modal.d.ts +18 -3
- package/dist/types/components/eds-modal/eds-modal.stories.d.ts +9 -0
- package/dist/types/components/eds-rating/eds-rating.d.ts +4 -6
- package/dist/types/components/eds-section/eds-section-core/eds-section-core.stories.d.ts +0 -1
- package/dist/types/components/eds-table/eds-table.d.ts +5 -5
- package/dist/types/components/eds-toast/eds-toast.d.ts +9 -0
- package/dist/types/components.d.ts +66 -84
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +1 -6
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +42 -21
- package/package.json +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +0 -93
- package/dist/cjs/eds-alert.cjs.entry.js +0 -96
- package/dist/cjs/eds-avatar_17.cjs.entry.js +0 -1454
- package/dist/cjs/eds-card-desc_3.cjs.entry.js +0 -117
- package/dist/cjs/eds-card-generic.cjs.entry.js +0 -105
- package/dist/cjs/eds-form.cjs.entry.js +0 -322
- package/dist/cjs/eds-frame.cjs.entry.js +0 -91
- package/dist/cjs/eds-input_7.cjs.entry.js +0 -316
- package/dist/cjs/eds-modal.cjs.entry.js +0 -86
- package/dist/components/p-02e2a62f.entry.js +0 -1
- package/dist/components/p-32f282a9.entry.js +0 -1
- package/dist/components/p-3617841d.entry.js +0 -1
- package/dist/components/p-373673ca.js +0 -1
- package/dist/components/p-3ff76976.entry.js +0 -1
- package/dist/components/p-42b4ecff.entry.js +0 -1
- package/dist/components/p-54c75346.entry.js +0 -1
- package/dist/components/p-5afb626c.entry.js +0 -1
- package/dist/components/p-5d7af761.entry.js +0 -1
- package/dist/components/p-7215789a.entry.js +0 -1
- package/dist/components/p-79887c2c.entry.js +0 -1
- package/dist/components/p-84957b6d.entry.js +0 -1
- package/dist/components/p-96c4deda.entry.js +0 -1
- package/dist/components/p-be6c80da.entry.js +0 -1
- package/dist/components/p-d1f6a722.entry.js +0 -1
- package/dist/components/p-d7a92efb.entry.js +0 -1
- package/dist/components/p-fd27e56c.entry.js +0 -1
- package/dist/esm/eds-accordion.entry.js +0 -89
- package/dist/esm/eds-alert.entry.js +0 -92
- package/dist/esm/eds-avatar_17.entry.js +0 -1434
- package/dist/esm/eds-card-desc_3.entry.js +0 -111
- package/dist/esm/eds-card-generic.entry.js +0 -101
- package/dist/esm/eds-form.entry.js +0 -318
- package/dist/esm/eds-frame.entry.js +0 -87
- package/dist/esm/eds-input_7.entry.js +0 -306
- package/dist/esm/eds-modal.entry.js +0 -82
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { r as registerInstance, h, g as getElement } from './index-e96badea.js';
|
|
2
|
-
|
|
3
|
-
const EdsFrame = class {
|
|
4
|
-
constructor(hostRef) {
|
|
5
|
-
registerInstance(this, hostRef);
|
|
6
|
-
this.frameLabel = undefined;
|
|
7
|
-
this.urlLabel = 'Open in Storybook';
|
|
8
|
-
this.errorMessage = 'Could not load the requested Storybook content. Please check the URL or try again later.';
|
|
9
|
-
this.storybookUrl = undefined;
|
|
10
|
-
this.storyPath = undefined;
|
|
11
|
-
this.intent = 'strong';
|
|
12
|
-
this.tiny = false;
|
|
13
|
-
this.size = 'auto';
|
|
14
|
-
this.bg = true;
|
|
15
|
-
this.iframeError = false;
|
|
16
|
-
}
|
|
17
|
-
articleClasses() {
|
|
18
|
-
return [
|
|
19
|
-
this.tiny ? 'min-h-120' : 'min-h-156',
|
|
20
|
-
this.bg ? 'bg-inverse' : 'bg-default',
|
|
21
|
-
'rounded border-softer effect-focus-within relative flex grow flex-col border-2',
|
|
22
|
-
'w-full h-full'
|
|
23
|
-
].join(' ');
|
|
24
|
-
}
|
|
25
|
-
getFrameHeight() {
|
|
26
|
-
switch (this.size) {
|
|
27
|
-
case 'sm':
|
|
28
|
-
return '100px';
|
|
29
|
-
case 'md':
|
|
30
|
-
return '200px';
|
|
31
|
-
case 'lg':
|
|
32
|
-
return '400px';
|
|
33
|
-
case 'xl':
|
|
34
|
-
return '700px';
|
|
35
|
-
default:
|
|
36
|
-
return 'auto';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
async checkIframeAvailability() {
|
|
40
|
-
try {
|
|
41
|
-
const response = await fetch(this.frameSrc, { method: 'GET' });
|
|
42
|
-
if (!response.ok) {
|
|
43
|
-
throw new Error('Failed to load');
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
this.iframeError = true;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
componentWillLoad() {
|
|
51
|
-
this.checkIframeAvailability();
|
|
52
|
-
}
|
|
53
|
-
componentDidLoad() {
|
|
54
|
-
// Emit context for each eds-link element after the component is fully loaded
|
|
55
|
-
const links = this.el.querySelectorAll('eds-link');
|
|
56
|
-
links.forEach((link) => {
|
|
57
|
-
this.emitContext(link);
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
62
|
-
* This event provides context information about the breadcrumb component.
|
|
63
|
-
*
|
|
64
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
65
|
-
*/
|
|
66
|
-
emitContext(linkElement) {
|
|
67
|
-
const event = new CustomEvent('parentContext', {
|
|
68
|
-
detail: {
|
|
69
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
70
|
-
identifier: this.frameLabel
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
linkElement.dispatchEvent(event);
|
|
74
|
-
}
|
|
75
|
-
get storyLink() {
|
|
76
|
-
return `${this.storybookUrl}/?path=/story/${this.storyPath}`;
|
|
77
|
-
}
|
|
78
|
-
get frameSrc() {
|
|
79
|
-
return `${this.storybookUrl}/iframe.html?id=${this.storyPath}&viewMode=story`;
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
return (h("div", { key: '0c3a43efc1a125af5999af88c4eb071b5c3bc6c5', class: this.articleClasses() }, h("div", { key: '32303d5e2c2f3b01efe1ceaf828346f873bea6b6', class: "effect-height flex items-center justify-between py-8 px-12" }, h("span", { key: '75f7f6750413dad4af2ea62c12ffb994491d5d01', class: "f-ui-02" }, this.frameLabel), !this.iframeError ? (h("eds-link", { label: this.urlLabel, url: this.storyLink, intent: this.intent, class: "ml-auto", external: true, disabled: false, icon: "arrow-diagonal" })) : null), h("div", { key: '1fd99f6eda026814910b0cd93635616b7d3ffe09', class: "border-softer border-t-2" }, this.iframeError ? (h("div", { class: "container ml-8 mr-8 mt-16" }, this.errorMessage)) : (h("iframe", { src: this.frameSrc, width: "100%", height: this.getFrameHeight(), title: this.frameLabel, frameBorder: "0", allowFullScreen: true })))));
|
|
83
|
-
}
|
|
84
|
-
get el() { return getElement(this); }
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
export { EdsFrame as eds_frame };
|