@ebrains/react 0.9.3-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 (51) 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 +22 -16
  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 +2 -2
  9. package/eds-alert.entry.esm.js +1 -1
  10. package/eds-app-root.entry.esm.js +4 -4
  11. package/eds-avatar_34.entry.esm.js +3594 -0
  12. package/eds-card-project.entry.esm.js +130 -13
  13. package/eds-card-tool.entry.esm.js +5 -5
  14. package/eds-cookies-preference.entry.esm.js +2 -2
  15. package/eds-feedback.entry.esm.js +12 -7
  16. package/eds-frame.entry.esm.js +6 -6
  17. package/eds-matomo-notice.entry.esm.js +5 -8
  18. package/eds-pagination_2.entry.esm.js +10 -10
  19. package/eds-progress-bar.entry.esm.js +19 -8
  20. package/eds-rating.entry.esm.js +1 -1
  21. package/eds-section-core_2.entry.esm.js +5 -5
  22. package/eds-spinner.entry.esm.js +3 -3
  23. package/eds-splash-screen.entry.esm.js +87 -0
  24. package/eds-switch.entry.esm.js +21 -11
  25. package/eds-timeline.entry.esm.js +5 -5
  26. package/eds-toast-manager.entry.esm.js +33 -2
  27. package/eds-toast.entry.esm.js +4 -3
  28. package/eds-trl.entry.esm.js +2 -2
  29. package/incorrect-use-of-colors.entry.esm.js +11 -8
  30. package/index.esm.js +1 -1
  31. package/index.esm2.js +39 -314
  32. package/logo-space.entry.esm.js +9 -9
  33. package/logo-variations-horizontal_2.entry.esm.js +28 -28
  34. package/logo-variations-tabs.entry.esm.js +1 -1
  35. package/logo-wrong-usage.entry.esm.js +25 -25
  36. package/package.json +1 -1
  37. package/src/components.d.ts +2 -2
  38. package/src/generated/components.d.ts +1 -1
  39. package/svg-repository.entry.esm.js +2 -2
  40. package/token-list_3.entry.esm.js +5 -5
  41. package/token-ratios.entry.esm.js +3 -3
  42. package/token-typography.entry.esm.js +2 -2
  43. package/color-2554aad6.esm.js +0 -122
  44. package/eds-avatar_27.entry.esm.js +0 -332
  45. package/eds-card-desc_2.entry.esm.js +0 -86
  46. package/eds-card-generic.entry.esm.js +0 -114
  47. package/eds-card-wrapper.entry.esm.js +0 -39
  48. package/eds-login_2.entry.esm.js +0 -1828
  49. package/eds-tabs.entry.esm.js +0 -143
  50. package/eds-tooltip.entry.esm.js +0 -125
  51. package/toastManager-d9eee791.esm.js +0 -34
@@ -1,9 +1,40 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
- import { t as toast } from './toastManager-d9eee791.esm.js';
3
2
  import 'react';
4
3
  import 'react/jsx-runtime';
5
4
  import 'react-dom';
6
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();
7
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)}}";
8
39
  const EdsToastManagerStyle0 = edsToastManagerCss;
9
40
  const EdsToastManager = class {
@@ -43,7 +74,7 @@ const EdsToastManager = class {
43
74
  }
44
75
  render() {
45
76
  return h("div", {
46
- key: 'cc2aa94e01507dc8c27e82dfa550af5da6eaba3e',
77
+ key: 'b86b71e71fa88b56acab6d7060e7b05beec344e1',
47
78
  class: "toast-container"
48
79
  }, this.toasts.map(t => h("div", {
49
80
  key: t.id
@@ -30,7 +30,7 @@ const EdsToast = class {
30
30
  };
31
31
  this.message = undefined;
32
32
  this.intent = 'default';
33
- this.duration = 5000;
33
+ this.duration = undefined;
34
34
  this.visible = true;
35
35
  }
36
36
  componentDidLoad() {
@@ -53,8 +53,9 @@ const EdsToast = class {
53
53
  btnElement.dispatchEvent(event);
54
54
  }
55
55
  connectedCallback() {
56
- // Auto-dismiss the toast after the specified duration
57
- this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
56
+ if (this.duration && this.duration > 0) {
57
+ this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
58
+ }
58
59
  }
59
60
  disconnectedCallback() {
60
61
  // Clear the timeout when the component is removed
@@ -51,10 +51,10 @@ const EdsTrl = class {
51
51
  }
52
52
  };
53
53
  return h("div", {
54
- key: '7f2775e107e053cf1e8091f97915e6bc372c3954',
54
+ key: '8a798c644632d3168af51aa8a0775b7455ab5b52',
55
55
  class: "container mx-auto px-4 py-8"
56
56
  }, h("eds-table", {
57
- key: '9576b1c5dc72335ef0f7158fa4eaa44835acd8db',
57
+ key: '82a692c0f7e46fe7438a594a7b5c567855c0e308',
58
58
  "table-data": JSON.stringify(tableData),
59
59
  config: JSON.stringify(tableConfig),
60
60
  "rows-per-page": "2",
@@ -29,20 +29,23 @@ const IncorrectUseOfColors = class {
29
29
  }
30
30
  render() {
31
31
  return h("div", {
32
- key: '1cfc3c78012371498476886214e85fbf6e387626',
32
+ key: '3503dcc0e2d3f5b08eec400e74484e5725d7b4af',
33
33
  class: "container"
34
+ }, h("div", {
35
+ key: '657857e8826e60c498450326306234c59b4e770b',
36
+ class: "mb-8"
34
37
  }, h("eds-alert", {
35
- key: '33449eeae0bca270a82d32de75d5d7c54d8b8c6c',
38
+ key: '88512240affc65314593f8573b3a13f58fb2806d',
36
39
  message: "Note that, each of the four colour tones cannot be mixed in the same composition.",
37
40
  intent: "error"
38
- }), h("div", {
39
- key: 'd436f34bf074c175c6308b822c820604a5e272bc',
41
+ })), h("div", {
42
+ key: '8614d445187d2614e5833b8c89c66b178762574e',
40
43
  class: "flex"
41
44
  }, h("div", {
42
- key: '5f839c0f214b774f13af1499fe3e5f8485f959c5',
45
+ key: '1b36d52dbcbb65e1edb4513899ec898d691193c0',
43
46
  class: "w-full"
44
47
  }, h("ul", {
45
- key: '5cbb81288c0e61431aed523d77f2c6d231c8ce7e',
48
+ key: '13fb2eaca0ad3fb93487f6c0c976142a18870b4d',
46
49
  class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
47
50
  }, primary.map(color => h("li", {
48
51
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -52,10 +55,10 @@ const IncorrectUseOfColors = class {
52
55
  backgroundColor: color.background
53
56
  }
54
57
  }))))), h("div", {
55
- key: '3622c7c8376208843d3e59c6548e41d9ca8c2b21',
58
+ key: 'adec93113e4c02168906e1da65f48c20e9b2c7dc',
56
59
  class: "w-full"
57
60
  }, h("ul", {
58
- key: 'd74e34f45e1d377be5f1087a345dee219b1fc5a3',
61
+ key: 'd0b43589866f53c92084b270afb3571ed2723fc8',
59
62
  class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
60
63
  }, incorrect.map(color => h("li", {
61
64
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
package/index.esm.js CHANGED
@@ -1,4 +1,4 @@
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';
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 EdsGauge, s as EdsHeader, t as EdsIconWrapper, u as EdsImg, v as EdsInputField, w as EdsLink, x as EdsLogo, y as EdsMatomoNotice, z as EdsModal, A as EdsPagination, B as EdsPie, C as EdsProgressBar, D as EdsRating, F as EdsSocialNetworks, G as EdsSpinner, I as EdsSplashScreen, J as EdsSteps, K as EdsStepsV2, L as EdsSwitch, M as EdsTable, N as EdsTabs, O as EdsTag, P as EdsToast, Q as EdsTooltip, R as EdsUser } from './index.esm2.js';
2
2
  import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';