@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
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, 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';
@@ -29,14 +30,17 @@ const EdsPagination = class {
29
30
  componentDidLoad() {
30
31
  // Emit context for each eds-link element after the component is fully loaded
31
32
  const links = this.hostEl.shadowRoot.querySelectorAll('eds-link');
32
- if (links.length > 0) {
33
+ links.forEach(lnk => {
34
+ this.emitContext(lnk);
35
+ });
36
+ /*if (links.length > 0) {
33
37
  // Emit context for the first link
34
38
  this.emitContext(links[0]);
35
- // Emit context for the last link, if it's different from the first
39
+ // Emit context for the last link, if it's different from the first
36
40
  if (links.length > 1) {
37
41
  this.emitContext(links[links.length - 1]);
38
42
  }
39
- }
43
+ }*/
40
44
  }
41
45
  /**
42
46
  * Emits a custom event called `parentContext` for a given link element.
@@ -167,12 +171,12 @@ const EdsPagination = class {
167
171
  }
168
172
  render() {
169
173
  return h("div", {
170
- key: '2385b59b0a8b2bbdc40bfc5032b846c0ec20065e'
174
+ key: '8c8418eec263acc153a928b752775458f897504f'
171
175
  }, this.total > 0 && this.mode === 'default' && h("p", {
172
- key: '6aea281a4df247874f354469bbabae039424ad9e',
176
+ key: '02a5a69772a4812f10b29e8df117b72df210614d',
173
177
  class: "f-ui-03 text-lightest mb-28 w-full text-center"
174
178
  }, h("span", {
175
- key: 'eeb5f0ea902505c3853a30d51026cef9d9785e48',
179
+ key: 'ef9804843100c722643c24e31a05f86f2d55efa0',
176
180
  class: "sr-only"
177
181
  }, "Results:"), this.pageResults()), this.mode === 'navigator' || this.lastPage && this.lastPage > 1 ? h("nav", {
178
182
  "aria-label": "Pagination"
@@ -342,10 +346,24 @@ const EdsTable = class {
342
346
  }
343
347
  handlePageChange(newPage) {
344
348
  this.currentPage = newPage;
349
+ sendAnalytics({
350
+ category: 'ui-component',
351
+ parentContext: null,
352
+ tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
353
+ name: `${newPage}` || '',
354
+ action: 'page'
355
+ });
345
356
  }
346
357
  handleSearch(event) {
347
358
  this.searchQuery = event.target.value;
348
359
  this.currentPage = 1;
360
+ /*sendAnalytics({
361
+ category: 'ui-component',
362
+ parentContext: null,
363
+ tag: `${this.hostEl.tagName.toLowerCase()}/eds-input-field/search`,
364
+ name: `${this.searchQuery}` || '',
365
+ action: 'page'
366
+ });*/
349
367
  }
350
368
  renderCell(value, column) {
351
369
  var _a;
@@ -383,13 +401,11 @@ const EdsTable = class {
383
401
  const visibleColumnsCount = this.getVisibleColumnsCount();
384
402
  /// Calculate container width based on the optional prop or parent's measured width.
385
403
  const containerWidth = this.hostWidth && this.hostWidth.trim() !== '' ? Number(this.hostWidth) : this.hostEl.parentElement instanceof HTMLElement ? this.hostEl.parentElement.getBoundingClientRect().width : this.hostEl.getRootNode().host instanceof HTMLElement ? this.hostEl.getRootNode().host.getBoundingClientRect().width : 400;
386
- //console.log('containerWidth:', containerWidth);
387
404
  const columnWidth = visibleColumnsCount > 0 ? Math.floor(containerWidth / visibleColumnsCount * this.divisionFactor()) : 100;
388
- console.log('columnWidth:', columnWidth);
389
405
  return h("div", {
390
- key: '178a33c07e6eae9d5edc170f842b6ef29ae21d9c'
406
+ key: '66ca59804bc8054655ed0d942104516fe4cd259b'
391
407
  }, this.searchEnabled && h("div", {
392
- key: 'f1212a4e515a1db218df28b71367c6ffa42e3063'
408
+ key: 'df7267fc443da042e4b6ff81ded5800a2213bd73'
393
409
  }, h("eds-input-field", {
394
410
  key: 1,
395
411
  name: "search",
@@ -399,26 +415,26 @@ const EdsTable = class {
399
415
  // @ts-ignore
400
416
  onInput: event => this.handleSearch(event)
401
417
  })), h("div", {
402
- key: 'da6ac91e4b4d56780b044a3d35088e7722efe143',
418
+ key: '80ac1fcb3802f9f5d5eabe016fb7345b88908b36',
403
419
  class: "mt-20"
404
420
  }, h("table", {
405
- key: '3c5734d2370b31d2445ed4f043a80bf87c6d4bde',
421
+ key: '09acf39378b1a4c8bfe40b496ec6bf71a2d761ca',
406
422
  class: "block overflow-x-auto mt-6 p-0"
407
423
  }, h("thead", {
408
- key: '3803a39b4c987ff39bf22e2567bd1bc3d513e1f4'
424
+ key: '8b844806cfef10d1a59da54a385ee8ed6c167050'
409
425
  }, h("tr", {
410
- key: 'a67fa7bdd48549c69cfa9721083a908ab036a559',
426
+ key: '1b3cff91bdaf225e9f3b337e245cd80ad4772b6a',
411
427
  class: "m-0 p-0 border border-softer even:bg-inverse-softer"
412
428
  }, this.columns.map(column => {
413
429
  var _a;
414
430
  return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && h("th", {
415
431
  class: "m-0 py-8 border border-softer f-ui-02 break-words",
416
432
  style: {
417
- minWidth: `${columnWidth}px`
433
+ minWidth: `${columnWidth - 5}px`
418
434
  }
419
435
  }, column);
420
436
  }))), h("tbody", {
421
- key: '8e3f21bf2ee5b1bd84cfa93411ca2671f43ced45'
437
+ key: '93dfd3abd196779c288f85bb6a357ad3e9c01418'
422
438
  }, paginatedRows.map(row => h("tr", {
423
439
  class: "m-0 p-0 border border-softer even:bg-inverse-softer"
424
440
  }, this.columns.map(column => {
@@ -426,14 +442,14 @@ const EdsTable = class {
426
442
  return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && h("td", {
427
443
  class: "text-center border border-softer m-0 py-8 f-ui-2 break-words",
428
444
  style: {
429
- minWidth: `${columnWidth}px`
445
+ minWidth: `${columnWidth - 5}px`
430
446
  }
431
447
  }, this.renderCell(row[column], column));
432
448
  })))))), this.shouldEnablePagination() && h("div", {
433
- key: '24931f257ef9ced394c1b5b1e589cacedd8035e6',
449
+ key: '516b65d78a9ea91060c1dfcb3306bbd3ac2c6f58',
434
450
  class: "mt-20"
435
451
  }, h("eds-pagination", {
436
- key: '996b26ae090ee4fe08cc821fb11362d94879ff72',
452
+ key: 'abe3a593827d99437a06e204ea9d8ef92f80aba7',
437
453
  currentPage: this.currentPage,
438
454
  lastPage: lastPage,
439
455
  perPage: this.rowsPerPage,
@@ -20,10 +20,15 @@ const EdsProgressBar = class {
20
20
  render() {
21
21
  const progressValue = this.value;
22
22
  return h("div", {
23
- key: '3131f56034a9fd72ca51e448bc2bcc6281669b25',
23
+ key: '0f47fedbf9d44887f65b399e184215f0937b1df1',
24
+ role: "progressbar",
25
+ "aria-valuemin": "0",
26
+ "aria-valuemax": "100",
27
+ "aria-valuenow": progressValue,
28
+ "aria-valuetext": `${progressValue}%`,
24
29
  class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden"
25
30
  }, h("div", {
26
- key: 'f1665a254f8dbe1ccb9e512e5f2e7c1e5ab88c07',
31
+ key: 'a2d095d778842c969832ea6b1ba7f7ef917d1390',
27
32
  class: `inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02`,
28
33
  style: {
29
34
  width: `${progressValue}%`
@@ -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: '849c35d9cd587cf14b0d6bc6efd1310a85d447f2'
18
+ key: 'e7ef9e7a589d8cde8aa54d73dff8421d74a7d0ac'
19
19
  }, h("eds-section-heading", {
20
- key: '7ed4486fcf6e7c653026869c9468be9471db1775',
20
+ key: '379c6bc644612d3e0865ce2acd8eacb4d67c7769',
21
21
  headingLevel: this.headingLevel,
22
22
  sectionTitle: this.sectionTitle
23
23
  }), h("slot", {
24
- key: '5d95ea6516ecaaab4e07a40b84cd20deb3d8d3b2'
24
+ key: '5828a28c2c8ac65fbc56652f733f148a0d0198b7'
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: '2c6466c0a02bf8598153c18eafb37affc3dac395',
55
+ key: 'c15f83f8aaa4fb01c884fb1390965fcf9dbd61fb',
56
56
  class: {
57
57
  'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8 pb-20': 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: 'fc7f0f09e02e8c63697e46811c465792497126e0',
63
+ key: 'e65e13820553eefa5aec8bc9740e5e9da828ac92',
64
64
  class: this.getHeadingClass()
65
65
  }, this.sectionTitle));
66
66
  }
@@ -308,7 +308,7 @@ const EdsSvgRepository = class {
308
308
  }
309
309
  };
310
310
  return h("eds-table", {
311
- key: 'a1d4a1db6f0886a43513fc34707cdd6140ab685d',
311
+ key: 'a7d7fa426da72e174880a300202390c1016b74df',
312
312
  data: JSON.stringify(svgData),
313
313
  config: JSON.stringify(tableConfig),
314
314
  "rows-per-page": 10,
@@ -28,7 +28,7 @@ const EdsTab = class {
28
28
  }
29
29
  render() {
30
30
  return h("a", {
31
- key: 'ba4c995637d8d305249f018a0451775f45907716',
31
+ key: 'a55be2a07e554ab13a0d7e913710382d6126da57',
32
32
  "aria-label": this.label,
33
33
  "aria-current": this.active,
34
34
  class: this.tabCva({
@@ -1,5 +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 './color-0ba8ed56.esm.js';
2
+ import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
3
3
  import { c as cva } from './index-39c58238.esm.js';
4
4
  import 'react';
5
5
  import 'react/jsx-runtime';
@@ -108,13 +108,13 @@ const EdsTabsContent = class {
108
108
  }
109
109
  render() {
110
110
  return h("div", {
111
- key: '7bc954d9251bd15b5e3a49d5c74b83805f802b07',
111
+ key: 'aa94a55d3ae658797df6ae75724238a17a80a169',
112
112
  class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']"
113
113
  }, h("div", {
114
- key: '1bfda380604f1eae1cc5be147a5e3e6b537e0396',
114
+ key: '0e38c695467c272198a605efdb2705b14239756e',
115
115
  class: "scroller-x max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28"
116
116
  }, h("nav", {
117
- key: 'b2ed26b52fd629ec99b01c7dc8e612eae4f3886d',
117
+ key: '525f56d02b41e236d3b713fb972b6803e3f908d5',
118
118
  ref: el => this.tabContainer = el,
119
119
  class: "inline-flex",
120
120
  "aria-label": this.navAriaLabel
@@ -129,7 +129,7 @@ const EdsTabsContent = class {
129
129
  onClick: () => this.handleTabClick(index, tab.label)
130
130
  }));
131
131
  })), h("slot", {
132
- key: '5072b877786a23358d540d6d242d5fbdb3c63d7f'
132
+ key: 'e5da088cec99dd0e40560b70fbd9940ac5a7f56f'
133
133
  })));
134
134
  }
135
135
  get el() {
@@ -1,5 +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 './color-0ba8ed56.esm.js';
2
+ import { s as sendAnalytics } from './analytics-1cde8e4a.esm.js';
3
3
  import { c as cva } from './index-39c58238.esm.js';
4
4
  import 'react';
5
5
  import 'react/jsx-runtime';
@@ -119,14 +119,14 @@ const EdsTabs = class {
119
119
  }
120
120
  render() {
121
121
  return h("div", {
122
- key: '540bb667084b36ae2151ec39ef6b54a9ac6a4c4a',
122
+ key: 'f5c9e076fc1fb95b57e0148d85865ce62c14fbe7',
123
123
  id: `${this.id}`,
124
124
  class: "after:border-softest before:bg-gradient-y relative overflow-x-hidden before:absolute before:inset-x-0 before:bottom-0 before:h-12 before:opacity-5 before:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:border-b-2 after:content-['']"
125
125
  }, h("div", {
126
- key: 'f0266d39c943b82725ded757cce0b35fb85fa874',
126
+ key: '7d382167fb62999e39b784ce8bfba24267c87a64',
127
127
  class: "scroller-x overflow-x-auto max-w-xxxl xxxl:px-0 relative z-[1] mx-auto px-16 pt-8 lg:px-28"
128
128
  }, h("nav", {
129
- key: 'fcedf94e6f6c14635291d9c8e6d672efc8055433',
129
+ key: '99bbfabd817bada1984ddf87a274bf9304a1e6a0',
130
130
  ref: el => this.tabContainer = el,
131
131
  class: "inline-flex",
132
132
  "aria-label": this.navAriaLabel
@@ -17,7 +17,8 @@ const EdsTimeline = class {
17
17
  try {
18
18
  parsed = JSON.parse(newValue);
19
19
  } catch (e) {
20
- console.error('Error parsing events JSON', e);
20
+ // eslint-disable-next-line
21
+ console.error('Error parsing timeline events JSON', e);
21
22
  parsed = [];
22
23
  }
23
24
  }
@@ -60,16 +61,16 @@ const EdsTimeline = class {
60
61
  }
61
62
  render() {
62
63
  return h("div", {
63
- key: '29e360adb412c67e7516f04671c276a12197d830',
64
+ key: '1ba4a93ce518b52f5821af75ae0587c44db92c6d',
64
65
  class: "max-w-sidebar mx-auto px-4 py-8"
65
66
  }, h("div", {
66
- key: 'c556578a505bfb2da435616cb1f39cb91859ec7e',
67
+ key: '3e019420ddd4bfab7800567c7130299ea47205c6',
67
68
  class: "relative"
68
69
  }, h("div", {
69
- key: '8e1d307b2b3b470c643ba992d8307457581e9d4f',
70
+ key: 'df99ce8fb08232c46449d7485dd7cffcd04b64d6',
70
71
  class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0"
71
72
  }), h("div", {
72
- key: '7b40b6a8944aad01d01524e13056fbafeaa8a8a8',
73
+ key: '1b52694d2e8c3656910c02680aa8ce2e78b02997',
73
74
  class: "space-y-16"
74
75
  }, this.parsedEvents.map((event, index) => h("div", {
75
76
  class: "relative flex"
@@ -1,4 +1,5 @@
1
1
  import { r as registerInstance, 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';
@@ -22,9 +23,17 @@ const EdsTooltip = class {
22
23
  * Show the tooltip and update its position.
23
24
  */
24
25
  async showTooltip() {
26
+ var _a;
25
27
  await this.updateTooltipPosition();
26
28
  this.isPositioned = true;
27
29
  this.isVisible = true;
30
+ sendAnalytics({
31
+ category: 'ui-component',
32
+ parentContext: null,
33
+ tag: this.el.tagName.toLowerCase(),
34
+ name: ((_a = this.content) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
35
+ action: 'hover'
36
+ });
28
37
  }
29
38
  /**
30
39
  * Hide the tooltip.
@@ -92,12 +101,12 @@ const EdsTooltip = class {
92
101
  }
93
102
  render() {
94
103
  return h("div", {
95
- key: '5edce5e2ca66ef992ad22604a5017e5ab02f846b',
104
+ key: '1635b034319df4827a62ed58267d81db277ad19d',
96
105
  class: "relative"
97
106
  }, h("slot", {
98
- key: '74c9ef5978e023a45eb9c25c18f95f1875c19b13'
107
+ key: '6cdfd0f6d456b984464c5091a2829cdba69ba895'
99
108
  }), this.isVisible && this.isPositioned && this.content && h("div", {
100
- key: '4cc3ea40bd81308eb7685b5c1065e8bd30f99191',
109
+ key: '7e736731dc700e0273fdfe15202426d2db086aef',
101
110
  class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6",
102
111
  role: "tooltip",
103
112
  style: {
@@ -15,8 +15,8 @@ const EdsTrl = class {
15
15
  try {
16
16
  apps = JSON.parse(this.applications || '[]');
17
17
  } catch (error) {
18
- // Uncomment the next line for debugging
19
- // console.error('Invalid applications JSON', error);
18
+ // eslint-disable-next-line
19
+ console.error('Invalid applications trl JSON', error);
20
20
  apps = [];
21
21
  }
22
22
  }
@@ -32,11 +32,10 @@ const EdsTrl = class {
32
32
  }
33
33
  render() {
34
34
  const apps = this.getParsedApplications();
35
- console.log('apps:', apps);
36
35
  // Map applications into table-friendly data.
37
36
  const tableData = apps.map(app => ({
38
37
  Application: app.name,
39
- "Current TRL Stage": `TRL ${app.currentTrl}`,
38
+ 'Current TRL Stage': `TRL ${app.currentTrl}`,
40
39
  Progress: h("div", {
41
40
  class: "w-[200px]"
42
41
  }, h("eds-progress-bar", {
@@ -44,18 +43,18 @@ const EdsTrl = class {
44
43
  }))
45
44
  }));
46
45
  const tableConfig = {
47
- "Application": {
48
- "format": "code"
46
+ Application: {
47
+ format: 'code'
49
48
  },
50
- "Current TRL Stage": {
51
- "format": "text"
49
+ 'Current TRL Stage': {
50
+ format: 'text'
52
51
  }
53
52
  };
54
53
  return h("div", {
55
- key: '71e903734b5cd1ef74bf93e8fcdc57afacb51f07',
54
+ key: 'a329a001d6275fcfe7df9bddf83bd289effe4151',
56
55
  class: "container mx-auto px-4 py-8"
57
56
  }, h("eds-table", {
58
- key: 'cb8e4324c9c8481dcc2daf74f06c6928257e6f8b',
57
+ key: '93aebfd840b16416789b15eec0daa16d9126aa9f',
59
58
  data: JSON.stringify(tableData),
60
59
  config: JSON.stringify(tableConfig),
61
60
  "rows-per-page": "2",
@@ -0,0 +1,118 @@
1
+ import { r as registerInstance, c as createEvent, h, g as getElement } from './index.esm2.js';
2
+ import { l as login, a as logout, c as checkServerAvailability, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak-d502ec16.esm.js';
3
+ import { t as toast } from './toastManager-d9eee791.esm.js';
4
+ import 'react';
5
+ import 'react/jsx-runtime';
6
+ import 'react-dom';
7
+
8
+ const EdsUser = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
12
+ /**
13
+ * Handles user login by invoking the Keycloak `login` function.
14
+ * Only triggers login if the user is not already authenticated.
15
+ */
16
+ this.handleLogin = () => {
17
+ if (!this.authenticated) {
18
+ try {
19
+ login();
20
+ } catch (error) {
21
+ toast.show(error.message, 'error');
22
+ }
23
+ }
24
+ };
25
+ /**
26
+ * Handles user logout by invoking the Keycloak `logout` function.
27
+ * Resets the `authenticated` state to `false` after logout.
28
+ */
29
+ this.handleLogout = async () => {
30
+ try {
31
+ await logout();
32
+ } catch (error) {
33
+ toast.show(error.message, 'error');
34
+ }
35
+ this.authenticated = false;
36
+ this.user = null;
37
+ };
38
+ this.keycloakUrl = undefined;
39
+ this.keycloakRealm = undefined;
40
+ this.keycloakClientId = undefined;
41
+ this.user = null;
42
+ this.authenticated = false;
43
+ this.username = '';
44
+ this.serverAvailable = false;
45
+ }
46
+ /**
47
+ * Lifecycle method that runs when the component is about to load.
48
+ * It initializes authentication by calling the `initAuth` method.
49
+ */
50
+ async componentWillLoad() {
51
+ // Check if required props are provided (optional check)
52
+ if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
53
+ // eslint-disable-next-line
54
+ console.error('Keycloak configuration props are missing.');
55
+ return;
56
+ }
57
+ this.serverAvailable = await checkServerAvailability(`${this.keycloakUrl}/realms/${this.keycloakRealm}`);
58
+ if (!this.serverAvailable) {
59
+ toast.show('Keycloak server is unavailable.', 'error');
60
+ return; // Do not proceed further
61
+ }
62
+ await this.initAuth();
63
+ }
64
+ /**
65
+ * Initializes the Keycloak authentication by configuring Keycloak with the provided props.
66
+ * Sets the `authenticated` state and `user` data if the user is authenticated.
67
+ * Emits `authStatusChanged` event with the authentication status.
68
+ */
69
+ async initAuth() {
70
+ try {
71
+ await initKeycloak({
72
+ url: this.keycloakUrl,
73
+ realm: this.keycloakRealm,
74
+ clientId: this.keycloakClientId
75
+ }, true);
76
+ if (isAuthenticated()) {
77
+ this.user = getUser();
78
+ this.authenticated = true;
79
+ this.authStatusChanged.emit({
80
+ authenticated: this.authenticated,
81
+ user: this.user
82
+ }); // Emit auth status change
83
+ }
84
+ } catch (error) {
85
+ toast.show(error.message, 'error');
86
+ }
87
+ }
88
+ render() {
89
+ var _a;
90
+ return h("div", {
91
+ key: '22ee744979511dd2f8a1e1a15bb99215eadd535b',
92
+ class: "block"
93
+ }, !this.authenticated ? h("eds-button", {
94
+ label: "Login",
95
+ intent: "primary",
96
+ onClick: this.handleLogin,
97
+ "extra-class": "text-default"
98
+ }) : h("div", {
99
+ class: "flex items-center"
100
+ }, h("eds-dropdown", {
101
+ label: `Welcome, ${(_a = this.user) === null || _a === void 0 ? void 0 : _a.username}`,
102
+ intent: "tertiary",
103
+ "aria-label": "User Menu",
104
+ "dropdown-pos": "right",
105
+ "dropdown-offset": "false",
106
+ icon: "chevron-down",
107
+ class: "text-default"
108
+ }, h("eds-user-modal", {
109
+ user: JSON.stringify(this.user),
110
+ onLogout: this.handleLogout.bind(this)
111
+ }))));
112
+ }
113
+ get hostEl() {
114
+ return getElement(this);
115
+ }
116
+ };
117
+
118
+ export { EdsUser as eds_user };
@@ -0,0 +1,81 @@
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 edsVerticalStepperCss = ":host{display:block}.stepper-container{margin:0 auto}.stepper{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.step{margin-bottom:24px}.step-label{counter-increment:step;font-size:1.25rem;font-weight:600;position:relative;margin-top:1em;margin-bottom:1em}.step-label::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.optional{font-size:0.8rem;color:#888;margin-left:8px}.step-content{margin-top:8px}.step-buttons{margin-top:12px}.step-buttons button{margin-right:8px;padding:6px 12px;font-size:0.875rem}.completed{padding:16px;border:1px solid #ddd;margin-top:16px;text-align:center}";
7
+ const EdsVerticalStepperStyle0 = edsVerticalStepperCss;
8
+ const EdsVerticalStepper = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.handleNext = () => {
12
+ if (this.activeStep < this.parsedSteps.length) {
13
+ this.activeStep = this.activeStep + 1;
14
+ }
15
+ };
16
+ this.handleBack = () => {
17
+ if (this.activeStep > 0) {
18
+ this.activeStep = this.activeStep - 1;
19
+ }
20
+ };
21
+ this.handleReset = () => {
22
+ this.activeStep = 0;
23
+ };
24
+ this.steps = '[]';
25
+ this.activeStep = 0;
26
+ }
27
+ get parsedSteps() {
28
+ try {
29
+ return JSON.parse(this.steps);
30
+ } catch (error) {
31
+ //console.error('Invalid steps JSON', error);
32
+ return [];
33
+ }
34
+ }
35
+ render() {
36
+ const steps = this.parsedSteps;
37
+ return h("div", {
38
+ key: '08fa2f85c49dbe217b2f9d068bee486e432f5315',
39
+ class: "stepper-container"
40
+ }, h("div", {
41
+ key: '6f7e0a0ccaa2882794a6be0216201d1bf924e2b2',
42
+ class: "stepper"
43
+ }, steps.map((step, index) => h("div", {
44
+ class: "step",
45
+ key: index
46
+ }, h("div", {
47
+ class: "step-label"
48
+ }, h("span", null, step.label), index === steps.length - 1 && h("span", {
49
+ class: "f-ui-03 text-lightest ml-4"
50
+ }, "(Last step)")), this.activeStep === index && h("div", {
51
+ class: "step-content"
52
+ }, h("p", null, step.description), h("div", {
53
+ class: "step-buttons"
54
+ }, h("eds-button", {
55
+ label: index === steps.length - 1 ? 'Finish' : 'Continue',
56
+ class: "next-btn",
57
+ onClick: this.handleNext
58
+ }), h("eds-button", {
59
+ label: "Back",
60
+ intent: "ghostInverse",
61
+ onClick: this.handleBack,
62
+ disabled: index === 0,
63
+ "extra-class": index === 0 ? 'hidden' : 'ml-8 block'
64
+ })))))), this.activeStep === steps.length && h("div", {
65
+ key: '8a5ebfed582b25d828758e1762a063df6c745093',
66
+ class: ""
67
+ }, h("eds-alert", {
68
+ key: 'a142fb50b8df533dd97f770aeaa453f2379ea7cb',
69
+ intent: "success",
70
+ message: "All steps completed - you're finished!"
71
+ }), h("eds-button", {
72
+ key: '5cfba059c9a152f179e7c31fa5d7a222c00defe2',
73
+ label: "Start again",
74
+ onClick: this.handleReset,
75
+ "extra-class": "mt-4"
76
+ })));
77
+ }
78
+ };
79
+ EdsVerticalStepper.style = EdsVerticalStepperStyle0;
80
+
81
+ export { EdsVerticalStepper as eds_vertical_stepper };
@@ -29,20 +29,20 @@ const IncorrectUseOfColors = class {
29
29
  }
30
30
  render() {
31
31
  return h("div", {
32
- key: '2e660e9a788e46e68d6695ae8aa475bbb1ca395e',
32
+ key: 'cb22d37293f3b3b5fe3772cfe83234a5d81e1094',
33
33
  class: "container"
34
34
  }, h("eds-alert", {
35
- key: '1dc4552a33d88055a3a0c33eeb18c53a8379039a',
35
+ key: '9aa7a510440c32f92242b3e09f9e818cd2509b06',
36
36
  message: "Note that, each of the four colour tones cannot be mixed in the same composition.",
37
37
  intent: "error"
38
38
  }), h("div", {
39
- key: 'fd6bf7f0205422b1bd3ceb3f8374d5a9a73aaca0',
39
+ key: '4d22cba75b7dd45a5a9a7d2b2eba5404875f1403',
40
40
  class: "flex"
41
41
  }, h("div", {
42
- key: 'dae745447f5e9792136f059b1dcfc868e473dfd5',
42
+ key: 'c7f08b3e4ef2692c545edd4185a005ddd6526a23',
43
43
  class: "w-full"
44
44
  }, h("ul", {
45
- key: 'daeec7514f4027ec3f688f05fb4f1e027b846a81',
45
+ key: '28561abcdc93a4899a5d7481fdd47c439f734ff6',
46
46
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
47
47
  }, primary.map(color => h("li", {
48
48
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
@@ -52,10 +52,10 @@ const IncorrectUseOfColors = class {
52
52
  backgroundColor: color.background
53
53
  }
54
54
  }))))), h("div", {
55
- key: '1ca202afa9384e78e3ed9c0674e06c51184d3a5a',
55
+ key: 'f8836d4805fdd416ee75712f749d5cee3f612559',
56
56
  class: "w-full"
57
57
  }, h("ul", {
58
- key: '7bdef2e7d64f3c5553193d127bac69ee89a93686',
58
+ key: '5842acd55d3a827355f2814c709d057676fb5d0f',
59
59
  class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
60
60
  }, incorrect.map(color => h("li", {
61
61
  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 EdsCardDesc, j as EdsCardGeneric, k as EdsCardSection, l as EdsCodeBlock, m as EdsDropdown, n as EdsFooter, o as EdsForm, p as EdsFrame, q as EdsFullscreenMenu, s as EdsHeader, t as EdsIconWrapper, u as EdsImg, v as EdsInputField, w as EdsInputSelect, x as EdsLink, y as EdsLogin, z as EdsLogo, A as EdsMatomoNotice, B as EdsModal, C as EdsPagination, D as EdsProgressBar, F as EdsRating, G as EdsSectionCore, H as EdsSectionHeading, I as EdsSocialNetworks, J as EdsTable, K as EdsTabs, L as EdsTag, M as EdsTimeline, N as EdsToast, O as EdsToastManager, P as EdsTooltip, Q 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 EdsCardDesc, j as EdsCardGeneric, k as EdsCardSection, l as EdsCodeBlock, m as EdsDropdown, n as EdsFooter, o as EdsForm, p as EdsFrame, q as EdsFullscreenMenu, s as EdsHeader, t as EdsIconWrapper, u as EdsImg, v as EdsInputField, w as EdsLink, x as EdsLogin, y as EdsLogo, z as EdsMatomoNotice, A as EdsModal, B as EdsPagination, C as EdsProgressBar, D as EdsRating, F as EdsSectionCore, G as EdsSectionHeading, H as EdsSocialNetworks, I as EdsSteps, J as EdsSwitch, K as EdsTable, L as EdsTabs, M as EdsTag, N as EdsTimeline, O as EdsToast, P as EdsToastManager, Q as EdsTooltip, R as EdsUser, S as EdsVerticalStepper } from './index.esm2.js';
2
2
  import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';