@ebrains/react 0.8.0-alpha.0 → 0.9.0-beta

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 (83) hide show
  1. package/README.md +7 -0
  2. package/bookmark-c200037c.esm.js +16 -0
  3. package/color-primary-palette_6.entry.esm.js +163 -141
  4. package/{eds-components-section.entry.esm.js → components-section.entry.esm.js} +22 -18
  5. package/correct-use-of-colors.entry.esm.js +49 -49
  6. package/{eds-docs-palettes.entry.esm.js → docs-palettes.entry.esm.js} +3 -3
  7. package/{eds-docs-tokens.entry.esm.js → docs-tokens.entry.esm.js} +3 -3
  8. package/eds-accordion.entry.esm.js +132 -0
  9. package/eds-app-root.entry.esm.js +4 -4
  10. package/{eds-accordion_17.entry.esm.js → eds-avatar_24.entry.esm.js} +128 -49
  11. package/eds-card-desc_3.entry.esm.js +1 -1
  12. package/eds-cookies-preference.entry.esm.js +2 -2
  13. package/eds-feedback.entry.esm.js +9 -9
  14. package/eds-frame.entry.esm.js +9 -15
  15. package/eds-icon-bluesky.entry.esm.js +1 -1
  16. package/eds-icon-bookmark.entry.esm.js +21 -0
  17. package/eds-icon-close.entry.esm.js +1 -1
  18. package/eds-icon-copy.entry.esm.js +1 -1
  19. package/eds-icon-eu.entry.esm.js +1 -1
  20. package/eds-icon-external.entry.esm.js +21 -0
  21. package/eds-icon-facebook.entry.esm.js +1 -1
  22. package/eds-icon-gitlab.entry.esm.js +1 -1
  23. package/eds-icon-linkedin.entry.esm.js +1 -1
  24. package/eds-icon-loader.entry.esm.js +1 -1
  25. package/eds-icon-mastodon.entry.esm.js +1 -1
  26. package/eds-icon-menu.entry.esm.js +1 -1
  27. package/eds-icon-minus.entry.esm.js +21 -0
  28. package/eds-icon-more.entry.esm.js +1 -1
  29. package/eds-icon-paper.entry.esm.js +21 -0
  30. package/eds-icon-plus.entry.esm.js +21 -0
  31. package/eds-icon-portal.entry.esm.js +21 -0
  32. package/eds-icon-private.entry.esm.js +21 -0
  33. package/eds-icon-public.entry.esm.js +21 -0
  34. package/eds-icon-search.entry.esm.js +1 -1
  35. package/eds-icon-star.entry.esm.js +1 -1
  36. package/eds-icon-success.entry.esm.js +1 -1
  37. package/eds-icon-thumbs-down.entry.esm.js +1 -1
  38. package/eds-icon-thumbs-up.entry.esm.js +1 -1
  39. package/eds-icon-tutorial.entry.esm.js +21 -0
  40. package/eds-icon-twitter.entry.esm.js +1 -1
  41. package/eds-icon-unknown.entry.esm.js +21 -0
  42. package/eds-icon-updown.entry.esm.js +21 -0
  43. package/eds-icon-user.entry.esm.js +1 -1
  44. package/eds-icon-youtube.entry.esm.js +1 -1
  45. package/eds-login_2.entry.esm.js +27 -15
  46. package/eds-matomo-notice.entry.esm.js +162 -0
  47. package/eds-modal.entry.esm.js +13 -13
  48. package/eds-pagination_2.entry.esm.js +12 -12
  49. package/eds-progress-bar.entry.esm.js +2 -2
  50. package/eds-rating.entry.esm.js +1 -1
  51. package/eds-section-core_2.entry.esm.js +5 -5
  52. package/eds-spinner.entry.esm.js +3 -3
  53. package/eds-switch.entry.esm.js +5 -5
  54. package/eds-tabs.entry.esm.js +4 -4
  55. package/eds-timeline.entry.esm.js +5 -5
  56. package/eds-toast-manager.entry.esm.js +1 -1
  57. package/eds-tooltip.entry.esm.js +3 -3
  58. package/eds-trl.entry.esm.js +2 -2
  59. package/incorrect-use-of-colors.entry.esm.js +9 -9
  60. package/index.esm.js +1 -1
  61. package/index.esm2.js +58 -30
  62. package/logo-space.entry.esm.js +28 -12
  63. package/logo-variations-horizontal_2.entry.esm.js +73 -66
  64. package/{eds-logo-variations.entry.esm.js → logo-variations-tabs.entry.esm.js} +3 -3
  65. package/logo-wrong-usage.entry.esm.js +71 -107
  66. package/minus-b30a7c71.esm.js +11 -0
  67. package/package.json +1 -1
  68. package/paper-8e74ea31.esm.js +15 -0
  69. package/plus-89c07be2.esm.js +12 -0
  70. package/portal-d6c8ce56.esm.js +18 -0
  71. package/private-1c25ff8e.esm.js +25 -0
  72. package/public-d4d8c585.esm.js +16 -0
  73. package/src/components.d.ts +0 -2
  74. package/{eds-svg-repository.entry.esm.js → svg-repository.entry.esm.js} +29 -28
  75. package/token-list_3.entry.esm.js +9 -9
  76. package/token-ratios.entry.esm.js +3 -3
  77. package/token-typography.entry.esm.js +10 -7
  78. package/tutotial-150ee1fd.esm.js +27 -0
  79. package/unknown-ed01a24c.esm.js +22 -0
  80. package/up-and-down-d747abee.esm.js +12 -0
  81. package/eds-form.entry.esm.js +0 -473
  82. package/eds-input_7.entry.esm.js +0 -569
  83. package/token-spacing.entry.esm.js +0 -93
@@ -3,7 +3,7 @@ import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';
5
5
 
6
- const EdsComponentsOverview = () => h("div", {
6
+ const DocsOverview = () => h("div", {
7
7
  class: "static-content container"
8
8
  }, h("h2", null, "Load the module"), h("p", null, "Integrating the EBRAINS UI Components to a project without a JavaScript framework is straight forward. If you\u2019re working on a simple HTML page, you can start using the components immediately by adding the tags below to the", ' ', h("code", null, "head"), "."), h("eds-code-block", {
9
9
  code: "<script type='module'>\n import { defineCustomElements } from 'https://unpkg.com/@ebrains/components@latest/loader/index.js'; \n // Define custom elements\n defineCustomElements(window);\n</script>",
@@ -31,12 +31,16 @@ const EdsComponentsOverview = () => h("div", {
31
31
  code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@latest/styles/output.css"/>',
32
32
  language: "css",
33
33
  "copy-label": "Copy Code"
34
+ }), h("p", null, "To directly use only the produced variables add the tag below to the ", h("code", null, "head")), h("eds-code-block", {
35
+ code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@latest/styles/vars.css"/>',
36
+ language: "css",
37
+ "copy-label": "Copy Code"
34
38
  }), h("p", null, "Note that, loading the predefined CSS framework above,", ' ', h("b", null, "automatically loads the fonts so you can skip loading them separately"), ". If you wish, however, to load the fonts, add the tag below to the ", h("code", null, "head")), h("eds-code-block", {
35
- code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/base/fonts.css"/>',
39
+ code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@latest/styles/base/fonts.css"/>',
36
40
  language: "css",
37
41
  "copy-label": "Copy Code"
38
42
  }));
39
- const EdsDocsInstallation = () => h("div", null, h("p", null, "Before proceeding, ensure that Node.js is installed on your machine\u2014you can download the latest version from the official website. If your project doesn\u2019t already use npm and you plan to integrate EBRAINS Components, you'll need to create a package.json file by running npm init and following the on-screen instructions."), h("div", {
43
+ const DocsInstallation = () => h("div", null, h("p", null, "Before proceeding, ensure that Node.js is installed on your machine\u2014you can download the latest version from the official website. If your project doesn\u2019t already use npm and you plan to integrate EBRAINS Components, you'll need to create a package.json file by running npm init and following the on-screen instructions."), h("div", {
40
44
  class: "my-8"
41
45
  }, h("eds-code-block", {
42
46
  code: "npm install @ebrains/components",
@@ -67,19 +71,19 @@ const EdsDocsInstallation = () => h("div", null, h("p", null, "Before proceeding
67
71
  language: "html",
68
72
  "copy-label": "Copy Code"
69
73
  })));
70
- const EdsDocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p", null, "To use the EBRAINS web components in a React Application, simple install the package below and check out the examples"), h("eds-code-block", {
74
+ const DocsReact = () => h("div", null, h("h2", null, "React Wrappers"), h("p", null, "To use the EBRAINS web components in a React Application, simple install the package below and check out the examples"), h("eds-code-block", {
71
75
  code: "npm install @ebrains/react",
72
76
  language: "javascript",
73
77
  "copy-label": "Copy Code"
74
78
  }), h("eds-section-core", {
75
79
  "section-title": "Example React App",
76
80
  "heading-level": "h3"
77
- }, h("eds-code-block", {
78
- code: '\nimport {\n EdsHeader,\n EdsFullscreenMenu,\n EdsUser\n} from "@ebrains/react";\n\ninterface User {\n firstname: string;\n lastname: string;\n // Add any other properties your user object might have\n}\n\ninterface AuthStatus {\n authenticated: boolean;\n user: User | null;\n}\n\nimport { useEffect, useState } from "react";\n\nexport function App() {\n const [authStatus, setAuthStatus] = useState<AuthStatus>({\n authenticated: false,\n user: null,\n });\n const [activeTabIndex, setActiveTabIndex] = useState<number>(0);\n\n // Use useEffect to render Stencil components dynamically after the component mounts\n useEffect(() => {\n const handleAuthStatusChange = (event: CustomEvent) => {\n console.log(event.detail);\n setAuthStatus(event.detail); // Set the entire object\n };\n\n document.addEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n\n return () => {\n document.removeEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n };\n }, []);\n\n return (\n <div>\n <EdsHeader\n homeUrl="/"\n menuEnabled={true}\n inverseHeader={false}\n links={[\n { label: "About", url: "#" },\n { label: "Focus Areas", url: "#" },\n { label: "News & Events", url: "#" },\n { label: "Contact", url: "#" }\n ]}\n >\n <div className="px-16">\n <EdsUser\n keycloak-url="http://localhost:8080"\n keycloak-realm="nigeor-realm"\n keycloak-client-id="stencil-app"\n ></EdsUser>\n </div>\n </EdsHeader>\n\n <EdsFullscreenMenu\n home-url="/"\n links={[\n { label: "About", url: "#" },\n { label: "Focus Areas", url: "#" },\n { label: "News & Events", url: "#" },\n { label: "Contact", url: "#" }\n ]}\n ></EdsFullscreenMenu>\n \n <div>\n User is{" "}\n {authStatus.authenticated ? "authenticated" : "not authenticated"}\n </div>\n {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}\n\n <div id="main"></div>\n </div>\n );\n}\n\nexport default App;\n\n',
81
+ }, h("p", null, "This code displays a Stencil-based splash screen that stays visible until an initialization promise resolves (or errors), then hides itself and reveals the main React app content."), h("eds-code-block", {
82
+ code: "\nimport React, { useMemo, useState } from 'react';\nimport {\n EdsHeader\n EdsSplashScreen,\n EdsMatomoNotice,\n EdsSteps\n} from '@ebrains/react';\nimport './app.css';\n\n// simulate 2s\nfunction fakeInit(): Promise<void> {\n return new Promise(resolve => setTimeout(resolve, 2000));\n}\n\nexport function App() {\n // 1) create init promise\n const initPromise = useMemo(() => fakeInit(), []);\n\n // 2) is splash still visible\n const [splashVisible, setSplashVisible] = useState(true);\n const [initError, setInitError] = useState<string | null>(null);\n\n // 3) show the UI after the splash has hidden\n const showApp = !splashVisible && !initError;\n\n return (\n <div>\n {splashVisible && (\n <EdsSplashScreen\n inverse={false}\n initPromise={initPromise}\n onSplash={(e: CustomEvent) => {\n if (e.detail.type === 'hidden') {\n setSplashVisible(false);\n } else if (e.detail.type === 'error') {\n setInitError(e.detail.message);\n setSplashVisible(false);\n }\n }}\n />\n )}\n\n {initError && (\n <div className='error'>\n Failed to initialize: {initError}\n </div>\n )}\n\n {/* Show App only when ready */}\n {showApp && (\n <>\n <EdsHeader></EdsHeader>\n <EdsSteps\n steps={[\n {\n title: 'Introduction',\n content: 'Begin by familiarizing yourself with the overall process.'\n },\n {\n title: 'Process Overview',\n content: 'Review the detailed steps and understand the workflow.'\n }\n ]}\n type='linear'\n />\n\n <EdsMatomoNotice />\n\n <div id='root'></div>\n </>\n )}\n </div>\n );\n}\nexport default App;\n",
79
83
  language: "javascript",
80
84
  "copy-label": "Copy Code"
81
85
  })));
82
- const EdsDocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", null, "To use the EBRAINS web components in a Vue Application, simple install the package below and check out the examples."), h("eds-code-block", {
86
+ const DocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", null, "To use the EBRAINS web components in a Vue Application, simple install the package below and check out the examples."), h("eds-code-block", {
83
87
  code: "npm install @ebrains/vue",
84
88
  language: "javascript",
85
89
  "copy-label": "Copy Code"
@@ -96,7 +100,7 @@ const EdsDocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", nu
96
100
  class: "my-8"
97
101
  }, h("eds-alert", {
98
102
  message: "Use the .prop modifier to ensure properties are passed correctly.",
99
- intent: "success"
103
+ intent: "default"
100
104
  })), h("eds-code-block", {
101
105
  code: '<EdsAlert\n message="This is a default informational alert."\n intent="default"\n :pressableLabel.prop="Press Me"\n :pressableUrl.prop="https://ebrains.eu"\n></EdsAlert>',
102
106
  language: "javascript",
@@ -105,11 +109,11 @@ const EdsDocsVue = () => h("div", null, h("h2", null, "Vue Wrappers"), h("p", nu
105
109
  "section-title": "Example Vue App",
106
110
  "heading-level": "h3"
107
111
  }, h("eds-code-block", {
108
- code: '\n<template>\n <EdsHeader \n :inverseHeader.prop="true"\n :menuEnabled.prop="true">\n </EdsHeader>\n</template>\n\n<script>\n\nimport { EdsHeader } from "@ebrains/vue";\n\nexport default {\n name: "App",\n components: {\n EdsHeader,\n }\n};\n</script>\n',
112
+ code: '\n<template>\n <div>\n <EdsHeader></EdsHeader>\n <!-- render the splash until we manually hide it -->\n <EdsSplashScreen inverse="false" />\n\n <!-- then show main UI -->\n <div v-if="!splashVisible" class="container my-16">\n <EdsSteps \n :steps="JSON.stringify(stepsdata)"\n type="linear"\n />\n </div>\n </div>\n</template>\n\n<script>\nimport { EdsSplashScreen, EdsSteps, EdsHeader } from "@ebrains/vue";\n\nexport default {\n name: "App",\n components: { EdsHeader, EdsSplashScreen, EdsSteps },\n data() {\n return {\n stepsdata: [\n { title: "Introduction", content: "Begin by familiarizing yourself with the overall process." },\n { title: "Process Overview", content: "Review the detailed steps and understand the workflow." }\n ],\n splashVisible: true\n };\n },\n methods: {\n delay(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n },\n async initialize() {\n try {\n // simulate your init work\n await this.delay(2000);\n\n // fire the built-in event that EdsSplashScreen listens for\n window.dispatchEvent(new Event("hideSplash"));\n } catch (e) {\n console.error("Init error", e);\n window.dispatchEvent(new Event("hideSplash"));\n } finally {\n // show the rest of the app\n this.splashVisible = false;\n }\n }\n },\n mounted() {\n this.initialize();\n }\n};\n</script>\n',
109
113
  language: "javascript",
110
114
  "copy-label": "Copy Code"
111
115
  })));
112
- const EdsDocsAngular = () => h("div", null, h("h2", null, "Angular Wrappers"), h("p", null, "To use the EBRAINS web components in an Angular Application, simple install the package below and check out the examples."), h("eds-code-block", {
116
+ const DocsAngular = () => h("div", null, h("h2", null, "Angular Wrappers"), h("p", null, "To use the EBRAINS web components in an Angular Application, simple install the package below and check out the examples."), h("eds-code-block", {
113
117
  code: "npm install @ebrains/angular",
114
118
  language: "javascript",
115
119
  "copy-label": "Copy Code"
@@ -129,7 +133,7 @@ const EdsDocsAngular = () => h("div", null, h("h2", null, "Angular Wrappers"), h
129
133
  language: "javascript",
130
134
  "copy-label": "Copy Code"
131
135
  })));
132
- const EdsComponentsSection = class {
136
+ const ComponentsSection = class {
133
137
  constructor(hostRef) {
134
138
  registerInstance(this, hostRef);
135
139
  this.tabIndex = undefined;
@@ -137,25 +141,25 @@ const EdsComponentsSection = class {
137
141
  renderContent() {
138
142
  switch (this.tabIndex) {
139
143
  case 0:
140
- return h(EdsComponentsOverview, null);
144
+ return h(DocsOverview, null);
141
145
  case 1:
142
- return h(EdsDocsInstallation, null);
146
+ return h(DocsInstallation, null);
143
147
  case 2:
144
- return h(EdsDocsReact, null);
148
+ return h(DocsReact, null);
145
149
  case 3:
146
- return h(EdsDocsVue, null);
150
+ return h(DocsVue, null);
147
151
  case 4:
148
- return h(EdsDocsAngular, null);
152
+ return h(DocsAngular, null);
149
153
  default:
150
154
  return h("p", null, "Content not available.");
151
155
  }
152
156
  }
153
157
  render() {
154
158
  return h("div", {
155
- key: '85fff494e98ff10bbcc630487a75d345e7cce78c',
159
+ key: 'ee8facfaad3786770fd3ea39f1db7922a67ffd3e',
156
160
  class: "container"
157
161
  }, this.renderContent());
158
162
  }
159
163
  };
160
164
 
161
- export { EdsComponentsSection as eds_components_section };
165
+ export { ComponentsSection as components_section };
@@ -42,36 +42,36 @@ const CorrectUseOfColors = class {
42
42
  }
43
43
  render() {
44
44
  return h("div", {
45
- key: '74aa6fcf077ee0f8ffb30e48b388699565d027ae',
45
+ key: '966cb542b868e89c3f2538548e8a1ca8e20ea8d8',
46
46
  class: "container"
47
47
  }, h("p", {
48
- key: '2d1ce73998a1fe581f2e0084b0d14b12896b9ea9',
48
+ key: '3c595ffa9a2de45b681924354486309004d4ceaf',
49
49
  class: "f-body-01"
50
50
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
51
- key: 'fa880fe19f73596c751d30a4037906013753de5e',
51
+ key: '1d1fded0f8cf78cec9e364e5b6844598b55f3f86',
52
52
  label: "primary",
53
53
  size: "small",
54
- intent: "blueish",
54
+ intent: "underline",
55
55
  icon: "chevron-right",
56
56
  url: "../color-palette/#primary-palette",
57
57
  "extra-class": "inline-block ml-4"
58
58
  }), "and", h("eds-link", {
59
- key: 'd3da6d095d1a9ce23f9714aab1e25db32072411b',
59
+ key: 'abae691bb80eca1019f97375997b1aa6a577ba8b',
60
60
  label: "support",
61
61
  size: "small",
62
- intent: "blueish",
62
+ intent: "underline",
63
63
  icon: "chevron-right",
64
64
  url: "../color-palette/#support-palette",
65
65
  "extra-class": "inline-block ml-4"
66
66
  }), "color palettes."), h("div", {
67
- key: '24fef1a5b6ad25898498de5711ec9059781c044a',
67
+ key: '251e6d8ad16d70974b67fa044d53abd1be79ccac',
68
68
  class: "flex"
69
69
  }, h("div", {
70
- key: '4f0018cf0978c67133b79fd0c8d67016306e482f',
70
+ key: 'de5b9b6720aababb693421663c52db85cee1b5fc',
71
71
  class: "w-full"
72
72
  }, h("ul", {
73
- key: '0637d9cd614ccc157c3dd96d8d5264b2290bd7bb',
74
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
73
+ key: 'a61f669f45c2f9d3b53d87bacc222a4274f93d34',
74
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
75
75
  }, primary.map(color => h("li", {
76
76
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
77
77
  }, h("div", {
@@ -80,11 +80,11 @@ const CorrectUseOfColors = class {
80
80
  backgroundColor: color.background
81
81
  }
82
82
  }))))), h("div", {
83
- key: '61f91bf37ad73c39cccff56dd0710e06fb774ae1',
83
+ key: 'e7787d0ae843d7767ecac3267f11325dcfecf948',
84
84
  class: "w-full"
85
85
  }, h("ul", {
86
- key: 'd10642b60e7524d2d1b2e9b26d91f311391b35f3',
87
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
86
+ key: '0d740ad8178c88175939d32a4f84d518f587e43a',
87
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
88
88
  }, support.map(color => h("li", {
89
89
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
90
90
  }, h("div", {
@@ -93,33 +93,33 @@ const CorrectUseOfColors = class {
93
93
  backgroundColor: color.background
94
94
  }
95
95
  })))))), h("p", {
96
- key: 'aa4d24b67c115d8c7367bc896e68f5a48f6b852f',
96
+ key: '6c59b2c574f5039baafd91a2939fbbb307732500',
97
97
  class: "f-body-01"
98
98
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
99
- key: '22d1cd8401ae4fd7243c093ee9e15c6d894f9cd0',
99
+ key: '03e9ca7b0831c2b1d1908001324a38147ecea835',
100
100
  label: "purple",
101
101
  size: "small",
102
- intent: "blueish",
102
+ intent: "underline",
103
103
  icon: "chevron-right",
104
104
  url: "../color-palette/#primary-palette",
105
105
  "extra-class": "inline-block ml-4"
106
106
  }), "and", h("eds-link", {
107
- key: 'fac4687f27d767e08db6e692dc4cf1352d12805a',
107
+ key: '021affd3b5db00ccb5ef0d51de4552c5d3a11f44',
108
108
  label: "support",
109
109
  size: "small",
110
- intent: "blueish",
110
+ intent: "underline",
111
111
  icon: "chevron-right",
112
112
  url: "../color-palette/#support-palette",
113
113
  "extra-class": "inline-block ml-4"
114
114
  }), "color palettes."), h("div", {
115
- key: '11afa11ed2070d0438d77cd614216d0f42f43ca4',
115
+ key: 'b7a5c4c10adab099c57ed70c0d2186d791aa70ec',
116
116
  class: "flex"
117
117
  }, h("div", {
118
- key: '69f516f64adb3d9cfbc4e2fc1ed44fedbee3bd68',
118
+ key: '3732c49a47158c206e1b40fc5425e555487ec757',
119
119
  class: "w-full"
120
120
  }, h("ul", {
121
- key: '6743e0c69ac85afc4eb1795c15d70769c5fd4046',
122
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
121
+ key: '54a5d35510bd77397d1418aa2638cf310534e986',
122
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
123
123
  }, purple.map(color => h("li", {
124
124
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
125
125
  }, h("div", {
@@ -128,11 +128,11 @@ const CorrectUseOfColors = class {
128
128
  backgroundColor: color.background
129
129
  }
130
130
  }))))), h("div", {
131
- key: '78ed314dc9917de85d1b9880a154d6be1d4fde5e',
131
+ key: '048de44bd69a7b6ecefe3188d76821e4d5145620',
132
132
  class: "w-full"
133
133
  }, h("ul", {
134
- key: 'f2217d033e75604de0c383991f5cea7af341a4ca',
135
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
134
+ key: 'e3f8cadce4b9a575e1d844958cfccf20a19db681',
135
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
136
136
  }, support.map(color => h("li", {
137
137
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
138
138
  }, h("div", {
@@ -141,33 +141,33 @@ const CorrectUseOfColors = class {
141
141
  backgroundColor: color.background
142
142
  }
143
143
  })))))), h("p", {
144
- key: '77be27368cd3b6a0ddfe8f7248ef32171dca8912',
144
+ key: '14d7f9c88ae769d6feb2a8344f8b45b40d4ae095',
145
145
  class: "f-body-01"
146
146
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
147
- key: '0edd3991edfde34544537fd752ca5d6c02c1d942',
147
+ key: '810bdfa6fd175f9d483129b70bbae469051e0e0d',
148
148
  label: "blue",
149
149
  size: "small",
150
- intent: "blueish",
150
+ intent: "underline",
151
151
  icon: "chevron-right",
152
152
  url: "../color-palette/#primary-palette",
153
153
  "extra-class": "inline-block ml-4"
154
154
  }), "and", h("eds-link", {
155
- key: '434bacd1ad5f74cae7c004c137a05c9b7ac474ca',
155
+ key: 'fb8a9712f8e1ae1cffbb85c79f7e9c2657f867db',
156
156
  label: "support",
157
157
  size: "small",
158
- intent: "blueish",
158
+ intent: "underline",
159
159
  icon: "chevron-right",
160
160
  url: "../color-palette/#support-palette",
161
161
  "extra-class": "inline-block ml-4"
162
162
  }), "color palettes."), h("div", {
163
- key: '7af03503a498c61ee91471740e05b9e90f87de7a',
163
+ key: '1df0919bb4c75ee251d7f5c8cf95bb2e2e990242',
164
164
  class: "flex"
165
165
  }, h("div", {
166
- key: '1658c8d5436e600583bfb8f220b63e117201d4f1',
166
+ key: '5a898462aa680267f4ac35aefb98e60b7f486c63',
167
167
  class: "w-full"
168
168
  }, h("ul", {
169
- key: 'ec29934dae18e254728d1cdbd97198185454c614',
170
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
169
+ key: 'ad6f3e6ccde7d225be344efbc176064fc89aa796',
170
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
171
171
  }, blue.map(color => h("li", {
172
172
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
173
173
  }, h("div", {
@@ -176,11 +176,11 @@ const CorrectUseOfColors = class {
176
176
  backgroundColor: color.background
177
177
  }
178
178
  }))))), h("div", {
179
- key: '08153447043dc5a4908f33d98688904bb974c7ef',
179
+ key: '8dd6e01b989c8589be6b553c85f0512c268ac369',
180
180
  class: "w-full"
181
181
  }, h("ul", {
182
- key: 'd372026a4b720eff2ed363477e11e43f4635118d',
183
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
182
+ key: 'c36937d99efd585c4e8a37b80de5bce82374186c',
183
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
184
184
  }, support.map(color => h("li", {
185
185
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
186
186
  }, h("div", {
@@ -189,33 +189,33 @@ const CorrectUseOfColors = class {
189
189
  backgroundColor: color.background
190
190
  }
191
191
  })))))), h("p", {
192
- key: 'b50099b9e7c9963a66a61ab86ce045f4706c2280',
192
+ key: '452c68d1c797de34e531d7c734d350fcc36ae2f2',
193
193
  class: "f-body-01"
194
194
  }, "This guide demonstrates the correct usage of the", h("eds-link", {
195
- key: '10cda6a7ea2a40523a47810bc6aec68db42716b8',
195
+ key: '17453c9d78c20583c989281672c0f41bbe8d036f',
196
196
  label: "redish",
197
197
  size: "small",
198
- intent: "blueish",
198
+ intent: "underline",
199
199
  icon: "chevron-right",
200
200
  url: "../color-palette/#primary-palette",
201
201
  "extra-class": "inline-block ml-4"
202
202
  }), "and", h("eds-link", {
203
- key: '85fa2465d7fef1e7965fab4100476f8856ca3d73',
203
+ key: '3e78eb924b6a857674d50d4a209e4843f76e5fc3',
204
204
  label: "support",
205
205
  size: "small",
206
- intent: "blueish",
206
+ intent: "underline",
207
207
  icon: "chevron-right",
208
208
  url: "../color-palette/#support-palette",
209
209
  "extra-class": "inline-block ml-4"
210
210
  }), "color palettes."), h("div", {
211
- key: '5733514d73d824ed93bf362cf005b3ed8270d636',
211
+ key: 'ae3e2a703633013f632df3a75f45ec932ce5e13b',
212
212
  class: "flex"
213
213
  }, h("div", {
214
- key: '9b74dbf6a74581b8f129e111bda369e1427bb3fd',
214
+ key: '4a0f256fa355dcbd6d6fc0e95e81a6c2821c917d',
215
215
  class: "w-full"
216
216
  }, h("ul", {
217
- key: '312e5d6dcc21c3e691f083c3679ede29ed8914e2',
218
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
217
+ key: '8aaf611ed9b87b86d0c1b47b1e37cb01989838b2',
218
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
219
219
  }, red.map(color => h("li", {
220
220
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
221
221
  }, h("div", {
@@ -224,11 +224,11 @@ const CorrectUseOfColors = class {
224
224
  backgroundColor: color.background
225
225
  }
226
226
  }))))), h("div", {
227
- key: 'd2cc590214e56342b8675f63c532c3d00923b555',
227
+ key: '112e50da1627a671fbca843111becf51cd02ebc5',
228
228
  class: "w-full"
229
229
  }, h("ul", {
230
- key: '287cfda4148067a0e9051b5e026341f755b34722',
231
- class: "gap-y-8 md:gap-y-12 lg:gap-y-16"
230
+ key: '14033bd08a9d16bd0b6cfe8b87acc2a841c48a29',
231
+ class: "not-prose gap-y-8 md:gap-y-12 lg:gap-y-16"
232
232
  }, support.map(color => h("li", {
233
233
  class: "grid-col-span-12 md:grid-col-span-6 flex flex-col"
234
234
  }, h("div", {
@@ -3,7 +3,7 @@ import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';
5
5
 
6
- const EdsDocsPalettes = class {
6
+ const DocsPalettes = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.tabIndex = undefined;
@@ -20,10 +20,10 @@ const EdsDocsPalettes = class {
20
20
  }
21
21
  render() {
22
22
  return h("div", {
23
- key: '480cc269ee31de61190b4ae7502c3c17e673c3f9',
23
+ key: 'f985628b9ea3f02a511e2facbda99b54f0723acf',
24
24
  class: "container"
25
25
  }, this.renderContent());
26
26
  }
27
27
  };
28
28
 
29
- export { EdsDocsPalettes as eds_docs_palettes };
29
+ export { DocsPalettes as docs_palettes };
@@ -3,7 +3,7 @@ import 'react';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react-dom';
5
5
 
6
- const EdsDocsContent = class {
6
+ const DocsContent = class {
7
7
  constructor(hostRef) {
8
8
  registerInstance(this, hostRef);
9
9
  this.tabIndex = undefined;
@@ -36,10 +36,10 @@ const EdsDocsContent = class {
36
36
  }
37
37
  render() {
38
38
  return h("div", {
39
- key: '64ee8c20ec7dca1ea1a742ef53f0315c81107ead',
39
+ key: '29810a0ace60d2e5a0fc84d6715fc2fc89d6187f',
40
40
  class: "container"
41
41
  }, this.renderContent());
42
42
  }
43
43
  };
44
44
 
45
- export { EdsDocsContent as eds_docs_tokens };
45
+ export { DocsContent as docs_tokens };
@@ -0,0 +1,132 @@
1
+ import { r as registerInstance, c as createEvent, 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 edsAccordionCss = "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}.min-h-56{min-height:3.5rem}.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}.break-words{overflow-wrap:break-word}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.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)}.border-softer{border:2px solid rgba(0, 0, 0, .1)}.bg-default{background-color:var(--grey-200)}.bg-inverse{background-color:var(--white)}.relative{position:relative}.absolute{position:absolute}.inset-x-16{left:1rem;right:1rem}.top-16{top:1rem}.pr-32{padding-right:2rem}.pr-36{padding-right:2.25rem}.pr-40{padding-right:2.5rem}.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}.w-full{width:100%}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-md{border-radius:12px}.outline-none{outline:2px solid transparent;outline-offset:2px}.focus\\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.text-light{color:var(--grey-700)}.z-1{z-index:1}.z-10{z-index:10}.effect-height{transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-property:height}.h-0{height:0rem}.h-auto{height:auto}.pt-4{padding-top:0.25rem}.overflow-hidden{overflow:hidden}.grid{display:grid}.overflow-hidden{overflow:hidden}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-16{padding:1rem}.ml-auto{margin-left:auto}.mr-auto{margin-right:auto}.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)}.text-left{text-align:left}.text-center{text-align:center}";
8
+ const EdsAccordionStyle0 = edsAccordionCss;
9
+ const EdsAccordion = class {
10
+ constructor(hostRef) {
11
+ registerInstance(this, hostRef);
12
+ this.accordion = createEvent(this, "accordion", 7);
13
+ /**
14
+ * Handles the click event on the accordion header to toggle expansion.
15
+ * Toggles the `isExpanded` state and emits the `accordion` event.
16
+ */
17
+ this.handleClick = () => {
18
+ var _a;
19
+ this.isExpanded = !this.isExpanded;
20
+ this.accordion.emit(this.isExpanded);
21
+ this.setPanelHeight();
22
+ sendAnalytics({
23
+ category: 'ui-component',
24
+ parentContext: null,
25
+ tag: this.el.tagName.toLowerCase(),
26
+ name: ((_a = this.title) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
27
+ action: this.isExpanded ? 'expanded' : 'collapsed'
28
+ });
29
+ };
30
+ /**
31
+ * Calculates and sets the panel height based on the content height
32
+ * and adjusts based on the `shortContent` and `isExpanded` states.
33
+ */
34
+ this.setPanelHeight = () => {
35
+ if (this.childContentRef) {
36
+ this.shortContent = this.wrapperRef.scrollWidth > 830 && !this.description ? this.childContentRef.scrollHeight <= 80 : this.childContentRef.scrollHeight <= 20;
37
+ this.panelHeight = this.isExpanded && !this.shortContent ? this.childContentRef.scrollHeight : 0;
38
+ }
39
+ if (this.headerRef) {
40
+ this.headerHeight = this.headerRef.scrollHeight - 30;
41
+ }
42
+ };
43
+ this.title = undefined;
44
+ this.description = undefined;
45
+ this.switchBg = true;
46
+ this.expanded = false;
47
+ this.clampText = true;
48
+ this.isExpanded = this.expanded;
49
+ this.panelHeight = 0;
50
+ this.shortContent = false;
51
+ this.headerHeight = 0;
52
+ }
53
+ /**
54
+ * Lifecycle method that sets up the initial panel height and adds a resize event listener
55
+ * to recalculate height on window resize.
56
+ */
57
+ componentDidLoad() {
58
+ this.setPanelHeight();
59
+ window.addEventListener('resize', this.setPanelHeight);
60
+ }
61
+ /**
62
+ * Lifecycle method that cleans up the resize event listener when the component is removed.
63
+ */
64
+ disconnectedCallback() {
65
+ window.removeEventListener('resize', this.setPanelHeight);
66
+ }
67
+ /**
68
+ * Renders the accordion structure, including header, content, description, and any slotted content.
69
+ * Adjusts styles based on `switchBg`, `tiny`, `clampText`, and other props.
70
+ */
71
+ render() {
72
+ return h("div", {
73
+ key: 'db04fa9db1f53e95a7ac758656b32e75281f5749',
74
+ ref: el => this.wrapperRef = el,
75
+ class: `flex effect-color border-softer relative grid overflow-hidden rounded-lg border-2 p-16
76
+ ${this.switchBg && this.isExpanded ? 'bg-inverse' : 'bg-default'}
77
+ ${this.switchBg ? 'hover:bg-inverse' : ''}
78
+ ${this.description ? 'min-h-56' : ''}`
79
+ }, h("h3", {
80
+ key: 'a6fc54388e0eab3ddfb81dfb5907c55a1d6d40e1',
81
+ ref: el => this.headerRef = el,
82
+ class: "mr-auto f-heading-06 text-left absolute inset-x-16 break-words top-16 pr-40"
83
+ }, this.title), h("div", {
84
+ key: '96a1e4ae2849300e6cd3c737357a7e6e9a0439d5',
85
+ class: "ml-auto"
86
+ }, h("eds-button", {
87
+ key: 'ca53eed446f9bc7a96182da9e9e3a45b1c63dba2',
88
+ id: "toggleAccordion",
89
+ intent: "tertiary",
90
+ "aria-expanded": this.isExpanded || this.shortContent,
91
+ "aria-label": "Toggle accordion",
92
+ "aria-controls": "accordionSection",
93
+ class: `effect-color flex w-full items-center justify-between rounded-md outline-none focus:outline-none`,
94
+ onClick: this.handleClick,
95
+ icon: "chevron-down"
96
+ })), h("div", {
97
+ key: '2e1c52759fa07ecf63fed47f79c0384a79cd81c6',
98
+ class: `w-full`,
99
+ style: Number.isFinite(this.headerHeight) ? {
100
+ marginTop: `${this.headerHeight}px`
101
+ } : {}
102
+ }, this.description ? h("span", {
103
+ class: `text-light ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}`
104
+ }, this.description) : null, h("section", {
105
+ key: '6ca819b2d9cb989f0942b98f32cd7243771b6ae9',
106
+ id: "accordionSection",
107
+ role: "region",
108
+ "aria-labelledby": "accordionHeader",
109
+ "aria-hidden": !this.isExpanded,
110
+ class: `z-1 effect-height relative h-0 w-full ${!this.isExpanded && this.clampText ? 'overflow-hidden' : ''}`,
111
+ style: {
112
+ height: this.isExpanded ? 'auto' : '0'
113
+ }
114
+ }, h("div", {
115
+ key: 'aa33297747aca21c3b3ed33eb3eabc2998192aeb',
116
+ ref: el => this.childContentRef = el,
117
+ class: `accordion-content effect-color pt-4`,
118
+ "aria-hidden": !this.isExpanded
119
+ }, h("span", {
120
+ key: 'af5b6e2218419a3c95e21e7e432696b073b7752b',
121
+ class: `${!this.isExpanded && this.clampText ? 'line-clamp-2' : ''}`
122
+ }, h("slot", {
123
+ key: '2a9d1ef2d2537c831b28fbecb02a6125a1412019'
124
+ }))))));
125
+ }
126
+ get el() {
127
+ return getElement(this);
128
+ }
129
+ };
130
+ EdsAccordion.style = EdsAccordionStyle0;
131
+
132
+ export { EdsAccordion as eds_accordion };
@@ -34,18 +34,18 @@ const EdsAppRoot = class {
34
34
  }
35
35
  render() {
36
36
  return h("div", {
37
- key: 'ae36da9eecddc6661ce0ae79df2c768a4a9a4de9'
37
+ key: '7b0b74c02f9fa25dc3d3e5a0fd10d8b4c3a59ffe'
38
38
  }, h("eds-splash-screen", {
39
- key: '20e1ed89330f803be474c84f4d1892cc1282c034',
39
+ key: 'e1fabb47903b011c397af3a8da59130e8455280f',
40
40
  inverse: true,
41
41
  initPromise: this.combinedInitPromise
42
42
  }), h("eds-login", {
43
- key: '81c05a3d3751563ddf5dff9d305ef9ff93a6e699',
43
+ key: '30d8ca5116c5b8a18972df9c55bd4a947226d682',
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: '8686c5b0c3553f167593763677fa4282561bc055'
48
+ key: '16ead78b24f561049fb12609b23bff028262d9d5'
49
49
  }, this.isAuthenticated ? h("h1", null, "Welcome, authenticated user!") : h("h1", null, "Please log in.")));
50
50
  }
51
51
  };