@ebrains/vue 0.0.1-alpha.1 → 0.2.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 (190) hide show
  1. package/arrow-diagonal-black-8f0494c3-CYl9yYTl.mjs +4 -0
  2. package/arrow-diagonal-black-8f0494c3-DqsB6ni-.js +1 -0
  3. package/arrow-right-9322ba8a-DBcxNU_p.js +3 -0
  4. package/arrow-right-9322ba8a-DHq-_PPe.mjs +6 -0
  5. package/bluesky-cc5edd2d-DaFQc-pr.js +12 -0
  6. package/bluesky-cc5edd2d-DfuDDO5h.mjs +15 -0
  7. package/chevron-down-6144c823-DWGlv9eV.mjs +13 -0
  8. package/chevron-down-6144c823-D_8976Ke.js +10 -0
  9. package/chevron-left-ca6c66e1-DANhLw_T.mjs +12 -0
  10. package/chevron-left-ca6c66e1-uCH5SUhm.js +9 -0
  11. package/chevron-right-b88ed2d4-C7dkTMvP.js +3 -0
  12. package/chevron-right-b88ed2d4-CgEZBvy7.mjs +6 -0
  13. package/chevron-up-c66bd477-ByW7R48t.js +10 -0
  14. package/chevron-up-c66bd477-CETJkshq.mjs +13 -0
  15. package/close-87fc0d63-Cbd-ScJr.js +3 -0
  16. package/close-87fc0d63-DtDU2HIU.mjs +6 -0
  17. package/color-0ba8ed56-BVeDdJAE.js +1 -0
  18. package/color-0ba8ed56-D-UJpBQL.mjs +207 -0
  19. package/color-primary-palette_6.entry-CfqMCd3g.mjs +300 -0
  20. package/color-primary-palette_6.entry-CoXWiKJ3.js +1 -0
  21. package/copy-03b72cb6-B_WCNQrG.mjs +6 -0
  22. package/copy-03b72cb6-CZAFAegx.js +3 -0
  23. package/correct-use-of-colors.entry-CfXsWbhB.js +1 -0
  24. package/correct-use-of-colors.entry-CotQESQa.mjs +59 -0
  25. package/eds-accordion.entry-BsT7Ved4.mjs +58 -0
  26. package/eds-accordion.entry-BvDNoDvv.js +4 -0
  27. package/eds-alert_28.entry-Ctl9tHqr.js +29465 -0
  28. package/eds-alert_28.entry-DbTB72ow.mjs +30921 -0
  29. package/eds-block-break.entry-B8gP4ig9.mjs +13 -0
  30. package/eds-block-break.entry-L9LG-PtO.js +1 -0
  31. package/eds-breadcrumb.entry-C6mAAYNs.js +1 -0
  32. package/eds-breadcrumb.entry-Dio_2hx4.mjs +114 -0
  33. package/eds-card-project.entry-CKYhNPPH.mjs +43 -0
  34. package/eds-card-project.entry-XK15egnP.js +1 -0
  35. package/eds-card-section.entry-B7jR75ty.js +1 -0
  36. package/eds-card-section.entry-x8CPk5NZ.mjs +33 -0
  37. package/eds-card-tags.entry-Bvn8dDXI.mjs +13 -0
  38. package/eds-card-tags.entry-CndclGXB.js +1 -0
  39. package/eds-card-tool.entry-DFuXjfhh.mjs +56 -0
  40. package/eds-card-tool.entry-DZqHML8u.js +1 -0
  41. package/eds-card-wrapper.entry-C_r0u0Fd.js +1 -0
  42. package/eds-card-wrapper.entry-DNnlCvMe.mjs +24 -0
  43. package/eds-code-block.entry-ClmjgThG.js +9 -0
  44. package/eds-code-block.entry-DwfHDe4j.mjs +1582 -0
  45. package/eds-components-section.entry-8sEheaoX.js +130 -0
  46. package/eds-components-section.entry-BSRNSdwF.mjs +244 -0
  47. package/eds-docs-palettes.entry-BlQEI2Bl.mjs +22 -0
  48. package/eds-docs-palettes.entry-Gi9kzOYC.js +1 -0
  49. package/eds-docs-tokens.entry-Bxzd9uSz.mjs +30 -0
  50. package/eds-docs-tokens.entry-G6O1zRxS.js +1 -0
  51. package/eds-footer.entry-9xXgg22T.mjs +29 -0
  52. package/eds-footer.entry-DqnRHQ32.js +1 -0
  53. package/eds-frame.entry-Bz-23eT7.js +1 -0
  54. package/eds-frame.entry-YVbNIAAz.mjs +74 -0
  55. package/eds-fullscreen-menu.entry-4kxB1p-j.mjs +74 -0
  56. package/eds-fullscreen-menu.entry-DwOubHgX.js +1 -0
  57. package/eds-icon-arrow-diagonal.entry-C06V6TIW.js +1 -0
  58. package/eds-icon-arrow-diagonal.entry-Ky6NoFbS.mjs +13 -0
  59. package/eds-icon-arrow-right.entry-BPHnm7pX.mjs +13 -0
  60. package/eds-icon-arrow-right.entry-Dv17zi29.js +1 -0
  61. package/eds-icon-bluesky.entry-7_AzEVLl.mjs +13 -0
  62. package/eds-icon-bluesky.entry-DQshm0EA.js +1 -0
  63. package/eds-icon-chevron-down.entry-BlnVbI1I.js +1 -0
  64. package/eds-icon-chevron-down.entry-DkcBkTRK.mjs +13 -0
  65. package/eds-icon-chevron-left.entry-BTxaVVnF.js +1 -0
  66. package/eds-icon-chevron-left.entry-BwhZiPKE.mjs +13 -0
  67. package/eds-icon-chevron-right.entry-BPKLFXW0.mjs +13 -0
  68. package/eds-icon-chevron-right.entry-c4irNhqS.js +1 -0
  69. package/eds-icon-chevron-up.entry-CFiZyc6u.js +1 -0
  70. package/eds-icon-chevron-up.entry-oja5yYhS.mjs +13 -0
  71. package/eds-icon-close.entry-5BdzrFmk.mjs +13 -0
  72. package/eds-icon-close.entry-DQD_dDo5.js +1 -0
  73. package/eds-icon-copy.entry-CQ237xrq.js +1 -0
  74. package/eds-icon-copy.entry-jpUaAQ7k.mjs +13 -0
  75. package/eds-icon-eu.entry-CjCnJWwP.js +1 -0
  76. package/eds-icon-eu.entry-gJ234Xni.mjs +13 -0
  77. package/eds-icon-facebook.entry-BHUSe9LK.js +1 -0
  78. package/eds-icon-facebook.entry-Ch94iA-s.mjs +13 -0
  79. package/eds-icon-gitlab.entry-B06LmNCU.mjs +13 -0
  80. package/eds-icon-gitlab.entry-j6RBYOBc.js +1 -0
  81. package/eds-icon-linkedin.entry-CMW1rKpG.mjs +13 -0
  82. package/eds-icon-linkedin.entry-DouHzclR.js +1 -0
  83. package/eds-icon-loader.entry-BlGbpEzt.js +1 -0
  84. package/eds-icon-loader.entry-Cx_ffiBq.mjs +13 -0
  85. package/eds-icon-mastodon.entry-C4ITVPfN.mjs +13 -0
  86. package/eds-icon-mastodon.entry-Cpl3lSng.js +1 -0
  87. package/eds-icon-menu.entry-BcPeEfV2.js +1 -0
  88. package/eds-icon-menu.entry-DvQARmJU.mjs +13 -0
  89. package/eds-icon-more.entry-BoAVOpyT.mjs +13 -0
  90. package/eds-icon-more.entry-m61loZHO.js +1 -0
  91. package/eds-icon-search.entry-BJMtVlnR.js +1 -0
  92. package/eds-icon-search.entry-D-nQvhug.mjs +13 -0
  93. package/eds-icon-success.entry-D8S7QlRm.mjs +13 -0
  94. package/eds-icon-success.entry-DvIchNgX.js +1 -0
  95. package/eds-icon-twitter.entry-CD1nT3iI.js +1 -0
  96. package/eds-icon-twitter.entry-DD48tnaV.mjs +13 -0
  97. package/eds-icon-user.entry-DDRH46_Z.js +1 -0
  98. package/eds-icon-user.entry-DSPBBAZa.mjs +13 -0
  99. package/eds-icon-youtube.entry-BRyOsCV-.mjs +13 -0
  100. package/eds-icon-youtube.entry-CfpQHgDF.js +1 -0
  101. package/eds-login.entry-CY0ZugpF.js +1 -0
  102. package/eds-login.entry-bC6f6bvF.mjs +46 -0
  103. package/eds-matomo-notice.entry-DGHq-ICP.mjs +91 -0
  104. package/eds-matomo-notice.entry-DanLI8VZ.js +1 -0
  105. package/eds-modal.entry-Bikh63fB.mjs +65 -0
  106. package/eds-modal.entry-TMxTmjgT.js +1 -0
  107. package/eds-navigator.entry-CUAf3hTM.js +1 -0
  108. package/eds-navigator.entry-D-fIKqub.mjs +33 -0
  109. package/eds-pagination.entry-C8g4pxcm.js +1 -0
  110. package/eds-pagination.entry-D6iJH84k.mjs +128 -0
  111. package/eds-rating.entry-B2lhi19L.mjs +40 -0
  112. package/eds-rating.entry-BdE-bKae.js +1 -0
  113. package/eds-section-core_2.entry-BRNJshCh.js +1 -0
  114. package/eds-section-core_2.entry-CqFyAWoq.mjs +39 -0
  115. package/eds-social-networks.entry-6VfWBLuR.js +1 -0
  116. package/eds-social-networks.entry-BgiRVGXx.mjs +50 -0
  117. package/eds-svg-repository.entry-BdZya_DA.js +192 -0
  118. package/eds-svg-repository.entry-qaL9fhLI.mjs +287 -0
  119. package/eds-tab.entry-BqqMdTQv.mjs +31 -0
  120. package/eds-tab.entry-C6q7naM_.js +1 -0
  121. package/eds-table.entry-BojRZdP2.mjs +112 -0
  122. package/eds-table.entry-ShWS4LWJ.js +1 -0
  123. package/eds-tabs-content.entry-D9b289Td.mjs +106 -0
  124. package/eds-tabs-content.entry-H__1SNbo.js +1 -0
  125. package/eds-tabs.entry-DGHlnSwh.js +1 -0
  126. package/eds-tabs.entry-KsWwc6xS.mjs +95 -0
  127. package/eds-tooltip.entry-BI1EvTiw.js +1 -0
  128. package/eds-tooltip.entry-ByxJjA_6.mjs +69 -0
  129. package/eu-9ddde93a-BFtIQw9B.js +28 -0
  130. package/eu-9ddde93a-ft4szvR5.mjs +31 -0
  131. package/facebook-9cb5c17f-BcUhbrj6.mjs +15 -0
  132. package/facebook-9cb5c17f-Y_gvQ682.js +12 -0
  133. package/generated/components.d.ts +0 -1
  134. package/incorrect-use-of-colors.entry-C7xABbpE.js +1 -0
  135. package/incorrect-use-of-colors.entry-DNOV6p4p.mjs +42 -0
  136. package/index-39c58238-BwYCDOHZ.mjs +44 -0
  137. package/index-39c58238-SQ-JC-LH.js +1 -0
  138. package/index-BGGkUjck.js +21 -0
  139. package/index-DQrtrXyM.mjs +3529 -0
  140. package/index.js +1 -21
  141. package/index.mjs +38 -2363
  142. package/keycloak-13893af6-BLzE1H6E.mjs +878 -0
  143. package/keycloak-13893af6-NiM3zoVg.js +9 -0
  144. package/linkedin-e8650abb-BkDrkjzY.js +26 -0
  145. package/linkedin-e8650abb-DYMdsale.mjs +29 -0
  146. package/loader-c9628637-ChpnbJkv.mjs +31 -0
  147. package/loader-c9628637-Vj8Wt1e8.js +28 -0
  148. package/logo-color-7f1fd803-CFgbXdt8.mjs +116 -0
  149. package/logo-color-7f1fd803-DRD3vZVn.js +113 -0
  150. package/logo-color-margins-ff8ce71b-B9nMsY9Q.mjs +119 -0
  151. package/logo-color-margins-ff8ce71b-Dk06zr1Z.js +116 -0
  152. package/logo-space.entry-DpgwdyOK.js +1 -0
  153. package/logo-space.entry-OauRHmO8.mjs +14 -0
  154. package/logo-variations-horizontal.entry-BG8fM5Bs.js +4 -0
  155. package/logo-variations-horizontal.entry-BicKkgRN.mjs +16 -0
  156. package/logo-variations-vertical.entry-CXVFf9-0.mjs +16 -0
  157. package/logo-variations-vertical.entry-DJ-IpAyZ.js +4 -0
  158. package/logo-white-no-bg-f382f86f-DXYn3NwV.js +1011 -0
  159. package/logo-white-no-bg-f382f86f-YhfmNmGG.mjs +1022 -0
  160. package/logo-wrong-usage.entry-7MfyIkPp.js +1 -0
  161. package/logo-wrong-usage.entry-CH7JMqbI.mjs +14 -0
  162. package/mastodon-3703ec61-C7iI4Hk0.mjs +15 -0
  163. package/mastodon-3703ec61-C9v6Olc-.js +12 -0
  164. package/menu-340ea948-BpnYX3gY.mjs +12 -0
  165. package/menu-340ea948-ZdelWVw3.js +9 -0
  166. package/mono-53f70232-DGi2XDlR.mjs +12 -0
  167. package/mono-53f70232-DgAsWvoQ.js +9 -0
  168. package/more-4449d549-D4HA1cRq.js +11 -0
  169. package/more-4449d549-rI9hOpEp.mjs +14 -0
  170. package/package.json +2 -2
  171. package/search-fbcd79c2-BMxCaeEk.js +10 -0
  172. package/search-fbcd79c2-rfV0PlHP.mjs +13 -0
  173. package/success-443809da-BD23vltm.mjs +19 -0
  174. package/success-443809da-BUEhLsAD.js +16 -0
  175. package/toastManager-d9eee791-CEYNwx25.mjs +30 -0
  176. package/toastManager-d9eee791-DvR_vUPI.js +1 -0
  177. package/token-list_3.entry-CVZDegic.js +1 -0
  178. package/token-list_3.entry-Ca9muGhp.mjs +247 -0
  179. package/token-ratios.entry-D3JWYlHy.mjs +25 -0
  180. package/token-ratios.entry-DGMJ2vJj.js +1 -0
  181. package/token-spacing.entry-CdrdqAOb.js +1 -0
  182. package/token-spacing.entry-CjITQ8pH.mjs +12 -0
  183. package/token-typography.entry-C8CdhyIM.js +2 -0
  184. package/token-typography.entry-DwUOTznz.mjs +213 -0
  185. package/twitter-ac21b505-CGWVGWM9.mjs +15 -0
  186. package/twitter-ac21b505-DDdHS4hB.js +12 -0
  187. package/user-71ebdc15-BBKQbcQD.js +14 -0
  188. package/user-71ebdc15-CoHlCtJg.mjs +17 -0
  189. package/youtube-efbfbdc4-BLTH1Jl9.js +12 -0
  190. package/youtube-efbfbdc4-BfySbfjR.mjs +15 -0
@@ -0,0 +1,130 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),t=()=>e.h("div",{class:"static-content container"},e.h("eds-alert",{message:`EBRAINS Design System makes it easy to implement and use its components across any framework or no framework at all. We
2
+ accomplish this by using standardized web platform APIs and Web Components.`,intent:"default"}),e.h("h2",null,"Load the module"),e.h("p",null,"Integrating EDSs components to a project without a JavaScript framework is straight forward. If you’re working on a simple HTML page, you can start using the components immediately by adding the tags below to the"," ",e.h("code",null,"head"),"."),e.h("eds-code-block",{code:'<script type="module" href="https://unpkg.com/@ebrains/components@0.0.1/loader"/><\/script>',language:"javascript","copy-label":"Copy Code"}),e.h("h2",null,"Load the styles"),e.h("p",null,"To directly use the produced css framework with a few predefined custom utility classes, add the tag below to the"," ",e.h("code",null,"head")),e.h("eds-code-block",{code:'<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/output.css"/>',language:"css","copy-label":"Copy Code"}),e.h("h2",null,"Load the fonts"),e.h("p",null,"To load the correct webfonts as well, add either one of these tags to the ",e.h("code",null,"head")),e.h("eds-code-block",{code:'<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/base/fonts.css"/>',language:"css","copy-label":"Copy Code"}),e.h("h2",null,"Component Usage"),e.h("p",null,"Once included, components can be used in your markup like any other regular HTML elements:"),e.h("eds-code-block",{code:'<eds-button label="my bytton" intent="primary"></eds-button>',language:"html","copy-label":"Copy Code"})),a=()=>e.h("div",null,e.h("p",null,"To start using the EBRAINS Design System, include the following scripts and styles in your project. You can also install it via npm for use with modern build tools."),e.h("eds-code-block",{code:"npm install @ebrains/components",language:"html","copy-label":"Copy Code"}),e.h("p",null,"TBD")),s=()=>e.h("div",null,e.h("h1",null,"Usage with basic HTML "),e.h("p",null,"TBD")),o=()=>e.h("div",null,e.h("h2",null,"React Wrappers"),e.h("p",null,"Learn how to use our components in a React Application."),"Simple install the package below and check out the examples",e.h("eds-code-block",{code:"npm install @ebrains/react",language:"javascript","copy-label":"Copy Code"}),e.h("eds-section-core",{"section-title":"Example React App","heading-level":"h3"},e.h("eds-code-block",{code:`
3
+ import { EdsHeader } from "@ebrains/react";
4
+
5
+ interface User {
6
+ firstname: string;
7
+ lastname: string;
8
+ // Add any other properties your user object might have
9
+ }
10
+
11
+ interface AuthStatus {
12
+ authenticated: boolean;
13
+ user: User | null;
14
+ }
15
+
16
+ import { useEffect, useState } from "react";
17
+
18
+ export function App() {
19
+
20
+ const [authStatus, setAuthStatus] = useState<AuthStatus>({
21
+ authenticated: false,
22
+ user: null,
23
+ });
24
+
25
+ const [activeTabIndex, setActiveTabIndex] = useState<number>(0);
26
+
27
+ // Use useEffect to render Stencil components dynamically after the component mounts
28
+ useEffect(() => {
29
+
30
+ const handleAuthStatusChange = (event: CustomEvent) => {
31
+ console.log(event.detail);
32
+ setAuthStatus(event.detail); // Set the entire object
33
+ };
34
+
35
+ const handleTabChange = (
36
+ event: CustomEvent<{ index: number; name: string }>,
37
+ ) => {
38
+ console.log(event.detail);
39
+ setActiveTabIndex(event.detail.index);
40
+ };
41
+
42
+ document.addEventListener(
43
+ "authStatusChanged",
44
+ handleAuthStatusChange as EventListener,
45
+ );
46
+ document.addEventListener("tabChange", handleTabChange as EventListener);
47
+
48
+ return () => {
49
+ document.removeEventListener(
50
+ "authStatusChanged",
51
+ handleAuthStatusChange as EventListener,
52
+ );
53
+ document.removeEventListener(
54
+ "tabChange",
55
+ handleTabChange as EventListener,
56
+ );
57
+ };
58
+ }, []); // Empty dependency array ensures this runs only once after mounting
59
+
60
+ return (
61
+ <div id="main">
62
+ <EdsHeader
63
+ home-url="/"
64
+ user-feature={false}
65
+ keycloak-url="http://localhost:8080"
66
+ keycloak-realm="nigeor-realm"
67
+ keycloak-client-id="stencil-app"
68
+ links="[
69
+ { "label": "About", "url": "/about" },
70
+ { "label": "Focus Areas", "url": "/focus-areas" },
71
+ { "label": "News & Events", "url": "/news-and-events" },
72
+ { "label": "Contact", "url": "/contact" }
73
+ ]"
74
+ ></EdsHeader>
75
+
76
+ <div>
77
+ User is{" "} {authStatus.authenticated ? "authenticated" : "not authenticated"}
78
+ </div>
79
+ {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}
80
+ </div>
81
+ </div>
82
+ );
83
+ }
84
+
85
+ export default App;
86
+ `,language:"javascript","copy-label":"Copy Code"}))),l=()=>e.h("div",null,e.h("h2",null,"Vue Wrappers"),e.h("p",null,"Learn how to use our components in a Vue Application."),e.h("eds-code-block",{code:"npm install @ebrains/vue",language:"javascript","copy-label":"Copy Code"}),e.h("p",null,"Define the custom elements"),e.h("eds-code-block",{code:`import { defineCustomElements } from '@ebrains/components/loader';
87
+ defineCustomElements();`,language:"javascript","copy-label":"Copy Code"}),e.h("eds-section-core",{"section-title":"Example Vue App","heading-level":"h3"},e.h("eds-code-block",{code:`
88
+ <template>
89
+ <h1 className="f-heading-02">Vue App</h1>
90
+
91
+ <EdsHeader
92
+ home-url="/"
93
+ user-feature=false
94
+ keycloak-url="http://localhost:8080"
95
+ keycloak-realm="nigeor-realm"
96
+ keycloak-client-id="stencil-app"
97
+ links="[
98
+ { "label": "About", "url": "/about" },
99
+ { "label": "Focus Areas", "url": "/focus-areas" },
100
+ { "label": "News & Events", "url": "/news-and-events" },
101
+ { "label": "Contact", "url": "/contact" }
102
+ ]">
103
+ </EdsHeader>
104
+
105
+ </template>
106
+
107
+ <script>
108
+
109
+ import { EdsHeader } from "@ebrains/vue";
110
+
111
+ export default {
112
+ name: "App",
113
+ components: {
114
+ EdsHeader,
115
+ }
116
+ };
117
+ <\/script>
118
+ `,language:"javascript","copy-label":"Copy Code"}))),c=()=>e.h("div",null,e.h("h2",null,"Angular Wrappers"),e.h("p",null,"Learn how to use our components in a Angular Application."),e.h("eds-code-block",{code:"npm install @ebrains/angular",language:"javascript","copy-label":"Copy Code"}),e.h("p",null,"Define the custom elements"),e.h("eds-code-block",{code:`import { defineCustomElements } from '@ebrains/components/loader';
119
+ defineCustomElements();`,language:"javascript","copy-label":"Copy Code"}),e.h("p",null,"Angular Custom Elements Schema"),e.h("eds-code-block",{code:'import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";',language:"javascript","copy-label":"Copy Code"}),e.h("eds-section-core",{"section-title":"Example Angular App","heading-level":"h3"},e.h("eds-code-block",{code:`
120
+ <div class="container">
121
+ <h1 class="f-heading-01">{{ title }}</h1>
122
+ <eds-breadcrumb
123
+ intent="tertiary"
124
+ items="[
125
+ { "label": "Home", "url": "#" },
126
+ { "label": "Products", "url": "#" },
127
+ ]">
128
+ </eds-breadcrumb>
129
+ <eds-footer></eds-footer>
130
+ </div>`,language:"javascript","copy-label":"Copy Code"}))),r=class{constructor(n){e.registerInstance(this,n),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h(t,null);case 1:return e.h(a,null);case 2:return e.h(s,null);case 3:return e.h(o,null);case 4:return e.h(l,null);case 5:return e.h(c,null);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"faa14dc7bb5d966ea1328f60d8ca88b3c406ad51",class:"container"},this.renderContent())}};exports.eds_components_section=r;
@@ -0,0 +1,244 @@
1
+ import { r as t, h as e } from "./index-DQrtrXyM.mjs";
2
+ const a = () => e(
3
+ "div",
4
+ { class: "static-content container" },
5
+ e("eds-alert", { message: `EBRAINS Design System makes it easy to implement and use its components across any framework or no framework at all. We
6
+ accomplish this by using standardized web platform APIs and Web Components.`, intent: "default" }),
7
+ e("h2", null, "Load the module"),
8
+ e(
9
+ "p",
10
+ null,
11
+ "Integrating EDSs components to a project without a JavaScript framework is straight forward. If you’re working on a simple HTML page, you can start using the components immediately by adding the tags below to the",
12
+ " ",
13
+ e("code", null, "head"),
14
+ "."
15
+ ),
16
+ e("eds-code-block", { code: '<script type="module" href="https://unpkg.com/@ebrains/components@0.0.1/loader"/><\/script>', language: "javascript", "copy-label": "Copy Code" }),
17
+ e("h2", null, "Load the styles"),
18
+ e(
19
+ "p",
20
+ null,
21
+ "To directly use the produced css framework with a few predefined custom utility classes, add the tag below to the",
22
+ " ",
23
+ e("code", null, "head")
24
+ ),
25
+ e("eds-code-block", { code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/output.css"/>', language: "css", "copy-label": "Copy Code" }),
26
+ e("h2", null, "Load the fonts"),
27
+ e(
28
+ "p",
29
+ null,
30
+ "To load the correct webfonts as well, add either one of these tags to the ",
31
+ e("code", null, "head")
32
+ ),
33
+ e("eds-code-block", { code: '<link rel="stylesheet" href="https://unpkg.com/@ebrains/assets@0.0.1/styles/base/fonts.css"/>', language: "css", "copy-label": "Copy Code" }),
34
+ e("h2", null, "Component Usage"),
35
+ e("p", null, "Once included, components can be used in your markup like any other regular HTML elements:"),
36
+ e("eds-code-block", { code: '<eds-button label="my bytton" intent="primary"></eds-button>', language: "html", "copy-label": "Copy Code" })
37
+ ), s = () => e(
38
+ "div",
39
+ null,
40
+ e("p", null, "To start using the EBRAINS Design System, include the following scripts and styles in your project. You can also install it via npm for use with modern build tools."),
41
+ e("eds-code-block", { code: "npm install @ebrains/components", language: "html", "copy-label": "Copy Code" }),
42
+ e("p", null, "TBD")
43
+ ), o = () => e(
44
+ "div",
45
+ null,
46
+ e("h1", null, "Usage with basic HTML "),
47
+ e("p", null, "TBD")
48
+ ), l = () => e(
49
+ "div",
50
+ null,
51
+ e("h2", null, "React Wrappers"),
52
+ e("p", null, "Learn how to use our components in a React Application."),
53
+ "Simple install the package below and check out the examples",
54
+ e("eds-code-block", { code: "npm install @ebrains/react", language: "javascript", "copy-label": "Copy Code" }),
55
+ e(
56
+ "eds-section-core",
57
+ { "section-title": "Example React App", "heading-level": "h3" },
58
+ e("eds-code-block", { code: `
59
+ import { EdsHeader } from "@ebrains/react";
60
+
61
+ interface User {
62
+ firstname: string;
63
+ lastname: string;
64
+ // Add any other properties your user object might have
65
+ }
66
+
67
+ interface AuthStatus {
68
+ authenticated: boolean;
69
+ user: User | null;
70
+ }
71
+
72
+ import { useEffect, useState } from "react";
73
+
74
+ export function App() {
75
+
76
+ const [authStatus, setAuthStatus] = useState<AuthStatus>({
77
+ authenticated: false,
78
+ user: null,
79
+ });
80
+
81
+ const [activeTabIndex, setActiveTabIndex] = useState<number>(0);
82
+
83
+ // Use useEffect to render Stencil components dynamically after the component mounts
84
+ useEffect(() => {
85
+
86
+ const handleAuthStatusChange = (event: CustomEvent) => {
87
+ console.log(event.detail);
88
+ setAuthStatus(event.detail); // Set the entire object
89
+ };
90
+
91
+ const handleTabChange = (
92
+ event: CustomEvent<{ index: number; name: string }>,
93
+ ) => {
94
+ console.log(event.detail);
95
+ setActiveTabIndex(event.detail.index);
96
+ };
97
+
98
+ document.addEventListener(
99
+ "authStatusChanged",
100
+ handleAuthStatusChange as EventListener,
101
+ );
102
+ document.addEventListener("tabChange", handleTabChange as EventListener);
103
+
104
+ return () => {
105
+ document.removeEventListener(
106
+ "authStatusChanged",
107
+ handleAuthStatusChange as EventListener,
108
+ );
109
+ document.removeEventListener(
110
+ "tabChange",
111
+ handleTabChange as EventListener,
112
+ );
113
+ };
114
+ }, []); // Empty dependency array ensures this runs only once after mounting
115
+
116
+ return (
117
+ <div id="main">
118
+ <EdsHeader
119
+ home-url="/"
120
+ user-feature={false}
121
+ keycloak-url="http://localhost:8080"
122
+ keycloak-realm="nigeor-realm"
123
+ keycloak-client-id="stencil-app"
124
+ links="[
125
+ { "label": "About", "url": "/about" },
126
+ { "label": "Focus Areas", "url": "/focus-areas" },
127
+ { "label": "News & Events", "url": "/news-and-events" },
128
+ { "label": "Contact", "url": "/contact" }
129
+ ]"
130
+ ></EdsHeader>
131
+
132
+ <div>
133
+ User is{" "} {authStatus.authenticated ? "authenticated" : "not authenticated"}
134
+ </div>
135
+ {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}
136
+ </div>
137
+ </div>
138
+ );
139
+ }
140
+
141
+ export default App;
142
+ `, language: "javascript", "copy-label": "Copy Code" })
143
+ )
144
+ ), r = () => e(
145
+ "div",
146
+ null,
147
+ e("h2", null, "Vue Wrappers"),
148
+ e("p", null, "Learn how to use our components in a Vue Application."),
149
+ e("eds-code-block", { code: "npm install @ebrains/vue", language: "javascript", "copy-label": "Copy Code" }),
150
+ e("p", null, "Define the custom elements"),
151
+ e("eds-code-block", { code: `import { defineCustomElements } from '@ebrains/components/loader';
152
+ defineCustomElements();`, language: "javascript", "copy-label": "Copy Code" }),
153
+ e(
154
+ "eds-section-core",
155
+ { "section-title": "Example Vue App", "heading-level": "h3" },
156
+ e("eds-code-block", { code: `
157
+ <template>
158
+ <h1 className="f-heading-02">Vue App</h1>
159
+
160
+ <EdsHeader
161
+ home-url="/"
162
+ user-feature=false
163
+ keycloak-url="http://localhost:8080"
164
+ keycloak-realm="nigeor-realm"
165
+ keycloak-client-id="stencil-app"
166
+ links="[
167
+ { "label": "About", "url": "/about" },
168
+ { "label": "Focus Areas", "url": "/focus-areas" },
169
+ { "label": "News & Events", "url": "/news-and-events" },
170
+ { "label": "Contact", "url": "/contact" }
171
+ ]">
172
+ </EdsHeader>
173
+
174
+ </template>
175
+
176
+ <script>
177
+
178
+ import { EdsHeader } from "@ebrains/vue";
179
+
180
+ export default {
181
+ name: "App",
182
+ components: {
183
+ EdsHeader,
184
+ }
185
+ };
186
+ <\/script>
187
+ `, language: "javascript", "copy-label": "Copy Code" })
188
+ )
189
+ ), c = () => e(
190
+ "div",
191
+ null,
192
+ e("h2", null, "Angular Wrappers"),
193
+ e("p", null, "Learn how to use our components in a Angular Application."),
194
+ e("eds-code-block", { code: "npm install @ebrains/angular", language: "javascript", "copy-label": "Copy Code" }),
195
+ e("p", null, "Define the custom elements"),
196
+ e("eds-code-block", { code: `import { defineCustomElements } from '@ebrains/components/loader';
197
+ defineCustomElements();`, language: "javascript", "copy-label": "Copy Code" }),
198
+ e("p", null, "Angular Custom Elements Schema"),
199
+ e("eds-code-block", { code: 'import { CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";', language: "javascript", "copy-label": "Copy Code" }),
200
+ e(
201
+ "eds-section-core",
202
+ { "section-title": "Example Angular App", "heading-level": "h3" },
203
+ e("eds-code-block", { code: `
204
+ <div class="container">
205
+ <h1 class="f-heading-01">{{ title }}</h1>
206
+ <eds-breadcrumb
207
+ intent="tertiary"
208
+ items="[
209
+ { "label": "Home", "url": "#" },
210
+ { "label": "Products", "url": "#" },
211
+ ]">
212
+ </eds-breadcrumb>
213
+ <eds-footer></eds-footer>
214
+ </div>`, language: "javascript", "copy-label": "Copy Code" })
215
+ )
216
+ ), u = class {
217
+ constructor(n) {
218
+ t(this, n), this.tabIndex = void 0;
219
+ }
220
+ renderContent() {
221
+ switch (this.tabIndex) {
222
+ case 0:
223
+ return e(a, null);
224
+ case 1:
225
+ return e(s, null);
226
+ case 2:
227
+ return e(o, null);
228
+ case 3:
229
+ return e(l, null);
230
+ case 4:
231
+ return e(r, null);
232
+ case 5:
233
+ return e(c, null);
234
+ default:
235
+ return e("p", null, "Content not available.");
236
+ }
237
+ }
238
+ render() {
239
+ return e("div", { key: "faa14dc7bb5d966ea1328f60d8ca88b3c406ad51", class: "container" }, this.renderContent());
240
+ }
241
+ };
242
+ export {
243
+ u as eds_components_section
244
+ };
@@ -0,0 +1,22 @@
1
+ import { r as l, h as e } from "./index-DQrtrXyM.mjs";
2
+ const r = class {
3
+ constructor(t) {
4
+ l(this, t), this.tabIndex = void 0;
5
+ }
6
+ renderContent() {
7
+ switch (this.tabIndex) {
8
+ case 0:
9
+ return e("div", null, e("h2", null, "Primary Palette"), e("color-primary-palette", null), e("h2", null, "Secondary Palette"), e("color-secondary-palette", null), e("h2", null, "Support Palette"), e("color-support-palette", null));
10
+ case 1:
11
+ return e("div", null, e("h2", null, "Primary Palette"), e("gradient-primary-palette", null), e("h2", null, "Secondary Palette"), e("gradient-secondary-palette", null), e("h2", null, "Support Palette"), e("gradient-support-palette", null));
12
+ default:
13
+ return e("p", null, "Content not available.");
14
+ }
15
+ }
16
+ render() {
17
+ return e("div", { key: "c11e0de66c41770e7ebca46d3fb7ab11b454511e", class: "container" }, this.renderContent());
18
+ }
19
+ };
20
+ export {
21
+ r as eds_docs_palettes
22
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),l=class{constructor(t){e.registerInstance(this,t),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h("div",null,e.h("h2",null,"Primary Palette"),e.h("color-primary-palette",null),e.h("h2",null,"Secondary Palette"),e.h("color-secondary-palette",null),e.h("h2",null,"Support Palette"),e.h("color-support-palette",null));case 1:return e.h("div",null,e.h("h2",null,"Primary Palette"),e.h("gradient-primary-palette",null),e.h("h2",null,"Secondary Palette"),e.h("gradient-secondary-palette",null),e.h("h2",null,"Support Palette"),e.h("gradient-support-palette",null));default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"c11e0de66c41770e7ebca46d3fb7ab11b454511e",class:"container"},this.renderContent())}};exports.eds_docs_palettes=l;
@@ -0,0 +1,30 @@
1
+ import { r as n, h as e } from "./index-DQrtrXyM.mjs";
2
+ const r = class {
3
+ constructor(t) {
4
+ n(this, t), this.tabIndex = void 0;
5
+ }
6
+ renderContent() {
7
+ switch (this.tabIndex) {
8
+ case 0:
9
+ return e("token-list", { show: "background" });
10
+ case 1:
11
+ return e("token-list", { show: "text" });
12
+ case 2:
13
+ return e("token-list", { show: "border" });
14
+ case 3:
15
+ return e("token-radii", null);
16
+ case 4:
17
+ return e("token-list", { show: "outline" });
18
+ case 5:
19
+ return e("token-shadows", null);
20
+ default:
21
+ return e("p", null, "Content not available.");
22
+ }
23
+ }
24
+ render() {
25
+ return e("div", { key: "ef9cf093af7bc730b73f3561b36187f70aea29a7", class: "container" }, this.renderContent());
26
+ }
27
+ };
28
+ export {
29
+ r as eds_docs_tokens
30
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),n=class{constructor(t){e.registerInstance(this,t),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h("token-list",{show:"background"});case 1:return e.h("token-list",{show:"text"});case 2:return e.h("token-list",{show:"border"});case 3:return e.h("token-radii",null);case 4:return e.h("token-list",{show:"outline"});case 5:return e.h("token-shadows",null);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"ef9cf093af7bc730b73f3561b36187f70aea29a7",class:"container"},this.renderContent())}};exports.eds_docs_tokens=n;
@@ -0,0 +1,29 @@
1
+ import { r as o, h as e } from "./index-DQrtrXyM.mjs";
2
+ const a = "", t = a, r = class {
3
+ constructor(s) {
4
+ o(this, s), this.backToTop = () => {
5
+ window.scrollTo({ top: 0, behavior: "smooth" });
6
+ }, this.extraClass = "", this.social = !1, this.hasCookiesSetUp = !1, this.enableScrollTop = !1, this.fundedBy = "EBRAINS is funded by the Horizon Europe Framework Programme.", this.rightsReserved = `${(/* @__PURE__ */ new Date()).getFullYear()} EBRAINS. All rights reserved.`, this.cookiesPreference = "Cookies Preferences";
7
+ }
8
+ /**
9
+ * Toggles the cookie preferences popup, if available.
10
+ * The actual implementation for handling cookie preferences should be defined here.
11
+ * @private
12
+ */
13
+ toggleCookiesPopup() {
14
+ }
15
+ /**
16
+ * Renders the footer component with optional sections and elements,
17
+ * including social network links, a Horizon Europe funding acknowledgment, and
18
+ * legal links such as "Cookies Preferences" and copyright information.
19
+ *
20
+ * @returns {JSX.Element} The rendered JSX for the footer component.
21
+ */
22
+ render() {
23
+ return e("footer", { key: "efffa9b96cc2a094255fcb6d08ec45c7c7f09ec4", class: `${this.extraClass} pb-banner` }, this.social ? e("div", { class: "border-softest border-t-2 pt-20 pb-28 md:pt-28" }, e("div", { class: "container pb-20 xl:pb-40 " }, e("div", { class: "grid-layout" }, e("div", { class: "grid-col-span-12 lg:grid-col-span-5" }, e("eds-social-networks", { class: "mt-28" })), e("nav", { "aria-label": "Secondary nav", class: "grid-col-span-12 lg:grid-col-span-6 lg:grid-col-start-7 grid-layout mt-28 gap-y-12 lg:mt-0" })))) : null, e("div", { key: "c3942c635dff3dc8cb47a21f20aca52acfaa3e18", class: `border-softest ${this.social ? "border-t-2" : ""} pt-20 pb-28 md:pt-28` }, e("div", { key: "57e963272659ce2e63294c969f3724a03aef667e", class: "container flex flex-wrap items-center gap-20 lg:flex-nowrap" }, e("div", { key: "c3e5cfe07fe9eb90450f7a87be1b95ed00ef38ce", class: "flex items-center gap-x-12" }, e("a", { key: "b0d0c65115b611f78d2b468559c16eb60f538907", target: "_blank", rel: "noopener noreferrer", class: "effect-focus focus-visible:rounded-xs flex w-[54px] ml-0", href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en" }, e("eds-img", { key: "6cb5d067f07b456a8d828f3f42f2730e3e5374e0", width: 54, height: 41, src: "https://www.ebrains.eu/flags/4x3/eu.svg" }))), e("div", { key: "e5b768b0fb96fcdcb786d33fc808368005935491", class: "f-ui-04 text-light order-last w-full lg:order-none lg:w-auto" }, e("p", { key: "777263c2f4bde43d38690f41391eaf8e51d945fa" }, this.fundedBy), e("div", { key: "a415687d08edf8f3e03a6edce9c45f58662c8595", class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap" }, e("span", { key: "c0b6498ad4f5e1f4f1945ebb971f9dd81cc74c77", class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline" }, "© ", this.rightsReserved), this.hasCookiesSetUp && e("button", { key: "10133d180bfb0d8a6354ea2cbea318a2c46fc463", class: "effect-focus !no-underline underline-offset-4 hover:!underline", onClick: () => this.toggleCookiesPopup() }, this.cookiesPreference))), e("div", { key: "917d0980f91a8c42a75bae301b0a18e3777dd021", class: "ml-auto pl-12" }, this.enableScrollTop ? e("eds-button", { "aria-label": "Back to top", intent: "ghostInverse", icon: "chevron-up", onClick: this.backToTop }) : null))));
24
+ }
25
+ };
26
+ r.style = t;
27
+ export {
28
+ r as eds_footer
29
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),a="",t=a,s=class{constructor(o){e.registerInstance(this,o),this.backToTop=()=>{window.scrollTo({top:0,behavior:"smooth"})},this.extraClass="",this.social=!1,this.hasCookiesSetUp=!1,this.enableScrollTop=!1,this.fundedBy="EBRAINS is funded by the Horizon Europe Framework Programme.",this.rightsReserved=`${new Date().getFullYear()} EBRAINS. All rights reserved.`,this.cookiesPreference="Cookies Preferences"}toggleCookiesPopup(){}render(){return e.h("footer",{key:"efffa9b96cc2a094255fcb6d08ec45c7c7f09ec4",class:`${this.extraClass} pb-banner`},this.social?e.h("div",{class:"border-softest border-t-2 pt-20 pb-28 md:pt-28"},e.h("div",{class:"container pb-20 xl:pb-40 "},e.h("div",{class:"grid-layout"},e.h("div",{class:"grid-col-span-12 lg:grid-col-span-5"},e.h("eds-social-networks",{class:"mt-28"})),e.h("nav",{"aria-label":"Secondary nav",class:"grid-col-span-12 lg:grid-col-span-6 lg:grid-col-start-7 grid-layout mt-28 gap-y-12 lg:mt-0"})))):null,e.h("div",{key:"c3942c635dff3dc8cb47a21f20aca52acfaa3e18",class:`border-softest ${this.social?"border-t-2":""} pt-20 pb-28 md:pt-28`},e.h("div",{key:"57e963272659ce2e63294c969f3724a03aef667e",class:"container flex flex-wrap items-center gap-20 lg:flex-nowrap"},e.h("div",{key:"c3e5cfe07fe9eb90450f7a87be1b95ed00ef38ce",class:"flex items-center gap-x-12"},e.h("a",{key:"b0d0c65115b611f78d2b468559c16eb60f538907",target:"_blank",rel:"noopener noreferrer",class:"effect-focus focus-visible:rounded-xs flex w-[54px] ml-0",href:"https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en"},e.h("eds-img",{key:"6cb5d067f07b456a8d828f3f42f2730e3e5374e0",width:54,height:41,src:"https://www.ebrains.eu/flags/4x3/eu.svg"}))),e.h("div",{key:"e5b768b0fb96fcdcb786d33fc808368005935491",class:"f-ui-04 text-light order-last w-full lg:order-none lg:w-auto"},e.h("p",{key:"777263c2f4bde43d38690f41391eaf8e51d945fa"},this.fundedBy),e.h("div",{key:"a415687d08edf8f3e03a6edce9c45f58662c8595",class:"mt-4 flex flex-wrap gap-12 lg:flex-nowrap"},e.h("span",{key:"c0b6498ad4f5e1f4f1945ebb971f9dd81cc74c77",class:"effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline"},"© ",this.rightsReserved),this.hasCookiesSetUp&&e.h("button",{key:"10133d180bfb0d8a6354ea2cbea318a2c46fc463",class:"effect-focus !no-underline underline-offset-4 hover:!underline",onClick:()=>this.toggleCookiesPopup()},this.cookiesPreference))),e.h("div",{key:"917d0980f91a8c42a75bae301b0a18e3777dd021",class:"ml-auto pl-12"},this.enableScrollTop?e.h("eds-button",{"aria-label":"Back to top",intent:"ghostInverse",icon:"chevron-up",onClick:this.backToTop}):null))))}};s.style=t;exports.eds_footer=s;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),s=class{constructor(t){e.registerInstance(this,t),this.frameLabel=void 0,this.urlLabel="Open in Storybook",this.errorMessage="Could not load the requested Storybook content. Please check the URL or try again later.",this.storybookUrl=void 0,this.storyPath=void 0,this.intent="strong",this.tiny=!1,this.size="auto",this.bg=!0,this.iframeError=!1}articleClasses(){return[this.tiny?"min-h-120":"min-h-156",this.bg?"bg-inverse":"bg-default","rounded border-softer effect-focus-within relative flex grow flex-col border-2","w-full h-full"].join(" ")}getFrameHeight(){switch(this.size){case"sm":return"100px";case"md":return"200px";case"lg":return"400px";case"xl":return"700px";default:return"auto"}}async checkIframeAvailability(){try{if(!(await fetch(this.frameSrc,{method:"GET"})).ok)throw new Error("Failed to load")}catch{this.iframeError=!0}}componentWillLoad(){this.checkIframeAvailability()}componentDidLoad(){this.el.querySelectorAll("eds-link").forEach(r=>{this.emitContext(r)})}emitContext(t){const r=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:this.frameLabel}});t.dispatchEvent(r)}get storyLink(){return`${this.storybookUrl}/?path=/story/${this.storyPath}`}get frameSrc(){return`${this.storybookUrl}/iframe.html?id=${this.storyPath}&viewMode=story`}render(){return e.h("div",{key:"0c3a43efc1a125af5999af88c4eb071b5c3bc6c5",class:this.articleClasses()},e.h("div",{key:"32303d5e2c2f3b01efe1ceaf828346f873bea6b6",class:"effect-height flex items-center justify-between py-8 px-12"},e.h("span",{key:"75f7f6750413dad4af2ea62c12ffb994491d5d01",class:"f-ui-02"},this.frameLabel),this.iframeError?null:e.h("eds-link",{label:this.urlLabel,url:this.storyLink,intent:this.intent,class:"ml-auto",external:!0,disabled:!1,icon:"arrow-diagonal"})),e.h("div",{key:"1fd99f6eda026814910b0cd93635616b7d3ffe09",class:"border-softer border-t-2"},this.iframeError?e.h("div",{class:"container ml-8 mr-8 mt-16"},this.errorMessage):e.h("iframe",{src:this.frameSrc,width:"100%",height:this.getFrameHeight(),title:this.frameLabel,frameBorder:"0",allowFullScreen:!0})))}get el(){return e.getElement(this)}};exports.eds_frame=s;
@@ -0,0 +1,74 @@
1
+ import { r as s, h as e, g as i } from "./index-DQrtrXyM.mjs";
2
+ const o = class {
3
+ constructor(t) {
4
+ s(this, t), this.frameLabel = void 0, this.urlLabel = "Open in Storybook", this.errorMessage = "Could not load the requested Storybook content. Please check the URL or try again later.", this.storybookUrl = void 0, this.storyPath = void 0, this.intent = "strong", this.tiny = !1, this.size = "auto", this.bg = !0, this.iframeError = !1;
5
+ }
6
+ articleClasses() {
7
+ return [
8
+ this.tiny ? "min-h-120" : "min-h-156",
9
+ this.bg ? "bg-inverse" : "bg-default",
10
+ "rounded border-softer effect-focus-within relative flex grow flex-col border-2",
11
+ "w-full h-full"
12
+ ].join(" ");
13
+ }
14
+ getFrameHeight() {
15
+ switch (this.size) {
16
+ case "sm":
17
+ return "100px";
18
+ case "md":
19
+ return "200px";
20
+ case "lg":
21
+ return "400px";
22
+ case "xl":
23
+ return "700px";
24
+ default:
25
+ return "auto";
26
+ }
27
+ }
28
+ async checkIframeAvailability() {
29
+ try {
30
+ if (!(await fetch(this.frameSrc, { method: "GET" })).ok)
31
+ throw new Error("Failed to load");
32
+ } catch {
33
+ this.iframeError = !0;
34
+ }
35
+ }
36
+ componentWillLoad() {
37
+ this.checkIframeAvailability();
38
+ }
39
+ componentDidLoad() {
40
+ this.el.querySelectorAll("eds-link").forEach((r) => {
41
+ this.emitContext(r);
42
+ });
43
+ }
44
+ /**
45
+ * Emits a custom event called `parentContext` for a given link element.
46
+ * This event provides context information about the breadcrumb component.
47
+ *
48
+ * @param linkElement - The link element to which the event will be dispatched.
49
+ */
50
+ emitContext(t) {
51
+ const r = new CustomEvent("parentContext", {
52
+ detail: {
53
+ componentName: this.el.tagName.toLowerCase(),
54
+ identifier: this.frameLabel
55
+ }
56
+ });
57
+ t.dispatchEvent(r);
58
+ }
59
+ get storyLink() {
60
+ return `${this.storybookUrl}/?path=/story/${this.storyPath}`;
61
+ }
62
+ get frameSrc() {
63
+ return `${this.storybookUrl}/iframe.html?id=${this.storyPath}&viewMode=story`;
64
+ }
65
+ render() {
66
+ return e("div", { key: "0c3a43efc1a125af5999af88c4eb071b5c3bc6c5", class: this.articleClasses() }, e("div", { key: "32303d5e2c2f3b01efe1ceaf828346f873bea6b6", class: "effect-height flex items-center justify-between py-8 px-12" }, e("span", { key: "75f7f6750413dad4af2ea62c12ffb994491d5d01", class: "f-ui-02" }, this.frameLabel), this.iframeError ? null : e("eds-link", { label: this.urlLabel, url: this.storyLink, intent: this.intent, class: "ml-auto", external: !0, disabled: !1, icon: "arrow-diagonal" })), e("div", { key: "1fd99f6eda026814910b0cd93635616b7d3ffe09", class: "border-softer border-t-2" }, this.iframeError ? e("div", { class: "container ml-8 mr-8 mt-16" }, this.errorMessage) : e("iframe", { src: this.frameSrc, width: "100%", height: this.getFrameHeight(), title: this.frameLabel, frameBorder: "0", allowFullScreen: !0 })));
67
+ }
68
+ get el() {
69
+ return i(this);
70
+ }
71
+ };
72
+ export {
73
+ o as eds_frame
74
+ };
@@ -0,0 +1,74 @@
1
+ import { r as t, c as i, h as e } from "./index-DQrtrXyM.mjs";
2
+ const r = "", l = r, o = class {
3
+ constructor(s) {
4
+ t(this, s), this.menuClose = i(this, "menuClose", 7), this.links = void 0, this.menuLinks = void 0, this.homeUrl = "/", this.inverseHeader = !1, this.isMenuOpen = !1;
5
+ }
6
+ /**
7
+ * Listens for the toggleMenu event to open or close the menu.
8
+ * This event is emitted by the eds-header component.
9
+ */
10
+ handleToggleMenu(s) {
11
+ this.isMenuOpen = s.detail;
12
+ }
13
+ /** Opens the menu */
14
+ openMenu() {
15
+ this.isMenuOpen = !0;
16
+ }
17
+ /** Closes the menu */
18
+ closeMenu() {
19
+ this.isMenuOpen = !1, this.menuClose.emit();
20
+ }
21
+ // Lifecycle method to add the resize event listener when component loads
22
+ componentDidLoad() {
23
+ window.addEventListener("resize", this.handleResize.bind(this));
24
+ }
25
+ // Lifecycle method to remove the resize event listener when component unloads
26
+ disconnectedCallback() {
27
+ window.removeEventListener("resize", this.handleResize.bind(this));
28
+ }
29
+ // Function to close the menu if screen width is larger than a defined breakpoint (1024px)
30
+ handleResize() {
31
+ window.innerWidth >= 1024 && (this.isMenuOpen = !1);
32
+ }
33
+ /**
34
+ * Parses the `links` prop into an array of link objects.
35
+ * Returns an empty array if parsing fails or if `links` is not a valid JSON string or object.
36
+ *
37
+ * @returns {any[]} Array of parsed link objects
38
+ */
39
+ get parsedLinks() {
40
+ if (typeof this.links == "object")
41
+ return this.links;
42
+ if (typeof this.links == "string")
43
+ try {
44
+ return JSON.parse(this.links);
45
+ } catch (s) {
46
+ return console.error("Error parsing links prop:", s), [];
47
+ }
48
+ return [];
49
+ }
50
+ /**
51
+ * Parses the `menuLinks` prop into an array of link objects.
52
+ * Returns an empty array if parsing fails or if `menuLinks` is not a valid JSON string or object.
53
+ *
54
+ * @returns {any[]} Array of parsed menu link objects
55
+ */
56
+ get parsedMenuLinks() {
57
+ if (typeof this.menuLinks == "object")
58
+ return this.menuLinks;
59
+ if (typeof this.menuLinks == "string")
60
+ try {
61
+ return JSON.parse(this.menuLinks);
62
+ } catch (s) {
63
+ return console.error("Error parsing menuLinks prop:", s), [];
64
+ }
65
+ return [];
66
+ }
67
+ render() {
68
+ return this.isMenuOpen ? e("div", { class: "eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll" }, e("div", { class: "flex min-h-full flex-col" }, e("div", { class: `bg-default w-full sticky top-0 ${this.inverseHeader ? "bg-strongest" : "bg-default"}` }, e("div", { class: "mx-auto flex items-center justify-between" }, e("div", { class: "mr-auto w-[200px] h-[85px]" }, e("eds-logo", { type: this.inverseHeader ? "color-white" : "color", href: this.homeUrl })), e("div", { class: "px-16" }, e("eds-button", { "aria-label": "Close menu", intent: "ghostInverse", icon: "close", onClick: () => this.closeMenu() })))), e("div", { class: "py-16 px-16" }, e("nav", { class: "mt-28 flex flex-col gap-y-8" }, this.parsedLinks.map((s, n) => e("eds-link", { label: s.label, key: n, url: s.url, intent: "tertiary", size: "large", class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit", onClick: () => this.closeMenu(), icon: "arrow-right" }))), e("eds-block-break", null), e("nav", { class: "mt-28 flex flex-col gap-y-8" }, this.parsedMenuLinks.map((s, n) => e("eds-link", { label: s.label, key: n, url: s.url, intent: "tertiary", size: "large", class: "effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit", onClick: () => this.closeMenu(), icon: "chevron-right" })))), e("div", { class: "mt-auto" }, e("eds-footer", { social: !0, "extra-class": "bg-darker" })))) : null;
69
+ }
70
+ };
71
+ o.style = l;
72
+ export {
73
+ o as eds_fullscreen_menu
74
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),i="",r=i,t=class{constructor(s){e.registerInstance(this,s),this.menuClose=e.createEvent(this,"menuClose",7),this.links=void 0,this.menuLinks=void 0,this.homeUrl="/",this.inverseHeader=!1,this.isMenuOpen=!1}handleToggleMenu(s){this.isMenuOpen=s.detail}openMenu(){this.isMenuOpen=!0}closeMenu(){this.isMenuOpen=!1,this.menuClose.emit()}componentDidLoad(){window.addEventListener("resize",this.handleResize.bind(this))}disconnectedCallback(){window.removeEventListener("resize",this.handleResize.bind(this))}handleResize(){window.innerWidth>=1024&&(this.isMenuOpen=!1)}get parsedLinks(){if(typeof this.links=="object")return this.links;if(typeof this.links=="string")try{return JSON.parse(this.links)}catch(s){return console.error("Error parsing links prop:",s),[]}return[]}get parsedMenuLinks(){if(typeof this.menuLinks=="object")return this.menuLinks;if(typeof this.menuLinks=="string")try{return JSON.parse(this.menuLinks)}catch(s){return console.error("Error parsing menuLinks prop:",s),[]}return[]}render(){return this.isMenuOpen?e.h("div",{class:"eds-full-screen bg-default fixed inset-0 z-[999999] overflow-y-scroll"},e.h("div",{class:"flex min-h-full flex-col"},e.h("div",{class:`bg-default w-full sticky top-0 ${this.inverseHeader?"bg-strongest":"bg-default"}`},e.h("div",{class:"mx-auto flex items-center justify-between"},e.h("div",{class:"mr-auto w-[200px] h-[85px]"},e.h("eds-logo",{type:this.inverseHeader?"color-white":"color",href:this.homeUrl})),e.h("div",{class:"px-16"},e.h("eds-button",{"aria-label":"Close menu",intent:"ghostInverse",icon:"close",onClick:()=>this.closeMenu()})))),e.h("div",{class:"py-16 px-16"},e.h("nav",{class:"mt-28 flex flex-col gap-y-8"},this.parsedLinks.map((s,n)=>e.h("eds-link",{label:s.label,key:n,url:s.url,intent:"tertiary",size:"large",class:"effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",onClick:()=>this.closeMenu(),icon:"arrow-right"}))),e.h("eds-block-break",null),e.h("nav",{class:"mt-28 flex flex-col gap-y-8"},this.parsedMenuLinks.map((s,n)=>e.h("eds-link",{label:s.label,key:n,url:s.url,intent:"tertiary",size:"large",class:"effect-color effect-focus rounded-xs f-heading-02 hover:text-lighter w-fit",onClick:()=>this.closeMenu(),icon:"chevron-right"})))),e.h("div",{class:"mt-auto"},e.h("eds-footer",{social:!0,"extra-class":"bg-darker"})))):null}};t.style=r;exports.eds_fullscreen_menu=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BGGkUjck.js"),a=require("./arrow-diagonal-black-8f0494c3-DqsB6ni-.js"),s=class{constructor(r){e.registerInstance(this,r),this.addClass=""}render(){return e.h("span",{key:"08ebdce5cfbe75bf4bfab8f72493e2178be55c3c",class:this.addClass,innerHTML:a.arrowDiagonal})}};exports.eds_icon_arrow_diagonal=s;