@ebrains/react 0.3.0-alpha.0 → 0.5.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.
Files changed (77) hide show
  1. package/analytics-1cde8e4a.esm.js +47 -0
  2. package/color-2554aad6.esm.js +122 -0
  3. package/color-primary-palette_6.entry.esm.js +106 -106
  4. package/correct-use-of-colors.entry.esm.js +33 -33
  5. package/eds-accordion.entry.esm.js +24 -30
  6. package/eds-alert_17.entry.esm.js +187 -0
  7. package/{eds-card-desc_3.entry.esm.js → eds-avatar_4.entry.esm.js} +71 -7
  8. package/eds-card-generic.entry.esm.js +6 -7
  9. package/eds-card-project.entry.esm.js +12 -11
  10. package/eds-card-section.entry.esm.js +4 -4
  11. package/eds-card-tags.entry.esm.js +1 -1
  12. package/eds-card-tool.entry.esm.js +5 -6
  13. package/eds-card-wrapper.entry.esm.js +4 -4
  14. package/eds-code-block.entry.esm.js +56 -9
  15. package/eds-components-section.entry.esm.js +14 -2
  16. package/eds-docs-palettes.entry.esm.js +1 -1
  17. package/eds-docs-tokens.entry.esm.js +1 -1
  18. package/eds-dropdown_2.entry.esm.js +235 -0
  19. package/eds-form.entry.esm.js +59 -23
  20. package/eds-frame.entry.esm.js +4 -4
  21. package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
  22. package/eds-icon-arrow-right.entry.esm.js +1 -1
  23. package/eds-icon-bluesky.entry.esm.js +1 -1
  24. package/eds-icon-chevron-down.entry.esm.js +1 -1
  25. package/eds-icon-chevron-left.entry.esm.js +1 -1
  26. package/eds-icon-chevron-right.entry.esm.js +1 -1
  27. package/eds-icon-chevron-up.entry.esm.js +1 -1
  28. package/eds-icon-close.entry.esm.js +1 -1
  29. package/eds-icon-copy.entry.esm.js +1 -1
  30. package/eds-icon-eu.entry.esm.js +1 -1
  31. package/eds-icon-facebook.entry.esm.js +1 -1
  32. package/eds-icon-gitlab.entry.esm.js +1 -1
  33. package/eds-icon-linkedin.entry.esm.js +1 -1
  34. package/eds-icon-loader.entry.esm.js +1 -1
  35. package/eds-icon-mastodon.entry.esm.js +1 -1
  36. package/eds-icon-menu.entry.esm.js +1 -1
  37. package/eds-icon-more.entry.esm.js +1 -1
  38. package/eds-icon-search.entry.esm.js +1 -1
  39. package/eds-icon-success.entry.esm.js +1 -1
  40. package/eds-icon-twitter.entry.esm.js +1 -1
  41. package/eds-icon-user.entry.esm.js +1 -1
  42. package/eds-icon-youtube.entry.esm.js +1 -1
  43. package/eds-input_7.entry.esm.js +39 -28
  44. package/eds-login.entry.esm.js +66 -45
  45. package/eds-logo-variations.entry.esm.js +1 -1
  46. package/eds-matomo-notice.entry.esm.js +1 -2
  47. package/eds-modal.entry.esm.js +57 -42
  48. package/eds-navigator.entry.esm.js +5 -5
  49. package/eds-pagination_2.entry.esm.js +35 -19
  50. package/eds-progress-bar.entry.esm.js +7 -2
  51. package/eds-section-core_2.entry.esm.js +5 -5
  52. package/eds-svg-repository.entry.esm.js +1 -1
  53. package/eds-tab.entry.esm.js +1 -1
  54. package/eds-tabs-content.entry.esm.js +5 -5
  55. package/eds-tabs.entry.esm.js +4 -4
  56. package/eds-timeline.entry.esm.js +6 -5
  57. package/eds-tooltip.entry.esm.js +12 -3
  58. package/eds-trl.entry.esm.js +9 -10
  59. package/eds-user.entry.esm.js +118 -0
  60. package/eds-vertical-stepper.entry.esm.js +81 -0
  61. package/incorrect-use-of-colors.entry.esm.js +7 -7
  62. package/index.esm.js +1 -1
  63. package/index.esm2.js +18 -13
  64. package/{keycloak-13893af6.esm.js → keycloak-d502ec16.esm.js} +219 -168
  65. package/logo-space.entry.esm.js +4 -4
  66. package/logo-variations-horizontal_2.entry.esm.js +26 -26
  67. package/logo-wrong-usage.entry.esm.js +37 -37
  68. package/package.json +1 -1
  69. package/src/components.d.ts +3 -1
  70. package/token-list_3.entry.esm.js +5 -5
  71. package/token-ratios.entry.esm.js +3 -3
  72. package/token-spacing.entry.esm.js +26 -26
  73. package/token-typography.entry.esm.js +2 -2
  74. package/color-0ba8ed56.esm.js +0 -423
  75. package/eds-alert.entry.esm.js +0 -102
  76. package/eds-avatar_17.entry.esm.js +0 -209
  77. package/eds-rating.entry.esm.js +0 -71
@@ -42,13 +42,13 @@ const CorrectUseOfColors = class {
42
42
  }
43
43
  render() {
44
44
  return h("div", {
45
- key: '33f38f14e5b6e7271ae26608fb1a1ed0c7930c7c',
45
+ key: '58274bc750821893f1ff6db6af0c92557e2037dc',
46
46
  class: "container"
47
47
  }, h("p", {
48
- key: '4857375e983add7d8e5e0a0d9896641774be018e',
48
+ key: 'f16ae70777dc595edb9f8ef20df33721816a472a',
49
49
  class: "f-body-01"
50
50
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
51
- key: '1c6bd69472074babf8f830fdba9be31e73afcd88',
51
+ key: 'c98c49daddf43987002dd69ab1c00dffbae5e69a',
52
52
  label: "primary",
53
53
  size: "small",
54
54
  intent: "blueish",
@@ -56,7 +56,7 @@ const CorrectUseOfColors = class {
56
56
  url: "../color-palette/#primary-palette",
57
57
  "extra-class": "inline-block ml-4"
58
58
  }), "and", h("eds-link", {
59
- key: 'ae3429fadbea001f01731d3c15f28865d668a50a',
59
+ key: 'e466f6f7e05f68896114551f59673c707d5fd30f',
60
60
  label: "support",
61
61
  size: "small",
62
62
  intent: "blueish",
@@ -64,13 +64,13 @@ const CorrectUseOfColors = class {
64
64
  url: "../color-palette/#support-palette",
65
65
  "extra-class": "inline-block ml-4"
66
66
  }), "color palettes."), h("div", {
67
- key: 'd8c6b9ab88abbf6194a4fb26120244982b59c2c4',
67
+ key: '32dfc27beebbbab3949c7695293800a2ff552ceb',
68
68
  class: "flex"
69
69
  }, h("div", {
70
- key: 'fc7f854940caabb9e032999f51732b64555e96e7',
70
+ key: 'e01d74cf63c84f66d868e180589b45cbc59ebff7',
71
71
  class: "w-full"
72
72
  }, h("ul", {
73
- key: '99c6a2e47c683ac38f2a14feec80177c0cf1c174',
73
+ key: '162e9c5ed57689a94c5c59e2664bba2adfcd60fc',
74
74
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
75
75
  }, primary.map(color => h("li", {
76
76
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -80,10 +80,10 @@ const CorrectUseOfColors = class {
80
80
  backgroundColor: color.background
81
81
  }
82
82
  }))))), h("div", {
83
- key: '91048e89cff083356c589c0f1bfecdd482e0c797',
83
+ key: 'bb71abb645789030487eccdd0abaf9b223c12ec8',
84
84
  class: "w-full"
85
85
  }, h("ul", {
86
- key: '6ee69388227089a5224a6d249c8e1eea4efde128',
86
+ key: 'f85702460f89881d6b8642decad848affdc7002f',
87
87
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
88
88
  }, support.map(color => h("li", {
89
89
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -93,10 +93,10 @@ const CorrectUseOfColors = class {
93
93
  backgroundColor: color.background
94
94
  }
95
95
  })))))), h("p", {
96
- key: 'c0a8e42942f2655648aa2ec3ce74bbf8d043ba63',
96
+ key: '7b5b8b9c0013a91c97f24c239bde32a727695707',
97
97
  class: "f-body-01"
98
98
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
99
- key: '3f272298bcd7d0e6ad791edc408ef636349fbf7d',
99
+ key: '81dc2c31eb283a2f64a1fd32329b35b1d04afc12',
100
100
  label: "purple",
101
101
  size: "small",
102
102
  intent: "blueish",
@@ -104,7 +104,7 @@ const CorrectUseOfColors = class {
104
104
  url: "../color-palette/#primary-palette",
105
105
  "extra-class": "inline-block ml-4"
106
106
  }), "and", h("eds-link", {
107
- key: '9a0b28f388483944aa4b053b9f8e807c1383431e',
107
+ key: 'd90877918d973595a7b8bdacd6bb80f1f04cab5b',
108
108
  label: "support",
109
109
  size: "small",
110
110
  intent: "blueish",
@@ -112,13 +112,13 @@ const CorrectUseOfColors = class {
112
112
  url: "../color-palette/#support-palette",
113
113
  "extra-class": "inline-block ml-4"
114
114
  }), "color palettes."), h("div", {
115
- key: '27ab1cdb936918fafe122c5a569c83322043bb79',
115
+ key: '81cf06bb6932b2120b210e7d1ee9d556cedc949b',
116
116
  class: "flex"
117
117
  }, h("div", {
118
- key: '037b9916ff3a3e8c2e9db64b650d44a57aedbcf9',
118
+ key: '2cc1571fe83620fcfa8f961af93b7b0e8e970eb2',
119
119
  class: "w-full"
120
120
  }, h("ul", {
121
- key: '60f4f6290b31a29852fb934c678edcaa61c8e930',
121
+ key: 'b6b1f7f874dbd8784a0253187438c2eb6282a815',
122
122
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
123
123
  }, purple.map(color => h("li", {
124
124
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -128,10 +128,10 @@ const CorrectUseOfColors = class {
128
128
  backgroundColor: color.background
129
129
  }
130
130
  }))))), h("div", {
131
- key: '36397292a31417703736b3be5b77e17241675dd9',
131
+ key: '49a874de125699d800aee6256bb5b3bf9a0bf907',
132
132
  class: "w-full"
133
133
  }, h("ul", {
134
- key: '20a9e6bb396c184c2718a18554eb1b4828817379',
134
+ key: '10d41b5ab948c87c8db43fbddefbe3453c5384a9',
135
135
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
136
136
  }, support.map(color => h("li", {
137
137
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -141,10 +141,10 @@ const CorrectUseOfColors = class {
141
141
  backgroundColor: color.background
142
142
  }
143
143
  })))))), h("p", {
144
- key: '0b89819b9fce1dff39b06b70873d651b7a1c84ac',
144
+ key: 'bc7c40435b87cd31b5bbb2315b3f50fa88b5bafb',
145
145
  class: "f-body-01"
146
146
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
147
- key: '9b3e7d46ac8116ff5f47f895bb06e89cd49c4e03',
147
+ key: 'd5a9f4c30d9108bd8c8207ee0130a15b9c7ff53f',
148
148
  label: "blue",
149
149
  size: "small",
150
150
  intent: "blueish",
@@ -152,7 +152,7 @@ const CorrectUseOfColors = class {
152
152
  url: "../color-palette/#primary-palette",
153
153
  "extra-class": "inline-block ml-4"
154
154
  }), "and", h("eds-link", {
155
- key: '94c3384e546bcae55d5634064a37436b4cdaab0f',
155
+ key: '35c2440f2c606cd4e8e69b33850ca908f6f36a4a',
156
156
  label: "support",
157
157
  size: "small",
158
158
  intent: "blueish",
@@ -160,13 +160,13 @@ const CorrectUseOfColors = class {
160
160
  url: "../color-palette/#support-palette",
161
161
  "extra-class": "inline-block ml-4"
162
162
  }), "color palettes."), h("div", {
163
- key: '7e3fe503559fa6865b824fd7f93dfdf8ed368f34',
163
+ key: 'cf9dde65d107b20c67e0036e891ad37c1d685477',
164
164
  class: "flex"
165
165
  }, h("div", {
166
- key: '4ed98a3b92ba8b73e3cd67dec625b4b8dfb34ee1',
166
+ key: '807350f20ee902df273ce35c217bcaa134502d13',
167
167
  class: "w-full"
168
168
  }, h("ul", {
169
- key: '0ccfd018568eb834ae05771976122736f5944205',
169
+ key: '8198d1e59cb9477978a0b78714e7884a75ce52c0',
170
170
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
171
171
  }, blue.map(color => h("li", {
172
172
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -176,10 +176,10 @@ const CorrectUseOfColors = class {
176
176
  backgroundColor: color.background
177
177
  }
178
178
  }))))), h("div", {
179
- key: 'd2cef9f5bd8ce7fb103e22a8964cee88853c1162',
179
+ key: 'ed4f89cd3d5544a199d0a516e23ee877c16dad6a',
180
180
  class: "w-full"
181
181
  }, h("ul", {
182
- key: '24301ce590bd1530316f351202bd76fafaa7dda5',
182
+ key: '47f8617629f34252b2d533f5932dd14b9117f601',
183
183
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
184
184
  }, support.map(color => h("li", {
185
185
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -189,10 +189,10 @@ const CorrectUseOfColors = class {
189
189
  backgroundColor: color.background
190
190
  }
191
191
  })))))), h("p", {
192
- key: '748852527301ab6465b593f5f271dc6dcef9d198',
192
+ key: '7b99385726cda59f07b66ff99e050588d5778421',
193
193
  class: "f-body-01"
194
194
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
195
- key: 'f035467c04170412a1b06f05b8675b6be57e8aa2',
195
+ key: 'f3719f08484d40ceb9ece89474f473cf9e44ee53',
196
196
  label: "redish",
197
197
  size: "small",
198
198
  intent: "blueish",
@@ -200,7 +200,7 @@ const CorrectUseOfColors = class {
200
200
  url: "../color-palette/#primary-palette",
201
201
  "extra-class": "inline-block ml-4"
202
202
  }), "and", h("eds-link", {
203
- key: '6e4eb577c6582a160b8282b54a6edfc58f20926b',
203
+ key: 'f1ee0fbf78a5da5f6a7a0836f63cc3312f68a547',
204
204
  label: "support",
205
205
  size: "small",
206
206
  intent: "blueish",
@@ -208,13 +208,13 @@ const CorrectUseOfColors = class {
208
208
  url: "../color-palette/#support-palette",
209
209
  "extra-class": "inline-block ml-4"
210
210
  }), "color palettes."), h("div", {
211
- key: '9209fd1ab3092cd21dd81a3328171c8de4fb8bca',
211
+ key: '833dcd6ad96a0c36a127c5384d0858b879bf0b05',
212
212
  class: "flex"
213
213
  }, h("div", {
214
- key: 'dc71b931a70fbd31a4f72814b23a1d97933bc721',
214
+ key: 'cf1297f1dfed3e70c184cdb3f4e116292ce1e57f',
215
215
  class: "w-full"
216
216
  }, h("ul", {
217
- key: 'd3f6f25439b6fbc8e8c08b39bf46de9ce52482fa',
217
+ key: '9d8d9e0f78348cee56f6c91b3289a90f25c088e4',
218
218
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
219
219
  }, red.map(color => h("li", {
220
220
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -224,10 +224,10 @@ const CorrectUseOfColors = class {
224
224
  backgroundColor: color.background
225
225
  }
226
226
  }))))), h("div", {
227
- key: '78d64d48a72836043c53e485269402bf566a5d98',
227
+ key: '836dfd427a087ee512970bf52ee0612a24cfaa72',
228
228
  class: "w-full"
229
229
  }, h("ul", {
230
- key: '6eb824d03f4d0e2d3966963c899473e242b31dc6',
230
+ key: '08e2b7603c2c093b2bd8931d1993aca89801ad1d',
231
231
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
232
232
  }, support.map(color => h("li", {
233
233
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
2
+ import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
2
3
  import 'react';
3
4
  import 'react/jsx-runtime';
4
5
  import 'react-dom';
@@ -14,9 +15,17 @@ const EdsAccordion = class {
14
15
  * Toggles the `isExpanded` state and emits the `accordionChange` event.
15
16
  */
16
17
  this.handleClick = () => {
18
+ var _a;
17
19
  this.isExpanded = !this.isExpanded;
18
20
  this.accordionChange.emit(this.isExpanded);
19
21
  this.setPanelHeight();
22
+ sendAnalytics({
23
+ category: 'ui-component',
24
+ parentContext: null,
25
+ tag: this.el.tagName.toLowerCase(),
26
+ name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
27
+ action: this.isExpanded ? 'expanded' : 'collapsed'
28
+ });
20
29
  };
21
30
  /**
22
31
  * Calculates and sets the panel height based on the content height
@@ -44,26 +53,8 @@ const EdsAccordion = class {
44
53
  */
45
54
  componentDidLoad() {
46
55
  this.setPanelHeight();
47
- // Emit context for each eds-link element after the component is fully loaded
48
- const btn = this.el.shadowRoot.querySelector('eds-button');
49
- this.emitContext(btn);
50
56
  window.addEventListener('resize', this.setPanelHeight);
51
57
  }
52
- /**
53
- * Emits a custom event called `parentContext` for a given link element.
54
- * This event provides context information about the breadcrumb component.
55
- *
56
- * @param linkElement - The link element to which the event will be dispatched.
57
- */
58
- emitContext(linkElement) {
59
- const event = new CustomEvent('parentContext', {
60
- detail: {
61
- componentName: this.el.tagName.toLowerCase(),
62
- identifier: null
63
- }
64
- });
65
- linkElement.dispatchEvent(event);
66
- }
67
58
  /**
68
59
  * Lifecycle method that cleans up the resize event listener when the component is removed.
69
60
  */
@@ -77,50 +68,53 @@ const EdsAccordion = class {
77
68
  render() {
78
69
  const minHeightContentClass = this.minHeightContent ? 'min-h-56' : '';
79
70
  return h("div", {
80
- key: '1f8ea188c4b39f6d1a8d10cdbf43d3df88d1281f',
71
+ key: '00bd9a34ceb469bef74c827bd1f48bf3d4b545b6',
81
72
  ref: el => this.wrapperRef = el,
82
73
  class: `container flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
83
74
  ${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
84
75
  ${this.switchBg ? 'hover:bg-inverse' : ''}
85
76
  ${minHeightContentClass}`
86
77
  }, h("h3", {
87
- key: '4490bdc1a18b99850e8db8ae1c38fcb37912ec0d',
78
+ key: 'ab6a953797e0a8379a01a9a2f00a4988d4fc8357',
88
79
  class: "mr-auto f-heading-06 text-left absolute inset-x-16 top-16 line-clamp-1"
89
80
  }, this.title), h("div", {
90
- key: '82df433a9cc6805a735300fd1bb52f41c639c992',
81
+ key: 'cfd6f4ad2ec5e412cdf2348d188dfcf90770012d',
91
82
  class: "ml-auto"
92
83
  }, h("eds-button", {
93
- key: '9965d5eecfa02fbea08c23c44d325417767f6495',
94
- id: "accordionId",
84
+ key: 'beaee69d610727b397645fc0a507b234003fde5e',
85
+ id: "toggleAccordion",
95
86
  intent: "tertiary",
96
87
  "aria-expanded": this.isExpanded || this.shortContent,
97
- "aria-controls": "accordionId",
88
+ "aria-label": "Toggle accordion",
89
+ "aria-controls": "accordionSection",
98
90
  class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`,
99
91
  onClick: this.handleClick,
100
92
  icon: "chevron-down"
101
93
  })), h("div", {
102
- key: '7ab8d2d07d55fa05c5e5647d1d00d1165f0d40ce',
94
+ key: '795f14c0930a0b0862a86451cc7b7e807cb79c37',
103
95
  class: `w-full`
104
96
  }, this.description ? h("span", {
105
97
  class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}`
106
98
  }, this.description) : null, h("section", {
107
- key: 'cb122dd5433d7012cba6f3769f79e92a155c45d7',
108
- id: "sectionId",
99
+ key: '28f6cba233cdee58743faaacc992bf7497c2ff2e',
100
+ id: "accordionSection",
101
+ role: "region",
102
+ "aria-labelledby": "accordionHeader",
109
103
  "aria-hidden": !this.isExpanded,
110
104
  class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`,
111
105
  style: {
112
106
  height: this.isExpanded ? 'auto' : '0'
113
107
  }
114
108
  }, h("div", {
115
- key: '0c2e1d9b38f21f0cb7f50aa3923edcc448418e3f',
109
+ key: '939e442c55babfd3f1750d20d9b95f664c3a67c8',
116
110
  ref: el => this.childContentRef = el,
117
111
  class: `accordion-content effect-color pt-20`,
118
112
  "aria-hidden": !this.isExpanded
119
113
  }, h("span", {
120
- key: 'd119c88d54e8d5e83d4cc3d4d16d1cd53d689bc7',
114
+ key: '648d16ed84cb3da227a10e6370004c6479789aed',
121
115
  class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}`
122
116
  }, h("slot", {
123
- key: 'b2a6917ec65bc808389a2d1c77cd1183f00cbaa1'
117
+ key: '90ca94f15e408b4b05c0eac4bd20fa21766cbb19'
124
118
  }))))));
125
119
  }
126
120
  get el() {