@ebrains/components 3.0.0 → 3.2.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/color-primary-palette_6.cjs.entry.js +14 -14
- package/dist/cjs/components-section.cjs.entry.js +1 -1
- package/dist/cjs/components.cjs.js +1 -1
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/docs-palettes.cjs.entry.js +1 -1
- package/dist/cjs/docs-tokens.cjs.entry.js +1 -1
- package/dist/cjs/{eds-accordion_52.cjs.entry.js → eds-accordion_53.cjs.entry.js} +1095 -336
- package/dist/cjs/eds-app-root.cjs.entry.js +1 -1
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +1 -1
- package/dist/cjs/eds-feedback.cjs.entry.js +1 -1
- package/dist/cjs/eds-frame.cjs.entry.js +1 -1
- package/dist/cjs/eds-gauge.cjs.entry.js +1 -1
- package/dist/cjs/eds-gitlab-contributors.cjs.entry.js +35 -32
- package/dist/cjs/eds-icon-bluesky.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-mastodon.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +1 -1
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +1 -1
- package/dist/cjs/eds-input-search.cjs.entry.js +76 -0
- package/dist/cjs/eds-modal.cjs.entry.js +18 -9
- package/dist/cjs/eds-pie.cjs.entry.js +2 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-timeline.cjs.entry.js +1 -1
- package/dist/cjs/eds-toast-manager.cjs.entry.js +1 -1
- package/dist/cjs/eds-trl-badge.cjs.entry.js +184 -0
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +1 -1
- package/dist/cjs/index-50bc1aa4.js +10 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/logo-space.cjs.entry.js +58 -1
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +2 -2
- package/dist/cjs/logo-variations-tabs.cjs.entry.js +1 -1
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +1 -1
- package/dist/cjs/svg-repository.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 +8 -2
- package/dist/collection/collection-manifest.json +4 -1
- package/dist/collection/components/eds-accordion/eds-accordion.css +3 -2
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -5
- package/dist/collection/components/eds-accordion/eds-accordion.stories.js +7 -19
- package/dist/collection/components/eds-alert/eds-alert.css +14 -0
- package/dist/collection/components/eds-alert/eds-alert.js +2 -1
- package/dist/collection/components/eds-alert/eds-alert.stories.js +19 -147
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- package/dist/collection/components/eds-avatar/eds-avatar.stories.js +2 -2
- package/dist/collection/components/eds-block-break/eds-block-break.js +1 -1
- package/dist/collection/components/eds-breadcrump/eds-breadcrump.js +1 -1
- package/dist/collection/components/eds-button/eds-button.css +15 -0
- package/dist/collection/components/eds-button/eds-button.js +17 -14
- package/dist/collection/components/eds-button/eds-button.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-app/eds-card-app.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.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-cta/eds-card-cta.css +10 -1
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.stories.js +4 -1
- package/dist/collection/components/eds-cards/eds-card-feature/eds-card-feature.js +2 -5
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +2 -4
- package/dist/collection/components/eds-cards/eds-card-hero/eds-card-hero.js +6 -7
- package/dist/collection/components/eds-cards/eds-card-stat/eds-card-stat.js +6 -7
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.js +1 -1
- package/dist/collection/components/eds-charts/eds-pie/eds-pie.js +2 -2
- package/dist/collection/components/eds-code-block/eds-code-block.css +72 -106
- package/dist/collection/components/eds-code-block/eds-code-block.js +1 -1
- package/dist/collection/components/eds-dropdown/eds-dropdown.js +30 -4
- package/dist/collection/components/eds-feedback/eds-feedback.js +1 -1
- package/dist/collection/components/eds-footer/eds-footer.css +143 -203
- package/dist/collection/components/eds-footer/eds-footer.js +176 -74
- package/dist/collection/components/eds-footer/eds-footer.stories.js +109 -17
- package/dist/collection/components/eds-form/eds-form.css +493 -1
- package/dist/collection/components/eds-form/eds-form.js +256 -14
- package/dist/collection/components/eds-form/eds-form.stories.js +110 -3
- package/dist/collection/components/eds-frame/eds-frame.js +1 -1
- package/dist/collection/components/eds-header/eds-header.js +1 -1
- package/dist/collection/components/eds-header/eds-header.stories.js +26 -12
- package/dist/collection/components/eds-icon-wrapper/eds-icon-wrapper.js +20 -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/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 +2 -2
- package/dist/collection/components/eds-img/eds-img.stories.js +29 -52
- package/dist/collection/components/eds-input-dropzone/eds-input-dropzone.js +7 -4
- package/dist/collection/components/eds-input-elements/eds-input/eds-input.js +20 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.css +39 -0
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +2 -1
- package/dist/collection/components/eds-input-elements/eds-input-label/eds-input-label.css +17 -5
- 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 +15 -5
- 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-search/eds-input-search.stories.js +30 -0
- package/dist/collection/components/eds-input-elements/eds-input-select/eds-input-select.js +6 -2
- package/dist/collection/components/eds-input-field/eds-input-field.css +219 -0
- package/dist/collection/components/eds-input-field/eds-input-field.js +16 -5
- package/dist/collection/components/eds-input-field/eds-input-field.stories.js +105 -125
- package/dist/collection/components/eds-input-file/eds-input-file.js +5 -3
- package/dist/collection/components/eds-link/eds-link.js +4 -8
- package/dist/collection/components/eds-link/eds-link.stories.js +13 -8
- package/dist/collection/components/eds-logo/eds-logo.js +13 -66
- package/dist/collection/components/eds-logo/eds-logo.stories.js +36 -17
- package/dist/collection/components/eds-modal/eds-modal.js +18 -9
- package/dist/collection/components/eds-modal/eds-modal.stories.js +11 -8
- package/dist/collection/components/eds-nps/eds-nps.css +32 -0
- package/dist/collection/components/eds-nps/eds-nps.js +3 -3
- package/dist/collection/components/eds-pagination/eds-pagination.js +2 -2
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -8
- package/dist/collection/components/eds-rating/eds-rating.css +9 -0
- package/dist/collection/components/eds-rating/eds-rating.js +2 -2
- package/dist/collection/components/eds-section/eds-section-core/eds-section-core.js +1 -1
- package/dist/collection/components/eds-section/eds-section-heading/eds-section-heading.js +2 -2
- package/dist/collection/components/eds-sidebar/eds-sidebar.js +2 -2
- package/dist/collection/components/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/components/eds-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-steps/eds-steps.css +56 -25
- package/dist/collection/components/eds-steps/eds-steps.js +27 -7
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.css +93 -28
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.js +57 -10
- package/dist/collection/components/eds-steps-v2/eds-steps-v2.stories.js +80 -17
- package/dist/collection/components/eds-switch/eds-switch.css +26 -3
- package/dist/collection/components/eds-switch/eds-switch.js +10 -7
- package/dist/collection/components/eds-switch/eds-switch.stories.js +20 -1
- package/dist/collection/components/eds-table/eds-table.css +21 -4
- package/dist/collection/components/eds-table/eds-table.js +16 -51
- package/dist/collection/components/eds-table/eds-table.stories.js +7 -115
- package/dist/collection/components/eds-tabs/eds-tabs.css +7 -1
- package/dist/collection/components/eds-tabs/eds-tabs.js +49 -18
- package/dist/collection/components/eds-tabs/eds-tabs.stories.js +2 -2
- package/dist/collection/components/eds-tag/eds-tag.js +1 -1
- package/dist/collection/components/eds-timeline/eds-timeline.js +1 -1
- package/dist/collection/components/eds-toast/eds-toast.css +146 -0
- package/dist/collection/components/eds-toast/eds-toast.js +106 -4
- package/dist/collection/components/eds-toast/eds-toast.stories.js +102 -5
- package/dist/collection/components/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.stories.js +7 -1
- package/dist/collection/components/eds-user/eds-user.js +2 -5
- package/dist/collection/components/eds-user/eds-user.stories.js +8 -11
- 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/components-section/components-section.js +1 -1
- package/dist/collection/eds-docs-ui/design-tokens/docs-tokens/docs-tokens.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 +8 -2
- package/dist/collection/eds-docs-ui/docs-palettes/docs-palettes.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-space/logo-space.js +58 -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-variations-tabs/logo-variations.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-wrong-usage/logo-wrong-usage.js +1 -1
- package/dist/collection/eds-docs-ui/svg-repository/svg-repository.js +1 -1
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +1 -1
- package/dist/collection/shared-ui/eds-gitlab-contributors/eds-gitlab-contributors.css +19 -0
- package/dist/collection/shared-ui/eds-gitlab-contributors/eds-gitlab-contributors.js +34 -31
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.css +166 -0
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.js +69 -7
- package/dist/collection/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.css +205 -0
- package/dist/collection/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.js +253 -0
- package/dist/collection/shared-ui/eds-kg-web-services-select/eds-kg-web-services-select.js +2 -2
- package/dist/collection/shared-ui/eds-kg-web-services-select/eds-kg-web-services-select.stories.js +1 -3
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.css +23 -102
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.js +7 -1
- package/dist/collection/shared-ui/eds-matomo-notice/eds-matomo-notice.stories.js +1 -1
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.css +213 -0
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.js +706 -0
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.stories.js +90 -0
- package/dist/collection/shared-ui/eds-trl-badge/ebrains-mark.js +26 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.css +22 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.js +324 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.stories.js +99 -0
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/collection/utils/eds-form/formValidators.js +2 -1
- package/dist/collection/utils/eds-form/safeFormat.js +35 -0
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +12 -11
- package/dist/components/components.esm.js +1 -1
- package/dist/components/correct-use-of-colors.js +1 -1
- package/dist/components/docs-palettes.js +1 -1
- package/dist/components/docs-tokens.js +1 -1
- package/dist/components/eds-accordion2.js +3 -6
- package/dist/components/eds-alert2.js +3 -2
- package/dist/components/eds-app-root.js +1 -1
- package/dist/components/eds-avatar2.js +1 -1
- package/dist/components/eds-block-break2.js +1 -1
- package/dist/components/eds-breadcrumb.js +1 -1
- package/dist/components/eds-button2.js +16 -13
- package/dist/components/eds-card-app.js +2 -5
- package/dist/components/eds-card-cta.js +3 -6
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-feature.js +2 -5
- package/dist/components/eds-card-generic2.js +2 -4
- package/dist/components/eds-card-hero.js +6 -7
- package/dist/components/eds-card-stat.js +6 -7
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-code-block2.js +2 -2
- package/dist/components/eds-cookies-preference.js +1 -1
- package/dist/components/eds-dropdown2.js +30 -4
- package/dist/components/eds-feedback.js +1 -1
- package/dist/components/eds-footer2.js +118 -24
- package/dist/components/eds-form.js +146 -45
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gauge.js +1 -1
- package/dist/components/eds-gitlab-contributors.js +35 -32
- package/dist/components/eds-global-search.js +55 -70
- package/dist/components/eds-header.js +1 -1
- package/dist/components/eds-icon-bluesky.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-mastodon.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-wrapper2.js +5 -2
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-dropzone2.js +7 -4
- package/dist/components/eds-input-field2.js +31 -26
- package/dist/components/eds-input-file2.js +5 -3
- package/dist/components/eds-input-footer2.js +39 -3
- package/dist/components/eds-input-label2.js +2 -2
- package/dist/components/eds-input-range2.js +15 -5
- package/dist/components/eds-input-search.js +100 -1
- package/dist/components/eds-input-select2.js +6 -2
- package/dist/components/eds-input2.js +4 -2
- package/dist/components/eds-kg-learning-resources.d.ts +11 -0
- package/dist/components/eds-kg-learning-resources.js +217 -0
- package/dist/components/eds-kg-web-services-select2.js +18 -24
- package/dist/components/eds-link2.js +3 -7
- package/dist/components/eds-logo2.js +4 -22
- package/dist/components/eds-matomo-notice2.js +8 -2
- package/dist/components/eds-modal.js +18 -9
- package/dist/components/eds-nps2.js +4 -4
- package/dist/components/eds-pagination2.js +2 -2
- package/dist/components/eds-pie.js +2 -2
- package/dist/components/eds-progress-bar.js +1 -8
- package/dist/components/eds-rating2.js +3 -3
- package/dist/components/eds-search-select.d.ts +11 -0
- package/dist/components/eds-search-select.js +6 -0
- package/dist/components/eds-search-select2.js +382 -0
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.js +2 -2
- package/dist/components/eds-sidebar.js +2 -2
- package/dist/components/eds-social-networks2.js +1 -1
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +41 -11
- package/dist/components/eds-steps2.js +28 -8
- package/dist/components/eds-switch2.js +8 -5
- package/dist/components/eds-table2.js +30 -54
- package/dist/components/eds-tabs.js +50 -19
- package/dist/components/eds-tag2.js +1 -1
- package/dist/components/eds-timeline.js +1 -1
- package/dist/components/eds-toast-manager.js +1 -1
- package/dist/components/eds-toast2.js +39 -3
- package/dist/components/eds-tooltip2.js +1 -1
- package/dist/components/eds-trl-badge.d.ts +11 -0
- package/dist/components/eds-trl-badge.js +207 -0
- package/dist/components/eds-user.js +1 -4
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +76 -25
- package/dist/components/logo-variations-horizontal2.js +1 -1
- package/dist/components/logo-variations-tabs.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-05e96609.entry.js +1 -0
- package/dist/components/p-0d778d10.entry.js +1 -0
- package/dist/components/{p-d2576747.entry.js → p-114f6d54.entry.js} +1 -1
- package/dist/components/p-1534204d.entry.js +1 -0
- package/dist/components/p-337d4ee3.entry.js +9 -0
- package/dist/components/p-340bc935.entry.js +1 -0
- package/dist/components/{p-a6dc1f88.entry.js → p-37ef07d9.entry.js} +1 -1
- package/dist/components/p-39dbb964.entry.js +1 -0
- package/dist/components/{p-dfe93385.entry.js → p-3f66bc26.entry.js} +1 -1
- package/dist/components/p-43f9e64f.entry.js +1 -0
- package/dist/components/p-46cc6c1a.entry.js +1 -0
- package/dist/components/{p-773bd015.entry.js → p-4b8a7979.entry.js} +1 -1
- package/dist/components/p-6b94b2ec.entry.js +1 -0
- package/dist/components/p-6d965fef.entry.js +1 -0
- package/dist/components/{p-d16b5363.entry.js → p-6e370182.entry.js} +1 -1
- package/dist/components/{p-7b93a385.entry.js → p-6ffe581c.entry.js} +1 -1
- package/dist/components/p-726637b1.entry.js +1 -0
- package/dist/components/{p-a63e14bb.entry.js → p-86ccc09f.entry.js} +1 -1
- package/dist/components/{p-c2fc62f7.entry.js → p-8755a21b.entry.js} +1 -1
- package/dist/components/{p-0d7aee0b.entry.js → p-8ab461e2.entry.js} +1 -1
- package/dist/components/p-8cb162b8.entry.js +1 -0
- package/dist/components/p-8cdbc280.entry.js +1 -0
- package/dist/components/{p-940a2d42.entry.js → p-8e034c4e.entry.js} +1 -1
- package/dist/components/p-9f649fa3.entry.js +1 -0
- package/dist/components/{p-d1b3aa52.entry.js → p-a26dad9b.entry.js} +1 -1
- package/dist/components/p-a2d6a9ca.entry.js +1 -0
- package/dist/components/p-afabe1be.entry.js +1 -0
- package/dist/components/{p-c46675c8.entry.js → p-b1519098.entry.js} +1 -1
- package/dist/components/{p-04e9c2d7.entry.js → p-b1a10842.entry.js} +1 -1
- package/dist/components/{p-7aa4edef.entry.js → p-b4023b45.entry.js} +1 -1
- package/dist/components/p-c53b3563.entry.js +1 -0
- package/dist/components/p-c7d612d1.entry.js +1 -0
- package/dist/components/p-dc9aef22.entry.js +1 -0
- package/dist/components/{p-f364296f.entry.js → p-f66a7cf9.entry.js} +1 -1
- package/dist/components/p-f97f62f2.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/svg-repository.js +19 -25
- 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 +8 -2
- package/dist/esm/color-primary-palette_6.entry.js +14 -14
- package/dist/esm/components-section.entry.js +1 -1
- package/dist/esm/components.js +1 -1
- package/dist/esm/correct-use-of-colors.entry.js +1 -1
- package/dist/esm/docs-palettes.entry.js +1 -1
- package/dist/esm/docs-tokens.entry.js +1 -1
- package/dist/esm/{eds-accordion_52.entry.js → eds-accordion_53.entry.js} +1094 -336
- package/dist/esm/eds-app-root.entry.js +1 -1
- package/dist/esm/eds-cookies-preference.entry.js +1 -1
- package/dist/esm/eds-feedback.entry.js +1 -1
- package/dist/esm/eds-frame.entry.js +1 -1
- package/dist/esm/eds-gauge.entry.js +1 -1
- package/dist/esm/eds-gitlab-contributors.entry.js +35 -32
- package/dist/esm/eds-icon-bluesky.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-mastodon.entry.js +1 -1
- package/dist/esm/eds-icon-twitter.entry.js +1 -1
- package/dist/esm/eds-icon-youtube.entry.js +1 -1
- package/dist/{components/eds-input-search2.js → esm/eds-input-search.entry.js} +9 -39
- package/dist/esm/eds-modal.entry.js +18 -9
- package/dist/esm/eds-pie.entry.js +2 -2
- package/dist/esm/eds-section-core_2.entry.js +3 -3
- package/dist/esm/eds-timeline.entry.js +1 -1
- package/dist/esm/eds-toast-manager.entry.js +1 -1
- package/dist/esm/eds-trl-badge.entry.js +180 -0
- package/dist/esm/incorrect-use-of-colors.entry.js +1 -1
- package/dist/esm/index-870ab08f.js +10 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/logo-space.entry.js +58 -1
- package/dist/esm/logo-variations-horizontal_2.entry.js +2 -2
- package/dist/esm/logo-variations-tabs.entry.js +1 -1
- package/dist/esm/logo-wrong-usage.entry.js +1 -1
- package/dist/esm/svg-repository.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 +8 -2
- package/dist/hydrate/index.js +1616 -397
- package/dist/hydrate/index.mjs +1616 -397
- package/dist/types/components/eds-accordion/eds-accordion.stories.d.ts +4 -8
- package/dist/types/components/eds-alert/eds-alert.stories.d.ts +7 -73
- package/dist/types/components/eds-button/eds-button.d.ts +1 -1
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +1 -0
- package/dist/types/components/eds-footer/eds-footer.d.ts +84 -55
- package/dist/types/components/eds-footer/eds-footer.stories.d.ts +62 -1
- package/dist/types/components/eds-form/eds-form.d.ts +66 -0
- package/dist/types/components/eds-form/eds-form.stories.d.ts +63 -0
- package/dist/types/components/eds-header/eds-header.stories.d.ts +6 -6
- package/dist/types/components/eds-icon-wrapper/eds-icon-wrapper.d.ts +8 -0
- package/dist/types/components/eds-img/eds-img.stories.d.ts +6 -20
- package/dist/types/components/eds-input-elements/eds-input/eds-input.d.ts +7 -0
- package/dist/types/components/eds-input-elements/eds-input-search/eds-input-search.stories.d.ts +36 -0
- package/dist/types/components/eds-input-field/eds-input-field.stories.d.ts +97 -38
- package/dist/types/components/eds-link/eds-link.stories.d.ts +9 -6
- package/dist/types/components/eds-logo/eds-logo.d.ts +11 -28
- package/dist/types/components/eds-logo/eds-logo.stories.d.ts +22 -2
- package/dist/types/components/eds-steps/eds-steps.d.ts +7 -0
- package/dist/types/components/eds-steps-v2/eds-steps-v2.d.ts +14 -1
- package/dist/types/components/eds-steps-v2/eds-steps-v2.stories.d.ts +40 -9
- package/dist/types/components/eds-switch/eds-switch.d.ts +6 -2
- package/dist/types/components/eds-switch/eds-switch.stories.d.ts +8 -0
- package/dist/types/components/eds-table/eds-table.d.ts +8 -14
- package/dist/types/components/eds-table/eds-table.stories.d.ts +0 -107
- package/dist/types/components/eds-tabs/eds-tabs.d.ts +10 -0
- package/dist/types/components/eds-toast/eds-toast.d.ts +33 -1
- package/dist/types/components/eds-toast/eds-toast.stories.d.ts +49 -1
- package/dist/types/components/eds-user/eds-user.d.ts +0 -2
- package/dist/types/components/eds-user/eds-user.stories.d.ts +5 -9
- package/dist/types/components.d.ts +715 -144
- package/dist/types/shared-ui/eds-global-search/eds-global-search.d.ts +12 -0
- package/dist/types/shared-ui/eds-kg-learning-resources/eds-kg-learning-resources.d.ts +60 -0
- package/dist/types/shared-ui/eds-search-select/eds-search-select.d.ts +98 -0
- package/dist/types/shared-ui/eds-search-select/eds-search-select.stories.d.ts +81 -0
- package/dist/types/shared-ui/eds-trl-badge/ebrains-mark.d.ts +7 -0
- package/dist/types/shared-ui/eds-trl-badge/eds-trl-badge.d.ts +54 -0
- package/dist/types/shared-ui/eds-trl-badge/eds-trl-badge.stories.d.ts +112 -0
- package/dist/types/utils/eds-form/safeFormat.d.ts +21 -0
- package/package.json +1 -1
- package/dist/components/p-0fe10e6c.entry.js +0 -1
- package/dist/components/p-18e852e1.entry.js +0 -1
- package/dist/components/p-3ccd6948.entry.js +0 -1
- package/dist/components/p-3d3841d6.entry.js +0 -1
- package/dist/components/p-3f38df99.entry.js +0 -1
- package/dist/components/p-527e71d0.entry.js +0 -1
- package/dist/components/p-55047f7f.entry.js +0 -9
- package/dist/components/p-64c23098.entry.js +0 -1
- package/dist/components/p-74b9c9a8.entry.js +0 -1
- package/dist/components/p-878f65a6.entry.js +0 -1
- package/dist/components/p-92f6d9c0.entry.js +0 -1
- package/dist/components/p-9eedf771.entry.js +0 -1
- package/dist/components/p-b4355cec.entry.js +0 -1
- package/dist/components/p-d2f17fac.entry.js +0 -1
- package/dist/components/p-db5eea95.entry.js +0 -1
- package/dist/components/p-e205c269.entry.js +0 -1
- package/dist/components/p-f55dd314.entry.js +0 -1
- package/dist/components/p-f88b5f21.entry.js +0 -1
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$4 } from './eds-icon-wrapper2.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './eds-input-footer2.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './eds-input-label2.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './eds-link2.js';
|
|
6
|
+
|
|
7
|
+
const edsSearchSelectCss = ":host{display:block;width:100%;font-family:var(--f-ui-02-fontFamily, 'IBM Plex Sans', system-ui, sans-serif)}.eds-ss{position:relative;display:block;width:100%}.eds-ss__labelrow{display:flex;justify-content:space-between;margin-bottom:0.25rem}.eds-ss__hint{margin-top:0.5rem;margin-left:0.5rem;font-family:var(--f-ui-05-fontFamily);font-weight:var(--f-ui-05-fontWeight);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);letter-spacing:var(--f-ui-05-letterSpacing);color:var(--grey-600)}.eds-ss__control{position:relative}.eds-ss__box{display:flex;flex-wrap:wrap;align-items:center;gap:0.35rem;width:100%;box-sizing:border-box;min-height:2.5rem;padding:6px 0.75rem;padding-right:3.75rem;border-width:2px;border-style:solid;border-color:rgba(0, 0, 0, 0.1);border-radius:8px;background:var(--white, #fff);transition-property:color, background-color, border-color;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-duration:300ms}.eds-ss__box:hover{border-color:var(--brand-black)}.eds-ss__box:focus-within{border-color:var(--brand-black);outline:3px solid var(--brand-green);outline-offset:2px}.eds-ss__box.is-error{border-color:var(--red-700)}.eds-ss__box.is-disabled{cursor:not-allowed;background-color:var(--grey-300)}.eds-ss__input{flex:1;min-width:6rem;border:none;outline:none;background:transparent;padding:4px 0;color:var(--brand-black);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)}.eds-ss__input::placeholder{color:var(--grey-500);opacity:1}.eds-ss__input:disabled{cursor:not-allowed;color:var(--grey-500)}.eds-ss__chip{display:inline-flex;align-items:center;gap:0.35rem;padding:4px 0.4rem 4px 0.7rem;background:rgba(0, 200, 123, 0.12);color:var(--brand-green-dark, #00A867);border-radius:6px;font-family:var(--f-ui-02-fontFamily);font-size:var(--f-ui-02-fontSize);font-weight:600;line-height:1.4;max-width:100%}.eds-ss__chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eds-ss__chip-x{flex-shrink:0;border:none;background:none;cursor:pointer;color:var(--brand-green-dark, #00A867);font-size:1.2rem;line-height:1;padding:0 2px}.eds-ss__chip-x:hover{color:var(--brand-black, #07140D)}.eds-ss__clear,.eds-ss__chevron{position:absolute;top:50%;transform:translateY(-50%)}.eds-ss__chevron{right:6px;width:1.75rem;height:1.75rem;display:flex;align-items:center;justify-content:center;background-color:var(--grey-300);border-radius:4px;color:var(--brand-black);pointer-events:none}.eds-ss__clear{right:2.6rem;color:var(--grey-600, #6e6e6e);background:none;border:none;cursor:pointer;font-size:1.05rem;line-height:1}.eds-ss__clear:hover{color:var(--brand-black, #07140D)}.eds-ss__list{position:absolute;z-index:50;left:0;right:0;margin:0.25rem 0 0;padding:0.25rem;list-style:none;max-height:18rem;overflow-y:auto;background:var(--white, #fff);border:2px solid rgba(0, 0, 0, 0.1);border-radius:8px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12)}.eds-ss__option{padding:0.5rem 0.6rem;border-radius:6px;cursor:pointer;color:var(--brand-black, #07140D);font-family:var(--f-ui-02-fontFamily);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.eds-ss__option.is-active{background:rgba(0, 200, 123, 0.1)}.eds-ss__option.is-selected{font-weight:600;color:var(--brand-green-dark, #00A867)}.eds-ss__status,.eds-ss__more{padding:0.5rem 0.6rem;font-family:var(--f-ui-05-fontFamily);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);color:var(--grey-600, #6e6e6e)}.eds-ss__status.is-error{color:var(--red-700, #d64545)}.eds-ss__more{border-top:1px solid rgba(0, 0, 0, 0.1);margin-top:0.25rem;font-style:italic}.mt-6{margin-top:0.375rem}";
|
|
8
|
+
const EdsSearchSelectStyle0 = edsSearchSelectCss;
|
|
9
|
+
|
|
10
|
+
const EdsSearchSelect = /*@__PURE__*/ proxyCustomElement(class EdsSearchSelect extends HTMLElement {
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
this.__registerHost();
|
|
14
|
+
this.__attachShadow();
|
|
15
|
+
this.edsinput = createEvent(this, "edsinput", 7);
|
|
16
|
+
this.edschange = createEvent(this, "edschange", 7);
|
|
17
|
+
this.debounceTimer = null;
|
|
18
|
+
this.inlineOptions = [];
|
|
19
|
+
this.listboxId = `eds-ss-list-${Math.round(performance.now())}`;
|
|
20
|
+
// value -> label, so selected tags render readable labels even for remote
|
|
21
|
+
// values whose label hasn't been fetched in the current page.
|
|
22
|
+
this.labelCache = {};
|
|
23
|
+
this.onInput = (e) => {
|
|
24
|
+
this.query = e.target.value;
|
|
25
|
+
this.open = true;
|
|
26
|
+
this.activeIndex = -1;
|
|
27
|
+
this.runSearch(this.query);
|
|
28
|
+
};
|
|
29
|
+
this.clear = () => {
|
|
30
|
+
if (this.multiple) {
|
|
31
|
+
this.value = [];
|
|
32
|
+
this.emitValue([]);
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
this.value = undefined;
|
|
36
|
+
this.selectedLabel = '';
|
|
37
|
+
this.emitValue('');
|
|
38
|
+
}
|
|
39
|
+
this.query = '';
|
|
40
|
+
};
|
|
41
|
+
this.onKeyDown = (e) => {
|
|
42
|
+
if (e.key === 'ArrowDown') {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
if (!this.open) {
|
|
45
|
+
return this.openMenu();
|
|
46
|
+
}
|
|
47
|
+
this.activeIndex = Math.min(this.activeIndex + 1, this.visibleItems.length - 1);
|
|
48
|
+
}
|
|
49
|
+
else if (e.key === 'ArrowUp') {
|
|
50
|
+
e.preventDefault();
|
|
51
|
+
this.activeIndex = Math.max(this.activeIndex - 1, 0);
|
|
52
|
+
}
|
|
53
|
+
else if (e.key === 'Enter') {
|
|
54
|
+
if (this.open && this.activeIndex >= 0) {
|
|
55
|
+
e.preventDefault();
|
|
56
|
+
this.select(this.visibleItems[this.activeIndex]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
else if (e.key === 'Escape') {
|
|
60
|
+
this.closeMenu();
|
|
61
|
+
}
|
|
62
|
+
else if (e.key === 'Backspace' && this.multiple && !this.query && this.selectedValues.length) {
|
|
63
|
+
// Backspace on an empty query removes the last selected tag.
|
|
64
|
+
this.removeValue(this.selectedValues[this.selectedValues.length - 1]);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
// Close when a click lands outside the component. Must be shadow-aware:
|
|
68
|
+
// this component is nested inside eds-form's shadow root, so a document-level
|
|
69
|
+
// listener sees the event retargeted to the OUTER host — `host.contains(target)`
|
|
70
|
+
// would be false even for our own clicks and wrongly close on open. composedPath()
|
|
71
|
+
// walks through every shadow boundary and contains our host iff the click was ours.
|
|
72
|
+
this.onDocumentClick = (e) => {
|
|
73
|
+
if (this.open && !e.composedPath().includes(this.host)) {
|
|
74
|
+
this.closeMenu();
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
this.name = undefined;
|
|
78
|
+
this.label = undefined;
|
|
79
|
+
this.placeholder = 'Search…';
|
|
80
|
+
this.required = false;
|
|
81
|
+
this.disabled = false;
|
|
82
|
+
this.hint = undefined;
|
|
83
|
+
this.message = undefined;
|
|
84
|
+
this.error = false;
|
|
85
|
+
this.errorMessage = undefined;
|
|
86
|
+
this.value = undefined;
|
|
87
|
+
this.multiple = false;
|
|
88
|
+
this.options = undefined;
|
|
89
|
+
this.source = undefined;
|
|
90
|
+
this.apiBase = '/api/v1';
|
|
91
|
+
this.searchParam = 'q';
|
|
92
|
+
this.limit = 50;
|
|
93
|
+
this.debounceMs = 250;
|
|
94
|
+
this.maxVisible = 100;
|
|
95
|
+
this.open = false;
|
|
96
|
+
this.query = '';
|
|
97
|
+
this.loading = false;
|
|
98
|
+
this.fetchError = '';
|
|
99
|
+
this.items = [];
|
|
100
|
+
this.total = 0;
|
|
101
|
+
this.activeIndex = -1;
|
|
102
|
+
this.selectedLabel = '';
|
|
103
|
+
}
|
|
104
|
+
componentWillLoad() {
|
|
105
|
+
this.parseInlineOptions();
|
|
106
|
+
this.resolveSelectedLabel();
|
|
107
|
+
}
|
|
108
|
+
onOptionsChange() {
|
|
109
|
+
this.parseInlineOptions();
|
|
110
|
+
this.resolveSelectedLabel();
|
|
111
|
+
}
|
|
112
|
+
onValueChange() {
|
|
113
|
+
this.resolveSelectedLabel();
|
|
114
|
+
}
|
|
115
|
+
parseInlineOptions() {
|
|
116
|
+
if (!this.options) {
|
|
117
|
+
this.inlineOptions = [];
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (typeof this.options === 'string') {
|
|
121
|
+
try {
|
|
122
|
+
this.inlineOptions = JSON.parse(this.options) || [];
|
|
123
|
+
}
|
|
124
|
+
catch (_a) {
|
|
125
|
+
this.inlineOptions = [];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
this.inlineOptions = this.options;
|
|
130
|
+
}
|
|
131
|
+
this.cacheLabels(this.inlineOptions);
|
|
132
|
+
}
|
|
133
|
+
cacheLabels(opts) {
|
|
134
|
+
(opts || []).forEach((o) => {
|
|
135
|
+
if (o && o.value != null) {
|
|
136
|
+
this.labelCache[String(o.value)] = o.label;
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/** The current selection as a value array (works for single + multi). */
|
|
141
|
+
get selectedValues() {
|
|
142
|
+
const v = this.value;
|
|
143
|
+
if (Array.isArray(v)) {
|
|
144
|
+
return v.map(String).filter((s) => s !== '');
|
|
145
|
+
}
|
|
146
|
+
if (typeof v === 'string' && v !== '') {
|
|
147
|
+
return this.multiple ? v.split(',').filter(Boolean) : [v];
|
|
148
|
+
}
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
labelFor(val) {
|
|
152
|
+
var _a, _b;
|
|
153
|
+
return (this.labelCache[String(val)] ||
|
|
154
|
+
((_a = this.inlineOptions.find((o) => String(o.value) === String(val))) === null || _a === void 0 ? void 0 : _a.label) ||
|
|
155
|
+
((_b = this.items.find((o) => String(o.value) === String(val))) === null || _b === void 0 ? void 0 : _b.label) ||
|
|
156
|
+
String(val));
|
|
157
|
+
}
|
|
158
|
+
emitValue(v) {
|
|
159
|
+
this.edsinput.emit({ value: v });
|
|
160
|
+
this.edschange.emit({ value: v });
|
|
161
|
+
}
|
|
162
|
+
get isRemote() {
|
|
163
|
+
return !!this.source && this.inlineOptions.length === 0;
|
|
164
|
+
}
|
|
165
|
+
resolveSelectedLabel() {
|
|
166
|
+
if (!this.value) {
|
|
167
|
+
this.selectedLabel = '';
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
// Inline: resolve label from the known list. Remote: best-effort — show the
|
|
171
|
+
// value until/unless it appears in a fetched page.
|
|
172
|
+
const pool = this.inlineOptions.length ? this.inlineOptions : this.items;
|
|
173
|
+
const found = pool.find((o) => String(o.value) === String(this.value));
|
|
174
|
+
this.selectedLabel = found ? found.label : String(this.value);
|
|
175
|
+
}
|
|
176
|
+
// --- Data --------------------------------------------------------------
|
|
177
|
+
filterInline(q) {
|
|
178
|
+
const needle = q.trim().toLowerCase();
|
|
179
|
+
if (!needle) {
|
|
180
|
+
return this.inlineOptions;
|
|
181
|
+
}
|
|
182
|
+
return this.inlineOptions.filter((o) => o.label.toLowerCase().includes(needle) || String(o.value).toLowerCase().includes(needle));
|
|
183
|
+
}
|
|
184
|
+
async fetchRemote(q) {
|
|
185
|
+
this.loading = true;
|
|
186
|
+
this.fetchError = '';
|
|
187
|
+
try {
|
|
188
|
+
const params = new URLSearchParams({ [this.searchParam]: q, limit: String(this.limit) });
|
|
189
|
+
const url = `${this.apiBase}/datasets/${encodeURIComponent(this.source)}/search?${params}`;
|
|
190
|
+
const resp = await fetch(url);
|
|
191
|
+
if (!resp.ok) {
|
|
192
|
+
throw new Error(`Search failed: ${resp.statusText}`);
|
|
193
|
+
}
|
|
194
|
+
const data = await resp.json();
|
|
195
|
+
this.items = data.items || [];
|
|
196
|
+
this.cacheLabels(this.items);
|
|
197
|
+
this.total = typeof data.total === 'number' ? data.total : this.items.length;
|
|
198
|
+
this.resolveSelectedLabel();
|
|
199
|
+
}
|
|
200
|
+
catch (e) {
|
|
201
|
+
this.fetchError = e instanceof Error ? e.message : 'Search failed';
|
|
202
|
+
this.items = [];
|
|
203
|
+
this.total = 0;
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
this.loading = false;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
runSearch(q, immediate = false) {
|
|
210
|
+
if (this.isRemote) {
|
|
211
|
+
// Show the loading state synchronously so the debounce window renders
|
|
212
|
+
// "Searching…" rather than a misleading "No matches" before the fetch.
|
|
213
|
+
this.loading = true;
|
|
214
|
+
clearTimeout(this.debounceTimer);
|
|
215
|
+
if (immediate) {
|
|
216
|
+
this.fetchRemote(q);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
this.debounceTimer = setTimeout(() => this.fetchRemote(q), this.debounceMs);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
this.items = this.filterInline(q);
|
|
224
|
+
this.total = this.items.length;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
// --- The capped, render-ready slice ------------------------------------
|
|
228
|
+
get visibleItems() {
|
|
229
|
+
return this.items.slice(0, this.maxVisible);
|
|
230
|
+
}
|
|
231
|
+
get hiddenCount() {
|
|
232
|
+
return Math.max(0, this.total - this.visibleItems.length);
|
|
233
|
+
}
|
|
234
|
+
// --- Interaction -------------------------------------------------------
|
|
235
|
+
openMenu() {
|
|
236
|
+
if (this.disabled) {
|
|
237
|
+
return;
|
|
238
|
+
}
|
|
239
|
+
this.open = true;
|
|
240
|
+
this.activeIndex = -1;
|
|
241
|
+
// Populate on first open (initial page for remote, full list for inline).
|
|
242
|
+
// Immediate fetch on open — debounce only applies to typing.
|
|
243
|
+
if (!this.items.length || this.isRemote) {
|
|
244
|
+
this.runSearch(this.query, true);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
closeMenu() {
|
|
248
|
+
this.open = false;
|
|
249
|
+
this.activeIndex = -1;
|
|
250
|
+
}
|
|
251
|
+
select(opt) {
|
|
252
|
+
this.labelCache[String(opt.value)] = opt.label;
|
|
253
|
+
if (this.multiple) {
|
|
254
|
+
const current = this.selectedValues;
|
|
255
|
+
const key = String(opt.value);
|
|
256
|
+
const next = current.includes(key)
|
|
257
|
+
? current.filter((v) => v !== key) // toggle off if already chosen
|
|
258
|
+
: [...current, key];
|
|
259
|
+
this.value = next;
|
|
260
|
+
this.query = '';
|
|
261
|
+
this.emitValue(next);
|
|
262
|
+
// Keep the menu open so more can be picked; reset the list to all results.
|
|
263
|
+
this.runSearch('', true);
|
|
264
|
+
return;
|
|
265
|
+
}
|
|
266
|
+
this.value = opt.value;
|
|
267
|
+
this.selectedLabel = opt.label;
|
|
268
|
+
this.query = '';
|
|
269
|
+
this.closeMenu();
|
|
270
|
+
this.emitValue(opt.value);
|
|
271
|
+
}
|
|
272
|
+
removeValue(val, e) {
|
|
273
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
274
|
+
const next = this.selectedValues.filter((v) => v !== String(val));
|
|
275
|
+
this.value = next;
|
|
276
|
+
this.emitValue(next);
|
|
277
|
+
}
|
|
278
|
+
connectedCallback() {
|
|
279
|
+
document.addEventListener('click', this.onDocumentClick, true);
|
|
280
|
+
}
|
|
281
|
+
disconnectedCallback() {
|
|
282
|
+
document.removeEventListener('click', this.onDocumentClick, true);
|
|
283
|
+
clearTimeout(this.debounceTimer);
|
|
284
|
+
}
|
|
285
|
+
render() {
|
|
286
|
+
const selected = this.selectedValues;
|
|
287
|
+
const hasSelection = selected.length > 0;
|
|
288
|
+
const inputValue = this.multiple ? this.query : this.open ? this.query : this.selectedLabel;
|
|
289
|
+
const placeholder = this.multiple
|
|
290
|
+
? hasSelection
|
|
291
|
+
? ''
|
|
292
|
+
: this.placeholder
|
|
293
|
+
: hasSelection && !this.open
|
|
294
|
+
? this.selectedLabel
|
|
295
|
+
: this.placeholder;
|
|
296
|
+
return (h("div", { key: 'c07301b4d8b6dceeea092423faeefdb51df5882a', class: "eds-ss" }, (this.label || this.hint) && (h("div", { key: '852ddc433b142caed852c7503d68aab968808480', class: "eds-ss__labelrow" }, this.label && (h("eds-input-label", { key: 'd44b4925954172a7ad5dec8e71b363630fc8cd3b', name: `${this.name}-input`, label: this.label, required: this.required, disabled: this.disabled })), this.hint && (h("p", { key: '964933f90c1526383364fa4a76b6b31846a6e3e0', id: `${this.name}-hint`, class: "eds-ss__hint" }, this.hint)))), h("div", { key: '69b226ececf5431ce220f5686e01f18aba100b8d', class: "eds-ss__control relative" }, h("div", { key: '942ba3e7020e2a9ae1eb4176b1d7b7444368baa3', class: { 'eds-ss__box': true, 'is-error': this.error || !!this.fetchError, 'is-disabled': this.disabled } }, this.multiple &&
|
|
297
|
+
selected.map((v) => (h("span", { class: "eds-ss__chip", key: v }, h("span", { class: "eds-ss__chip-label" }, this.labelFor(v)), !this.disabled && (h("button", { type: "button", class: "eds-ss__chip-x", "aria-label": `Remove ${this.labelFor(v)}`, onMouseDown: (e) => {
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
this.removeValue(v, e);
|
|
300
|
+
} }, "\u00D7"))))), h("input", { key: 'c41ce7b8e648f0c9e688ae94b0a1a25945ad8715', id: `${this.name}-input`, class: "eds-ss__input", type: "text", role: "combobox", autocomplete: "off", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": this.listboxId, "aria-autocomplete": "list", placeholder: placeholder, value: inputValue, disabled: this.disabled, required: this.required && !hasSelection, onFocus: () => this.openMenu(), onInput: this.onInput, onKeyDown: this.onKeyDown })), !this.multiple && hasSelection && !this.disabled && (h("button", { key: '331e43093fc5749fc369bf976119610b2a310576', type: "button", class: "eds-ss__clear", "aria-label": "Clear selection", onClick: this.clear }, "\u00D7")), h("span", { key: '11b78efe2584e65cb533fb88746ad38da47f2b8d', class: "eds-ss__chevron", "aria-hidden": "true" }, h("eds-icon-wrapper", { key: 'ca62bbe9b3f90b1625208584a6b9e5a154acc5be', name: "chevron-right", size: 20 }))), this.open && (h("ul", { key: 'f4739dc147217d1d575494d0bdd83427f898ddc3', class: "eds-ss__list", id: this.listboxId, role: "listbox" }, this.loading && h("li", { key: 'def95414349449021ec318cae0e3990621992e3e', class: "eds-ss__status" }, "Searching\u2026"), !this.loading && this.fetchError && h("li", { key: '32d940c717170d0e53200ff552bf513e3e6e5fe1', class: "eds-ss__status is-error" }, this.fetchError), !this.loading && !this.fetchError && this.visibleItems.length === 0 && (h("li", { key: 'bea6ededb51b4baab76eca8a237d4a740d3478da', class: "eds-ss__status" }, "No matches")), !this.loading &&
|
|
301
|
+
!this.fetchError &&
|
|
302
|
+
this.visibleItems.map((opt, i) => (h("li", { key: opt.value, class: {
|
|
303
|
+
'eds-ss__option': true,
|
|
304
|
+
'is-active': i === this.activeIndex,
|
|
305
|
+
'is-selected': selected.includes(String(opt.value))
|
|
306
|
+
}, role: "option", "aria-selected": selected.includes(String(opt.value)) ? 'true' : 'false', onMouseEnter: () => (this.activeIndex = i), onMouseDown: (e) => {
|
|
307
|
+
e.preventDefault();
|
|
308
|
+
this.select(opt);
|
|
309
|
+
} }, opt.label))), !this.loading && !this.fetchError && this.hiddenCount > 0 && (h("li", { key: '8d6fe6aa8041a948a19004a03728b1439469e28e', class: "eds-ss__more" }, "+", this.hiddenCount, " more \u2014 keep typing to narrow")))), h("div", { key: 'dfb6a12b7eff98bd05b674d385db1dc2e6a17ac2', class: "mt-6" }, h("eds-input-footer", { key: '2f0b9dbc247dea65d3c7abea1a6384b496e586b8', name: this.name, message: this.message, error: this.error, "error-message": this.errorMessage }))));
|
|
310
|
+
}
|
|
311
|
+
get host() { return this; }
|
|
312
|
+
static get watchers() { return {
|
|
313
|
+
"options": ["onOptionsChange"],
|
|
314
|
+
"value": ["onValueChange"]
|
|
315
|
+
}; }
|
|
316
|
+
static get style() { return EdsSearchSelectStyle0; }
|
|
317
|
+
}, [1, "eds-search-select", {
|
|
318
|
+
"name": [1],
|
|
319
|
+
"label": [1],
|
|
320
|
+
"placeholder": [1],
|
|
321
|
+
"required": [4],
|
|
322
|
+
"disabled": [4],
|
|
323
|
+
"hint": [1],
|
|
324
|
+
"message": [1],
|
|
325
|
+
"error": [4],
|
|
326
|
+
"errorMessage": [1, "error-message"],
|
|
327
|
+
"value": [1025],
|
|
328
|
+
"multiple": [4],
|
|
329
|
+
"options": [1],
|
|
330
|
+
"source": [1],
|
|
331
|
+
"apiBase": [1, "api-base"],
|
|
332
|
+
"searchParam": [1, "search-param"],
|
|
333
|
+
"limit": [2],
|
|
334
|
+
"debounceMs": [2, "debounce-ms"],
|
|
335
|
+
"maxVisible": [2, "max-visible"],
|
|
336
|
+
"open": [32],
|
|
337
|
+
"query": [32],
|
|
338
|
+
"loading": [32],
|
|
339
|
+
"fetchError": [32],
|
|
340
|
+
"items": [32],
|
|
341
|
+
"total": [32],
|
|
342
|
+
"activeIndex": [32],
|
|
343
|
+
"selectedLabel": [32]
|
|
344
|
+
}, undefined, {
|
|
345
|
+
"options": ["onOptionsChange"],
|
|
346
|
+
"value": ["onValueChange"]
|
|
347
|
+
}]);
|
|
348
|
+
function defineCustomElement() {
|
|
349
|
+
if (typeof customElements === "undefined") {
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
const components = ["eds-search-select", "eds-icon-wrapper", "eds-input-footer", "eds-input-label", "eds-link"];
|
|
353
|
+
components.forEach(tagName => { switch (tagName) {
|
|
354
|
+
case "eds-search-select":
|
|
355
|
+
if (!customElements.get(tagName)) {
|
|
356
|
+
customElements.define(tagName, EdsSearchSelect);
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
case "eds-icon-wrapper":
|
|
360
|
+
if (!customElements.get(tagName)) {
|
|
361
|
+
defineCustomElement$4();
|
|
362
|
+
}
|
|
363
|
+
break;
|
|
364
|
+
case "eds-input-footer":
|
|
365
|
+
if (!customElements.get(tagName)) {
|
|
366
|
+
defineCustomElement$3();
|
|
367
|
+
}
|
|
368
|
+
break;
|
|
369
|
+
case "eds-input-label":
|
|
370
|
+
if (!customElements.get(tagName)) {
|
|
371
|
+
defineCustomElement$2();
|
|
372
|
+
}
|
|
373
|
+
break;
|
|
374
|
+
case "eds-link":
|
|
375
|
+
if (!customElements.get(tagName)) {
|
|
376
|
+
defineCustomElement$1();
|
|
377
|
+
}
|
|
378
|
+
break;
|
|
379
|
+
} });
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export { EdsSearchSelect as E, defineCustomElement as d };
|
|
@@ -15,7 +15,7 @@ const EdsSectionCore = /*@__PURE__*/ proxyCustomElement(class EdsSectionCore ext
|
|
|
15
15
|
}
|
|
16
16
|
render() {
|
|
17
17
|
const TagType = this.tag; // Set dynamic tag type (div or section)
|
|
18
|
-
return (h(TagType, { key: '
|
|
18
|
+
return (h(TagType, { key: 'cee3905fc5e268c768fbc58b413ee074591888b7' }, h("eds-section-heading", { key: '9ba05e76c5e348b1209283b7f95a475408758c3b', headingLevel: this.headingLevel, sectionTitle: this.sectionTitle }), h("slot", { key: '8e5d27261133cd900d13940ce928946b1c378277' })));
|
|
19
19
|
}
|
|
20
20
|
static get style() { return EdsSectionCoreStyle0; }
|
|
21
21
|
}, [1, "eds-section-core", {
|
|
@@ -26,12 +26,12 @@ const EdsSectionHeading = /*@__PURE__*/ proxyCustomElement(class EdsSectionHeadi
|
|
|
26
26
|
render() {
|
|
27
27
|
const TagType = this.tag; // Dynamically set tag type for the container
|
|
28
28
|
const HeadingTag = this.headingLevel; // Dynamically set heading level
|
|
29
|
-
return (h(TagType, { key: '
|
|
29
|
+
return (h(TagType, { key: '8791e5d816bfdc80087f3f7e5dbab60d0ac4a523', class: {
|
|
30
30
|
'ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8': true,
|
|
31
31
|
container: this.withContainer,
|
|
32
32
|
'pt-48': this.spacingLarge,
|
|
33
33
|
'pt-28': !this.spacingLarge
|
|
34
|
-
} }, h(HeadingTag, { key: '
|
|
34
|
+
} }, h(HeadingTag, { key: 'e2e7ca5effc12e6c9c8c3418c4097920ec80e53e', class: this.getHeadingClass() }, this.sectionTitle)));
|
|
35
35
|
}
|
|
36
36
|
}, [0, "eds-section-heading", {
|
|
37
37
|
"sectionTitle": [1, "section-title"],
|
|
@@ -155,10 +155,10 @@ const EdsSidebar$1 = /*@__PURE__*/ proxyCustomElement(class EdsSidebar extends H
|
|
|
155
155
|
} }, hasChildren && (h("span", { class: "sidebar-toggle -ml-4", "aria-hidden": "true" }, h("eds-icon-wrapper", { name: isOpen ? 'chevron-down' : 'chevron-right' }))), h("span", { class: "sidebar-link-wrapper" }, h("eds-link", { label: item.title, url: item.url || '#', intent: isActive ? 'strong' : 'weak', size: "small", "aria-label": item.title, "extra-class": "sidebar-link", tabindex: "-1" }))), hasChildren && isOpen && (h("ul", { id: childrenId, class: "sidebar-children" }, item.children.map((child) => this.renderItem(child, level + 1))))));
|
|
156
156
|
}
|
|
157
157
|
render() {
|
|
158
|
-
return (h(Host, { key: '
|
|
158
|
+
return (h(Host, { key: 'f5221c19e8148ca62a76fb470a4aa6786c3e41b5', class: {
|
|
159
159
|
'eds-sidebar': true,
|
|
160
160
|
[`theme-${this.theme}`]: true
|
|
161
|
-
} }, h("nav", { key: '
|
|
161
|
+
} }, h("nav", { key: '0a975a10a3892f6eabaf2a1c2be21963f0e76549', class: "sidebar-nav", "aria-label": "Sidebar" }, h("ul", { key: '498436fa1f4ec7ff2f3feea843fe58b415d20a3f', class: "sidebar-list" }, this.parsedItems.map((item) => this.renderItem(item, 0))))));
|
|
162
162
|
}
|
|
163
163
|
get el() { return this; }
|
|
164
164
|
static get watchers() { return {
|
|
@@ -60,7 +60,7 @@ const EdsSocialNetworks = /*@__PURE__*/ proxyCustomElement(class EdsSocialNetwor
|
|
|
60
60
|
const isInverse = this.variant === 'inverse';
|
|
61
61
|
const textClass = isInverse ? 'text-inverse' : '';
|
|
62
62
|
const linkIntent = isInverse ? 'inverse' : 'strong';
|
|
63
|
-
return (h("nav", { key: '
|
|
63
|
+
return (h("nav", { key: '42abfdc0d94bad2fa273de7a476099df0a5103ff', "aria-label": "Social media" }, h("p", { key: 'c2eb9600afd49b5b178392f0f46efd58909f8843', class: `f-ui-02 ${textClass}` }, this.heading), h("ul", { key: 'b71a410550b06d89947ee9475af98c19cbe7e130', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index) => (h("li", { key: index }, h("eds-link", { external: true, "aria-label": `EBRAINS on ${network.label}`, url: network.url, icon: network.icon, intent: linkIntent })))))));
|
|
64
64
|
}
|
|
65
65
|
static get style() { return EdsSocialNetworksStyle0; }
|
|
66
66
|
}, [1, "eds-social-networks", {
|
|
@@ -78,7 +78,7 @@ const EdsSpinner = /*@__PURE__*/ proxyCustomElement(class EdsSpinner extends HTM
|
|
|
78
78
|
alignItems: 'center',
|
|
79
79
|
justifyContent: 'center'
|
|
80
80
|
};
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '4b78f045f987eb40289d2829bab08f28324f13d2' }, h("div", { key: '05fcd319080518845630c6fd4bccda02032c3c5f', class: "spinner-overlay", style: overlayStyle }, h("span", { key: 'c1e24a0e3f3f9704ad9a118724f3437124e4f36f', class: "spinner", style: spinnerStyle }), this.message && h("p", { key: '947cd986f00100e950b1c2380b651c6baebca142', class: "f-ui-01" }, this.message))));
|
|
82
82
|
}
|
|
83
83
|
static get style() { return EdsSpinnerStyle0; }
|
|
84
84
|
}, [1, "eds-spinner", {
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$4 } from './eds-button2.js';
|
|
|
4
4
|
import { d as defineCustomElement$3 } from './eds-icon-wrapper2.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './eds-img2.js';
|
|
6
6
|
|
|
7
|
-
const edsStepsV2Css = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}.steps{position:sticky;margin-left:16px;border-left:1px solid var(--soft-color, #ddd);padding-left:23px;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:-41px;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,.steps h5{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps h4::before,.steps h5::before{content:counter(step);position:absolute;left:-40px;top
|
|
7
|
+
const edsStepsV2Css = "blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}.steps{position:sticky;margin-left:16px;border-left:1px solid var(--soft-color, #ddd);padding-left:23px;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:-41px;top:50%;transform:translateY(-50%);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,.steps h5{counter-increment:step;font-size:var(--f-heading-06-fontSize);font-weight:var(--f-heading-06-fontWeight);line-height:var(--f-heading-06-lineHeight);position:relative}.steps-body{margin-top:16px}@media (max-width: 749px){.steps h3,.steps h4,.steps h5{font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight)}.steps-body{margin-top:32px}}.steps h4::before,.steps h5::before{content:counter(step);position:absolute;left:-40px;top:50%;transform:translateY(-50%);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}.steps-img-placeholder{width:100%;height:200px;background:linear-gradient(to bottom, #9CE142, #00C959, #00A595);}.bg-\\[\\#00A595\\]{--tw-bg-opacity:1;background-color:rgb(0 165 149 / var(--tw-bg-opacity))}.relative{position:relative}.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-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-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-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)}.text-center{text-align:center}.text-default{color:var(--brand-black)}.text-accent{color:var(--brand-green)}.text-inverse{color:var(--white)}.text-light{color:var(--grey-light)}.text-lighter{color:var(--grey-dark)}.w-full{width:100%}.h-52{height:3.25rem}.h-96{height:6rem}.h-\\[200px\\]{height:200px}.justify-between{justify-content:space-between}.mt-16{margin-top:1rem}.mt-32{margin-top:2rem}.mt-64{margin-top:4rem}.mb-16{margin-bottom:1rem}.mb-32{margin-bottom:2rem}.my-16{margin-top:1rem;margin-bottom:1rem}.mb-12{margin-bottom:0.75rem}.last\\:mb-0:last-child{margin-bottom:0rem}.last\\:mt-16:last-child{margin-top:1rem}.border-softer{border:none}.relative{position:relative}.flex{display:flex}.inline-flex{display:inline-flex}.grow{flex-grow:1}.rounded{border-radius:0.25rem}.rounded-lg{border-radius:16px}.rounded-t-lg{border-top-left-radius:16px;border-top-right-radius:16px}.border-2{border-width:0}.p-8{padding:0.5rem}.p-24{padding:1.5rem}.bg-default{background-color:var(--grey-light)}.bg-inverse{background-color:var(--white)}.bg-strongest{background-color:var(--brand-black)}.top-2{top:0.125rem}.bottom-2{bottom:0.125rem}.left-2{left:0.125rem}.right-2{right:0.125rem}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.overflow-hidden{overflow:hidden}.space-y-8{--tw-space-y-reverse:0;margin-top:calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0.5rem * var(--tw-space-y-reverse))}.space-y-16{--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.ml-8{margin-left:0.5rem}.gap-y-16{row-gap:1rem}.gap-x-16{-moz-column-gap:1rem;column-gap:1rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.block{display:block}.items-center{align-items:center}.px-8{padding-left:0.5rem;padding-right:0.5rem}.pb-20{padding-bottom:1.25rem}.eds-steps__title[role=\"button\"]{cursor:pointer}.eds-steps__title.is-disabled{cursor:not-allowed;color:rgba(0, 0, 0, 0.5);}.eds-steps__title.is-disabled::before{opacity:1;filter:none}.steps--horizontal{display:flex;flex-direction:column;gap:2rem}.horizontal-indicators{display:flex;align-items:flex-start;gap:0;padding:0;margin-top:1.75rem;margin-bottom:0}.step-content-aligned{padding-left:0;padding-right:0}.horizontal-step{display:flex;flex-direction:column;align-items:flex-start;gap:0.6rem;cursor:pointer;flex:1 1 0;min-width:0;position:relative}.horizontal-step:last-child{flex:0 0 auto}.horizontal-step:not(:last-child)::after{content:'';position:absolute;top:1.375rem;left:calc(2.75rem + 0.4rem);width:calc(100% - 2.75rem - 0.8rem);height:3px;border-radius:2px;background-color:#e0e0e0;transform:translateY(-50%);z-index:1}.horizontal-step>span{text-align:left;align-self:stretch}.horizontal-step.is-completed:not(:last-child)::after{background-color:var(--brand-green);}.step-indicator{width:2.75rem;height:2.75rem;border-radius:50%;border:2px solid #e0e0e0;display:flex;align-items:center;justify-content:center;background-color:white;transition:all 0.3s ease;flex:0 0 auto;z-index:2}.horizontal-step.is-active .step-indicator{border-color:var(--brand-green-dark);background-color:var(--brand-green-dark);color:var(--white)}.horizontal-step.is-completed .step-indicator{border-color:var(--brand-green-dark);background-color:var(--white)}.horizontal-step.is-disabled{opacity:0.5;cursor:not-allowed}.step-number{font-family:var(--font-family-mono, 'IBM Plex Mono', monospace);font-weight:500;font-size:0.95rem}.step-label{font-family:var(--font-family-mono, 'IBM Plex Mono', monospace);font-size:9.5px;letter-spacing:0.07em;text-transform:uppercase;font-weight:500;color:var(--dark-grey, #7a7b7a)}.horizontal-step.is-active .step-label{color:var(--brand-green-dark)}.step-content{padding:0.5rem 0;margin-left:0;margin-right:0}@media (min-width: 700px){.step-content{padding:1.5rem 0}}.opacity-50{opacity:0.5}.bg-dark{background-color:var(--grey-light)}.bg-darker{background-color:var(--grey-dark)}.theme-brand.steps h3::before,.theme-brand.steps h4::before,.theme-brand.steps h5::before{background:var(--brand-green);color:var(--brand-black);border-color:var(--brand-green);font-weight:600}.theme-brand.steps h3.is-completed::before,.theme-brand.steps h4.is-completed::before,.theme-brand.steps h5.is-completed::before{content:'';}.theme-brand.steps .step-checkmark-icon{position:absolute;left:-39px;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center;width:30px;height:30px;z-index:1}.theme-brand.steps h3 .step-checkmark-icon{left:-41px;width:32px;height:32px;top:50%}.theme-brand .step-indicator{background-color:var(--grey-light);border-color:transparent;color:var(--dark-grey, #7a7b7a)}.theme-brand .horizontal-step.is-active .step-indicator{border-color:var(--brand-green);background-color:var(--brand-green);color:var(--brand-black);box-shadow:0 0 0 4px rgba(0, 255, 157, 0.2)}.theme-brand .horizontal-step.is-completed .step-indicator{border-color:var(--brand-green);background-color:var(--brand-green);color:var(--brand-black)}.theme-brand .horizontal-step.is-completed .step-number{display:none}.theme-brand .horizontal-step:not(:last-child)::after{background-color:var(--grey-light);}.theme-brand .horizontal-step.is-completed:not(:last-child)::after{background-color:var(--brand-green)}.theme-brand .horizontal-step.is-active .step-label,.theme-brand .horizontal-step.is-completed .step-label{color:var(--brand-black)}.theme-brand .step-number{font-weight:600}.theme-default.steps h3::before,.theme-default.steps h4::before,.theme-default.steps h5::before{background:var(--grey-900);color:#fff;border-color:#ccc}.theme-default .step-indicator{background-color:white;border-color:#e0e0e0}.theme-default .horizontal-step.is-active .step-indicator{border-color:var(--brand-green-dark);background-color:var(--brand-green-dark);color:var(--white)}.theme-default .horizontal-step.is-completed .step-indicator{border-color:var(--brand-green-dark);background-color:var(--white)}.theme-default .horizontal-step.is-completed:not(:last-child)::after{background-color:var(--brand-green-dark)}.theme-default .horizontal-step.is-active .step-label{color:var(--brand-green-dark)}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--brand-green)}.effect-focus-within:focus-within{outline-style:solid}";
|
|
8
8
|
const EdsStepsV2Style0 = edsStepsV2Css;
|
|
9
9
|
|
|
10
10
|
const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends HTMLElement {
|
|
@@ -16,6 +16,9 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
16
16
|
this.finished = createEvent(this, "finished", 7);
|
|
17
17
|
this.next = createEvent(this, "next", 7);
|
|
18
18
|
this.back = createEvent(this, "back", 7);
|
|
19
|
+
this.onResize = () => {
|
|
20
|
+
this.isMobile = typeof window !== 'undefined' && window.innerWidth < 750;
|
|
21
|
+
};
|
|
19
22
|
this.handleTitleClick = (index) => {
|
|
20
23
|
// In linear mode, do NOT collapse; only navigate if allowed.
|
|
21
24
|
if (this.type === 'linear') {
|
|
@@ -43,11 +46,12 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
43
46
|
};
|
|
44
47
|
this.handleNext = () => {
|
|
45
48
|
const lastIndex = this.parsedSteps.length - 1;
|
|
46
|
-
// On last step:
|
|
49
|
+
// On last step: stay on the last step and just emit finished. Collapsing
|
|
50
|
+
// here (activeStep = -1) left the form as an empty "Step 0" shell whenever
|
|
51
|
+
// the host's submit was rejected (e.g. single-submission already used) —
|
|
52
|
+
// the success path navigates away, so there's nothing to collapse for.
|
|
47
53
|
if (this.activeStep >= lastIndex) {
|
|
48
54
|
this.finished.emit();
|
|
49
|
-
this.activeStep = -1; // collapse the content
|
|
50
|
-
this.step.emit(this.activeStep); // notify change (-1 sentinel)
|
|
51
55
|
return;
|
|
52
56
|
}
|
|
53
57
|
const target = this.activeStep + 1;
|
|
@@ -91,9 +95,15 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
91
95
|
this.backLabel = 'Back';
|
|
92
96
|
this.finishLabel = 'Finish';
|
|
93
97
|
this.showFinish = true;
|
|
98
|
+
this.card = true;
|
|
94
99
|
this.disableNext = false;
|
|
95
100
|
this.headingLevel = 'h4';
|
|
96
101
|
this.activeStep = 0;
|
|
102
|
+
this.isMobile = false;
|
|
103
|
+
}
|
|
104
|
+
/** Nav button size: comfortable on desktop, compact on mobile. */
|
|
105
|
+
get navBtnSize() {
|
|
106
|
+
return this.isMobile ? 'small' : 'large';
|
|
97
107
|
}
|
|
98
108
|
handleDisableNextChange(newValue) {
|
|
99
109
|
if (typeof newValue === 'string' && newValue.trim().startsWith('[')) {
|
|
@@ -128,6 +138,17 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
128
138
|
}
|
|
129
139
|
componentWillLoad() {
|
|
130
140
|
this.handleDisableNextChange(this.disableNext);
|
|
141
|
+
this.onResize();
|
|
142
|
+
}
|
|
143
|
+
connectedCallback() {
|
|
144
|
+
if (typeof window !== 'undefined') {
|
|
145
|
+
window.addEventListener('resize', this.onResize);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
disconnectedCallback() {
|
|
149
|
+
if (typeof window !== 'undefined') {
|
|
150
|
+
window.removeEventListener('resize', this.onResize);
|
|
151
|
+
}
|
|
131
152
|
}
|
|
132
153
|
componentDidLoad() {
|
|
133
154
|
if (this.type === 'linear') {
|
|
@@ -148,7 +169,9 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
148
169
|
linkElement.dispatchEvent(event);
|
|
149
170
|
}
|
|
150
171
|
articleClasses() {
|
|
151
|
-
|
|
172
|
+
// The card chrome is opt-out so a host that already provides the frame
|
|
173
|
+
// (e.g. a multi-step form's outer form-style wrapper) isn't double-bordered.
|
|
174
|
+
return this.card ? 'border-softer relative rounded-lg border-2' : 'relative';
|
|
152
175
|
}
|
|
153
176
|
get parsedSteps() {
|
|
154
177
|
return parseData(this.steps);
|
|
@@ -212,21 +235,26 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
212
235
|
this.handleTitleClick(index);
|
|
213
236
|
}
|
|
214
237
|
};
|
|
215
|
-
return (h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, h("div", { class: "step-indicator" }, isCompleted ? (h("eds-icon-wrapper", { name: "checkmark", size: 20 })) : (h("span", { class: "step-number" }, index + 1))), h("span", { class: `
|
|
238
|
+
return (h("div", { class: `horizontal-step ${isActive ? 'is-active' : ''} ${isCompleted ? 'is-completed' : ''}`, onClick: () => !forwardBlocked && this.handleTitleClick(index), onKeyDown: onKey, role: "button", tabindex: forwardBlocked ? -1 : 0, "aria-label": `Step ${index + 1}: ${step.title}`, "aria-current": isActive ? 'step' : undefined, "aria-disabled": forwardBlocked ? 'true' : 'false' }, h("div", { class: "step-indicator" }, isCompleted ? (h("eds-icon-wrapper", { name: "checkmark", size: 20 })) : (h("span", { class: "step-number" }, index + 1))), h("span", { class: `step-label ${forwardBlocked ? 'opacity-50' : ''}` }, step.title)));
|
|
216
239
|
}
|
|
217
240
|
render() {
|
|
218
241
|
const steps = this.parsedSteps;
|
|
219
|
-
|
|
242
|
+
// Top margin separates the buttons from the fields; bottom margin gives them
|
|
243
|
+
// breathing room from whatever follows (e.g. the next vertical step).
|
|
244
|
+
const marginClass = this.orientation === 'horizontal' ? 'mt-64 mb-16' : 'mt-32 mb-32';
|
|
220
245
|
const themeClass = this.theme === 'brand' ? 'theme-brand' : 'theme-default';
|
|
221
|
-
return (h("div", { key: '
|
|
246
|
+
return (h("div", { key: '84383c5655004ccc0bcc144f3765c2d0b000cad6', class: this.articleClasses() }, this.imageSrc ? (h("div", { class: "w-full mb-12 rounded-t-lg overflow-hidden border-2" }, h("eds-img", { src: this.imageSrc, width: this.imageWidth, "with-bg": "true", "lazy-load": "true", alt: "Step illustration" }))) : (this.message && (h("div", { class: `w-full ${this.theme === 'brand' ? 'bg-strongest' : 'bg-darker'} rounded-t-lg border-2` }, h("div", { class: "p-24" }, h("span", { class: `${this.theme === 'brand' ? 'text-accent' : 'text-inverse'} f-heading-04` }, this.message))))), h("div", { key: 'd5fb5bbf6a48b90bf0db1e79a61ba5e445986368', class: "steps-body pb-20", style: {
|
|
247
|
+
paddingLeft: 'var(--eds-steps-padding-x, 0.5rem)',
|
|
248
|
+
paddingRight: 'var(--eds-steps-padding-x, 0.5rem)'
|
|
249
|
+
} }, this.type === 'linear' && this.orientation === 'horizontal' ? (h("div", { class: `steps--horizontal ${themeClass}`, style: { '--step-count': steps.length.toString() } }, h("div", { class: "horizontal-indicators" }, steps.map((step, index) => this.renderHorizontalIndicator(step, index))), steps.map((step, index) => {
|
|
222
250
|
const isLast = index === steps.length - 1;
|
|
223
251
|
if (this.activeStep !== index) {
|
|
224
252
|
return null;
|
|
225
253
|
}
|
|
226
|
-
return (h("div", { class: "step-content", key: index, id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "arrow-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size:
|
|
254
|
+
return (h("div", { class: "step-content", key: index, id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "arrow-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size: this.navBtnSize, iconSmall: this.isMobile, pill: true }), (!isLast || this.showFinish) && (h("eds-button", { label: isLast ? this.finishLabel : this.nextLabel, intent: isLast ? 'brand' : 'primary', icon: "arrow-right", onClick: this.handleNext, disabled: this.isNextDisabledFor(index), size: this.navBtnSize, iconSmall: this.isMobile, class: index > 0 ? 'ml-8' : null, pill: true }))), h("slot", { name: `actions-${index}` })));
|
|
227
255
|
}))) : this.type === 'linear' ? (h("div", { class: `steps ${themeClass}` }, steps.map((step, index) => {
|
|
228
256
|
const isCompleted = this.activeStep > index;
|
|
229
|
-
return (h("div", { class: `${index === 0 ? 'step' : 'step mt-16'} ${isCompleted ? 'is-completed' : ''}`, key: index }, this.renderHeading(step.title, index), this.activeStep === index && (h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "
|
|
257
|
+
return (h("div", { class: `${index === 0 ? 'step' : 'step mt-16'} ${isCompleted ? 'is-completed' : ''}`, key: index }, this.renderHeading(step.title, index), this.activeStep === index && (h("div", { class: "content grid gap-y-16", id: `eds-step-panel-${index}` }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content })), h("div", { class: `flex items-center justify-between ${marginClass}` }, h("eds-button", { label: this.backLabel, intent: "primary", icon: "chevron-left", iconPos: "left", onClick: this.handleBack, disabled: index === 0, class: index === 0 ? 'hidden' : 'block', size: this.navBtnSize, iconSmall: this.isMobile, pill: true }), (index < steps.length - 1 || this.showFinish) && (h("eds-button", { label: index === steps.length - 1 ? this.finishLabel : this.nextLabel, intent: index === steps.length - 1 ? 'brand' : 'primary', icon: "chevron-right", onClick: this.handleNext, disabled: this.isNextDisabledFor(index), size: this.navBtnSize, iconSmall: this.isMobile, class: index > 0 ? 'ml-8' : null, pill: true })))))));
|
|
230
258
|
}))) : (h("div", { class: `steps space-y-8 ${themeClass}` }, steps.map((step, index) => (h("div", { class: "step", key: index }, this.renderHeading(step.title, index), h("div", { class: "content", id: `eds-step-panel-${index}` }, h("div", { class: "content-body" }, h("slot", { name: `step-${index}` }, h("div", { class: "my-16 f-body-02 text-lighter", innerHTML: step.content }))))))))))));
|
|
231
259
|
}
|
|
232
260
|
get el() { return this; }
|
|
@@ -247,9 +275,11 @@ const EdsStepsV2$1 = /*@__PURE__*/ proxyCustomElement(class EdsStepsV2 extends H
|
|
|
247
275
|
"backLabel": [1, "back-label"],
|
|
248
276
|
"finishLabel": [1, "finish-label"],
|
|
249
277
|
"showFinish": [4, "show-finish"],
|
|
278
|
+
"card": [4],
|
|
250
279
|
"disableNext": [1032, "disable-next"],
|
|
251
280
|
"headingLevel": [513, "heading-level"],
|
|
252
|
-
"activeStep": [32]
|
|
281
|
+
"activeStep": [32],
|
|
282
|
+
"isMobile": [32]
|
|
253
283
|
}, undefined, {
|
|
254
284
|
"disableNext": ["handleDisableNextChange"],
|
|
255
285
|
"activeStep": ["activeStepChanged"]
|