@ebrains/react 2.4.0 → 3.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 (130) hide show
  1. package/color-primary-palette_6.entry.esm.js +106 -106
  2. package/components-section.entry.esm.js +1 -1
  3. package/correct-use-of-colors.entry.esm.js +33 -33
  4. package/docs-palettes.entry.esm.js +1 -1
  5. package/docs-tokens.entry.esm.js +1 -1
  6. package/eds-accordion_52.entry.esm.js +1823 -0
  7. package/eds-app-root.entry.esm.js +4 -4
  8. package/eds-cookies-preference.entry.esm.js +3 -3
  9. package/eds-feedback.entry.esm.js +5 -5
  10. package/eds-frame.entry.esm.js +7 -7
  11. package/eds-gauge.entry.esm.js +8 -9
  12. package/eds-gitlab-contributors.entry.esm.js +277 -0
  13. package/eds-icon-bluesky.entry.esm.js +1 -1
  14. package/eds-icon-eu.entry.esm.js +2 -2
  15. package/eds-icon-facebook.entry.esm.js +1 -1
  16. package/eds-icon-gitlab.entry.esm.js +1 -1
  17. package/eds-icon-linkedin.entry.esm.js +1 -1
  18. package/eds-icon-mastodon.entry.esm.js +1 -1
  19. package/eds-icon-twitter.entry.esm.js +1 -1
  20. package/eds-icon-youtube.entry.esm.js +1 -1
  21. package/eds-modal.entry.esm.js +88 -31
  22. package/eds-pie.entry.esm.js +38 -4
  23. package/eds-section-core_2.entry.esm.js +5 -5
  24. package/eds-splash-screen.entry.esm.js +4 -12
  25. package/eds-timeline.entry.esm.js +8 -14
  26. package/eds-toast-manager.entry.esm.js +1 -1
  27. package/eu-8ac3e99c.esm.js +7 -0
  28. package/incorrect-use-of-colors.entry.esm.js +8 -8
  29. package/index.esm.js +1 -1
  30. package/index.esm2.js +14 -143
  31. package/logo-space.entry.esm.js +138 -17
  32. package/logo-variations-horizontal_2.entry.esm.js +28 -54
  33. package/logo-variations-tabs.entry.esm.js +1 -1
  34. package/logo-wrong-usage.entry.esm.js +33 -33
  35. package/negative-84eec72e.esm.js +104 -0
  36. package/package.json +1 -1
  37. package/positive-cc986d7c.esm.js +65 -0
  38. package/src/components.d.ts +8 -2
  39. package/src/generated/components.d.ts +0 -1
  40. package/svg-repository.entry.esm.js +7 -254
  41. package/token-list_3.entry.esm.js +79 -51
  42. package/token-ratios.entry.esm.js +3 -3
  43. package/token-spacing.entry.esm.js +26 -26
  44. package/token-typography.entry.esm.js +88 -79
  45. package/arrow-diagonal-black-8f0494c3.esm.js +0 -3
  46. package/arrow-right-9322ba8a.esm.js +0 -5
  47. package/bin-37cad2f0.esm.js +0 -3
  48. package/bookmark-c200037c.esm.js +0 -16
  49. package/chevron-down-6144c823.esm.js +0 -12
  50. package/chevron-left-ca6c66e1.esm.js +0 -11
  51. package/chevron-right-b88ed2d4.esm.js +0 -5
  52. package/chevron-up-c66bd477.esm.js +0 -12
  53. package/clone-dab56639.esm.js +0 -3
  54. package/close-87fc0d63.esm.js +0 -5
  55. package/copy-03b72cb6.esm.js +0 -5
  56. package/download-47746956.esm.js +0 -18
  57. package/draft-dd5dada2.esm.js +0 -3
  58. package/edit-3893a517.esm.js +0 -3
  59. package/eds-accordion_37.entry.esm.js +0 -1201
  60. package/eds-card-desc_2.entry.esm.js +0 -85
  61. package/eds-card-generic.entry.esm.js +0 -116
  62. package/eds-card-project.entry.esm.js +0 -209
  63. package/eds-card-section.entry.esm.js +0 -56
  64. package/eds-card-tags.entry.esm.js +0 -27
  65. package/eds-card-tool.entry.esm.js +0 -105
  66. package/eds-footer.entry.esm.js +0 -135
  67. package/eds-fullscreen-menu.entry.esm.js +0 -143
  68. package/eds-icon-arrow-diagonal.entry.esm.js +0 -21
  69. package/eds-icon-arrow-right.entry.esm.js +0 -21
  70. package/eds-icon-bin.entry.esm.js +0 -21
  71. package/eds-icon-bookmark.entry.esm.js +0 -21
  72. package/eds-icon-chevron-down.entry.esm.js +0 -21
  73. package/eds-icon-chevron-left.entry.esm.js +0 -21
  74. package/eds-icon-chevron-right.entry.esm.js +0 -21
  75. package/eds-icon-chevron-up.entry.esm.js +0 -21
  76. package/eds-icon-clone.entry.esm.js +0 -21
  77. package/eds-icon-close.entry.esm.js +0 -21
  78. package/eds-icon-copy.entry.esm.js +0 -21
  79. package/eds-icon-download.entry.esm.js +0 -21
  80. package/eds-icon-draft.entry.esm.js +0 -21
  81. package/eds-icon-edit.entry.esm.js +0 -21
  82. package/eds-icon-external.entry.esm.js +0 -21
  83. package/eds-icon-loader.entry.esm.js +0 -21
  84. package/eds-icon-menu.entry.esm.js +0 -21
  85. package/eds-icon-minus.entry.esm.js +0 -21
  86. package/eds-icon-more.entry.esm.js +0 -21
  87. package/eds-icon-paper.entry.esm.js +0 -21
  88. package/eds-icon-plus.entry.esm.js +0 -21
  89. package/eds-icon-portal.entry.esm.js +0 -21
  90. package/eds-icon-private.entry.esm.js +0 -21
  91. package/eds-icon-public.entry.esm.js +0 -21
  92. package/eds-icon-search.entry.esm.js +0 -21
  93. package/eds-icon-star.entry.esm.js +0 -21
  94. package/eds-icon-start.entry.esm.js +0 -21
  95. package/eds-icon-success.entry.esm.js +0 -21
  96. package/eds-icon-thumbs-down.entry.esm.js +0 -21
  97. package/eds-icon-thumbs-up.entry.esm.js +0 -21
  98. package/eds-icon-tutorial.entry.esm.js +0 -21
  99. package/eds-icon-unknown.entry.esm.js +0 -21
  100. package/eds-icon-updown.entry.esm.js +0 -21
  101. package/eds-icon-user.entry.esm.js +0 -21
  102. package/eds-icon-view.entry.esm.js +0 -21
  103. package/eds-progress-bar.entry.esm.js +0 -52
  104. package/eds-social-networks.entry.esm.js +0 -73
  105. package/eds-trl.entry.esm.js +0 -68
  106. package/eu-9ddde93a.esm.js +0 -30
  107. package/index-39c58238.esm.js +0 -58
  108. package/loader-c9628637.esm.js +0 -30
  109. package/logo-color-7f1fd803.esm.js +0 -115
  110. package/logo-color-margins-ff8ce71b.esm.js +0 -118
  111. package/logo-white-no-bg-f382f86f.esm.js +0 -1021
  112. package/menu-340ea948.esm.js +0 -11
  113. package/minus-b30a7c71.esm.js +0 -11
  114. package/more-4449d549.esm.js +0 -13
  115. package/paper-8e74ea31.esm.js +0 -15
  116. package/plus-89c07be2.esm.js +0 -12
  117. package/portal-d6c8ce56.esm.js +0 -18
  118. package/private-1c25ff8e.esm.js +0 -25
  119. package/public-d4d8c585.esm.js +0 -16
  120. package/search-fbcd79c2.esm.js +0 -12
  121. package/star-0da9b5e9.esm.js +0 -5
  122. package/start-65126a4f.esm.js +0 -3
  123. package/success-443809da.esm.js +0 -18
  124. package/thumbs-down-a18fd049.esm.js +0 -5
  125. package/thumbs-up-c19a71bc.esm.js +0 -6
  126. package/tutotial-150ee1fd.esm.js +0 -27
  127. package/unknown-ed01a24c.esm.js +0 -22
  128. package/up-and-down-8b69ca97.esm.js +0 -12
  129. package/user-71ebdc15.esm.js +0 -16
  130. package/view-e900f2d4.esm.js +0 -3
@@ -34,18 +34,18 @@ const EdsAppRoot = class {
34
34
  }
35
35
  render() {
36
36
  return h("div", {
37
- key: 'aa412cafecaceba211d0938d42779d33a20b418f'
37
+ key: '10a75e7e117b2f3ab3d0ba8f2a26c122b2e0eed4'
38
38
  }, h("eds-splash-screen", {
39
- key: '78de23a74a0263c09e400cb16d20e014a50913ba',
39
+ key: 'ab527af22c9a9fe861bbed4759946428e3e7fdf0',
40
40
  inverse: true,
41
41
  initPromise: this.combinedInitPromise
42
42
  }), h("eds-login", {
43
- key: '6a690104e273cbefa9ec4e66c5479c2db0666f39',
43
+ key: '78e7face11e06df76b9dd29e99b7d968cc2cf32e',
44
44
  "keycloak-url": "http://localhost:8080",
45
45
  "keycloak-realm": "nigeor-realm",
46
46
  "keycloak-client-id": "stencil-app"
47
47
  }), h("main", {
48
- key: 'e011a7d8a0a78a932f61a218d85aac8f25e8021b'
48
+ key: '30f463e667ccc25062bbf2764fdabc8937b6097c'
49
49
  }, this.isAuthenticated ? h("h1", null, "Welcome, authenticated user!") : h("h1", null, "Please log in.")));
50
50
  }
51
51
  };
@@ -9,7 +9,7 @@ const EdsCookiesPreference = class {
9
9
  constructor(hostRef) {
10
10
  registerInstance(this, hostRef);
11
11
  this.buttonText = 'Cookies Preferences';
12
- this.intent = undefined;
12
+ this.intent = 'secondary';
13
13
  this.showMatomoNotice = false;
14
14
  this.noticeKey = 0;
15
15
  }
@@ -29,9 +29,9 @@ const EdsCookiesPreference = class {
29
29
  }
30
30
  render() {
31
31
  return h("div", {
32
- key: 'c1754394ac9c249ef4c5959ed0b6a74d8ec365ab'
32
+ key: '3926e6e4972c901880f57859280330ad315dc263'
33
33
  }, h("eds-link", {
34
- key: '4bb5d796d14dc242024df4681dea493d4511a8b6',
34
+ key: '8c513565cb94589c1d441aa4b0badf79ab464169',
35
35
  size: "small",
36
36
  intent: this.intent,
37
37
  label: this.buttonText,
@@ -61,20 +61,20 @@ const EdsFeedback = class {
61
61
  const levelNum = this.headingLevel.replace('h', '');
62
62
  const headingClass = `f-heading-${levelNum.padStart(2, '0')} my-4`;
63
63
  return h("div", {
64
- key: '5405127cfc114d4906617955d7b1069a04ed7b8e',
64
+ key: '7d01b8aef2854cfdb739553e7f43ed9516199e1e',
65
65
  class: "grid inline"
66
66
  }, h(HeadingTag, {
67
- key: 'c0a2593d843577323b6a27d0f8fdca3b84063bd5',
67
+ key: 'a0c4a4f93598b955e90416d50260aaa3f644615a',
68
68
  class: headingClass
69
69
  }, this.label), h("p", {
70
- key: '5b7ef9fbd8c5b4a9d3c7c39e3092244d08dde126',
70
+ key: 'acb2db8fc209faf2d39622e2e858fa1e7403e1b4',
71
71
  class: "f-body-01 text-light"
72
72
  }, this.description), h("eds-rating", {
73
- key: '2de1ad00dd21d987bc4a91438500a58a0bcd63a7',
73
+ key: 'b0db57c9e3539a5edfecf67cc3a12dd87d74fad9',
74
74
  "rating-type": this.type,
75
75
  "rating-count": this.count
76
76
  }), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
77
- key: '3de038a0ae8ee334edde65194356f021e14e7cb3',
77
+ key: '8d6bf62a18fdb12dddba932be9a5115396fdfd6f',
78
78
  class: "f-ui-04 text-lighter"
79
79
  }, this.parsedMappings[this.selectedRating - 1]));
80
80
  }
@@ -3,7 +3,7 @@ import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';
5
5
 
6
- const edsFrameCss = ".bg-inverse{background-color:var(--white)}.min-h-156{min-height:156px}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:12px}.border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-softest{border-color:rgba(0, 0, 0, .05)}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.flex{display:flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.border-2{border-width:2px}.w-full{width:100%}.h-full{height:100%}.h-auto{height:auto}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.items-center{align-items:center}.justify-between{justify-content:space-between}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.px-12{padding-left:0.75rem;padding-right:0.75rem}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.ml-auto{margin-left:auto}.border-t-2{border-top-width:2px}.border{border:1px solid rgba(0, 0, 0, .1)}.border-2{border:1px solid rgba(0, 0, 0, .1)}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}.mt-16{margin-top:1rem}";
6
+ const edsFrameCss = ".bg-inverse{background-color:#FFFFFF;border:1px solid #ECECEC;color:#07140D}.min-h-156{min-height:156px}.rounded{border-radius:0.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:16px}.rounded-md{border-radius:12px}.border-soft{border-color:#ECECEC}.border-softer{border-color:#ECECEC}.border-softest{border-color:#f2f2f2}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:#00FF9D}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.flex{display:flex}.grow{flex-grow:1}.flex-col{flex-direction:column}.border-2{border-width:0}.w-full{width:100%}.h-full{height:100%}.h-auto{height:auto}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.items-center{align-items:center}.justify-between{justify-content:space-between}.py-8{padding-top:0.75rem;padding-bottom:0.75rem}.px-12{padding-left:1rem;padding-right:1rem}.py-8.px-12{border-bottom:1px solid #ECECEC}.f-ui-02{font-family:'IBM Plex Sans', sans-serif;font-size:0.8125rem;font-weight:600;color:#07140D;line-height:1.4}.ml-auto{margin-left:auto}.border-t-2{border-top-width:1px;border-color:#ECECEC}.border{border:1px solid #ECECEC}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto;color:#7A7B7A}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.ml-8{margin-left:0.5rem}.mr-8{margin-right:0.5rem}.mt-16{margin-top:1rem}iframe{border-radius:0 0 12px 12px}";
7
7
  const EdsFrameStyle0 = edsFrameCss;
8
8
  const EdsFrame = class {
9
9
  constructor(hostRef) {
@@ -13,7 +13,7 @@ const EdsFrame = class {
13
13
  this.urlLabel = 'Open';
14
14
  this.errorMessage = 'Could not load the requested content. Please check the URL or try again later.';
15
15
  this.url = undefined;
16
- this.intent = 'strong';
16
+ this.intent = 'cta';
17
17
  this.size = 'auto';
18
18
  this.iframeError = false;
19
19
  }
@@ -73,13 +73,13 @@ const EdsFrame = class {
73
73
  }
74
74
  render() {
75
75
  return h("div", {
76
- key: '5bcdb5bdd66a7530a82662ff9b6ef06d3a1eb1d3',
76
+ key: '0fa74cf426f9d934a035b5e3f6c9e5722c40beab',
77
77
  class: this.articleClasses()
78
78
  }, h("div", {
79
- key: '4c9e224f1a6421398cfef1fd89d113513727b6dd',
79
+ key: '65ab4084241ce1b5337e9bfaaffb5c2aaceec28e',
80
80
  class: "effect-height flex items-center justify-between py-8 px-12"
81
81
  }, h("span", {
82
- key: '7704b4f1d1a3e8a728f0ad751891ecbfd118411a',
82
+ key: 'f1cda1a4d61b47550d9d8cd08986f2253710c4ea',
83
83
  class: "f-ui-02"
84
84
  }, this.frameLabel), !this.iframeError && this.url && this.urlLabel ? h("eds-link", {
85
85
  label: this.urlLabel,
@@ -88,9 +88,9 @@ const EdsFrame = class {
88
88
  class: "ml-auto",
89
89
  external: true,
90
90
  disabled: false,
91
- icon: "arrow-diagonal"
91
+ icon: "arrow-up-right"
92
92
  }) : null), h("div", {
93
- key: 'd4372713fc8984d14808171857d6efd40790dec2',
93
+ key: 'e02ffe4f38f1375a0694f2acec72406824745437',
94
94
  class: "border-softer"
95
95
  }, this.iframeError ? h("div", {
96
96
  class: "container ml-8 mr-8 mt-16"
@@ -6,10 +6,9 @@ import 'react-dom';
6
6
  const edsGaugeCss = ".relative{position:relative}.absolute{position:absolute}.inline-block{display:inline-block}.rounded-full{border-radius:9999px}.overflow-hidden{overflow:hidden}.bg-inverse{background-color:var(--white)}.bg-current{background-color:currentColor}.bg-dark{background-color:var(--grey-300)}.bg-darker{background-color:var(--grey-400)}.bg-default{background-color:var(--grey-200)}.bg-strong{background-color:var(--grey-700)}.bg-strongest{background-color:var(--black)}.inset-0{inset:0rem}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.text-default{color:var(--black)}";
7
7
  const EdsGaugeStyle0 = edsGaugeCss;
8
8
  const BACKGROUND_VARIANTS = {
9
- default: '#f2f2f2',
10
- dark: '#d8d8d8',
11
- strong: '#666666',
12
- black: '#000000'
9
+ default: 'var(--grey-light)',
10
+ dark: 'var(--grey-dark)',
11
+ black: 'var(--brand-black)'
13
12
  };
14
13
  const EdsGauge = class {
15
14
  constructor(hostRef) {
@@ -39,7 +38,7 @@ const EdsGauge = class {
39
38
  const containerStyle = {
40
39
  width: `${diameter}px`,
41
40
  height: `${diameter}px`,
42
- background: `conic-gradient(#00e766 0deg ${angle}deg, ${emptyColor} ${angle}deg 360deg)`
41
+ background: `conic-gradient(var(--brand-green) 0deg ${angle}deg, ${emptyColor} ${angle}deg 360deg)`
43
42
  };
44
43
  const maskStyle = {
45
44
  width: `${innerDiameter}px`,
@@ -51,7 +50,7 @@ const EdsGauge = class {
51
50
  fontSize: `${fontSize}px`
52
51
  };
53
52
  return h("div", {
54
- key: '33388b250acd0aeaf3bf4888fd5ac72ba0337a42',
53
+ key: 'f5801b63984f42bad206445de4e865c0e161b88e',
55
54
  role: "progressbar",
56
55
  "aria-valuemin": this.valueMin,
57
56
  "aria-valuemax": this.valueMax,
@@ -60,14 +59,14 @@ const EdsGauge = class {
60
59
  class: "relative inline-block rounded-full overflow-hidden",
61
60
  style: containerStyle
62
61
  }, h("div", {
63
- key: 'b920dd12644a5457b512b65e2c093ef53f339969',
62
+ key: '1a982401ba1853e937dfbb9aeb4736d4665abab1',
64
63
  class: "absolute bg-inverse rounded-full",
65
64
  style: maskStyle
66
65
  }), h("div", {
67
- key: '0149f680aad2c2b2cf4e308b1510d2fb3482a06f',
66
+ key: '0db002b1a3a3f49fe3fd0f3aa4d3fd0e2ee6a45d',
68
67
  class: "absolute inset-0 flex items-center justify-center"
69
68
  }, h("span", {
70
- key: '31fee43895b99a2c19358acce9eee0965eef574a',
69
+ key: 'a011eaaab9e6f3d15d706bf9309ae7bafa689387',
71
70
  class: "f-body-01 text-default",
72
71
  style: textStyle
73
72
  }, clamped)));
@@ -0,0 +1,277 @@
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 edsGitlabContributorsCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.grid{display:grid}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.gap-2{gap:0.5rem;}.gap-4{gap:1rem;}.gap-6{gap:1.5rem;}.p-5{padding:1.25rem;}.p-12{padding:3rem;}.pb-2{padding-bottom:0.25rem;}.pb-4{padding-bottom:1rem;}.mb-6{margin-bottom:1.5rem;}.m-0{margin:0}.mt-auto{margin-top:auto}.w-full{width:100%}.min-w-0{min-width:0}.text-xs{font-size:0.75rem;line-height:1rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.font-semibold{font-weight:600}.whitespace-nowrap{white-space:nowrap}.overflow-hidden{overflow:hidden}.text-ellipsis{text-overflow:ellipsis}.no-underline{text-decoration:none}.text-gray-600{color:var(--eds-color-gray-600, #4b5563)}.text-gray-900{color:var(--eds-color-gray-900, #111827)}.border-gray-200{border-color:var(--eds-color-gray-200, #e5e7eb)}.bg-white{background-color:var(--eds-color-white, #ffffff)}.text-primary-600{color:var(--eds-color-primary-600, #2563eb)}.hover\\:text-primary-600:hover{color:var(--eds-color-primary-600, #2563eb)}.border-primary-300{border-color:var(--eds-color-primary-300, #93c5fd)}.hover\\:border-primary-300:hover{border-color:var(--eds-color-primary-300, #93c5fd)}.text-success-600{color:var(--eds-color-success-600, #16a34a)}.text-error-600{color:var(--eds-color-error-600, #dc2626)}.border{border-width:1px}.border-b{border-bottom-width:1px}.rounded-lg{border-radius:var(--eds-radius-lg, 0.5rem);}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-200{transition-duration:200ms}.shadow-md{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.hover\\:shadow-md:hover{box-shadow:0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)}.-translate-y-0\\.5{transform:translateY(-0.125rem);}.hover\\:-translate-y-0\\.5:hover{transform:translateY(-0.125rem)}.grid-cols-1{grid-template-columns:repeat(1, minmax(0, 1fr))}@media (min-width: 640px){.sm\\:grid-cols-2{grid-template-columns:repeat(2, minmax(0, 1fr))}}@media (min-width: 768px){.md\\:grid-cols-3{grid-template-columns:repeat(3, minmax(0, 1fr))}}@media (min-width: 1024px){.lg\\:grid-cols-4{grid-template-columns:repeat(4, minmax(0, 1fr))}.lg\\:grid-cols-5{grid-template-columns:repeat(5, minmax(0, 1fr))}}.contributor-card{will-change:transform, box-shadow, border-color}.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)}.text-default{color:var(--black)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}";
7
+ const EdsGitlabContributorsStyle0 = edsGitlabContributorsCss;
8
+ const EdsGitlabContributors = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.accessToken = undefined;
12
+ this.projectId = '3360';
13
+ this.apiUrl = 'https://gitlab.ebrains.eu/api/v4';
14
+ this.path = undefined;
15
+ this.limit = 50;
16
+ this.minCommits = 1;
17
+ this.showStats = true;
18
+ this.columns = '4';
19
+ this.sortBy = 'commits';
20
+ this.contributors = [];
21
+ this.loading = true;
22
+ this.error = '';
23
+ }
24
+ async componentWillLoad() {
25
+ await this.fetchContributors();
26
+ }
27
+ /**
28
+ * Parses projectId prop to handle single or multiple project IDs
29
+ */
30
+ getProjectIds() {
31
+ return this.projectId.split(',').map(id => id.trim()).filter(id => id.length > 0);
32
+ }
33
+ /**
34
+ * Fetches commits by path and aggregates by author for a single project
35
+ */
36
+ async fetchCommitsByPathForProject(projectId) {
37
+ const commits = [];
38
+ let page = 1;
39
+ const perPage = 100; // GitLab max per page
40
+ // Fetch all commits with pagination
41
+ while (true) {
42
+ const url = `${this.apiUrl}/projects/${encodeURIComponent(projectId)}/repository/commits?path=${encodeURIComponent(this.path)}&per_page=${perPage}&page=${page}`;
43
+ const response = await fetch(url, {
44
+ headers: {
45
+ 'PRIVATE-TOKEN': this.accessToken
46
+ }
47
+ });
48
+ if (!response.ok) {
49
+ throw new Error(`GitLab API error: ${response.status} ${response.statusText}`);
50
+ }
51
+ const pageCommits = await response.json();
52
+ if (pageCommits.length === 0) {
53
+ break; // No more pages
54
+ }
55
+ commits.push(...pageCommits);
56
+ // Stop if we have enough commits or no more pages
57
+ if (pageCommits.length < perPage) {
58
+ break;
59
+ }
60
+ page++;
61
+ }
62
+ // Aggregate commits by author email
63
+ const authorMap = new Map();
64
+ for (const commit of commits) {
65
+ const email = commit.author_email.toLowerCase();
66
+ if (authorMap.has(email)) {
67
+ authorMap.get(email).commits++;
68
+ } else {
69
+ authorMap.set(email, {
70
+ name: commit.author_name,
71
+ email: commit.author_email,
72
+ commits: 1
73
+ });
74
+ }
75
+ }
76
+ // Convert to GitLabContributor format
77
+ return Array.from(authorMap.values()).map(author => ({
78
+ name: author.name,
79
+ email: author.email,
80
+ commits: author.commits,
81
+ additions: 0,
82
+ // Not available from commits API
83
+ deletions: 0 // Not available from commits API
84
+ }));
85
+ }
86
+ /**
87
+ * Fetches contributors from a single project
88
+ * For project 1505 (monorepo), applies path filter if provided
89
+ * For other projects, fetches all contributors
90
+ */
91
+ async fetchContributorsForProject(projectId) {
92
+ // Only apply path filter for project 1505 (the monorepo)
93
+ const shouldUsePath = this.path && projectId === '1505';
94
+ if (shouldUsePath) {
95
+ // Fetch commits by path and aggregate by author (for monorepo)
96
+ return await this.fetchCommitsByPathForProject(projectId);
97
+ } else {
98
+ // Use contributors API for entire repository
99
+ const contributorsResponse = await fetch(`${this.apiUrl}/projects/${encodeURIComponent(projectId)}/repository/contributors?per_page=100`, {
100
+ headers: {
101
+ 'PRIVATE-TOKEN': this.accessToken
102
+ }
103
+ });
104
+ if (!contributorsResponse.ok) {
105
+ throw new Error(`GitLab API error: ${contributorsResponse.status} ${contributorsResponse.statusText}`);
106
+ }
107
+ return await contributorsResponse.json();
108
+ }
109
+ }
110
+ /**
111
+ * Fetches contributors from GitLab API (supports multiple projects)
112
+ */
113
+ async fetchContributors() {
114
+ if (!this.accessToken) {
115
+ this.error = 'Access token is required for internal projects';
116
+ this.loading = false;
117
+ return;
118
+ }
119
+ try {
120
+ this.loading = true;
121
+ this.error = '';
122
+ const projectIds = this.getProjectIds();
123
+ let allContributorsData = [];
124
+ // Fetch contributors from all projects
125
+ for (const projectId of projectIds) {
126
+ const contributorsData = await this.fetchContributorsForProject(projectId);
127
+ allContributorsData.push(...contributorsData);
128
+ }
129
+ // Filter by minimum commits and exclude bot contributors
130
+ const filteredContributors = allContributorsData.filter(c => {
131
+ // Exclude if commits are below minimum
132
+ if (c.commits < this.minCommits) return false;
133
+ // Exclude GitLab CI and other bots
134
+ const email = c.email.toLowerCase();
135
+ const name = c.name.toLowerCase();
136
+ // Common bot identifiers
137
+ const botPatterns = ['gitlab-ci', 'gitlab ci', 'noreply@gitlab', 'bot@', 'automation@'];
138
+ return !botPatterns.some(pattern => email.includes(pattern) || name.includes(pattern));
139
+ });
140
+ // Aggregate duplicate contributors by username
141
+ const aggregatedContributors = this.aggregateContributors(filteredContributors);
142
+ // Sort contributors
143
+ if (this.sortBy === 'commits') {
144
+ aggregatedContributors.sort((a, b) => b.commits - a.commits);
145
+ } else {
146
+ aggregatedContributors.sort((a, b) => a.username.localeCompare(b.username));
147
+ }
148
+ // Apply limit after sorting
149
+ this.contributors = aggregatedContributors.slice(0, this.limit);
150
+ this.loading = false;
151
+ } catch (err) {
152
+ this.error = err instanceof Error ? err.message : 'Failed to fetch contributors';
153
+ this.loading = false;
154
+ console.error('Error fetching GitLab contributors:', err);
155
+ }
156
+ }
157
+ /**
158
+ * Extracts username from email address (part before @)
159
+ */
160
+ extractUsernameFromEmail(email) {
161
+ if (!email || !email.includes('@')) {
162
+ return email || 'unknown';
163
+ }
164
+ return email.split('@')[0];
165
+ }
166
+ /**
167
+ * Aggregates duplicate contributors by username (extracted from email)
168
+ * Combines commits, additions, and deletions for the same person
169
+ */
170
+ aggregateContributors(contributors) {
171
+ const aggregated = new Map();
172
+ for (const contributor of contributors) {
173
+ // Extract username from email
174
+ const username = this.extractUsernameFromEmail(contributor.email);
175
+ const key = username.toLowerCase();
176
+ if (aggregated.has(key)) {
177
+ // Aggregate with existing contributor
178
+ const existing = aggregated.get(key);
179
+ existing.commits += contributor.commits;
180
+ existing.additions += contributor.additions;
181
+ existing.deletions += contributor.deletions;
182
+ } else {
183
+ // Add new contributor with extracted username
184
+ aggregated.set(key, Object.assign(Object.assign({}, contributor), {
185
+ username
186
+ }));
187
+ }
188
+ }
189
+ return Array.from(aggregated.values());
190
+ }
191
+ /**
192
+ * Gets first and last name from full name
193
+ */
194
+ parseName(fullName) {
195
+ const parts = fullName.trim().split(' ');
196
+ if (parts.length === 1) {
197
+ return {
198
+ firstName: parts[0],
199
+ lastName: ''
200
+ };
201
+ }
202
+ const firstName = parts[0];
203
+ const lastName = parts.slice(1).join(' ');
204
+ return {
205
+ firstName,
206
+ lastName
207
+ };
208
+ }
209
+ /**
210
+ * Format large numbers with K suffix
211
+ */
212
+ formatNumber(num) {
213
+ if (num >= 1000) {
214
+ return `${(num / 1000).toFixed(1)}K`;
215
+ }
216
+ return num.toString();
217
+ }
218
+ render() {
219
+ if (this.loading) {
220
+ return h("div", {
221
+ class: "flex flex-col items-center justify-center p-12 gap-4"
222
+ }, h("eds-spinner", {
223
+ size: "md"
224
+ }), h("p", {
225
+ class: "text-base text-gray-600 m-0"
226
+ }, "Loading contributors..."));
227
+ }
228
+ if (this.error) {
229
+ return h("eds-alert", {
230
+ message: "Error loading contributors",
231
+ intent: "error"
232
+ });
233
+ }
234
+ if (this.contributors.length === 0) {
235
+ return h("eds-alert", {
236
+ message: "No contributors found for this project.",
237
+ intent: "error"
238
+ });
239
+ }
240
+ const gridClass = `grid gap-6 w-full ${this.columns === '2' ? 'grid-cols-1 sm:grid-cols-2' : this.columns === '3' ? 'grid-cols-1 sm:grid-cols-2 md:grid-cols-3' : this.columns === '4' ? 'grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4' : 'grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-5'}`;
241
+ return h("div", {
242
+ class: "w-full"
243
+ }, h("div", {
244
+ class: gridClass
245
+ }, this.contributors.map(contributor => {
246
+ const {
247
+ firstName,
248
+ lastName
249
+ } = this.parseName(contributor.name);
250
+ return h("div", {
251
+ class: "contributor-card flex flex-row gap-4 p-5 bg-white border border-gray-200 rounded-lg transition-all duration-200",
252
+ key: contributor.email
253
+ }, h("div", {
254
+ class: "flex-shrink-0"
255
+ }, h("eds-avatar", {
256
+ firstName: firstName,
257
+ lastName: lastName,
258
+ color: "black"
259
+ })), h("div", {
260
+ class: "min-w-0 flex flex-col gap-2"
261
+ }, h("span", {
262
+ class: "f-ui-01 text-default pb-2 m-0 whitespace-nowrap overflow-hidden text-ellipsis"
263
+ }, "@", contributor.username), h("div", {
264
+ class: "flex flex-col gap-2 mt-auto"
265
+ }, h("div", {
266
+ class: "flex items-center gap-2 font-semibold"
267
+ }, h("span", {
268
+ class: "text-light"
269
+ }, this.formatNumber(contributor.commits)), h("span", {
270
+ class: "text-lighter"
271
+ }, contributor.commits === 1 ? 'commit' : 'commits')))));
272
+ })));
273
+ }
274
+ };
275
+ EdsGitlabContributors.style = EdsGitlabContributorsStyle0;
276
+
277
+ export { EdsGitlabContributors as eds_gitlab_contributors };
@@ -11,7 +11,7 @@ const EdsIconBluesky = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '686dbb5f0c3c5f156940c83380c16c169f016219',
14
+ key: 'c2d0ffef1833f4a53a4447d517c6505ce9be70a4',
15
15
  class: this.class,
16
16
  innerHTML: bluesky
17
17
  });
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h } from './index.esm2.js';
2
- import { e as euSvg } from './eu-9ddde93a.esm.js';
2
+ import { e as euSvg } from './eu-8ac3e99c.esm.js';
3
3
  import 'react';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react-dom';
@@ -11,7 +11,7 @@ const EdsIconEu = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '400a5811c1d31a1c8d490e9614d89fe861cb4dd6',
14
+ key: 'c4a043469698de97b7433749599ee04746df7f8e',
15
15
  class: this.class,
16
16
  innerHTML: euSvg
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconFacebook = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '97ff8677a8252ec4cce47f9f857185945aca7cc8',
14
+ key: '8498500cd0da2784b889a7b2b2ca9ff4e8414ab6',
15
15
  class: this.class,
16
16
  innerHTML: facebook
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconGitlab = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'ef1ed1fd0fc7bcc7b0904589699656943af3f77e',
14
+ key: '41c0a44af7394753c8c656f5a1de86b1446f05e3',
15
15
  class: this.class,
16
16
  innerHTML: gitlabBlack
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconLinkedin = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'bfed785cb748dc93f95bb317750b5e82dc6c1dcc',
14
+ key: '02a55590ddf6ee6b873370913e9e7cbfe5390c79',
15
15
  class: this.class,
16
16
  innerHTML: linkedin
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconMastodon = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: '5be4622aebcbe17b4b40c31fd4b9dc92a102b85e',
14
+ key: '633a54b9f7bdeec8d704d7994de959a8e12ebe4f',
15
15
  class: this.class,
16
16
  innerHTML: mastodon
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconTwitter = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'e149a8a26c99f8048a42ed42f143a5947b215ea5',
14
+ key: '6f20d0106096d427556e05b663e3fa133852470e',
15
15
  class: this.class,
16
16
  innerHTML: twitter
17
17
  });
@@ -11,7 +11,7 @@ const EdsIconYoutube = class {
11
11
  }
12
12
  render() {
13
13
  return h("span", {
14
- key: 'a2dd7d5f2d615999cd5e7970a96117ed90bdcda3',
14
+ key: 'e07946107d2e0e5a0705bc52d27a436e0f4d5956',
15
15
  class: this.class,
16
16
  innerHTML: youtube
17
17
  });