@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
|
@@ -3,77 +3,100 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-f08e4f5c.js');
|
|
6
|
-
const color = require('./color-3ffe3072.js');
|
|
7
6
|
const index$1 = require('./index-ab9fbefe.js');
|
|
7
|
+
const analytics = require('./analytics-223ea8e5.js');
|
|
8
8
|
const logoColor = require('./logo-color-6c787ac1.js');
|
|
9
9
|
const logoWhiteNoBg = require('./logo-white-no-bg-4a0e0f4b.js');
|
|
10
10
|
const toastManager = require('./toastManager-4e9535f3.js');
|
|
11
|
-
const keycloak = require('./keycloak-5aaa21af.js');
|
|
12
11
|
|
|
13
|
-
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}";
|
|
14
|
-
const
|
|
12
|
+
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";
|
|
13
|
+
const EdsAlertStyle0 = edsAlertCss;
|
|
15
14
|
|
|
16
|
-
const
|
|
15
|
+
const alertStyles = index$1.cva(['w-full bg-dark rounded-lg border-inside after:border-softest after:rounded-lg'], {
|
|
16
|
+
variants: {
|
|
17
|
+
intent: {
|
|
18
|
+
default: '',
|
|
19
|
+
warning: 'bg-warning',
|
|
20
|
+
error: 'bg-error',
|
|
21
|
+
success: 'bg-success'
|
|
22
|
+
},
|
|
23
|
+
direction: {
|
|
24
|
+
vertical: 'space-y-12',
|
|
25
|
+
horizontal: 'flex flex-row items-center justify-between gap-x-12'
|
|
26
|
+
},
|
|
27
|
+
withBtn: {
|
|
28
|
+
false: '',
|
|
29
|
+
true: ''
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
compoundVariants: [
|
|
33
|
+
{
|
|
34
|
+
direction: 'horizontal',
|
|
35
|
+
withBtn: true,
|
|
36
|
+
class: 'px-20 pr-12 py-12'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
direction: 'horizontal',
|
|
40
|
+
withBtn: false,
|
|
41
|
+
class: 'p-20'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
direction: 'vertical',
|
|
45
|
+
withBtn: true,
|
|
46
|
+
class: 'p-16'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
direction: 'vertical',
|
|
50
|
+
withBtn: false,
|
|
51
|
+
class: 'px-12 py-20'
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
defaultVariants: {
|
|
55
|
+
intent: 'default',
|
|
56
|
+
direction: 'horizontal'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
const EdsAlert = class {
|
|
17
60
|
constructor(hostRef) {
|
|
18
61
|
index.registerInstance(this, hostRef);
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
22
|
-
this.
|
|
23
|
-
this.
|
|
24
|
-
this.
|
|
25
|
-
this.initialsStrong = false;
|
|
62
|
+
this.message = undefined;
|
|
63
|
+
this.pressableLabel = undefined;
|
|
64
|
+
this.pressableUrl = undefined;
|
|
65
|
+
this.direction = 'horizontal';
|
|
66
|
+
this.intent = 'default';
|
|
67
|
+
this.withBtn = false;
|
|
26
68
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return `${this.firstName.charAt(0)}${this.lastName.charAt(0)}`.toUpperCase();
|
|
69
|
+
componentWillLoad() {
|
|
70
|
+
this.withBtn = Boolean(this.pressableLabel);
|
|
71
|
+
}
|
|
72
|
+
componentDidLoad() {
|
|
73
|
+
var _a;
|
|
74
|
+
// Query for the 'eds-link' element inside the shadow root.
|
|
75
|
+
const lnk = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('eds-link');
|
|
76
|
+
if (lnk) {
|
|
77
|
+
this.emitContext(lnk);
|
|
37
78
|
}
|
|
38
|
-
return undefined;
|
|
39
79
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
'flex',
|
|
49
|
-
'items-center',
|
|
50
|
-
'justify-center',
|
|
51
|
-
'overflow-hidden',
|
|
52
|
-
this.picture ? '' : 'px-4',
|
|
53
|
-
this.rounded ? 'rounded-pill border-inside-pill w-32' : 'w-[54px] rounded-sm',
|
|
54
|
-
this.color ? 'border-inside-inverse' : '',
|
|
55
|
-
this.color === 'grey'
|
|
56
|
-
? 'bg-dark'
|
|
57
|
-
: this.color && !this.picture
|
|
58
|
-
? color.gradientBGColorVariants({
|
|
59
|
-
color: this.color,
|
|
60
|
-
direction: 'top',
|
|
61
|
-
pseudo: false
|
|
62
|
-
})
|
|
63
|
-
: !this.picture
|
|
64
|
-
? 'bg-strongest text-accent'
|
|
65
|
-
: ''
|
|
66
|
-
].join(' ');
|
|
80
|
+
emitContext(linkElement) {
|
|
81
|
+
const event = new CustomEvent('parentContext', {
|
|
82
|
+
detail: {
|
|
83
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
84
|
+
identifier: null
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
linkElement.dispatchEvent(event);
|
|
67
88
|
}
|
|
68
|
-
/**
|
|
69
|
-
* Renders the avatar component. Displays either an image using `eds-img` or initials depending on whether `picture` or `computedInitials` is set.
|
|
70
|
-
* @returns {JSX.Element} The rendered avatar component.
|
|
71
|
-
*/
|
|
72
89
|
render() {
|
|
73
|
-
return (index.h("div", { key: '
|
|
90
|
+
return (index.h("div", { key: '519742081f681d6d67bc1b42c89fe1b6d005fe0f', class: alertStyles({
|
|
91
|
+
intent: this.intent,
|
|
92
|
+
direction: this.direction,
|
|
93
|
+
withBtn: this.withBtn
|
|
94
|
+
}), role: "alert" }, index.h("p", { key: '6a5d11fdc2a975512b12c307286b0a8b06998bec', class: "f-ui-01 py-8" }, this.message), this.withBtn &&
|
|
95
|
+
(this.pressableUrl ? (index.h("eds-link", { class: "eds-alert-link", label: this.pressableLabel, url: this.pressableUrl, intent: "secondary", external: true })) : null)));
|
|
74
96
|
}
|
|
97
|
+
get el() { return index.getElement(this); }
|
|
75
98
|
};
|
|
76
|
-
|
|
99
|
+
EdsAlert.style = EdsAlertStyle0;
|
|
77
100
|
|
|
78
101
|
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}";
|
|
79
102
|
const EdsBlockBreakStyle0 = edsBlockBreakCss;
|
|
@@ -84,7 +107,7 @@ const EdsBlockBreak = class {
|
|
|
84
107
|
this.extraClass = '';
|
|
85
108
|
}
|
|
86
109
|
render() {
|
|
87
|
-
return index.h("hr", { key: '
|
|
110
|
+
return index.h("hr", { key: '8cb39dda5d7f909b459390fe7e3f86dfd147ba98', class: `border-softer my-20 inline-block w-full border-t-2 ${this.extraClass}` });
|
|
88
111
|
}
|
|
89
112
|
};
|
|
90
113
|
EdsBlockBreak.style = EdsBlockBreakStyle0;
|
|
@@ -129,7 +152,7 @@ const EdsBreadcrumb = class {
|
|
|
129
152
|
this.parsedItems = Array.isArray(parsed) ? parsed : [];
|
|
130
153
|
}
|
|
131
154
|
catch (e) {
|
|
132
|
-
console.error('Error parsing breadcrumb items:', e);
|
|
155
|
+
//console.error('Error parsing breadcrumb items:', e);
|
|
133
156
|
this.parsedItems = [];
|
|
134
157
|
}
|
|
135
158
|
}
|
|
@@ -157,9 +180,9 @@ const EdsBreadcrumb = class {
|
|
|
157
180
|
* It emits a custom event for each `eds-link` element contained within the breadcrumb.
|
|
158
181
|
*/
|
|
159
182
|
componentDidLoad() {
|
|
160
|
-
|
|
161
|
-
const links = this.el.shadowRoot.querySelectorAll('eds-link');
|
|
162
|
-
links.forEach((link) => {
|
|
183
|
+
var _a;
|
|
184
|
+
const links = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelectorAll('eds-link');
|
|
185
|
+
links === null || links === void 0 ? void 0 : links.forEach((link) => {
|
|
163
186
|
this.emitContext(link);
|
|
164
187
|
});
|
|
165
188
|
}
|
|
@@ -179,54 +202,49 @@ const EdsBreadcrumb = class {
|
|
|
179
202
|
linkElement.dispatchEvent(event);
|
|
180
203
|
}
|
|
181
204
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
205
|
+
* Returns breadcrumb items with potential truncation if there are too many.
|
|
206
|
+
* It inserts an ellipsis item where necessary.
|
|
184
207
|
*/
|
|
185
208
|
getTruncatedItems() {
|
|
186
209
|
const totalItems = this.parsedItems.length;
|
|
210
|
+
const ellipsis = { label: '...', url: '', isHidden: true };
|
|
187
211
|
if (totalItems > this.maxVisibleItems) {
|
|
188
212
|
const firstItem = this.parsedItems[0];
|
|
189
213
|
const lastItems = this.parsedItems.slice(-2);
|
|
190
|
-
const ellipsis = { label: '...', url: '', isHidden: true };
|
|
191
214
|
if (this.maxVisibleItems === 3) {
|
|
192
|
-
return [
|
|
193
|
-
this.truncateLabel(firstItem),
|
|
194
|
-
ellipsis,
|
|
195
|
-
...lastItems.map((item, index) => (index === lastItems.length - 1 ? item : this.truncateLabel(item)))
|
|
196
|
-
];
|
|
215
|
+
return [firstItem, ellipsis, ...lastItems];
|
|
197
216
|
}
|
|
198
217
|
else if (this.maxVisibleItems === 4) {
|
|
199
218
|
const middleItem = this.parsedItems[Math.floor(totalItems / 2)];
|
|
200
|
-
return [
|
|
201
|
-
this.truncateLabel(firstItem),
|
|
202
|
-
this.truncateLabel(middleItem),
|
|
203
|
-
ellipsis,
|
|
204
|
-
...lastItems.map((item, index) => (index === lastItems.length - 1 ? item : this.truncateLabel(item)))
|
|
205
|
-
];
|
|
219
|
+
return [firstItem, middleItem, ellipsis, ...lastItems];
|
|
206
220
|
}
|
|
207
221
|
}
|
|
208
|
-
return this.parsedItems
|
|
222
|
+
return this.parsedItems;
|
|
209
223
|
}
|
|
210
224
|
/**
|
|
211
|
-
*
|
|
212
|
-
*
|
|
225
|
+
* Helper to determine the display label and full label.
|
|
226
|
+
* If the label is longer than 15 characters and the item is not the current (last) item,
|
|
227
|
+
* we display a truncated version but use the full label for aria attributes.
|
|
213
228
|
*/
|
|
214
|
-
|
|
215
|
-
if (item.label.length > 15) {
|
|
216
|
-
return
|
|
229
|
+
getLabels(item, isCurrent) {
|
|
230
|
+
if (!isCurrent && item.label.length > 15) {
|
|
231
|
+
return { displayLabel: `${item.label.slice(0, 15)}...`, fullLabel: item.label };
|
|
217
232
|
}
|
|
218
|
-
return item;
|
|
233
|
+
return { displayLabel: item.label, fullLabel: item.label };
|
|
219
234
|
}
|
|
220
235
|
/**
|
|
221
236
|
* Render method for the breadcrumb component.
|
|
222
237
|
* It creates a navigation element with an ordered list of breadcrumb links.
|
|
223
|
-
* The last link is
|
|
238
|
+
* The last link is marked as the current page.
|
|
224
239
|
*/
|
|
225
240
|
render() {
|
|
226
241
|
const itemsToRender = this.getTruncatedItems();
|
|
227
|
-
return (index.h("nav", { key: '
|
|
242
|
+
return (index.h("nav", { key: 'd177957e1b3218c21991bbdc9636a8e32befe990', "aria-label": "Breadcrumb" }, index.h("ol", { key: 'd10336ddee99b9fb84d17e53093c57c6a025982f', class: "flex items-center space-x-2" }, itemsToRender.map((item, index$1) => {
|
|
228
243
|
const isLast = index$1 === itemsToRender.length - 1;
|
|
229
|
-
return (index.h("li", { class: "flex items-center" }, !item.isHidden ? (
|
|
244
|
+
return (index.h("li", { class: "flex items-center" }, !item.isHidden ? ((() => {
|
|
245
|
+
const { displayLabel, fullLabel } = this.getLabels(item, isLast);
|
|
246
|
+
return (index.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' } : {}))));
|
|
247
|
+
})()) : (index.h("span", { class: "truncate px-2", "aria-hidden": "true" }, "...")), !isLast && !item.isHidden && (index.h("eds-icon-wrapper", { icon: "chevron-right", class: "w-20 h-20" }))));
|
|
230
248
|
}))));
|
|
231
249
|
}
|
|
232
250
|
get el() { return index.getElement(this); }
|
|
@@ -392,9 +410,8 @@ const EdsButton = class {
|
|
|
392
410
|
iconOnly: false
|
|
393
411
|
}
|
|
394
412
|
});
|
|
395
|
-
this.parentContext = null; // Accepts the entire event detail or null
|
|
396
413
|
this.label = undefined;
|
|
397
|
-
this.ariaLabel =
|
|
414
|
+
this.ariaLabel = 'Button';
|
|
398
415
|
this.elementType = 'button';
|
|
399
416
|
this.intent = 'secondary';
|
|
400
417
|
this.loading = false;
|
|
@@ -407,15 +424,19 @@ const EdsButton = class {
|
|
|
407
424
|
this.extraClass = undefined;
|
|
408
425
|
this.triggerClick = undefined;
|
|
409
426
|
}
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
//
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
427
|
+
/*private parentContext: ParentContextDetail | null = null; // Accepts the entire event detail or null
|
|
428
|
+
|
|
429
|
+
@Listen('parentContext')
|
|
430
|
+
handleParentContext(event: CustomEvent) {
|
|
431
|
+
if (event.target !== this.el) {
|
|
432
|
+
// Ignore the event if it's not targeted at this specific instance
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
//console.log(event.detail);
|
|
436
|
+
this.parentContext = event.detail;
|
|
437
|
+
event.stopPropagation();
|
|
438
|
+
}
|
|
439
|
+
*/
|
|
419
440
|
handleClick(event) {
|
|
420
441
|
var _a, _b;
|
|
421
442
|
if (this.disabled) {
|
|
@@ -423,9 +444,9 @@ const EdsButton = class {
|
|
|
423
444
|
event.preventDefault();
|
|
424
445
|
return;
|
|
425
446
|
}
|
|
426
|
-
|
|
447
|
+
analytics.sendAnalytics({
|
|
427
448
|
category: 'ui-component',
|
|
428
|
-
parentContext:
|
|
449
|
+
parentContext: null,
|
|
429
450
|
tag: this.el.tagName.toLowerCase(),
|
|
430
451
|
name: ((_a = this.label) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || ((_b = this.ariaLabel) === null || _b === void 0 ? void 0 : _b.toLowerCase()) || '',
|
|
431
452
|
action: 'click'
|
|
@@ -452,7 +473,7 @@ const EdsButton = class {
|
|
|
452
473
|
show: !this.loading
|
|
453
474
|
});
|
|
454
475
|
const ElementType = this.elementType;
|
|
455
|
-
return (index.h(ElementType, { key: '
|
|
476
|
+
return (index.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 && index.h("span", { key: '866cd0272d9f381b3ecb892e588c860ca8b41051', class: this.loading ? 'opacity-0' : '' }, this.label), this.loading && (index.h("span", { key: 'fcba01e3404724869c59f4e21bd5db459643d840', class: "absolute inset-0 flex items-center justify-center" }, index.h("span", { key: 'e44955e5641e757e66eb4961097fb4d60e4def7c', class: "loader", style: {
|
|
456
477
|
border: `3px solid ${this.intent === 'secondary' ? 'rgba(255, 255, 255, .3)' : 'rgba(0, 0, 0, .3)'}`,
|
|
457
478
|
borderBottomColor: this.intent === 'secondary' ? '#fff' : '#000'
|
|
458
479
|
} }))), this.icon ? index.h("eds-icon-wrapper", { class: iconClasses, icon: this.icon }) : null));
|
|
@@ -461,129 +482,6 @@ const EdsButton = class {
|
|
|
461
482
|
};
|
|
462
483
|
EdsButton.style = EdsButtonStyle0;
|
|
463
484
|
|
|
464
|
-
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}";
|
|
465
|
-
const EdsDropdownStyle0 = edsDropdownCss;
|
|
466
|
-
|
|
467
|
-
const EdsDropdown = class {
|
|
468
|
-
constructor(hostRef) {
|
|
469
|
-
index.registerInstance(this, hostRef);
|
|
470
|
-
this.focusableItems = [];
|
|
471
|
-
/**
|
|
472
|
-
* Toggles the visibility of the dropdown and manages focus.
|
|
473
|
-
*/
|
|
474
|
-
this.handleClick = () => {
|
|
475
|
-
this.isOpen = !this.isOpen;
|
|
476
|
-
if (this.isOpen) {
|
|
477
|
-
this.focusIndex = 0;
|
|
478
|
-
this.focusItem();
|
|
479
|
-
}
|
|
480
|
-
else {
|
|
481
|
-
this.closeDropdown();
|
|
482
|
-
}
|
|
483
|
-
};
|
|
484
|
-
this.icon = 'chevron-down';
|
|
485
|
-
this.label = undefined;
|
|
486
|
-
this.rounded = false;
|
|
487
|
-
this.ariaLabel = 'Open dropdown';
|
|
488
|
-
this.asNav = true;
|
|
489
|
-
this.dropdownPos = 'left';
|
|
490
|
-
this.dropdownOffset = true;
|
|
491
|
-
this.intent = 'tertiary';
|
|
492
|
-
this.isOpen = false;
|
|
493
|
-
this.focusIndex = -1;
|
|
494
|
-
}
|
|
495
|
-
/**
|
|
496
|
-
* Closes the dropdown when a click occurs outside of it.
|
|
497
|
-
* @param {Event} e - The click event.
|
|
498
|
-
*/
|
|
499
|
-
handleWindowClick(e) {
|
|
500
|
-
if (!this.host.contains(e.target)) {
|
|
501
|
-
this.closeDropdown();
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
/**
|
|
505
|
-
* Handles keyboard navigation and accessibility within the dropdown.
|
|
506
|
-
* @param {KeyboardEvent} event - The keyboard event.
|
|
507
|
-
*/
|
|
508
|
-
handleKeyDown(event) {
|
|
509
|
-
if (this.isOpen) {
|
|
510
|
-
const key = event.key;
|
|
511
|
-
switch (key) {
|
|
512
|
-
case 'Tab':
|
|
513
|
-
this.closeDropdown();
|
|
514
|
-
break;
|
|
515
|
-
case 'ArrowUp':
|
|
516
|
-
event.preventDefault();
|
|
517
|
-
this.focusIndex = (this.focusIndex - 1 + this.focusableItems.length) % this.focusableItems.length;
|
|
518
|
-
this.focusItem();
|
|
519
|
-
break;
|
|
520
|
-
case 'ArrowDown':
|
|
521
|
-
event.preventDefault();
|
|
522
|
-
this.focusIndex = (this.focusIndex + 1) % this.focusableItems.length;
|
|
523
|
-
this.focusItem();
|
|
524
|
-
break;
|
|
525
|
-
}
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* Closes the dropdown and resets focus.
|
|
530
|
-
*/
|
|
531
|
-
closeDropdown() {
|
|
532
|
-
this.isOpen = false;
|
|
533
|
-
this.focusIndex = -1;
|
|
534
|
-
}
|
|
535
|
-
/**
|
|
536
|
-
* Sets focus on the currently selected item in the dropdown.
|
|
537
|
-
*/
|
|
538
|
-
focusItem() {
|
|
539
|
-
var _a;
|
|
540
|
-
(_a = this.focusableItems[this.focusIndex]) === null || _a === void 0 ? void 0 : _a.focus();
|
|
541
|
-
}
|
|
542
|
-
/**
|
|
543
|
-
* Lifecycle method that runs after the component has been added to the DOM.
|
|
544
|
-
* Initializes focusable items within the dropdown.
|
|
545
|
-
*/
|
|
546
|
-
componentDidLoad() {
|
|
547
|
-
var _a;
|
|
548
|
-
this.focusableItems = Array.from(((_a = this.dropdownContent) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button')) || []);
|
|
549
|
-
const btns = this.host.shadowRoot.querySelectorAll('eds-button');
|
|
550
|
-
btns.forEach((btn) => {
|
|
551
|
-
this.emitContext(btn);
|
|
552
|
-
});
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Emits a custom event called `parentContext` for a given button element.
|
|
556
|
-
* Provides context information about the dropdown component.
|
|
557
|
-
*
|
|
558
|
-
* @param linkElement - The button element to which the event will be dispatched.
|
|
559
|
-
*/
|
|
560
|
-
emitContext(linkElement) {
|
|
561
|
-
const event = new CustomEvent('parentContext', {
|
|
562
|
-
detail: {
|
|
563
|
-
componentName: this.host.tagName.toLowerCase(),
|
|
564
|
-
identifier: null
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
linkElement.dispatchEvent(event);
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* Renders the dropdown component and displays its content when open.
|
|
571
|
-
* @returns {JSX.Element} The rendered dropdown component.
|
|
572
|
-
*/
|
|
573
|
-
render() {
|
|
574
|
-
return (index.h("div", { key: 'd49e23ee208cfb000baba83795899487e4d94af7', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, index.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" }), index.h("nav", { key: '41bbd4e2bf02345393aaa97101b2c3aca2fa4085', class: {
|
|
575
|
-
'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,
|
|
576
|
-
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
577
|
-
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
578
|
-
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
579
|
-
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset,
|
|
580
|
-
'rounded-lg': this.rounded
|
|
581
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, index.h("slot", { key: '714bad9f5a8ddf6d5ea246044a83b0a5102494c4' }))));
|
|
582
|
-
}
|
|
583
|
-
get host() { return index.getElement(this); }
|
|
584
|
-
};
|
|
585
|
-
EdsDropdown.style = EdsDropdownStyle0;
|
|
586
|
-
|
|
587
485
|
const edsFooterCss = "";
|
|
588
486
|
const EdsFooterStyle0 = edsFooterCss;
|
|
589
487
|
|
|
@@ -622,7 +520,7 @@ const EdsFooter = class {
|
|
|
622
520
|
* @returns {JSX.Element} The rendered JSX for the footer component.
|
|
623
521
|
*/
|
|
624
522
|
render() {
|
|
625
|
-
return (index.h("footer", { key: '
|
|
523
|
+
return (index.h("footer", { key: 'ba6500548e8f719b8670063918c61b391ddb8387', class: `${this.extraClass} pb-banner` }, this.social ? (index.h("div", { class: "border-softest border-t-2 pt-20 pb-28 md:pt-28" }, index.h("div", { class: "container pb-20 xl:pb-40 " }, index.h("div", { class: "grid-layout" }, index.h("div", { class: "grid-col-span-12 lg:grid-col-span-5" }, index.h("eds-social-networks", { class: "mt-28" })), index.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, index.h("div", { key: '1221cca6d40c4de8ed7ceefa84198817bf904630', class: `border-softest ${this.social ? 'border-t-2' : ''} pt-20 pb-28 md:pt-28` }, index.h("div", { key: 'ad55b938fb2961074822d6bf458f0ea7a15baa84', class: "container flex flex-wrap items-center gap-20 lg:flex-nowrap" }, index.h("div", { key: '91c13fdd98508a812e5dcfa86056b5adc035623d', class: "flex items-center gap-x-12" }, index.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" }, index.h("eds-img", { key: 'df5f16284084d9171cd3d567dd249a0ef98bde79', width: 54, height: 41, src: "https://www.ebrains.eu/flags/4x3/eu.svg" }))), index.h("div", { key: '0ff4328cc30f06c1a85ffc726d5b6b0dc53e49b9', class: "f-ui-04 text-light order-last w-full lg:order-none lg:w-auto" }, index.h("p", { key: '2cb2b4f072a141e58c9a2185c9179d475f9690bd' }, this.fundedBy), index.h("div", { key: 'b31d1e18933fb1be11d8454f9a5301dedc839015', class: "mt-4 flex flex-wrap gap-12 lg:flex-nowrap" }, index.h("span", { key: 'aab95785cfb2bc7d490ac9426ef5e421f9418dc9', class: "effect-focus !no-underline decoration-2 underline-offset-4 hover:!underline" }, "\u00A9 ", this.rightsReserved), this.hasCookiesSetUp && (index.h("button", { key: 'fbd5bf3560faf0ee34d740bda423595c3cd21ad8', class: "effect-focus !no-underline underline-offset-4 hover:!underline", onClick: () => this.toggleCookiesPopup() }, this.cookiesPreference)))), index.h("div", { key: '0427234b6679ae05b673a5c6efb8447306f61876', class: "ml-auto pl-12" }, this.enableScrollTop ? (index.h("eds-button", { "aria-label": "Back to top", intent: "ghostInverse", icon: "chevron-up", onClick: this.backToTop })) : null)))));
|
|
626
524
|
}
|
|
627
525
|
};
|
|
628
526
|
EdsFooter.style = EdsFooterStyle0;
|
|
@@ -730,11 +628,7 @@ const EdsHeader = class {
|
|
|
730
628
|
this.homeUrl = '/';
|
|
731
629
|
this.links = undefined;
|
|
732
630
|
this.inverseHeader = false;
|
|
733
|
-
this.userFeature = false;
|
|
734
631
|
this.menuEnabled = false;
|
|
735
|
-
this.keycloakUrl = undefined;
|
|
736
|
-
this.keycloakRealm = undefined;
|
|
737
|
-
this.keycloakClientId = undefined;
|
|
738
632
|
this.isMenuOpen = false;
|
|
739
633
|
this.isUserMenuOpen = false;
|
|
740
634
|
this.isAuthenticated = false;
|
|
@@ -807,8 +701,8 @@ const EdsHeader = class {
|
|
|
807
701
|
return [];
|
|
808
702
|
}
|
|
809
703
|
render() {
|
|
810
|
-
return (index.h("header", { key: '
|
|
811
|
-
${this.inverseHeader ? 'text-inverse bg-strongest' : 'text-default bg-dark'}` }, index.h("div", { key: '
|
|
704
|
+
return (index.h("header", { key: 'ce002da29cee5446f64694ba93ec67f89c180ac4', class: `flex items-center justify-between relative z-10
|
|
705
|
+
${this.inverseHeader ? 'text-inverse bg-strongest' : 'text-default bg-dark'}` }, index.h("div", { key: '579593f3180b27d129fd9ca380d6b74d0efcbd1e', class: "mr-auto w-[200px] h-[85px]" }, index.h("eds-logo", { key: 'c72d87a2ff7cd1ea2b0390cd364e376d1f52c67f', type: this.inverseHeader ? 'color-white' : 'color', href: this.homeUrl })), this.parsedLinks && (index.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" }, index.h("ul", { key: '390f9b6c6c950719598eec88b4befb4224cb0c03', class: "flex gap-x-2" }, this.parsedLinks.map((link) => (index.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" })))))), index.h("slot", { key: 'bc7b093739cc3058e4eb3d4eddbb0b49856b5710' }), this.menuEnabled ? (index.h("div", { class: "md:hidden flex overflow-hidden px-16" }, index.h("eds-button", { "aria-label": "Menu", intent: "ghostInverse", icon: "menu", size: "small", onClick: () => this.handleToggleMenu() }))) : null));
|
|
812
706
|
}
|
|
813
707
|
get hostEl() { return index.getElement(this); }
|
|
814
708
|
};
|
|
@@ -858,11 +752,16 @@ const EdsImg = class {
|
|
|
858
752
|
this.loaded = true;
|
|
859
753
|
this.showBg = false;
|
|
860
754
|
};
|
|
755
|
+
// On error, remove the background effect so users know the image failed to load.
|
|
756
|
+
this.handleError = () => {
|
|
757
|
+
this.loaded = true;
|
|
758
|
+
this.showBg = false;
|
|
759
|
+
};
|
|
861
760
|
this.handleTransitionEnd = () => {
|
|
862
761
|
this.showBg = false;
|
|
863
762
|
};
|
|
864
763
|
this.src = undefined;
|
|
865
|
-
this.alt =
|
|
764
|
+
this.alt = '';
|
|
866
765
|
this.width = undefined;
|
|
867
766
|
this.height = undefined;
|
|
868
767
|
this.srcset = undefined;
|
|
@@ -885,14 +784,14 @@ const EdsImg = class {
|
|
|
885
784
|
imgOpts['loading'] = 'lazy';
|
|
886
785
|
imgOpts['decoding'] = 'async';
|
|
887
786
|
}
|
|
888
|
-
return (index.h("div", { key: '
|
|
787
|
+
return (index.h("div", { key: '733be8df2b9e3db1b5b13aaa47c16a9c26f345d7', class: {
|
|
889
788
|
'items-center justify-center': true,
|
|
890
789
|
'effect-bg-pattern': this.lazyload && this.showBg
|
|
891
|
-
} }, index.h("picture", { key: '
|
|
790
|
+
} }, index.h("picture", { key: '3a6a0289bcf8a2851278eb6c6fbe64bfe7004014' }, this.formats.map((format) => (index.h("source", { type: format.type, srcSet: format.srcset, media: format.media, sizes: this.sizes }))), index.h("img", Object.assign({ key: 'b5d92e20a28f67a13d926f081b5f85dbd981ff78', ref: (el) => (this.img = el), class: {
|
|
892
791
|
'effect-opacity object-cover object-center': true,
|
|
893
792
|
'opacity-100': this.loaded,
|
|
894
793
|
'opacity-0': !this.loaded
|
|
895
|
-
}, 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 })))));
|
|
794
|
+
}, 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 })))));
|
|
896
795
|
}
|
|
897
796
|
get imgElement() { return index.getElement(this); }
|
|
898
797
|
};
|
|
@@ -1039,12 +938,11 @@ const EdsLink = class {
|
|
|
1039
938
|
this.hideLabelOnSmallScreen = false;
|
|
1040
939
|
this.extraClass = undefined;
|
|
1041
940
|
}
|
|
1042
|
-
|
|
941
|
+
handleParentContext(event) {
|
|
1043
942
|
if (event.target !== this.el) {
|
|
1044
943
|
// Ignore the event if it's not targeted at this specific instance
|
|
1045
944
|
return;
|
|
1046
945
|
}
|
|
1047
|
-
//console.log(event.detail);
|
|
1048
946
|
this.parentContext = event.detail;
|
|
1049
947
|
event.stopPropagation();
|
|
1050
948
|
}
|
|
@@ -1055,7 +953,7 @@ const EdsLink = class {
|
|
|
1055
953
|
event.preventDefault();
|
|
1056
954
|
return;
|
|
1057
955
|
}
|
|
1058
|
-
|
|
956
|
+
analytics.sendAnalytics({
|
|
1059
957
|
category: 'ui-component',
|
|
1060
958
|
parentContext: this.parentContext,
|
|
1061
959
|
tag: this.el.tagName.toLowerCase(),
|
|
@@ -1077,7 +975,7 @@ const EdsLink = class {
|
|
|
1077
975
|
}
|
|
1078
976
|
renderRightIcon() {
|
|
1079
977
|
if (this.icon && this.iconPos === 'right') {
|
|
1080
|
-
return (index.h("span", { class: !this.external && !this.label ? '' : 'flex' }, index.h("eds-icon-wrapper", { class: `
|
|
978
|
+
return (index.h("span", { class: !this.external && !this.label ? '' : 'flex ml-4' }, index.h("eds-icon-wrapper", { class: `
|
|
1081
979
|
flex inline-flex items-center justify-center
|
|
1082
980
|
${this.size === 'large' ? 'h-32 w-32' : 'h-20 w-20'}
|
|
1083
981
|
`, icon: this.icon })));
|
|
@@ -1085,6 +983,7 @@ const EdsLink = class {
|
|
|
1085
983
|
return null;
|
|
1086
984
|
}
|
|
1087
985
|
render() {
|
|
986
|
+
// If the link is disabled, use a <span>; otherwise, use an <a> element.
|
|
1088
987
|
const ComponentType = this.disabled ? 'span' : 'a';
|
|
1089
988
|
const classes = linkStyles({
|
|
1090
989
|
intent: this.intent,
|
|
@@ -1092,10 +991,12 @@ const EdsLink = class {
|
|
|
1092
991
|
iconSmall: this.iconSmall,
|
|
1093
992
|
isActive: this.current
|
|
1094
993
|
});
|
|
994
|
+
// If no visible label is provided, ensure ariaLabel is set.
|
|
995
|
+
const computedAriaLabel = this.ariaLabel || this.label || 'link';
|
|
1095
996
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
1096
997
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
1097
998
|
: '';
|
|
1098
|
-
return (index.h(ComponentType, { key: '
|
|
999
|
+
return (index.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) }, index.h("span", { key: '7df72410c98bab3c0ef204e5cd33f1e069976d24', class: "z-1 relative inline-flex items-center justify-center" }, this.renderLeftIcon(), index.h("span", { key: '208b4fa88695bd8e8ed961d4c7639b117341110c', class: labelClasses }, this.label), this.renderRightIcon())));
|
|
1099
1000
|
}
|
|
1100
1001
|
get el() { return index.getElement(this); }
|
|
1101
1002
|
};
|
|
@@ -1110,6 +1011,7 @@ const EdsLogo = class {
|
|
|
1110
1011
|
this.href = '/';
|
|
1111
1012
|
this.orientation = 'horizontal';
|
|
1112
1013
|
this.type = undefined;
|
|
1014
|
+
this.label = 'Home';
|
|
1113
1015
|
}
|
|
1114
1016
|
/**
|
|
1115
1017
|
* Handles the click event on the logo link.
|
|
@@ -1120,7 +1022,7 @@ const EdsLogo = class {
|
|
|
1120
1022
|
* - `action`: The action, set as "click".
|
|
1121
1023
|
*/
|
|
1122
1024
|
handleClick() {
|
|
1123
|
-
|
|
1025
|
+
analytics.sendAnalytics({
|
|
1124
1026
|
category: 'ui-component',
|
|
1125
1027
|
tag: this.el.tagName.toLowerCase(),
|
|
1126
1028
|
name: 'logo',
|
|
@@ -1162,12 +1064,63 @@ const EdsLogo = class {
|
|
|
1162
1064
|
}
|
|
1163
1065
|
render() {
|
|
1164
1066
|
const logoContent = this.getLogo();
|
|
1165
|
-
return (index.h("a", { key: '
|
|
1067
|
+
return (index.h("a", { key: 'ee8de4071b0137020341982b4c5cb2c938f1c4df', href: this.href, onClick: () => this.handleClick(), class: "eds-logo-wrapper", "aria-label": this.label }, index.h("div", { key: '1eb620afbcc5a2a5c6914cc1c91a45ca62d0068c', innerHTML: logoContent })));
|
|
1166
1068
|
}
|
|
1167
1069
|
get el() { return index.getElement(this); }
|
|
1168
1070
|
};
|
|
1169
1071
|
EdsLogo.style = EdsLogoStyle0;
|
|
1170
1072
|
|
|
1073
|
+
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}";
|
|
1074
|
+
const EdsRatingStyle0 = edsRatingCss;
|
|
1075
|
+
|
|
1076
|
+
const EdsRating = class {
|
|
1077
|
+
constructor(hostRef) {
|
|
1078
|
+
index.registerInstance(this, hostRef);
|
|
1079
|
+
this.ratingChange = index.createEvent(this, "ratingChange", 7);
|
|
1080
|
+
this.stars = 5;
|
|
1081
|
+
this.label = 'Rate your experience';
|
|
1082
|
+
this.textMapping = ['Very Poor', 'Poor', 'Average', 'Good', 'Excellent'];
|
|
1083
|
+
this.selectedRating = 0;
|
|
1084
|
+
}
|
|
1085
|
+
/**
|
|
1086
|
+
* Parses the `textMapping` prop into an array of strings.
|
|
1087
|
+
*/
|
|
1088
|
+
get parsedMappings() {
|
|
1089
|
+
if (typeof this.textMapping === 'object') {
|
|
1090
|
+
return this.textMapping;
|
|
1091
|
+
}
|
|
1092
|
+
else if (typeof this.textMapping === 'string') {
|
|
1093
|
+
try {
|
|
1094
|
+
return JSON.parse(this.textMapping);
|
|
1095
|
+
}
|
|
1096
|
+
catch (e) {
|
|
1097
|
+
//console.error('Error parsing textMapping prop:', e);
|
|
1098
|
+
return [];
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
return [];
|
|
1102
|
+
}
|
|
1103
|
+
/**
|
|
1104
|
+
* Handles the click event on a star.
|
|
1105
|
+
* @param rating - The selected rating value.
|
|
1106
|
+
*/
|
|
1107
|
+
handleClick(rating) {
|
|
1108
|
+
this.selectedRating = rating;
|
|
1109
|
+
this.ratingChange.emit(rating);
|
|
1110
|
+
}
|
|
1111
|
+
render() {
|
|
1112
|
+
return (index.h("div", { key: 'b613863ad54ae9b381a5741bce4b188eff806ef0', class: "relative w-full flex flex-col" }, index.h("span", { key: 'f35cef9c3691aab73995e2ca6e2554cc19bae837', class: "f-heading-05" }, this.label), index.h("div", { key: '37082eb4bbadf5c211c197f3f81501d0b0e61404', role: "radiogroup", "aria-label": this.label, class: "stars flex space-x-2" }, Array.from({ length: this.stars }, (_, index$1) => {
|
|
1113
|
+
const starRating = index$1 + 1;
|
|
1114
|
+
const isSelected = starRating <= this.selectedRating;
|
|
1115
|
+
// Use the mapping text if available; otherwise, fall back to a generic label.
|
|
1116
|
+
const mappingText = this.parsedMappings[starRating - 1] || `Rating ${starRating}`;
|
|
1117
|
+
return (index.h("eds-button", { label: "\u2605", role: "radio", "aria-checked": isSelected ? 'true' : 'false', "aria-label": mappingText, onClick: () => this.handleClick(starRating), tabIndex: this.selectedRating === 0 && index$1 === 0 ? 0 : isSelected ? 0 : -1, intent: isSelected ? 'primary' : 'ghost', size: "small", "extra-class": "p-2" // Optional padding or styling for the star button
|
|
1118
|
+
}));
|
|
1119
|
+
})), this.selectedRating > 0 && this.parsedMappings[this.selectedRating - 1] && (index.h("span", { key: '61b4b92e476cfa0dd9bf405cb080dedd995ff9c6', class: "f-ui-04 text-lighter mt-4" }, this.parsedMappings[this.selectedRating - 1]))));
|
|
1120
|
+
}
|
|
1121
|
+
};
|
|
1122
|
+
EdsRating.style = EdsRatingStyle0;
|
|
1123
|
+
|
|
1171
1124
|
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}";
|
|
1172
1125
|
const EdsSocialNetworksStyle0 = edsSocialNetworksCss;
|
|
1173
1126
|
|
|
@@ -1222,11 +1175,100 @@ const EdsSocialNetworks = class {
|
|
|
1222
1175
|
* @returns {JSX.Element} The rendered JSX for the component.
|
|
1223
1176
|
*/
|
|
1224
1177
|
render() {
|
|
1225
|
-
return (index.h("div", { key: '
|
|
1178
|
+
return (index.h("div", { key: '615a7cb2c26060d2d4cde875291a081b7de12e19' }, index.h("p", { key: '9e19ad59fcc94508cb60cd4aafa87c3878fb2ebc', class: "f-ui-02" }, this.title), index.h("ul", { key: 'a4811d16447ab148a7c129f188405f3f7050df70', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index$1) => (index.h("li", { key: index$1 }, 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" })))))));
|
|
1226
1179
|
}
|
|
1227
1180
|
};
|
|
1228
1181
|
EdsSocialNetworks.style = EdsSocialNetworksStyle0;
|
|
1229
1182
|
|
|
1183
|
+
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}";
|
|
1184
|
+
const EdsStepsStyle0 = edsStepsCss;
|
|
1185
|
+
|
|
1186
|
+
const EdsSteps = class {
|
|
1187
|
+
constructor(hostRef) {
|
|
1188
|
+
index.registerInstance(this, hostRef);
|
|
1189
|
+
this.stepClick = index.createEvent(this, "stepClick", 7);
|
|
1190
|
+
this.handleNext = () => {
|
|
1191
|
+
if (this.activeStep < this.parsedSteps.length) {
|
|
1192
|
+
this.activeStep = this.activeStep + 1;
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
this.handleBack = () => {
|
|
1196
|
+
if (this.activeStep > 0) {
|
|
1197
|
+
this.activeStep = this.activeStep - 1;
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
this.handleReset = () => {
|
|
1201
|
+
this.activeStep = 0;
|
|
1202
|
+
};
|
|
1203
|
+
this.steps = [];
|
|
1204
|
+
this.type = 'static';
|
|
1205
|
+
this.activeStep = 0;
|
|
1206
|
+
}
|
|
1207
|
+
handleStepClick(index) {
|
|
1208
|
+
this.stepClick.emit(index);
|
|
1209
|
+
// In linear mode, update the active step on header click.
|
|
1210
|
+
if (this.type === 'linear') {
|
|
1211
|
+
this.activeStep = index;
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Parse the JSON string into an array of steps.
|
|
1216
|
+
*/
|
|
1217
|
+
get parsedSteps() {
|
|
1218
|
+
if (typeof this.steps === 'string') {
|
|
1219
|
+
try {
|
|
1220
|
+
const stepsStr = this.steps;
|
|
1221
|
+
return JSON.parse(stepsStr);
|
|
1222
|
+
}
|
|
1223
|
+
catch (error) {
|
|
1224
|
+
//console.error('Invalid steps JSON', error);
|
|
1225
|
+
return [];
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
return this.steps;
|
|
1229
|
+
}
|
|
1230
|
+
render() {
|
|
1231
|
+
const steps = this.parsedSteps;
|
|
1232
|
+
if (this.type === 'linear') {
|
|
1233
|
+
return (index.h("div", null, index.h("div", { class: "steps" }, steps.map((step, index$1) => (index.h("div", { class: "step mb-28", key: index$1 }, index.h("h3", { onClick: () => this.handleStepClick(index$1) }, step.title), this.activeStep === index$1 && (index.h("div", { class: "content" }, index.h("div", { class: "f-body-02 text-lighter my-16" }, step.content), index.h("eds-button", { label: index$1 === steps.length - 1 ? 'Finish' : 'Continue', class: "next-btn", onClick: this.handleNext }), index.h("eds-button", { label: "Back", intent: "ghostInverse", onClick: this.handleBack, disabled: index$1 === 0, "extra-class": index$1 === 0 ? 'hidden' : 'ml-8 block' }))))))), this.activeStep === steps.length && (index.h("div", { class: "completed" }, index.h("eds-alert", { intent: "success", message: "All steps completed - you're finished!" }), index.h("eds-button", { label: "Start again", onClick: this.handleReset, "extra-class": "mt-4" })))));
|
|
1234
|
+
}
|
|
1235
|
+
// Static mode: show all steps with their content, no navigation buttons.
|
|
1236
|
+
return (index.h("div", { class: "steps" }, steps.map((step, index$1) => (index.h("div", { class: "step mb-28", key: index$1 }, index.h("h3", null, step.title), index.h("div", { class: "content" }, index.h("div", { class: "f-body-02 text-lighter my-16" }, step.content)))))));
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1239
|
+
EdsSteps.style = EdsStepsStyle0;
|
|
1240
|
+
|
|
1241
|
+
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)}";
|
|
1242
|
+
const EdsSwitchStyle0 = edsSwitchCss;
|
|
1243
|
+
|
|
1244
|
+
const EdsSwitch = class {
|
|
1245
|
+
constructor(hostRef) {
|
|
1246
|
+
index.registerInstance(this, hostRef);
|
|
1247
|
+
this.change = index.createEvent(this, "change", 7);
|
|
1248
|
+
this.toggleSwitch = () => {
|
|
1249
|
+
if (this.disabled) {
|
|
1250
|
+
return;
|
|
1251
|
+
}
|
|
1252
|
+
this.checked = !this.checked;
|
|
1253
|
+
this.change.emit(this.checked);
|
|
1254
|
+
};
|
|
1255
|
+
this.checked = false;
|
|
1256
|
+
this.disabled = false;
|
|
1257
|
+
this.labelOn = '';
|
|
1258
|
+
this.labelOff = '';
|
|
1259
|
+
}
|
|
1260
|
+
render() {
|
|
1261
|
+
// Compute an accessible name based on state.
|
|
1262
|
+
const accessibleLabel = this.labelOn || this.labelOff ? (this.checked ? this.labelOn : this.labelOff) : 'Toggle switch';
|
|
1263
|
+
return (index.h("div", { key: 'd4c727cbb562921b2bcba269e84f25c359c7061b', class: "switch-container" }, this.labelOff && index.h("span", { key: '90b18fff27bd21501466deb5879e5fe6ff607043', class: "switch-label switch-label--off" }, this.labelOff), index.h("button", { key: '8675f5d9f972d3932710fa7f9b28f74f95a83003', type: "button", role: "switch", "aria-checked": this.checked ? 'true' : 'false', "aria-disabled": this.disabled ? 'true' : 'false', "aria-label": accessibleLabel, class: {
|
|
1264
|
+
switch: true,
|
|
1265
|
+
'switch--checked': this.checked,
|
|
1266
|
+
'switch--disabled': this.disabled
|
|
1267
|
+
}, onClick: this.toggleSwitch, disabled: this.disabled }, index.h("span", { key: '26aa30a01b10419c1665b1fd58b5696a02d1504a', class: "switch-handle" })), this.labelOn && index.h("span", { key: '3680d67555e9193a97e129c0639b411263e070a8', class: "switch-label switch-label--on" }, this.labelOn)));
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
EdsSwitch.style = EdsSwitchStyle0;
|
|
1271
|
+
|
|
1230
1272
|
const toastStyles = index$1.cva(['relative right-4 bottom-4 w-auto p-12 rounded-lg shadow-md'], {
|
|
1231
1273
|
variants: {
|
|
1232
1274
|
intent: {
|
|
@@ -1254,6 +1296,27 @@ const EdsToast = class {
|
|
|
1254
1296
|
this.duration = 5000;
|
|
1255
1297
|
this.visible = true;
|
|
1256
1298
|
}
|
|
1299
|
+
/**
|
|
1300
|
+
* Lifecycle method that sets up the initial panel height and adds a resize event listener
|
|
1301
|
+
* to recalculate height on window resize.
|
|
1302
|
+
*/
|
|
1303
|
+
componentDidLoad() {
|
|
1304
|
+
// Emit context for each eds-button element after the component is fully loaded
|
|
1305
|
+
const btn = this.el.querySelector('eds-button');
|
|
1306
|
+
this.emitContext(btn);
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* Emits a custom event called `parentContext` for a given button element.
|
|
1310
|
+
*/
|
|
1311
|
+
emitContext(linkElement) {
|
|
1312
|
+
const event = new CustomEvent('parentContext', {
|
|
1313
|
+
detail: {
|
|
1314
|
+
componentName: this.el.tagName.toLowerCase(),
|
|
1315
|
+
identifier: null
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
linkElement.dispatchEvent(event);
|
|
1319
|
+
}
|
|
1257
1320
|
connectedCallback() {
|
|
1258
1321
|
// Auto-dismiss the toast after the specified duration
|
|
1259
1322
|
this.dismissTimeout = setTimeout(this.dismissToast, this.duration);
|
|
@@ -1267,7 +1330,7 @@ const EdsToast = class {
|
|
|
1267
1330
|
return null;
|
|
1268
1331
|
}
|
|
1269
1332
|
const classes = toastStyles({ intent: this.intent });
|
|
1270
|
-
return (index.h("div", { class: classes }, index.h("div", { class: "flex items-center justify-between gap-4" }, index.h("p", { class: "f-ui-01" }, this.message), index.h("eds-button", { intent: "tertiary", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
1333
|
+
return (index.h("div", { class: classes, role: "alert", "aria-live": "assertive" }, index.h("div", { class: "flex items-center justify-between gap-4" }, index.h("p", { class: "f-ui-01" }, this.message), index.h("eds-button", { intent: "tertiary", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
1271
1334
|
}
|
|
1272
1335
|
get el() { return index.getElement(this); }
|
|
1273
1336
|
};
|
|
@@ -1304,142 +1367,16 @@ const EdsToastManager = class {
|
|
|
1304
1367
|
this.toasts = this.toasts.filter((t) => t.id !== id);
|
|
1305
1368
|
}
|
|
1306
1369
|
render() {
|
|
1307
|
-
return (index.h("div", { key: '
|
|
1370
|
+
return (index.h("div", { key: '22cb79fd617ca1701fba63d3d4bf04f73ce1ac77', class: "toast-container" }, this.toasts.map((t) => (index.h("div", { key: t.id }, index.h("eds-toast", { message: t.message, intent: t.intent, onClick: () => this.removeToast(t.id) }))))));
|
|
1308
1371
|
}
|
|
1309
1372
|
get hostElement() { return index.getElement(this); }
|
|
1310
1373
|
};
|
|
1311
1374
|
EdsToastManager.style = EdsToastManagerStyle0;
|
|
1312
1375
|
|
|
1313
|
-
|
|
1314
|
-
constructor(hostRef) {
|
|
1315
|
-
index.registerInstance(this, hostRef);
|
|
1316
|
-
this.authStatusChanged = index.createEvent(this, "authStatusChanged", 7);
|
|
1317
|
-
/**
|
|
1318
|
-
* Handles user login by invoking the Keycloak `login` function.
|
|
1319
|
-
* Only triggers login if the user is not already authenticated.
|
|
1320
|
-
*/
|
|
1321
|
-
this.handleLogin = () => {
|
|
1322
|
-
if (!this.authenticated) {
|
|
1323
|
-
keycloak.login();
|
|
1324
|
-
}
|
|
1325
|
-
};
|
|
1326
|
-
/**
|
|
1327
|
-
* Handles user logout by invoking the Keycloak `logout` function.
|
|
1328
|
-
* Resets the `authenticated` state to `false` after logout.
|
|
1329
|
-
*/
|
|
1330
|
-
this.handleLogout = () => {
|
|
1331
|
-
keycloak.logout();
|
|
1332
|
-
this.authenticated = false;
|
|
1333
|
-
this.user = null;
|
|
1334
|
-
};
|
|
1335
|
-
this.keycloakUrl = undefined;
|
|
1336
|
-
this.keycloakRealm = undefined;
|
|
1337
|
-
this.keycloakClientId = undefined;
|
|
1338
|
-
this.user = null;
|
|
1339
|
-
this.authenticated = false;
|
|
1340
|
-
this.serverAvailable = false;
|
|
1341
|
-
this.username = '';
|
|
1342
|
-
}
|
|
1343
|
-
/**
|
|
1344
|
-
* Lifecycle method that runs when the component is about to load.
|
|
1345
|
-
* It initializes authentication by calling the `initAuth` method.
|
|
1346
|
-
*/
|
|
1347
|
-
async componentWillLoad() {
|
|
1348
|
-
// Check if required props are provided (optional check)
|
|
1349
|
-
if (!this.keycloakUrl || !this.keycloakRealm || !this.keycloakClientId) {
|
|
1350
|
-
// eslint-disable-next-line
|
|
1351
|
-
console.error('Keycloak configuration props are missing.');
|
|
1352
|
-
return;
|
|
1353
|
-
}
|
|
1354
|
-
this.serverAvailable = await keycloak.checkServerAvailability(`${this.keycloakUrl}/realms/${this.keycloakRealm}`);
|
|
1355
|
-
if (!this.serverAvailable) {
|
|
1356
|
-
//toast.show('Keycloak server is unavailable.', 'error');
|
|
1357
|
-
return; // Do not proceed further
|
|
1358
|
-
}
|
|
1359
|
-
await this.initAuth();
|
|
1360
|
-
}
|
|
1361
|
-
/**
|
|
1362
|
-
* Initializes the Keycloak authentication by configuring Keycloak with the provided props.
|
|
1363
|
-
* Sets the `authenticated` state and `user` data if the user is authenticated.
|
|
1364
|
-
* Emits `authStatusChanged` event with the authentication status.
|
|
1365
|
-
*/
|
|
1366
|
-
async initAuth() {
|
|
1367
|
-
try {
|
|
1368
|
-
const keycloakConfig = {
|
|
1369
|
-
url: this.keycloakUrl,
|
|
1370
|
-
realm: this.keycloakRealm,
|
|
1371
|
-
clientId: this.keycloakClientId
|
|
1372
|
-
};
|
|
1373
|
-
await keycloak.initKeycloak(keycloakConfig, true);
|
|
1374
|
-
// Set authentication state and fetch user data if authenticated
|
|
1375
|
-
//this.authenticated = isAuthenticated();
|
|
1376
|
-
if (keycloak.isAuthenticated()) {
|
|
1377
|
-
this.user = keycloak.getUser();
|
|
1378
|
-
this.authenticated = true;
|
|
1379
|
-
}
|
|
1380
|
-
this.authStatusChanged.emit({
|
|
1381
|
-
authenticated: this.authenticated,
|
|
1382
|
-
user: this.user
|
|
1383
|
-
}); // Emit auth status change
|
|
1384
|
-
}
|
|
1385
|
-
catch (error) {
|
|
1386
|
-
// eslint-disable-next-line
|
|
1387
|
-
console.error('Keycloak initialization failed:', error);
|
|
1388
|
-
}
|
|
1389
|
-
}
|
|
1390
|
-
render() {
|
|
1391
|
-
var _a;
|
|
1392
|
-
// If the server is unavailable, render null
|
|
1393
|
-
if (!this.serverAvailable) {
|
|
1394
|
-
return null;
|
|
1395
|
-
}
|
|
1396
|
-
return (index.h("div", { class: "block" }, !this.authenticated ? (index.h("eds-button", { label: "Login", intent: "primary", onClick: this.handleLogin, "extra-class": "text-default" })) : (index.h("div", { class: "flex items-center" }, index.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" }, index.h("eds-user-modal", { user: JSON.stringify(this.user), onLogout: this.handleLogout.bind(this) }))))));
|
|
1397
|
-
}
|
|
1398
|
-
get hostEl() { return index.getElement(this); }
|
|
1399
|
-
};
|
|
1400
|
-
|
|
1401
|
-
const EdsUserModal = class {
|
|
1402
|
-
constructor(hostRef) {
|
|
1403
|
-
index.registerInstance(this, hostRef);
|
|
1404
|
-
this.user = undefined;
|
|
1405
|
-
this.links = undefined;
|
|
1406
|
-
this.onLogout = undefined;
|
|
1407
|
-
this.parsedUser = {};
|
|
1408
|
-
this.parsedLinks = [];
|
|
1409
|
-
}
|
|
1410
|
-
parseUserProp(newValue) {
|
|
1411
|
-
this.parsedUser = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
1412
|
-
}
|
|
1413
|
-
parseLinksProp(newValue) {
|
|
1414
|
-
this.parsedLinks = typeof newValue === 'string' ? JSON.parse(newValue) : newValue;
|
|
1415
|
-
}
|
|
1416
|
-
componentWillLoad() {
|
|
1417
|
-
this.parseUserProp(this.user);
|
|
1418
|
-
this.parseLinksProp(this.links);
|
|
1419
|
-
}
|
|
1420
|
-
get initials() {
|
|
1421
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
1422
|
-
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();
|
|
1423
|
-
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()) || '';
|
|
1424
|
-
}
|
|
1425
|
-
get hasLogout() {
|
|
1426
|
-
return typeof this.onLogout === 'function';
|
|
1427
|
-
}
|
|
1428
|
-
render() {
|
|
1429
|
-
var _a, _b, _c, _d, _e;
|
|
1430
|
-
return (index.h("div", { key: 'ad99ddd7c2710ef90840a5571ab6a161178cacc0', class: "min-w-[280px] p-8" }, index.h("div", { key: 'd1da12f3a965fa7503fb3e00566db0796b803352', class: "flex gap-x-16 pb-16 border-b-2 border-softer" }, index.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 }), index.h("div", { key: '4efe378b3a9ce76d35e642db150be13d0434db72', class: "max-w-full" }, ((_c = this.parsedUser) === null || _c === void 0 ? void 0 : _c.fullname) && (index.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) && index.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) && index.h("p", { key: 'b3514920e1eb4906cb7f7705bfbc986166e84946', class: "f-ui-03-light text-light mt-4" }, this.parsedUser.email))), index.h("div", { key: '61941fa0a19a19087da886a73d85d7e438d2c0b0', class: "text-default mt-16 flex w-full flex-col gap-y-8" }, index.h("div", { key: '5ad2be1763726c9d794b78a2593106fd8ba1dc7b', class: "border-softer mb-10 border-b-2 pb-16" }, index.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 })), index.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 && (index.h("eds-link", { key: '642890827e2fa6735bc616e680dbda481c2c0053', label: "Sign out", intent: "tertiary", "extra-class": "w-full justify-center", onClick: () => this.onLogout && this.onLogout() })))));
|
|
1431
|
-
}
|
|
1432
|
-
static get watchers() { return {
|
|
1433
|
-
"user": ["parseUserProp"],
|
|
1434
|
-
"links": ["parseLinksProp"]
|
|
1435
|
-
}; }
|
|
1436
|
-
};
|
|
1437
|
-
|
|
1438
|
-
exports.eds_avatar = EdsAvatar;
|
|
1376
|
+
exports.eds_alert = EdsAlert;
|
|
1439
1377
|
exports.eds_block_break = EdsBlockBreak;
|
|
1440
1378
|
exports.eds_breadcrumb = EdsBreadcrumb;
|
|
1441
1379
|
exports.eds_button = EdsButton;
|
|
1442
|
-
exports.eds_dropdown = EdsDropdown;
|
|
1443
1380
|
exports.eds_footer = EdsFooter;
|
|
1444
1381
|
exports.eds_fullscreen_menu = EdsFullscreenMenu;
|
|
1445
1382
|
exports.eds_header = EdsHeader;
|
|
@@ -1447,8 +1384,9 @@ exports.eds_icon_wrapper = EdsIconWrapper;
|
|
|
1447
1384
|
exports.eds_img = EdsImg;
|
|
1448
1385
|
exports.eds_link = EdsLink;
|
|
1449
1386
|
exports.eds_logo = EdsLogo;
|
|
1387
|
+
exports.eds_rating = EdsRating;
|
|
1450
1388
|
exports.eds_social_networks = EdsSocialNetworks;
|
|
1389
|
+
exports.eds_steps = EdsSteps;
|
|
1390
|
+
exports.eds_switch = EdsSwitch;
|
|
1451
1391
|
exports.eds_toast = EdsToast;
|
|
1452
1392
|
exports.eds_toast_manager = EdsToastManager;
|
|
1453
|
-
exports.eds_user = EdsUser;
|
|
1454
|
-
exports.eds_user_modal = EdsUserModal;
|