@ebrains/react 0.9.3-beta → 1.1.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 (93) hide show
  1. package/README.md +3 -3
  2. package/{analytics-44b1416b.esm.js → analytics-d99780e3.esm.js} +2 -2
  3. package/color-primary-palette_6.entry.esm.js +106 -106
  4. package/components-section.entry.esm.js +23 -17
  5. package/correct-use-of-colors.entry.esm.js +33 -33
  6. package/docs-palettes.entry.esm.js +1 -1
  7. package/docs-tokens.entry.esm.js +1 -1
  8. package/eds-accordion.entry.esm.js +11 -11
  9. package/eds-alert.entry.esm.js +3 -3
  10. package/eds-app-root.entry.esm.js +4 -4
  11. package/eds-avatar_28.entry.esm.js +3523 -0
  12. package/eds-breadcrumb.entry.esm.js +179 -0
  13. package/eds-card-desc_2.entry.esm.js +6 -7
  14. package/eds-card-generic.entry.esm.js +4 -4
  15. package/eds-card-project.entry.esm.js +130 -13
  16. package/eds-card-tags.entry.esm.js +1 -1
  17. package/eds-card-tool.entry.esm.js +5 -5
  18. package/eds-code-block.entry.esm.js +7 -7
  19. package/eds-cookies-preference.entry.esm.js +2 -2
  20. package/eds-feedback.entry.esm.js +12 -7
  21. package/eds-frame.entry.esm.js +6 -6
  22. package/eds-gauge.entry.esm.js +78 -0
  23. package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
  24. package/eds-icon-arrow-right.entry.esm.js +1 -1
  25. package/eds-icon-bluesky.entry.esm.js +1 -1
  26. package/eds-icon-bookmark.entry.esm.js +1 -1
  27. package/eds-icon-chevron-down.entry.esm.js +1 -1
  28. package/eds-icon-chevron-left.entry.esm.js +1 -1
  29. package/eds-icon-chevron-right.entry.esm.js +1 -1
  30. package/eds-icon-chevron-up.entry.esm.js +1 -1
  31. package/eds-icon-close.entry.esm.js +1 -1
  32. package/eds-icon-copy.entry.esm.js +1 -1
  33. package/eds-icon-eu.entry.esm.js +1 -1
  34. package/eds-icon-external.entry.esm.js +1 -1
  35. package/eds-icon-facebook.entry.esm.js +1 -1
  36. package/eds-icon-gitlab.entry.esm.js +1 -1
  37. package/eds-icon-linkedin.entry.esm.js +1 -1
  38. package/eds-icon-loader.entry.esm.js +1 -1
  39. package/eds-icon-mastodon.entry.esm.js +1 -1
  40. package/eds-icon-menu.entry.esm.js +1 -1
  41. package/eds-icon-minus.entry.esm.js +1 -1
  42. package/eds-icon-more.entry.esm.js +1 -1
  43. package/eds-icon-paper.entry.esm.js +1 -1
  44. package/eds-icon-plus.entry.esm.js +1 -1
  45. package/eds-icon-portal.entry.esm.js +1 -1
  46. package/eds-icon-private.entry.esm.js +1 -1
  47. package/eds-icon-public.entry.esm.js +1 -1
  48. package/eds-icon-search.entry.esm.js +1 -1
  49. package/eds-icon-star.entry.esm.js +1 -1
  50. package/eds-icon-success.entry.esm.js +1 -1
  51. package/eds-icon-thumbs-down.entry.esm.js +1 -1
  52. package/eds-icon-thumbs-up.entry.esm.js +1 -1
  53. package/eds-icon-tutorial.entry.esm.js +1 -1
  54. package/eds-icon-twitter.entry.esm.js +1 -1
  55. package/eds-icon-unknown.entry.esm.js +1 -1
  56. package/eds-icon-updown.entry.esm.js +1 -1
  57. package/eds-icon-user.entry.esm.js +1 -1
  58. package/eds-icon-youtube.entry.esm.js +1 -1
  59. package/eds-matomo-notice.entry.esm.js +5 -8
  60. package/eds-pie.entry.esm.js +131 -0
  61. package/eds-progress-bar.entry.esm.js +19 -8
  62. package/eds-rating.entry.esm.js +1 -1
  63. package/eds-section-core_2.entry.esm.js +5 -5
  64. package/eds-spinner.entry.esm.js +3 -3
  65. package/eds-splash-screen.entry.esm.js +87 -0
  66. package/eds-switch.entry.esm.js +21 -11
  67. package/eds-timeline.entry.esm.js +5 -5
  68. package/eds-toast-manager.entry.esm.js +33 -2
  69. package/eds-toast.entry.esm.js +4 -3
  70. package/eds-tooltip.entry.esm.js +12 -96
  71. package/eds-trl.entry.esm.js +2 -2
  72. package/incorrect-use-of-colors.entry.esm.js +11 -8
  73. package/index.esm.js +1 -1
  74. package/index.esm2.js +51 -308
  75. package/logo-space.entry.esm.js +9 -9
  76. package/logo-variations-horizontal_2.entry.esm.js +28 -28
  77. package/logo-variations-tabs.entry.esm.js +1 -1
  78. package/logo-wrong-usage.entry.esm.js +25 -25
  79. package/package.json +1 -1
  80. package/src/components.d.ts +2 -2
  81. package/src/generated/components.d.ts +1 -1
  82. package/svg-repository.entry.esm.js +2 -2
  83. package/token-list_3.entry.esm.js +5 -5
  84. package/token-ratios.entry.esm.js +3 -3
  85. package/token-spacing.entry.esm.js +93 -0
  86. package/token-typography.entry.esm.js +2 -2
  87. package/color-2554aad6.esm.js +0 -122
  88. package/eds-avatar_27.entry.esm.js +0 -332
  89. package/eds-card-wrapper.entry.esm.js +0 -39
  90. package/eds-login_2.entry.esm.js +0 -1828
  91. package/eds-pagination_2.entry.esm.js +0 -493
  92. package/eds-tabs.entry.esm.js +0 -143
  93. package/toastManager-d9eee791.esm.js +0 -34
@@ -3,37 +3,48 @@ import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';
5
5
 
6
- const edsProgressBarCss = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1 )}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}";
6
+ const edsProgressBarCss = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.absolute{position:absolute}.relative{position:relative}.z-0{z-index:0}.z-10{z-index:10}.inset-0{inset:0rem}.pointer-events-none{pointer-events:none}";
7
7
  const EdsProgressBarStyle0 = edsProgressBarCss;
8
8
  const EdsProgressBar = class {
9
9
  constructor(hostRef) {
10
10
  registerInstance(this, hostRef);
11
11
  this.value = 0;
12
+ this.rounded = true;
12
13
  }
13
14
  /**
14
15
  * Method to update the progress value externally.
15
16
  * @param newValue The new progress value (0-100).
16
17
  */
17
18
  async updateValue(newValue) {
18
- this.value = Math.min(100, Math.max(0, newValue)); // Clamp value between 0 and 100
19
+ this.value = Math.min(100, Math.max(0, newValue)); // Clamp 0100
19
20
  }
20
21
  render() {
21
- const progressValue = this.value;
22
+ const progressValue = Math.min(100, Math.max(0, this.value));
23
+ // Outer container classes (conditionally rounded)
24
+ const outerClasses = ['outer', 'w-full', 'h-24', 'bg-default', 'border', 'border-softer', 'overflow-hidden', this.rounded ? 'rounded-lg' : '', 'relative'].filter(Boolean).join(' ');
25
+ // Fill bar classes (conditionally rounded only when >0)
26
+ const fillClasses = ['inner', 'h-full', 'transition-all', 'duration-300', 'bg-accent', progressValue > 0 && this.rounded ? 'rounded-lg' : '', 'z-0'].filter(Boolean).join(' ');
22
27
  return h("div", {
23
- key: '0f47fedbf9d44887f65b399e184215f0937b1df1',
28
+ key: '3360c1a9e61c83fee5312d007f6d2965a8983eba',
24
29
  role: "progressbar",
25
30
  "aria-valuemin": "0",
26
31
  "aria-valuemax": "100",
27
32
  "aria-valuenow": progressValue,
28
33
  "aria-valuetext": `${progressValue}%`,
29
- class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden"
34
+ class: outerClasses
30
35
  }, h("div", {
31
- key: 'a2d095d778842c969832ea6b1ba7f7ef917d1390',
32
- class: `inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02`,
36
+ key: '7210dc5931f08626b286c30ae790a3a864533632',
37
+ class: fillClasses,
33
38
  style: {
34
39
  width: `${progressValue}%`
35
40
  }
36
- }, progressValue, "%"));
41
+ }), h("div", {
42
+ key: '7586cd593b4e851f4605ad33b96781841ee0b1aa',
43
+ class: "absolute inset-0 flex items-center justify-center pointer-events-none z-10"
44
+ }, h("span", {
45
+ key: '21fa3de543e5e717ed4fd76c689aa47c3fa6a853',
46
+ class: "text-default f-body-02"
47
+ }, progressValue, "%")));
37
48
  }
38
49
  };
39
50
  EdsProgressBar.style = EdsProgressBarStyle0;
@@ -48,7 +48,7 @@ const EdsRating = class {
48
48
  }
49
49
  render() {
50
50
  return h("div", {
51
- key: 'd1650c37f02bf467f888d0afd0a025198bc0eedc',
51
+ key: '6686575f0b8b9017bf19b105208f6adbfd46dabd',
52
52
  role: "radiogroup",
53
53
  class: "stars flex space-x-1 my-8"
54
54
  }, Array.from({
@@ -15,13 +15,13 @@ const EdsSectionCore = class {
15
15
  render() {
16
16
  const TagType = this.tag; // Set dynamic tag type (div or section)
17
17
  return h(TagType, {
18
- key: 'f07162204271dca0f1ec8a3d309ab9d38a9fff4f'
18
+ key: '43f8d599041ae0c9761988fdec4872ec4a8ca037'
19
19
  }, h("eds-section-heading", {
20
- key: 'c4db2a67151fcec22306f624b071725518292e65',
20
+ key: 'd120ddd851a0485e2edb43e2a6f508a661f35c07',
21
21
  headingLevel: this.headingLevel,
22
22
  sectionTitle: this.sectionTitle
23
23
  }), h("slot", {
24
- key: 'e610f4777f1b334e20482862504085f5317a63df'
24
+ key: '9818b82a3eebcb741f5bccc9781e4212f2c5fa3d'
25
25
  }));
26
26
  }
27
27
  };
@@ -52,7 +52,7 @@ const EdsSectionHeading = class {
52
52
  const TagType = this.tag; // Dynamically set tag type for the container
53
53
  const HeadingTag = this.headingLevel; // Dynamically set heading level
54
54
  return h(TagType, {
55
- key: 'efa6dd7e228db2b86961efdff9b5dd9729a1a24b',
55
+ key: '740ed8b3208e07091a1f4c79888e172dec33773a',
56
56
  class: {
57
57
  'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
58
58
  container: this.withContainer,
@@ -60,7 +60,7 @@ const EdsSectionHeading = class {
60
60
  'pt-28': !this.spacingLarge
61
61
  }
62
62
  }, h(HeadingTag, {
63
- key: 'dd50f0fe3baf084c71dc4c8fa745484645a58f76',
63
+ key: '4d4ceef35b7cb06bfbff2fdae47e66dd7ac10c49',
64
64
  class: this.getHeadingClass()
65
65
  }, this.sectionTitle));
66
66
  }
@@ -50,13 +50,13 @@ const EdsSpinner = class {
50
50
  justifyContent: 'center'
51
51
  };
52
52
  return h(Host, {
53
- key: '77f17386e37b3dae21c2893dab53ef046d74b8fb'
53
+ key: 'f687ccbbb05840b7699202f3758ec4a8d0de1bc4'
54
54
  }, h("div", {
55
- key: 'c9420f866d61331901df7d6d681d09f75e31846c',
55
+ key: '4bb5c697f1ccd90d2d65d519fcfb3ec809b106ac',
56
56
  class: "spinner-overlay",
57
57
  style: overlayStyle
58
58
  }, h("span", {
59
- key: '83497de6228b75fad77225a1b6fee9a614d68fe4',
59
+ key: 'a07722d9ee9c94d03d9766a4b297a498998c00be',
60
60
  class: "spinner",
61
61
  style: spinnerStyle
62
62
  })));
@@ -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 };
@@ -1,20 +1,27 @@
1
- import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
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';
2
3
  import 'react';
3
4
  import 'react/jsx-runtime';
4
5
  import 'react-dom';
5
6
 
6
- const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-size:14px;margin:0 8px}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)}";
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}";
7
8
  const EdsSwitchStyle0 = edsSwitchCss;
8
9
  const EdsSwitch = class {
9
10
  constructor(hostRef) {
10
11
  registerInstance(this, hostRef);
11
- this.toggle = createEvent(this, "toggle", 7);
12
+ this.uiswitch = createEvent(this, "uiswitch", 7);
12
13
  this.toggleSwitch = () => {
13
14
  if (this.disabled) {
14
15
  return;
15
16
  }
16
17
  this.checked = !this.checked;
17
- this.toggle.emit(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
+ });
18
25
  };
19
26
  this.checked = false;
20
27
  this.disabled = false;
@@ -25,13 +32,13 @@ const EdsSwitch = class {
25
32
  // Compute an accessible name based on state.
26
33
  const accessibleLabel = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : 'Toggle switch';
27
34
  return h("div", {
28
- key: 'ef70db7a5ed4f8e8db7e1a9e94334a3686ec1d0e',
35
+ key: '385c1463b11e83ff5b982218e0f28c54299210fd',
29
36
  class: "switch-container"
30
37
  }, this.labelOff && h("span", {
31
- key: '4a18de129ba0b4e643a0929b6fc797b7bc35cb4c',
32
- class: "switch-label switch-label--off"
38
+ key: 'f7e825a34487a1cec466b5172d77c2802029607c',
39
+ class: "switch-label switch-label--off mr-8"
33
40
  }, this.labelOff), h("button", {
34
- key: '2d75656fadf36a38269d361fef176e243e1291c2',
41
+ key: 'fd1e8ffab675ee79edc6b99de4dfff42545d91af',
35
42
  type: "button",
36
43
  role: "switch",
37
44
  "aria-checked": this.checked ? 'true' : 'false',
@@ -45,13 +52,16 @@ const EdsSwitch = class {
45
52
  onClick: this.toggleSwitch,
46
53
  disabled: this.disabled
47
54
  }, h("span", {
48
- key: '71bd3c8c042ac337c1392977c27e8f4ccde5e79f',
55
+ key: '0d185957ffe2577ffc8798c298820c84c838a2a4',
49
56
  class: "switch-handle"
50
57
  })), this.labelOn && h("span", {
51
- key: '7cfa0b1f805271c9281853a872cedf93db7e07d8',
52
- class: "switch-label switch-label--on"
58
+ key: 'f12b752ff94a363bb9593bd00cf43e7110e4399e',
59
+ class: "switch-label switch-label--on ml-8"
53
60
  }, this.labelOn));
54
61
  }
62
+ get el() {
63
+ return getElement(this);
64
+ }
55
65
  };
56
66
  EdsSwitch.style = EdsSwitchStyle0;
57
67