@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
|
@@ -1,75 +1,98 @@
|
|
|
1
1
|
import { r as registerInstance, h, g as getElement, c as createEvent } from './index-e96badea.js';
|
|
2
|
-
import { g as gradientBGColorVariants, s as sendAnalytics } from './color-0ba8ed56.js';
|
|
3
2
|
import { c as cva } from './index-39c58238.js';
|
|
3
|
+
import { s as sendAnalytics } from './analytics-1cde8e4a.js';
|
|
4
4
|
import { h as hLogoColor } from './logo-color-7f1fd803.js';
|
|
5
5
|
import { h as hLogoBlack, a as hLogoColorWhite, b as hLogoWhite, c as hLogoWhiteNoBg, v as vLogoColor, d as vLogoBlack, e as vLogoColorWhite, f as vLogoWhite, g as vLogoWhiteNoBg } from './logo-white-no-bg-f382f86f.js';
|
|
6
6
|
import { t as toast } from './toastManager-d9eee791.js';
|
|
7
|
-
import { l as login, a as logout, c as checkServerAvailability, i as initKeycloak, b as isAuthenticated, g as getUser } from './keycloak-13893af6.js';
|
|
8
7
|
|
|
9
|
-
const edsAvatarCss = ".border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border: 2px solid rgba(0, 0, 0, .1);\n }\n\n &::after {\n content: '';\n }\n}\n\n.border-inside-pill {\n &::after {\n border-radius: 100px;\n }\n\n &::after {\n content: '';\n }\n}\n\n.border-inside-inverse {\n &::after {\n border: 2px solid rgba(255, 255, 255, 0.3);\n }\n\n &::after {\n content: '';\n }\n}\n\n.aspect-1x1 {\n aspect-ratio: 1/1;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.px-4 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.rounded-pill {\n border-radius: 100px;\n}\n\n.rounded-sm {\n border-radius: 8px;\n}\n\n.rounded-xs {\n border-radius: 4px;\n}\n\n\n.bg-dark {\n background-color: var(--grey-300);\n}\n\n.bg-darker {\n background-color: var(--grey-400);\n}\n\n.bg-stronger {\n background-color: var(--grey-900);\n}\n\n.bg-strongest {\n background-color: var(--black);\n}\n\n.text-accent {\n color: var(--green-500);\n}\n\n.text-default {\n color: var(--black);\n}\n\n.\\!no-underline {\n text-decoration-line: none !important;\n}\n\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n\n.w-32 {\n width: 2rem;\n}\n\n.w-44 {\n width: 2.75rem;\n}\n\n.w-\\[54px\\] {\n width: 54px;\n}";
|
|
10
|
-
const
|
|
8
|
+
const edsAlertCss = ":root {\n font-optical-sizing: auto;\n}\nhtml,\nbody {\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n/*\n:focus[data-focus-method=\"mouse\"],\n:focus[data-focus-method=\"touch\"] {\n outline: none !important;\n}\n*/\n/*FADE*/\n/*FADE TRANSLATE Y*/\n/*SLIDE LEFT*/\n/*SLIDE BOTTOM*/\n/*COLLAPSE Y*/\n*, ::before, ::after {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n::backdrop {\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n}\n/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*/\n/*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: currentColor; /* 2 */\n}\n::before,\n::after {\n}\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n/*\nRemove the default font size and weight for headings.\n*/\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\na {\n color: inherit;\n text-decoration: inherit;\n}\n/*\nAdd the correct font weight in Edge and Safari.\n*/\nb,\nstrong {\n font-weight: bolder;\n}\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\ncode,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n/*\nAdd the correct font size in all browsers.\n*/\nsmall {\n font-size: 80%;\n}\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\nsub {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\nsub {\n bottom: -0.25em;\n}\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\nbutton,\ninput,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\nbutton,\nselect {\n text-transform: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\nbutton,\ninput:where([type='button']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n/*\nAdd the correct display in Chrome and Safari.\n*/\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\np,\npre {\n margin: 0;\n}\nfieldset {\n margin: 0;\n padding: 0;\n}\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n/*\nPrevent resizing textareas horizontally by default.\n*/\ntextarea {\n resize: vertical;\n}\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n/*\nSet the default cursor for buttons.\n*/\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\nimg,\niframe,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\nimg {\n max-width: 100%;\n height: auto;\n}\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n:root {\n --inner-gutter: 8px;\n}\n@media (min-width: 750px) {\n :root {\n --inner-gutter: 12px;\n }\n}\n@media (min-width: 900px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1024px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 1280px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n@media (min-width: 2200px) {\n :root {\n --inner-gutter: 16px;\n }\n}\n:root {\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n:root {\n --sans: Inter, Helvetica, Arial, sans-serif;\n --f-ui-01-fontFamily: var(--sans);\n --f-ui-01-fontWeight: 800;\n --f-ui-01-fontSize: 18px;\n --f-ui-01-lineHeight: 110%;\n --f-ui-01-letterSpacing: -0.01em;\n}\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n@media (min-width: 750px) {\n :root {\n}\n}\n@media (min-width: 900px) {\n :root {\n}\n}\n@media (min-width: 1024px) {\n :root {\n}\n}\n.f-ui-01 b, .f-ui-01 strong {\n font-weight: var(--f-ui-01---bold-weight, bold);\n}\n:root {\n --grey-300: #e6e6e6;\n --green-200: #d3ffdc;\n --yellow-200: #ffffcb;\n --red-200: #ffe0e1;\n}\n@media (min-width: 750px) {\n .md\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .md\\:grid-line-x-0 > *::before {\n content: none;\n }\n .md\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .md\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n@media (min-width: 900px) {\n .lg\\:grid-line-x > *::before {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: 0;\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-xfull > *::before {\n content: attr(👻);\n inset-inline-start: calc(var(--inner-gutter) / -2);\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: calc(var(--inner-gutter) / -2);\n border-top: 0 solid transparent;\n border-bottom: 0 solid transparent;\n }\n .lg\\:grid-line-x-0 > *::before {\n content: none;\n }\n .lg\\:grid-line-y > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: 0;\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-yfull > *::after {\n content: attr(👻);\n inset-inline-start: 0;\n inset-inline-end: calc(var(--inner-gutter) / -2);\n top: calc(var(--inner-gutter) / -1);\n bottom: 0;\n border-inline-start: 0 solid transparent;\n border-inline-end: 0 solid transparent;\n }\n .lg\\:grid-line-y-0 > *::after {\n content: none;\n }\n}\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n }\n\n &::after {\n position: absolute;\n }\n\n &::after {\n inset: 0rem;\n }\n\n &::after {\n z-index: 1;\n }\n\n &::after {\n border-radius: 8px;\n }\n\n &::after {\n border-width: 1px;\n }\n\n &::after {\n border-width: 2px;\n }\n\n &::after {\n border-color: rgba(0, 0, 0, .1 );\n }\n\n &::after {\n content: '';\n }\n}\n/** region TRANSITIONS */\n/** endregion */\n/* region FOCUS */\n/* endregion */\n/* region BG */\n/* endregion */\n/*region shadow*/\n/*endregion*/\n.flex {\n display: flex;\n}\n.w-full {\n width: 100%;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.gap-x-12 {\n -moz-column-gap: 0.75rem;\n column-gap: 0.75rem;\n}\n.space-y-12 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.rounded-lg {\n border-radius: 16px;\n}\n.bg-dark {\n background-color: var(--grey-300);\n}\n.bg-error {\n background-color: var(--red-200);\n}\n.bg-success {\n background-color: var(--green-200);\n}\n.bg-warning {\n background-color: var(--yellow-200);\n}\n.p-16 {\n padding: 1rem;\n}\n.p-20 {\n padding: 1.25rem;\n}\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-20 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-20 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pr-12 {\n padding-right: 0.75rem;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n[class*=underline-] {\n text-decoration-line: underline;\n}\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n.after\\:border-softest::after {\n border-color: rgba(0, 0, 0, .05 );\n}\n";
|
|
9
|
+
const EdsAlertStyle0 = edsAlertCss;
|
|
11
10
|
|
|
12
|
-
const
|
|
11
|
+
const alertStyles = cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
12
|
+
variants: {
|
|
13
|
+
intent: {
|
|
14
|
+
default: '',
|
|
15
|
+
warning: 'bg-warning',
|
|
16
|
+
error: 'bg-error',
|
|
17
|
+
success: 'bg-success'
|
|
18
|
+
},
|
|
19
|
+
direction: {
|
|
20
|
+
vertical: 'space-y-12',
|
|
21
|
+
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
22
|
+
},
|
|
23
|
+
withBtn: {
|
|
24
|
+
false: '',
|
|
25
|
+
true: ''
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
compoundVariants: [
|
|
29
|
+
{
|
|
30
|
+
direction: 'horizontal',
|
|
31
|
+
withBtn: true,
|
|
32
|
+
class: 'px-20 pr-12 py-12'
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
direction: 'horizontal',
|
|
36
|
+
withBtn: false,
|
|
37
|
+
class: 'p-20'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
direction: 'vertical',
|
|
41
|
+
withBtn: true,
|
|
42
|
+
class: 'p-16'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
direction: 'vertical',
|
|
46
|
+
withBtn: false,
|
|
47
|
+
class: 'px-12 py-20'
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
intent: 'default',
|
|
52
|
+
direction: 'horizontal'
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const EdsAlert = class {
|
|
13
56
|
constructor(hostRef) {
|
|
14
57
|
registerInstance(this, hostRef);
|
|
15
|
-
this.
|
|
16
|
-
this.
|
|
17
|
-
this.
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.initialsStrong = false;
|
|
58
|
+
this.message = undefined;
|
|
59
|
+
this.pressableLabel = undefined;
|
|
60
|
+
this.pressableUrl = undefined;
|
|
61
|
+
this.direction = 'horizontal';
|
|
62
|
+
this.intent = 'default';
|
|
63
|
+
this.withBtn = false;
|
|
22
64
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return `${this.firstName.charAt(0)}${this.lastName.charAt(0)}`.toUpperCase();
|
|
65
|
+
componentWillLoad() {
|
|
66
|
+
this.withBtn = Boolean(this.pressableLabel);
|
|
67
|
+
}
|
|
68
|
+
componentDidLoad() {
|
|
69
|
+
var _a;
|
|
70
|
+
// Query for the 'eds-link' element inside the shadow root.
|
|
71
|
+
const lnk = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('eds-link');
|
|
72
|
+
if (lnk) {
|
|
73
|
+
this.emitContext(lnk);
|
|
33
74
|
}
|
|
34
|
-
return undefined;
|
|
35
75
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
'flex',
|
|
45
|
-
'items-center',
|
|
46
|
-
'justify-center',
|
|
47
|
-
'overflow-hidden',
|
|
48
|
-
this.picture ? '' : 'px-4',
|
|
49
|
-
this.rounded ? 'rounded-pill border-inside-pill w-32' : 'w-[54px] rounded-sm',
|
|
50
|
-
this.color ? 'border-inside-inverse' : '',
|
|
51
|
-
this.color === 'grey'
|
|
52
|
-
? 'bg-dark'
|
|
53
|
-
: this.color && !this.picture
|
|
54
|
-
? gradientBGColorVariants({
|
|
55
|
-
color: this.color,
|
|
56
|
-
direction: 'top',
|
|
57
|
-
pseudo: false
|
|
58
|
-
})
|
|
59
|
-
: !this.picture
|
|
60
|
-
? 'bg-strongest text-accent'
|
|
61
|
-
: ''
|
|
62
|
-
].join(' ');
|
|
76
|
+
emitContext(linkElement) {
|
|
77
|
+
const event = new CustomEvent('parentContext', {
|
|
78
|
+
detail: {
|
|
79
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
80
|
+
identifier: null
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
linkElement.dispatchEvent(event);
|
|
63
84
|
}
|
|
64
|
-
/**
|
|
65
|
-
* Renders the avatar component. Displays either an image using `eds-img` or initials depending on whether `picture` or `computedInitials` is set.
|
|
66
|
-
* @returns {JSX.Element} The rendered avatar component.
|
|
67
|
-
*/
|
|
68
85
|
render() {
|
|
69
|
-
return (h("div", { key: '
|
|
86
|
+
return (h("div", { key: '519742081f681d6d67bc1b42c89fe1b6d005fe0f', class: alertStyles({
|
|
87
|
+
intent: this.intent,
|
|
88
|
+
direction: this.direction,
|
|
89
|
+
withBtn: this.withBtn
|
|
90
|
+
}), role: "alert" }, h("p", { key: '6a5d11fdc2a975512b12c307286b0a8b06998bec', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
91
|
+
(this.pressableUrl ? (h("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary", external: true })) : null)));
|
|
70
92
|
}
|
|
93
|
+
get el() { return getElement(this); }
|
|
71
94
|
};
|
|
72
|
-
|
|
95
|
+
EdsAlert.style = EdsAlertStyle0;
|
|
73
96
|
|
|
74
97
|
const edsBlockBreakCss = ".border-soft{border-color:rgba(0, 0, 0, .15)}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-softest{border-color:rgba(0, 0, 0, .05)}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.w-full{width:100%}.border-t-2{border-top-width:2px}";
|
|
75
98
|
const EdsBlockBreakStyle0 = edsBlockBreakCss;
|
|
@@ -80,7 +103,7 @@ const EdsBlockBreak = class {
|
|
|
80
103
|
this.extraClass = '';
|
|
81
104
|
}
|
|
82
105
|
render() {
|
|
83
|
-
return h("hr", { key: '
|
|
106
|
+
return h("hr", { key: '8cb39dda5d7f909b459390fe7e3f86dfd147ba98', class: `border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}` });
|
|
84
107
|
}
|
|
85
108
|
};
|
|
86
109
|
EdsBlockBreak.style = EdsBlockBreakStyle0;
|
|
@@ -125,7 +148,7 @@ const EdsBreadcrumb = class {
|
|
|
125
148
|
this.parsedItems = Array.isArray(parsed) ? parsed : [];
|
|
126
149
|
}
|
|
127
150
|
catch (e) {
|
|
128
|
-
console.error('Error parsing breadcrumb items:', e);
|
|
151
|
+
//console.error('Error parsing breadcrumb items:', e);
|
|
129
152
|
this.parsedItems = [];
|
|
130
153
|
}
|
|
131
154
|
}
|
|
@@ -153,9 +176,9 @@ const EdsBreadcrumb = class {
|
|
|
153
176
|
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
154
177
|
*/
|
|
155
178
|
componentDidLoad() {
|
|
156
|
-
|
|
157
|
-
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
158
|
-
links.forEach((link) => {
|
|
179
|
+
var _a;
|
|
180
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
|
|
181
|
+
links === null || links === void 0 ? void 0 : links.forEach((link) => {
|
|
159
182
|
this.emitContext(link);
|
|
160
183
|
});
|
|
161
184
|
}
|
|
@@ -175,54 +198,49 @@ const EdsBreadcrumb = class {
|
|
|
175
198
|
linkElement.dispatchEvent(event);
|
|
176
199
|
}
|
|
177
200
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
201
|
+
* Returns breadcrumb items with potential truncation if there are too many.
|
|
202
|
+
* It inserts an ellipsis item where necessary.
|
|
180
203
|
*/
|
|
181
204
|
getTruncatedItems() {
|
|
182
205
|
const totalItems = this.parsedItems.length;
|
|
206
|
+
const ellipsis = { label: '...', url: '', isHidden: true };
|
|
183
207
|
if (totalItems > this.maxVisibleItems) {
|
|
184
208
|
const firstItem = this.parsedItems[0];
|
|
185
209
|
const lastItems = this.parsedItems.slice(-2);
|
|
186
|
-
const ellipsis = { label: '...', url: '', isHidden: true };
|
|
187
210
|
if (this.maxVisibleItems === 3) {
|
|
188
|
-
return [
|
|
189
|
-
this.truncateLabel(firstItem),
|
|
190
|
-
ellipsis,
|
|
191
|
-
...lastItems.map((item, index) => (index === lastItems.length - 1 ? item : this.truncateLabel(item)))
|
|
192
|
-
];
|
|
211
|
+
return [firstItem, ellipsis, ...lastItems];
|
|
193
212
|
}
|
|
194
213
|
else if (this.maxVisibleItems === 4) {
|
|
195
214
|
const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
|
|
196
|
-
return [
|
|
197
|
-
this.truncateLabel(firstItem),
|
|
198
|
-
this.truncateLabel(middleItem),
|
|
199
|
-
ellipsis,
|
|
200
|
-
...lastItems.map((item, index) => (index === lastItems.length - 1 ? item : this.truncateLabel(item)))
|
|
201
|
-
];
|
|
215
|
+
return [firstItem, middleItem, ellipsis, ...lastItems];
|
|
202
216
|
}
|
|
203
217
|
}
|
|
204
|
-
return this.parsedItems
|
|
218
|
+
return this.parsedItems;
|
|
205
219
|
}
|
|
206
220
|
/**
|
|
207
|
-
*
|
|
208
|
-
*
|
|
221
|
+
* Helper to determine the display label and full label.
|
|
222
|
+
* If the label is longer than 15 characters and the item is not the current (last) item,
|
|
223
|
+
* we display a truncated version but use the full label for aria attributes.
|
|
209
224
|
*/
|
|
210
|
-
|
|
211
|
-
if (item.label.length > 15) {
|
|
212
|
-
return
|
|
225
|
+
getLabels(item, isCurrent) {
|
|
226
|
+
if (!isCurrent && item.label.length > 15) {
|
|
227
|
+
return { displayLabel: `${item.label.slice(0, 15)}...`, fullLabel: item.label };
|
|
213
228
|
}
|
|
214
|
-
return item;
|
|
229
|
+
return { displayLabel: item.label, fullLabel: item.label };
|
|
215
230
|
}
|
|
216
231
|
/**
|
|
217
232
|
* Render method for the breadcrumb component.
|
|
218
233
|
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
219
|
-
* The last link is
|
|
234
|
+
* The last link is marked as the current page.
|
|
220
235
|
*/
|
|
221
236
|
render() {
|
|
222
237
|
const itemsToRender = this.getTruncatedItems();
|
|
223
|
-
return (h("nav", { key: '
|
|
238
|
+
return (h("nav", { key: 'd177957e1b3218c21991bbdc9636a8e32befe990', "aria-label": "Breadcrumb" }, h("ol", { key: 'd10336ddee99b9fb84d17e53093c57c6a025982f', class: "flex items-center space-x-2" }, itemsToRender.map((item, index) => {
|
|
224
239
|
const isLast = index === itemsToRender.length - 1;
|
|
225
|
-
return (h("li", { class: "flex items-center" }, !item.isHidden ? (
|
|
240
|
+
return (h("li", { class: "flex items-center" }, !item.isHidden ? ((() => {
|
|
241
|
+
const { displayLabel, fullLabel } = this.getLabels(item, isLast);
|
|
242
|
+
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' } : {}))));
|
|
243
|
+
})()) : (h("span", { class: "truncate px-2", "aria-hidden": "true" }, "...")), !isLast && !item.isHidden && (h("eds-icon-wrapper", { icon: "chevron-right", class: "w-20 h-20" }))));
|
|
226
244
|
}))));
|
|
227
245
|
}
|
|
228
246
|
get el() { return getElement(this); }
|
|
@@ -388,9 +406,8 @@ const EdsButton = class {
|
|
|
388
406
|
iconOnly: false
|
|
389
407
|
}
|
|
390
408
|
});
|
|
391
|
-
this.parentContext = null; // Accepts the entire event detail or null
|
|
392
409
|
this.label = undefined;
|
|
393
|
-
this.ariaLabel =
|
|
410
|
+
this.ariaLabel = 'Button';
|
|
394
411
|
this.elementType = 'button';
|
|
395
412
|
this.intent = 'secondary';
|
|
396
413
|
this.loading = false;
|
|
@@ -403,15 +420,19 @@ const EdsButton = class {
|
|
|
403
420
|
this.extraClass = undefined;
|
|
404
421
|
this.triggerClick = undefined;
|
|
405
422
|
}
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
//
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
423
|
+
/*private parentContext: ParentContextDetail | null = null; // Accepts the entire event detail or null
|
|
424
|
+
|
|
425
|
+
@Listen('parentContext')
|
|
426
|
+
handleParentContext(event: CustomEvent) {
|
|
427
|
+
if (event.target !== this.el) {
|
|
428
|
+
// Ignore the event if it's not targeted at this specific instance
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
//console.log(event.detail);
|
|
432
|
+
this.parentContext = event.detail;
|
|
433
|
+
event.stopPropagation();
|
|
434
|
+
}
|
|
435
|
+
*/
|
|
415
436
|
handleClick(event) {
|
|
416
437
|
var _a, _b;
|
|
417
438
|
if (this.disabled) {
|
|
@@ -421,7 +442,7 @@ const EdsButton = class {
|
|
|
421
442
|
}
|
|
422
443
|
sendAnalytics({
|
|
423
444
|
category: 'ui-component',
|
|
424
|
-
parentContext:
|
|
445
|
+
parentContext: null,
|
|
425
446
|
tag: this.el.tagName.toLowerCase(),
|
|
426
447
|
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || ((_b = this.ariaLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || '',
|
|
427
448
|
action: 'click'
|
|
@@ -448,7 +469,7 @@ const EdsButton = class {
|
|
|
448
469
|
show: !this.loading
|
|
449
470
|
});
|
|
450
471
|
const ElementType = this.elementType;
|
|
451
|
-
return (h(ElementType, { key: '
|
|
472
|
+
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: {
|
|
452
473
|
border: `3px solid ${this.intent === 'secondary' ? 'rgba(255, 255, 255, .3)' : 'rgba(0, 0, 0, .3)'}`,
|
|
453
474
|
borderBottomColor: this.intent === 'secondary' ? '#fff' : '#000'
|
|
454
475
|
} }))), this.icon ? h("eds-icon-wrapper", { class: iconClasses, icon: this.icon }) : null));
|
|
@@ -457,129 +478,6 @@ const EdsButton = class {
|
|
|
457
478
|
};
|
|
458
479
|
EdsButton.style = EdsButtonStyle0;
|
|
459
480
|
|
|
460
|
-
const edsDropdownCss = ".z-focus{z-index:99}.relative{position:relative}.shadow-small{--tw-shadow:0px 1.5px 2px rgba(0, 0, 0, 0.1);--tw-shadow-colored:0px 1.5px 2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.bg-inverse{background-color:var(--white)}.border-softest{border:2px solid rgba(0, 0, 0, .05)}.z-10{z-index:10}.z-on-top{z-index:99999}.absolute{position:absolute}.top-full{top:100%}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.gap-y-4{row-gap:0.25rem}.rounded-lg{border-radius:16px}.border-2{border-width:2px}.p-8{padding:0.5rem}.left-0{left:0rem}.left-1\\/2{left:50%}.left-4{left:0.25rem}.left-\\[4px\\]{left:4px}.right-0{right:0rem}.right-4{right:0.25rem}.right-8{right:0.5rem}";
|
|
461
|
-
const EdsDropdownStyle0 = edsDropdownCss;
|
|
462
|
-
|
|
463
|
-
const EdsDropdown = class {
|
|
464
|
-
constructor(hostRef) {
|
|
465
|
-
registerInstance(this, hostRef);
|
|
466
|
-
this.focusableItems = [];
|
|
467
|
-
/**
|
|
468
|
-
* Toggles the visibility of the dropdown and manages focus.
|
|
469
|
-
*/
|
|
470
|
-
this.handleClick = () => {
|
|
471
|
-
this.isOpen = !this.isOpen;
|
|
472
|
-
if (this.isOpen) {
|
|
473
|
-
this.focusIndex = 0;
|
|
474
|
-
this.focusItem();
|
|
475
|
-
}
|
|
476
|
-
else {
|
|
477
|
-
this.closeDropdown();
|
|
478
|
-
}
|
|
479
|
-
};
|
|
480
|
-
this.icon = 'chevron-down';
|
|
481
|
-
this.label = undefined;
|
|
482
|
-
this.rounded = false;
|
|
483
|
-
this.ariaLabel = 'Open dropdown';
|
|
484
|
-
this.asNav = true;
|
|
485
|
-
this.dropdownPos = 'left';
|
|
486
|
-
this.dropdownOffset = true;
|
|
487
|
-
this.intent = 'tertiary';
|
|
488
|
-
this.isOpen = false;
|
|
489
|
-
this.focusIndex = -1;
|
|
490
|
-
}
|
|
491
|
-
/**
|
|
492
|
-
* Closes the dropdown when a click occurs outside of it.
|
|
493
|
-
* @param {Event} e - The click event.
|
|
494
|
-
*/
|
|
495
|
-
handleWindowClick(e) {
|
|
496
|
-
if (!this.host.contains(e.target)) {
|
|
497
|
-
this.closeDropdown();
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
/**
|
|
501
|
-
* Handles keyboard navigation and accessibility within the dropdown.
|
|
502
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
503
|
-
*/
|
|
504
|
-
handleKeyDown(event) {
|
|
505
|
-
if (this.isOpen) {
|
|
506
|
-
const key = event.key;
|
|
507
|
-
switch (key) {
|
|
508
|
-
case 'Tab':
|
|
509
|
-
this.closeDropdown();
|
|
510
|
-
break;
|
|
511
|
-
case 'ArrowUp':
|
|
512
|
-
event.preventDefault();
|
|
513
|
-
this.focusIndex = (this.focusIndex - 1 + this.focusableItems.length) % this.focusableItems.length;
|
|
514
|
-
this.focusItem();
|
|
515
|
-
break;
|
|
516
|
-
case 'ArrowDown':
|
|
517
|
-
event.preventDefault();
|
|
518
|
-
this.focusIndex = (this.focusIndex + 1) % this.focusableItems.length;
|
|
519
|
-
this.focusItem();
|
|
520
|
-
break;
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
/**
|
|
525
|
-
* Closes the dropdown and resets focus.
|
|
526
|
-
*/
|
|
527
|
-
closeDropdown() {
|
|
528
|
-
this.isOpen = false;
|
|
529
|
-
this.focusIndex = -1;
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Sets focus on the currently selected item in the dropdown.
|
|
533
|
-
*/
|
|
534
|
-
focusItem() {
|
|
535
|
-
var _a;
|
|
536
|
-
(_a = this.focusableItems[this.focusIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
537
|
-
}
|
|
538
|
-
/**
|
|
539
|
-
* Lifecycle method that runs after the component has been added to the DOM.
|
|
540
|
-
* Initializes focusable items within the dropdown.
|
|
541
|
-
*/
|
|
542
|
-
componentDidLoad() {
|
|
543
|
-
var _a;
|
|
544
|
-
this.focusableItems = Array.from(((_a = this.dropdownContent) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button')) || []);
|
|
545
|
-
const btns = this.host.shadowRoot.querySelectorAll('eds-button');
|
|
546
|
-
btns.forEach((btn) => {
|
|
547
|
-
this.emitContext(btn);
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Emits a custom event called `parentContext` for a given button element.
|
|
552
|
-
* Provides context information about the dropdown component.
|
|
553
|
-
*
|
|
554
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
555
|
-
*/
|
|
556
|
-
emitContext(linkElement) {
|
|
557
|
-
const event = new CustomEvent('parentContext', {
|
|
558
|
-
detail: {
|
|
559
|
-
componentName: this.host.tagName.toLowerCase(),
|
|
560
|
-
identifier: null
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
linkElement.dispatchEvent(event);
|
|
564
|
-
}
|
|
565
|
-
/**
|
|
566
|
-
* Renders the dropdown component and displays its content when open.
|
|
567
|
-
* @returns {JSX.Element} The rendered dropdown component.
|
|
568
|
-
*/
|
|
569
|
-
render() {
|
|
570
|
-
return (h("div", { key: 'd49e23ee208cfb000baba83795899487e4d94af7', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, h("eds-button", { key: '6647007c34b47558873e470890893ae4f8e18b5c', 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: '41bbd4e2bf02345393aaa97101b2c3aca2fa4085', class: {
|
|
571
|
-
'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,
|
|
572
|
-
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
573
|
-
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
574
|
-
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
575
|
-
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
576
|
-
'rounded-lg': this.rounded
|
|
577
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, h("slot", { key: '714bad9f5a8ddf6d5ea246044a83b0a5102494c4' }))));
|
|
578
|
-
}
|
|
579
|
-
get host() { return getElement(this); }
|
|
580
|
-
};
|
|
581
|
-
EdsDropdown.style = EdsDropdownStyle0;
|
|
582
|
-
|
|
583
481
|
const edsFooterCss = "";
|
|
584
482
|
const EdsFooterStyle0 = edsFooterCss;
|
|
585
483
|
|
|
@@ -618,7 +516,7 @@ const EdsFooter = class {
|
|
|
618
516
|
* @returns {JSX.Element} The rendered JSX for the footer component.
|
|
619
517
|
*/
|
|
620
518
|
render() {
|
|
621
|
-
return (h("footer", { key: '
|
|
519
|
+
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)))));
|
|
622
520
|
}
|
|
623
521
|
};
|
|
624
522
|
EdsFooter.style = EdsFooterStyle0;
|
|
@@ -726,11 +624,7 @@ const EdsHeader = class {
|
|
|
726
624
|
this.homeUrl = '/';
|
|
727
625
|
this.links = undefined;
|
|
728
626
|
this.inverseHeader = false;
|
|
729
|
-
this.userFeature = false;
|
|
730
627
|
this.menuEnabled = false;
|
|
731
|
-
this.keycloakUrl = undefined;
|
|
732
|
-
this.keycloakRealm = undefined;
|
|
733
|
-
this.keycloakClientId = undefined;
|
|
734
628
|
this.isMenuOpen = false;
|
|
735
629
|
this.isUserMenuOpen = false;
|
|
736
630
|
this.isAuthenticated = false;
|
|
@@ -803,8 +697,8 @@ const EdsHeader = class {
|
|
|
803
697
|
return [];
|
|
804
698
|
}
|
|
805
699
|
render() {
|
|
806
|
-
return (h("header", { key: '
|
|
807
|
-
${this.inverseHeader ? 'text-inverse bg-strongest' : 'text-default bg-dark'}` }, h("div", { key: '
|
|
700
|
+
return (h("header", { key: 'ce002da29cee5446f64694ba93ec67f89c180ac4', class: `flex items-center justify-between relative z-10
|
|
701
|
+
${this.inverseHeader ? 'text-inverse bg-strongest' : 'text-default bg-dark'}` }, h("div", { key: '579593f3180b27d129fd9ca380d6b74d0efcbd1e', class: "mr-auto w-[200px] h-[85px]" }, h("eds-logo", { key: 'c72d87a2ff7cd1ea2b0390cd364e376d1f52c67f', type: this.inverseHeader ? 'color-white' : 'color', href: this.homeUrl })), this.parsedLinks && (h("nav", { key: '6755e304c48624049af8426d4d9b19d0cb156dda', class: "absolute left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center hidden md:flex" }, h("ul", { key: '390f9b6c6c950719598eec88b4befb4224cb0c03', class: "flex gap-x-2" }, this.parsedLinks.map((link) => (h("eds-link", { label: link.label, "aria-label": link.label, url: link.url, intent: "ghost", size: "small", icon: link.icon, external: link.external, "extra-class": "after:effect-opacity aria-current-page:bg-darker whitespace-nowrap !text-current after:!border-transparent after:opacity-0 hover:after:!border-transparent hover:after:opacity-100" })))))), h("slot", { key: 'bc7b093739cc3058e4eb3d4eddbb0b49856b5710' }), this.menuEnabled ? (h("div", { class: "md:hidden flex overflow-hidden px-16" }, h("eds-button", { "aria-label": "Menu", intent: "ghostInverse", icon: "menu", size: "small", onClick: () => this.handleToggleMenu() }))) : null));
|
|
808
702
|
}
|
|
809
703
|
get hostEl() { return getElement(this); }
|
|
810
704
|
};
|
|
@@ -854,11 +748,16 @@ const EdsImg = class {
|
|
|
854
748
|
this.loaded = true;
|
|
855
749
|
this.showBg = false;
|
|
856
750
|
};
|
|
751
|
+
// On error, remove the background effect so users know the image failed to load.
|
|
752
|
+
this.handleError = () => {
|
|
753
|
+
this.loaded = true;
|
|
754
|
+
this.showBg = false;
|
|
755
|
+
};
|
|
857
756
|
this.handleTransitionEnd = () => {
|
|
858
757
|
this.showBg = false;
|
|
859
758
|
};
|
|
860
759
|
this.src = undefined;
|
|
861
|
-
this.alt =
|
|
760
|
+
this.alt = '';
|
|
862
761
|
this.width = undefined;
|
|
863
762
|
this.height = undefined;
|
|
864
763
|
this.srcset = undefined;
|
|
@@ -881,14 +780,14 @@ const EdsImg = class {
|
|
|
881
780
|
imgOpts['loading'] = 'lazy';
|
|
882
781
|
imgOpts['decoding'] = 'async';
|
|
883
782
|
}
|
|
884
|
-
return (h("div", { key: '
|
|
783
|
+
return (h("div", { key: '733be8df2b9e3db1b5b13aaa47c16a9c26f345d7', class: {
|
|
885
784
|
'items-center justify-center': true,
|
|
886
785
|
'effect-bg-pattern': this.lazyload && this.showBg
|
|
887
|
-
} }, h("picture", { key: '
|
|
786
|
+
} }, h("picture", { key: '3a6a0289bcf8a2851278eb6c6fbe64bfe7004014' }, this.formats.map((format) => (h("source", { type: format.type, srcSet: format.srcset, media: format.media, sizes: this.sizes }))), h("img", Object.assign({ key: 'b5d92e20a28f67a13d926f081b5f85dbd981ff78', ref: (el) => (this.img = el), class: {
|
|
888
787
|
'effect-opacity object-cover object-center': true,
|
|
889
788
|
'opacity-100': this.loaded,
|
|
890
789
|
'opacity-0': !this.loaded
|
|
891
|
-
}, width: this.width, height: this.height, sizes: this.sizes, src: this.src, srcSet: this.srcset, alt: this.alt }, imgOpts, { onLoad: this.handleLoad, onTransitionEnd: this.handleTransitionEnd })))));
|
|
790
|
+
}, width: this.width, height: this.height, sizes: this.sizes, src: this.src, srcSet: this.srcset, alt: this.alt }, imgOpts, { onLoad: this.handleLoad, onError: this.handleError, onTransitionEnd: this.handleTransitionEnd })))));
|
|
892
791
|
}
|
|
893
792
|
get imgElement() { return getElement(this); }
|
|
894
793
|
};
|
|
@@ -1035,12 +934,11 @@ const EdsLink = class {
|
|
|
1035
934
|
this.hideLabelOnSmallScreen = false;
|
|
1036
935
|
this.extraClass = undefined;
|
|
1037
936
|
}
|
|
1038
|
-
|
|
937
|
+
handleParentContext(event) {
|
|
1039
938
|
if (event.target !== this.el) {
|
|
1040
939
|
// Ignore the event if it's not targeted at this specific instance
|
|
1041
940
|
return;
|
|
1042
941
|
}
|
|
1043
|
-
//console.log(event.detail);
|
|
1044
942
|
this.parentContext = event.detail;
|
|
1045
943
|
event.stopPropagation();
|
|
1046
944
|
}
|
|
@@ -1073,7 +971,7 @@ const EdsLink = class {
|
|
|
1073
971
|
}
|
|
1074
972
|
renderRightIcon() {
|
|
1075
973
|
if (this.icon && this.iconPos === 'right') {
|
|
1076
|
-
return (h("span", { class: !this.external && !this.label ? '' : 'flex' }, h("eds-icon-wrapper", { class: `
|
|
974
|
+
return (h("span", { class: !this.external && !this.label ? '' : 'flex ml-4' }, h("eds-icon-wrapper", { class: `
|
|
1077
975
|
flex inline-flex items-center justify-center
|
|
1078
976
|
${this.size === 'large' ? 'h-32 w-32' : 'h-20 w-20'}
|
|
1079
977
|
`, icon: this.icon })));
|
|
@@ -1081,6 +979,7 @@ const EdsLink = class {
|
|
|
1081
979
|
return null;
|
|
1082
980
|
}
|
|
1083
981
|
render() {
|
|
982
|
+
// If the link is disabled, use a <span>; otherwise, use an <a> element.
|
|
1084
983
|
const ComponentType = this.disabled ? 'span' : 'a';
|
|
1085
984
|
const classes = linkStyles({
|
|
1086
985
|
intent: this.intent,
|
|
@@ -1088,10 +987,12 @@ const EdsLink = class {
|
|
|
1088
987
|
iconSmall: this.iconSmall,
|
|
1089
988
|
isActive: this.current
|
|
1090
989
|
});
|
|
990
|
+
// If no visible label is provided, ensure ariaLabel is set.
|
|
991
|
+
const computedAriaLabel = this.ariaLabel || this.label || 'link';
|
|
1091
992
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
1092
993
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
1093
994
|
: '';
|
|
1094
|
-
return (h(ComponentType, { key: '
|
|
995
|
+
return (h(ComponentType, { key: '965b2bf54c59752e7ed3cafbc167a8f2d1a2a9b1', class: `${classes || ''} ${this.extraClass || ''}`, href: !this.disabled ? this.url : undefined, target: this.external && !this.disabled ? '_blank' : undefined, rel: this.external && !this.disabled ? 'noopener noreferrer' : undefined, "aria-label": computedAriaLabel, "aria-disabled": this.disabled ? 'true' : null, "aria-current": this.current ? 'page' : undefined, download: this.download ? '' : undefined, onClick: (event) => this.handleClick(event) }, h("span", { key: '7df72410c98bab3c0ef204e5cd33f1e069976d24', class: "z-1 relative inline-flex items-center justify-center" }, this.renderLeftIcon(), h("span", { key: '208b4fa88695bd8e8ed961d4c7639b117341110c', class: labelClasses }, this.label), this.renderRightIcon())));
|
|
1095
996
|
}
|
|
1096
997
|
get el() { return getElement(this); }
|
|
1097
998
|
};
|
|
@@ -1106,6 +1007,7 @@ const EdsLogo = class {
|
|
|
1106
1007
|
this.href = '/';
|
|
1107
1008
|
this.orientation = 'horizontal';
|
|
1108
1009
|
this.type = undefined;
|
|
1010
|
+
this.label = 'Home';
|
|
1109
1011
|
}
|
|
1110
1012
|
/**
|
|
1111
1013
|
* Handles the click event on the logo link.
|
|
@@ -1158,12 +1060,63 @@ const EdsLogo = class {
|
|
|
1158
1060
|
}
|
|
1159
1061
|
render() {
|
|
1160
1062
|
const logoContent = this.getLogo();
|
|
1161
|
-
return (h("a", { key: '
|
|
1063
|
+
return (h("a", { key: 'ee8de4071b0137020341982b4c5cb2c938f1c4df', href: this.href, onClick: () => this.handleClick(), class: "eds-logo-wrapper", "aria-label": this.label }, h("div", { key: '1eb620afbcc5a2a5c6914cc1c91a45ca62d0068c', innerHTML: logoContent })));
|
|
1162
1064
|
}
|
|
1163
1065
|
get el() { return getElement(this); }
|
|
1164
1066
|
};
|
|
1165
1067
|
EdsLogo.style = EdsLogoStyle0;
|
|
1166
1068
|
|
|
1069
|
+
const edsRatingCss = ":host{display:inline-block;font-size:2rem}.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)}.f-heading-02{font-family:var(--f-heading-02-fontFamily);font-weight:var(--f-heading-02-fontWeight);font-size:var(--f-heading-02-fontSize);line-height:var(--f-heading-02-lineHeight);letter-spacing:var(--f-heading-02-letterSpacing)}.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)}.f-heading-06{font-family:var(--f-heading-06-fontFamily);font-weight:var(--f-heading-06-fontWeight);font-size:var(--f-heading-06-fontSize);line-height:var(--f-heading-06-lineHeight);letter-spacing:var(--f-heading-06-letterSpacing)}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.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)}.f-ui-04{font-family:var(--f-ui-04-fontFamily);font-weight:var(--f-ui-04-fontWeight);font-size:var(--f-ui-04-fontSize);line-height:var(--f-ui-04-lineHeight);letter-spacing:var(--f-ui-04-letterSpacing)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.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}";
|
|
1070
|
+
const EdsRatingStyle0 = edsRatingCss;
|
|
1071
|
+
|
|
1072
|
+
const EdsRating = class {
|
|
1073
|
+
constructor(hostRef) {
|
|
1074
|
+
registerInstance(this, hostRef);
|
|
1075
|
+
this.ratingChange = createEvent(this, "ratingChange", 7);
|
|
1076
|
+
this.stars = 5;
|
|
1077
|
+
this.label = 'Rate your experience';
|
|
1078
|
+
this.textMapping = ['Very Poor', 'Poor', 'Average', 'Good', 'Excellent'];
|
|
1079
|
+
this.selectedRating = 0;
|
|
1080
|
+
}
|
|
1081
|
+
/**
|
|
1082
|
+
* Parses the `textMapping` prop into an array of strings.
|
|
1083
|
+
*/
|
|
1084
|
+
get parsedMappings() {
|
|
1085
|
+
if (typeof this.textMapping === 'object') {
|
|
1086
|
+
return this.textMapping;
|
|
1087
|
+
}
|
|
1088
|
+
else if (typeof this.textMapping === 'string') {
|
|
1089
|
+
try {
|
|
1090
|
+
return JSON.parse(this.textMapping);
|
|
1091
|
+
}
|
|
1092
|
+
catch (e) {
|
|
1093
|
+
//console.error('Error parsing textMapping prop:', e);
|
|
1094
|
+
return [];
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
return [];
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Handles the click event on a star.
|
|
1101
|
+
* @param rating - The selected rating value.
|
|
1102
|
+
*/
|
|
1103
|
+
handleClick(rating) {
|
|
1104
|
+
this.selectedRating = rating;
|
|
1105
|
+
this.ratingChange.emit(rating);
|
|
1106
|
+
}
|
|
1107
|
+
render() {
|
|
1108
|
+
return (h("div", { key: 'b613863ad54ae9b381a5741bce4b188eff806ef0', class: "relative w-full flex flex-col" }, h("span", { key: 'f35cef9c3691aab73995e2ca6e2554cc19bae837', class: "f-heading-05" }, this.label), h("div", { key: '37082eb4bbadf5c211c197f3f81501d0b0e61404', role: "radiogroup", "aria-label": this.label, class: "stars flex space-x-2" }, Array.from({ length: this.stars }, (_, index) => {
|
|
1109
|
+
const starRating = index + 1;
|
|
1110
|
+
const isSelected = starRating <= this.selectedRating;
|
|
1111
|
+
// Use the mapping text if available; otherwise, fall back to a generic label.
|
|
1112
|
+
const mappingText = this.parsedMappings[starRating - 1] || `Rating ${starRating}`;
|
|
1113
|
+
return (h("eds-button", { label: "\u2605", role: "radio", "aria-checked": isSelected ? 'true' : 'false', "aria-label": mappingText, onClick: () => this.handleClick(starRating), tabIndex: this.selectedRating === 0 && index === 0 ? 0 : isSelected ? 0 : -1, intent: isSelected ? 'primary' : 'ghost', size: "small", "extra-class": "p-2" // Optional padding or styling for the star button
|
|
1114
|
+
}));
|
|
1115
|
+
})), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (h("span", { key: '61b4b92e476cfa0dd9bf405cb080dedd995ff9c6', class: "f-ui-04 text-lighter mt-4" }, this.parsedMappings[this.selectedRating - 1]))));
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
EdsRating.style = EdsRatingStyle0;
|
|
1119
|
+
|
|
1167
1120
|
const edsSocialNetworksCss = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}.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)}.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)}.mt-12{margin-top:0.75rem}.mt-16{margin-top:1rem}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.gap-4{gap:0.25rem}.effect-color{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:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.effect-focus{outline-width:3px;outline-offset:2px;outline-color:var(--green-500)}.text-light{color:var(--grey-700)}.text-lighter{color:var(--grey-600)}.hover\\:text-default:hover{color:var(--black)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:8px}";
|
|
1168
1121
|
const EdsSocialNetworksStyle0 = edsSocialNetworksCss;
|
|
1169
1122
|
|
|
@@ -1218,11 +1171,100 @@ const EdsSocialNetworks = class {
|
|
|
1218
1171
|
* @returns {JSX.Element} The rendered JSX for the component.
|
|
1219
1172
|
*/
|
|
1220
1173
|
render() {
|
|
1221
|
-
return (h("div", { key: '
|
|
1174
|
+
return (h("div", { key: '615a7cb2c26060d2d4cde875291a081b7de12e19' }, h("p", { key: '9e19ad59fcc94508cb60cd4aafa87c3878fb2ebc', class: "f-ui-02" }, this.title), h("ul", { key: 'a4811d16447ab148a7c129f188405f3f7050df70', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index) => (h("li", { key: index }, h("eds-link", { "extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm", external: true, "aria-label": network.label, url: network.url, icon: network.icon, intent: "strong" })))))));
|
|
1222
1175
|
}
|
|
1223
1176
|
};
|
|
1224
1177
|
EdsSocialNetworks.style = EdsSocialNetworksStyle0;
|
|
1225
1178
|
|
|
1179
|
+
const edsStepsCss = ".steps{position:sticky;margin-left:16px;margin-bottom:12px;border-left:1px solid var(--soft-color, #ddd);padding-left:24px;counter-reset:step}.steps h3{counter-increment:step;font-size:var(--f-heading-05-fontSize);font-weight:var(--f-heading-05-fontWeight);line-height:var(--f-heading-05-lineHeight);position:relative}.steps h3::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:1rem;border:1px solid #ccc;background:var(--grey-900);color:#fff;border-radius:50%}.steps h4{counter-increment:step;font-size:1.125rem;font-weight:500;position:relative;margin-top:1em;margin-bottom:1em}.steps h4::before{content:counter(step);position:absolute;left:-40px;top:0;display:flex;align-items:center;justify-content:center;width:30px;height:30px;font-size:0.875rem;border:1px solid #ccc;background:#333;color:#fff;border-radius:50%}.steps blockquote{margin-top:16px;margin-bottom:16px;font-style:italic;color:#aaa;padding-left:6px}";
|
|
1180
|
+
const EdsStepsStyle0 = edsStepsCss;
|
|
1181
|
+
|
|
1182
|
+
const EdsSteps = class {
|
|
1183
|
+
constructor(hostRef) {
|
|
1184
|
+
registerInstance(this, hostRef);
|
|
1185
|
+
this.stepClick = createEvent(this, "stepClick", 7);
|
|
1186
|
+
this.handleNext = () => {
|
|
1187
|
+
if (this.activeStep < this.parsedSteps.length) {
|
|
1188
|
+
this.activeStep = this.activeStep + 1;
|
|
1189
|
+
}
|
|
1190
|
+
};
|
|
1191
|
+
this.handleBack = () => {
|
|
1192
|
+
if (this.activeStep > 0) {
|
|
1193
|
+
this.activeStep = this.activeStep - 1;
|
|
1194
|
+
}
|
|
1195
|
+
};
|
|
1196
|
+
this.handleReset = () => {
|
|
1197
|
+
this.activeStep = 0;
|
|
1198
|
+
};
|
|
1199
|
+
this.steps = [];
|
|
1200
|
+
this.type = 'static';
|
|
1201
|
+
this.activeStep = 0;
|
|
1202
|
+
}
|
|
1203
|
+
handleStepClick(index) {
|
|
1204
|
+
this.stepClick.emit(index);
|
|
1205
|
+
// In linear mode, update the active step on header click.
|
|
1206
|
+
if (this.type === 'linear') {
|
|
1207
|
+
this.activeStep = index;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
/**
|
|
1211
|
+
* Parse the JSON string into an array of steps.
|
|
1212
|
+
*/
|
|
1213
|
+
get parsedSteps() {
|
|
1214
|
+
if (typeof this.steps === 'string') {
|
|
1215
|
+
try {
|
|
1216
|
+
const stepsStr = this.steps;
|
|
1217
|
+
return JSON.parse(stepsStr);
|
|
1218
|
+
}
|
|
1219
|
+
catch (error) {
|
|
1220
|
+
//console.error('Invalid steps JSON', error);
|
|
1221
|
+
return [];
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
return this.steps;
|
|
1225
|
+
}
|
|
1226
|
+
render() {
|
|
1227
|
+
const steps = this.parsedSteps;
|
|
1228
|
+
if (this.type === 'linear') {
|
|
1229
|
+
return (h("div", null, h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", { onClick: () => this.handleStepClick(index) }, step.title), this.activeStep === index && (h("div", { class: "content" }, h("div", { class: "f-body-02 text-lighter my-16" }, step.content), h("eds-button", { label: index === steps.length - 1 ? 'Finish' : 'Continue', class: "next-btn", onClick: this.handleNext }), h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index === 0, "extra-class": index === 0 ? 'hidden' : 'ml-8 block' }))))))), this.activeStep === steps.length && (h("div", { class: "completed" }, h("eds-alert", { intent: "success", message: "All steps completed - you're finished!" }), h("eds-button", { label: "Start again", onClick: this.handleReset, "extra-class": "mt-4" })))));
|
|
1230
|
+
}
|
|
1231
|
+
// Static mode: show all steps with their content, no navigation buttons.
|
|
1232
|
+
return (h("div", { class: "steps" }, steps.map((step, index) => (h("div", { class: "step mb-28", key: index }, h("h3", null, step.title), h("div", { class: "content" }, h("div", { class: "f-body-02 text-lighter my-16" }, step.content)))))));
|
|
1233
|
+
}
|
|
1234
|
+
};
|
|
1235
|
+
EdsSteps.style = EdsStepsStyle0;
|
|
1236
|
+
|
|
1237
|
+
const edsSwitchCss = ":host{display:inline-block}.switch-container{display:inline-flex;align-items:center}.switch-label{font-size:14px;margin:0 8px}button.switch{position:relative;display:inline-flex;align-items:center;width:50px;height:26px;border:none;border-radius:13px;background-color:#ccc;padding:0;cursor:pointer;transition:background-color 0.2s}button.switch:focus{outline:none;box-shadow:0 0 0 2px #007aff}button.switch.switch--checked{background-color:var(--green-500)}button.switch.switch--disabled{opacity:0.6;cursor:not-allowed}.switch-handle{position:absolute;width:22px;height:22px;border-radius:50%;background-color:#fff;top:2px;left:2px;transition:transform 0.2s}button.switch.switch--checked .switch-handle{transform:translateX(24px)}";
|
|
1238
|
+
const EdsSwitchStyle0 = edsSwitchCss;
|
|
1239
|
+
|
|
1240
|
+
const EdsSwitch = class {
|
|
1241
|
+
constructor(hostRef) {
|
|
1242
|
+
registerInstance(this, hostRef);
|
|
1243
|
+
this.change = createEvent(this, "change", 7);
|
|
1244
|
+
this.toggleSwitch = () => {
|
|
1245
|
+
if (this.disabled) {
|
|
1246
|
+
return;
|
|
1247
|
+
}
|
|
1248
|
+
this.checked = !this.checked;
|
|
1249
|
+
this.change.emit(this.checked);
|
|
1250
|
+
};
|
|
1251
|
+
this.checked = false;
|
|
1252
|
+
this.disabled = false;
|
|
1253
|
+
this.labelOn = '';
|
|
1254
|
+
this.labelOff = '';
|
|
1255
|
+
}
|
|
1256
|
+
render() {
|
|
1257
|
+
// Compute an accessible name based on state.
|
|
1258
|
+
const accessibleLabel = this.labelOn || this.labelOff ? (this.checked ? this.labelOn : this.labelOff) : 'Toggle switch';
|
|
1259
|
+
return (h("div", { key: 'd4c727cbb562921b2bcba269e84f25c359c7061b', class: "switch-container" }, this.labelOff && h("span", { key: '90b18fff27bd21501466deb5879e5fe6ff607043', class: "switch-label switch-label--off" }, this.labelOff), h("button", { key: '8675f5d9f972d3932710fa7f9b28f74f95a83003', type: "button", role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": accessibleLabel, class: {
|
|
1260
|
+
switch: true,
|
|
1261
|
+
'switch--checked': this.checked,
|
|
1262
|
+
'switch--disabled': this.disabled
|
|
1263
|
+
}, onClick: this.toggleSwitch, disabled: this.disabled }, h("span", { key: '26aa30a01b10419c1665b1fd58b5696a02d1504a', class: "switch-handle" })), this.labelOn && h("span", { key: '3680d67555e9193a97e129c0639b411263e070a8', class: "switch-label switch-label--on" }, this.labelOn)));
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
EdsSwitch.style = EdsSwitchStyle0;
|
|
1267
|
+
|
|
1226
1268
|
const toastStyles = cva(['relative right-4 bottom-4 w-auto p-12 rounded-lg shadow-md'], {
|
|
1227
1269
|
variants: {
|
|
1228
1270
|
intent: {
|
|
@@ -1250,6 +1292,27 @@ const EdsToast = class {
|
|
|
1250
1292
|
this.duration = 5000;
|
|
1251
1293
|
this.visible = true;
|
|
1252
1294
|
}
|
|
1295
|
+
/**
|
|
1296
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
1297
|
+
* to recalculate height on window resize.
|
|
1298
|
+
*/
|
|
1299
|
+
componentDidLoad() {
|
|
1300
|
+
// Emit context for each eds-button element after the component is fully loaded
|
|
1301
|
+
const btn = this.el.querySelector('eds-button');
|
|
1302
|
+
this.emitContext(btn);
|
|
1303
|
+
}
|
|
1304
|
+
/**
|
|
1305
|
+
* Emits a custom event called `parentContext` for a given button element.
|
|
1306
|
+
*/
|
|
1307
|
+
emitContext(linkElement) {
|
|
1308
|
+
const event = new CustomEvent('parentContext', {
|
|
1309
|
+
detail: {
|
|
1310
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
1311
|
+
identifier: null
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
linkElement.dispatchEvent(event);
|
|
1315
|
+
}
|
|
1253
1316
|
connectedCallback() {
|
|
1254
1317
|
// Auto-dismiss the toast after the specified duration
|
|
1255
1318
|
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
@@ -1263,7 +1326,7 @@ const EdsToast = class {
|
|
|
1263
1326
|
return null;
|
|
1264
1327
|
}
|
|
1265
1328
|
const classes = toastStyles({ intent: this.intent });
|
|
1266
|
-
return (h("div", { class: classes }, h("div", { class: "flex items-center justify-between gap-4" }, h("p", { class: "f-ui-01" }, this.message), h("eds-button", { intent: "tertiary", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
1329
|
+
return (h("div", { class: classes, role: "alert", "aria-live": "assertive" }, h("div", { class: "flex items-center justify-between gap-4" }, h("p", { class: "f-ui-01" }, this.message), h("eds-button", { intent: "tertiary", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
1267
1330
|
}
|
|
1268
1331
|
get el() { return getElement(this); }
|
|
1269
1332
|
};
|
|
@@ -1300,135 +1363,10 @@ const EdsToastManager = class {
|
|
|
1300
1363
|
this.toasts = this.toasts.filter((t) => t.id !== id);
|
|
1301
1364
|
}
|
|
1302
1365
|
render() {
|
|
1303
|
-
return (h("div", { key: '
|
|
1366
|
+
return (h("div", { key: '22cb79fd617ca1701fba63d3d4bf04f73ce1ac77', class: "toast-container" }, this.toasts.map((t) => (h("div", { key: t.id }, h("eds-toast", { message: t.message, intent: t.intent, onClick: () => this.removeToast(t.id) }))))));
|
|
1304
1367
|
}
|
|
1305
1368
|
get hostElement() { return getElement(this); }
|
|
1306
1369
|
};
|
|
1307
1370
|
EdsToastManager.style = EdsToastManagerStyle0;
|
|
1308
1371
|
|
|
1309
|
-
|
|
1310
|
-
constructor(hostRef) {
|
|
1311
|
-
registerInstance(this, hostRef);
|
|
1312
|
-
this.authStatusChanged = createEvent(this, "authStatusChanged", 7);
|
|
1313
|
-
/**
|
|
1314
|
-
* Handles user login by invoking the Keycloak `login` function.
|
|
1315
|
-
* Only triggers login if the user is not already authenticated.
|
|
1316
|
-
*/
|
|
1317
|
-
this.handleLogin = () => {
|
|
1318
|
-
if (!this.authenticated) {
|
|
1319
|
-
login();
|
|
1320
|
-
}
|
|
1321
|
-
};
|
|
1322
|
-
/**
|
|
1323
|
-
* Handles user logout by invoking the Keycloak `logout` function.
|
|
1324
|
-
* Resets the `authenticated` state to `false` after logout.
|
|
1325
|
-
*/
|
|
1326
|
-
this.handleLogout = () => {
|
|
1327
|
-
logout();
|
|
1328
|
-
this.authenticated = false;
|
|
1329
|
-
this.user = null;
|
|
1330
|
-
};
|
|
1331
|
-
this.keycloakUrl = undefined;
|
|
1332
|
-
this.keycloakRealm = undefined;
|
|
1333
|
-
this.keycloakClientId = undefined;
|
|
1334
|
-
this.user = null;
|
|
1335
|
-
this.authenticated = false;
|
|
1336
|
-
this.serverAvailable = false;
|
|
1337
|
-
this.username = '';
|
|
1338
|
-
}
|
|
1339
|
-
/**
|
|
1340
|
-
* Lifecycle method that runs when the component is about to load.
|
|
1341
|
-
* It initializes authentication by calling the `initAuth` method.
|
|
1342
|
-
*/
|
|
1343
|
-
async componentWillLoad() {
|
|
1344
|
-
// Check if required props are provided (optional check)
|
|
1345
|
-
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
1346
|
-
// eslint-disable-next-line
|
|
1347
|
-
console.error('Keycloak configuration props are missing.');
|
|
1348
|
-
return;
|
|
1349
|
-
}
|
|
1350
|
-
this.serverAvailable = await checkServerAvailability(`${this.keycloakUrl}/realms/${this.keycloakRealm}`);
|
|
1351
|
-
if (!this.serverAvailable) {
|
|
1352
|
-
//toast.show('Keycloak server is unavailable.', 'error');
|
|
1353
|
-
return; // Do not proceed further
|
|
1354
|
-
}
|
|
1355
|
-
await this.initAuth();
|
|
1356
|
-
}
|
|
1357
|
-
/**
|
|
1358
|
-
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
1359
|
-
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
1360
|
-
* Emits `authStatusChanged` event with the authentication status.
|
|
1361
|
-
*/
|
|
1362
|
-
async initAuth() {
|
|
1363
|
-
try {
|
|
1364
|
-
const keycloakConfig = {
|
|
1365
|
-
url: this.keycloakUrl,
|
|
1366
|
-
realm: this.keycloakRealm,
|
|
1367
|
-
clientId: this.keycloakClientId
|
|
1368
|
-
};
|
|
1369
|
-
await initKeycloak(keycloakConfig, true);
|
|
1370
|
-
// Set authentication state and fetch user data if authenticated
|
|
1371
|
-
//this.authenticated = isAuthenticated();
|
|
1372
|
-
if (isAuthenticated()) {
|
|
1373
|
-
this.user = getUser();
|
|
1374
|
-
this.authenticated = true;
|
|
1375
|
-
}
|
|
1376
|
-
this.authStatusChanged.emit({
|
|
1377
|
-
authenticated: this.authenticated,
|
|
1378
|
-
user: this.user
|
|
1379
|
-
}); // Emit auth status change
|
|
1380
|
-
}
|
|
1381
|
-
catch (error) {
|
|
1382
|
-
// eslint-disable-next-line
|
|
1383
|
-
console.error('Keycloak initialization failed:', error);
|
|
1384
|
-
}
|
|
1385
|
-
}
|
|
1386
|
-
render() {
|
|
1387
|
-
var _a;
|
|
1388
|
-
// If the server is unavailable, render null
|
|
1389
|
-
if (!this.serverAvailable) {
|
|
1390
|
-
return null;
|
|
1391
|
-
}
|
|
1392
|
-
return (h("div", { class: "block" }, !this.authenticated ? (h("eds-button", { label: "Login", intent: "primary", onClick: this.handleLogin, "extra-class": "text-default" })) : (h("div", { class: "flex items-center" }, h("eds-dropdown", { label: `Welcome, ${(_a = this.user) === null || _a === void 0 ? void 0 : _a.username}`, intent: "tertiary", "aria-label": "User Menu", "dropdown-pos": "right", "dropdown-offset": "false", icon: "chevron-down", class: "text-default" }, h("eds-user-modal", { user: JSON.stringify(this.user), onLogout: this.handleLogout.bind(this) }))))));
|
|
1393
|
-
}
|
|
1394
|
-
get hostEl() { return getElement(this); }
|
|
1395
|
-
};
|
|
1396
|
-
|
|
1397
|
-
const EdsUserModal = class {
|
|
1398
|
-
constructor(hostRef) {
|
|
1399
|
-
registerInstance(this, hostRef);
|
|
1400
|
-
this.user = undefined;
|
|
1401
|
-
this.links = undefined;
|
|
1402
|
-
this.onLogout = undefined;
|
|
1403
|
-
this.parsedUser = {};
|
|
1404
|
-
this.parsedLinks = [];
|
|
1405
|
-
}
|
|
1406
|
-
parseUserProp(newValue) {
|
|
1407
|
-
this.parsedUser = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
1408
|
-
}
|
|
1409
|
-
parseLinksProp(newValue) {
|
|
1410
|
-
this.parsedLinks = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
1411
|
-
}
|
|
1412
|
-
componentWillLoad() {
|
|
1413
|
-
this.parseUserProp(this.user);
|
|
1414
|
-
this.parseLinksProp(this.links);
|
|
1415
|
-
}
|
|
1416
|
-
get initials() {
|
|
1417
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1418
|
-
const initials = `${((_b = (_a = this.parsedUser) === null || _a === void 0 ? void 0 : _a.firstname) === null || _b === void 0 ? void 0 : _b.charAt(0)) || ''}${((_d = (_c = this.parsedUser) === null || _c === void 0 ? void 0 : _c.lastname) === null || _d === void 0 ? void 0 : _d.charAt(0)) || ''}`.toUpperCase();
|
|
1419
|
-
return initials || ((_g = (_f = (_e = this.parsedUser) === null || _e === void 0 ? void 0 : _e.fullname) === null || _f === void 0 ? void 0 : _f.charAt(0)) === null || _g === void 0 ? void 0 : _g.toUpperCase()) || '';
|
|
1420
|
-
}
|
|
1421
|
-
get hasLogout() {
|
|
1422
|
-
return typeof this.onLogout === 'function';
|
|
1423
|
-
}
|
|
1424
|
-
render() {
|
|
1425
|
-
var _a, _b, _c, _d, _e;
|
|
1426
|
-
return (h("div", { key: 'ad99ddd7c2710ef90840a5571ab6a161178cacc0', class: "min-w-[280px] p-8" }, h("div", { key: 'd1da12f3a965fa7503fb3e00566db0796b803352', class: "flex gap-x-16 pb-16 border-b-2 border-softer" }, h("eds-avatar", { key: 'c3d3ca80a9d23cc88f8ee6801b29995138c9b7c6', "first-name": (_a = this.parsedUser) === null || _a === void 0 ? void 0 : _a.firstname, "last-name": (_b = this.parsedUser) === null || _b === void 0 ? void 0 : _b.lastname, initials: this.initials, color: "grey", rounded: true, "initials-strong": true }), h("div", { key: '4efe378b3a9ce76d35e642db150be13d0434db72', class: "max-w-full" }, ((_c = this.parsedUser) === null || _c === void 0 ? void 0 : _c.fullname) && (h("p", { key: '1068082a2894e3c3e3f77d1eea923f9c39d8766c', class: "f-ui-01 text-default w-full text-ellipsis" }, this.parsedUser.fullname)), ((_d = this.parsedUser) === null || _d === void 0 ? void 0 : _d.username) && h("p", { key: 'b86e08b806a37c9957bca7f9ee268303e7ace134', class: "f-ui-03-light text-light mt-4" }, this.parsedUser.username), ((_e = this.parsedUser) === null || _e === void 0 ? void 0 : _e.email) && h("p", { key: 'b3514920e1eb4906cb7f7705bfbc986166e84946', class: "f-ui-03-light text-light mt-4" }, this.parsedUser.email))), h("div", { key: '61941fa0a19a19087da886a73d85d7e438d2c0b0', class: "text-default mt-16 flex w-full flex-col gap-y-8" }, h("div", { key: '5ad2be1763726c9d794b78a2593106fd8ba1dc7b', class: "border-softer mb-10 border-b-2 pb-16" }, h("eds-link", { key: 'dbe3a9de56bf5ccc26426ddb831f2d1a27a0e6ff', label: "My EBRAINS", "aria-label": "My EBRAINS", url: "https://www.ebrains.eu/dashboard", intent: "primary", "extra-class": "w-full", external: true })), h("eds-link", { key: 1, label: "Account Settings", url: "https://iam.ebrains.eu/auth/realms/hbp/account/", intent: "secondary", icon: "arrow-diagonal", external: true, "extra-class": "w-full" }), this.hasLogout && (h("eds-link", { key: '642890827e2fa6735bc616e680dbda481c2c0053', label: "Sign out", intent: "tertiary", "extra-class": "w-full justify-center", onClick: () => this.onLogout && this.onLogout() })))));
|
|
1427
|
-
}
|
|
1428
|
-
static get watchers() { return {
|
|
1429
|
-
"user": ["parseUserProp"],
|
|
1430
|
-
"links": ["parseLinksProp"]
|
|
1431
|
-
}; }
|
|
1432
|
-
};
|
|
1433
|
-
|
|
1434
|
-
export { EdsAvatar as eds_avatar, EdsBlockBreak as eds_block_break, EdsBreadcrumb as eds_breadcrumb, EdsButton as eds_button, EdsDropdown as eds_dropdown, EdsFooter as eds_footer, EdsFullscreenMenu as eds_fullscreen_menu, EdsHeader as eds_header, EdsIconWrapper as eds_icon_wrapper, EdsImg as eds_img, EdsLink as eds_link, EdsLogo as eds_logo, EdsSocialNetworks as eds_social_networks, EdsToast as eds_toast, EdsToastManager as eds_toast_manager, EdsUser as eds_user, EdsUserModal as eds_user_modal };
|
|
1372
|
+
export { EdsAlert as eds_alert, EdsBlockBreak as eds_block_break, EdsBreadcrumb as eds_breadcrumb, EdsButton as eds_button, EdsFooter as eds_footer, EdsFullscreenMenu as eds_fullscreen_menu, EdsHeader as eds_header, EdsIconWrapper as eds_icon_wrapper, EdsImg as eds_img, EdsLink as eds_link, EdsLogo as eds_logo, EdsRating as eds_rating, EdsSocialNetworks as eds_social_networks, EdsSteps as eds_steps, EdsSwitch as eds_switch, EdsToast as eds_toast, EdsToastManager as eds_toast_manager };
|