@ebrains/vue 0.0.1-alpha.1 → 0.3.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 (194) 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-WwN9tuB9.mjs +300 -0
  20. package/color-primary-palette_6.entry-_ANGnnBl.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-B312hpv9.js +1 -0
  24. package/correct-use-of-colors.entry-BjxRVkfm.mjs +59 -0
  25. package/eds-accordion.entry-RvtdAQT0.mjs +58 -0
  26. package/eds-accordion.entry-h9ApF51u.js +4 -0
  27. package/eds-alert.entry-C6VZ3ss6.js +608 -0
  28. package/eds-alert.entry-D5o-ZjCb.mjs +688 -0
  29. package/eds-avatar_17.entry-08AUpBqo.mjs +15630 -0
  30. package/eds-avatar_17.entry-BQZz43q9.js +14540 -0
  31. package/eds-card-desc_3.entry-D7hiMZ09.mjs +87 -0
  32. package/eds-card-desc_3.entry-Dxs_izUN.js +1 -0
  33. package/eds-card-generic.entry-0IAAHjtS.mjs +63 -0
  34. package/eds-card-generic.entry-DZYZP5oa.js +1 -0
  35. package/eds-card-project.entry-Ckgpwy2Y.mjs +43 -0
  36. package/eds-card-project.entry-D7P4K88F.js +1 -0
  37. package/eds-card-section.entry-B90kv8Pj.js +1 -0
  38. package/eds-card-section.entry-DnktDeDm.mjs +39 -0
  39. package/eds-card-tags.entry-CnHitp9l.js +1 -0
  40. package/eds-card-tags.entry-XboLA5-P.mjs +13 -0
  41. package/eds-card-tool.entry-CbreK2xg.js +1 -0
  42. package/eds-card-tool.entry-CmRu6pmc.mjs +56 -0
  43. package/eds-card-wrapper.entry-Buesg37A.mjs +24 -0
  44. package/eds-card-wrapper.entry-rBHdbwzh.js +1 -0
  45. package/eds-code-block.entry-DKnuVY85.mjs +1582 -0
  46. package/eds-code-block.entry-M3x0FsRB.js +9 -0
  47. package/eds-components-section.entry-BAWU9rKy.mjs +295 -0
  48. package/eds-components-section.entry-BEBky2Me.js +132 -0
  49. package/eds-docs-palettes.entry-D3DdXkoo.js +1 -0
  50. package/eds-docs-palettes.entry-etHagd2P.mjs +22 -0
  51. package/eds-docs-tokens.entry--gW4Z293.js +1 -0
  52. package/eds-docs-tokens.entry-CIGNTs97.mjs +30 -0
  53. package/eds-form.entry-D8FLPsaS.js +7153 -0
  54. package/eds-form.entry-zewjTpaa.mjs +7319 -0
  55. package/eds-frame.entry-BlOnLCrI.js +1 -0
  56. package/eds-frame.entry-SCGm_pju.mjs +74 -0
  57. package/eds-icon-arrow-diagonal.entry-CEffhVkn.mjs +13 -0
  58. package/eds-icon-arrow-diagonal.entry-abxXXnCe.js +1 -0
  59. package/eds-icon-arrow-right.entry-4zl098Gq.js +1 -0
  60. package/eds-icon-arrow-right.entry-DrA5pZ5q.mjs +13 -0
  61. package/eds-icon-bluesky.entry-BDD9os2p.js +1 -0
  62. package/eds-icon-bluesky.entry-CRey5aEK.mjs +13 -0
  63. package/eds-icon-chevron-down.entry-DA_Mq25N.js +1 -0
  64. package/eds-icon-chevron-down.entry-DCd5FfEN.mjs +13 -0
  65. package/eds-icon-chevron-left.entry-CiGlPKup.js +1 -0
  66. package/eds-icon-chevron-left.entry-Lmfmw6QC.mjs +13 -0
  67. package/eds-icon-chevron-right.entry-B2HI3b59.mjs +13 -0
  68. package/eds-icon-chevron-right.entry-DMwxsQGs.js +1 -0
  69. package/eds-icon-chevron-up.entry-CwavCcA0.mjs +13 -0
  70. package/eds-icon-chevron-up.entry-D9pmuoVK.js +1 -0
  71. package/eds-icon-close.entry-JIzBTjIa.js +1 -0
  72. package/eds-icon-close.entry-pxvkbolY.mjs +13 -0
  73. package/eds-icon-copy.entry-Begn9c9I.mjs +13 -0
  74. package/eds-icon-copy.entry-Ccrvu27o.js +1 -0
  75. package/eds-icon-eu.entry-C0ZIqXHV.js +1 -0
  76. package/eds-icon-eu.entry-CLI94rkv.mjs +13 -0
  77. package/eds-icon-facebook.entry-BIZwxPBr.js +1 -0
  78. package/eds-icon-facebook.entry-o2SylrAp.mjs +13 -0
  79. package/eds-icon-gitlab.entry-BJi35Zov.js +1 -0
  80. package/eds-icon-gitlab.entry-BWfZkXKF.mjs +13 -0
  81. package/eds-icon-linkedin.entry-B4ev6evD.js +1 -0
  82. package/eds-icon-linkedin.entry-Z4gD9HGr.mjs +13 -0
  83. package/eds-icon-loader.entry-BFeh0vtX.js +1 -0
  84. package/eds-icon-loader.entry-DgIgWpYk.mjs +13 -0
  85. package/eds-icon-mastodon.entry-BLCaUfQY.js +1 -0
  86. package/eds-icon-mastodon.entry-C_2paQis.mjs +13 -0
  87. package/eds-icon-menu.entry-CNtaXAOo.mjs +13 -0
  88. package/eds-icon-menu.entry-CzF-GJXn.js +1 -0
  89. package/eds-icon-more.entry-4gqxzs_k.mjs +13 -0
  90. package/eds-icon-more.entry-C-v0Cjp9.js +1 -0
  91. package/eds-icon-search.entry-D070uKfZ.mjs +13 -0
  92. package/eds-icon-search.entry-iLCAU3Et.js +1 -0
  93. package/eds-icon-success.entry-Ci0RTnP5.mjs +13 -0
  94. package/eds-icon-success.entry-DSukl_w-.js +1 -0
  95. package/eds-icon-twitter.entry-D6I83zuS.mjs +13 -0
  96. package/eds-icon-twitter.entry-I9FRjdSE.js +1 -0
  97. package/eds-icon-user.entry-BI7Uw3Pp.mjs +13 -0
  98. package/eds-icon-user.entry-DcLB78T6.js +1 -0
  99. package/eds-icon-youtube.entry-CR4ml_RW.mjs +13 -0
  100. package/eds-icon-youtube.entry-DAke-XDg.js +1 -0
  101. package/eds-input_7.entry-BV0VagCj.js +7167 -0
  102. package/eds-input_7.entry-CRNkC-uR.mjs +7368 -0
  103. package/eds-login.entry-DOeyfoyM.js +1 -0
  104. package/eds-login.entry-DmJw6ABI.mjs +46 -0
  105. package/eds-logo-variations.entry-U65PDVhE.js +1 -0
  106. package/eds-logo-variations.entry-o4lyGmhR.mjs +22 -0
  107. package/eds-matomo-notice.entry-tzuOtKT9.js +1 -0
  108. package/eds-matomo-notice.entry-y5SvHzsZ.mjs +91 -0
  109. package/eds-modal.entry-B7Ph4m3y.js +1 -0
  110. package/eds-modal.entry-BW8crUoC.mjs +65 -0
  111. package/eds-navigator.entry-CvKDpQVM.mjs +33 -0
  112. package/eds-navigator.entry-DixbL3UY.js +1 -0
  113. package/eds-pagination_2.entry-CRrIKRa-.mjs +241 -0
  114. package/eds-pagination_2.entry-DoZ-NFBH.js +1 -0
  115. package/eds-progress-bar.entry-Bmjv2r3W.js +1 -0
  116. package/eds-progress-bar.entry-sdqDGSI3.mjs +21 -0
  117. package/eds-rating.entry-J5lQt6oj.mjs +40 -0
  118. package/eds-rating.entry-dK5fopCq.js +1 -0
  119. package/eds-section-core_2.entry-DBjBQ_AT.js +1 -0
  120. package/eds-section-core_2.entry-cwkrHET8.mjs +39 -0
  121. package/eds-svg-repository.entry-BEJBJ538.js +192 -0
  122. package/eds-svg-repository.entry-UvAba6M3.mjs +293 -0
  123. package/eds-tab.entry-CR1nFyrH.mjs +31 -0
  124. package/eds-tab.entry-uQka8MTr.js +1 -0
  125. package/eds-tabs-content.entry-BKT7-iAV.mjs +106 -0
  126. package/eds-tabs-content.entry-CTM0EjTl.js +1 -0
  127. package/eds-tabs.entry-BKx8xHJ8.mjs +112 -0
  128. package/eds-tabs.entry-BWxSN8SV.js +1 -0
  129. package/eds-timeline.entry-B7jxBFA4.mjs +51 -0
  130. package/eds-timeline.entry-D9KWrb_r.js +1 -0
  131. package/eds-tooltip.entry-CfhqHRxF.js +1 -0
  132. package/eds-tooltip.entry-DJqN6_P4.mjs +69 -0
  133. package/eds-trl.entry-COK7rgVS.mjs +36 -0
  134. package/eds-trl.entry-CoySvAJL.js +1 -0
  135. package/eu-9ddde93a-BFtIQw9B.js +28 -0
  136. package/eu-9ddde93a-ft4szvR5.mjs +31 -0
  137. package/facebook-9cb5c17f-BcUhbrj6.mjs +15 -0
  138. package/facebook-9cb5c17f-Y_gvQ682.js +12 -0
  139. package/generated/components.d.ts +2 -1
  140. package/incorrect-use-of-colors.entry-D7xAYXu2.js +1 -0
  141. package/incorrect-use-of-colors.entry-DsNEjuWo.mjs +42 -0
  142. package/index-39c58238-BwYCDOHZ.mjs +44 -0
  143. package/index-39c58238-SQ-JC-LH.js +1 -0
  144. package/index-Dg2DO7q4.mjs +3558 -0
  145. package/index-Dvww9rdy.js +21 -0
  146. package/index.js +1 -21
  147. package/index.mjs +40 -2363
  148. package/keycloak-13893af6-BLzE1H6E.mjs +878 -0
  149. package/keycloak-13893af6-NiM3zoVg.js +9 -0
  150. package/linkedin-e8650abb-BkDrkjzY.js +26 -0
  151. package/linkedin-e8650abb-DYMdsale.mjs +29 -0
  152. package/loader-c9628637-ChpnbJkv.mjs +31 -0
  153. package/loader-c9628637-Vj8Wt1e8.js +28 -0
  154. package/logo-color-7f1fd803-CFgbXdt8.mjs +116 -0
  155. package/logo-color-7f1fd803-DRD3vZVn.js +113 -0
  156. package/logo-color-margins-ff8ce71b-B9nMsY9Q.mjs +119 -0
  157. package/logo-color-margins-ff8ce71b-Dk06zr1Z.js +116 -0
  158. package/logo-space.entry-Cf-keXHv.mjs +14 -0
  159. package/logo-space.entry-DC5fUroI.js +1 -0
  160. package/logo-variations-horizontal_2.entry-BWau6qh4.js +7 -0
  161. package/logo-variations-horizontal_2.entry-xvJ8Iiu5.mjs +29 -0
  162. package/logo-white-no-bg-f382f86f-DXYn3NwV.js +1011 -0
  163. package/logo-white-no-bg-f382f86f-YhfmNmGG.mjs +1022 -0
  164. package/logo-wrong-usage.entry-RcSb8NIe.mjs +14 -0
  165. package/logo-wrong-usage.entry-sU8NISwX.js +1 -0
  166. package/mastodon-3703ec61-C7iI4Hk0.mjs +15 -0
  167. package/mastodon-3703ec61-C9v6Olc-.js +12 -0
  168. package/menu-340ea948-BpnYX3gY.mjs +12 -0
  169. package/menu-340ea948-ZdelWVw3.js +9 -0
  170. package/mono-53f70232-DGi2XDlR.mjs +12 -0
  171. package/mono-53f70232-DgAsWvoQ.js +9 -0
  172. package/more-4449d549-D4HA1cRq.js +11 -0
  173. package/more-4449d549-rI9hOpEp.mjs +14 -0
  174. package/package.json +2 -2
  175. package/search-fbcd79c2-BMxCaeEk.js +10 -0
  176. package/search-fbcd79c2-rfV0PlHP.mjs +13 -0
  177. package/success-443809da-BD23vltm.mjs +19 -0
  178. package/success-443809da-BUEhLsAD.js +16 -0
  179. package/toastManager-d9eee791-CEYNwx25.mjs +30 -0
  180. package/toastManager-d9eee791-DvR_vUPI.js +1 -0
  181. package/token-list_3.entry-BkOkChEb.js +1 -0
  182. package/token-list_3.entry-CheMK1r_.mjs +247 -0
  183. package/token-ratios.entry-Dfz4q4qy.js +1 -0
  184. package/token-ratios.entry-rSMXHIix.mjs +25 -0
  185. package/token-spacing.entry-ByzbVlGi.js +1 -0
  186. package/token-spacing.entry-DvopunO1.mjs +12 -0
  187. package/token-typography.entry-AjIHL4M4.js +2 -0
  188. package/token-typography.entry-CExckWkx.mjs +213 -0
  189. package/twitter-ac21b505-CGWVGWM9.mjs +15 -0
  190. package/twitter-ac21b505-DDdHS4hB.js +12 -0
  191. package/user-71ebdc15-BBKQbcQD.js +14 -0
  192. package/user-71ebdc15-CoHlCtJg.mjs +17 -0
  193. package/youtube-efbfbdc4-BLTH1Jl9.js +12 -0
  194. package/youtube-efbfbdc4-BfySbfjR.mjs +15 -0
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-Dvww9rdy.js"),e=require("./keycloak-13893af6-NiM3zoVg.js"),a=class{constructor(t){i.registerInstance(this,t),this.authStatusChanged=i.createEvent(this,"authStatusChanged",7),this.handleLogout=()=>{e.logout(),this.authenticated=!1},this.keycloakUrl="",this.keycloakRealm="",this.keycloakClientId="",this.authenticated=!1,this.user=null}async componentWillLoad(){await this.checkAuthentication()}async checkAuthentication(){try{const t={url:this.keycloakUrl,realm:this.keycloakRealm,clientId:this.keycloakClientId};await e.initKeycloak(t),this.authenticated=e.isAuthenticated(),this.authenticated&&(this.user=e.getUser()),this.authStatusChanged.emit({authenticated:this.authenticated,user:this.user})}catch(t){console.error("Keycloak initialization or login check failed:",t)}}async handleLogin(){try{this.authenticated||e.login()}catch(t){console.error("Login failed:",t)}}getBtnLabel(){return this.authenticated?"Logout":"Login"}render(){return i.h("eds-button",{key:"35f298ecf951d5b1087f988262ae7d312c5e2d38",label:this.getBtnLabel(),intent:"primary","extra-class":"text-default","aria-label":this.getBtnLabel(),triggerClick:this.authenticated?this.handleLogout:this.handleLogin.bind(this)})}};exports.eds_login=a;
@@ -0,0 +1,46 @@
1
+ import { r as e, c as a, h as i } from "./index-Dg2DO7q4.mjs";
2
+ import { a as s, i as n, b as h, g as o, l as c } from "./keycloak-13893af6-BLzE1H6E.mjs";
3
+ const u = class {
4
+ constructor(t) {
5
+ e(this, t), this.authStatusChanged = a(this, "authStatusChanged", 7), this.handleLogout = () => {
6
+ s(), this.authenticated = !1;
7
+ }, this.keycloakUrl = "", this.keycloakRealm = "", this.keycloakClientId = "", this.authenticated = !1, this.user = null;
8
+ }
9
+ // Lifecycle method to check authentication status before the component loads
10
+ async componentWillLoad() {
11
+ await this.checkAuthentication();
12
+ }
13
+ // Method to initialize Keycloak and check if the user is authenticated
14
+ async checkAuthentication() {
15
+ try {
16
+ const t = {
17
+ url: this.keycloakUrl,
18
+ realm: this.keycloakRealm,
19
+ clientId: this.keycloakClientId
20
+ };
21
+ await n(t), this.authenticated = h(), this.authenticated && (this.user = o()), this.authStatusChanged.emit({
22
+ authenticated: this.authenticated,
23
+ user: this.user
24
+ });
25
+ } catch (t) {
26
+ console.error("Keycloak initialization or login check failed:", t);
27
+ }
28
+ }
29
+ // Method to handle user login
30
+ async handleLogin() {
31
+ try {
32
+ this.authenticated || c();
33
+ } catch (t) {
34
+ console.error("Login failed:", t);
35
+ }
36
+ }
37
+ getBtnLabel() {
38
+ return this.authenticated ? "Logout" : "Login";
39
+ }
40
+ render() {
41
+ return i("eds-button", { key: "35f298ecf951d5b1087f988262ae7d312c5e2d38", label: this.getBtnLabel(), intent: "primary", "extra-class": "text-default", "aria-label": this.getBtnLabel(), triggerClick: this.authenticated ? this.handleLogout : this.handleLogin.bind(this) });
42
+ }
43
+ };
44
+ export {
45
+ u as eds_login
46
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Dvww9rdy.js"),n=class{constructor(t){e.registerInstance(this,t),this.tabIndex=void 0}renderContent(){switch(this.tabIndex){case 0:return e.h("logo-variations-horizontal",null);case 1:return e.h("logo-variations-vertical",null);default:return e.h("p",null,"Content not available.")}}render(){return e.h("div",{key:"9d6ce0e75030d6e636aab423181b0ce999f6f1b0",class:"container"},this.renderContent())}};exports.eds_logo_variations=n;
@@ -0,0 +1,22 @@
1
+ import { r as n, h as e } from "./index-Dg2DO7q4.mjs";
2
+ const a = 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("logo-variations-horizontal", null);
10
+ case 1:
11
+ return e("logo-variations-vertical", null);
12
+ default:
13
+ return e("p", null, "Content not available.");
14
+ }
15
+ }
16
+ render() {
17
+ return e("div", { key: "9d6ce0e75030d6e636aab423181b0ce999f6f1b0", class: "container" }, this.renderContent());
18
+ }
19
+ };
20
+ export {
21
+ a as eds_logo_variations
22
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-Dvww9rdy.js"),a=require("./toastManager-d9eee791-DvR_vUPI.js"),n=require("./color-0ba8ed56-BVeDdJAE.js"),i=".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}",l=i,o=class{constructor(e){t.registerInstance(this,e),this.title="Analytics Consent",this.description="We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.",this.showNotice=!0}componentWillLoad(){this.checkConsentCookie()}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach(s=>{this.emitContext(s)})}emitContext(e){const s=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});e.dispatchEvent(s)}checkConsentCookie(){const e=document.cookie.split("; ").find(r=>r.startsWith("mtm_consent=")),s=sessionStorage.getItem("matomo-deferred");this.showNotice=!e&&!s}optInAnalytics(){n.matomoOptIn(),a.toast.show("You have opted in to analytics.","success"),this.hideNotice()}deferDecision(){sessionStorage.setItem("matomo-deferred","true"),a.toast.show("You can decide later.","warning"),this.hideNotice()}hideNotice(){this.showNotice=!1}render(){return this.showNotice?t.h("div",{class:"fixed bottom-0 p-8 z-10 grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center"},t.h("eds-accordion",{title:this.title,description:this.description,switchBg:!0,expanded:!0},t.h("div",{class:"flex items-center gap-4"},t.h("eds-button",{intent:"primary",label:"Yes, I agree","aria-label":"Opt-in for analytics",onClick:()=>this.optInAnalytics()}),t.h("eds-button",{intent:"ghost",label:"Ask me later","aria-label":"Defer analytics decision",onClick:()=>this.deferDecision()})))):null}get el(){return t.getElement(this)}};o.style=l;exports.eds_matomo_notice=o;
@@ -0,0 +1,91 @@
1
+ import { r, h as s, g as n } from "./index-Dg2DO7q4.mjs";
2
+ import { t as a } from "./toastManager-d9eee791-CEYNwx25.mjs";
3
+ import { m as i } from "./color-0ba8ed56-D-UJpBQL.mjs";
4
+ const l = ".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}", c = l, d = class {
5
+ constructor(t) {
6
+ r(this, t), this.title = "Analytics Consent", this.description = "We use anonymous analytics to improve our services. No personal data is collected unless you give your consent.", this.showNotice = !0;
7
+ }
8
+ /**
9
+ * Lifecycle method called before the component is rendered.
10
+ * Checks for the presence of the "mtm_consent" cookie to determine
11
+ * if the notice should be displayed.
12
+ */
13
+ componentWillLoad() {
14
+ this.checkConsentCookie();
15
+ }
16
+ /**
17
+ * Lifecycle method called after the component has been rendered.
18
+ * Emits `parentContext` events for each `eds-button` in the shadow DOM.
19
+ */
20
+ componentDidLoad() {
21
+ this.el.shadowRoot.querySelectorAll("eds-button").forEach((e) => {
22
+ this.emitContext(e);
23
+ });
24
+ }
25
+ /**
26
+ * Emits a custom `parentContext` event for a given button element.
27
+ * This can be used to provide context information about the component.
28
+ *
29
+ * @param linkElement - The button element to which the event will be dispatched.
30
+ */
31
+ emitContext(t) {
32
+ const e = new CustomEvent("parentContext", {
33
+ detail: {
34
+ componentName: this.el.tagName.toLowerCase(),
35
+ identifier: null
36
+ }
37
+ });
38
+ t.dispatchEvent(e);
39
+ }
40
+ /**
41
+ * Checks if the Matomo "mtm_consent" cookie exists in the browser.
42
+ * If the cookie is found, the notice is hidden.
43
+ */
44
+ checkConsentCookie() {
45
+ const t = document.cookie.split("; ").find((o) => o.startsWith("mtm_consent=")), e = sessionStorage.getItem("matomo-deferred");
46
+ this.showNotice = !t && !e;
47
+ }
48
+ /**
49
+ * Handles user consent for analytics tracking.
50
+ * Calls the `matomoOptIn` utility and shows a success toast notification.
51
+ */
52
+ optInAnalytics() {
53
+ i(), a.show("You have opted in to analytics.", "success"), this.hideNotice();
54
+ }
55
+ /**
56
+ * Handles user opt-out from analytics tracking.
57
+ * Calls the `matomoOptOut` utility and shows a warning toast notification.
58
+
59
+ private optOutAnalytics() {
60
+ matomoOptOut();
61
+ toast.show('You have opted out of analytics.', 'warning');
62
+ this.hideNotice();
63
+ }*/
64
+ /**
65
+ * Handles "Ask me later" action by storing a session storage entry
66
+ * and hiding the notice for the rest of the session.
67
+ */
68
+ deferDecision() {
69
+ sessionStorage.setItem("matomo-deferred", "true"), a.show("You can decide later.", "warning"), this.hideNotice();
70
+ }
71
+ /**
72
+ * Hides the notice by updating the `showNotice` state.
73
+ */
74
+ hideNotice() {
75
+ this.showNotice = !1;
76
+ }
77
+ /**
78
+ * Renders the Matomo consent notice with user options.
79
+ * Includes an accordion for the description and two buttons for user consent.
80
+ */
81
+ render() {
82
+ return this.showNotice ? s("div", { class: "fixed bottom-0 p-8 z-10 grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center" }, s("eds-accordion", { title: this.title, description: this.description, switchBg: !0, expanded: !0 }, s("div", { class: "flex items-center gap-4" }, s("eds-button", { intent: "primary", label: "Yes, I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() }), s("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))) : null;
83
+ }
84
+ get el() {
85
+ return n(this);
86
+ }
87
+ };
88
+ d.style = c;
89
+ export {
90
+ d as eds_matomo_notice
91
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Dvww9rdy.js"),i=".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.fixed{position:fixed}.inset-0{inset:0rem}.z-10{z-index:10}.z-50{z-index:50}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}",n=i,r=class{constructor(t){e.registerInstance(this,t),this.isOpen=!1,this.title="",this.truncate=!0,this.truncateLines="1"}getTruncateClass(){return this.truncate&&this.truncateLines?`line-clamp-${this.truncateLines}`:""}async open(){this.isOpen=!0}async close(){this.isOpen=!1}async toggle(){this.isOpen=!this.isOpen}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach(a=>{this.emitContext(a)})}emitContext(t){const a=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(a)}render(){return e.h("div",{key:"00816ecb900bd9b68b31fdf6e48bef0223f9e10a",class:`${this.isOpen?"block":"hidden"} fixed inset-0 z-50 flex`},this.isOpen&&e.h("div",{key:"570fa8625f9ad4b1ea82633f11e2b289ab01b853",class:"fixed inset-0 bg-dark bg-opacity-90",onClick:()=>this.close()}),e.h("div",{key:"ff658c763e3fbc98123f13483076399966b10515",class:"max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center "},e.h("div",{key:"d8b72acd90cc59ab1f82384aee4e311319f75aa9",class:"flex justify-between items-center border-b-2 border-softer pb-8"},e.h("span",{key:"ee61fc505c5a3eb93541d3762d37f28a5a788bae",class:`f-heading-04 text-lighter ${this.getTruncateClass()}`},this.title),e.h("eds-button",{key:"3832772417d05a162eb5f2c4d0733f0ee845ed1c",intent:"tertiary",icon:"close","aria-label":"Close modal",onClick:()=>this.close(),"extra-class":"ml-8"})),e.h("div",{key:"f71b38be8284a37d0d198df0a9858c64202b3d91",class:"pt-8"},e.h("slot",{key:"1f80948334e5b4e9fc00a3bf01c6fc402d8220c3"}))))}get el(){return e.getElement(this)}};r.style=n;exports.eds_modal=r;
@@ -0,0 +1,65 @@
1
+ import { r, h as e, g as i } from "./index-Dg2DO7q4.mjs";
2
+ const n = ".block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.hidden{display:none}.fixed{position:fixed}.inset-0{inset:0rem}.z-10{z-index:10}.z-50{z-index:50}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}", o = n, s = class {
3
+ constructor(t) {
4
+ r(this, t), this.isOpen = !1, this.title = "", this.truncate = !0, this.truncateLines = "1";
5
+ }
6
+ getTruncateClass() {
7
+ return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : "";
8
+ }
9
+ /**
10
+ * Opens the modal.
11
+ */
12
+ async open() {
13
+ this.isOpen = !0;
14
+ }
15
+ /**
16
+ * Closes the modal.
17
+ */
18
+ async close() {
19
+ this.isOpen = !1;
20
+ }
21
+ /**
22
+ * Toggles the modal open or closed.
23
+ */
24
+ async toggle() {
25
+ this.isOpen = !this.isOpen;
26
+ }
27
+ /**
28
+ * Lifecycle method that runs when the component has fully loaded.
29
+ * It emits a custom event for each `eds-button` element contained within the breadcrumb.
30
+ */
31
+ componentDidLoad() {
32
+ this.el.shadowRoot.querySelectorAll("eds-button").forEach((a) => {
33
+ this.emitContext(a);
34
+ });
35
+ }
36
+ /**
37
+ * Emits a custom event called `parentContext` for a given button element.
38
+ * This event provides context information about the eds-modal component.
39
+ *
40
+ * @param btnElement - The link element to which the event will be dispatched.
41
+ */
42
+ emitContext(t) {
43
+ const a = new CustomEvent("parentContext", {
44
+ detail: {
45
+ componentName: this.el.tagName.toLowerCase(),
46
+ identifier: null
47
+ }
48
+ });
49
+ t.dispatchEvent(a);
50
+ }
51
+ render() {
52
+ return e("div", { key: "00816ecb900bd9b68b31fdf6e48bef0223f9e10a", class: `${this.isOpen ? "block" : "hidden"} fixed inset-0 z-50 flex` }, this.isOpen && e("div", {
53
+ key: "570fa8625f9ad4b1ea82633f11e2b289ab01b853",
54
+ class: "fixed inset-0 bg-dark bg-opacity-90",
55
+ onClick: () => this.close()
56
+ }), e("div", { key: "ff658c763e3fbc98123f13483076399966b10515", class: "max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center " }, e("div", { key: "d8b72acd90cc59ab1f82384aee4e311319f75aa9", class: "flex justify-between items-center border-b-2 border-softer pb-8" }, e("span", { key: "ee61fc505c5a3eb93541d3762d37f28a5a788bae", class: `f-heading-04 text-lighter ${this.getTruncateClass()}` }, this.title), e("eds-button", { key: "3832772417d05a162eb5f2c4d0733f0ee845ed1c", intent: "tertiary", icon: "close", "aria-label": "Close modal", onClick: () => this.close(), "extra-class": "ml-8" })), e("div", { key: "f71b38be8284a37d0d198df0a9858c64202b3d91", class: "pt-8" }, e("slot", { key: "1f80948334e5b4e9fc00a3bf01c6fc402d8220c3" }))));
57
+ }
58
+ get el() {
59
+ return i(this);
60
+ }
61
+ };
62
+ s.style = o;
63
+ export {
64
+ s as eds_modal
65
+ };
@@ -0,0 +1,33 @@
1
+ import { r as n, h as e, g as l } from "./index-Dg2DO7q4.mjs";
2
+ const a = class {
3
+ constructor(t) {
4
+ n(this, t), this.prevLabel = void 0, this.nextLabel = void 0, this.prevUrl = void 0, this.nextUrl = void 0, this.linkSize = "small", this.linkIntent = "tertiary";
5
+ }
6
+ componentDidLoad() {
7
+ this.el.querySelectorAll("eds-link").forEach((i) => {
8
+ this.emitContext(i);
9
+ });
10
+ }
11
+ /**
12
+ * Emits a custom event 'parentContext' for a given link element with the component's context.
13
+ * @param linkElement - The eds-link element to emit the event for.
14
+ */
15
+ emitContext(t) {
16
+ const i = new CustomEvent("parentContext", {
17
+ detail: {
18
+ componentName: this.el.tagName.toLowerCase(),
19
+ identifier: null
20
+ }
21
+ });
22
+ t.dispatchEvent(i);
23
+ }
24
+ render() {
25
+ return e("ul", { key: "1ab60197bbc9ee86d77134138744dce39df2aaa7", class: "flex lg:flex grow items-center justify-center gap-x-8" }, this.prevLabel && e("eds-link", { key: "b29fd121d33c1e919d24a5d460d8d6864f1ff9db", label: this.prevLabel, url: this.prevUrl || void 0, disabled: !this.prevUrl, "aria-label": this.prevLabel, size: this.linkSize, intent: this.linkIntent, class: "mr-auto !p-8 lg:!pr-12" }, e("eds-icon-wrapper", { key: "64620ccfaf2e006a6414bcd7e874a352b9d2d56b", icon: "chevron-left" }), this.prevLabel), this.nextLabel && e("eds-link", { key: "ae6425f0f01c8f5bcbdae27d9bea9dc3a5b09d3b", label: this.nextLabel, url: this.nextUrl || void 0, disabled: !this.nextUrl, "aria-label": this.nextLabel, size: this.linkSize, intent: this.linkIntent, class: "ml-auto !p-8 lg:!pl-12" }, this.nextLabel, e("eds-icon-wrapper", { key: "d286fc26f17ee6cf6828990e98df7865fbbfd352", icon: "chevron-right", class: "w-20 h-20" })));
26
+ }
27
+ get el() {
28
+ return l(this);
29
+ }
30
+ };
31
+ export {
32
+ a as eds_navigator
33
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Dvww9rdy.js"),n=class{constructor(t){e.registerInstance(this,t),this.prevLabel=void 0,this.nextLabel=void 0,this.prevUrl=void 0,this.nextUrl=void 0,this.linkSize="small",this.linkIntent="tertiary"}componentDidLoad(){this.el.querySelectorAll("eds-link").forEach(i=>{this.emitContext(i)})}emitContext(t){const i=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(i)}render(){return e.h("ul",{key:"1ab60197bbc9ee86d77134138744dce39df2aaa7",class:"flex lg:flex grow items-center justify-center gap-x-8"},this.prevLabel&&e.h("eds-link",{key:"b29fd121d33c1e919d24a5d460d8d6864f1ff9db",label:this.prevLabel,url:this.prevUrl||void 0,disabled:!this.prevUrl,"aria-label":this.prevLabel,size:this.linkSize,intent:this.linkIntent,class:"mr-auto !p-8 lg:!pr-12"},e.h("eds-icon-wrapper",{key:"64620ccfaf2e006a6414bcd7e874a352b9d2d56b",icon:"chevron-left"}),this.prevLabel),this.nextLabel&&e.h("eds-link",{key:"ae6425f0f01c8f5bcbdae27d9bea9dc3a5b09d3b",label:this.nextLabel,url:this.nextUrl||void 0,disabled:!this.nextUrl,"aria-label":this.nextLabel,size:this.linkSize,intent:this.linkIntent,class:"ml-auto !p-8 lg:!pl-12"},this.nextLabel,e.h("eds-icon-wrapper",{key:"d286fc26f17ee6cf6828990e98df7865fbbfd352",icon:"chevron-right",class:"w-20 h-20"})))}get el(){return e.getElement(this)}};exports.eds_navigator=n;
@@ -0,0 +1,241 @@
1
+ import { r as h, h as i, g } from "./index-Dg2DO7q4.mjs";
2
+ const d = "ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}", c = d, f = class {
3
+ constructor(t) {
4
+ h(this, t), this.currentPage = void 0, this.lastPage = void 0, this.perPage = 10, this.total = 0, this.url = "", this.mode = "default", this.prevLabel = "Prev", this.nextLabel = "Next", this.prevUrl = "", this.nextUrl = "", this.links = [];
5
+ }
6
+ /** Lifecycle hook to generate pagination links on component load */
7
+ componentWillLoad() {
8
+ this.mode === "default" && this.generateLinks();
9
+ }
10
+ componentDidLoad() {
11
+ const t = this.hostEl.shadowRoot.querySelectorAll("eds-link");
12
+ t.length > 0 && (this.emitContext(t[0]), t.length > 1 && this.emitContext(t[t.length - 1]));
13
+ }
14
+ /**
15
+ * Emits a custom event called `parentContext` for a given link element.
16
+ * This event provides context information about the breadcrumb component.
17
+ *
18
+ * @param linkElement - The link element to which the event will be dispatched.
19
+ */
20
+ emitContext(t) {
21
+ const e = new CustomEvent("parentContext", {
22
+ detail: {
23
+ componentName: this.hostEl.tagName.toLowerCase(),
24
+ identifier: null
25
+ }
26
+ });
27
+ t.dispatchEvent(e);
28
+ }
29
+ onPageOrLastPageChange() {
30
+ this.mode === "default" && this.generateLinks();
31
+ }
32
+ /**
33
+ * Checks if the current page is the first page
34
+ * @returns {boolean} - true if current page is the first page
35
+ */
36
+ isFirstPage() {
37
+ return this.currentPage === 1;
38
+ }
39
+ /**
40
+ * Checks if the current page is the last page
41
+ * @returns {boolean} - true if current page is the last page
42
+ */
43
+ isLastPage() {
44
+ return this.currentPage === this.lastPage;
45
+ }
46
+ /**
47
+ * Generates a pagination link object
48
+ * @param {number} page - Page number for the link
49
+ * @returns {Link} - Link object with page details
50
+ */
51
+ generateLink(t) {
52
+ const e = this.url.includes("?");
53
+ return {
54
+ ariaLabel: `Page ${t}`,
55
+ url: `${this.url}${e ? "&" : "?"}page=${t}`,
56
+ label: t.toString(),
57
+ current: this.currentPage === t,
58
+ disabled: !1
59
+ };
60
+ }
61
+ /** Generates pagination links based on the last page and current page */
62
+ generateLinks() {
63
+ this.lastPage && this.lastPage > 5 ? this.links = this.getPaginationGenerator(this.currentPage || 1, this.lastPage).map((t) => typeof t == "number" ? this.generateLink(t) : t) : this.lastPage && (this.links = Array.from({ length: this.lastPage }).map((t, e) => this.generateLink(e + 1)));
64
+ }
65
+ /**
66
+ * Creates a pagination range based on delta, current, and total pages
67
+ * @param {number} current - Current page number
68
+ * @param {number} total - Total number of pages
69
+ * @param {number} delta - Range of pages to display around the current page
70
+ * @returns {(number | string)[]} - Range of page numbers or ellipses
71
+ */
72
+ getPaginationGenerator(t, e) {
73
+ const a = [];
74
+ if (e <= 5)
75
+ for (let n = 1; n <= e; n++)
76
+ a.push(n);
77
+ else {
78
+ a.push(1), t - 1 > 2 && a.push("...");
79
+ for (let n = Math.max(2, t - 1); n <= Math.min(e - 1, t + 1); n++)
80
+ a.push(n);
81
+ t + 1 < e - 1 && a.push("..."), a.push(e);
82
+ }
83
+ return a;
84
+ }
85
+ /**
86
+ * Formats the current page results information for display
87
+ * @returns {string} - Formatted page result information
88
+ */
89
+ pageResults() {
90
+ return this.total > 0 ? this.total > this.perPage ? `${this.perPage * ((this.currentPage || 1) - 1) + 1} - ${this.perPage * (this.currentPage || 1) >= this.total ? this.total : this.perPage * (this.currentPage || 1)} of ${this.total}` : `${this.total}` : "";
91
+ }
92
+ /**
93
+ * Handles a page click event, updating the current page and dispatching an event
94
+ * @param {MouseEvent} event - Click event
95
+ * @param {number} newPage - New page number
96
+ */
97
+ handlePageClick(t, e) {
98
+ if (this.mode !== "navigator" && (t.preventDefault(), e !== this.currentPage)) {
99
+ this.links = this.links.map((a) => typeof a == "object" ? Object.assign(Object.assign({}, a), { current: parseInt(a.label) === e }) : a);
100
+ const s = new CustomEvent("pageChange", {
101
+ detail: e,
102
+ bubbles: !0,
103
+ composed: !0
104
+ });
105
+ this.hostEl.dispatchEvent(s), this.currentPage = e;
106
+ }
107
+ }
108
+ render() {
109
+ return i("div", { key: "2385b59b0a8b2bbdc40bfc5032b846c0ec20065e" }, this.total > 0 && this.mode === "default" && i("p", { key: "6aea281a4df247874f354469bbabae039424ad9e", class: "f-ui-03 text-lightest mb-28 w-full text-center" }, i("span", { key: "eeb5f0ea902505c3853a30d51026cef9d9785e48", class: "sr-only" }, "Results:"), this.pageResults()), this.mode === "navigator" || this.lastPage && this.lastPage > 1 ? i("nav", { "aria-label": "Pagination" }, i("ul", { class: "flex items-center justify-center gap-x-8" }, i("li", { class: "mr-auto" }, i("eds-link", { label: this.prevLabel, url: this.mode === "navigator" ? this.prevUrl || "#" : this.isFirstPage() ? "#" : this.generateLink(this.currentPage - 1).url, disabled: this.mode === "navigator" ? !this.prevUrl : this.isFirstPage(), "aria-label": "Previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pr-12", onClick: (t) => {
110
+ this.mode === "default" && (this.isFirstPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) - 1));
111
+ } })), this.mode === "default" && this.links.map((t, e) => i("li", { key: e, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof t == "string" ? i("span", { class: "flex items-center justify-center" }, t) : i("eds-link", { url: t.url, "aria-label": t.ariaLabel, label: t.label, current: t.current, size: "small", class: "!p-8", intent: t.current ? "secondary" : "ghost", onClick: (s) => this.handlePageClick(s, parseInt(t.label)) }))), i("li", { class: "ml-auto" }, i("eds-link", { label: this.nextLabel, url: this.mode === "navigator" ? this.nextUrl || "#" : this.isLastPage() ? "#" : this.generateLink(this.currentPage + 1).url, disabled: this.mode === "navigator" ? !this.nextUrl : this.isLastPage(), "aria-label": "Next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors", onClick: (t) => {
112
+ this.mode === "default" && (this.isLastPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) + 1));
113
+ } })))) : null);
114
+ }
115
+ get hostEl() {
116
+ return g(this);
117
+ }
118
+ static get watchers() {
119
+ return {
120
+ currentPage: ["onPageOrLastPageChange"],
121
+ lastPage: ["onPageOrLastPageChange"]
122
+ };
123
+ }
124
+ };
125
+ f.style = c;
126
+ const u = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}", p = u, m = class {
127
+ constructor(t) {
128
+ h(this, t), this.data = null, this.endpoint = null, this.config = {}, this.rowsPerPage = 10, this.paginationEnabled = !0, this.searchEnabled = !1, this.hostWidth = void 0, this.columnSize = "default", this.tableData = [], this.columns = [], this.currentPage = 1, this.parsedConfig = {}, this.totalRows = 0, this.searchQuery = "";
129
+ }
130
+ handleDataChange() {
131
+ this.parseData();
132
+ }
133
+ handleConfigChange() {
134
+ this.parseConfig();
135
+ }
136
+ componentWillLoad() {
137
+ this.parseConfig(), this.data ? this.parseData() : this.endpoint && this.fetchData();
138
+ }
139
+ componentDidLoad() {
140
+ this.setupPaginationListener();
141
+ }
142
+ componentDidUpdate() {
143
+ this.setupPaginationListener();
144
+ }
145
+ parseData() {
146
+ try {
147
+ this.tableData = typeof this.data == "string" ? JSON.parse(this.data) : this.data || [], this.totalRows = this.tableData.length, this.updateColumns(), this.currentPage = 1;
148
+ } catch (t) {
149
+ console.error("Failed to parse data:", t), this.tableData = [];
150
+ }
151
+ }
152
+ parseConfig() {
153
+ try {
154
+ this.parsedConfig = typeof this.config == "string" ? JSON.parse(this.config) : this.config;
155
+ } catch (t) {
156
+ console.error("Failed to parse config:", t), this.parsedConfig = {};
157
+ }
158
+ }
159
+ async fetchData() {
160
+ try {
161
+ const e = await (await fetch(this.endpoint)).json();
162
+ this.data = e;
163
+ } catch (t) {
164
+ console.error("Failed to fetch data:", t);
165
+ }
166
+ }
167
+ setupPaginationListener() {
168
+ if (!this.shouldEnablePagination())
169
+ return;
170
+ const t = this.hostEl.shadowRoot.querySelector("eds-pagination");
171
+ t && !t.hasAttribute("listener-attached") && (t.addEventListener("pageChange", (e) => this.handlePageChange(e.detail)), t.setAttribute("listener-attached", "true"));
172
+ }
173
+ getFilteredRows() {
174
+ return this.tableData.filter((t) => Object.values(t).some((e) => e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())));
175
+ }
176
+ getPaginatedRows() {
177
+ const t = this.getFilteredRows();
178
+ this.totalRows = t.length;
179
+ const e = (this.currentPage - 1) * this.rowsPerPage;
180
+ return t.slice(e, e + this.rowsPerPage);
181
+ }
182
+ handlePageChange(t) {
183
+ this.currentPage = t;
184
+ }
185
+ handleSearch(t) {
186
+ this.searchQuery = t.target.value, this.currentPage = 1;
187
+ }
188
+ renderCell(t, e) {
189
+ var s;
190
+ const a = (s = this.parsedConfig[e]) === null || s === void 0 ? void 0 : s.format;
191
+ return a === "uppercase" ? t == null ? void 0 : t.toString().toUpperCase() : a === "svg" ? i("div", { innerHTML: t }) : a === "bold" ? i("strong", null, t) : a === "code" ? i("code", null, t) : t;
192
+ }
193
+ shouldEnablePagination() {
194
+ return this.paginationEnabled && this.totalRows > this.rowsPerPage;
195
+ }
196
+ updateColumns() {
197
+ this.columns = this.tableData.length > 0 ? Object.keys(this.tableData[0]) : [];
198
+ }
199
+ getVisibleColumnsCount() {
200
+ return this.columns.filter((t) => {
201
+ var e;
202
+ return !(!((e = this.parsedConfig[t]) === null || e === void 0) && e.hidden);
203
+ }).length;
204
+ }
205
+ divisionFactor() {
206
+ let t = 1;
207
+ return this.columnSize === "medium" ? t = 2 : this.columnSize === "large" && (t = 4), t;
208
+ }
209
+ render() {
210
+ const t = this.getPaginatedRows(), e = Math.ceil(this.totalRows / this.rowsPerPage), s = this.getVisibleColumnsCount(), a = this.hostWidth && this.hostWidth.trim() !== "" ? Number(this.hostWidth) : this.hostEl.parentElement instanceof HTMLElement ? this.hostEl.parentElement.getBoundingClientRect().width : this.hostEl.getRootNode().host instanceof HTMLElement ? this.hostEl.getRootNode().host.getBoundingClientRect().width : 400, n = s > 0 ? Math.floor(a / s * this.divisionFactor()) : 100;
211
+ return console.log("columnWidth:", n), i("div", { key: "178a33c07e6eae9d5edc170f842b6ef29ae21d9c" }, this.searchEnabled && i("div", { key: "f1212a4e515a1db218df28b71367c6ffa42e3063" }, i("eds-input-field", {
212
+ key: 1,
213
+ name: "search",
214
+ "aria-label": "Search",
215
+ type: "text",
216
+ placeholder: "Search...",
217
+ // @ts-ignore
218
+ onInput: (o) => this.handleSearch(o)
219
+ })), i("div", { key: "da6ac91e4b4d56780b044a3d35088e7722efe143", class: "mt-20" }, i("table", { key: "3c5734d2370b31d2445ed4f043a80bf87c6d4bde", class: "block overflow-x-auto mt-6 p-0" }, i("thead", { key: "3803a39b4c987ff39bf22e2567bd1bc3d513e1f4" }, i("tr", { key: "a67fa7bdd48549c69cfa9721083a908ab036a559", class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((o) => {
220
+ var r;
221
+ return !(!((r = this.parsedConfig[o]) === null || r === void 0) && r.hidden) && i("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${n}px` } }, o);
222
+ }))), i("tbody", { key: "8e3f21bf2ee5b1bd84cfa93411ca2671f43ced45" }, t.map((o) => i("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((r) => {
223
+ var l;
224
+ return !(!((l = this.parsedConfig[r]) === null || l === void 0) && l.hidden) && i("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${n}px` } }, this.renderCell(o[r], r));
225
+ })))))), this.shouldEnablePagination() && i("div", { key: "24931f257ef9ced394c1b5b1e589cacedd8035e6", class: "mt-20" }, i("eds-pagination", { key: "996b26ae090ee4fe08cc821fb11362d94879ff72", currentPage: this.currentPage, lastPage: e, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })));
226
+ }
227
+ get hostEl() {
228
+ return g(this);
229
+ }
230
+ static get watchers() {
231
+ return {
232
+ data: ["handleDataChange", "parseData"],
233
+ config: ["handleConfigChange"]
234
+ };
235
+ }
236
+ };
237
+ m.style = p;
238
+ export {
239
+ f as eds_pagination,
240
+ m as eds_table
241
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-Dvww9rdy.js"),d="ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}",c=d,h=class{constructor(t){i.registerInstance(this,t),this.currentPage=void 0,this.lastPage=void 0,this.perPage=10,this.total=0,this.url="",this.mode="default",this.prevLabel="Prev",this.nextLabel="Next",this.prevUrl="",this.nextUrl="",this.links=[]}componentWillLoad(){this.mode==="default"&&this.generateLinks()}componentDidLoad(){const t=this.hostEl.shadowRoot.querySelectorAll("eds-link");t.length>0&&(this.emitContext(t[0]),t.length>1&&this.emitContext(t[t.length-1]))}emitContext(t){const e=new CustomEvent("parentContext",{detail:{componentName:this.hostEl.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(e)}onPageOrLastPageChange(){this.mode==="default"&&this.generateLinks()}isFirstPage(){return this.currentPage===1}isLastPage(){return this.currentPage===this.lastPage}generateLink(t){const e=this.url.includes("?");return{ariaLabel:`Page ${t}`,url:`${this.url}${e?"&":"?"}page=${t}`,label:t.toString(),current:this.currentPage===t,disabled:!1}}generateLinks(){this.lastPage&&this.lastPage>5?this.links=this.getPaginationGenerator(this.currentPage||1,this.lastPage).map(t=>typeof t=="number"?this.generateLink(t):t):this.lastPage&&(this.links=Array.from({length:this.lastPage}).map((t,e)=>this.generateLink(e+1)))}getPaginationGenerator(t,e){const a=[];if(e<=5)for(let n=1;n<=e;n++)a.push(n);else{a.push(1),t-1>2&&a.push("...");for(let n=Math.max(2,t-1);n<=Math.min(e-1,t+1);n++)a.push(n);t+1<e-1&&a.push("..."),a.push(e)}return a}pageResults(){return this.total>0?this.total>this.perPage?`${this.perPage*((this.currentPage||1)-1)+1} - ${this.perPage*(this.currentPage||1)>=this.total?this.total:this.perPage*(this.currentPage||1)} of ${this.total}`:`${this.total}`:""}handlePageClick(t,e){if(this.mode!=="navigator"&&(t.preventDefault(),e!==this.currentPage)){this.links=this.links.map(a=>typeof a=="object"?Object.assign(Object.assign({},a),{current:parseInt(a.label)===e}):a);const s=new CustomEvent("pageChange",{detail:e,bubbles:!0,composed:!0});this.hostEl.dispatchEvent(s),this.currentPage=e}}render(){return i.h("div",{key:"2385b59b0a8b2bbdc40bfc5032b846c0ec20065e"},this.total>0&&this.mode==="default"&&i.h("p",{key:"6aea281a4df247874f354469bbabae039424ad9e",class:"f-ui-03 text-lightest mb-28 w-full text-center"},i.h("span",{key:"eeb5f0ea902505c3853a30d51026cef9d9785e48",class:"sr-only"},"Results:"),this.pageResults()),this.mode==="navigator"||this.lastPage&&this.lastPage>1?i.h("nav",{"aria-label":"Pagination"},i.h("ul",{class:"flex items-center justify-center gap-x-8"},i.h("li",{class:"mr-auto"},i.h("eds-link",{label:this.prevLabel,url:this.mode==="navigator"?this.prevUrl||"#":this.isFirstPage()?"#":this.generateLink(this.currentPage-1).url,disabled:this.mode==="navigator"?!this.prevUrl:this.isFirstPage(),"aria-label":"Previous page",icon:"chevron-left","icon-pos":"left",size:"small","icon-small":"true",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pr-12",onClick:t=>{this.mode==="default"&&(this.isFirstPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)-1))}})),this.mode==="default"&&this.links.map((t,e)=>i.h("li",{key:e,class:"f-ui-02 flex h-36 items-center justify-center"},typeof t=="string"?i.h("span",{class:"flex items-center justify-center"},t):i.h("eds-link",{url:t.url,"aria-label":t.ariaLabel,label:t.label,current:t.current,size:"small",class:"!p-8",intent:t.current?"secondary":"ghost",onClick:s=>this.handlePageClick(s,parseInt(t.label))}))),i.h("li",{class:"ml-auto"},i.h("eds-link",{label:this.nextLabel,url:this.mode==="navigator"?this.nextUrl||"#":this.isLastPage()?"#":this.generateLink(this.currentPage+1).url,disabled:this.mode==="navigator"?!this.nextUrl:this.isLastPage(),"aria-label":"Next page",size:"small","icon-small":"true",icon:"chevron-right",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors",onClick:t=>{this.mode==="default"&&(this.isLastPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)+1))}})))):null)}get hostEl(){return i.getElement(this)}static get watchers(){return{currentPage:["onPageOrLastPageChange"],lastPage:["onPageOrLastPageChange"]}}};h.style=c;const f="table{text-indent:0;border-color:inherit;border-collapse:collapse;}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}",u=f,g=class{constructor(t){i.registerInstance(this,t),this.data=null,this.endpoint=null,this.config={},this.rowsPerPage=10,this.paginationEnabled=!0,this.searchEnabled=!1,this.hostWidth=void 0,this.columnSize="default",this.tableData=[],this.columns=[],this.currentPage=1,this.parsedConfig={},this.totalRows=0,this.searchQuery=""}handleDataChange(){this.parseData()}handleConfigChange(){this.parseConfig()}componentWillLoad(){this.parseConfig(),this.data?this.parseData():this.endpoint&&this.fetchData()}componentDidLoad(){this.setupPaginationListener()}componentDidUpdate(){this.setupPaginationListener()}parseData(){try{this.tableData=typeof this.data=="string"?JSON.parse(this.data):this.data||[],this.totalRows=this.tableData.length,this.updateColumns(),this.currentPage=1}catch(t){console.error("Failed to parse data:",t),this.tableData=[]}}parseConfig(){try{this.parsedConfig=typeof this.config=="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse config:",t),this.parsedConfig={}}}async fetchData(){try{const e=await(await fetch(this.endpoint)).json();this.data=e}catch(t){console.error("Failed to fetch data:",t)}}setupPaginationListener(){if(!this.shouldEnablePagination())return;const t=this.hostEl.shadowRoot.querySelector("eds-pagination");t&&!t.hasAttribute("listener-attached")&&(t.addEventListener("pageChange",e=>this.handlePageChange(e.detail)),t.setAttribute("listener-attached","true"))}getFilteredRows(){return this.tableData.filter(t=>Object.values(t).some(e=>e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())))}getPaginatedRows(){const t=this.getFilteredRows();this.totalRows=t.length;const e=(this.currentPage-1)*this.rowsPerPage;return t.slice(e,e+this.rowsPerPage)}handlePageChange(t){this.currentPage=t}handleSearch(t){this.searchQuery=t.target.value,this.currentPage=1}renderCell(t,e){var s;const a=(s=this.parsedConfig[e])===null||s===void 0?void 0:s.format;return a==="uppercase"?t==null?void 0:t.toString().toUpperCase():a==="svg"?i.h("div",{innerHTML:t}):a==="bold"?i.h("strong",null,t):a==="code"?i.h("code",null,t):t}shouldEnablePagination(){return this.paginationEnabled&&this.totalRows>this.rowsPerPage}updateColumns(){this.columns=this.tableData.length>0?Object.keys(this.tableData[0]):[]}getVisibleColumnsCount(){return this.columns.filter(t=>{var e;return!(!((e=this.parsedConfig[t])===null||e===void 0)&&e.hidden)}).length}divisionFactor(){let t=1;return this.columnSize==="medium"?t=2:this.columnSize==="large"&&(t=4),t}render(){const t=this.getPaginatedRows(),e=Math.ceil(this.totalRows/this.rowsPerPage),s=this.getVisibleColumnsCount(),a=this.hostWidth&&this.hostWidth.trim()!==""?Number(this.hostWidth):this.hostEl.parentElement instanceof HTMLElement?this.hostEl.parentElement.getBoundingClientRect().width:this.hostEl.getRootNode().host instanceof HTMLElement?this.hostEl.getRootNode().host.getBoundingClientRect().width:400,n=s>0?Math.floor(a/s*this.divisionFactor()):100;return console.log("columnWidth:",n),i.h("div",{key:"178a33c07e6eae9d5edc170f842b6ef29ae21d9c"},this.searchEnabled&&i.h("div",{key:"f1212a4e515a1db218df28b71367c6ffa42e3063"},i.h("eds-input-field",{key:1,name:"search","aria-label":"Search",type:"text",placeholder:"Search...",onInput:o=>this.handleSearch(o)})),i.h("div",{key:"da6ac91e4b4d56780b044a3d35088e7722efe143",class:"mt-20"},i.h("table",{key:"3c5734d2370b31d2445ed4f043a80bf87c6d4bde",class:"block overflow-x-auto mt-6 p-0"},i.h("thead",{key:"3803a39b4c987ff39bf22e2567bd1bc3d513e1f4"},i.h("tr",{key:"a67fa7bdd48549c69cfa9721083a908ab036a559",class:"m-0 p-0 border border-softer even:bg-inverse-softer"},this.columns.map(o=>{var r;return!(!((r=this.parsedConfig[o])===null||r===void 0)&&r.hidden)&&i.h("th",{class:"m-0 py-8 border border-softer f-ui-02 break-words",style:{minWidth:`${n}px`}},o)}))),i.h("tbody",{key:"8e3f21bf2ee5b1bd84cfa93411ca2671f43ced45"},t.map(o=>i.h("tr",{class:"m-0 p-0 border border-softer even:bg-inverse-softer"},this.columns.map(r=>{var l;return!(!((l=this.parsedConfig[r])===null||l===void 0)&&l.hidden)&&i.h("td",{class:"text-center border border-softer m-0 py-8 f-ui-2 break-words",style:{minWidth:`${n}px`}},this.renderCell(o[r],r))})))))),this.shouldEnablePagination()&&i.h("div",{key:"24931f257ef9ced394c1b5b1e589cacedd8035e6",class:"mt-20"},i.h("eds-pagination",{key:"996b26ae090ee4fe08cc821fb11362d94879ff72",currentPage:this.currentPage,lastPage:e,perPage:this.rowsPerPage,total:this.totalRows,mode:"default"})))}get hostEl(){return i.getElement(this)}static get watchers(){return{data:["handleDataChange","parseData"],config:["handleConfigChange"]}}};g.style=u;exports.eds_pagination=h;exports.eds_table=g;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-Dvww9rdy.js"),o=".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1 )}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}",i=o,r=class{constructor(e){t.registerInstance(this,e),this.value=0}async updateValue(e){this.value=Math.min(100,Math.max(0,e))}render(){const e=this.value;return t.h("div",{key:"3131f56034a9fd72ca51e448bc2bcc6281669b25",class:"outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden"},t.h("div",{key:"f1665a254f8dbe1ccb9e512e5f2e7c1e5ab88c07",class:"inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02",style:{width:`${e}%`}},e,"%"))}};r.style=i;exports.eds_progress_bar=r;
@@ -0,0 +1,21 @@
1
+ import { r, h as t } from "./index-Dg2DO7q4.mjs";
2
+ const o = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1 )}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}", a = o, i = class {
3
+ constructor(e) {
4
+ r(this, e), this.value = 0;
5
+ }
6
+ /**
7
+ * Method to update the progress value externally.
8
+ * @param newValue The new progress value (0-100).
9
+ */
10
+ async updateValue(e) {
11
+ this.value = Math.min(100, Math.max(0, e));
12
+ }
13
+ render() {
14
+ const e = this.value;
15
+ return t("div", { key: "3131f56034a9fd72ca51e448bc2bcc6281669b25", class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden" }, t("div", { key: "f1665a254f8dbe1ccb9e512e5f2e7c1e5ab88c07", class: "inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02", style: { width: `${e}%` } }, e, "%"));
16
+ }
17
+ };
18
+ i.style = a;
19
+ export {
20
+ i as eds_progress_bar
21
+ };