@ebrains/vue 0.9.1-beta → 0.9.2-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +18 -0
- package/package.json +1 -1
- package/project.json +9 -0
- package/src/generated/components.ts +374 -0
- package/src/generated/vue-component-lib/utils.ts +236 -0
- package/src/index.ts +1 -0
- package/src/vue-shims.d.ts +5 -0
- package/tsconfig.json +18 -0
- package/tsconfig.lib.json +27 -0
- package/vite.config.ts +71 -0
- package/analytics-44b1416b-3vYuu4Xs.mjs +0 -28
- package/analytics-44b1416b-ol77SdQE.js +0 -1
- package/arrow-diagonal-black-8f0494c3-CYl9yYTl.mjs +0 -4
- package/arrow-diagonal-black-8f0494c3-DqsB6ni-.js +0 -1
- package/arrow-right-9322ba8a-DBcxNU_p.js +0 -3
- package/arrow-right-9322ba8a-DHq-_PPe.mjs +0 -6
- package/bluesky-cc5edd2d-DaFQc-pr.js +0 -12
- package/bluesky-cc5edd2d-DfuDDO5h.mjs +0 -15
- package/bookmark-c200037c-CIcZ51ZQ.js +0 -14
- package/bookmark-c200037c-ClkCtyRY.mjs +0 -17
- package/chevron-down-6144c823-DWGlv9eV.mjs +0 -13
- package/chevron-down-6144c823-D_8976Ke.js +0 -10
- package/chevron-left-ca6c66e1-DANhLw_T.mjs +0 -12
- package/chevron-left-ca6c66e1-uCH5SUhm.js +0 -9
- package/chevron-right-b88ed2d4-C7dkTMvP.js +0 -3
- package/chevron-right-b88ed2d4-CgEZBvy7.mjs +0 -6
- package/chevron-up-c66bd477-ByW7R48t.js +0 -10
- package/chevron-up-c66bd477-CETJkshq.mjs +0 -13
- package/close-87fc0d63-Cbd-ScJr.js +0 -3
- package/close-87fc0d63-DtDU2HIU.mjs +0 -6
- package/color-2554aad6-CCcV5UJZ.mjs +0 -131
- package/color-2554aad6-D1hFGX4H.js +0 -1
- package/color-primary-palette_6.entry-DNCYKab1.js +0 -1
- package/color-primary-palette_6.entry-DrUcl0_Y.mjs +0 -300
- package/components-section.entry-BC6fAK4x.mjs +0 -351
- package/components-section.entry-Dpc-I4Dk.js +0 -162
- package/copy-03b72cb6-B_WCNQrG.mjs +0 -6
- package/copy-03b72cb6-CZAFAegx.js +0 -3
- package/correct-use-of-colors.entry-BIOVttVR.mjs +0 -59
- package/correct-use-of-colors.entry-D4g8NP4t.js +0 -1
- package/docs-palettes.entry-Af1cfpJK.js +0 -1
- package/docs-palettes.entry-CxxKTQmL.mjs +0 -22
- package/docs-tokens.entry-CSj74lMT.mjs +0 -30
- package/docs-tokens.entry-DbqTlBjk.js +0 -1
- package/eds-accordion.entry-66EwvfyQ.js +0 -4
- package/eds-accordion.entry-BAszhx2J.mjs +0 -48
- package/eds-alert.entry-B5fyoE-3.mjs +0 -825
- package/eds-alert.entry-D0UbYNdF.js +0 -739
- package/eds-app-root.entry-COtx8lgi.js +0 -1
- package/eds-app-root.entry-DaEWCpgJ.mjs +0 -25
- package/eds-avatar_26.entry-B5sFgktG.js +0 -31841
- package/eds-avatar_26.entry-D44mROee.mjs +0 -33438
- package/eds-card-desc_2.entry-B6UCTFjF.mjs +0 -53
- package/eds-card-desc_2.entry-CRAnQEYT.js +0 -1
- package/eds-card-generic.entry-BTkPV7Vy.mjs +0 -56
- package/eds-card-generic.entry-CO_LOs7j.js +0 -1
- package/eds-card-project.entry-DHpOvYZ4.mjs +0 -44
- package/eds-card-project.entry-DaYgAAhK.js +0 -1
- package/eds-card-section.entry-Cj1iWta9.js +0 -1
- package/eds-card-section.entry-Ckc5tKfn.mjs +0 -30
- package/eds-card-tags.entry-CC8HHmu1.js +0 -1
- package/eds-card-tags.entry-DTOC83TO.mjs +0 -13
- package/eds-card-tool.entry-BnSmQnIO.mjs +0 -56
- package/eds-card-tool.entry-DbRFRI44.js +0 -1
- package/eds-card-wrapper.entry-DqbihYMe.js +0 -1
- package/eds-card-wrapper.entry-pXRtDlUm.mjs +0 -24
- package/eds-code-block.entry-DOOwL4C5.js +0 -9
- package/eds-code-block.entry-DzjesAvq.mjs +0 -1623
- package/eds-cookies-preference.entry-BEg8_L1i.mjs +0 -20
- package/eds-cookies-preference.entry-DNieltJt.js +0 -1
- package/eds-feedback.entry-BPC8n5Vn.js +0 -1
- package/eds-feedback.entry-CamM3PGo.mjs +0 -53
- package/eds-frame.entry-BTSVnilU.mjs +0 -67
- package/eds-frame.entry-CxtCcM_D.js +0 -1
- package/eds-icon-arrow-diagonal.entry-Bi8IA-JD.mjs +0 -13
- package/eds-icon-arrow-diagonal.entry-CkydmAtM.js +0 -1
- package/eds-icon-arrow-right.entry-Bec767Po.mjs +0 -13
- package/eds-icon-arrow-right.entry-DnSc-hGl.js +0 -1
- package/eds-icon-bluesky.entry-CJ_G1Kz6.mjs +0 -13
- package/eds-icon-bluesky.entry-CKsxnx_w.js +0 -1
- package/eds-icon-bookmark.entry-CgY2a3NE.js +0 -1
- package/eds-icon-bookmark.entry-CxHfI52-.mjs +0 -13
- package/eds-icon-chevron-down.entry-BlFjZjFS.js +0 -1
- package/eds-icon-chevron-down.entry-MP6nKKWS.mjs +0 -13
- package/eds-icon-chevron-left.entry-B87gvMYL.mjs +0 -13
- package/eds-icon-chevron-left.entry-D0wG_pW7.js +0 -1
- package/eds-icon-chevron-right.entry-CBd-dMhk.mjs +0 -13
- package/eds-icon-chevron-right.entry-CK9NLouO.js +0 -1
- package/eds-icon-chevron-up.entry-B96ccoIQ.mjs +0 -13
- package/eds-icon-chevron-up.entry-CKC11GWB.js +0 -1
- package/eds-icon-close.entry-C82RssRf.js +0 -1
- package/eds-icon-close.entry-DKpCci_h.mjs +0 -13
- package/eds-icon-copy.entry-BLIFnGI7.mjs +0 -13
- package/eds-icon-copy.entry-DJvo9Oo3.js +0 -1
- package/eds-icon-eu.entry-CIiUxa85.mjs +0 -13
- package/eds-icon-eu.entry-fpbE22vn.js +0 -1
- package/eds-icon-external.entry-Bg3Jbh4o.mjs +0 -13
- package/eds-icon-external.entry-DB0_JlLk.js +0 -1
- package/eds-icon-facebook.entry-CqhEjMDs.js +0 -1
- package/eds-icon-facebook.entry-Cvcx9mzY.mjs +0 -13
- package/eds-icon-gitlab.entry-DkWowBSx.js +0 -1
- package/eds-icon-gitlab.entry-ZIUW3Too.mjs +0 -13
- package/eds-icon-linkedin.entry-zCYN0yJN.mjs +0 -13
- package/eds-icon-linkedin.entry-zJM5VYX8.js +0 -1
- package/eds-icon-loader.entry-D3A9DYDv.js +0 -1
- package/eds-icon-loader.entry-DgDDBLQe.mjs +0 -13
- package/eds-icon-mastodon.entry-B2ln6jUP.mjs +0 -13
- package/eds-icon-mastodon.entry-CQi1OZdh.js +0 -1
- package/eds-icon-menu.entry-BqYXrP_P.js +0 -1
- package/eds-icon-menu.entry-CRdmUv3E.mjs +0 -13
- package/eds-icon-minus.entry-C6oGK2_g.mjs +0 -13
- package/eds-icon-minus.entry-CmEXvebI.js +0 -1
- package/eds-icon-more.entry-BIQGWWip.js +0 -1
- package/eds-icon-more.entry-aXbszIap.mjs +0 -13
- package/eds-icon-paper.entry-Bh5C64H8.mjs +0 -13
- package/eds-icon-paper.entry-LgapgnWg.js +0 -1
- package/eds-icon-plus.entry-BR1mOml3.mjs +0 -13
- package/eds-icon-plus.entry-DlX5VFJR.js +0 -1
- package/eds-icon-portal.entry-C2DFez0R.js +0 -1
- package/eds-icon-portal.entry-CMARk8X7.mjs +0 -13
- package/eds-icon-private.entry-BwvhDAIy.mjs +0 -13
- package/eds-icon-private.entry-CbexBFUk.js +0 -1
- package/eds-icon-public.entry-D91FTOc3.mjs +0 -13
- package/eds-icon-public.entry-DQzoAi-2.js +0 -1
- package/eds-icon-search.entry-D6gOTsOF.js +0 -1
- package/eds-icon-search.entry-DVhN8_Ah.mjs +0 -13
- package/eds-icon-star.entry-CBJGqbz6.mjs +0 -13
- package/eds-icon-star.entry-CIhSd8HY.js +0 -1
- package/eds-icon-success.entry-VMJ6qL6H.mjs +0 -13
- package/eds-icon-success.entry-yZ0mp_pH.js +0 -1
- package/eds-icon-thumbs-down.entry-CfZk-XIH.js +0 -1
- package/eds-icon-thumbs-down.entry-CirzFHNd.mjs +0 -13
- package/eds-icon-thumbs-up.entry-C205X1kc.js +0 -1
- package/eds-icon-thumbs-up.entry-CyPLJvn-.mjs +0 -13
- package/eds-icon-tutorial.entry-Do4rIMaY.mjs +0 -13
- package/eds-icon-tutorial.entry-Dsyw0BBK.js +0 -1
- package/eds-icon-twitter.entry-D0QvrckP.mjs +0 -13
- package/eds-icon-twitter.entry-Dxbad6Ap.js +0 -1
- package/eds-icon-unknown.entry-Ml0duWB3.mjs +0 -13
- package/eds-icon-unknown.entry-p9JzenHC.js +0 -1
- package/eds-icon-updown.entry-CD8350rr.mjs +0 -13
- package/eds-icon-updown.entry-CX-0FN1w.js +0 -1
- package/eds-icon-user.entry-BL2cTAJm.js +0 -1
- package/eds-icon-user.entry-CoG-FatJ.mjs +0 -13
- package/eds-icon-youtube.entry-BLYOdnDv.js +0 -1
- package/eds-icon-youtube.entry-BuoKDZ5t.mjs +0 -13
- package/eds-login_2.entry-BLdyPn8z.js +0 -9
- package/eds-login_2.entry-vwx33ALN.mjs +0 -981
- package/eds-matomo-notice.entry-BcVjYajg.js +0 -1
- package/eds-matomo-notice.entry-DidLaLXw.mjs +0 -90
- package/eds-modal.entry-B31KFXpt.js +0 -1
- package/eds-modal.entry-CXNV__T1.mjs +0 -96
- package/eds-pagination_2.entry-C5PQOTQJ.js +0 -1
- package/eds-pagination_2.entry-CDArkgFj.mjs +0 -258
- package/eds-progress-bar.entry-D-pHajo4.mjs +0 -21
- package/eds-progress-bar.entry-DG0GXmeq.js +0 -1
- package/eds-rating.entry-C1Ek7Xei.mjs +0 -61
- package/eds-rating.entry-ftEmF4Qw.js +0 -1
- package/eds-section-core_2.entry-BpzqlBXJ.js +0 -1
- package/eds-section-core_2.entry-kmq9d4JE.mjs +0 -39
- package/eds-spinner.entry-DTgScdkA.js +0 -1
- package/eds-spinner.entry-a3Wjf-Vo.mjs +0 -36
- package/eds-switch.entry-CMr4qwoV.js +0 -1
- package/eds-switch.entry-Cztu_2n9.mjs +0 -20
- package/eds-tabs.entry-0DJ99piw.js +0 -7797
- package/eds-tabs.entry-DBHkSmJZ.mjs +0 -7900
- package/eds-timeline.entry-8DYAeWK9.js +0 -7797
- package/eds-timeline.entry-Cj0sAIIZ.mjs +0 -7842
- package/eds-toast-manager.entry-CSZROgRS.js +0 -1
- package/eds-toast-manager.entry-Cp-uvJ6e.mjs +0 -36
- package/eds-toast.entry-DxditNG2.mjs +0 -61
- package/eds-toast.entry-w5mMLqEh.js +0 -3
- package/eds-tooltip.entry-BkTKzXVD.js +0 -1
- package/eds-tooltip.entry-DiID9ZC6.mjs +0 -77
- package/eds-trl.entry-BEZPY301.js +0 -1
- package/eds-trl.entry-BrkymCLA.mjs +0 -34
- package/eu-9ddde93a-BFtIQw9B.js +0 -28
- package/eu-9ddde93a-ft4szvR5.mjs +0 -31
- package/facebook-9cb5c17f-BcUhbrj6.mjs +0 -15
- package/facebook-9cb5c17f-Y_gvQ682.js +0 -12
- package/generated/components.d.ts +0 -40
- package/generated/vue-component-lib/utils.d.ts +0 -16
- package/incorrect-use-of-colors.entry-D_MDnOxK.mjs +0 -42
- package/incorrect-use-of-colors.entry-HDLgRpVT.js +0 -1
- package/index-39c58238-BwYCDOHZ.mjs +0 -44
- package/index-39c58238-SQ-JC-LH.js +0 -1
- package/index-CMP6-ecb.mjs +0 -3622
- package/index-RvcWEz0j.js +0 -21
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.mjs +0 -42
- package/linkedin-e8650abb-BkDrkjzY.js +0 -26
- package/linkedin-e8650abb-DYMdsale.mjs +0 -29
- package/loader-c9628637-ChpnbJkv.mjs +0 -31
- package/loader-c9628637-Vj8Wt1e8.js +0 -28
- package/logo-color-7f1fd803-CFgbXdt8.mjs +0 -116
- package/logo-color-7f1fd803-DRD3vZVn.js +0 -113
- package/logo-color-margins-ff8ce71b-B9nMsY9Q.mjs +0 -119
- package/logo-color-margins-ff8ce71b-Dk06zr1Z.js +0 -116
- package/logo-space.entry-B05IQf3M.mjs +0 -19
- package/logo-space.entry-DtPQz2nj.js +0 -6
- package/logo-variations-horizontal_2.entry-BUcAWE9P.js +0 -7
- package/logo-variations-horizontal_2.entry-CuIHzZ_5.mjs +0 -29
- package/logo-variations-tabs.entry-BFQf55Y1.js +0 -1
- package/logo-variations-tabs.entry-nnh_qtBx.mjs +0 -22
- package/logo-white-no-bg-f382f86f-DXYn3NwV.js +0 -1011
- package/logo-white-no-bg-f382f86f-YhfmNmGG.mjs +0 -1022
- package/logo-wrong-usage.entry-CBpe4g63.js +0 -1
- package/logo-wrong-usage.entry-CQ3WROz1.mjs +0 -14
- package/mastodon-3703ec61-C7iI4Hk0.mjs +0 -15
- package/mastodon-3703ec61-C9v6Olc-.js +0 -12
- package/menu-340ea948-BpnYX3gY.mjs +0 -12
- package/menu-340ea948-ZdelWVw3.js +0 -9
- package/minus-b30a7c71-BPAvqHzH.mjs +0 -12
- package/minus-b30a7c71-DqCTe6Qh.js +0 -9
- package/mono-53f70232-DGi2XDlR.mjs +0 -12
- package/mono-53f70232-DgAsWvoQ.js +0 -9
- package/more-4449d549-D4HA1cRq.js +0 -11
- package/more-4449d549-rI9hOpEp.mjs +0 -14
- package/paper-8e74ea31-BvGrc1Vo.mjs +0 -16
- package/paper-8e74ea31-C4CV6tlB.js +0 -13
- package/plus-89c07be2-BTXnjg5K.js +0 -10
- package/plus-89c07be2-DyT9I4-L.mjs +0 -13
- package/portal-d6c8ce56-Cj61ldo8.mjs +0 -19
- package/portal-d6c8ce56-NpSrdNZ_.js +0 -16
- package/private-1c25ff8e-D3Fo36q6.js +0 -23
- package/private-1c25ff8e-Dz82_Xf8.mjs +0 -26
- package/public-d4d8c585-BJKDD5F6.mjs +0 -17
- package/public-d4d8c585-lV6QxdPw.js +0 -14
- package/search-fbcd79c2-BMxCaeEk.js +0 -10
- package/search-fbcd79c2-rfV0PlHP.mjs +0 -13
- package/sharedUtils-a550989c-Ci3Tx3jc.mjs +0 -15
- package/sharedUtils-a550989c-m4pF1Vqy.js +0 -1
- package/star-0da9b5e9-B3-jr0yE.js +0 -3
- package/star-0da9b5e9-DX8_iFmu.mjs +0 -6
- package/success-443809da-BD23vltm.mjs +0 -19
- package/success-443809da-BUEhLsAD.js +0 -16
- package/svg-repository.entry-CtZ9pBKr.mjs +0 -301
- package/svg-repository.entry-qTZFd69I.js +0 -173
- package/thumbs-down-a18fd049-CzuBAj99.mjs +0 -6
- package/thumbs-down-a18fd049-DTNIbYbm.js +0 -3
- package/thumbs-up-c19a71bc-CjLv5Wgw.mjs +0 -7
- package/thumbs-up-c19a71bc-w8Z8gegt.js +0 -4
- package/toastManager-d9eee791-CEYNwx25.mjs +0 -30
- package/toastManager-d9eee791-DvR_vUPI.js +0 -1
- package/token-list_3.entry-91wGiwGz.js +0 -1
- package/token-list_3.entry-C4RxixtE.mjs +0 -247
- package/token-ratios.entry-BmUxaqAu.js +0 -1
- package/token-ratios.entry-BvmPBjyB.mjs +0 -25
- package/token-typography.entry-DFkDpqQO.mjs +0 -213
- package/token-typography.entry-DvZ1QVjt.js +0 -2
- package/tutotial-150ee1fd-DFdyoHVA.mjs +0 -28
- package/tutotial-150ee1fd-DjN_JBL5.js +0 -25
- package/twitter-ac21b505-CGWVGWM9.mjs +0 -15
- package/twitter-ac21b505-DDdHS4hB.js +0 -12
- package/unknown-ed01a24c-B0AcMuip.js +0 -20
- package/unknown-ed01a24c-DonOUpIC.mjs +0 -23
- package/up-and-down-d747abee-CWoZjUyq.js +0 -10
- package/up-and-down-d747abee-D7g6H0T0.mjs +0 -13
- package/user-71ebdc15-BBKQbcQD.js +0 -14
- package/user-71ebdc15-CoHlCtJg.mjs +0 -17
- package/youtube-efbfbdc4-BLTH1Jl9.js +0 -12
- package/youtube-efbfbdc4-BfySbfjR.mjs +0 -15
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-RvcWEz0j.js"),o=require("./analytics-44b1416b-ol77SdQE.js"),n=".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}.z-\\[999999\\]{z-index:999999}.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))}}",i=n,a=class{constructor(e){t.registerInstance(this,e),this.consent=t.createEvent(this,"consent",7),this.heading="Analytics Consent",this.description="We use anonymous analytics to improve our services. No data is collected unless you give your consent. If you don't wish to send data right now, you can always re-enable analytics later by clicking the Cookies Preference button in the footer. However, by opting in today, you're joining a community that shapes our product's future—all while keeping your data completely anonymous.",this.optOutMessage="You are already part of our community, and your anonymous data helps shape our product's future! Rest assured, your privacy is fully protected.",this.forceShow=!1,this.showNotice=!0}toggleCookiesConsent(){this.showNotice=!this.showNotice}hasCookieConsent(){return!!document.cookie.split("; ").find(e=>e.startsWith("mtm_consent="))}optedOut(){return!!document.cookie.split("; ").find(e=>e.startsWith("mtm_consent_removed"))}getStorageKey(){return`${window.location.host}-matomo-deferred`}componentWillLoad(){if(localStorage.getItem("matomo-consent-given")==="out"||this.optedOut()){this.showNotice=!1;return}if(this.forceShow)this.showNotice=!0;else if(this.hasCookieConsent())this.showNotice=!1;else{const s=sessionStorage.getItem(this.getStorageKey());this.showNotice=!s}}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)}optInAnalytics(){o.matomoOptIn(),localStorage.removeItem("matomo-consent-given"),this.hideNotice(),this.consent.emit("in")}optOutAnalytics(){o.matomoOptOut(),this.hideNotice(),this.consent.emit("out")}noThanks(){localStorage.setItem("matomo-consent-given","out"),this.hideNotice()}deferDecision(){sessionStorage.setItem(this.getStorageKey(),"true"),this.hideNotice(),this.consent.emit("defer")}keepMeIn(){this.hideNotice()}hideNotice(){this.showNotice=!1}render(){return this.showNotice?t.h("div",{class:"fixed bottom-0 p-8 z-[999999] grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center"},t.h("eds-accordion",{title:this.heading,description:this.hasCookieConsent()?this.optOutMessage:this.description,switchBg:!0,expanded:!0},this.hasCookieConsent()?t.h("div",{class:"flex items-center gap-4"},this.optedOut()?t.h("eds-button",{intent:"primary",label:"Opt me in again","aria-label":"Opt me in again",onClick:()=>this.optInAnalytics()}):t.h("eds-button",{intent:"primary",label:"Keep Me In","aria-label":"Keep Me In",onClick:()=>this.keepMeIn()}),t.h("eds-button",{intent:"ghostInverse",label:"Opt-out","aria-label":"Opt-out from analytics",onClick:()=>this.optOutAnalytics()})):t.h("div",{class:"flex items-center gap-4"},t.h("eds-button",{intent:"primary",label:"I agree","aria-label":"Opt-in for analytics",onClick:()=>this.optInAnalytics()}),t.h("eds-button",{intent:"ghost",label:"No, thanks","aria-label":"Opt-out from analytics",onClick:()=>this.noThanks()}),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)}};a.style=i;exports.eds_matomo_notice=a;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { r as a, c as o, h as t, g as n } from "./index-CMP6-ecb.mjs";
|
|
2
|
-
import { m as i, a as r } from "./analytics-44b1416b-3vYuu4Xs.mjs";
|
|
3
|
-
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}.z-\\[999999\\]{z-index:999999}.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, m = class {
|
|
4
|
-
constructor(e) {
|
|
5
|
-
a(this, e), this.consent = o(this, "consent", 7), this.heading = "Analytics Consent", this.description = "We use anonymous analytics to improve our services. No data is collected unless you give your consent. If you don't wish to send data right now, you can always re-enable analytics later by clicking the Cookies Preference button in the footer. However, by opting in today, you're joining a community that shapes our product's future—all while keeping your data completely anonymous.", this.optOutMessage = "You are already part of our community, and your anonymous data helps shape our product's future! Rest assured, your privacy is fully protected.", this.forceShow = !1, this.showNotice = !0;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Listens for global custom events to open the matomo-consent.
|
|
9
|
-
*/
|
|
10
|
-
toggleCookiesConsent() {
|
|
11
|
-
this.showNotice = !this.showNotice;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Checks if the consent cookie exists.
|
|
15
|
-
*/
|
|
16
|
-
hasCookieConsent() {
|
|
17
|
-
return !!document.cookie.split("; ").find((e) => e.startsWith("mtm_consent="));
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Checks if the user has opted out after has opted in.
|
|
21
|
-
*/
|
|
22
|
-
optedOut() {
|
|
23
|
-
return !!document.cookie.split("; ").find((e) => e.startsWith("mtm_consent_removed"));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Generate a unique storage key based on appId or the app's domain.
|
|
27
|
-
*/
|
|
28
|
-
getStorageKey() {
|
|
29
|
-
return `${window.location.host}-matomo-deferred`;
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Check cookies and sessionStorage (unless forceShow is true) to decide if the notice should be shown.
|
|
33
|
-
*/
|
|
34
|
-
componentWillLoad() {
|
|
35
|
-
if (localStorage.getItem("matomo-consent-given") === "out" || this.optedOut()) {
|
|
36
|
-
this.showNotice = !1;
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
if (this.forceShow)
|
|
40
|
-
this.showNotice = !0;
|
|
41
|
-
else if (this.hasCookieConsent())
|
|
42
|
-
this.showNotice = !1;
|
|
43
|
-
else {
|
|
44
|
-
const s = sessionStorage.getItem(this.getStorageKey());
|
|
45
|
-
this.showNotice = !s;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
componentDidLoad() {
|
|
49
|
-
this.el.shadowRoot.querySelectorAll("eds-button").forEach((s) => {
|
|
50
|
-
this.emitContext(s);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
emitContext(e) {
|
|
54
|
-
const s = new CustomEvent("parentContext", {
|
|
55
|
-
detail: {
|
|
56
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
57
|
-
identifier: null
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
e.dispatchEvent(s);
|
|
61
|
-
}
|
|
62
|
-
optInAnalytics() {
|
|
63
|
-
i(), localStorage.removeItem("matomo-consent-given"), this.hideNotice(), this.consent.emit("in");
|
|
64
|
-
}
|
|
65
|
-
optOutAnalytics() {
|
|
66
|
-
r(), this.hideNotice(), this.consent.emit("out");
|
|
67
|
-
}
|
|
68
|
-
noThanks() {
|
|
69
|
-
localStorage.setItem("matomo-consent-given", "out"), this.hideNotice();
|
|
70
|
-
}
|
|
71
|
-
deferDecision() {
|
|
72
|
-
sessionStorage.setItem(this.getStorageKey(), "true"), this.hideNotice(), this.consent.emit("defer");
|
|
73
|
-
}
|
|
74
|
-
keepMeIn() {
|
|
75
|
-
this.hideNotice();
|
|
76
|
-
}
|
|
77
|
-
hideNotice() {
|
|
78
|
-
this.showNotice = !1;
|
|
79
|
-
}
|
|
80
|
-
render() {
|
|
81
|
-
return this.showNotice ? t("div", { class: "fixed bottom-0 p-8 z-[999999] grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center" }, t("eds-accordion", { title: this.heading, description: this.hasCookieConsent() ? this.optOutMessage : this.description, switchBg: !0, expanded: !0 }, this.hasCookieConsent() ? t("div", { class: "flex items-center gap-4" }, this.optedOut() ? t("eds-button", { intent: "primary", label: "Opt me in again", "aria-label": "Opt me in again", onClick: () => this.optInAnalytics() }) : t("eds-button", { intent: "primary", label: "Keep Me In", "aria-label": "Keep Me In", onClick: () => this.keepMeIn() }), t("eds-button", { intent: "ghostInverse", label: "Opt-out", "aria-label": "Opt-out from analytics", onClick: () => this.optOutAnalytics() })) : t("div", { class: "flex items-center gap-4" }, t("eds-button", { intent: "primary", label: "I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() }), t("eds-button", { intent: "ghost", label: "No, thanks", "aria-label": "Opt-out from analytics", onClick: () => this.noThanks() }), t("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))) : null;
|
|
82
|
-
}
|
|
83
|
-
get el() {
|
|
84
|
-
return n(this);
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
m.style = c;
|
|
88
|
-
export {
|
|
89
|
-
m as eds_matomo_notice
|
|
90
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-RvcWEz0j.js"),a=require("./analytics-44b1416b-ol77SdQE.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}.z-50{z-index:50}.z-9999999{z-index:9999999}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.left-20{left:1.25rem}.right-20{right:1.25rem}.top-1\\/2{top:50%}.top-20{top:1.25rem}.bottom-20{bottom:1.25rem}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}@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))}.md\\:gap-y-12{row-gap:0.75rem}}",s=i,r=class{constructor(e){t.registerInstance(this,e),this.isOpen=!1,this.heading="",this.truncate=!0,this.truncateLines="1",this.position="middle"}getTruncateClass(){return this.truncate&&this.truncateLines?`line-clamp-${this.truncateLines}`:""}getModalPositionClasses(){switch(this.position){case"top":return"md:left-1/2 top-20 md:-translate-x-1/2";case"bottom":return"md:left-1/2 bottom-20 md:-translate-x-1/2";case"left":return"left-20 top-1/2 -translate-y-1/2";case"right":return"right-20 top-1/2 -translate-y-1/2";case"middle":default:return"md:left-1/2 top-1/2 md:-translate-x-1/2 -translate-y-1/2"}}async open(){var e;this.isOpen=!0,a.sendAnalytics({category:"ui-component",parentContext:null,tag:this.el.tagName.toLowerCase(),name:((e=this.heading)===null||e===void 0?void 0:e.toLowerCase())||"",action:"opened"})}async close(){var e;this.isOpen=!1,a.sendAnalytics({category:"ui-component",parentContext:null,tag:this.el.tagName.toLowerCase(),name:((e=this.heading)===null||e===void 0?void 0:e.toLowerCase())||"",action:"closed"})}async toggle(){this.isOpen=!this.isOpen}handleGlobalOpen(){this.open()}handleGlobalClose(){this.close()}handleKeyDown(e){this.isOpen&&e.key==="Escape"&&this.close()}render(){const e=`modal-title-${this.el.tagName.toLowerCase()}`;return t.h("div",{key:"3965b74182a1015d34ebc0d5692ab89de44774e6",id:"eds-modal",class:`${this.isOpen?"block":"hidden"} fixed inset-0 z-9999999 flex`,role:"dialog","aria-modal":"true","aria-labelledby":e},this.isOpen&&t.h("div",{key:"c0df46234deb0945ba266e8f36a0b3944bd6d7bd",class:"fixed inset-0 bg-dark bg-opacity-90",onClick:()=>this.close()}),t.h("div",{key:"7fd65a4651ca67101b3a3e08ffd439070ccb8a96",class:`container max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center`},t.h("div",{key:"80102734c692934c486fd2e2d707286dd5660c69",class:"flex justify-between items-center border-b-2 border-softer pb-8"},t.h("span",{key:"b98138881f6eb4ee1fad3614eda4c91e5349b563",id:e,class:`f-heading-04 text-lighter ${this.getTruncateClass()}`},this.heading),t.h("eds-button",{key:"82f08e8ec6cbcb291c5d984ae97622d364bff5d0",intent:"tertiary",icon:"close","aria-label":"Close modal",onClick:()=>this.close(),"extra-class":"ml-8"})),t.h("div",{key:"2ea2fc21a8b734c40b1de4a20025a50f7369d375",class:"pt-8"},t.h("slot",{key:"ca0fa40b4076af9eea37c6b088d26751173e815c"}))))}get el(){return t.getElement(this)}};r.style=s;exports.eds_modal=r;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { r, h as t, g as i } from "./index-CMP6-ecb.mjs";
|
|
2
|
-
import { s as a } from "./analytics-44b1416b-3vYuu4Xs.mjs";
|
|
3
|
-
const s = ".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}.z-50{z-index:50}.z-9999999{z-index:9999999}.max-w-full{max-width:100%}.absolute{position:absolute}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-20{padding-top:1.25rem;padding-bottom:1.25rem}.bg-inverse{background-color:var(--white)}.bg-dark{background-color:var(--grey-300)}.rounded-lg{border-radius:16px}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.left-1\\/2{left:50%}.left-20{left:1.25rem}.right-20{right:1.25rem}.top-1\\/2{top:50%}.top-20{top:1.25rem}.bottom-20{bottom:1.25rem}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.border-b-2{border-bottom-width:2px}.border-softer{border-color:rgba(0, 0, 0, .1)}.pb-8{padding-bottom:0.5rem}.f-heading-03{font-family:var(--f-heading-03-fontFamily);font-weight:var(--f-heading-03-fontWeight);font-size:var(--f-heading-03-fontSize);line-height:var(--f-heading-03-lineHeight);letter-spacing:var(--f-heading-03-letterSpacing)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-8{margin-left:0.5rem}.pt-8{padding-top:0.5rem}.bg-opacity-90{opacity:0.9}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.line-clamp-3{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.line-clamp-4{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4}@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))}.md\\:gap-y-12{row-gap:0.75rem}}", o = s, n = class {
|
|
4
|
-
constructor(e) {
|
|
5
|
-
r(this, e), this.isOpen = !1, this.heading = "", this.truncate = !0, this.truncateLines = "1", this.position = "middle";
|
|
6
|
-
}
|
|
7
|
-
getTruncateClass() {
|
|
8
|
-
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : "";
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Returns the Tailwind CSS classes to position the modal based on the `position` prop.
|
|
12
|
-
*
|
|
13
|
-
* @private
|
|
14
|
-
* @returns {string} The concatenated CSS classes for modal positioning.
|
|
15
|
-
*/
|
|
16
|
-
getModalPositionClasses() {
|
|
17
|
-
switch (this.position) {
|
|
18
|
-
case "top":
|
|
19
|
-
return "md:left-1/2 top-20 md:-translate-x-1/2";
|
|
20
|
-
case "bottom":
|
|
21
|
-
return "md:left-1/2 bottom-20 md:-translate-x-1/2";
|
|
22
|
-
case "left":
|
|
23
|
-
return "left-20 top-1/2 -translate-y-1/2";
|
|
24
|
-
case "right":
|
|
25
|
-
return "right-20 top-1/2 -translate-y-1/2";
|
|
26
|
-
case "middle":
|
|
27
|
-
default:
|
|
28
|
-
return "md:left-1/2 top-1/2 md:-translate-x-1/2 -translate-y-1/2";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Opens the modal.
|
|
33
|
-
*/
|
|
34
|
-
async open() {
|
|
35
|
-
var e;
|
|
36
|
-
this.isOpen = !0, a({
|
|
37
|
-
category: "ui-component",
|
|
38
|
-
parentContext: null,
|
|
39
|
-
tag: this.el.tagName.toLowerCase(),
|
|
40
|
-
name: ((e = this.heading) === null || e === void 0 ? void 0 : e.toLowerCase()) || "",
|
|
41
|
-
action: "opened"
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Closes the modal.
|
|
46
|
-
*/
|
|
47
|
-
async close() {
|
|
48
|
-
var e;
|
|
49
|
-
this.isOpen = !1, a({
|
|
50
|
-
category: "ui-component",
|
|
51
|
-
parentContext: null,
|
|
52
|
-
tag: this.el.tagName.toLowerCase(),
|
|
53
|
-
name: ((e = this.heading) === null || e === void 0 ? void 0 : e.toLowerCase()) || "",
|
|
54
|
-
action: "closed"
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Toggles the modal open or closed.
|
|
59
|
-
*/
|
|
60
|
-
async toggle() {
|
|
61
|
-
this.isOpen = !this.isOpen;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Listens for global custom events to open the modal.
|
|
65
|
-
*/
|
|
66
|
-
handleGlobalOpen() {
|
|
67
|
-
this.open();
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Listens for global custom events to close the modal.
|
|
71
|
-
*/
|
|
72
|
-
handleGlobalClose() {
|
|
73
|
-
this.close();
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Closes the modal when the Escape key is pressed.
|
|
77
|
-
*/
|
|
78
|
-
handleKeyDown(e) {
|
|
79
|
-
this.isOpen && e.key === "Escape" && this.close();
|
|
80
|
-
}
|
|
81
|
-
render() {
|
|
82
|
-
const e = `modal-title-${this.el.tagName.toLowerCase()}`;
|
|
83
|
-
return t("div", { key: "3965b74182a1015d34ebc0d5692ab89de44774e6", id: "eds-modal", class: `${this.isOpen ? "block" : "hidden"} fixed inset-0 z-9999999 flex`, role: "dialog", "aria-modal": "true", "aria-labelledby": e }, this.isOpen && t("div", {
|
|
84
|
-
key: "c0df46234deb0945ba266e8f36a0b3944bd6d7bd",
|
|
85
|
-
class: "fixed inset-0 bg-dark bg-opacity-90",
|
|
86
|
-
onClick: () => this.close()
|
|
87
|
-
}), t("div", { key: "7fd65a4651ca67101b3a3e08ffd439070ccb8a96", class: `container max-w-full absolute px-20 py-20 bg-inverse rounded-lg shadow-lg z-10 ${this.getModalPositionClasses()} grow justify-center` }, t("div", { key: "80102734c692934c486fd2e2d707286dd5660c69", class: "flex justify-between items-center border-b-2 border-softer pb-8" }, t("span", { key: "b98138881f6eb4ee1fad3614eda4c91e5349b563", id: e, class: `f-heading-04 text-lighter ${this.getTruncateClass()}` }, this.heading), t("eds-button", { key: "82f08e8ec6cbcb291c5d984ae97622d364bff5d0", intent: "tertiary", icon: "close", "aria-label": "Close modal", onClick: () => this.close(), "extra-class": "ml-8" })), t("div", { key: "2ea2fc21a8b734c40b1de4a20025a50f7369d375", class: "pt-8" }, t("slot", { key: "ca0fa40b4076af9eea37c6b088d26751173e815c" }))));
|
|
88
|
-
}
|
|
89
|
-
get el() {
|
|
90
|
-
return i(this);
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
|
-
n.style = o;
|
|
94
|
-
export {
|
|
95
|
-
n as eds_modal
|
|
96
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-RvcWEz0j.js"),g=require("./analytics-44b1416b-ol77SdQE.js"),c=require("./sharedUtils-a550989c-m4pF1Vqy.js"),u="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}}",f=u,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(){this.hostEl.shadowRoot.querySelectorAll("eds-link").forEach(e=>{this.emitContext(e)})}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("page",{detail:e,bubbles:!0,composed:!0});this.hostEl.dispatchEvent(s),this.currentPage=e}}render(){return i.h("div",{key:"b33415e05457ccc78ea3744a1baa9affbf38ca4a"},this.total>0&&this.mode==="default"&&i.h("p",{key:"e555e94a3fd13cf0d57108bd2cca3fb97cd0c688",class:"f-ui-03 text-lightest mb-28 w-full text-center"},i.h("span",{key:"c63f1d5aa6154a23d714c74dcd9a0a75b68df579",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=f;const p="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}",m=p,d=class{constructor(t){i.registerInstance(this,t),this.handleResize=()=>{this.updateContainerWidth()},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.tbData=[],this.columns=[],this.currentPage=1,this.parsedConfig={},this.totalRows=0,this.searchQuery="",this.containerWidth=0}handleDataChange(){this.parseData()}handleConfigChange(){this.parseConfig()}componentWillLoad(){this.parseConfig(),this.data?this.parseData():this.endpoint&&this.fetchData()}componentDidLoad(){this.updateContainerWidth(),window.addEventListener("resize",this.handleResize),this.setupPaginationListener()}componentDidUpdate(){this.setupPaginationListener()}disconnectedCallback(){window.removeEventListener("resize",this.handleResize)}updateContainerWidth(){this.hostWidth&&this.hostWidth.trim()!==""?this.containerWidth=Number(this.hostWidth):this.hostEl.parentElement instanceof HTMLElement?this.containerWidth=this.hostEl.parentElement.getBoundingClientRect().width:this.containerWidth=400}parseData(){try{this.tbData=c.parseData(this.data),this.totalRows=this.tbData.length,this.updateColumns(),this.currentPage=1}catch(t){console.error("Failed to parse data:",t),this.tbData=[]}}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("page",e=>this.handlePageChange(e.detail)),t.setAttribute("listener-attached","true"))}getFilteredRows(){return this.tbData.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,g.sendAnalytics({category:"ui-component",parentContext:null,tag:`${this.hostEl.tagName.toLowerCase()}/eds-pagination`,name:`${t}`||"",action:"page"})}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.tbData.length>0?Object.keys(this.tbData[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.hostWidth&&this.hostWidth.trim()!==""?Number(this.hostWidth):this.containerWidth||400,e=this.getVisibleColumnsCount(),s=e>0?Math.floor(t/e*this.divisionFactor()):100,a=this.getPaginatedRows(),n=Math.ceil(this.totalRows/this.rowsPerPage);return i.h("div",{key:"43add2309d8e2c85c98676709cd87fc07e4de017"},this.searchEnabled&&i.h("div",{key:"1213d8aaa8a2402bd1705e03375d17f570877d5e"},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:"a2ec6392ed99a527e4de46a9018bc1ea9b383ecb",class:"mt-20"},i.h("table",{key:"ef79ce872f0cb1439dd6a7987f24cac005ac23ea",class:"block overflow-x-auto mt-6 p-0"},i.h("thead",{key:"0853a09e45f748b4bc85e319cbb08efd97426617"},i.h("tr",{key:"64e114ae3661a027e9ab744ba45801d98f2faee9",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:`${s-4}px`}},o)}))),i.h("tbody",{key:"1afd468551bab11221bbfc70d0f19f4e105e7432"},a.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:`${s-4}px`}},this.renderCell(o[r],r))})))))),this.shouldEnablePagination()&&i.h("div",{key:"c415ded700580eec2464a72a1659bd8be5bcacb3",class:"mt-20"},i.h("eds-pagination",{key:"81088574b7c7fd254e07761ceed6cd1d69c2f2ed",currentPage:this.currentPage,lastPage:n,perPage:this.rowsPerPage,total:this.totalRows,mode:"default"})))}get hostEl(){return i.getElement(this)}static get watchers(){return{data:["handleDataChange","parseData"],config:["handleConfigChange"]}}};d.style=m;exports.eds_pagination=h;exports.eds_table=d;
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { r as h, h as i, g as d } from "./index-CMP6-ecb.mjs";
|
|
2
|
-
import { s as g } from "./analytics-44b1416b-3vYuu4Xs.mjs";
|
|
3
|
-
import { p as c } from "./sharedUtils-a550989c-Ci3Tx3jc.mjs";
|
|
4
|
-
const u = "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}}", f = u, p = class {
|
|
5
|
-
constructor(t) {
|
|
6
|
-
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 = [];
|
|
7
|
-
}
|
|
8
|
-
/** Lifecycle hook to generate pagination links on component load */
|
|
9
|
-
componentWillLoad() {
|
|
10
|
-
this.mode === "default" && this.generateLinks();
|
|
11
|
-
}
|
|
12
|
-
componentDidLoad() {
|
|
13
|
-
this.hostEl.shadowRoot.querySelectorAll("eds-link").forEach((e) => {
|
|
14
|
-
this.emitContext(e);
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
19
|
-
* This event provides context information about the breadcrumb component.
|
|
20
|
-
*
|
|
21
|
-
* @param linkElement - The link element to which the event will be dispatched.
|
|
22
|
-
*/
|
|
23
|
-
emitContext(t) {
|
|
24
|
-
const e = new CustomEvent("parentContext", {
|
|
25
|
-
detail: {
|
|
26
|
-
componentName: this.hostEl.tagName.toLowerCase(),
|
|
27
|
-
identifier: null
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
t.dispatchEvent(e);
|
|
31
|
-
}
|
|
32
|
-
onPageOrLastPageChange() {
|
|
33
|
-
this.mode === "default" && this.generateLinks();
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Checks if the current page is the first page
|
|
37
|
-
* @returns {boolean} - true if current page is the first page
|
|
38
|
-
*/
|
|
39
|
-
isFirstPage() {
|
|
40
|
-
return this.currentPage === 1;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Checks if the current page is the last page
|
|
44
|
-
* @returns {boolean} - true if current page is the last page
|
|
45
|
-
*/
|
|
46
|
-
isLastPage() {
|
|
47
|
-
return this.currentPage === this.lastPage;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Generates a pagination link object
|
|
51
|
-
* @param {number} page - Page number for the link
|
|
52
|
-
* @returns {Link} - Link object with page details
|
|
53
|
-
*/
|
|
54
|
-
generateLink(t) {
|
|
55
|
-
const e = this.url.includes("?");
|
|
56
|
-
return {
|
|
57
|
-
ariaLabel: `Page ${t}`,
|
|
58
|
-
url: `${this.url}${e ? "&" : "?"}page=${t}`,
|
|
59
|
-
label: t.toString(),
|
|
60
|
-
current: this.currentPage === t,
|
|
61
|
-
disabled: !1
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
/** Generates pagination links based on the last page and current page */
|
|
65
|
-
generateLinks() {
|
|
66
|
-
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)));
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Creates a pagination range based on delta, current, and total pages
|
|
70
|
-
* @param {number} current - Current page number
|
|
71
|
-
* @param {number} total - Total number of pages
|
|
72
|
-
* @param {number} delta - Range of pages to display around the current page
|
|
73
|
-
* @returns {(number | string)[]} - Range of page numbers or ellipses
|
|
74
|
-
*/
|
|
75
|
-
getPaginationGenerator(t, e) {
|
|
76
|
-
const a = [];
|
|
77
|
-
if (e <= 5)
|
|
78
|
-
for (let n = 1; n <= e; n++)
|
|
79
|
-
a.push(n);
|
|
80
|
-
else {
|
|
81
|
-
a.push(1), t - 1 > 2 && a.push("...");
|
|
82
|
-
for (let n = Math.max(2, t - 1); n <= Math.min(e - 1, t + 1); n++)
|
|
83
|
-
a.push(n);
|
|
84
|
-
t + 1 < e - 1 && a.push("..."), a.push(e);
|
|
85
|
-
}
|
|
86
|
-
return a;
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Formats the current page results information for display
|
|
90
|
-
* @returns {string} - Formatted page result information
|
|
91
|
-
*/
|
|
92
|
-
pageResults() {
|
|
93
|
-
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}` : "";
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Handles a page click event, updating the current page and dispatching an event
|
|
97
|
-
* @param {MouseEvent} event - Click event
|
|
98
|
-
* @param {number} newPage - New page number
|
|
99
|
-
*/
|
|
100
|
-
handlePageClick(t, e) {
|
|
101
|
-
if (this.mode !== "navigator" && (t.preventDefault(), e !== this.currentPage)) {
|
|
102
|
-
this.links = this.links.map((a) => typeof a == "object" ? Object.assign(Object.assign({}, a), { current: parseInt(a.label) === e }) : a);
|
|
103
|
-
const s = new CustomEvent("page", {
|
|
104
|
-
detail: e,
|
|
105
|
-
bubbles: !0,
|
|
106
|
-
composed: !0
|
|
107
|
-
});
|
|
108
|
-
this.hostEl.dispatchEvent(s), this.currentPage = e;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
render() {
|
|
112
|
-
return i("div", { key: "b33415e05457ccc78ea3744a1baa9affbf38ca4a" }, this.total > 0 && this.mode === "default" && i("p", { key: "e555e94a3fd13cf0d57108bd2cca3fb97cd0c688", class: "f-ui-03 text-lightest mb-28 w-full text-center" }, i("span", { key: "c63f1d5aa6154a23d714c74dcd9a0a75b68df579", 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) => {
|
|
113
|
-
this.mode === "default" && (this.isFirstPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) - 1));
|
|
114
|
-
} })), 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) => {
|
|
115
|
-
this.mode === "default" && (this.isLastPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) + 1));
|
|
116
|
-
} })))) : null);
|
|
117
|
-
}
|
|
118
|
-
get hostEl() {
|
|
119
|
-
return d(this);
|
|
120
|
-
}
|
|
121
|
-
static get watchers() {
|
|
122
|
-
return {
|
|
123
|
-
currentPage: ["onPageOrLastPageChange"],
|
|
124
|
-
lastPage: ["onPageOrLastPageChange"]
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
p.style = f;
|
|
129
|
-
const m = "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}", b = m, v = class {
|
|
130
|
-
constructor(t) {
|
|
131
|
-
h(this, t), this.handleResize = () => {
|
|
132
|
-
this.updateContainerWidth();
|
|
133
|
-
}, 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.tbData = [], this.columns = [], this.currentPage = 1, this.parsedConfig = {}, this.totalRows = 0, this.searchQuery = "", this.containerWidth = 0;
|
|
134
|
-
}
|
|
135
|
-
handleDataChange() {
|
|
136
|
-
this.parseData();
|
|
137
|
-
}
|
|
138
|
-
handleConfigChange() {
|
|
139
|
-
this.parseConfig();
|
|
140
|
-
}
|
|
141
|
-
componentWillLoad() {
|
|
142
|
-
this.parseConfig(), this.data ? this.parseData() : this.endpoint && this.fetchData();
|
|
143
|
-
}
|
|
144
|
-
componentDidLoad() {
|
|
145
|
-
this.updateContainerWidth(), window.addEventListener("resize", this.handleResize), this.setupPaginationListener();
|
|
146
|
-
}
|
|
147
|
-
componentDidUpdate() {
|
|
148
|
-
this.setupPaginationListener();
|
|
149
|
-
}
|
|
150
|
-
disconnectedCallback() {
|
|
151
|
-
window.removeEventListener("resize", this.handleResize);
|
|
152
|
-
}
|
|
153
|
-
updateContainerWidth() {
|
|
154
|
-
this.hostWidth && this.hostWidth.trim() !== "" ? this.containerWidth = Number(this.hostWidth) : this.hostEl.parentElement instanceof HTMLElement ? this.containerWidth = this.hostEl.parentElement.getBoundingClientRect().width : this.containerWidth = 400;
|
|
155
|
-
}
|
|
156
|
-
parseData() {
|
|
157
|
-
try {
|
|
158
|
-
this.tbData = c(this.data), this.totalRows = this.tbData.length, this.updateColumns(), this.currentPage = 1;
|
|
159
|
-
} catch (t) {
|
|
160
|
-
console.error("Failed to parse data:", t), this.tbData = [];
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
parseConfig() {
|
|
164
|
-
try {
|
|
165
|
-
this.parsedConfig = typeof this.config == "string" ? JSON.parse(this.config) : this.config;
|
|
166
|
-
} catch (t) {
|
|
167
|
-
console.error("Failed to parse config:", t), this.parsedConfig = {};
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
async fetchData() {
|
|
171
|
-
try {
|
|
172
|
-
const e = await (await fetch(this.endpoint)).json();
|
|
173
|
-
this.data = e;
|
|
174
|
-
} catch (t) {
|
|
175
|
-
console.error("Failed to fetch data:", t);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
setupPaginationListener() {
|
|
179
|
-
if (!this.shouldEnablePagination())
|
|
180
|
-
return;
|
|
181
|
-
const t = this.hostEl.shadowRoot.querySelector("eds-pagination");
|
|
182
|
-
t && !t.hasAttribute("listener-attached") && (t.addEventListener("page", (e) => this.handlePageChange(e.detail)), t.setAttribute("listener-attached", "true"));
|
|
183
|
-
}
|
|
184
|
-
getFilteredRows() {
|
|
185
|
-
return this.tbData.filter((t) => Object.values(t).some((e) => e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())));
|
|
186
|
-
}
|
|
187
|
-
getPaginatedRows() {
|
|
188
|
-
const t = this.getFilteredRows();
|
|
189
|
-
this.totalRows = t.length;
|
|
190
|
-
const e = (this.currentPage - 1) * this.rowsPerPage;
|
|
191
|
-
return t.slice(e, e + this.rowsPerPage);
|
|
192
|
-
}
|
|
193
|
-
handlePageChange(t) {
|
|
194
|
-
this.currentPage = t, g({
|
|
195
|
-
category: "ui-component",
|
|
196
|
-
parentContext: null,
|
|
197
|
-
tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
|
|
198
|
-
name: `${t}` || "",
|
|
199
|
-
action: "page"
|
|
200
|
-
});
|
|
201
|
-
}
|
|
202
|
-
handleSearch(t) {
|
|
203
|
-
this.searchQuery = t.target.value, this.currentPage = 1;
|
|
204
|
-
}
|
|
205
|
-
renderCell(t, e) {
|
|
206
|
-
var s;
|
|
207
|
-
const a = (s = this.parsedConfig[e]) === null || s === void 0 ? void 0 : s.format;
|
|
208
|
-
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;
|
|
209
|
-
}
|
|
210
|
-
shouldEnablePagination() {
|
|
211
|
-
return this.paginationEnabled && this.totalRows > this.rowsPerPage;
|
|
212
|
-
}
|
|
213
|
-
updateColumns() {
|
|
214
|
-
this.columns = this.tbData.length > 0 ? Object.keys(this.tbData[0]) : [];
|
|
215
|
-
}
|
|
216
|
-
getVisibleColumnsCount() {
|
|
217
|
-
return this.columns.filter((t) => {
|
|
218
|
-
var e;
|
|
219
|
-
return !(!((e = this.parsedConfig[t]) === null || e === void 0) && e.hidden);
|
|
220
|
-
}).length;
|
|
221
|
-
}
|
|
222
|
-
divisionFactor() {
|
|
223
|
-
let t = 1;
|
|
224
|
-
return this.columnSize === "medium" ? t = 2 : this.columnSize === "large" && (t = 4), t;
|
|
225
|
-
}
|
|
226
|
-
render() {
|
|
227
|
-
const t = this.hostWidth && this.hostWidth.trim() !== "" ? Number(this.hostWidth) : this.containerWidth || 400, e = this.getVisibleColumnsCount(), s = e > 0 ? Math.floor(t / e * this.divisionFactor()) : 100, a = this.getPaginatedRows(), n = Math.ceil(this.totalRows / this.rowsPerPage);
|
|
228
|
-
return i("div", { key: "43add2309d8e2c85c98676709cd87fc07e4de017" }, this.searchEnabled && i("div", { key: "1213d8aaa8a2402bd1705e03375d17f570877d5e" }, i("eds-input-field", {
|
|
229
|
-
key: 1,
|
|
230
|
-
name: "search",
|
|
231
|
-
"aria-label": "Search",
|
|
232
|
-
type: "text",
|
|
233
|
-
placeholder: "Search...",
|
|
234
|
-
// @ts-ignore
|
|
235
|
-
onInput: (o) => this.handleSearch(o)
|
|
236
|
-
})), i("div", { key: "a2ec6392ed99a527e4de46a9018bc1ea9b383ecb", class: "mt-20" }, i("table", { key: "ef79ce872f0cb1439dd6a7987f24cac005ac23ea", class: "block overflow-x-auto mt-6 p-0" }, i("thead", { key: "0853a09e45f748b4bc85e319cbb08efd97426617" }, i("tr", { key: "64e114ae3661a027e9ab744ba45801d98f2faee9", class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((o) => {
|
|
237
|
-
var r;
|
|
238
|
-
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: `${s - 4}px` } }, o);
|
|
239
|
-
}))), i("tbody", { key: "1afd468551bab11221bbfc70d0f19f4e105e7432" }, a.map((o) => i("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((r) => {
|
|
240
|
-
var l;
|
|
241
|
-
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: `${s - 4}px` } }, this.renderCell(o[r], r));
|
|
242
|
-
})))))), this.shouldEnablePagination() && i("div", { key: "c415ded700580eec2464a72a1659bd8be5bcacb3", class: "mt-20" }, i("eds-pagination", { key: "81088574b7c7fd254e07761ceed6cd1d69c2f2ed", currentPage: this.currentPage, lastPage: n, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })));
|
|
243
|
-
}
|
|
244
|
-
get hostEl() {
|
|
245
|
-
return d(this);
|
|
246
|
-
}
|
|
247
|
-
static get watchers() {
|
|
248
|
-
return {
|
|
249
|
-
data: ["handleDataChange", "parseData"],
|
|
250
|
-
config: ["handleConfigChange"]
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
v.style = b;
|
|
255
|
-
export {
|
|
256
|
-
p as eds_pagination,
|
|
257
|
-
v as eds_table
|
|
258
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { r as t, h as r } from "./index-CMP6-ecb.mjs";
|
|
2
|
-
const a = ".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)}", o = a, i = class {
|
|
3
|
-
constructor(e) {
|
|
4
|
-
t(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 r("div", { key: "9a7fa42058034305b22818d464e7b633d7831d67", role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": e, "aria-valuetext": `${e}%`, class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden" }, r("div", { key: "90b0ac9a538b575a30163c0dbbf437e1cfe8ce39", 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 = o;
|
|
19
|
-
export {
|
|
20
|
-
i as eds_progress_bar
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-RvcWEz0j.js"),a=".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)}",o=a,t=class{constructor(e){r.registerInstance(this,e),this.value=0}async updateValue(e){this.value=Math.min(100,Math.max(0,e))}render(){const e=this.value;return r.h("div",{key:"9a7fa42058034305b22818d464e7b633d7831d67",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e,"aria-valuetext":`${e}%`,class:"outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden"},r.h("div",{key:"90b0ac9a538b575a30163c0dbbf437e1cfe8ce39",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,"%"))}};t.style=o;exports.eds_progress_bar=t;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { r as s, c as n, h as i, g as o } from "./index-CMP6-ecb.mjs";
|
|
2
|
-
const l = ":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}", c = l, m = class {
|
|
3
|
-
constructor(t) {
|
|
4
|
-
s(this, t), this.rating = n(this, "rating", 7), this.ratingType = "star", this.ratingCount = 5, this.selectedRating = 0;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Lifecycle method that runs when the component has fully loaded.
|
|
8
|
-
* It emits a custom event for each `eds-button` element contained within the breadcrumb.
|
|
9
|
-
*/
|
|
10
|
-
componentDidLoad() {
|
|
11
|
-
this.el.shadowRoot.querySelectorAll("eds-button").forEach((e) => {
|
|
12
|
-
this.emitContext(e);
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Emits a custom event called `parentContext` for a given link element.
|
|
17
|
-
* This event provides context information about the breadcrumb component.
|
|
18
|
-
*
|
|
19
|
-
* @param btnElement - The link element to which the event will be dispatched.
|
|
20
|
-
*/
|
|
21
|
-
emitContext(t) {
|
|
22
|
-
const e = new CustomEvent("parentContext", {
|
|
23
|
-
detail: {
|
|
24
|
-
componentName: this.el.tagName.toLowerCase(),
|
|
25
|
-
identifier: this.selectedRating
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
t.dispatchEvent(e);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Handles the click event on a star.
|
|
32
|
-
* @param rating - The selected rating value.
|
|
33
|
-
*/
|
|
34
|
-
handleClick(t) {
|
|
35
|
-
this.selectedRating = t, this.rating.emit(t);
|
|
36
|
-
}
|
|
37
|
-
render() {
|
|
38
|
-
return i("div", { key: "2ab4f3dbc4cc3dd5272143e99c67b23086b03e18", role: "radiogroup", class: "stars flex space-x-1 my-8" }, Array.from({ length: this.ratingCount }, (t, e) => {
|
|
39
|
-
const a = e + 1, r = a <= this.selectedRating;
|
|
40
|
-
return i("eds-button", {
|
|
41
|
-
icon: this.ratingType,
|
|
42
|
-
role: "radio",
|
|
43
|
-
"aria-checked": r ? "true" : "false",
|
|
44
|
-
"aria-label": this.ratingType,
|
|
45
|
-
onClick: () => this.handleClick(a),
|
|
46
|
-
tabIndex: this.selectedRating === 0 && e === 0 || r ? 0 : -1,
|
|
47
|
-
intent: r ? "primary" : "ghost",
|
|
48
|
-
size: "large",
|
|
49
|
-
"extra-class": "p-2"
|
|
50
|
-
// Optional padding or styling for the star button
|
|
51
|
-
});
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
get el() {
|
|
55
|
-
return o(this);
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
m.style = c;
|
|
59
|
-
export {
|
|
60
|
-
m as eds_rating
|
|
61
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-RvcWEz0j.js"),s=":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}",o=s,n=class{constructor(e){r.registerInstance(this,e),this.rating=r.createEvent(this,"rating",7),this.ratingType="star",this.ratingCount=5,this.selectedRating=0}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach(t=>{this.emitContext(t)})}emitContext(e){const t=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:this.selectedRating}});e.dispatchEvent(t)}handleClick(e){this.selectedRating=e,this.rating.emit(e)}render(){return r.h("div",{key:"2ab4f3dbc4cc3dd5272143e99c67b23086b03e18",role:"radiogroup",class:"stars flex space-x-1 my-8"},Array.from({length:this.ratingCount},(e,t)=>{const a=t+1,i=a<=this.selectedRating;return r.h("eds-button",{icon:this.ratingType,role:"radio","aria-checked":i?"true":"false","aria-label":this.ratingType,onClick:()=>this.handleClick(a),tabIndex:this.selectedRating===0&&t===0||i?0:-1,intent:i?"primary":"ghost",size:"large","extra-class":"p-2"})}))}get el(){return r.getElement(this)}};n.style=o;exports.eds_rating=n;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-RvcWEz0j.js"),n="",a=n,s=class{constructor(e){t.registerInstance(this,e),this.tag="section",this.sectionTitle="",this.headingLevel="h2"}render(){const e=this.tag;return t.h(e,{key:"39c4280156ca46b83538de499baa9b152360b1b4"},t.h("eds-section-heading",{key:"34da742e606f0e9bb485faac8aba1519eccc8934",headingLevel:this.headingLevel,sectionTitle:this.sectionTitle}),t.h("slot",{key:"517b8ecc112565e8c6bb0bf85b02525deaa6f9df"}))}};s.style=a;const c=class{constructor(e){t.registerInstance(this,e),this.sectionTitle=void 0,this.withContainer=!0,this.headingLevel="h2",this.tag="div",this.spacingLarge=!1}getHeadingClass(){return{h1:"f-heading-01",h2:"f-heading-02",h3:"f-heading-03",h4:"f-heading-04",h5:"f-heading-05",h6:"f-heading-06"}[this.headingLevel]}render(){const e=this.tag,i=this.headingLevel;return t.h(e,{key:"346654c0118e056276162b42723c6c163712ab4f",class:{"ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8":!0,container:this.withContainer,"pt-48":this.spacingLarge,"pt-28":!this.spacingLarge}},t.h(i,{key:"c7d17fc22b3926495c799da0bc8bde7dc949e46a",class:this.getHeadingClass()},this.sectionTitle))}};exports.eds_section_core=s;exports.eds_section_heading=c;
|