@ebrains/components 0.3.0-alpha.0 → 0.5.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/analytics-223ea8e5.js +51 -0
- package/dist/cjs/color-c00146a8.js +134 -0
- package/dist/cjs/color-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/eds-accordion.cjs.entry.js +11 -20
- package/dist/cjs/{eds-avatar_17.cjs.entry.js → eds-alert_17.cjs.entry.js} +310 -372
- package/dist/cjs/{eds-card-desc_3.cjs.entry.js → eds-avatar_4.cjs.entry.js} +73 -3
- package/dist/cjs/eds-card-generic.cjs.entry.js +4 -5
- package/dist/cjs/eds-card-project.cjs.entry.js +4 -3
- package/dist/cjs/eds-card-section.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-tags.cjs.entry.js +1 -1
- package/dist/cjs/eds-card-tool.cjs.entry.js +3 -4
- package/dist/cjs/eds-card-wrapper.cjs.entry.js +1 -1
- package/dist/cjs/eds-code-block.cjs.entry.js +49 -2
- package/dist/cjs/eds-components-section.cjs.entry.js +7 -3
- package/dist/cjs/eds-docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/eds-docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/eds-dropdown_2.cjs.entry.js +158 -0
- package/dist/cjs/eds-form.cjs.entry.js +62 -23
- package/dist/cjs/eds-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-close.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-copy.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-eu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-loader.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-more.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-search.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-success.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-user.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-input_7.cjs.entry.js +18 -10
- package/dist/cjs/eds-login.cjs.entry.js +60 -41
- package/dist/cjs/eds-logo-variations.cjs.entry.js +1 -1
- package/dist/cjs/eds-matomo-notice.cjs.entry.js +2 -3
- package/dist/cjs/eds-modal.cjs.entry.js +49 -38
- package/dist/cjs/eds-navigator.cjs.entry.js +1 -1
- package/dist/cjs/eds-pagination_2.cjs.entry.js +34 -17
- package/dist/cjs/eds-progress-bar.cjs.entry.js +1 -1
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-svg-repository.cjs.entry.js +1 -1
- package/dist/cjs/eds-tab.cjs.entry.js +1 -1
- package/dist/cjs/eds-tabs-content.cjs.entry.js +4 -4
- package/dist/cjs/eds-tabs.cjs.entry.js +3 -3
- package/dist/cjs/eds-timeline.cjs.entry.js +3 -2
- package/dist/cjs/eds-tooltip.cjs.entry.js +10 -1
- package/dist/cjs/eds-trl.cjs.entry.js +7 -8
- package/dist/cjs/eds-user.cjs.entry.js +99 -0
- package/dist/cjs/eds-vertical-stepper.cjs.entry.js +45 -0
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-f08e4f5c.js +16 -12
- package/dist/cjs/{keycloak-5aaa21af.js → keycloak-93fc0315.js} +225 -170
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +1 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +2 -2
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +1 -1
- package/dist/cjs/token-list_3.cjs.entry.js +3 -3
- package/dist/cjs/token-ratios.cjs.entry.js +1 -1
- package/dist/cjs/token-spacing.cjs.entry.js +1 -1
- package/dist/cjs/token-typography.cjs.entry.js +1 -1
- package/dist/collection/collection-manifest.json +5 -2
- package/dist/collection/components/eds-accordion/eds-accordion.js +11 -20
- package/dist/collection/components/eds-alert/eds-alert.js +9 -8
- package/dist/collection/components/eds-alert/eds-alert.stories.js +4 -4
- package/dist/collection/components/eds-avatar/eds-avatar.js +8 -6
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +24 -22
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +23 -28
- package/dist/collection/components/eds-button/eds-button.js +20 -25
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +9 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-wrapper/eds-card-wrapper.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +15 -9
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.stories.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +3 -2
- package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.js +2 -2
- package/dist/collection/components/eds-code-block/eds-code-block.js +58 -3
- package/dist/collection/components/eds-code-block/eds-code-block.stories.js +78 -0
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +11 -21
- package/dist/collection/components/eds-form/eds-form.js +71 -45
- package/dist/collection/components/eds-form/eds-form.stories.js +0 -3
- package/dist/collection/components/eds-frame/eds-frame.js +1 -1
- package/dist/collection/components/eds-frame/eds-frame.stories.js +19 -18
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-close/eds-icon-close.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-copy/eds-icon-copy.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-bluesky/eds-icon-bluesky.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-facebook/eds-icon-facebook.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-linkedin/eds-icon-linkedin.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-mastodon/eds-icon-mastodon.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-twitter/eds-icon-twitter.js +1 -1
- package/dist/collection/components/eds-icons/social/eds-icon-youtube/eds-icon-youtube.js +1 -1
- package/dist/collection/components/eds-img/eds-img.js +13 -7
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-search/eds-input-search.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +14 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-link/eds-link.js +8 -6
- package/dist/collection/components/eds-logo/eds-logo.js +21 -2
- package/dist/collection/components/eds-modal/eds-modal.css +16 -0
- package/dist/collection/components/eds-modal/eds-modal.js +75 -38
- package/dist/collection/components/eds-modal/eds-modal.stories.js +34 -18
- package/dist/collection/components/eds-navigator/eds-navigator.js +1 -1
- package/dist/collection/components/eds-pagination/eds-pagination.js +13 -9
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.css +48 -0
- package/dist/collection/components/eds-rating/eds-rating.js +14 -14
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.stories.js +12 -11
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-steps/eds-steps.css +71 -0
- package/dist/collection/components/eds-steps/eds-steps.js +132 -0
- package/dist/collection/components/eds-steps/eds-steps.stories.js +35 -0
- package/dist/collection/components/eds-steps/eds-vertical-stepper.css +78 -0
- package/dist/collection/components/eds-steps/eds-vertical-stepper.js +72 -0
- package/dist/collection/components/eds-switch/eds-switch.css +59 -0
- package/dist/collection/components/eds-switch/eds-switch.js +131 -0
- package/dist/collection/components/eds-switch/eds-switch.stories.js +38 -0
- package/dist/collection/components/eds-tab/eds-tab.js +1 -1
- package/dist/collection/components/eds-table/eds-table.js +21 -8
- package/dist/collection/components/eds-tag/eds-tag.js +22 -1
- package/dist/collection/components/eds-timeline/eds-timeline.js +3 -2
- package/dist/collection/components/eds-toast/eds-toast.js +22 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +10 -1
- package/dist/collection/components/eds-trl/eds-trl.js +7 -8
- package/dist/collection/eds-docs-ui/colors/color-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/secondary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/color-palette/support.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/primary.js +1 -1
- package/dist/collection/eds-docs-ui/colors/gradient-palette/secondary.js +7 -7
- package/dist/collection/eds-docs-ui/colors/gradient-palette/support.js +3 -3
- package/dist/collection/eds-docs-ui/colors/use-of-colors/correct-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/colors/use-of-colors/incorrect-use-of-colors.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-list/token-list.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-radii/token-radii.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-ratios/token-ratios.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-shadows/token-shadows.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-spacing/token-spacing.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/token-typography/token-typography.js +1 -1
- package/dist/collection/eds-docs-ui/eds-components-section/eds-components-section.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-palettes/eds-docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/eds-docs-tokens/eds-docs-tokens.js +1 -1
- package/dist/collection/eds-docs-ui/eds-logo-variations/eds-logo-variations.js +1 -1
- package/dist/collection/eds-docs-ui/eds-svg-repository/eds-svg-repository.js +1 -1
- package/dist/collection/eds-docs-ui/functional/installation.js +1 -1
- package/dist/collection/eds-docs-ui/functional/react.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.js +14 -7
- package/dist/collection/shared-ui/eds-card-section/eds-card-section.stories.js +8 -39
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +1 -1
- package/dist/collection/shared-ui/eds-header/eds-header.js +2 -75
- package/dist/collection/shared-ui/eds-login/eds-login.js +66 -58
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +1 -1
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +2 -2
- package/dist/collection/shared-ui/eds-tabs-content/eds-tabs-content.js +3 -3
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +27 -24
- package/dist/collection/shared-ui/eds-user-modal/eds-user-modal.js +1 -1
- package/dist/collection/utils/analytics.js +85 -0
- package/dist/collection/utils/color.js +129 -0
- package/dist/collection/utils/global.js +8 -0
- package/dist/collection/utils/keycloak.js +11 -5
- package/dist/components/analytics.js +6 -1
- package/dist/components/color.js +0 -164
- package/dist/components/components.css +63 -0
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/eds-accordion2.js +11 -20
- package/dist/components/eds-alert2.js +9 -8
- package/dist/components/eds-avatar2.js +3 -3
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +23 -28
- package/dist/components/eds-button2.js +16 -14
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +3 -4
- package/dist/components/eds-card-project.js +2 -2
- package/dist/components/eds-card-section.js +3 -3
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-tool.js +1 -2
- package/dist/components/eds-card-wrapper.js +1 -1
- package/dist/components/eds-code-block2.js +49 -2
- package/dist/components/eds-components-section.js +7 -3
- package/dist/components/eds-docs-palettes.js +1 -1
- package/dist/components/eds-docs-tokens.js +1 -1
- package/dist/components/eds-dropdown2.js +11 -21
- package/dist/components/eds-footer2.js +1 -1
- package/dist/components/eds-form.js +67 -26
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-header.js +10 -48
- package/dist/components/eds-icon-arrow-diagonal.js +1 -1
- package/dist/components/eds-icon-arrow-right.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-chevron-down.js +1 -1
- package/dist/components/eds-icon-chevron-left.js +1 -1
- package/dist/components/eds-icon-chevron-right.js +1 -1
- package/dist/components/eds-icon-chevron-up.js +1 -1
- package/dist/components/eds-icon-close.js +1 -1
- package/dist/components/eds-icon-copy.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-facebook.js +1 -1
- package/dist/components/eds-icon-gitlab.js +1 -1
- package/dist/components/eds-icon-linkedin.js +1 -1
- package/dist/components/eds-icon-loader.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-menu.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +9 -4
- package/dist/components/eds-input-field2.js +2 -2
- package/dist/components/eds-input-footer2.js +1 -1
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +2 -2
- package/dist/components/eds-input-search2.js +1 -1
- package/dist/components/eds-input-select2.js +11 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +7 -6
- package/dist/components/eds-login.js +60 -41
- package/dist/components/eds-logo-variations.js +1 -1
- package/dist/components/eds-logo2.js +4 -3
- package/dist/components/eds-matomo-notice.js +0 -1
- package/dist/components/eds-modal.js +51 -39
- package/dist/components/eds-navigator.js +1 -1
- package/dist/components/eds-pagination2.js +13 -9
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating.js +25 -13
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-steps.d.ts +11 -0
- package/dist/components/eds-steps.js +106 -0
- package/dist/components/eds-svg-repository.js +1 -1
- package/dist/components/eds-switch.d.ts +11 -0
- package/dist/components/eds-switch.js +57 -0
- package/dist/components/eds-tab2.js +1 -1
- package/dist/components/eds-table2.js +21 -8
- package/dist/components/eds-tabs-content.js +2 -3
- package/dist/components/eds-tabs.js +1 -2
- package/dist/components/eds-tag2.js +5 -1
- package/dist/components/eds-timeline.js +3 -2
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-toast2.js +22 -1
- package/dist/components/eds-tooltip.js +10 -1
- package/dist/components/eds-trl.js +7 -8
- package/dist/components/eds-user-modal2.js +1 -1
- package/dist/components/eds-user.js +157 -1
- package/dist/components/eds-vertical-stepper.d.ts +11 -0
- package/dist/components/eds-vertical-stepper.js +86 -0
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/keycloak.js +225 -170
- package/dist/components/logo-space.js +1 -1
- package/dist/components/logo-variations-horizontal2.js +1 -1
- package/dist/components/logo-variations-vertical2.js +1 -1
- package/dist/components/logo-wrong-usage.js +1 -1
- package/dist/components/p-030f67c1.entry.js +1 -0
- package/dist/components/{p-32f282a9.entry.js → p-06299762.entry.js} +1 -1
- package/dist/components/p-0ab85eee.entry.js +1 -0
- package/dist/components/p-0bafc5ae.entry.js +1 -0
- package/dist/components/p-0e0e1815.entry.js +1 -0
- package/dist/components/p-0e7bdd2c.entry.js +1 -0
- package/dist/components/p-1ed3fdb7.entry.js +1 -0
- package/dist/components/p-209fa119.entry.js +1 -0
- package/dist/components/p-2831a9d5.entry.js +1 -0
- package/dist/components/p-2c00bd76.entry.js +1 -0
- package/dist/components/p-38d70586.entry.js +1 -0
- package/dist/components/p-3babd772.entry.js +1 -0
- package/dist/components/p-4a12a131.entry.js +1 -0
- package/dist/components/p-505ddcda.entry.js +1 -0
- package/dist/components/{p-52ac3456.entry.js → p-59405ecf.entry.js} +1 -1
- package/dist/components/p-5980a142.entry.js +1 -0
- package/dist/components/p-599c7b97.entry.js +1 -0
- package/dist/components/{p-22762818.entry.js → p-65703520.entry.js} +1 -1
- package/dist/components/p-6af40c33.entry.js +1 -0
- package/dist/components/p-6df9db15.entry.js +1 -0
- package/dist/components/p-72b42d77.entry.js +1 -0
- package/dist/components/p-75795b05.entry.js +1 -0
- package/dist/components/{p-435a14c1.entry.js → p-759b2640.entry.js} +1 -1
- package/dist/components/p-80a185ba.entry.js +1 -0
- package/dist/components/p-81942665.entry.js +1 -0
- package/dist/components/p-86fbc239.entry.js +1 -0
- package/dist/components/p-89227919.js +1 -0
- package/dist/components/{p-6fc62452.entry.js → p-89f600a3.entry.js} +1 -1
- package/dist/components/{p-2e8459ef.entry.js → p-8b583210.entry.js} +1 -1
- package/dist/components/p-8c4a0fc9.entry.js +1 -0
- package/dist/components/p-8d19a05b.entry.js +1 -0
- package/dist/components/p-8eab748d.js +1 -0
- package/dist/components/p-911d9b37.entry.js +1 -0
- package/dist/components/p-92e16cc9.entry.js +1 -0
- package/dist/components/p-96fe2267.entry.js +1 -0
- package/dist/components/p-9739def5.entry.js +1 -0
- package/dist/components/p-9826acae.entry.js +1 -0
- package/dist/components/{p-87830085.entry.js → p-9b441a1f.entry.js} +1 -1
- package/dist/components/p-a2621d66.entry.js +1 -0
- package/dist/components/p-a535838c.entry.js +1 -0
- package/dist/components/p-a5b7d72d.entry.js +1 -0
- package/dist/components/p-a5d00633.entry.js +1 -0
- package/dist/components/p-a63bd0c9.entry.js +1 -0
- package/dist/components/{p-762c8c83.entry.js → p-a846dbca.entry.js} +1 -1
- package/dist/components/p-a927a455.entry.js +1 -0
- package/dist/components/p-aec9b8e1.entry.js +1 -0
- package/dist/components/{p-e6bfbf51.entry.js → p-b1af5000.entry.js} +2 -2
- package/dist/components/{p-d571d530.entry.js → p-b1de9a6c.entry.js} +1 -1
- package/dist/components/{p-0910d733.entry.js → p-b3c1aef5.entry.js} +1 -1
- package/dist/components/p-b60ed774.entry.js +1 -0
- package/dist/components/p-b67aafe7.entry.js +1 -0
- package/dist/components/p-b79999d5.entry.js +1 -0
- package/dist/components/{p-02e2a62f.entry.js → p-b80457ed.entry.js} +1 -1
- package/dist/components/p-b860b4aa.entry.js +1 -0
- package/dist/components/p-c034c395.entry.js +1 -0
- package/dist/components/p-c5fa170d.entry.js +1 -0
- package/dist/components/p-d69ef196.entry.js +1 -0
- package/dist/components/p-de12396f.entry.js +1 -0
- package/dist/components/p-de2fbcfc.entry.js +1 -0
- package/dist/components/p-def72462.entry.js +1 -0
- package/dist/components/p-e2c250c5.entry.js +1 -0
- package/dist/components/p-eb0b93d5.js +1 -0
- package/dist/components/p-eeeb0d83.entry.js +1 -0
- package/dist/components/p-f08eac56.entry.js +1 -0
- package/dist/components/p-f1cd83da.entry.js +1 -0
- package/dist/components/{p-22e6d7d5.entry.js → p-f36f2aeb.entry.js} +1 -1
- package/dist/components/p-f5dafbc8.entry.js +1 -0
- package/dist/components/p-f7493f41.entry.js +1 -0
- package/dist/components/p-fce25541.entry.js +1 -0
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/token-list2.js +1 -1
- package/dist/components/token-radii2.js +1 -1
- package/dist/components/token-ratios.js +1 -1
- package/dist/components/token-shadows2.js +1 -1
- package/dist/components/token-spacing.js +1 -1
- package/dist/components/token-typography.js +1 -1
- package/dist/esm/analytics-1cde8e4a.js +48 -0
- package/dist/esm/color-2554aad6.js +132 -0
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/eds-accordion.entry.js +11 -20
- package/dist/esm/{eds-avatar_17.entry.js → eds-alert_17.entry.js} +304 -366
- package/dist/esm/{eds-card-desc_3.entry.js → eds-avatar_4.entry.js} +73 -4
- package/dist/esm/eds-card-generic.entry.js +3 -4
- package/dist/esm/eds-card-project.entry.js +3 -2
- package/dist/esm/eds-card-section.entry.js +3 -3
- package/dist/esm/eds-card-tags.entry.js +1 -1
- package/dist/esm/eds-card-tool.entry.js +2 -3
- package/dist/esm/eds-card-wrapper.entry.js +1 -1
- package/dist/esm/eds-code-block.entry.js +50 -3
- package/dist/esm/eds-components-section.entry.js +7 -3
- package/dist/esm/eds-docs-palettes.entry.js +1 -1
- package/dist/esm/eds-docs-tokens.entry.js +1 -1
- package/dist/esm/eds-dropdown_2.entry.js +153 -0
- package/dist/esm/eds-form.entry.js +62 -23
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +1 -1
- package/dist/esm/eds-icon-arrow-right.entry.js +1 -1
- package/dist/esm/eds-icon-bluesky.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-down.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-left.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-right.entry.js +1 -1
- package/dist/esm/eds-icon-chevron-up.entry.js +1 -1
- package/dist/esm/eds-icon-close.entry.js +1 -1
- package/dist/esm/eds-icon-copy.entry.js +1 -1
- package/dist/esm/eds-icon-eu.entry.js +1 -1
- package/dist/esm/eds-icon-facebook.entry.js +1 -1
- package/dist/esm/eds-icon-gitlab.entry.js +1 -1
- package/dist/esm/eds-icon-linkedin.entry.js +1 -1
- package/dist/esm/eds-icon-loader.entry.js +1 -1
- package/dist/esm/eds-icon-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-menu.entry.js +1 -1
- package/dist/esm/eds-icon-more.entry.js +1 -1
- package/dist/esm/eds-icon-search.entry.js +1 -1
- package/dist/esm/eds-icon-success.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-user.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/esm/eds-input_7.entry.js +18 -10
- package/dist/esm/eds-login.entry.js +60 -41
- package/dist/esm/eds-logo-variations.entry.js +1 -1
- package/dist/esm/eds-matomo-notice.entry.js +1 -2
- package/dist/esm/eds-modal.entry.js +49 -38
- package/dist/esm/eds-navigator.entry.js +1 -1
- package/dist/esm/eds-pagination_2.entry.js +34 -17
- package/dist/esm/eds-progress-bar.entry.js +1 -1
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-svg-repository.entry.js +1 -1
- package/dist/esm/eds-tab.entry.js +1 -1
- package/dist/esm/eds-tabs-content.entry.js +3 -3
- package/dist/esm/eds-tabs.entry.js +2 -2
- package/dist/esm/eds-timeline.entry.js +3 -2
- package/dist/esm/eds-tooltip.entry.js +10 -1
- package/dist/esm/eds-trl.entry.js +7 -8
- package/dist/esm/eds-user.entry.js +95 -0
- package/dist/esm/eds-vertical-stepper.entry.js +41 -0
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/index-e96badea.js +16 -12
- package/dist/esm/{keycloak-13893af6.js → keycloak-d502ec16.js} +225 -170
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +1 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +2 -2
- package/dist/esm/logo-wrong-usage.entry.js +1 -1
- package/dist/esm/token-list_3.entry.js +3 -3
- package/dist/esm/token-ratios.entry.js +1 -1
- package/dist/esm/token-spacing.entry.js +1 -1
- package/dist/esm/token-typography.entry.js +1 -1
- package/dist/hydrate/index.js +992 -763
- package/dist/hydrate/index.mjs +992 -763
- package/dist/types/components/eds-accordion/eds-accordion.d.ts +5 -12
- package/dist/types/components/eds-alert/eds-alert.d.ts +1 -1
- package/dist/types/components/eds-avatar/eds-avatar.stories.d.ts +0 -18
- package/dist/types/components/eds-breadcrump/eds-breadcrump.d.ts +9 -8
- package/dist/types/components/eds-button/eds-button.d.ts +2 -3
- package/dist/types/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.d.ts +8 -0
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +6 -2
- package/dist/types/components/eds-code-block/eds-code-block.d.ts +43 -3
- package/dist/types/components/eds-code-block/eds-code-block.stories.d.ts +54 -0
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +0 -7
- package/dist/types/components/eds-form/eds-form.d.ts +3 -7
- package/dist/types/components/eds-form/eds-form.stories.d.ts +0 -5
- package/dist/types/components/eds-frame/eds-frame.stories.d.ts +0 -2
- package/dist/types/components/eds-img/eds-img.d.ts +3 -1
- package/dist/types/components/eds-input-elements/eds-input-select/eds-input-select.d.ts +9 -0
- package/dist/types/components/eds-link/eds-link.d.ts +1 -1
- package/dist/types/components/eds-logo/eds-logo.d.ts +1 -0
- package/dist/types/components/eds-modal/eds-modal.d.ts +20 -10
- package/dist/types/components/eds-modal/eds-modal.stories.d.ts +9 -0
- package/dist/types/components/eds-rating/eds-rating.d.ts +4 -7
- package/dist/types/components/eds-section/eds-section-core/eds-section-core.stories.d.ts +0 -1
- package/dist/types/components/eds-steps/eds-steps.d.ts +39 -0
- package/dist/types/components/eds-steps/eds-steps.stories.d.ts +34 -0
- package/dist/types/components/eds-steps/eds-vertical-stepper.d.ts +22 -0
- package/dist/types/components/eds-switch/eds-switch.d.ts +25 -0
- package/dist/types/components/eds-switch/eds-switch.stories.d.ts +32 -0
- package/dist/types/components/eds-table/eds-table.d.ts +5 -5
- package/dist/types/components/eds-tag/eds-tag.d.ts +5 -0
- package/dist/types/components/eds-toast/eds-toast.d.ts +9 -0
- package/dist/types/components.d.ts +227 -164
- package/dist/types/shared-ui/eds-card-section/eds-card-section.d.ts +28 -6
- package/dist/types/shared-ui/eds-card-section/eds-card-section.stories.d.ts +42 -21
- package/dist/types/shared-ui/eds-header/eds-header.d.ts +0 -20
- package/dist/types/shared-ui/eds-login/eds-login.d.ts +21 -18
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +5 -5
- package/dist/types/utils/global.d.ts +1 -0
- package/dist/types/utils/keycloak.d.ts +2 -2
- package/package.json +1 -1
- package/dist/cjs/color-3ffe3072.js +0 -342
- package/dist/cjs/eds-alert.cjs.entry.js +0 -96
- package/dist/cjs/eds-rating.cjs.entry.js +0 -58
- package/dist/components/eds-user2.js +0 -156
- package/dist/components/p-005de86f.entry.js +0 -1
- package/dist/components/p-0c2e844e.entry.js +0 -1
- package/dist/components/p-145f13ad.entry.js +0 -1
- package/dist/components/p-16458a81.entry.js +0 -1
- package/dist/components/p-2851ff44.entry.js +0 -1
- package/dist/components/p-29648b47.entry.js +0 -1
- package/dist/components/p-297b2bc3.entry.js +0 -1
- package/dist/components/p-32cddd94.entry.js +0 -1
- package/dist/components/p-3617841d.entry.js +0 -1
- package/dist/components/p-373673ca.js +0 -1
- package/dist/components/p-388b4966.entry.js +0 -1
- package/dist/components/p-3ff76976.entry.js +0 -1
- package/dist/components/p-4037ad48.entry.js +0 -1
- package/dist/components/p-42b4ecff.entry.js +0 -1
- package/dist/components/p-490ba155.entry.js +0 -1
- package/dist/components/p-4932aab2.entry.js +0 -1
- package/dist/components/p-4a24c2ce.entry.js +0 -1
- package/dist/components/p-54c75346.entry.js +0 -1
- package/dist/components/p-57c964c5.entry.js +0 -1
- package/dist/components/p-5a43503a.entry.js +0 -1
- package/dist/components/p-5aad9d3f.entry.js +0 -1
- package/dist/components/p-5afb626c.entry.js +0 -1
- package/dist/components/p-5d7af761.entry.js +0 -1
- package/dist/components/p-5fc68438.entry.js +0 -1
- package/dist/components/p-6378fb3e.entry.js +0 -1
- package/dist/components/p-673dce11.entry.js +0 -1
- package/dist/components/p-7215789a.entry.js +0 -1
- package/dist/components/p-73bd0c97.entry.js +0 -1
- package/dist/components/p-7802e966.entry.js +0 -1
- package/dist/components/p-79887c2c.entry.js +0 -1
- package/dist/components/p-846fc91c.entry.js +0 -1
- package/dist/components/p-84957b6d.entry.js +0 -1
- package/dist/components/p-8c56e39a.entry.js +0 -1
- package/dist/components/p-96c4deda.entry.js +0 -1
- package/dist/components/p-a44a1abe.entry.js +0 -1
- package/dist/components/p-a4e9b68b.entry.js +0 -1
- package/dist/components/p-ac0112d5.entry.js +0 -1
- package/dist/components/p-acb16e1c.entry.js +0 -1
- package/dist/components/p-ae5dbd41.entry.js +0 -1
- package/dist/components/p-bdd86a3c.entry.js +0 -1
- package/dist/components/p-be6c80da.entry.js +0 -1
- package/dist/components/p-bf0f851d.entry.js +0 -1
- package/dist/components/p-c2d369bc.entry.js +0 -1
- package/dist/components/p-c9c417de.js +0 -1
- package/dist/components/p-d1670eec.entry.js +0 -1
- package/dist/components/p-d1f6a722.entry.js +0 -1
- package/dist/components/p-d53b7a75.entry.js +0 -1
- package/dist/components/p-d6d86366.entry.js +0 -1
- package/dist/components/p-d7a92efb.entry.js +0 -1
- package/dist/components/p-d9788b54.entry.js +0 -1
- package/dist/components/p-e20ed2c7.entry.js +0 -1
- package/dist/components/p-e74834bc.entry.js +0 -1
- package/dist/components/p-f7a6ce69.entry.js +0 -1
- package/dist/components/p-fd27e56c.entry.js +0 -1
- package/dist/esm/color-0ba8ed56.js +0 -338
- package/dist/esm/eds-alert.entry.js +0 -92
- package/dist/esm/eds-rating.entry.js +0 -54
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/index.d.ts +0 -3
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/keycloak.d.ts +0 -30
- package/dist/types/Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib/render.d.ts +0 -8
- /package/dist/types/{Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib → utils}/analytics.d.ts +0 -0
- /package/dist/types/{Users/nigeor/Documents/Projects/EBRAINS/ebrains-ui-ecosystem/packages/components/.stencil/packages/utils/src/lib → utils}/color.d.ts +0 -0
|
@@ -44,7 +44,7 @@ const EdsBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class EdsBreadcrumb ext
|
|
|
44
44
|
this.parsedItems = Array.isArray(parsed) ? parsed : [];
|
|
45
45
|
}
|
|
46
46
|
catch (e) {
|
|
47
|
-
console.error('Error parsing breadcrumb items:', e);
|
|
47
|
+
//console.error('Error parsing breadcrumb items:', e);
|
|
48
48
|
this.parsedItems = [];
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -72,9 +72,9 @@ const EdsBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class EdsBreadcrumb ext
|
|
|
72
72
|
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
73
73
|
*/
|
|
74
74
|
componentDidLoad() {
|
|
75
|
-
|
|
76
|
-
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
77
|
-
links.forEach((link) => {
|
|
75
|
+
var _a;
|
|
76
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
|
|
77
|
+
links === null || links === void 0 ? void 0 : links.forEach((link) => {
|
|
78
78
|
this.emitContext(link);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -94,54 +94,49 @@ const EdsBreadcrumb$1 = /*@__PURE__*/ proxyCustomElement(class EdsBreadcrumb ext
|
|
|
94
94
|
linkElement.dispatchEvent(event);
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
98
|
-
*
|
|
97
|
+
* Returns breadcrumb items with potential truncation if there are too many.
|
|
98
|
+
* It inserts an ellipsis item where necessary.
|
|
99
99
|
*/
|
|
100
100
|
getTruncatedItems() {
|
|
101
101
|
const totalItems = this.parsedItems.length;
|
|
102
|
+
const ellipsis = { label: '...', url: '', isHidden: true };
|
|
102
103
|
if (totalItems > this.maxVisibleItems) {
|
|
103
104
|
const firstItem = this.parsedItems[0];
|
|
104
105
|
const lastItems = this.parsedItems.slice(-2);
|
|
105
|
-
const ellipsis = { label: '...', url: '', isHidden: true };
|
|
106
106
|
if (this.maxVisibleItems === 3) {
|
|
107
|
-
return [
|
|
108
|
-
this.truncateLabel(firstItem),
|
|
109
|
-
ellipsis,
|
|
110
|
-
...lastItems.map((item, index) => (index === lastItems.length - 1 ? item : this.truncateLabel(item)))
|
|
111
|
-
];
|
|
107
|
+
return [firstItem, ellipsis, ...lastItems];
|
|
112
108
|
}
|
|
113
109
|
else if (this.maxVisibleItems === 4) {
|
|
114
110
|
const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
|
|
115
|
-
return [
|
|
116
|
-
this.truncateLabel(firstItem),
|
|
117
|
-
this.truncateLabel(middleItem),
|
|
118
|
-
ellipsis,
|
|
119
|
-
...lastItems.map((item, index) => (index === lastItems.length - 1 ? item : this.truncateLabel(item)))
|
|
120
|
-
];
|
|
111
|
+
return [firstItem, middleItem, ellipsis, ...lastItems];
|
|
121
112
|
}
|
|
122
113
|
}
|
|
123
|
-
return this.parsedItems
|
|
114
|
+
return this.parsedItems;
|
|
124
115
|
}
|
|
125
116
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
117
|
+
* Helper to determine the display label and full label.
|
|
118
|
+
* If the label is longer than 15 characters and the item is not the current (last) item,
|
|
119
|
+
* we display a truncated version but use the full label for aria attributes.
|
|
128
120
|
*/
|
|
129
|
-
|
|
130
|
-
if (item.label.length > 15) {
|
|
131
|
-
return
|
|
121
|
+
getLabels(item, isCurrent) {
|
|
122
|
+
if (!isCurrent && item.label.length > 15) {
|
|
123
|
+
return { displayLabel: `${item.label.slice(0, 15)}...`, fullLabel: item.label };
|
|
132
124
|
}
|
|
133
|
-
return item;
|
|
125
|
+
return { displayLabel: item.label, fullLabel: item.label };
|
|
134
126
|
}
|
|
135
127
|
/**
|
|
136
128
|
* Render method for the breadcrumb component.
|
|
137
129
|
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
138
|
-
* The last link is
|
|
130
|
+
* The last link is marked as the current page.
|
|
139
131
|
*/
|
|
140
132
|
render() {
|
|
141
133
|
const itemsToRender = this.getTruncatedItems();
|
|
142
|
-
return (h("nav", { key: '
|
|
134
|
+
return (h("nav", { key: 'd177957e1b3218c21991bbdc9636a8e32befe990', "aria-label": "Breadcrumb" }, h("ol", { key: 'd10336ddee99b9fb84d17e53093c57c6a025982f', class: "flex items-center space-x-2" }, itemsToRender.map((item, index) => {
|
|
143
135
|
const isLast = index === itemsToRender.length - 1;
|
|
144
|
-
return (h("li", { class: "flex items-center" }, !item.isHidden ? (
|
|
136
|
+
return (h("li", { class: "flex items-center" }, !item.isHidden ? ((() => {
|
|
137
|
+
const { displayLabel, fullLabel } = this.getLabels(item, isLast);
|
|
138
|
+
return (h("eds-link", Object.assign({ label: displayLabel, url: item.url, intent: this.intent, current: isLast, "aria-label": fullLabel, size: "small", "icon-small": "false" }, (isLast ? { 'aria-current': 'page' } : {}))));
|
|
139
|
+
})()) : (h("span", { class: "truncate px-2", "aria-hidden": "true" }, "...")), !isLast && !item.isHidden && (h("eds-icon-wrapper", { icon: "chevron-right", class: "w-20 h-20" }))));
|
|
145
140
|
}))));
|
|
146
141
|
}
|
|
147
142
|
get el() { return this; }
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import './color.js';
|
|
3
2
|
import { s as sendAnalytics } from './analytics.js';
|
|
4
3
|
import { c as cva } from './index2.js';
|
|
5
4
|
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
@@ -162,9 +161,8 @@ const EdsButton = /*@__PURE__*/ proxyCustomElement(class EdsButton extends HTMLE
|
|
|
162
161
|
iconOnly: false
|
|
163
162
|
}
|
|
164
163
|
});
|
|
165
|
-
this.parentContext = null; // Accepts the entire event detail or null
|
|
166
164
|
this.label = undefined;
|
|
167
|
-
this.ariaLabel =
|
|
165
|
+
this.ariaLabel = 'Button';
|
|
168
166
|
this.elementType = 'button';
|
|
169
167
|
this.intent = 'secondary';
|
|
170
168
|
this.loading = false;
|
|
@@ -177,15 +175,19 @@ const EdsButton = /*@__PURE__*/ proxyCustomElement(class EdsButton extends HTMLE
|
|
|
177
175
|
this.extraClass = undefined;
|
|
178
176
|
this.triggerClick = undefined;
|
|
179
177
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
|
|
178
|
+
/*private parentContext: ParentContextDetail | null = null; // Accepts the entire event detail or null
|
|
179
|
+
|
|
180
|
+
@Listen('parentContext')
|
|
181
|
+
handleParentContext(event: CustomEvent) {
|
|
182
|
+
if (event.target !== this.el) {
|
|
183
|
+
// Ignore the event if it's not targeted at this specific instance
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
//console.log(event.detail);
|
|
187
|
+
this.parentContext = event.detail;
|
|
188
|
+
event.stopPropagation();
|
|
188
189
|
}
|
|
190
|
+
*/
|
|
189
191
|
handleClick(event) {
|
|
190
192
|
var _a, _b;
|
|
191
193
|
if (this.disabled) {
|
|
@@ -195,7 +197,7 @@ const EdsButton = /*@__PURE__*/ proxyCustomElement(class EdsButton extends HTMLE
|
|
|
195
197
|
}
|
|
196
198
|
sendAnalytics({
|
|
197
199
|
category: 'ui-component',
|
|
198
|
-
parentContext:
|
|
200
|
+
parentContext: null,
|
|
199
201
|
tag: this.el.tagName.toLowerCase(),
|
|
200
202
|
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || ((_b = this.ariaLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || '',
|
|
201
203
|
action: 'click'
|
|
@@ -222,7 +224,7 @@ const EdsButton = /*@__PURE__*/ proxyCustomElement(class EdsButton extends HTMLE
|
|
|
222
224
|
show: !this.loading
|
|
223
225
|
});
|
|
224
226
|
const ElementType = this.elementType;
|
|
225
|
-
return (h(ElementType, { key: '
|
|
227
|
+
return (h(ElementType, { key: '52cda715164eeca59e35b45f617a2d6d1b05a94c', "aria-label": this.label || this.ariaLabel || undefined, "aria-disabled": this.elementType === 'button' ? this.disabled : undefined, disabled: this.elementType === 'button' ? this.disabled : undefined, class: `${classes || ''} ${this.extraClass || ''}`, onClick: (event) => this.handleClick(event) }, this.label && h("span", { key: '866cd0272d9f381b3ecb892e588c860ca8b41051', class: this.loading ? 'opacity-0' : '' }, this.label), this.loading && (h("span", { key: 'fcba01e3404724869c59f4e21bd5db459643d840', class: "absolute inset-0 flex items-center justify-center" }, h("span", { key: 'e44955e5641e757e66eb4961097fb4d60e4def7c', class: "loader", style: {
|
|
226
228
|
border: `3px solid ${this.intent === 'secondary' ? 'rgba(255, 255, 255, .3)' : 'rgba(0, 0, 0, .3)'}`,
|
|
227
229
|
borderBottomColor: this.intent === 'secondary' ? '#fff' : '#000'
|
|
228
230
|
} }))), this.icon ? h("eds-icon-wrapper", { class: iconClasses, icon: this.icon }) : null));
|
|
@@ -243,7 +245,7 @@ const EdsButton = /*@__PURE__*/ proxyCustomElement(class EdsButton extends HTMLE
|
|
|
243
245
|
"iconSmall": [4, "icon-small"],
|
|
244
246
|
"extraClass": [1, "extra-class"],
|
|
245
247
|
"triggerClick": [16]
|
|
246
|
-
}
|
|
248
|
+
}]);
|
|
247
249
|
function defineCustomElement() {
|
|
248
250
|
if (typeof customElements === "undefined") {
|
|
249
251
|
return;
|
|
@@ -17,7 +17,7 @@ const EdsCardDesc = /*@__PURE__*/ proxyCustomElement(class EdsCardDesc extends H
|
|
|
17
17
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h("p", { key: '
|
|
20
|
+
return (h("p", { key: '71495cbd6ef4e7d66c4c22a37f8120624ecf57fb', class: `text-light ${this.descClass}` }, h("span", { key: '8708178f7b48cc1f31aac749f50fe92b72c39ab8', class: this.getTruncateClass() }, this.description)));
|
|
21
21
|
}
|
|
22
22
|
static get style() { return EdsCardDescStyle0; }
|
|
23
23
|
}, [1, "eds-card-desc", {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import './color.js';
|
|
3
2
|
import { s as sendAnalytics } from './analytics.js';
|
|
4
3
|
import { d as defineCustomElement$5 } from './eds-avatar2.js';
|
|
5
4
|
import { d as defineCustomElement$4 } from './eds-card-desc2.js';
|
|
@@ -23,7 +22,7 @@ const EdsCardGeneric = /*@__PURE__*/ proxyCustomElement(class EdsCardGeneric ext
|
|
|
23
22
|
this.avatar = undefined;
|
|
24
23
|
this.shortAbbreviation = undefined;
|
|
25
24
|
this.headingLevel = 'h3';
|
|
26
|
-
this.tags =
|
|
25
|
+
this.tags = [];
|
|
27
26
|
this.tiny = false;
|
|
28
27
|
this.bg = true;
|
|
29
28
|
this.withHover = true;
|
|
@@ -99,7 +98,7 @@ const EdsCardGeneric = /*@__PURE__*/ proxyCustomElement(class EdsCardGeneric ext
|
|
|
99
98
|
});
|
|
100
99
|
}
|
|
101
100
|
render() {
|
|
102
|
-
return (h("article", { key: '
|
|
101
|
+
return (h("article", { key: 'dcb7cea87bfb52f8886f7ee3dbc3484d615bc00c', class: this.articleClasses(), onClick: () => this.handleClick() }, h("eds-card-title", { key: '94dd6ff2679ce9ac4d25ec921cd1162b1584e4fd', "heading-level": this.headingLevel, titleClass: this.image ? 'f-ui-01' : undefined, "card-title": this.cardTitle, url: this.url, hierarchy: this.hierarchy }), this.description && (h("eds-card-desc", { key: '433c4fe3a518153d89d48af54455286fa415a688', class: "mt-8", "truncate-lines": "3", description: this.description })), this.parsedImage ? (h("eds-img", Object.assign({ class: "mt-8" }, this.parsedImage))) : this.avatar || this.shortAbbreviation ? (h("eds-avatar", { class: "order-first mb-12", picture: this.avatar, initials: this.shortAbbreviation })) : null, h("div", { key: '97b75afb4b8de1183d4b212054ff556ba3db8fcb', class: "flex flex-wrap gap-y-4" }, this.parsedTags.map((tag, index) => (h("eds-tag", { key: index, intent: tag.style, label: tag.label })))), ' '));
|
|
103
102
|
}
|
|
104
103
|
get el() { return this; }
|
|
105
104
|
static get style() { return EdsCardGenericStyle0; }
|
|
@@ -111,7 +110,7 @@ const EdsCardGeneric = /*@__PURE__*/ proxyCustomElement(class EdsCardGeneric ext
|
|
|
111
110
|
"avatar": [1],
|
|
112
111
|
"shortAbbreviation": [1, "short-abbreviation"],
|
|
113
112
|
"headingLevel": [1, "heading-level"],
|
|
114
|
-
"tags": [
|
|
113
|
+
"tags": [1],
|
|
115
114
|
"tiny": [4],
|
|
116
115
|
"bg": [4],
|
|
117
116
|
"withHover": [4, "with-hover"],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { g as gradientBGColorVariants } from './color.js';
|
|
3
2
|
import { s as sendAnalytics } from './analytics.js';
|
|
3
|
+
import { g as gradientBGColorVariants } from './color.js';
|
|
4
4
|
import { d as defineCustomElement$4 } from './eds-card-title2.js';
|
|
5
5
|
import { d as defineCustomElement$3 } from './eds-img2.js';
|
|
6
6
|
import { d as defineCustomElement$2 } from './eds-tag2.js';
|
|
@@ -59,7 +59,7 @@ const EdsCardProject$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardProject e
|
|
|
59
59
|
this.vertical ? 'flex-col gap-y-16' : 'flex-col gap-x-16 gap-y-12 lg:flex-row'
|
|
60
60
|
].join(' ');
|
|
61
61
|
const imageClasses = this.vertical ? '' : 'max-w-120 @md:max-w-192 order-first w-full lg:order-last';
|
|
62
|
-
return (h("article", { key: '
|
|
62
|
+
return (h("article", { key: '98c5dbd033ec05d08965559e00f32d9fe18698ef', class: cardClasses, onClick: (event) => this.handleClick(event) }, h("div", { key: 'e083c43e38c3c24fcd996a90267f7cd92d3651b3', class: `flex grow flex-col ${this.vertical ? 'min-h-156' : ''}` }, h("div", { key: '37de1e46023b533fd8595a3077c4e68c11fb01af', class: "lg:max-w-[720px]" }, h("eds-card-title", { key: 'ee31ae2804d2c17c82e8f4c0c3269ac8254331df', "heading-level": this.headingLevel, titleClass: this.image ? 'f-ui-01' : undefined, "card-title": this.titleProject, url: this.url }), this.editorialTitle && (h("span", { key: 'c6f74ba9b5b522f713e25d3339f541efa68cdddd', class: `block ${this.vertical ? 'f-ui-02' : 'mt-4 f-heading-06'}` }, this.editorialTitle))), this.categoryTitle && (h("div", { key: 'ab18e55046777cf4a4f58ebd057641db9b9e0328', class: "mt-auto flex items-center gap-x-12 pt-12" }, ((_a = this.categoryTitle) === null || _a === void 0 ? void 0 : _a.length) && h("eds-tag", { key: '3714ee86a74dce7f33a8f953fd726db349ba9271', label: this.categoryTitle })))), this.parsedImage && (h("div", { key: '2818d15f7ab671b7b2dfb34ec3085b390150f38d', class: imageClasses }, h("div", { key: '5166feef3674631298f699449b956655f38f0db9', class: "aspect-1x1 w-full" }, h("eds-img", Object.assign({ key: '86555a43491da5b2aa3b287e539e603a2c2adaf3', sizes: this.vertical ? this.parsedImage.sizes || '' : '192px' }, this.parsedImage)))))));
|
|
63
63
|
}
|
|
64
64
|
get el() { return this; }
|
|
65
65
|
}, [0, "eds-card-project", {
|
|
@@ -14,7 +14,7 @@ const EdsCardSection$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardSection e
|
|
|
14
14
|
super();
|
|
15
15
|
this.__registerHost();
|
|
16
16
|
this.__attachShadow();
|
|
17
|
-
this.cards =
|
|
17
|
+
this.cards = [];
|
|
18
18
|
this.cols = 4;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
@@ -37,7 +37,7 @@ const EdsCardSection$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardSection e
|
|
|
37
37
|
}
|
|
38
38
|
catch (e) {
|
|
39
39
|
// eslint-disable-next-line
|
|
40
|
-
console.error('Error parsing
|
|
40
|
+
console.error('Error parsing cards prop:', e);
|
|
41
41
|
return [];
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -51,7 +51,7 @@ const EdsCardSection$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardSection e
|
|
|
51
51
|
* @returns {JSX.Element} The rendered section containing a list of cards.
|
|
52
52
|
*/
|
|
53
53
|
render() {
|
|
54
|
-
return (h("section", { key: '
|
|
54
|
+
return (h("section", { key: '1f221e1ec7c3cdd0e3aed18f6f930c2c5456c64b', class: "w-full" }, h("ul", { key: '36f984994bb2dc247475c20422f7e6e7da7d058d', class: "grid-layout gap-y-8 md:gap-y-12 lg:gap-y-16" }, this.parsedCards.map((card) => (h("li", { class: `grid-col-span-12 md:grid-col-span-${this.cols} flex flex-col` }, h("eds-card-generic", { cardTitle: card.title, description: card.description, avatar: card.avatar, headingLevel: card.headingLevel, tags: card.tags, url: card.url, bg: card.bg, tiny: card.tiny, image: card.image, withHover: card.withHover })))))));
|
|
55
55
|
}
|
|
56
56
|
static get style() { return EdsCardSectionStyle0; }
|
|
57
57
|
}, [1, "eds-card-section", {
|
|
@@ -13,7 +13,7 @@ const EdsCardTags$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardTags extends
|
|
|
13
13
|
this.tags = [];
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return (h("div", { key: '
|
|
16
|
+
return (h("div", { key: '272d53abb9be9086881cb2f8e99f7fb7aae1bb59', class: "flex flex-wrap gap-y-4" }, this.tags.map((tag, index) => (h("eds-tag", { key: index, intent: this.accent ? 'accent' : 'default', label: tag })))));
|
|
17
17
|
}
|
|
18
18
|
static get style() { return EdsCardTagsStyle0; }
|
|
19
19
|
}, [1, "eds-card-tags", {
|
|
@@ -47,7 +47,7 @@ const EdsCardTitle = /*@__PURE__*/ proxyCustomElement(class EdsCardTitle extends
|
|
|
47
47
|
render() {
|
|
48
48
|
//const Tag = this.getTag();
|
|
49
49
|
const Heading = this.headingLevel;
|
|
50
|
-
return (h(Heading, { key: '
|
|
50
|
+
return (h(Heading, { key: 'bb97dc6dd53adda14ef251b2ec32952791438986', class: this.getTitleClass() }, h("a", { key: '37b6ac0668257d27fb3f03a6225a2d48e1fd1f79', class: "break-words after:absolute after:inset-0 after:z-10 after:content-[''] focus:outline-none", href: this.url, target: this.externalLink ? '_blank' : undefined, rel: this.externalLink ? 'noopener noreferrer' : undefined }, this.cardTitle)));
|
|
51
51
|
}
|
|
52
52
|
static get style() { return EdsCardTitleStyle0; }
|
|
53
53
|
}, [1, "eds-card-title", {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
-
import './color.js';
|
|
3
2
|
import { s as sendAnalytics } from './analytics.js';
|
|
4
3
|
import { d as defineCustomElement$6 } from './eds-avatar2.js';
|
|
5
4
|
import { d as defineCustomElement$5 } from './eds-card-desc2.js';
|
|
@@ -74,7 +73,7 @@ const EdsCardTool$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardTool extends
|
|
|
74
73
|
});
|
|
75
74
|
}
|
|
76
75
|
render() {
|
|
77
|
-
return (h("article", { key: '
|
|
76
|
+
return (h("article", { key: 'da61b384e966b148cd1f77eec59671bc4d92e259', class: `${this.el.tagName.toLowerCase()} ${this.articleClasses()}`, onClick: () => this.handleClick() }, h("eds-card-title", { key: '00702d032bc25f52b2a2c98255ceb60a1d314f4d', "heading-level": this.headingLevel, titleClass: this.image ? 'f-ui-01' : undefined, "card-title": this.cardTitle, url: this.url, "external-link": this.external, hierarchy: this.hierarchy }), this.description && (h("eds-card-desc", { key: 'd2b135ed422fb64f142af71330dc666e2f0c2b1f', class: "mt-8", "truncate-lines": "3", description: this.description })), this.image ? (h("eds-img", { src: this.image, alt: "Sample Image", width: 200, height: 150 })) : this.avatar || this.shortAbbreviation ? (h("eds-avatar", { class: "order-first mb-12", picture: this.avatar, initials: this.shortAbbreviation })) : null, h("div", { key: '54111e90175754cb0c1f2eb339e86926914ca0e7', class: "flex flex-wrap gap-y-4" }, this.parsedTags.map((tag, index) => (h("eds-tag", { key: index, intent: tag.style, label: tag.label }))))));
|
|
78
77
|
}
|
|
79
78
|
get el() { return this; }
|
|
80
79
|
static get style() { return EdsCardToolStyle0; }
|
|
@@ -21,7 +21,7 @@ const EdsCardWrapper$1 = /*@__PURE__*/ proxyCustomElement(class EdsCardWrapper e
|
|
|
21
21
|
this.withHover ? 'effect-shadow hover:shadow-hover cursor-pointer' : '',
|
|
22
22
|
'border-softer effect-focus-within relative flex grow flex-col rounded-lg border-2 p-16'
|
|
23
23
|
].join(' ');
|
|
24
|
-
return (h("article", { key: '
|
|
24
|
+
return (h("article", { key: 'f21cc9703011026652765b399e2b87b1ef80d220', class: articleClasses }, h("slot", { key: '9a37adad73d2d49edcc9ca9222d5b188202c5612' }), this.hasSlot('footer') && (h("div", { key: '87addfc052ed4ae33736724fbd8fbc8aca873b4d', class: "mt-auto" }, h("slot", { key: '2e48677f42ac2aa951bc1a82afa9291fea3ddd72', name: "footer" })))));
|
|
25
25
|
}
|
|
26
26
|
get el() { return this; }
|
|
27
27
|
}, [4, "eds-card-wrapper", {
|
|
@@ -2418,23 +2418,70 @@ const EdsCodeBlock = /*@__PURE__*/ proxyCustomElement(class EdsCodeBlock extends
|
|
|
2418
2418
|
this.language = undefined;
|
|
2419
2419
|
this.copied = false;
|
|
2420
2420
|
}
|
|
2421
|
+
/**
|
|
2422
|
+
* Copies the current code content to the clipboard and sets a temporary copied state.
|
|
2423
|
+
*
|
|
2424
|
+
* @private
|
|
2425
|
+
* @returns {void}
|
|
2426
|
+
*/
|
|
2421
2427
|
copyToClipboard() {
|
|
2422
2428
|
navigator.clipboard.writeText(this.code).then(() => {
|
|
2423
2429
|
this.copied = true;
|
|
2430
|
+
/*const analyticsName = this.createHumanFriendlyAnalyticsName(this.code, this.language);
|
|
2431
|
+
sendAnalytics({
|
|
2432
|
+
category: 'ui-component',
|
|
2433
|
+
parentContext: null,
|
|
2434
|
+
tag: this.el.tagName.toLowerCase(),
|
|
2435
|
+
name: analyticsName || '',
|
|
2436
|
+
action: 'copy'
|
|
2437
|
+
});*/
|
|
2424
2438
|
setTimeout(() => (this.copied = false), 2000);
|
|
2425
2439
|
});
|
|
2426
2440
|
}
|
|
2441
|
+
/**
|
|
2442
|
+
* Utility function that creates a human-friendly analytics name based on the code and language.
|
|
2443
|
+
* It uses:
|
|
2444
|
+
* - The language (in uppercase)
|
|
2445
|
+
* - The number of non-empty lines in the code
|
|
2446
|
+
* - The first non-empty line of code (truncated to 30 characters, if needed)
|
|
2447
|
+
*
|
|
2448
|
+
* returns A descriptive analytics name.
|
|
2449
|
+
*/
|
|
2450
|
+
/*private createHumanFriendlyAnalyticsName(code: string, language: string): string {
|
|
2451
|
+
// Count non-empty lines
|
|
2452
|
+
const lines = code.split('\n').filter(line => line.trim() !== '').length;
|
|
2453
|
+
|
|
2454
|
+
// Find the first non-empty line and trim it
|
|
2455
|
+
let firstNonEmptyLine = code.split('\n').find(line => line.trim() !== '');
|
|
2456
|
+
firstNonEmptyLine = firstNonEmptyLine ? firstNonEmptyLine.trim() : '';
|
|
2457
|
+
|
|
2458
|
+
// Truncate the snippet if it’s too long
|
|
2459
|
+
if (firstNonEmptyLine.length > 30) {
|
|
2460
|
+
firstNonEmptyLine = firstNonEmptyLine.substring(0, 30) + '...';
|
|
2461
|
+
}
|
|
2462
|
+
|
|
2463
|
+
return `CodeBlock:${language.toLowerCase()}|${lines}-line(s)|${firstNonEmptyLine.toLowerCase()}`;
|
|
2464
|
+
}*/
|
|
2465
|
+
/**
|
|
2466
|
+
* Returns the syntax-highlighted HTML for the code.
|
|
2467
|
+
* If the provided language is supported by Prism, this method returns the highlighted code.
|
|
2468
|
+
* Otherwise, it logs a warning and returns the raw code.
|
|
2469
|
+
*
|
|
2470
|
+
* @private
|
|
2471
|
+
* @returns {string} The highlighted HTML string for the code block.
|
|
2472
|
+
*/
|
|
2427
2473
|
getHighlightedCode() {
|
|
2428
2474
|
if (this.language && Prism$1.languages[this.language]) {
|
|
2429
2475
|
return Prism$1.highlight(this.code, Prism$1.languages[this.language], this.language);
|
|
2430
2476
|
}
|
|
2431
2477
|
// eslint-disable-next-line
|
|
2432
|
-
console.warn(`Unsupported or missing language: ${this.language}`);
|
|
2478
|
+
//console.warn(`Unsupported or missing language: ${this.language}`);
|
|
2433
2479
|
return this.code; // Fallback if language is not provided or unsupported
|
|
2434
2480
|
}
|
|
2435
2481
|
render() {
|
|
2436
|
-
return (h("div", { key: '
|
|
2482
|
+
return (h("div", { key: 'cb379e82bcf71345945b0b88397650ecd4992770', class: "relative bg-stronger rounded-sm" }, h("div", { key: '945046d4fd747cd64a83155b421a897e380cc612', class: "text-inverse flex justify-between items-center p-8" }, this.language ? (h("span", { class: "f-ui-03" }, this.language.toUpperCase())) : (h("pre", { class: "bg-stronger pl-8", role: "region", "aria-label": "Code block without language" }, h("code", { innerHTML: this.getHighlightedCode() }))), h("span", { key: '3f6c7e996101f0bb83fb8c9e6991a205a0b268c8', "aria-hidden": "true", class: "w-20 h-20 mt-8" }, h("eds-icon-wrapper", { key: '8ad9beb61058f29e688f6777233c61f7fb3ccfe8', icon: this.copied ? 'success' : 'copy', onClick: () => this.copyToClipboard() })), h("span", { key: 'a4f9a07906e1c2d9febb7ae789a3eed76dc422e9', class: "sr-only" }, "Copy Code")), this.language && (h("pre", { key: 'e31339126dd3cc885511aaa2bdf6f06f3a113c74', class: `language-${this.language} bg-stronger pl-8 pb-8`, role: "region", "aria-label": `Code block in ${this.language}` }, h("code", { key: '7efacd276f26a00f0f61793f6b8748259e1614b5', innerHTML: this.getHighlightedCode() })))));
|
|
2437
2483
|
}
|
|
2484
|
+
get el() { return this; }
|
|
2438
2485
|
static get style() { return EdsCodeBlockStyle0; }
|
|
2439
2486
|
}, [1, "eds-code-block", {
|
|
2440
2487
|
"code": [1],
|
|
@@ -38,7 +38,11 @@ const EdsDocsInstallation = () => (h("div", null,
|
|
|
38
38
|
h("div", { class: "my-8" },
|
|
39
39
|
h("eds-code-block", { code: "npm install @ebrains/assets", language: "html", "copy-label": "Copy Code" })),
|
|
40
40
|
h("div", { class: "my-8" },
|
|
41
|
-
h("eds-code-block", { code: "npm install @ebrains/react", language: "html", "copy-label": "Copy Code" }))
|
|
41
|
+
h("eds-code-block", { code: "npm install @ebrains/react", language: "html", "copy-label": "Copy Code" })),
|
|
42
|
+
h("div", { class: "my-8" },
|
|
43
|
+
h("eds-code-block", { code: "npm install @ebrains/vue", language: "html", "copy-label": "Copy Code" })),
|
|
44
|
+
h("div", { class: "my-8" },
|
|
45
|
+
h("eds-code-block", { code: "npm install @ebrains/angular", language: "html", "copy-label": "Copy Code" }))));
|
|
42
46
|
|
|
43
47
|
const EdsDocsReact = () => (h("div", null,
|
|
44
48
|
h("h2", null, "React Wrappers"),
|
|
@@ -46,7 +50,7 @@ const EdsDocsReact = () => (h("div", null,
|
|
|
46
50
|
h("div", { class: "my-8" },
|
|
47
51
|
h("eds-code-block", { code: "npm install @ebrains/react", language: "javascript", "copy-label": "Copy Code" })),
|
|
48
52
|
h("eds-section-core", { "section-title": "Example React App", "heading-level": "h3" },
|
|
49
|
-
h("eds-code-block", { code: '\nimport {
|
|
53
|
+
h("eds-code-block", { code: '\nimport {\n EdsHeader,\n EdsFullscreenMenu,\n EdsUser\n} from "@ebrains/react";\n\ninterface User {\n firstname: string;\n lastname: string;\n // Add any other properties your user object might have\n}\n\ninterface AuthStatus {\n authenticated: boolean;\n user: User | null;\n}\n\nimport { useEffect, useState } from "react";\n\nexport function App() {\n const [authStatus, setAuthStatus] = useState<AuthStatus>({\n authenticated: false,\n user: null,\n });\n const [activeTabIndex, setActiveTabIndex] = useState<number>(0);\n\n // Use useEffect to render Stencil components dynamically after the component mounts\n useEffect(() => {\n const handleAuthStatusChange = (event: CustomEvent) => {\n console.log(event.detail);\n setAuthStatus(event.detail); // Set the entire object\n };\n\n document.addEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n\n return () => {\n document.removeEventListener(\n "authStatusChanged",\n handleAuthStatusChange as EventListener,\n );\n };\n }, []);\n\n return (\n <div>\n <EdsHeader\n homeUrl="/"\n menuEnabled={true}\n inverseHeader={false}\n links={[\n { label: "About", url: "#" },\n { label: "Focus Areas", url: "#" },\n { label: "News & Events", url: "#" },\n { label: "Contact", url: "#" }\n ]}\n >\n <div className="px-16">\n <EdsUser\n keycloak-url="http://localhost:8080"\n keycloak-realm="nigeor-realm"\n keycloak-client-id="stencil-app"\n ></EdsUser>\n </div>\n </EdsHeader>\n\n <EdsFullscreenMenu\n home-url="/"\n links={[\n { label: "About", url: "#" },\n { label: "Focus Areas", url: "#" },\n { label: "News & Events", url: "#" },\n { label: "Contact", url: "#" }\n ]}\n ></EdsFullscreenMenu>\n \n <div>\n User is{" "}\n {authStatus.authenticated ? "authenticated" : "not authenticated"}\n </div>\n {authStatus.user && <div>Welcome, {authStatus.user.firstname}</div>}\n\n <div id="main"></div>\n </div>\n );\n}\n\nexport default App;\n\n', language: "javascript", "copy-label": "Copy Code" }))));
|
|
50
54
|
|
|
51
55
|
const EdsDocsVue = () => (h("div", null,
|
|
52
56
|
h("h2", null, "Vue Wrappers"),
|
|
@@ -112,7 +116,7 @@ const EdsComponentsSection$1 = /*@__PURE__*/ proxyCustomElement(class EdsCompone
|
|
|
112
116
|
}
|
|
113
117
|
}
|
|
114
118
|
render() {
|
|
115
|
-
return h("div", { key: '
|
|
119
|
+
return h("div", { key: '7e582a0eeafc2687229454532b5a7f66f91c1856', class: "container" }, this.renderContent());
|
|
116
120
|
}
|
|
117
121
|
}, [0, "eds-components-section", {
|
|
118
122
|
"tabIndex": [2, "tab-index"]
|
|
@@ -26,7 +26,7 @@ const EdsDocsPalettes$1 = /*@__PURE__*/ proxyCustomElement(class EdsDocsPalettes
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
return h("div", { key: '
|
|
29
|
+
return h("div", { key: 'e8cd71caa7b23cc4dc28c694ecb9f13e3fd4170a', class: "container" }, this.renderContent());
|
|
30
30
|
}
|
|
31
31
|
}, [0, "eds-docs-palettes", {
|
|
32
32
|
"tabIndex": [2, "tab-index"]
|
|
@@ -30,7 +30,7 @@ const EdsDocsContent = /*@__PURE__*/ proxyCustomElement(class EdsDocsContent ext
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
|
-
return h("div", { key: '
|
|
33
|
+
return h("div", { key: 'b140f7650e5e01711dc0778b04af83f9d004efc7', class: "container" }, this.renderContent());
|
|
34
34
|
}
|
|
35
35
|
}, [0, "eds-docs-tokens", {
|
|
36
36
|
"tabIndex": [2, "tab-index"]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as sendAnalytics } from './analytics.js';
|
|
2
3
|
import { d as defineCustomElement$2 } from './eds-button2.js';
|
|
3
4
|
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
4
5
|
|
|
@@ -15,6 +16,7 @@ const EdsDropdown = /*@__PURE__*/ proxyCustomElement(class EdsDropdown extends H
|
|
|
15
16
|
* Toggles the visibility of the dropdown and manages focus.
|
|
16
17
|
*/
|
|
17
18
|
this.handleClick = () => {
|
|
19
|
+
var _a;
|
|
18
20
|
this.isOpen = !this.isOpen;
|
|
19
21
|
if (this.isOpen) {
|
|
20
22
|
this.focusIndex = 0;
|
|
@@ -23,6 +25,13 @@ const EdsDropdown = /*@__PURE__*/ proxyCustomElement(class EdsDropdown extends H
|
|
|
23
25
|
else {
|
|
24
26
|
this.closeDropdown();
|
|
25
27
|
}
|
|
28
|
+
sendAnalytics({
|
|
29
|
+
category: 'ui-component',
|
|
30
|
+
parentContext: null,
|
|
31
|
+
tag: this.host.tagName.toLowerCase(),
|
|
32
|
+
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '',
|
|
33
|
+
action: this.isOpen ? 'expanded' : 'collapsed'
|
|
34
|
+
});
|
|
26
35
|
};
|
|
27
36
|
this.icon = 'chevron-down';
|
|
28
37
|
this.label = undefined;
|
|
@@ -89,39 +98,20 @@ const EdsDropdown = /*@__PURE__*/ proxyCustomElement(class EdsDropdown extends H
|
|
|
89
98
|
componentDidLoad() {
|
|
90
99
|
var _a;
|
|
91
100
|
this.focusableItems = Array.from(((_a = this.dropdownContent) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button')) || []);
|
|
92
|
-
const btns = this.host.shadowRoot.querySelectorAll('eds-button');
|
|
93
|
-
btns.forEach((btn) => {
|
|
94
|
-
this.emitContext(btn);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Emits a custom event called `parentContext` for a given button element.
|
|
99
|
-
* Provides context information about the dropdown component.
|
|
100
|
-
*
|
|
101
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
102
|
-
*/
|
|
103
|
-
emitContext(linkElement) {
|
|
104
|
-
const event = new CustomEvent('parentContext', {
|
|
105
|
-
detail: {
|
|
106
|
-
componentName: this.host.tagName.toLowerCase(),
|
|
107
|
-
identifier: null
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
linkElement.dispatchEvent(event);
|
|
111
101
|
}
|
|
112
102
|
/**
|
|
113
103
|
* Renders the dropdown component and displays its content when open.
|
|
114
104
|
* @returns {JSX.Element} The rendered dropdown component.
|
|
115
105
|
*/
|
|
116
106
|
render() {
|
|
117
|
-
return (h("div", { key: '
|
|
107
|
+
return (h("div", { key: '84f4cea78ea1c40c7897a356fe03ac83922fccb8', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, h("eds-button", { key: '99dc51632dc82830054502a2d6d77d9fcefe9337', label: this.label, "aria-label": this.ariaLabel, icon: this.icon, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu" }), h("nav", { key: 'a63613a7ecf709fd1d22d77da4b2d286905fef3e', role: "menu", class: {
|
|
118
108
|
'shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8': true,
|
|
119
109
|
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
120
110
|
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
121
111
|
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
122
112
|
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
123
113
|
'rounded-lg': this.rounded
|
|
124
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, h("slot", { key: '
|
|
114
|
+
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, h("slot", { key: 'dda70b865ed03dc7ad36a32934587bbcb0a16c1b' }))));
|
|
125
115
|
}
|
|
126
116
|
get host() { return this; }
|
|
127
117
|
static get style() { return EdsDropdownStyle0; }
|
|
@@ -44,7 +44,7 @@ const EdsFooter = /*@__PURE__*/ proxyCustomElement(class EdsFooter extends HTMLE
|
|
|
44
44
|
* @returns {JSX.Element} The rendered JSX for the footer component.
|
|
45
45
|
*/
|
|
46
46
|
render() {
|
|
47
|
-
return (h("footer", { key: '
|
|
47
|
+
return (h("footer", { key: 'ba6500548e8f719b8670063918c61b391ddb8387', class: `${this.extraClass} pb-banner` }, this.social ? (h("div", { class: "border-softest border-t-2 pt-20 pb-28 md:pt-28" }, h("div", { class: "container pb-20 xl:pb-40 " }, h("div", { class: "grid-layout" }, h("div", { class: "grid-col-span-12 lg:grid-col-span-5" }, h("eds-social-networks", { class: "mt-28" })), h("nav", { "aria-label": "Secondary nav", class: "grid-col-span-12 lg:grid-col-span-6 lg:grid-col-start-7 grid-layout mt-28 gap-y-12 lg:mt-0" }))))) : null, h("div", { key: '1221cca6d40c4de8ed7ceefa84198817bf904630', class: `border-softest ${this.social ? 'border-t-2' : ''} pt-20 pb-28 md:pt-28` }, h("div", { key: 'ad55b938fb2961074822d6bf458f0ea7a15baa84', class: "container flex flex-wrap items-center gap-20 lg:flex-nowrap" }, h("div", { key: '91c13fdd98508a812e5dcfa86056b5adc035623d', class: "flex items-center gap-x-12" }, h("a", { key: '4ddd8715a5cabbff2209f8ceb389900c9eddcd74', target: "_blank", rel: "noopener noreferrer", class: "effect-focus focus-visible:rounded-xs flex w-[54px] ml-0", href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-2020_en" }, h("eds-img", { key: 'df5f16284084d9171cd3d567dd249a0ef98bde79', width: 54, height: 41, src: "https://www.ebrains.eu/flags/4x3/eu.svg" }))), h("div", { key: '0ff4328cc30f06c1a85ffc726d5b6b0dc53e49b9', class: "f-ui-04 text-light order-last w-full lg:order-none lg:w-auto" }, h("p", { key: '2cb2b4f072a141e58c9a2185c9179d475f9690bd' }, this.fundedBy), h("div", { key: 'b31d1e18933fb1be11d8454f9a5301dedc839015', class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap" }, h("span", { key: 'aab95785cfb2bc7d490ac9426ef5e421f9418dc9', class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline" }, "\u00A9 ", this.rightsReserved), this.hasCookiesSetUp && (h("button", { key: 'fbd5bf3560faf0ee34d740bda423595c3cd21ad8', class: "effect-focus !no-underline underline-offset-4 hover:!underline", onClick: () => this.toggleCookiesPopup() }, this.cookiesPreference)))), h("div", { key: '0427234b6679ae05b673a5c6efb8447306f61876', class: "ml-auto pl-12" }, this.enableScrollTop ? (h("eds-button", { "aria-label": "Back to top", intent: "ghostInverse", icon: "chevron-up", onClick: this.backToTop })) : null)))));
|
|
48
48
|
}
|
|
49
49
|
static get style() { return EdsFooterStyle0; }
|
|
50
50
|
}, [0, "eds-footer", {
|