@ebrains/vue 0.4.0-alpha.0 → 0.5.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 (210) hide show
  1. package/analytics-1cde8e4a-BDRcCMlV.mjs +24 -0
  2. package/analytics-1cde8e4a-B_MD-9qW.js +1 -0
  3. package/color-2554aad6-CCcV5UJZ.mjs +131 -0
  4. package/color-2554aad6-D1hFGX4H.js +1 -0
  5. package/{color-primary-palette_6.entry-CSDWEKLH.mjs → color-primary-palette_6.entry-CgeStD0V.mjs} +21 -21
  6. package/color-primary-palette_6.entry-c_K7930i.js +1 -0
  7. package/correct-use-of-colors.entry-De5Tcxdm.mjs +59 -0
  8. package/correct-use-of-colors.entry-DpmXW_CD.js +1 -0
  9. package/eds-accordion.entry-B8TjhnWX.mjs +49 -0
  10. package/eds-accordion.entry-BySfMYU2.js +4 -0
  11. package/eds-alert_17.entry-BfpBSBVW.js +14999 -0
  12. package/eds-alert_17.entry-IJq6baZd.mjs +16075 -0
  13. package/eds-avatar_4.entry-B7CV7v_n.mjs +283 -0
  14. package/eds-avatar_4.entry-D1CDRW_R.js +149 -0
  15. package/eds-card-generic.entry-BhLK-nyp.js +1 -0
  16. package/eds-card-generic.entry-DIHPUjbI.mjs +63 -0
  17. package/{eds-card-project.entry-C3eyu1U0.mjs → eds-card-project.entry-C2dWgXXW.mjs} +12 -11
  18. package/eds-card-project.entry-CunHqbYK.js +1 -0
  19. package/{eds-card-section.entry-DU-1TB0I.js → eds-card-section.entry-0n2V-MH6.js} +1 -1
  20. package/{eds-card-section.entry-Dxk-Ob_Y.mjs → eds-card-section.entry-Ccjil38X.mjs} +4 -4
  21. package/eds-card-tags.entry-C6jjLiGA.mjs +13 -0
  22. package/{eds-card-tags.entry-YPPBWdFq.js → eds-card-tags.entry-CQS5AtAg.js} +1 -1
  23. package/{eds-card-tool.entry-1_RNWh8n.mjs → eds-card-tool.entry-Bi8w0xds.mjs} +7 -7
  24. package/eds-card-tool.entry-DJA23zJf.js +1 -0
  25. package/{eds-card-wrapper.entry-BfCDGeFs.js → eds-card-wrapper.entry-BKPCc7ci.js} +1 -1
  26. package/{eds-card-wrapper.entry-C4pNRjIj.mjs → eds-card-wrapper.entry-UPnkq2JI.mjs} +4 -4
  27. package/{eds-code-block.entry-B2xATQ7r.mjs → eds-code-block.entry-BZTLGjqq.mjs} +47 -47
  28. package/{eds-code-block.entry-DQEDpAjn.js → eds-code-block.entry-Ckb3jisn.js} +3 -3
  29. package/{eds-components-section.entry-D08woahG.js → eds-components-section.entry-B3WrdIfL.js} +45 -36
  30. package/{eds-components-section.entry-DR-984-3.mjs → eds-components-section.entry-D1ovrn93.mjs} +56 -37
  31. package/{eds-docs-palettes.entry-qKOj3XU9.js → eds-docs-palettes.entry-Bk77Xn04.js} +1 -1
  32. package/{eds-docs-palettes.entry-B0yU2ZpL.mjs → eds-docs-palettes.entry-lpT0ypSs.mjs} +2 -2
  33. package/{eds-docs-tokens.entry-BVHiM7cK.mjs → eds-docs-tokens.entry-Bi35zxEM.mjs} +2 -2
  34. package/{eds-docs-tokens.entry-BtRXzjrp.js → eds-docs-tokens.entry-DCHw-jrS.js} +1 -1
  35. package/eds-dropdown_2.entry-Bamjbo1o.mjs +115 -0
  36. package/eds-dropdown_2.entry-YEBzyKJu.js +1 -0
  37. package/eds-form.entry-a52cYx3b.js +7153 -0
  38. package/eds-form.entry-xm937wbh.mjs +7340 -0
  39. package/eds-frame.entry-BnT9nQwa.js +1 -0
  40. package/eds-frame.entry-CU7GoLj6.mjs +74 -0
  41. package/eds-icon-arrow-diagonal.entry-fzsCJiPP.js +1 -0
  42. package/eds-icon-arrow-diagonal.entry-kClkB8LF.mjs +13 -0
  43. package/eds-icon-arrow-right.entry-B75Ra6OD.js +1 -0
  44. package/eds-icon-arrow-right.entry-DX6A-VKL.mjs +13 -0
  45. package/{eds-icon-bluesky.entry-Dppj9cuC.js → eds-icon-bluesky.entry-7tzCZSoL.js} +1 -1
  46. package/eds-icon-bluesky.entry-BNSdVu2K.mjs +13 -0
  47. package/eds-icon-chevron-down.entry-BLvZ3e_N.mjs +13 -0
  48. package/{eds-icon-chevron-down.entry-CidjiGQS.js → eds-icon-chevron-down.entry-BUG6E9eR.js} +1 -1
  49. package/eds-icon-chevron-left.entry-BT-KYjSo.js +1 -0
  50. package/eds-icon-chevron-left.entry-Vq-R3b59.mjs +13 -0
  51. package/{eds-icon-chevron-right.entry-iy6d6tux.mjs → eds-icon-chevron-right.entry-B1qzmGrD.mjs} +2 -2
  52. package/eds-icon-chevron-right.entry-BmU_I0Y1.js +1 -0
  53. package/eds-icon-chevron-up.entry-DXXRgw1V.js +1 -0
  54. package/eds-icon-chevron-up.entry-DuySJU_i.mjs +13 -0
  55. package/eds-icon-close.entry-DDxUAr21.mjs +13 -0
  56. package/{eds-icon-close.entry-CE-Nory7.js → eds-icon-close.entry-DS7BLTzl.js} +1 -1
  57. package/eds-icon-copy.entry-DNa1wI4F.mjs +13 -0
  58. package/{eds-icon-copy.entry-Bpe3I5b6.js → eds-icon-copy.entry-Nz_P5A7p.js} +1 -1
  59. package/eds-icon-eu.entry-CLQcoimB.js +1 -0
  60. package/eds-icon-eu.entry-DTdf6Skc.mjs +13 -0
  61. package/eds-icon-facebook.entry-B9szoikj.mjs +13 -0
  62. package/eds-icon-facebook.entry-knUdck2t.js +1 -0
  63. package/eds-icon-gitlab.entry-IO7f4hgL.mjs +13 -0
  64. package/eds-icon-gitlab.entry-pKxaKA0B.js +1 -0
  65. package/{eds-icon-linkedin.entry-CstoPbTS.js → eds-icon-linkedin.entry-BD__kbDV.js} +1 -1
  66. package/eds-icon-linkedin.entry-CryUW1Er.mjs +13 -0
  67. package/{eds-icon-loader.entry-CaGFh0gM.js → eds-icon-loader.entry-B_3Sd6PB.js} +1 -1
  68. package/eds-icon-loader.entry-CxizdRT8.mjs +13 -0
  69. package/eds-icon-mastodon.entry-7152lwgd.js +1 -0
  70. package/eds-icon-mastodon.entry-MyM74vvm.mjs +13 -0
  71. package/eds-icon-menu.entry-5RRmRTxa.mjs +13 -0
  72. package/eds-icon-menu.entry-BVU8htgo.js +1 -0
  73. package/eds-icon-more.entry-KE6_EsAg.mjs +13 -0
  74. package/{eds-icon-more.entry-68jT9AEw.js → eds-icon-more.entry-lossstHZ.js} +1 -1
  75. package/eds-icon-search.entry-Dg0wabdP.mjs +13 -0
  76. package/eds-icon-search.entry-DiYaxnYX.js +1 -0
  77. package/{eds-icon-success.entry-CACuZjP6.js → eds-icon-success.entry-CRu9Ssdi.js} +1 -1
  78. package/eds-icon-success.entry-_fWfddhX.mjs +13 -0
  79. package/eds-icon-twitter.entry-B4xPE3Vz.js +1 -0
  80. package/eds-icon-twitter.entry-DHFpeStb.mjs +13 -0
  81. package/eds-icon-user.entry-BOv2lInW.mjs +13 -0
  82. package/eds-icon-user.entry-DkRLDrdp.js +1 -0
  83. package/eds-icon-youtube.entry-CRRGbDsw.mjs +13 -0
  84. package/eds-icon-youtube.entry-DL5fWU8k.js +1 -0
  85. package/eds-input_7.entry-BZ9afXqe.js +7167 -0
  86. package/eds-input_7.entry-WvoE_Mue.mjs +7373 -0
  87. package/eds-login.entry-BRWK6otG.js +1 -0
  88. package/eds-login.entry-C0eOhlEq.mjs +58 -0
  89. package/{eds-logo-variations.entry-CUD-M_Fd.js → eds-logo-variations.entry-BnB25dDH.js} +1 -1
  90. package/eds-logo-variations.entry-Cw44vuQE.mjs +22 -0
  91. package/eds-matomo-notice.entry-BpwE1vQ3.js +1 -0
  92. package/{eds-matomo-notice.entry-kSuLDx9K.mjs → eds-matomo-notice.entry-DsLbzeqQ.mjs} +2 -2
  93. package/eds-modal.entry-B9gXEOjT.js +1 -0
  94. package/eds-modal.entry-CCy9SRVR.mjs +84 -0
  95. package/{eds-navigator.entry-BJTqtqld.js → eds-navigator.entry-B9scz8p_.js} +1 -1
  96. package/{eds-navigator.entry-DdzcXSRW.mjs → eds-navigator.entry-Dk-4UW_d.mjs} +2 -2
  97. package/eds-pagination_2.entry-D_sngThL.js +1 -0
  98. package/{eds-pagination_2.entry-B5PLo2Uu.mjs → eds-pagination_2.entry-M3CLFGN_.mjs} +9 -9
  99. package/{eds-progress-bar.entry-DdqH0plT.mjs → eds-progress-bar.entry-BtI2_94Z.mjs} +5 -5
  100. package/{eds-progress-bar.entry-BBFsASiy.js → eds-progress-bar.entry-D56TNSGj.js} +1 -1
  101. package/{eds-section-core_2.entry-D_nLUa29.js → eds-section-core_2.entry-BmbK_RfT.js} +1 -1
  102. package/{eds-section-core_2.entry-D3HYngR_.mjs → eds-section-core_2.entry-pmUkAIz7.mjs} +6 -6
  103. package/{eds-svg-repository.entry-C-kayEdW.mjs → eds-svg-repository.entry-B3xCCFOp.mjs} +2 -2
  104. package/{eds-svg-repository.entry-in72TP_1.js → eds-svg-repository.entry-DZ1FMRrQ.js} +2 -2
  105. package/{eds-tab.entry-BKYSiEkl.mjs → eds-tab.entry-Bpv6R_M0.mjs} +2 -2
  106. package/{eds-tab.entry-BUzZWKac.js → eds-tab.entry-DjpVgaDN.js} +1 -1
  107. package/eds-tabs-content.entry-Bj5wNmkr.js +1 -0
  108. package/{eds-tabs-content.entry-3cyCQAth.mjs → eds-tabs-content.entry-CzwoLZzR.mjs} +4 -4
  109. package/{eds-tabs.entry-B8q09in2.mjs → eds-tabs.entry-BYBPkYRs.mjs} +5 -5
  110. package/eds-tabs.entry-Cbc9yhHL.js +1 -0
  111. package/{eds-timeline.entry-DEcov8mq.js → eds-timeline.entry-Bq-eo4Og.js} +1 -1
  112. package/{eds-timeline.entry-DhHSQScv.mjs → eds-timeline.entry-DJYcN7rN.mjs} +2 -2
  113. package/{eds-tooltip.entry-BTunlfGS.mjs → eds-tooltip.entry-CTCdKTKM.mjs} +3 -3
  114. package/eds-tooltip.entry-eiFlYpfl.js +1 -0
  115. package/{eds-trl.entry-Bt28XH55.mjs → eds-trl.entry-8BXrp9SK.mjs} +8 -8
  116. package/{eds-trl.entry-BHrlC_5O.js → eds-trl.entry-DtffM-e5.js} +1 -1
  117. package/eds-user.entry-DfBE6LuF.js +1 -0
  118. package/eds-user.entry-ybggwcts.mjs +66 -0
  119. package/eds-vertical-stepper.entry-DpcwvOst.mjs +27 -0
  120. package/eds-vertical-stepper.entry-O_GJNo8B.js +1 -0
  121. package/generated/components.d.ts +3 -0
  122. package/incorrect-use-of-colors.entry-CDHLoNBa.js +1 -0
  123. package/incorrect-use-of-colors.entry-DbwiJCH0.mjs +42 -0
  124. package/{index-I5Asbjce.mjs → index-C-Gy1Lax.mjs} +555 -497
  125. package/index-D_kZU_4I.js +21 -0
  126. package/index.js +1 -1
  127. package/index.mjs +30 -27
  128. package/{keycloak-13893af6-BLzE1H6E.mjs → keycloak-d502ec16-Ce0iGqyk.mjs} +259 -247
  129. package/keycloak-d502ec16-m7LwS-Gh.js +9 -0
  130. package/{logo-space.entry-DsM5jXgX.js → logo-space.entry-D56IaLNE.js} +1 -1
  131. package/{logo-space.entry-GnVq-srD.mjs → logo-space.entry-DERJLkyL.mjs} +7 -7
  132. package/logo-variations-horizontal_2.entry-OY3Zka_7.js +7 -0
  133. package/logo-variations-horizontal_2.entry-wp9D1MMl.mjs +29 -0
  134. package/logo-wrong-usage.entry-BniBpQrN.js +1 -0
  135. package/logo-wrong-usage.entry-RgKFDObE.mjs +14 -0
  136. package/package.json +1 -1
  137. package/{token-list_3.entry-DaIOT7_R.js → token-list_3.entry-C0Tohj1W.js} +1 -1
  138. package/{token-list_3.entry-CReCwFzO.mjs → token-list_3.entry-Zgzwbhio.mjs} +4 -4
  139. package/{token-ratios.entry-Dh8kvz8R.mjs → token-ratios.entry-B7ZwRluK.mjs} +2 -2
  140. package/token-ratios.entry-bO5CkZ9D.js +1 -0
  141. package/token-spacing.entry-BTYazF9c.js +1 -0
  142. package/token-spacing.entry-_yyMlwbO.mjs +12 -0
  143. package/{token-typography.entry-DG-4k5gY.js → token-typography.entry-D-PPtDvs.js} +1 -1
  144. package/{token-typography.entry-CIETKadf.mjs → token-typography.entry-D4bxbB2m.mjs} +2 -2
  145. package/color-bb472c37-CKu54kOY.js +0 -1
  146. package/color-bb472c37-DDERsxdk.mjs +0 -207
  147. package/color-primary-palette_6.entry-BB6740d4.js +0 -1
  148. package/correct-use-of-colors.entry-LuyuqIQ9.js +0 -1
  149. package/correct-use-of-colors.entry-hvZ1z3tc.mjs +0 -59
  150. package/eds-accordion_33.entry-DFgdjlJE.mjs +0 -31360
  151. package/eds-accordion_33.entry-DlnbmQ6R.js +0 -29468
  152. package/eds-card-project.entry-BQ-dH8vM.js +0 -1
  153. package/eds-card-tags.entry-CIu6lD0P.mjs +0 -13
  154. package/eds-card-tool.entry-DgBqQucY.js +0 -1
  155. package/eds-icon-arrow-diagonal.entry-DjDB--sU.js +0 -1
  156. package/eds-icon-arrow-diagonal.entry-E5xC3m8H.mjs +0 -13
  157. package/eds-icon-arrow-right.entry-DaXIkUew.mjs +0 -13
  158. package/eds-icon-arrow-right.entry-odZ8U-W2.js +0 -1
  159. package/eds-icon-bluesky.entry-B3yW2mUC.mjs +0 -13
  160. package/eds-icon-chevron-down.entry-xWODzTE-.mjs +0 -13
  161. package/eds-icon-chevron-left.entry-CJyHE01I.mjs +0 -13
  162. package/eds-icon-chevron-left.entry-DjJj-hmG.js +0 -1
  163. package/eds-icon-chevron-right.entry-D8RyOADq.js +0 -1
  164. package/eds-icon-chevron-up.entry-TKCdY_T3.mjs +0 -13
  165. package/eds-icon-chevron-up.entry-ezV-v92v.js +0 -1
  166. package/eds-icon-close.entry-Brv3Uxu1.mjs +0 -13
  167. package/eds-icon-copy.entry-DQioS3t7.mjs +0 -13
  168. package/eds-icon-eu.entry-BzmYOiKL.js +0 -1
  169. package/eds-icon-eu.entry-KylDo55P.mjs +0 -13
  170. package/eds-icon-facebook.entry-DWZ02rD5.js +0 -1
  171. package/eds-icon-facebook.entry-DpS2m4v2.mjs +0 -13
  172. package/eds-icon-gitlab.entry-D8PM12SK.js +0 -1
  173. package/eds-icon-gitlab.entry-JX-5azIw.mjs +0 -13
  174. package/eds-icon-linkedin.entry-BylIVu8G.mjs +0 -13
  175. package/eds-icon-loader.entry-DZyUa8Na.mjs +0 -13
  176. package/eds-icon-mastodon.entry-BIckHn_q.mjs +0 -13
  177. package/eds-icon-mastodon.entry-DxNG__-Y.js +0 -1
  178. package/eds-icon-menu.entry-C9N6s8Oa.mjs +0 -13
  179. package/eds-icon-menu.entry-DwN-ZAWi.js +0 -1
  180. package/eds-icon-more.entry-MUkUL_e2.mjs +0 -13
  181. package/eds-icon-search.entry-CcwwFnns.mjs +0 -13
  182. package/eds-icon-search.entry-CrfMqbyi.js +0 -1
  183. package/eds-icon-success.entry-BUzsze9h.mjs +0 -13
  184. package/eds-icon-twitter.entry-B1Iw69NW.mjs +0 -13
  185. package/eds-icon-twitter.entry-BbStwaGv.js +0 -1
  186. package/eds-icon-user.entry-CNo6pger.mjs +0 -13
  187. package/eds-icon-user.entry-vYVsxfK7.js +0 -1
  188. package/eds-icon-youtube.entry-CBU7Dvkh.mjs +0 -13
  189. package/eds-icon-youtube.entry-CmCAFp7D.js +0 -1
  190. package/eds-login.entry-Bfztcsrc.js +0 -1
  191. package/eds-login.entry-XqWPWCDL.mjs +0 -46
  192. package/eds-logo-variations.entry-Cy_fbJLx.mjs +0 -22
  193. package/eds-matomo-notice.entry-CytVSgYS.js +0 -1
  194. package/eds-pagination_2.entry-DUsG8tcv.js +0 -1
  195. package/eds-rating.entry-CErokyKU.mjs +0 -38
  196. package/eds-rating.entry-p9oWKCkQ.js +0 -1
  197. package/eds-tabs-content.entry-Cg7U8c5D.js +0 -1
  198. package/eds-tabs.entry-DS6qBEo7.js +0 -1
  199. package/eds-tooltip.entry-sjwuhdKF.js +0 -1
  200. package/incorrect-use-of-colors.entry-DkY89xG1.mjs +0 -42
  201. package/incorrect-use-of-colors.entry-e4VhTVHS.js +0 -1
  202. package/index-D2H_BflF.js +0 -21
  203. package/keycloak-13893af6-NiM3zoVg.js +0 -9
  204. package/logo-variations-horizontal_2.entry-BeQ_r9Li.js +0 -7
  205. package/logo-variations-horizontal_2.entry-CC7tj8Hr.mjs +0 -29
  206. package/logo-wrong-usage.entry-Ct1Ae63m.mjs +0 -14
  207. package/logo-wrong-usage.entry-DkqcMaqp.js +0 -1
  208. package/token-ratios.entry-aBiRsmfr.js +0 -1
  209. package/token-spacing.entry-C5HX4qPq.mjs +0 -12
  210. package/token-spacing.entry-DDiMRsNO.js +0 -1
@@ -1,16 +1,21 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D2H_BflF.js"),t=()=>e.h("div",{class:"static-content container"},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'>
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D_kZU_4I.js"),t=()=>e.h("div",{class:"static-content container"},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'>
2
2
  import { defineCustomElements } from 'https://unpkg.com/@ebrains/components@latest/loader/index.js';
3
3
  // Define custom elements
4
4
  defineCustomElements(window);
5
5
  <\/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@latest/styles/output.css"/>',language:"css","copy-label":"Copy Code"}),e.h("div",{class:"my-4"},e.h("eds-alert",{message:"Note that, loading the predefined CSS framework above, automatically loads the fonts so you can skip loading them separately.",intent:"warning"})),e.h("h2",null,"Load the fonts"),e.h("p",null,"To load the webfonts, 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/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
6
6
  label="my bytton"
7
7
  intent="primary">
8
- </eds-button>`,language:"html","copy-label":"Copy Code"})),a=()=>e.h("div",null,e.h("p",null,"Before proceeding, ensure that Node.js is installed on your machine—you can download the latest version from the official website. If your project doesn’t 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."),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/components",language:"html","copy-label":"Copy Code"})),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/assets",language:"html","copy-label":"Copy Code"})),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/react",language:"html","copy-label":"Copy Code"}))),s=()=>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("div",{class:"my-8"},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:`
9
- import { EdsHeader } from "@ebrains/react";
8
+ </eds-button>`,language:"html","copy-label":"Copy Code"})),a=()=>e.h("div",null,e.h("p",null,"Before proceeding, ensure that Node.js is installed on your machine—you can download the latest version from the official website. If your project doesn’t 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."),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/components",language:"html","copy-label":"Copy Code"})),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/assets",language:"html","copy-label":"Copy Code"})),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/react",language:"html","copy-label":"Copy Code"})),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/vue",language:"html","copy-label":"Copy Code"})),e.h("div",{class:"my-8"},e.h("eds-code-block",{code:"npm install @ebrains/angular",language:"html","copy-label":"Copy Code"}))),s=()=>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("div",{class:"my-8"},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:`
9
+ import {
10
+ EdsHeader,
11
+ EdsFullscreenMenu,
12
+ EdsUser
13
+ } from "@ebrains/react";
10
14
 
11
15
  interface User {
12
16
  firstname: string;
13
17
  lastname: string;
18
+ // Add any other properties your user object might have
14
19
  }
15
20
 
16
21
  interface AuthStatus {
@@ -21,73 +26,77 @@ interface AuthStatus {
21
26
  import { useEffect, useState } from "react";
22
27
 
23
28
  export function App() {
24
-
25
29
  const [authStatus, setAuthStatus] = useState<AuthStatus>({
26
30
  authenticated: false,
27
31
  user: null,
28
32
  });
29
-
30
33
  const [activeTabIndex, setActiveTabIndex] = useState<number>(0);
31
34
 
32
35
  // Use useEffect to render Stencil components dynamically after the component mounts
33
36
  useEffect(() => {
34
-
35
37
  const handleAuthStatusChange = (event: CustomEvent) => {
36
38
  console.log(event.detail);
37
39
  setAuthStatus(event.detail); // Set the entire object
38
40
  };
39
41
 
40
- const handleTabChange = (
41
- event: CustomEvent<{ index: number; name: string }>,
42
- ) => {
43
- console.log(event.detail);
44
- setActiveTabIndex(event.detail.index);
45
- };
46
-
47
42
  document.addEventListener(
48
43
  "authStatusChanged",
49
44
  handleAuthStatusChange as EventListener,
50
45
  );
51
- document.addEventListener("tabChange", handleTabChange as EventListener);
52
46
 
53
47
  return () => {
54
48
  document.removeEventListener(
55
49
  "authStatusChanged",
56
50
  handleAuthStatusChange as EventListener,
57
51
  );
58
- document.removeEventListener(
59
- "tabChange",
60
- handleTabChange as EventListener,
61
- );
62
52
  };
63
- }, []); // Empty dependency array ensures this runs only once after mounting
53
+ }, []);
64
54
 
65
55
  return (
66
- <div id="main">
56
+ <div>
67
57
  <EdsHeader
68
- home-url="/"
69
- user-feature={false}
70
- keycloak-url="http://localhost:8080"
71
- keycloak-realm="nigeor-realm"
72
- keycloak-client-id="stencil-app"
73
- links="[
74
- { "label": "About", "url": "/about" },
75
- { "label": "Focus Areas", "url": "/focus-areas" },
76
- { "label": "News & Events", "url": "/news-and-events" },
77
- { "label": "Contact", "url": "/contact" }
78
- ]"
79
- ></EdsHeader>
58
+ homeUrl="/"
59
+ menuEnabled={true}
60
+ inverseHeader={false}
61
+ links={[
62
+ { label: "About", url: "#" },
63
+ { label: "Focus Areas", url: "#" },
64
+ { label: "News & Events", url: "#" },
65
+ { label: "Contact", url: "#" }
66
+ ]}
67
+ >
68
+ <div className="px-16">
69
+ <EdsUser
70
+ keycloak-url="http://localhost:8080"
71
+ keycloak-realm="nigeor-realm"
72
+ keycloak-client-id="stencil-app"
73
+ ></EdsUser>
74
+ </div>
75
+ </EdsHeader>
80
76
 
81
- <div>
82
- User is{" "} {authStatus.authenticated ? "authenticated" : "not authenticated"}
77
+ <EdsFullscreenMenu
78
+ home-url="/"
79
+ links={[
80
+ { label: "About", url: "#" },
81
+ { label: "Focus Areas", url: "#" },
82
+ { label: "News & Events", url: "#" },
83
+ { label: "Contact", url: "#" }
84
+ ]}
85
+ ></EdsFullscreenMenu>
86
+
87
+ <div>
88
+ User is{" "}
89
+ {authStatus.authenticated ? "authenticated" : "not authenticated"}
83
90
  </div>
84
91
  {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}
85
- </div>
92
+
93
+ <div id="main"></div>
86
94
  </div>
87
95
  );
88
96
  }
89
97
 
90
98
  export default App;
99
+
91
100
  `,language:"javascript","copy-label":"Copy Code"}))),o=()=>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("p",null,"Simply install the latest version of our NPM package."),e.h("eds-code-block",{code:"npm install @ebrains/vue",language:"javascript","copy-label":"Copy Code"}),e.h("p",null,'Our NPM package already includes the custom elements definitions. However, you can use the components as they are by simply importing and executing the initialization command in your "main.ts" file.'),e.h("eds-code-block",{code:`import { defineCustomElements } from '@ebrains/components/loader';
92
101
  defineCustomElements();`,language:"javascript","copy-label":"Copy Code"}),e.h("h2",null,"Passing Properties to Custom Elements Using the ",e.h("b",null,".prop")," Modifier in Vue Wrappers"),e.h("p",null,"When using Vue wrappers for Stencil components (or any custom elements), you might encounter issues with property names being altered due to HTML’s attribute handling. By default, Vue binds values as HTML attributes, and HTML attributes are case-insensitive. This means that camelCase property names can be transformed into lowercase strings, which can prevent your component from receiving the correct data."),e.h("h3",null,"How to Use the ",e.h("b",null,".prop")," Modifier"),e.h("p",null,"When using Vue wrappers, you can pass properties with the .prop modifier by adding it to your binding expression. Here’s an example of how to do it:"),e.h("div",{class:"mt-8"},e.h("eds-alert",{message:"This may lead to issues because Vue binds these as attributes .",intent:"error"})),e.h("eds-code-block",{code:`<EdsAlert
93
102
  message="This is a default informational alert."
@@ -129,4 +138,4 @@ defineCustomElements();`,language:"javascript","copy-label":"Copy Code"}),e.h("p
129
138
  ]">
130
139
  </eds-breadcrumb>
131
140
  <eds-footer></eds-footer>
132
- </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);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"ce34514ab73daa5baa011bda56a13d6197f8bfd0",class:"container"},this.renderContent())}};exports.eds_components_section=r;
141
+ </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);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"7e582a0eeafc2687229454532b5a7f66f91c1856",class:"container"},this.renderContent())}};exports.eds_components_section=r;
@@ -1,4 +1,4 @@
1
- import { r as t, h as e } from "./index-I5Asbjce.mjs";
1
+ import { r as t, h as e } from "./index-C-Gy1Lax.mjs";
2
2
  const a = () => e(
3
3
  "div",
4
4
  { class: "static-content container" },
@@ -62,6 +62,16 @@ const a = () => e(
62
62
  "div",
63
63
  { class: "my-8" },
64
64
  e("eds-code-block", { code: "npm install @ebrains/react", language: "html", "copy-label": "Copy Code" })
65
+ ),
66
+ e(
67
+ "div",
68
+ { class: "my-8" },
69
+ e("eds-code-block", { code: "npm install @ebrains/vue", language: "html", "copy-label": "Copy Code" })
70
+ ),
71
+ e(
72
+ "div",
73
+ { class: "my-8" },
74
+ e("eds-code-block", { code: "npm install @ebrains/angular", language: "html", "copy-label": "Copy Code" })
65
75
  )
66
76
  ), o = () => e(
67
77
  "div",
@@ -77,11 +87,16 @@ const a = () => e(
77
87
  "eds-section-core",
78
88
  { "section-title": "Example React App", "heading-level": "h3" },
79
89
  e("eds-code-block", { code: `
80
- import { EdsHeader } from "@ebrains/react";
90
+ import {
91
+ EdsHeader,
92
+ EdsFullscreenMenu,
93
+ EdsUser
94
+ } from "@ebrains/react";
81
95
 
82
96
  interface User {
83
97
  firstname: string;
84
98
  lastname: string;
99
+ // Add any other properties your user object might have
85
100
  }
86
101
 
87
102
  interface AuthStatus {
@@ -92,73 +107,77 @@ interface AuthStatus {
92
107
  import { useEffect, useState } from "react";
93
108
 
94
109
  export function App() {
95
-
96
110
  const [authStatus, setAuthStatus] = useState<AuthStatus>({
97
111
  authenticated: false,
98
112
  user: null,
99
113
  });
100
-
101
114
  const [activeTabIndex, setActiveTabIndex] = useState<number>(0);
102
115
 
103
116
  // Use useEffect to render Stencil components dynamically after the component mounts
104
117
  useEffect(() => {
105
-
106
118
  const handleAuthStatusChange = (event: CustomEvent) => {
107
119
  console.log(event.detail);
108
120
  setAuthStatus(event.detail); // Set the entire object
109
121
  };
110
122
 
111
- const handleTabChange = (
112
- event: CustomEvent<{ index: number; name: string }>,
113
- ) => {
114
- console.log(event.detail);
115
- setActiveTabIndex(event.detail.index);
116
- };
117
-
118
123
  document.addEventListener(
119
124
  "authStatusChanged",
120
125
  handleAuthStatusChange as EventListener,
121
126
  );
122
- document.addEventListener("tabChange", handleTabChange as EventListener);
123
127
 
124
128
  return () => {
125
129
  document.removeEventListener(
126
130
  "authStatusChanged",
127
131
  handleAuthStatusChange as EventListener,
128
132
  );
129
- document.removeEventListener(
130
- "tabChange",
131
- handleTabChange as EventListener,
132
- );
133
133
  };
134
- }, []); // Empty dependency array ensures this runs only once after mounting
134
+ }, []);
135
135
 
136
136
  return (
137
- <div id="main">
137
+ <div>
138
138
  <EdsHeader
139
- home-url="/"
140
- user-feature={false}
141
- keycloak-url="http://localhost:8080"
142
- keycloak-realm="nigeor-realm"
143
- keycloak-client-id="stencil-app"
144
- links="[
145
- { "label": "About", "url": "/about" },
146
- { "label": "Focus Areas", "url": "/focus-areas" },
147
- { "label": "News & Events", "url": "/news-and-events" },
148
- { "label": "Contact", "url": "/contact" }
149
- ]"
150
- ></EdsHeader>
139
+ homeUrl="/"
140
+ menuEnabled={true}
141
+ inverseHeader={false}
142
+ links={[
143
+ { label: "About", url: "#" },
144
+ { label: "Focus Areas", url: "#" },
145
+ { label: "News & Events", url: "#" },
146
+ { label: "Contact", url: "#" }
147
+ ]}
148
+ >
149
+ <div className="px-16">
150
+ <EdsUser
151
+ keycloak-url="http://localhost:8080"
152
+ keycloak-realm="nigeor-realm"
153
+ keycloak-client-id="stencil-app"
154
+ ></EdsUser>
155
+ </div>
156
+ </EdsHeader>
151
157
 
152
- <div>
153
- User is{" "} {authStatus.authenticated ? "authenticated" : "not authenticated"}
158
+ <EdsFullscreenMenu
159
+ home-url="/"
160
+ links={[
161
+ { label: "About", url: "#" },
162
+ { label: "Focus Areas", url: "#" },
163
+ { label: "News & Events", url: "#" },
164
+ { label: "Contact", url: "#" }
165
+ ]}
166
+ ></EdsFullscreenMenu>
167
+
168
+ <div>
169
+ User is{" "}
170
+ {authStatus.authenticated ? "authenticated" : "not authenticated"}
154
171
  </div>
155
172
  {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}
156
- </div>
173
+
174
+ <div id="main"></div>
157
175
  </div>
158
176
  );
159
177
  }
160
178
 
161
179
  export default App;
180
+
162
181
  `, language: "javascript", "copy-label": "Copy Code" })
163
182
  )
164
183
  ), l = () => e(
@@ -266,7 +285,7 @@ defineCustomElements();`, language: "javascript", "copy-label": "Copy Code" }),
266
285
  <eds-footer></eds-footer>
267
286
  </div>`, language: "javascript", "copy-label": "Copy Code" })
268
287
  )
269
- ), d = class {
288
+ ), c = class {
270
289
  constructor(n) {
271
290
  t(this, n), this.tabIndex = void 0;
272
291
  }
@@ -287,9 +306,9 @@ defineCustomElements();`, language: "javascript", "copy-label": "Copy Code" }),
287
306
  }
288
307
  }
289
308
  render() {
290
- return e("div", { key: "ce34514ab73daa5baa011bda56a13d6197f8bfd0", class: "container" }, this.renderContent());
309
+ return e("div", { key: "7e582a0eeafc2687229454532b5a7f66f91c1856", class: "container" }, this.renderContent());
291
310
  }
292
311
  };
293
312
  export {
294
- d as eds_components_section
313
+ c as eds_components_section
295
314
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D2H_BflF.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:"42f0a4598c64661d98054522e88366ec591a2cb3",class:"container"},this.renderContent())}};exports.eds_docs_palettes=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D_kZU_4I.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:"e8cd71caa7b23cc4dc28c694ecb9f13e3fd4170a",class:"container"},this.renderContent())}};exports.eds_docs_palettes=l;
@@ -1,4 +1,4 @@
1
- import { r as l, h as e } from "./index-I5Asbjce.mjs";
1
+ import { r as l, h as e } from "./index-C-Gy1Lax.mjs";
2
2
  const r = class {
3
3
  constructor(t) {
4
4
  l(this, t), this.tabIndex = void 0;
@@ -14,7 +14,7 @@ const r = class {
14
14
  }
15
15
  }
16
16
  render() {
17
- return e("div", { key: "42f0a4598c64661d98054522e88366ec591a2cb3", class: "container" }, this.renderContent());
17
+ return e("div", { key: "e8cd71caa7b23cc4dc28c694ecb9f13e3fd4170a", class: "container" }, this.renderContent());
18
18
  }
19
19
  };
20
20
  export {
@@ -1,4 +1,4 @@
1
- import { r as n, h as e } from "./index-I5Asbjce.mjs";
1
+ import { r as n, h as e } from "./index-C-Gy1Lax.mjs";
2
2
  const r = class {
3
3
  constructor(t) {
4
4
  n(this, t), this.tabIndex = void 0;
@@ -22,7 +22,7 @@ const r = class {
22
22
  }
23
23
  }
24
24
  render() {
25
- return e("div", { key: "10708d591c4077e4e1fe94073322f01121253bdb", class: "container" }, this.renderContent());
25
+ return e("div", { key: "b140f7650e5e01711dc0778b04af83f9d004efc7", class: "container" }, this.renderContent());
26
26
  }
27
27
  };
28
28
  export {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D2H_BflF.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:"10708d591c4077e4e1fe94073322f01121253bdb",class:"container"},this.renderContent())}};exports.eds_docs_tokens=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D_kZU_4I.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:"b140f7650e5e01711dc0778b04af83f9d004efc7",class:"container"},this.renderContent())}};exports.eds_docs_tokens=n;
@@ -0,0 +1,115 @@
1
+ import { r as l, h as s, g as n } from "./index-C-Gy1Lax.mjs";
2
+ import { s as f } from "./analytics-1cde8e4a-BDRcCMlV.mjs";
3
+ const c = ".z-focus{z-index:99}.relative{position:relative}.shadow-small{--tw-shadow:0px 1.5px 2px rgba(0, 0, 0, 0.1);--tw-shadow-colored:0px 1.5px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-inverse{background-color:var(--white)}.border-softest{border:2px solid rgba(0, 0, 0, .05)}.z-10{z-index:10}.z-on-top{z-index:99999}.absolute{position:absolute}.top-full{top:100%}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.gap-y-4{row-gap:0.25rem}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.left-0{left:0rem}.left-1\\/2{left:50%}.left-4{left:0.25rem}.left-\\[4px\\]{left:4px}.right-0{right:0rem}.right-4{right:0.25rem}.right-8{right:0.5rem}", h = c, p = class {
4
+ constructor(e) {
5
+ l(this, e), this.focusableItems = [], this.handleClick = () => {
6
+ var t;
7
+ this.isOpen = !this.isOpen, this.isOpen ? (this.focusIndex = 0, this.focusItem()) : this.closeDropdown(), f({
8
+ category: "ui-component",
9
+ parentContext: null,
10
+ tag: this.host.tagName.toLowerCase(),
11
+ name: ((t = this.label) === null || t === void 0 ? void 0 : t.toLowerCase()) || "",
12
+ action: this.isOpen ? "expanded" : "collapsed"
13
+ });
14
+ }, this.icon = "chevron-down", this.label = void 0, this.rounded = !1, this.ariaLabel = "Open dropdown", this.asNav = !0, this.dropdownPos = "left", this.dropdownOffset = !0, this.intent = "tertiary", this.isOpen = !1, this.focusIndex = -1;
15
+ }
16
+ /**
17
+ * Closes the dropdown when a click occurs outside of it.
18
+ * @param {Event} e - The click event.
19
+ */
20
+ handleWindowClick(e) {
21
+ this.host.contains(e.target) || this.closeDropdown();
22
+ }
23
+ /**
24
+ * Handles keyboard navigation and accessibility within the dropdown.
25
+ * @param {KeyboardEvent} event - The keyboard event.
26
+ */
27
+ handleKeyDown(e) {
28
+ if (this.isOpen)
29
+ switch (e.key) {
30
+ case "Tab":
31
+ this.closeDropdown();
32
+ break;
33
+ case "ArrowUp":
34
+ e.preventDefault(), this.focusIndex = (this.focusIndex - 1 + this.focusableItems.length) % this.focusableItems.length, this.focusItem();
35
+ break;
36
+ case "ArrowDown":
37
+ e.preventDefault(), this.focusIndex = (this.focusIndex + 1) % this.focusableItems.length, this.focusItem();
38
+ break;
39
+ }
40
+ }
41
+ /**
42
+ * Closes the dropdown and resets focus.
43
+ */
44
+ closeDropdown() {
45
+ this.isOpen = !1, this.focusIndex = -1;
46
+ }
47
+ /**
48
+ * Sets focus on the currently selected item in the dropdown.
49
+ */
50
+ focusItem() {
51
+ var e;
52
+ (e = this.focusableItems[this.focusIndex]) === null || e === void 0 || e.focus();
53
+ }
54
+ /**
55
+ * Lifecycle method that runs after the component has been added to the DOM.
56
+ * Initializes focusable items within the dropdown.
57
+ */
58
+ componentDidLoad() {
59
+ var e;
60
+ this.focusableItems = Array.from(((e = this.dropdownContent) === null || e === void 0 ? void 0 : e.querySelectorAll("a, button")) || []);
61
+ }
62
+ /**
63
+ * Renders the dropdown component and displays its content when open.
64
+ * @returns {JSX.Element} The rendered dropdown component.
65
+ */
66
+ render() {
67
+ return s("div", { key: "84f4cea78ea1c40c7897a356fe03ac83922fccb8", class: "z-focus relative", ref: (e) => this.dropdownContent = e }, s("eds-button", { key: "99dc51632dc82830054502a2d6d77d9fcefe9337", label: this.label, "aria-label": this.ariaLabel, icon: this.icon, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu" }), s("nav", { key: "a63613a7ecf709fd1d22d77da4b2d286905fef3e", role: "menu", class: {
68
+ "shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8": !0,
69
+ "left-4": this.dropdownPos === "left" && this.dropdownOffset,
70
+ "left-0": this.dropdownPos === "left" && !this.dropdownOffset,
71
+ "right-4": this.dropdownPos === "right" && this.dropdownOffset,
72
+ "right-0": this.dropdownPos === "right" && !this.dropdownOffset,
73
+ "rounded-lg": this.rounded
74
+ }, style: { display: this.isOpen ? "block" : "none" }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, s("slot", { key: "dda70b865ed03dc7ad36a32934587bbcb0a16c1b" })));
75
+ }
76
+ get host() {
77
+ return n(this);
78
+ }
79
+ };
80
+ p.style = h;
81
+ const g = class {
82
+ constructor(e) {
83
+ l(this, e), this.user = void 0, this.links = void 0, this.onLogout = void 0, this.parsedUser = {}, this.parsedLinks = [];
84
+ }
85
+ parseUserProp(e) {
86
+ this.parsedUser = typeof e == "string" ? JSON.parse(e) : e;
87
+ }
88
+ parseLinksProp(e) {
89
+ this.parsedLinks = typeof e == "string" ? JSON.parse(e) : e;
90
+ }
91
+ componentWillLoad() {
92
+ this.parseUserProp(this.user), this.parseLinksProp(this.links);
93
+ }
94
+ get initials() {
95
+ var e, t, i, o, a, r, d;
96
+ return `${((t = (e = this.parsedUser) === null || e === void 0 ? void 0 : e.firstname) === null || t === void 0 ? void 0 : t.charAt(0)) || ""}${((o = (i = this.parsedUser) === null || i === void 0 ? void 0 : i.lastname) === null || o === void 0 ? void 0 : o.charAt(0)) || ""}`.toUpperCase() || ((d = (r = (a = this.parsedUser) === null || a === void 0 ? void 0 : a.fullname) === null || r === void 0 ? void 0 : r.charAt(0)) === null || d === void 0 ? void 0 : d.toUpperCase()) || "";
97
+ }
98
+ get hasLogout() {
99
+ return typeof this.onLogout == "function";
100
+ }
101
+ render() {
102
+ var e, t, i, o, a;
103
+ return s("div", { key: "4a80335b6a59b9653130ca75a6e42c04fce68f4f", class: "min-w-[280px] p-8" }, s("div", { key: "9c97f6be46216587692d4852174cecfaacb70593", class: "flex gap-x-16 pb-16 border-b-2 border-softer" }, s("eds-avatar", { key: "c778f6bdfb21068ca7c2deff6e298f61af6dbc67", "first-name": (e = this.parsedUser) === null || e === void 0 ? void 0 : e.firstname, "last-name": (t = this.parsedUser) === null || t === void 0 ? void 0 : t.lastname, initials: this.initials, color: "grey", rounded: !0, "initials-strong": !0 }), s("div", { key: "7f453546c9cc54597069abb3e4b50312fe7bf364", class: "max-w-full" }, ((i = this.parsedUser) === null || i === void 0 ? void 0 : i.fullname) && s("p", { key: "34e080ef159535820c09378701de0e6f4fd96009", class: "f-ui-01 text-default w-full text-ellipsis" }, this.parsedUser.fullname), ((o = this.parsedUser) === null || o === void 0 ? void 0 : o.username) && s("p", { key: "2f85764e7d015dc3f3b22ca8a07126f8f57216ef", class: "f-ui-03-light text-light mt-4" }, this.parsedUser.username), ((a = this.parsedUser) === null || a === void 0 ? void 0 : a.email) && s("p", { key: "002dec51e979c29f2343f55e004449e4cee4075c", class: "f-ui-03-light text-light mt-4" }, this.parsedUser.email))), s("div", { key: "740b78c504257fb755ba7ba04dd25f023d37ed33", class: "text-default mt-16 flex w-full flex-col gap-y-8" }, s("div", { key: "ac307937bdd3fc86cce502e5eeb3e922d931f418", class: "border-softer mb-10 border-b-2 pb-16" }, s("eds-link", { key: "bdd0f1ef62ac78ffb1b40ed6873475df360cec66", label: "My EBRAINS", "aria-label": "My EBRAINS", url: "https://www.ebrains.eu/dashboard", intent: "primary", "extra-class": "w-full", external: !0 })), s("eds-link", { key: 1, label: "Account Settings", url: "https://iam.ebrains.eu/auth/realms/hbp/account/", intent: "secondary", icon: "arrow-diagonal", external: !0, "extra-class": "w-full" }), this.hasLogout && s("eds-link", { key: "d73016ad71f3b356b7fb7d0a2a84124eabb05da5", label: "Sign out", intent: "tertiary", "extra-class": "w-full justify-center", onClick: () => this.onLogout && this.onLogout() })));
104
+ }
105
+ static get watchers() {
106
+ return {
107
+ user: ["parseUserProp"],
108
+ links: ["parseLinksProp"]
109
+ };
110
+ }
111
+ };
112
+ export {
113
+ p as eds_dropdown,
114
+ g as eds_user_modal
115
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-D_kZU_4I.js"),l=require("./analytics-1cde8e4a-B_MD-9qW.js"),h=".z-focus{z-index:99}.relative{position:relative}.shadow-small{--tw-shadow:0px 1.5px 2px rgba(0, 0, 0, 0.1);--tw-shadow-colored:0px 1.5px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-inverse{background-color:var(--white)}.border-softest{border:2px solid rgba(0, 0, 0, .05)}.z-10{z-index:10}.z-on-top{z-index:99999}.absolute{position:absolute}.top-full{top:100%}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.gap-y-4{row-gap:0.25rem}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.left-0{left:0rem}.left-1\\/2{left:50%}.left-4{left:0.25rem}.left-\\[4px\\]{left:4px}.right-0{right:0rem}.right-4{right:0.25rem}.right-8{right:0.5rem}",c=h,n=class{constructor(e){s.registerInstance(this,e),this.focusableItems=[],this.handleClick=()=>{var t;this.isOpen=!this.isOpen,this.isOpen?(this.focusIndex=0,this.focusItem()):this.closeDropdown(),l.sendAnalytics({category:"ui-component",parentContext:null,tag:this.host.tagName.toLowerCase(),name:((t=this.label)===null||t===void 0?void 0:t.toLowerCase())||"",action:this.isOpen?"expanded":"collapsed"})},this.icon="chevron-down",this.label=void 0,this.rounded=!1,this.ariaLabel="Open dropdown",this.asNav=!0,this.dropdownPos="left",this.dropdownOffset=!0,this.intent="tertiary",this.isOpen=!1,this.focusIndex=-1}handleWindowClick(e){this.host.contains(e.target)||this.closeDropdown()}handleKeyDown(e){if(this.isOpen)switch(e.key){case"Tab":this.closeDropdown();break;case"ArrowUp":e.preventDefault(),this.focusIndex=(this.focusIndex-1+this.focusableItems.length)%this.focusableItems.length,this.focusItem();break;case"ArrowDown":e.preventDefault(),this.focusIndex=(this.focusIndex+1)%this.focusableItems.length,this.focusItem();break}}closeDropdown(){this.isOpen=!1,this.focusIndex=-1}focusItem(){var e;(e=this.focusableItems[this.focusIndex])===null||e===void 0||e.focus()}componentDidLoad(){var e;this.focusableItems=Array.from(((e=this.dropdownContent)===null||e===void 0?void 0:e.querySelectorAll("a, button"))||[])}render(){return s.h("div",{key:"84f4cea78ea1c40c7897a356fe03ac83922fccb8",class:"z-focus relative",ref:e=>this.dropdownContent=e},s.h("eds-button",{key:"99dc51632dc82830054502a2d6d77d9fcefe9337",label:this.label,"aria-label":this.ariaLabel,icon:this.icon,intent:this.intent,onClick:this.handleClick,"aria-expanded":this.isOpen.toString(),"aria-haspopup":"menu"}),s.h("nav",{key:"a63613a7ecf709fd1d22d77da4b2d286905fef3e",role:"menu",class:{"shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8":!0,"left-4":this.dropdownPos==="left"&&this.dropdownOffset,"left-0":this.dropdownPos==="left"&&!this.dropdownOffset,"right-4":this.dropdownPos==="right"&&this.dropdownOffset,"right-0":this.dropdownPos==="right"&&!this.dropdownOffset,"rounded-lg":this.rounded},style:{display:this.isOpen?"block":"none"},"aria-label":"Dropdown","aria-hidden":!this.isOpen},s.h("slot",{key:"dda70b865ed03dc7ad36a32934587bbcb0a16c1b"})))}get host(){return s.getElement(this)}};n.style=c;const f=class{constructor(e){s.registerInstance(this,e),this.user=void 0,this.links=void 0,this.onLogout=void 0,this.parsedUser={},this.parsedLinks=[]}parseUserProp(e){this.parsedUser=typeof e=="string"?JSON.parse(e):e}parseLinksProp(e){this.parsedLinks=typeof e=="string"?JSON.parse(e):e}componentWillLoad(){this.parseUserProp(this.user),this.parseLinksProp(this.links)}get initials(){var e,t,i,o,r,a,d;return`${((t=(e=this.parsedUser)===null||e===void 0?void 0:e.firstname)===null||t===void 0?void 0:t.charAt(0))||""}${((o=(i=this.parsedUser)===null||i===void 0?void 0:i.lastname)===null||o===void 0?void 0:o.charAt(0))||""}`.toUpperCase()||((d=(a=(r=this.parsedUser)===null||r===void 0?void 0:r.fullname)===null||a===void 0?void 0:a.charAt(0))===null||d===void 0?void 0:d.toUpperCase())||""}get hasLogout(){return typeof this.onLogout=="function"}render(){var e,t,i,o,r;return s.h("div",{key:"4a80335b6a59b9653130ca75a6e42c04fce68f4f",class:"min-w-[280px] p-8"},s.h("div",{key:"9c97f6be46216587692d4852174cecfaacb70593",class:"flex gap-x-16 pb-16 border-b-2 border-softer"},s.h("eds-avatar",{key:"c778f6bdfb21068ca7c2deff6e298f61af6dbc67","first-name":(e=this.parsedUser)===null||e===void 0?void 0:e.firstname,"last-name":(t=this.parsedUser)===null||t===void 0?void 0:t.lastname,initials:this.initials,color:"grey",rounded:!0,"initials-strong":!0}),s.h("div",{key:"7f453546c9cc54597069abb3e4b50312fe7bf364",class:"max-w-full"},((i=this.parsedUser)===null||i===void 0?void 0:i.fullname)&&s.h("p",{key:"34e080ef159535820c09378701de0e6f4fd96009",class:"f-ui-01 text-default w-full text-ellipsis"},this.parsedUser.fullname),((o=this.parsedUser)===null||o===void 0?void 0:o.username)&&s.h("p",{key:"2f85764e7d015dc3f3b22ca8a07126f8f57216ef",class:"f-ui-03-light text-light mt-4"},this.parsedUser.username),((r=this.parsedUser)===null||r===void 0?void 0:r.email)&&s.h("p",{key:"002dec51e979c29f2343f55e004449e4cee4075c",class:"f-ui-03-light text-light mt-4"},this.parsedUser.email))),s.h("div",{key:"740b78c504257fb755ba7ba04dd25f023d37ed33",class:"text-default mt-16 flex w-full flex-col gap-y-8"},s.h("div",{key:"ac307937bdd3fc86cce502e5eeb3e922d931f418",class:"border-softer mb-10 border-b-2 pb-16"},s.h("eds-link",{key:"bdd0f1ef62ac78ffb1b40ed6873475df360cec66",label:"My EBRAINS","aria-label":"My EBRAINS",url:"https://www.ebrains.eu/dashboard",intent:"primary","extra-class":"w-full",external:!0})),s.h("eds-link",{key:1,label:"Account Settings",url:"https://iam.ebrains.eu/auth/realms/hbp/account/",intent:"secondary",icon:"arrow-diagonal",external:!0,"extra-class":"w-full"}),this.hasLogout&&s.h("eds-link",{key:"d73016ad71f3b356b7fb7d0a2a84124eabb05da5",label:"Sign out",intent:"tertiary","extra-class":"w-full justify-center",onClick:()=>this.onLogout&&this.onLogout()})))}static get watchers(){return{user:["parseUserProp"],links:["parseLinksProp"]}}};exports.eds_dropdown=n;exports.eds_user_modal=f;