@ebrains/react 0.9.2-beta → 1.0.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.
Files changed (172) hide show
  1. package/README.md +3 -3
  2. package/analytics-d99780e3.esm.js +55 -0
  3. package/arrow-diagonal-black-8f0494c3.esm.js +3 -0
  4. package/arrow-right-9322ba8a.esm.js +5 -0
  5. package/bluesky-cc5edd2d.esm.js +14 -0
  6. package/bookmark-c200037c.esm.js +16 -0
  7. package/chevron-down-6144c823.esm.js +12 -0
  8. package/chevron-left-ca6c66e1.esm.js +11 -0
  9. package/chevron-right-b88ed2d4.esm.js +5 -0
  10. package/chevron-up-c66bd477.esm.js +12 -0
  11. package/close-87fc0d63.esm.js +5 -0
  12. package/color-primary-palette_6.entry.esm.js +778 -0
  13. package/components-section.entry.esm.js +171 -0
  14. package/copy-03b72cb6.esm.js +5 -0
  15. package/correct-use-of-colors.entry.esm.js +243 -0
  16. package/docs-palettes.entry.esm.js +29 -0
  17. package/docs-tokens.entry.esm.js +45 -0
  18. package/eds-accordion.entry.esm.js +132 -0
  19. package/eds-alert.entry.esm.js +112 -0
  20. package/eds-app-root.entry.esm.js +53 -0
  21. package/eds-avatar_34.entry.esm.js +3594 -0
  22. package/eds-card-project.entry.esm.js +210 -0
  23. package/eds-card-section.entry.esm.js +56 -0
  24. package/eds-card-tags.entry.esm.js +27 -0
  25. package/eds-card-tool.entry.esm.js +105 -0
  26. package/eds-code-block.entry.esm.js +2290 -0
  27. package/eds-cookies-preference.entry.esm.js +47 -0
  28. package/eds-feedback.entry.esm.js +87 -0
  29. package/eds-frame.entry.esm.js +112 -0
  30. package/eds-icon-arrow-diagonal.entry.esm.js +21 -0
  31. package/eds-icon-arrow-right.entry.esm.js +21 -0
  32. package/eds-icon-bluesky.entry.esm.js +21 -0
  33. package/eds-icon-bookmark.entry.esm.js +21 -0
  34. package/eds-icon-chevron-down.entry.esm.js +21 -0
  35. package/eds-icon-chevron-left.entry.esm.js +21 -0
  36. package/eds-icon-chevron-right.entry.esm.js +21 -0
  37. package/eds-icon-chevron-up.entry.esm.js +21 -0
  38. package/eds-icon-close.entry.esm.js +21 -0
  39. package/eds-icon-copy.entry.esm.js +21 -0
  40. package/eds-icon-eu.entry.esm.js +21 -0
  41. package/eds-icon-external.entry.esm.js +21 -0
  42. package/eds-icon-facebook.entry.esm.js +21 -0
  43. package/eds-icon-gitlab.entry.esm.js +21 -0
  44. package/eds-icon-linkedin.entry.esm.js +21 -0
  45. package/eds-icon-loader.entry.esm.js +21 -0
  46. package/eds-icon-mastodon.entry.esm.js +21 -0
  47. package/eds-icon-menu.entry.esm.js +21 -0
  48. package/eds-icon-minus.entry.esm.js +21 -0
  49. package/eds-icon-more.entry.esm.js +21 -0
  50. package/eds-icon-paper.entry.esm.js +21 -0
  51. package/eds-icon-plus.entry.esm.js +21 -0
  52. package/eds-icon-portal.entry.esm.js +21 -0
  53. package/eds-icon-private.entry.esm.js +21 -0
  54. package/eds-icon-public.entry.esm.js +21 -0
  55. package/eds-icon-search.entry.esm.js +21 -0
  56. package/eds-icon-star.entry.esm.js +21 -0
  57. package/eds-icon-success.entry.esm.js +21 -0
  58. package/eds-icon-thumbs-down.entry.esm.js +21 -0
  59. package/eds-icon-thumbs-up.entry.esm.js +21 -0
  60. package/eds-icon-tutorial.entry.esm.js +21 -0
  61. package/eds-icon-twitter.entry.esm.js +21 -0
  62. package/eds-icon-unknown.entry.esm.js +21 -0
  63. package/eds-icon-updown.entry.esm.js +21 -0
  64. package/eds-icon-user.entry.esm.js +21 -0
  65. package/eds-icon-youtube.entry.esm.js +21 -0
  66. package/eds-matomo-notice.entry.esm.js +159 -0
  67. package/eds-pagination_2.entry.esm.js +493 -0
  68. package/eds-progress-bar.entry.esm.js +52 -0
  69. package/eds-rating.entry.esm.js +79 -0
  70. package/eds-section-core_2.entry.esm.js +69 -0
  71. package/eds-spinner.entry.esm.js +67 -0
  72. package/eds-splash-screen.entry.esm.js +87 -0
  73. package/eds-switch.entry.esm.js +68 -0
  74. package/eds-timeline.entry.esm.js +117 -0
  75. package/eds-toast-manager.entry.esm.js +93 -0
  76. package/eds-toast.entry.esm.js +93 -0
  77. package/eds-trl.entry.esm.js +68 -0
  78. package/eu-9ddde93a.esm.js +30 -0
  79. package/facebook-9cb5c17f.esm.js +14 -0
  80. package/incorrect-use-of-colors.entry.esm.js +74 -0
  81. package/index-39c58238.esm.js +58 -0
  82. package/index.esm.d.ts +1 -0
  83. package/index.esm.js +4 -0
  84. package/index.esm2.js +4558 -0
  85. package/linkedin-e8650abb.esm.js +28 -0
  86. package/loader-c9628637.esm.js +30 -0
  87. package/logo-color-7f1fd803.esm.js +115 -0
  88. package/logo-color-margins-ff8ce71b.esm.js +118 -0
  89. package/logo-space.entry.esm.js +48 -0
  90. package/logo-variations-horizontal_2.entry.esm.js +123 -0
  91. package/logo-variations-tabs.entry.esm.js +29 -0
  92. package/logo-white-no-bg-f382f86f.esm.js +1021 -0
  93. package/logo-wrong-usage.entry.esm.js +101 -0
  94. package/mastodon-3703ec61.esm.js +14 -0
  95. package/menu-340ea948.esm.js +11 -0
  96. package/minus-b30a7c71.esm.js +11 -0
  97. package/mono-53f70232.esm.js +11 -0
  98. package/more-4449d549.esm.js +13 -0
  99. package/package.json +6 -2
  100. package/paper-8e74ea31.esm.js +15 -0
  101. package/plus-89c07be2.esm.js +12 -0
  102. package/portal-d6c8ce56.esm.js +18 -0
  103. package/private-1c25ff8e.esm.js +25 -0
  104. package/public-d4d8c585.esm.js +16 -0
  105. package/search-fbcd79c2.esm.js +12 -0
  106. package/sharedUtils-a550989c.esm.js +17 -0
  107. package/src/components.d.ts +40 -0
  108. package/src/generated/components.d.ts +38 -0
  109. package/src/generated/react-component-lib/attachProps.d.ts +16 -0
  110. package/src/generated/react-component-lib/case.d.ts +2 -0
  111. package/src/generated/react-component-lib/createComponent.d.ts +10 -0
  112. package/src/generated/react-component-lib/createOverlayComponent.d.ts +21 -0
  113. package/src/generated/react-component-lib/dev.d.ts +2 -0
  114. package/src/generated/react-component-lib/interfaces.d.ts +29 -0
  115. package/src/generated/react-component-lib/utils/attachProps.d.ts +16 -0
  116. package/src/generated/react-component-lib/utils/case.d.ts +2 -0
  117. package/src/generated/react-component-lib/utils/dev.d.ts +2 -0
  118. package/src/generated/react-component-lib/utils/index.d.ts +10 -0
  119. package/src/react-component-lib/attachProps.d.ts +16 -0
  120. package/src/react-component-lib/case.d.ts +2 -0
  121. package/src/react-component-lib/createComponent.d.ts +10 -0
  122. package/src/react-component-lib/createOverlayComponent.d.ts +21 -0
  123. package/src/react-component-lib/dev.d.ts +2 -0
  124. package/src/react-component-lib/interfaces.d.ts +29 -0
  125. package/src/react-component-lib/utils/attachProps.d.ts +16 -0
  126. package/src/react-component-lib/utils/case.d.ts +2 -0
  127. package/src/react-component-lib/utils/index.d.ts +10 -0
  128. package/star-0da9b5e9.esm.js +5 -0
  129. package/success-443809da.esm.js +18 -0
  130. package/svg-repository.entry.esm.js +337 -0
  131. package/thumbs-down-a18fd049.esm.js +5 -0
  132. package/thumbs-up-c19a71bc.esm.js +6 -0
  133. package/token-list_3.entry.esm.js +385 -0
  134. package/token-ratios.entry.esm.js +49 -0
  135. package/token-typography.entry.esm.js +267 -0
  136. package/tutotial-150ee1fd.esm.js +27 -0
  137. package/twitter-ac21b505.esm.js +14 -0
  138. package/unknown-ed01a24c.esm.js +22 -0
  139. package/up-and-down-d747abee.esm.js +12 -0
  140. package/user-71ebdc15.esm.js +16 -0
  141. package/youtube-efbfbdc4.esm.js +14 -0
  142. package/.babelrc +0 -12
  143. package/project.json +0 -10
  144. package/rollup.config.js +0 -43
  145. package/src/components.ts +0 -49
  146. package/src/generated/components.ts +0 -47
  147. package/src/generated/react-component-lib/attachProps.ts +0 -125
  148. package/src/generated/react-component-lib/case.ts +0 -7
  149. package/src/generated/react-component-lib/createComponent.tsx +0 -106
  150. package/src/generated/react-component-lib/createOverlayComponent.tsx +0 -142
  151. package/src/generated/react-component-lib/dev.ts +0 -14
  152. package/src/generated/react-component-lib/index.tsx +0 -50
  153. package/src/generated/react-component-lib/interfaces.ts +0 -34
  154. package/src/generated/react-component-lib/utils/attachProps.ts +0 -125
  155. package/src/generated/react-component-lib/utils/case.ts +0 -7
  156. package/src/generated/react-component-lib/utils/dev.ts +0 -14
  157. package/src/generated/react-component-lib/utils/index.tsx +0 -50
  158. package/src/react-component-lib/attachProps.ts +0 -125
  159. package/src/react-component-lib/case.ts +0 -7
  160. package/src/react-component-lib/createComponent.tsx +0 -106
  161. package/src/react-component-lib/createOverlayComponent.tsx +0 -142
  162. package/src/react-component-lib/dev.ts +0 -14
  163. package/src/react-component-lib/index.tsx +0 -50
  164. package/src/react-component-lib/interfaces.ts +0 -34
  165. package/src/react-component-lib/utils/attachProps.ts +0 -125
  166. package/src/react-component-lib/utils/case.ts +0 -7
  167. package/src/react-component-lib/utils/index.tsx +0 -50
  168. package/tsconfig.json +0 -17
  169. package/tsconfig.lib.json +0 -23
  170. /package/src/generated/react-component-lib/{index.ts → index.d.ts} +0 -0
  171. /package/src/{index.ts → index.d.ts} +0 -0
  172. /package/src/react-component-lib/{index.ts → index.d.ts} +0 -0
@@ -0,0 +1,69 @@
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 edsSectionCoreCss = "";
7
+ const EdsSectionCoreStyle0 = edsSectionCoreCss;
8
+ const EdsSectionCore = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.tag = 'section';
12
+ this.sectionTitle = '';
13
+ this.headingLevel = 'h2';
14
+ }
15
+ render() {
16
+ const TagType = this.tag; // Set dynamic tag type (div or section)
17
+ return h(TagType, {
18
+ key: 'ff0b28dffb8aca2ad0ac1ee3eea7ebda75078f96'
19
+ }, h("eds-section-heading", {
20
+ key: '23e9bb2b084c6b8a534dd310fbe10e0de0211187',
21
+ headingLevel: this.headingLevel,
22
+ sectionTitle: this.sectionTitle
23
+ }), h("slot", {
24
+ key: '9cae6378bdb5304191d393967025570f94fdcdb2'
25
+ }));
26
+ }
27
+ };
28
+ EdsSectionCore.style = EdsSectionCoreStyle0;
29
+ const EdsSectionHeading = class {
30
+ constructor(hostRef) {
31
+ registerInstance(this, hostRef);
32
+ this.sectionTitle = undefined;
33
+ this.withContainer = true;
34
+ this.headingLevel = 'h2';
35
+ this.tag = 'div';
36
+ this.spacingLarge = false;
37
+ }
38
+ getHeadingClass() {
39
+ // Map heading levels to their respective classes
40
+ const headingClasses = {
41
+ h1: 'f-heading-01',
42
+ h2: 'f-heading-02',
43
+ h3: 'f-heading-03',
44
+ h4: 'f-heading-04',
45
+ h5: 'f-heading-05',
46
+ h6: 'f-heading-06'
47
+ };
48
+ // Return the class based on the heading level
49
+ return headingClasses[this.headingLevel];
50
+ }
51
+ render() {
52
+ const TagType = this.tag; // Dynamically set tag type for the container
53
+ const HeadingTag = this.headingLevel; // Dynamically set heading level
54
+ return h(TagType, {
55
+ key: 'bb32f87fd944ebf08ebcde3980c18cd4bed18783',
56
+ class: {
57
+ 'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
58
+ container: this.withContainer,
59
+ 'pt-48': this.spacingLarge,
60
+ 'pt-28': !this.spacingLarge
61
+ }
62
+ }, h(HeadingTag, {
63
+ key: '0cd8ea8aada58e30675579c82ba130b40257c7c6',
64
+ class: this.getHeadingClass()
65
+ }, this.sectionTitle));
66
+ }
67
+ };
68
+
69
+ export { EdsSectionCore as eds_section_core, EdsSectionHeading as eds_section_heading };
@@ -0,0 +1,67 @@
1
+ import { r as registerInstance, h, H as Host } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ const edsSpinnerCss = ":host{display:block}.spinner{box-sizing:border-box;border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}";
7
+ const EdsSpinnerStyle0 = edsSpinnerCss;
8
+ const EdsSpinner = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.size = '1rem';
12
+ this.thickness = '10px';
13
+ this.borderColor = 'var(--grey-400)';
14
+ this.bottomColor = 'var(--grey-900)';
15
+ this.background = 'var(--grey-200)';
16
+ this.fullscreen = false;
17
+ }
18
+ render() {
19
+ const spinnerStyle = Object.assign({
20
+ width: this.size,
21
+ height: this.size,
22
+ border: `${this.thickness} solid ${this.borderColor}`,
23
+ borderBottomColor: this.bottomColor
24
+ }, !this.fullscreen && {
25
+ display: 'inline-block'
26
+ });
27
+ // Overlay style: use fixed positioning for fullscreen,
28
+ // and absolute positioning for inline mode.
29
+ const overlayStyle = this.fullscreen ? {
30
+ position: 'fixed',
31
+ top: '0',
32
+ left: '0',
33
+ width: '100vw',
34
+ height: '100vh',
35
+ zIndex: '9999999',
36
+ backgroundColor: this.background,
37
+ display: 'flex',
38
+ alignItems: 'center',
39
+ justifyContent: 'center'
40
+ } : {
41
+ position: 'absolute',
42
+ top: '0',
43
+ left: '0',
44
+ width: '100%',
45
+ height: '100%',
46
+ zIndex: '1000',
47
+ backgroundColor: this.background,
48
+ display: 'flex',
49
+ alignItems: 'center',
50
+ justifyContent: 'center'
51
+ };
52
+ return h(Host, {
53
+ key: '214876a56949c147e74c1a7072406234c2fb1a02'
54
+ }, h("div", {
55
+ key: 'b75b639fa38aafaf13e1eb727e28c5e67f3edafe',
56
+ class: "spinner-overlay",
57
+ style: overlayStyle
58
+ }, h("span", {
59
+ key: '87ba2ef7e1e9601ac0ae8132e9c891b4149a20b5',
60
+ class: "spinner",
61
+ style: spinnerStyle
62
+ })));
63
+ }
64
+ };
65
+ EdsSpinner.style = EdsSpinnerStyle0;
66
+
67
+ export { EdsSpinner as eds_spinner };
@@ -0,0 +1,87 @@
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ 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}";
7
+ const EdsSplashScreenStyle0 = edsSplashScreenCss;
8
+ const EdsSplashScreen = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.splash = createEvent(this, "splash", 7);
12
+ this.inverse = false;
13
+ this.initPromise = undefined;
14
+ this.isVisible = true;
15
+ }
16
+ // When the component loads, check if there is a promise.
17
+ componentWillLoad() {
18
+ if (this.initPromise) {
19
+ this.handleInitPromise(this.initPromise);
20
+ }
21
+ }
22
+ // Watch for changes on initPromise.
23
+ async watchInitPromise(newPromise) {
24
+ if (newPromise) {
25
+ this.handleInitPromise(newPromise);
26
+ }
27
+ }
28
+ async handleInitPromise(promise) {
29
+ try {
30
+ await promise;
31
+ //console.log('Promises resolved');
32
+ this.hideSplash();
33
+ } catch (error) {
34
+ //console.error('Initialization error:', error);
35
+ this.splash.emit({
36
+ type: 'error',
37
+ message: error.message || 'Unknown error'
38
+ });
39
+ }
40
+ }
41
+ handleHideSplash() {
42
+ this.hideSplash();
43
+ }
44
+ hideSplash() {
45
+ this.isVisible = false;
46
+ this.splash.emit({
47
+ type: 'hidden',
48
+ message: 'Splash screen hidden successfully'
49
+ });
50
+ }
51
+ render() {
52
+ if (!this.isVisible) {
53
+ return null;
54
+ }
55
+ return h(Host, null, h("div", {
56
+ class: "splash-overlay",
57
+ style: {
58
+ background: this.inverse ? 'black' : 'var(--grey-200)'
59
+ }
60
+ }, h("div", {
61
+ class: "logo-container"
62
+ }, this.inverse ? h("eds-logo", {
63
+ orientation: "vertical",
64
+ type: "color-white"
65
+ }) : h("eds-logo", {
66
+ orientation: "vertical",
67
+ type: "color"
68
+ })), h("div", {
69
+ class: "content-container"
70
+ }, h("eds-spinner", {
71
+ size: "1rem",
72
+ thickness: "3px",
73
+ "border-color": "var(--grey-400)",
74
+ "bottom-color": "var(--grey-900)",
75
+ background: "none",
76
+ fullscreen: false
77
+ }))));
78
+ }
79
+ static get watchers() {
80
+ return {
81
+ "initPromise": ["watchInitPromise"]
82
+ };
83
+ }
84
+ };
85
+ EdsSplashScreen.style = EdsSplashScreenStyle0;
86
+
87
+ export { EdsSplashScreen as eds_splash_screen };
@@ -0,0 +1,68 @@
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
2
+ import { s as sendAnalytics } from './analytics-d99780e3.esm.js';
3
+ import 'react';
4
+ import 'react/jsx-runtime';
5
+ import 'react-dom';
6
+
7
+ const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}";
8
+ const EdsSwitchStyle0 = edsSwitchCss;
9
+ const EdsSwitch = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.uiswitch = createEvent(this, "uiswitch", 7);
13
+ this.toggleSwitch = () => {
14
+ if (this.disabled) {
15
+ return;
16
+ }
17
+ this.checked = !this.checked;
18
+ this.uiswitch.emit(this.checked);
19
+ sendAnalytics({
20
+ category: 'ui-component',
21
+ tag: this.el.tagName.toLowerCase(),
22
+ name: this.checked ? this.labelOn : this.labelOff || '',
23
+ action: 'checked'
24
+ });
25
+ };
26
+ this.checked = false;
27
+ this.disabled = false;
28
+ this.labelOn = '';
29
+ this.labelOff = '';
30
+ }
31
+ render() {
32
+ // Compute an accessible name based on state.
33
+ const accessibleLabel = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : 'Toggle switch';
34
+ return h("div", {
35
+ key: '442876be1bad7ea8c9e383bc68b192a2744c38f9',
36
+ class: "switch-container"
37
+ }, this.labelOff && h("span", {
38
+ key: 'e4a7b01c0188d26e5b6524741b1c8ef66e357e35',
39
+ class: "switch-label switch-label--off mr-8"
40
+ }, this.labelOff), h("button", {
41
+ key: 'f56b3762622671acf793568a96567193c38999c7',
42
+ type: "button",
43
+ role: "switch",
44
+ "aria-checked": this.checked ? 'true' : 'false',
45
+ "aria-disabled": this.disabled ? 'true' : 'false',
46
+ "aria-label": accessibleLabel,
47
+ class: {
48
+ switch: true,
49
+ 'switch--checked': this.checked,
50
+ 'switch--disabled': this.disabled
51
+ },
52
+ onClick: this.toggleSwitch,
53
+ disabled: this.disabled
54
+ }, h("span", {
55
+ key: 'b76e89a1e37130542dd86ce3aed8c5690aeeda63',
56
+ class: "switch-handle"
57
+ })), this.labelOn && h("span", {
58
+ key: '4e5d4f8a2f19bb612a17fa73e441e7e718b71508',
59
+ class: "switch-label switch-label--on ml-8"
60
+ }, this.labelOn));
61
+ }
62
+ get el() {
63
+ return getElement(this);
64
+ }
65
+ };
66
+ EdsSwitch.style = EdsSwitchStyle0;
67
+
68
+ export { EdsSwitch as eds_switch };
@@ -0,0 +1,117 @@
1
+ import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
+ import { p as parseData } from './sharedUtils-a550989c.esm.js';
3
+ import 'react';
4
+ import 'react/jsx-runtime';
5
+ import 'react-dom';
6
+
7
+ const edsTimelineCss = ".max-w-sidebar{max-width:1224px}.mx-auto{margin-left:auto;margin-right:auto}.px-4{padding-left:0.25rem;padding-right:0.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.relative{position:relative}.absolute{position:absolute}.flex{display:flex}.w-4{width:0.25rem}.pr-4{padding-right:0.25rem}.pl-4{padding-left:0.25rem}.w-1\\/2{width:50%}.left-1\\/2{left:50%}.transform{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-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))}.bg-strong{background-color:var(--grey-700)}.h-full{height:100%}.z-0{z-index:0}.space-y-16>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.items-center{align-items:center}.justify-center{justify-content:center}.w-32{width:2rem}.h-32{height:2rem}.bg-accent{background-color:var(--green-500)}.rounded-full{border-radius:9999px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}";
8
+ const EdsTimelineStyle0 = edsTimelineCss;
9
+ const EdsTimeline = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.events = undefined;
13
+ this.selectedEvent = null;
14
+ this.parsedEvents = [];
15
+ }
16
+ parseEvents(newValue) {
17
+ const parsed = parseData(newValue);
18
+ // Map over the parsed events to ensure boolean conversion for "completed"
19
+ this.parsedEvents = Array.isArray(parsed) ? parsed.map(event => Object.assign(Object.assign({}, event), {
20
+ completed: event.completed === 'true' || event.completed === true
21
+ })) : [];
22
+ }
23
+ componentWillLoad() {
24
+ this.parseEvents(this.events);
25
+ }
26
+ componentDidLoad() {
27
+ const cards = this.el.querySelectorAll('eds-card-generic');
28
+ cards.forEach(card => {
29
+ this.emitContext(card);
30
+ });
31
+ }
32
+ emitContext(cardElement) {
33
+ const event = new CustomEvent('parentContext', {
34
+ detail: {
35
+ componentName: this.el.tagName.toLowerCase(),
36
+ identifier: null
37
+ }
38
+ });
39
+ cardElement.dispatchEvent(event);
40
+ }
41
+ handleEventClick(event) {
42
+ this.selectedEvent = event;
43
+ if (this.modalRef && typeof this.modalRef.open === 'function') {
44
+ this.modalRef.open();
45
+ }
46
+ }
47
+ render() {
48
+ return h("div", {
49
+ key: '63ce0ce7e3a632906f664011243abf9f816bc53a',
50
+ class: "max-w-sidebar mx-auto px-4 py-8"
51
+ }, h("div", {
52
+ key: '794d16f6b68d87bb1fb4665cc5ef84b381fb55ea',
53
+ class: "relative"
54
+ }, h("div", {
55
+ key: '2b82b5594a9ed5c056898725f40e56858282412a',
56
+ class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0"
57
+ }), h("div", {
58
+ key: '6d33b71396649e7b90d050c0858912fa49c309a7',
59
+ class: "space-y-16"
60
+ }, this.parsedEvents.map((event, index) => h("div", {
61
+ class: "relative flex"
62
+ }, h("div", {
63
+ class: `w-1/2 ${index % 2 === 0 ? 'pr-4' : ''}`
64
+ }, index % 2 === 0 && h("eds-card-generic", {
65
+ cardTitle: event.title,
66
+ url: "#",
67
+ description: event.description,
68
+ "heading-level": "h2",
69
+ tiny: true,
70
+ bg: !event.completed,
71
+ "with-hover": "false",
72
+ tags: JSON.stringify(event.completed ? [{
73
+ label: 'completed',
74
+ style: 'accent'
75
+ }] : [{
76
+ label: 'pending',
77
+ style: 'default'
78
+ }]),
79
+ onClick: () => this.handleEventClick(event)
80
+ })), h("div", {
81
+ class: "flex items-center justify-center relative"
82
+ }, event.completed ? h("div", {
83
+ class: "w-32 h-32 bg-accent rounded-full shadow flex items-center justify-center"
84
+ }) : h("div", {
85
+ class: "w-32 h-32 bg-strong rounded-full shadow flex items-center justify-center"
86
+ })), h("div", {
87
+ class: `w-1/2 ${index % 2 !== 0 ? 'pl-4' : ''}`
88
+ }, index % 2 !== 0 && h("eds-card-generic", {
89
+ cardTitle: event.title,
90
+ url: "#",
91
+ description: event.description,
92
+ "heading-level": "h2",
93
+ tiny: true,
94
+ bg: !event.completed,
95
+ "with-hover": "false",
96
+ tags: JSON.stringify(event.completed ? [{
97
+ label: 'completed',
98
+ style: 'accent'
99
+ }] : [{
100
+ label: 'pending',
101
+ style: 'default'
102
+ }]),
103
+ onClick: () => this.handleEventClick(event)
104
+ })))))));
105
+ }
106
+ get el() {
107
+ return getElement(this);
108
+ }
109
+ static get watchers() {
110
+ return {
111
+ "events": ["parseEvents"]
112
+ };
113
+ }
114
+ };
115
+ EdsTimeline.style = EdsTimelineStyle0;
116
+
117
+ export { EdsTimeline as eds_timeline };
@@ -0,0 +1,93 @@
1
+ import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ class ToastManager {
7
+ constructor() {
8
+ this.toastManagerElement = null;
9
+ }
10
+ /**
11
+ * Initialize the ToastManager with a reference to the `eds-toast-manager` component.
12
+ */
13
+ init(toastManagerElement) {
14
+ this.toastManagerElement = toastManagerElement;
15
+ }
16
+ /**
17
+ * Display a toast.
18
+ * @param message - The message to display.
19
+ * @param intent - The type of the toast ('success', 'error', 'warning', 'default').
20
+ */
21
+ show(message, intent = 'default') {
22
+ if (!this.toastManagerElement) {
23
+ // eslint-disable-next-line
24
+ console.error('ToastManager is not initialized. Ensure <eds-toast-manager> is rendered.');
25
+ return;
26
+ }
27
+ const event = new CustomEvent('show-toast', {
28
+ detail: {
29
+ message,
30
+ intent
31
+ }
32
+ });
33
+ this.toastManagerElement.dispatchEvent(event);
34
+ }
35
+ }
36
+ // Export a singleton instance
37
+ const toast = new ToastManager();
38
+ 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)}}";
39
+ const EdsToastManagerStyle0 = edsToastManagerCss;
40
+ const EdsToastManager = class {
41
+ constructor(hostRef) {
42
+ registerInstance(this, hostRef);
43
+ this.toastId = 0;
44
+ this.toasts = [];
45
+ }
46
+ connectedCallback() {
47
+ // Initialize the ToastManager singleton with this element
48
+ toast.init(this.hostElement);
49
+ // Listen for custom events
50
+ this.hostElement.addEventListener('show-toast', event => {
51
+ const {
52
+ message,
53
+ intent
54
+ } = event.detail;
55
+ this.addToast(message, intent);
56
+ });
57
+ }
58
+ /**
59
+ * Adds a new toast.
60
+ */
61
+ addToast(message, intent) {
62
+ const id = this.toastId++;
63
+ this.toasts = [...this.toasts, {
64
+ id,
65
+ message,
66
+ intent
67
+ }];
68
+ }
69
+ /**
70
+ * Removes a toast by ID.
71
+ */
72
+ removeToast(id) {
73
+ this.toasts = this.toasts.filter(t => t.id !== id);
74
+ }
75
+ render() {
76
+ return h("div", {
77
+ key: 'b86b71e71fa88b56acab6d7060e7b05beec344e1',
78
+ class: "toast-container"
79
+ }, this.toasts.map(t => h("div", {
80
+ key: t.id
81
+ }, h("eds-toast", {
82
+ message: t.message,
83
+ intent: t.intent,
84
+ onClick: () => this.removeToast(t.id)
85
+ }))));
86
+ }
87
+ get hostElement() {
88
+ return getElement(this);
89
+ }
90
+ };
91
+ EdsToastManager.style = EdsToastManagerStyle0;
92
+
93
+ export { EdsToastManager as eds_toast_manager };
@@ -0,0 +1,93 @@
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 = undefined;
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
+ if (this.duration && this.duration > 0) {
57
+ this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
58
+ }
59
+ }
60
+ disconnectedCallback() {
61
+ // Clear the timeout when the component is removed
62
+ clearTimeout(this.dismissTimeout);
63
+ }
64
+ render() {
65
+ if (!this.visible) {
66
+ return null;
67
+ }
68
+ const classes = toastStyles({
69
+ intent: this.intent
70
+ });
71
+ return h("div", {
72
+ class: classes,
73
+ role: "alert",
74
+ "aria-live": "assertive"
75
+ }, h("div", {
76
+ class: "flex items-center justify-between gap-4"
77
+ }, h("span", {
78
+ class: "f-ui-01"
79
+ }, this.message), h("eds-button", {
80
+ intent: "tertiary",
81
+ icon: "close",
82
+ "aria-label": "Close Toast",
83
+ onClick: () => this.dismissToast(),
84
+ "extra-class": "ml-8"
85
+ })));
86
+ }
87
+ get el() {
88
+ return getElement(this);
89
+ }
90
+ };
91
+ EdsToast.style = EdsToastStyle0;
92
+
93
+ export { EdsToast as eds_toast };
@@ -0,0 +1,68 @@
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: '8a798c644632d3168af51aa8a0775b7455ab5b52',
55
+ class: "container mx-auto px-4 py-8"
56
+ }, h("eds-table", {
57
+ key: '82a692c0f7e46fe7438a594a7b5c567855c0e308',
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 };