@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
@@ -1,5 +1,6 @@
1
1
  import { r as registerInstance, c as createEvent, h } from './index.esm2.js';
2
- import { a as logout, i as initKeycloak, b as isAuthenticated, g as getUser, l as login } from './keycloak-13893af6.esm.js';
2
+ import { l as login, a as logout, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak-d502ec16.esm.js';
3
+ import { t as toast } from './toastManager-d9eee791.esm.js';
3
4
  import 'react';
4
5
  import 'react/jsx-runtime';
5
6
  import 'react-dom';
@@ -8,68 +9,88 @@ const EdsLogin = class {
8
9
  constructor(hostRef) {
9
10
  registerInstance(this, hostRef);
10
11
  this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
11
- // Method to handle user logout
12
- this.handleLogout = () => {
13
- logout();
14
- this.authenticated = false; // Reset authentication state after logout
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 = async () => {
17
+ if (!this.authenticated) {
18
+ try {
19
+ await login();
20
+ toast.show('You are authenticated', 'success');
21
+ } catch (error) {
22
+ toast.show(error.message, 'error');
23
+ }
24
+ }
25
+ };
26
+ /**
27
+ * Handles user logout by invoking the Keycloak `logout` function.
28
+ * Resets the `authenticated` state to `false` after logout.
29
+ */
30
+ this.handleLogout = async () => {
31
+ try {
32
+ await logout();
33
+ } catch (error) {
34
+ toast.show(error.message, 'error');
35
+ }
36
+ this.authenticated = false;
37
+ this.user = null;
15
38
  };
16
- this.keycloakUrl = '';
17
- this.keycloakRealm = '';
18
- this.keycloakClientId = '';
39
+ this.keycloakUrl = undefined;
40
+ this.keycloakRealm = undefined;
41
+ this.keycloakClientId = undefined;
19
42
  this.authenticated = false;
20
43
  this.user = null;
21
44
  }
22
- // Lifecycle method to check authentication status before the component loads
45
+ /**
46
+ * Lifecycle method that runs when the component is about to load.
47
+ * It initializes authentication by calling the `initAuth` method.
48
+ */
23
49
  async componentWillLoad() {
24
- await this.checkAuthentication();
50
+ // Check if required props are provided (optional check)
51
+ if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
52
+ // eslint-disable-next-line
53
+ console.error('Keycloak configuration props are missing.');
54
+ return;
55
+ }
56
+ await this.initAuth();
25
57
  }
26
- // Method to initialize Keycloak and check if the user is authenticated
27
- async checkAuthentication() {
58
+ /**
59
+ * Initializes the Keycloak authentication by configuring Keycloak with the provided props.
60
+ * Sets the `authenticated` state and `user` data if the user is authenticated.
61
+ * Emits `authStatusChanged` event with the authentication status.
62
+ */
63
+ async initAuth() {
28
64
  try {
29
- const keycloakConfig = {
65
+ await initKeycloak({
30
66
  url: this.keycloakUrl,
31
67
  realm: this.keycloakRealm,
32
68
  clientId: this.keycloakClientId
33
- };
34
- await initKeycloak(keycloakConfig);
35
- // eslint-disable-next-line
36
- // Set authentication state and fetch user data if authenticated
37
- this.authenticated = isAuthenticated();
38
- if (this.authenticated) {
69
+ }, true);
70
+ if (isAuthenticated()) {
39
71
  this.user = getUser();
40
- }
41
- this.authStatusChanged.emit({
42
- authenticated: this.authenticated,
43
- user: this.user
44
- }); // Emit auth status change
45
- } catch (error) {
46
- // eslint-disable-next-line
47
- console.error('Keycloak initialization or login check failed:', error);
48
- }
49
- }
50
- // Method to handle user login
51
- async handleLogin() {
52
- try {
53
- if (!this.authenticated) {
54
- login(); // Start the Keycloak login process
72
+ this.authenticated = true;
73
+ this.authStatusChanged.emit({
74
+ authenticated: this.authenticated,
75
+ user: this.user
76
+ }); // Emit auth status change
55
77
  }
56
78
  } catch (error) {
57
- // eslint-disable-next-line
58
- console.error('Login failed:', error);
79
+ toast.show(error.message, 'error');
59
80
  }
60
81
  }
61
- getBtnLabel() {
62
- return this.authenticated ? 'Logout' : 'Login';
63
- }
64
82
  render() {
65
- return h("eds-button", {
66
- key: '35f298ecf951d5b1087f988262ae7d312c5e2d38',
67
- label: this.getBtnLabel(),
83
+ return h("div", {
84
+ key: '62768f8a6cc8ac16b13f9b2bb9cf5835f7f63844',
85
+ class: "block"
86
+ }, !this.authenticated && h("eds-button", {
87
+ key: '31e341d628242fed472f673c0fe8346c7871515d',
88
+ label: "Login",
68
89
  intent: "primary",
69
90
  "extra-class": "text-default",
70
- "aria-label": this.getBtnLabel(),
71
- triggerClick: this.authenticated ? this.handleLogout : this.handleLogin.bind(this)
72
- });
91
+ "aria-label": "Login",
92
+ triggerClick: this.handleLogin.bind(this)
93
+ }));
73
94
  }
74
95
  };
75
96
 
@@ -20,7 +20,7 @@ const EdsLogoVariations = class {
20
20
  }
21
21
  render() {
22
22
  return h("div", {
23
- key: '9d6ce0e75030d6e636aab423181b0ce999f6f1b0',
23
+ key: '0494cbb3e7b4902e91a0c78c691bc3405b9f11cc',
24
24
  class: "container"
25
25
  }, this.renderContent());
26
26
  }
@@ -0,0 +1,87 @@
1
+ import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
+ import { h as hLogoColor } from './logo-color-7f1fd803.esm.js';
3
+ import { h as hLogoBlack, a as hLogoColorWhite, b as hLogoWhite, c as hLogoWhiteNoBg, v as vLogoColor, d as vLogoBlack, e as vLogoColorWhite, f as vLogoWhite, g as vLogoWhiteNoBg } from './logo-white-no-bg-f382f86f.esm.js';
4
+ import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
5
+ import 'react';
6
+ import 'react/jsx-runtime';
7
+ import 'react-dom';
8
+
9
+ const edsLogoCss = ".w-\\[130px\\]{width:130px}.mr-auto{margin-right:auto}.text-current{color:currentColor}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.h-full{height:100%}.w-full{width:100%}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}@media (min-width: 900px){.lg\\:w-\\[150px\\]{width:150px}}";
10
+ const EdsLogoStyle0 = edsLogoCss;
11
+ const EdsLogo = class {
12
+ constructor(hostRef) {
13
+ registerInstance(this, hostRef);
14
+ this.href = '/';
15
+ this.orientation = 'horizontal';
16
+ this.type = undefined;
17
+ this.label = 'Home';
18
+ }
19
+ /**
20
+ * Handles the click event on the logo link.
21
+ * Emits a `matomoEvent` for analytics tracking with details about the interaction.
22
+ * - `category`: Component type (e.g., "ui-component").
23
+ * - `tag`: The HTML tag name of the component.
24
+ * - `name`: Event name, set as "logo".
25
+ * - `action`: The action, set as "click".
26
+ */
27
+ handleClick() {
28
+ sendAnalytics({
29
+ category: 'ui-component',
30
+ tag: this.el.tagName.toLowerCase(),
31
+ name: 'logo',
32
+ action: 'click'
33
+ });
34
+ }
35
+ /**
36
+ * Determines the appropriate SVG content based on the `orientation` and `type` props.
37
+ */
38
+ getLogo() {
39
+ const logos = {
40
+ horizontal: {
41
+ color: hLogoColor,
42
+ black: hLogoBlack,
43
+ 'color-white': hLogoColorWhite,
44
+ white: hLogoWhite,
45
+ 'no-bg': hLogoWhiteNoBg
46
+ },
47
+ vertical: {
48
+ color: vLogoColor,
49
+ black: vLogoBlack,
50
+ 'color-white': vLogoColorWhite,
51
+ white: vLogoWhite,
52
+ 'no-bg': vLogoWhiteNoBg
53
+ }
54
+ };
55
+ // Validate the orientation and type
56
+ const validOrientation = logos[this.orientation];
57
+ if (!validOrientation) {
58
+ //console.error(`Invalid orientation "${this.orientation}". Falling back to "horizontal".`);
59
+ return hLogoColor; // Default fallback logo
60
+ }
61
+ const validLogo = validOrientation[this.type];
62
+ if (!validLogo) {
63
+ //console.error(`Invalid type "${this.type}" for orientation "${this.orientation}". Falling back to "color".`);
64
+ return validOrientation['color']; // Fallback to color logo
65
+ }
66
+ return validLogo;
67
+ }
68
+ render() {
69
+ const logoContent = this.getLogo();
70
+ return h("a", {
71
+ key: 'ee8de4071b0137020341982b4c5cb2c938f1c4df',
72
+ href: this.href,
73
+ onClick: () => this.handleClick(),
74
+ class: "eds-logo-wrapper",
75
+ "aria-label": this.label
76
+ }, h("div", {
77
+ key: '1eb620afbcc5a2a5c6914cc1c91a45ca62d0068c',
78
+ innerHTML: logoContent
79
+ }));
80
+ }
81
+ get el() {
82
+ return getElement(this);
83
+ }
84
+ };
85
+ EdsLogo.style = EdsLogoStyle0;
86
+
87
+ export { EdsLogo as eds_logo };
@@ -0,0 +1,129 @@
1
+ import { r as registerInstance, h, g as getElement } from './index.esm2.js';
2
+ import { s as sendAnalytics } from './analytics-44b1416b.esm.js';
3
+ import 'react';
4
+ import 'react/jsx-runtime';
5
+ import 'react-dom';
6
+
7
+ const edsModalCss = ".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.fixed{position:fixed}.inset-0{inset:0rem}.z-10{z-index:10}.z-50{z-index:50}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.left-20{left:1.25rem}.right-20{right:1.25rem}.top-1\\/2{top:50%}.top-20{top:1.25rem}.bottom-20{bottom:1.25rem}.grow{flex-grow:1}.-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))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}";
8
+ const EdsModalStyle0 = edsModalCss;
9
+ const EdsModal = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.isOpen = false;
13
+ this.title = '';
14
+ this.truncate = true;
15
+ this.truncateLines = '1';
16
+ this.position = 'middle';
17
+ }
18
+ getTruncateClass() {
19
+ return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
20
+ }
21
+ /**
22
+ * Returns the Tailwind CSS classes to position the modal based on the `position` prop.
23
+ *
24
+ * @private
25
+ * @returns {string} The concatenated CSS classes for modal positioning.
26
+ */
27
+ getModalPositionClasses() {
28
+ switch (this.position) {
29
+ case 'top':
30
+ return 'left-1/2 top-20 -translate-x-1/2';
31
+ case 'bottom':
32
+ return 'left-1/2 bottom-20 -translate-x-1/2';
33
+ case 'left':
34
+ return 'left-20 top-1/2 -translate-y-1/2';
35
+ case 'right':
36
+ return 'right-20 top-1/2 -translate-y-1/2';
37
+ case 'middle':
38
+ default:
39
+ return 'left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2';
40
+ }
41
+ }
42
+ /**
43
+ * Opens the modal.
44
+ */
45
+ async open() {
46
+ var _a;
47
+ this.isOpen = true;
48
+ sendAnalytics({
49
+ category: 'ui-component',
50
+ parentContext: null,
51
+ tag: this.el.tagName.toLowerCase(),
52
+ name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
53
+ action: 'opened'
54
+ });
55
+ }
56
+ /**
57
+ * Closes the modal.
58
+ */
59
+ async close() {
60
+ var _a;
61
+ this.isOpen = false;
62
+ sendAnalytics({
63
+ category: 'ui-component',
64
+ parentContext: null,
65
+ tag: this.el.tagName.toLowerCase(),
66
+ name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
67
+ action: 'closed'
68
+ });
69
+ }
70
+ /**
71
+ * Toggles the modal open or closed.
72
+ */
73
+ async toggle() {
74
+ this.isOpen = !this.isOpen;
75
+ }
76
+ /**
77
+ * Closes the modal when the Escape key is pressed.
78
+ */
79
+ handleKeyDown(event) {
80
+ if (this.isOpen && event.key === 'Escape') {
81
+ this.close();
82
+ }
83
+ }
84
+ render() {
85
+ // Generate a unique id for the title so we can reference it for aria-labelledby.
86
+ const titleId = `modal-title-${this.el.tagName.toLowerCase()}`;
87
+ return h("div", {
88
+ key: 'cd976fb0cd0c0663279dcd4dbd5823e26b6c32f7',
89
+ class: `${this.isOpen ? 'block' : 'hidden'} fixed inset-0 z-50 flex`,
90
+ role: "dialog",
91
+ "aria-modal": "true",
92
+ "aria-labelledby": titleId
93
+ }, this.isOpen && h("div", {
94
+ key: '40a2febed5d0ec15d5370183c97cfd05abd72007',
95
+ class: "fixed inset-0 bg-dark bg-opacity-90" // Add backdrop-blur utility class here
96
+ ,
97
+
98
+ onClick: () => this.close()
99
+ }), h("div", {
100
+ key: '50f2c23d80a2007aca4d0a8911816141e43b71ee',
101
+ class: `max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center`
102
+ }, h("div", {
103
+ key: 'e1cba5879bc488a99b896c48c8a780336b2195e7',
104
+ class: "flex justify-between items-center border-b-2 border-softer pb-8"
105
+ }, h("span", {
106
+ key: '8f018e3d2890346d23e7dcb115676051048bcacb',
107
+ id: titleId,
108
+ class: `f-heading-04 text-lighter ${this.getTruncateClass()}`
109
+ }, this.title), h("eds-button", {
110
+ key: '4ae4013dd45573648817ac95ee4370ed615aa6a0',
111
+ intent: "tertiary",
112
+ icon: "close",
113
+ "aria-label": "Close modal",
114
+ onClick: () => this.close(),
115
+ "extra-class": "ml-8"
116
+ })), h("div", {
117
+ key: 'ac4e3d8f273d04ad02e0123c23b36b89bfc89db2',
118
+ class: "pt-8"
119
+ }, h("slot", {
120
+ key: '60917e9f750bfd7948e580acc817cffe6424608a'
121
+ }))));
122
+ }
123
+ get el() {
124
+ return getElement(this);
125
+ }
126
+ };
127
+ EdsModal.style = EdsModalStyle0;
128
+
129
+ export { EdsModal as eds_modal };
@@ -35,10 +35,10 @@ const EdsNavigator = class {
35
35
  }
36
36
  render() {
37
37
  return h("ul", {
38
- key: '1ab60197bbc9ee86d77134138744dce39df2aaa7',
38
+ key: '712287e683436cc98c2d6ef195501add1929522e',
39
39
  class: "flex lg:flex grow items-center justify-center gap-x-8"
40
40
  }, this.prevLabel && h("eds-link", {
41
- key: 'b29fd121d33c1e919d24a5d460d8d6864f1ff9db',
41
+ key: '4fda36ce37897284d7062f88133f147831d96a6f',
42
42
  label: this.prevLabel,
43
43
  url: this.prevUrl || undefined,
44
44
  disabled: !this.prevUrl,
@@ -47,10 +47,10 @@ const EdsNavigator = class {
47
47
  intent: this.linkIntent,
48
48
  class: "mr-auto !p-8 lg:!pr-12"
49
49
  }, h("eds-icon-wrapper", {
50
- key: '64620ccfaf2e006a6414bcd7e874a352b9d2d56b',
50
+ key: '9bfa6bbbdc68641f65bec49f207d96f075b9a5b0',
51
51
  icon: "chevron-left"
52
52
  }), this.prevLabel), this.nextLabel && h("eds-link", {
53
- key: 'ae6425f0f01c8f5bcbdae27d9bea9dc3a5b09d3b',
53
+ key: '6ee8ebee011a2c30a74645b072c7c37929d0a55f',
54
54
  label: this.nextLabel,
55
55
  url: this.nextUrl || undefined,
56
56
  disabled: !this.nextUrl,
@@ -59,7 +59,7 @@ const EdsNavigator = class {
59
59
  intent: this.linkIntent,
60
60
  class: "ml-auto !p-8 lg:!pl-12"
61
61
  }, this.nextLabel, h("eds-icon-wrapper", {
62
- key: 'd286fc26f17ee6cf6828990e98df7865fbbfd352',
62
+ key: '44ebd4dcce0e367df7d9035bb445e49fde35e913',
63
63
  icon: "chevron-right",
64
64
  class: "w-20 h-20"
65
65
  })));
@@ -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 edsPaginationCss = "ul,menu{list-style:none;margin:0;padding:0}.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)}.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)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.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}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}";
9
8
  const EdsPaginationStyle0 = edsPaginationCss;
@@ -172,12 +171,12 @@ const EdsPagination = class {
172
171
  }
173
172
  render() {
174
173
  return h("div", {
175
- key: '584e0918b070eac25a7c4bfceff59b000b60076c'
174
+ key: '8c8418eec263acc153a928b752775458f897504f'
176
175
  }, this.total > 0 && this.mode === 'default' && h("p", {
177
- key: 'c688bd8e1f1d15904fc274454093f03213f59e38',
176
+ key: '02a5a69772a4812f10b29e8df117b72df210614d',
178
177
  class: "f-ui-03 text-lightest mb-28 w-full text-center"
179
178
  }, h("span", {
180
- key: 'c2472919bad41f76e26d518da27509e545ed9db6',
179
+ key: 'ef9804843100c722643c24e31a05f86f2d55efa0',
181
180
  class: "sr-only"
182
181
  }, "Results:"), this.pageResults()), this.mode === 'navigator' || this.lastPage && this.lastPage > 1 ? h("nav", {
183
182
  "aria-label": "Pagination"
@@ -404,9 +403,9 @@ const EdsTable = class {
404
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;
405
404
  const columnWidth = visibleColumnsCount > 0 ? Math.floor(containerWidth / visibleColumnsCount * this.divisionFactor()) : 100;
406
405
  return h("div", {
407
- key: '69fd87330d2049eeb91751c781c7aa753fa89883'
406
+ key: '66ca59804bc8054655ed0d942104516fe4cd259b'
408
407
  }, this.searchEnabled && h("div", {
409
- key: '2f9680dd17b852b140fe560f7979e1dd58236c5a'
408
+ key: 'df7267fc443da042e4b6ff81ded5800a2213bd73'
410
409
  }, h("eds-input-field", {
411
410
  key: 1,
412
411
  name: "search",
@@ -416,26 +415,26 @@ const EdsTable = class {
416
415
  // @ts-ignore
417
416
  onInput: event => this.handleSearch(event)
418
417
  })), h("div", {
419
- key: 'd67edb24308e526a3e860a90250d58cf8bfee9c8',
418
+ key: '80ac1fcb3802f9f5d5eabe016fb7345b88908b36',
420
419
  class: "mt-20"
421
420
  }, h("table", {
422
- key: '9a2ef219110e459ac670a0f9c2e62c600f6b5acd',
421
+ key: '09acf39378b1a4c8bfe40b496ec6bf71a2d761ca',
423
422
  class: "block overflow-x-auto mt-6 p-0"
424
423
  }, h("thead", {
425
- key: '81bae222447e805d06642dda19903d5bf99f2b01'
424
+ key: '8b844806cfef10d1a59da54a385ee8ed6c167050'
426
425
  }, h("tr", {
427
- key: '582d7ea661823b81ccdf3adc9769fe53cf56f04c',
426
+ key: '1b3cff91bdaf225e9f3b337e245cd80ad4772b6a',
428
427
  class: "m-0 p-0 border border-softer even:bg-inverse-softer"
429
428
  }, this.columns.map(column => {
430
429
  var _a;
431
430
  return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && h("th", {
432
431
  class: "m-0 py-8 border border-softer f-ui-02 break-words",
433
432
  style: {
434
- minWidth: `${columnWidth}px`
433
+ minWidth: `${columnWidth - 5}px`
435
434
  }
436
435
  }, column);
437
436
  }))), h("tbody", {
438
- key: 'ce7f87e665c394c5e9f2201ef2658e888ea07948'
437
+ key: '93dfd3abd196779c288f85bb6a357ad3e9c01418'
439
438
  }, paginatedRows.map(row => h("tr", {
440
439
  class: "m-0 p-0 border border-softer even:bg-inverse-softer"
441
440
  }, this.columns.map(column => {
@@ -443,14 +442,14 @@ const EdsTable = class {
443
442
  return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden) && h("td", {
444
443
  class: "text-center border border-softer m-0 py-8 f-ui-2 break-words",
445
444
  style: {
446
- minWidth: `${columnWidth}px`
445
+ minWidth: `${columnWidth - 5}px`
447
446
  }
448
447
  }, this.renderCell(row[column], column));
449
448
  })))))), this.shouldEnablePagination() && h("div", {
450
- key: '0fe6aed0d03c3aa491cd1bb17cd3bdc1e35372a0',
449
+ key: '516b65d78a9ea91060c1dfcb3306bbd3ac2c6f58',
451
450
  class: "mt-20"
452
451
  }, h("eds-pagination", {
453
- key: '5192f3f4b2ee93d5864d1afed3341a122c826d97',
452
+ key: 'abe3a593827d99437a06e204ea9d8ef92f80aba7',
454
453
  currentPage: this.currentPage,
455
454
  lastPage: lastPage,
456
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}%`
@@ -3,7 +3,7 @@ import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';
5
5
 
6
- const edsRatingCss = ":host{display:inline-block;font-size:2rem}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.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-04{font-family:var(--f-ui-04-fontFamily);font-weight:var(--f-ui-04-fontWeight);font-size:var(--f-ui-04-fontSize);line-height:var(--f-ui-04-lineHeight);letter-spacing:var(--f-ui-04-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}";
6
+ const edsRatingCss = ":host{display:inline-block;font-size:2rem}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.f-heading-02{font-family:var(--f-heading-02-fontFamily);font-weight:var(--f-heading-02-fontWeight);font-size:var(--f-heading-02-fontSize);line-height:var(--f-heading-02-lineHeight);letter-spacing:var(--f-heading-02-letterSpacing)}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.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-04{font-family:var(--f-ui-04-fontFamily);font-weight:var(--f-ui-04-fontWeight);font-size:var(--f-ui-04-fontSize);line-height:var(--f-ui-04-lineHeight);letter-spacing:var(--f-ui-04-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}";
7
7
  const EdsRatingStyle0 = edsRatingCss;
8
8
  const EdsRating = class {
9
9
  constructor(hostRef) {
@@ -16,7 +16,6 @@ const EdsRating = class {
16
16
  }
17
17
  /**
18
18
  * Parses the `textMapping` prop into an array of strings.
19
- * Returns an empty array if parsing fails.
20
19
  */
21
20
  get parsedMappings() {
22
21
  if (typeof this.textMapping === 'object') {
@@ -25,8 +24,7 @@ const EdsRating = class {
25
24
  try {
26
25
  return JSON.parse(this.textMapping);
27
26
  } catch (e) {
28
- // eslint-disable-next-line
29
- console.error('Error parsing textMapping prop:', e);
27
+ //console.error('Error parsing textMapping prop:', e);
30
28
  return [];
31
29
  }
32
30
  }
@@ -42,25 +40,37 @@ const EdsRating = class {
42
40
  }
43
41
  render() {
44
42
  return h("div", {
45
- key: 'c9147c2635f091d93f329d2b56a5fee8dce9126c',
43
+ key: 'b613863ad54ae9b381a5741bce4b188eff806ef0',
46
44
  class: "relative w-full flex flex-col"
47
45
  }, h("span", {
48
- key: '39a84bc3d9bcd4b729a35737c883eca7144d13ac',
49
- class: "f-body-01"
46
+ key: 'f35cef9c3691aab73995e2ca6e2554cc19bae837',
47
+ class: "f-heading-05"
50
48
  }, this.label), h("div", {
51
- key: '3cb84acf399cac0b23393c71df2f2b36aab4f43e',
52
- class: "stars"
49
+ key: '37082eb4bbadf5c211c197f3f81501d0b0e61404',
50
+ role: "radiogroup",
51
+ "aria-label": this.label,
52
+ class: "stars flex space-x-2"
53
53
  }, Array.from({
54
54
  length: this.stars
55
- }, (_, index) => h("span", {
56
- class: {
57
- star: true,
58
- filled: index < this.selectedRating
59
- },
60
- onClick: () => this.handleClick(index + 1)
61
- }, "\u2605"))), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
62
- key: '60605ec21b542825da0dad629fc1618d9cf63b25',
63
- class: "f-ui-04 text-lighter"
55
+ }, (_, index) => {
56
+ const starRating = index + 1;
57
+ const isSelected = starRating <= this.selectedRating;
58
+ // Use the mapping text if available; otherwise, fall back to a generic label.
59
+ const mappingText = this.parsedMappings[starRating - 1] || `Rating ${starRating}`;
60
+ return h("eds-button", {
61
+ label: "\u2605",
62
+ role: "radio",
63
+ "aria-checked": isSelected ? 'true' : 'false',
64
+ "aria-label": mappingText,
65
+ onClick: () => this.handleClick(starRating),
66
+ tabIndex: this.selectedRating === 0 && index === 0 ? 0 : isSelected ? 0 : -1,
67
+ intent: isSelected ? 'primary' : 'ghost',
68
+ size: "small",
69
+ "extra-class": "p-2" // Optional padding or styling for the star button
70
+ });
71
+ })), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && h("span", {
72
+ key: '61b4b92e476cfa0dd9bf405cb080dedd995ff9c6',
73
+ class: "f-ui-04 text-lighter mt-4"
64
74
  }, this.parsedMappings[this.selectedRating - 1]));
65
75
  }
66
76
  };
@@ -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
  }