@ebrains/react 0.4.0-alpha.0 → 0.6.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 (85) hide show
  1. package/analytics-44b1416b.esm.js +55 -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_13.entry.esm.js +1064 -0
  6. package/eds-alert.entry.esm.js +104 -0
  7. package/eds-block-break.entry.esm.js +22 -0
  8. package/eds-breadcrumb.entry.esm.js +182 -0
  9. package/eds-card-project.entry.esm.js +12 -11
  10. package/eds-card-tags.entry.esm.js +1 -1
  11. package/eds-card-tool.entry.esm.js +5 -6
  12. package/eds-card-wrapper.entry.esm.js +4 -4
  13. package/eds-code-block.entry.esm.js +8 -8
  14. package/eds-components-section.entry.esm.js +14 -2
  15. package/eds-cookies-preference.entry.esm.js +47 -0
  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-footer.entry.esm.js +102 -0
  20. package/eds-form.entry.esm.js +410 -0
  21. package/eds-frame.entry.esm.js +117 -0
  22. package/eds-fullscreen-menu.entry.esm.js +143 -0
  23. package/eds-header.entry.esm.js +130 -0
  24. package/eds-icon-arrow-diagonal.entry.esm.js +1 -1
  25. package/eds-icon-arrow-right.entry.esm.js +1 -1
  26. package/eds-icon-bluesky.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-facebook.entry.esm.js +1 -1
  35. package/eds-icon-gitlab.entry.esm.js +1 -1
  36. package/eds-icon-linkedin.entry.esm.js +1 -1
  37. package/eds-icon-loader.entry.esm.js +1 -1
  38. package/eds-icon-mastodon.entry.esm.js +1 -1
  39. package/eds-icon-menu.entry.esm.js +1 -1
  40. package/eds-icon-more.entry.esm.js +1 -1
  41. package/eds-icon-search.entry.esm.js +1 -1
  42. package/eds-icon-success.entry.esm.js +1 -1
  43. package/eds-icon-twitter.entry.esm.js +1 -1
  44. package/eds-icon-user.entry.esm.js +1 -1
  45. package/eds-icon-youtube.entry.esm.js +1 -1
  46. package/eds-input_7.entry.esm.js +529 -0
  47. package/eds-link.entry.esm.js +204 -0
  48. package/eds-login.entry.esm.js +66 -45
  49. package/eds-logo-variations.entry.esm.js +1 -1
  50. package/eds-logo.entry.esm.js +87 -0
  51. package/eds-modal.entry.esm.js +129 -0
  52. package/eds-navigator.entry.esm.js +5 -5
  53. package/eds-pagination_2.entry.esm.js +15 -16
  54. package/eds-progress-bar.entry.esm.js +7 -2
  55. package/eds-rating.entry.esm.js +28 -18
  56. package/eds-section-core_2.entry.esm.js +5 -5
  57. package/eds-social-networks.entry.esm.js +74 -0
  58. package/eds-steps.entry.esm.js +98 -0
  59. package/eds-svg-repository.entry.esm.js +1 -1
  60. package/eds-switch.entry.esm.js +58 -0
  61. package/eds-tab.entry.esm.js +1 -1
  62. package/eds-tabs-content.entry.esm.js +5 -5
  63. package/eds-tabs.entry.esm.js +4 -4
  64. package/eds-timeline.entry.esm.js +4 -4
  65. package/eds-tooltip.entry.esm.js +4 -5
  66. package/eds-trl.entry.esm.js +2 -2
  67. package/eds-user.entry.esm.js +118 -0
  68. package/eds-vertical-stepper.entry.esm.js +81 -0
  69. package/incorrect-use-of-colors.entry.esm.js +7 -7
  70. package/index.esm.js +1 -1
  71. package/index.esm2.js +63 -9
  72. package/{keycloak-13893af6.esm.js → keycloak-d502ec16.esm.js} +219 -168
  73. package/logo-space.entry.esm.js +4 -4
  74. package/logo-variations-horizontal_2.entry.esm.js +26 -26
  75. package/logo-wrong-usage.entry.esm.js +37 -37
  76. package/package.json +1 -1
  77. package/src/components.d.ts +3 -0
  78. package/token-list_3.entry.esm.js +5 -5
  79. package/token-ratios.entry.esm.js +3 -3
  80. package/token-spacing.entry.esm.js +26 -26
  81. package/token-typography.entry.esm.js +2 -2
  82. package/color-bb472c37.esm.js +0 -423
  83. package/eds-accordion_33.entry.esm.js +0 -369
  84. package/eds-card-section.entry.esm.js +0 -70
  85. package/eds-matomo-notice.entry.esm.js +0 -129
@@ -0,0 +1,74 @@
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 edsSocialNetworksCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.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)}.f-ui-02-light{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)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.mt-12{margin-top:0.75rem}.mt-16{margin-top:1rem}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.gap-4{gap:0.25rem}.effect-color{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:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.effect-focus{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.hover\\:text-default:hover{color:var(--black)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:8px}";
7
+ const EdsSocialNetworksStyle0 = edsSocialNetworksCss;
8
+ const EdsSocialNetworks = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ /**
12
+ * Array of social network objects, each containing label, URL, and icon.
13
+ * These are used to render the social network links.
14
+ *
15
+ * @private
16
+ * @type {SocialNetworks[]}
17
+ */
18
+ this.socialNetworks = [{
19
+ label: 'Twitter',
20
+ url: 'https://twitter.com/ebrains_eu',
21
+ icon: 'twitter'
22
+ }, {
23
+ label: 'Linkedin',
24
+ url: 'https://www.linkedin.com/company/ebrains-eu/about/',
25
+ icon: 'linkedin'
26
+ }, {
27
+ label: 'Facebook',
28
+ url: 'https://www.facebook.com/people/Ebrains_eu/100046659909324/',
29
+ icon: 'facebook'
30
+ }, {
31
+ label: 'Youtube',
32
+ url: 'https://www.youtube.com/channel/UC6E796cVVR5Xrs2A5jJmleQ',
33
+ icon: 'youtube'
34
+ }, {
35
+ label: 'Mastodon',
36
+ url: 'https://mastodon.social/@ebrains',
37
+ icon: 'mastodon'
38
+ }, {
39
+ label: 'Bluesky',
40
+ url: 'https://bsky.app/profile/ebrains.bsky.social',
41
+ icon: 'bluesky'
42
+ }];
43
+ this.title = 'Follow EBRAINS to keep up-to-date';
44
+ }
45
+ /**
46
+ * Renders the component's HTML structure with links to EBRAINS social profiles.
47
+ * Each social network link uses the `eds-link` component with specific classes and styles.
48
+ *
49
+ * @returns {JSX.Element} The rendered JSX for the component.
50
+ */
51
+ render() {
52
+ return h("div", {
53
+ key: '9efc31261e88c70f9c808251124178d807140594'
54
+ }, h("p", {
55
+ key: '383101de2aaba05e1024f3ba86d788ad5d92173c',
56
+ class: "f-ui-02"
57
+ }, this.title), h("ul", {
58
+ key: 'e27243a4e7b8aab085c4ef091d67df57dba70664',
59
+ class: "mt-12 flex gap-4"
60
+ }, this.socialNetworks.map((network, index) => h("li", {
61
+ key: index
62
+ }, h("eds-link", {
63
+ "extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm",
64
+ external: true,
65
+ "aria-label": network.label,
66
+ url: network.url,
67
+ icon: network.icon,
68
+ intent: "strong"
69
+ })))));
70
+ }
71
+ };
72
+ EdsSocialNetworks.style = EdsSocialNetworksStyle0;
73
+
74
+ export { EdsSocialNetworks as eds_social_networks };
@@ -0,0 +1,98 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
6
+ const edsStepsCss = ".steps{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps h4::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:0.875rem;border:1px solid #ccc;background:#333;color:#fff;border-radius:50%}.steps blockquote{margin-top:16px;margin-bottom:16px;font-style:italic;color:#aaa;padding-left:6px}.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)}.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)}.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-error{color:var(--red-700)}.text-extra-light{color:var(--grey-300)}.text-inverse{color:var(--white)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.mb-28{margin-bottom:1.75rem}";
7
+ const EdsStepsStyle0 = edsStepsCss;
8
+ const EdsSteps = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.stepClick = createEvent(this, "stepClick", 7);
12
+ this.handleNext = () => {
13
+ if (this.activeStep < this.parsedSteps.length) {
14
+ this.activeStep = this.activeStep + 1;
15
+ }
16
+ };
17
+ this.handleBack = () => {
18
+ if (this.activeStep > 0) {
19
+ this.activeStep = this.activeStep - 1;
20
+ }
21
+ };
22
+ this.steps = [];
23
+ this.type = 'static';
24
+ this.activeStep = 0;
25
+ }
26
+ handleStepClick(index) {
27
+ this.stepClick.emit(index);
28
+ // In linear mode, update the active step on header click.
29
+ if (this.type === 'linear') {
30
+ this.activeStep = index;
31
+ }
32
+ }
33
+ /**
34
+ * Parse the JSON string into an array of steps.
35
+ */
36
+ get parsedSteps() {
37
+ if (typeof this.steps === 'string') {
38
+ try {
39
+ const stepsStr = this.steps;
40
+ return JSON.parse(stepsStr);
41
+ } catch (error) {
42
+ //console.error('Invalid steps JSON', error);
43
+ return [];
44
+ }
45
+ }
46
+ return this.steps;
47
+ }
48
+ /*private handleReset = () => {
49
+ this.activeStep = 0;
50
+ };*/
51
+ render() {
52
+ const steps = this.parsedSteps;
53
+ if (this.type === 'linear') {
54
+ return h("div", null, h("div", {
55
+ class: "steps"
56
+ }, steps.map((step, index) => h("div", {
57
+ class: "step mb-28",
58
+ key: index
59
+ }, h("h3", {
60
+ onClick: () => this.handleStepClick(index)
61
+ }, step.title), this.activeStep === index && h("div", {
62
+ class: "content"
63
+ }, h("div", {
64
+ class: "f-body-02 text-lighter my-16"
65
+ }, step.content), h("eds-button", {
66
+ label: index === steps.length - 1 ? 'Finish' : 'Continue',
67
+ intent: "primary",
68
+ class: "next-btn",
69
+ onClick: this.handleNext
70
+ }), h("eds-button", {
71
+ label: "Back",
72
+ intent: "ghostInverse",
73
+ onClick: this.handleBack,
74
+ disabled: index === 0,
75
+ "extra-class": index === 0 ? 'hidden' : 'ml-8 block'
76
+ }))))), this.activeStep === steps.length && h("div", {
77
+ class: "completed"
78
+ }, h("eds-alert", {
79
+ intent: "success",
80
+ message: "All steps completed - you're finished!"
81
+ })));
82
+ }
83
+ // Static mode: show all steps with their content, no navigation buttons.
84
+ return h("div", {
85
+ class: "steps"
86
+ }, steps.map((step, index) => h("div", {
87
+ class: "step mb-28",
88
+ key: index
89
+ }, h("h3", null, step.title), h("div", {
90
+ class: "content"
91
+ }, h("div", {
92
+ class: "f-body-02 text-lighter my-16"
93
+ }, step.content)))));
94
+ }
95
+ };
96
+ EdsSteps.style = EdsStepsStyle0;
97
+
98
+ export { EdsSteps as eds_steps };
@@ -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,
@@ -0,0 +1,58 @@
1
+ import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
2
+ import 'react';
3
+ import 'react/jsx-runtime';
4
+ import 'react-dom';
5
+
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 EdsSwitchStyle0 = edsSwitchCss;
8
+ const EdsSwitch = class {
9
+ constructor(hostRef) {
10
+ registerInstance(this, hostRef);
11
+ this.change = createEvent(this, "change", 7);
12
+ this.toggleSwitch = () => {
13
+ if (this.disabled) {
14
+ return;
15
+ }
16
+ this.checked = !this.checked;
17
+ this.change.emit(this.checked);
18
+ };
19
+ this.checked = false;
20
+ this.disabled = false;
21
+ this.labelOn = '';
22
+ this.labelOff = '';
23
+ }
24
+ render() {
25
+ // Compute an accessible name based on state.
26
+ const accessibleLabel = this.labelOn || this.labelOff ? this.checked ? this.labelOn : this.labelOff : 'Toggle switch';
27
+ return h("div", {
28
+ key: 'd4c727cbb562921b2bcba269e84f25c359c7061b',
29
+ class: "switch-container"
30
+ }, this.labelOff && h("span", {
31
+ key: '90b18fff27bd21501466deb5879e5fe6ff607043',
32
+ class: "switch-label switch-label--off"
33
+ }, this.labelOff), h("button", {
34
+ key: '8675f5d9f972d3932710fa7f9b28f74f95a83003',
35
+ type: "button",
36
+ role: "switch",
37
+ "aria-checked": this.checked ? 'true' : 'false',
38
+ "aria-disabled": this.disabled ? 'true' : 'false',
39
+ "aria-label": accessibleLabel,
40
+ class: {
41
+ switch: true,
42
+ 'switch--checked': this.checked,
43
+ 'switch--disabled': this.disabled
44
+ },
45
+ onClick: this.toggleSwitch,
46
+ disabled: this.disabled
47
+ }, h("span", {
48
+ key: '26aa30a01b10419c1665b1fd58b5696a02d1504a',
49
+ class: "switch-handle"
50
+ })), this.labelOn && h("span", {
51
+ key: '3680d67555e9193a97e129c0639b411263e070a8',
52
+ class: "switch-label switch-label--on"
53
+ }, this.labelOn));
54
+ }
55
+ };
56
+ EdsSwitch.style = EdsSwitchStyle0;
57
+
58
+ export { EdsSwitch as eds_switch };
@@ -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-bb472c37.esm.js';
2
+ import { s as sendAnalytics } from './analytics-44b1416b.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: 'd94df79c55522088de5445587758a5eea028b313',
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: 'e7d01a2e6b424c25749c0d70305fb1c8c55bef74',
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: 'ef8ff8a02e570dfcf8143997ace793a65917e6ca',
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: '8f014081c3bc2a8a3013aea3aff32690d6f71c85'
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-bb472c37.esm.js';
2
+ import { s as sendAnalytics } from './analytics-44b1416b.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: '5a0c7dbdd059b2a1efdf31e91725dd1d49c88bd4',
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: '74bb7e66b88d845359caf285430fca079abfab03',
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: '71ca3465da106b2d1ed59eca28eabfe60a1ac0fc',
130
130
  ref: el => this.tabContainer = el,
131
131
  class: "inline-flex",
132
132
  "aria-label": this.navAriaLabel
@@ -61,16 +61,16 @@ const EdsTimeline = class {
61
61
  }
62
62
  render() {
63
63
  return h("div", {
64
- key: '6016cb89d3fe3250482b42d8a0bf500fe18cee5d',
64
+ key: '1ba4a93ce518b52f5821af75ae0587c44db92c6d',
65
65
  class: "max-w-sidebar mx-auto px-4 py-8"
66
66
  }, h("div", {
67
- key: '994cc7af75950a0f09d108804efff796602aeb93',
67
+ key: '3e019420ddd4bfab7800567c7130299ea47205c6',
68
68
  class: "relative"
69
69
  }, h("div", {
70
- key: '77b15ae60feb380ea20c6466b49d0efd5d8f5180',
70
+ key: 'df99ce8fb08232c46449d7485dd7cffcd04b64d6',
71
71
  class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0"
72
72
  }), h("div", {
73
- key: '60bb384ce4eedd7bfc3b15a7a637e2b89318d619',
73
+ key: '1b52694d2e8c3656910c02680aa8ce2e78b02997',
74
74
  class: "space-y-16"
75
75
  }, this.parsedEvents.map((event, index) => h("div", {
76
76
  class: "relative flex"
@@ -1,9 +1,8 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
- import { s as sendAnalytics } from './color-bb472c37.esm.js';
2
+ import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
3
3
  import 'react';
4
4
  import 'react/jsx-runtime';
5
5
  import 'react-dom';
6
- import './index-39c58238.esm.js';
7
6
 
8
7
  const edsTooltipCss = ".relative{position:relative}.absolute{position:absolute}.rounded-sm{border-radius:8px}.rounded-xs{border-radius:4px}.bg-stronger{background-color:var(--grey-900)}.bg-strongest{background-color:var(--black)}.text-inverse{color:var(--white)}.text-default{color:var(--black)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.pointer-events-none{pointer-events:none}.-top-8{top:-0.5rem}.left-1\\/2{left:50%}.z-10{z-index:10}.block{display:block}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-full{--tw-translate-y:-100%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.whitespace-nowrap{white-space:nowrap}.py-2{padding-top:0.125rem;padding-bottom:0.125rem}.px-4{padding-left:0.25rem;padding-right:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.p-12{padding:0.75rem}.p-16{padding:1rem}.p-20{padding:1.25rem}";
9
8
  const EdsTooltipStyle0 = edsTooltipCss;
@@ -102,12 +101,12 @@ const EdsTooltip = class {
102
101
  }
103
102
  render() {
104
103
  return h("div", {
105
- key: '673ab0ee31378410f9c83bb5fd37b27d00a7b018',
104
+ key: '1635b034319df4827a62ed58267d81db277ad19d',
106
105
  class: "relative"
107
106
  }, h("slot", {
108
- key: '0c0138dfdf9aafecc1e0e925c84d4b0ca957f82d'
107
+ key: '6cdfd0f6d456b984464c5091a2829cdba69ba895'
109
108
  }), this.isVisible && this.isPositioned && this.content && h("div", {
110
- key: '798d01cf631f2e5b3af9d9bb11a847041a6ee2ba',
109
+ key: '7e736731dc700e0273fdfe15202426d2db086aef',
111
110
  class: "rounded-xs bg-strongest text-inverse f-ui-03-light pointer-events-none absolute z-10 whitespace-nowrap p-6",
112
111
  role: "tooltip",
113
112
  style: {
@@ -51,10 +51,10 @@ const EdsTrl = class {
51
51
  }
52
52
  };
53
53
  return h("div", {
54
- key: '868a7c45e6495d7a2ed8a4ad2974ac31f74535a6',
54
+ key: 'a329a001d6275fcfe7df9bddf83bd289effe4151',
55
55
  class: "container mx-auto px-4 py-8"
56
56
  }, h("eds-table", {
57
- key: 'ed3e2a949d0e1d66a5e80018fa5fcac9bbe64620',
57
+ key: '93aebfd840b16416789b15eec0daa16d9126aa9f',
58
58
  data: JSON.stringify(tableData),
59
59
  config: JSON.stringify(tableConfig),
60
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: '8fe0aaf06ed421d8ca6e512247b4d15b092c895f',
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 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 EdsTable, J as EdsTabs, K as EdsTag, L as EdsTimeline, M as EdsToast, N as EdsToastManager, O as EdsTooltip, P 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';