@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
|
@@ -26,16 +26,6 @@ export default {
|
|
|
26
26
|
control: { type: 'boolean' },
|
|
27
27
|
description: 'Enable column sorting'
|
|
28
28
|
},
|
|
29
|
-
columnSize: {
|
|
30
|
-
control: 'select',
|
|
31
|
-
options: ['default', 'medium', 'large'],
|
|
32
|
-
description: 'Column sizing mode'
|
|
33
|
-
},
|
|
34
|
-
theme: {
|
|
35
|
-
control: 'select',
|
|
36
|
-
options: ['default', 'color', 'brand'],
|
|
37
|
-
description: 'Table theme: default (no bg), color (alternating rows), brand (modern with hover/accents)'
|
|
38
|
-
},
|
|
39
29
|
view: {
|
|
40
30
|
control: 'select',
|
|
41
31
|
options: ['table', 'card'],
|
|
@@ -65,13 +55,9 @@ export default {
|
|
|
65
55
|
paginationEnabled: true,
|
|
66
56
|
searchEnabled: true,
|
|
67
57
|
sortingEnabled: false,
|
|
68
|
-
columnSize: 'default',
|
|
69
|
-
theme: 'color',
|
|
70
58
|
view: 'table',
|
|
71
59
|
showViewToggle: false,
|
|
72
|
-
actions: [
|
|
73
|
-
{ name: 'view', label: 'View' }
|
|
74
|
-
]
|
|
60
|
+
actions: [{ name: 'view', label: 'View' }]
|
|
75
61
|
}
|
|
76
62
|
};
|
|
77
63
|
// Sample data for the table
|
|
@@ -87,6 +73,8 @@ const sampleData = [
|
|
|
87
73
|
{ name: 'Ian', age: 27, occupation: 'Developer' },
|
|
88
74
|
{ name: 'Jackie', age: 33, occupation: 'Consultant' }
|
|
89
75
|
];
|
|
76
|
+
// Single story — the EBRAINS brand theme (the only supported theme), with
|
|
77
|
+
// pagination, search, sorting, row actions and the table/card view toggle.
|
|
90
78
|
export const Default = {
|
|
91
79
|
render: (args) => `
|
|
92
80
|
<eds-table
|
|
@@ -96,38 +84,9 @@ export const Default = {
|
|
|
96
84
|
pagination-enabled="${args.paginationEnabled}"
|
|
97
85
|
search-enabled="${args.searchEnabled}"
|
|
98
86
|
sorting-enabled="${args.sortingEnabled}"
|
|
99
|
-
|
|
100
|
-
theme="${args.theme}"
|
|
87
|
+
theme="brand"
|
|
101
88
|
view="${args.view}"
|
|
102
89
|
show-view-toggle="${args.showViewToggle}"
|
|
103
|
-
></eds-table>
|
|
104
|
-
`,
|
|
105
|
-
args: {
|
|
106
|
-
data: sampleData,
|
|
107
|
-
config: {
|
|
108
|
-
name: { format: 'bold' },
|
|
109
|
-
occupation: { format: 'uppercase' }
|
|
110
|
-
},
|
|
111
|
-
rowsPerPage: 5,
|
|
112
|
-
paginationEnabled: true,
|
|
113
|
-
searchEnabled: true,
|
|
114
|
-
sortingEnabled: false,
|
|
115
|
-
columnSize: 'default',
|
|
116
|
-
theme: 'color',
|
|
117
|
-
view: 'table',
|
|
118
|
-
showViewToggle: false
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
export const BrandTheme = {
|
|
122
|
-
render: (args) => `
|
|
123
|
-
<eds-table
|
|
124
|
-
table-data='${JSON.stringify(args.data)}'
|
|
125
|
-
config='${JSON.stringify(args.config)}'
|
|
126
|
-
rows-per-page="${args.rowsPerPage}"
|
|
127
|
-
pagination-enabled="${args.paginationEnabled}"
|
|
128
|
-
search-enabled="${args.searchEnabled}"
|
|
129
|
-
sorting-enabled="${args.sortingEnabled}"
|
|
130
|
-
theme="brand"
|
|
131
90
|
actions='${JSON.stringify(args.actions)}'
|
|
132
91
|
></eds-table>
|
|
133
92
|
`,
|
|
@@ -141,75 +100,8 @@ export const BrandTheme = {
|
|
|
141
100
|
paginationEnabled: true,
|
|
142
101
|
searchEnabled: true,
|
|
143
102
|
sortingEnabled: true,
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
]
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
export const DefaultTheme = {
|
|
150
|
-
render: (args) => `
|
|
151
|
-
<eds-table
|
|
152
|
-
table-data='${JSON.stringify(args.data)}'
|
|
153
|
-
config='${JSON.stringify(args.config)}'
|
|
154
|
-
rows-per-page="${args.rowsPerPage}"
|
|
155
|
-
theme="default"
|
|
156
|
-
></eds-table>
|
|
157
|
-
`,
|
|
158
|
-
args: {
|
|
159
|
-
data: sampleData,
|
|
160
|
-
config: {
|
|
161
|
-
name: { format: 'bold' }
|
|
162
|
-
},
|
|
163
|
-
rowsPerPage: 10
|
|
164
|
-
}
|
|
165
|
-
};
|
|
166
|
-
export const CardView = {
|
|
167
|
-
render: (args) => `
|
|
168
|
-
<eds-table
|
|
169
|
-
table-data='${JSON.stringify(args.data)}'
|
|
170
|
-
config='${JSON.stringify(args.config)}'
|
|
171
|
-
rows-per-page="${args.rowsPerPage}"
|
|
172
|
-
view="card"
|
|
173
|
-
show-view-toggle="true"
|
|
174
|
-
theme="${args.theme}"
|
|
175
|
-
actions='${JSON.stringify(args.actions)}'
|
|
176
|
-
></eds-table>
|
|
177
|
-
`,
|
|
178
|
-
args: {
|
|
179
|
-
data: sampleData,
|
|
180
|
-
config: {
|
|
181
|
-
name: { format: 'bold' }
|
|
182
|
-
},
|
|
183
|
-
rowsPerPage: 6,
|
|
184
|
-
theme: 'brand',
|
|
185
|
-
actions: [
|
|
186
|
-
{ name: 'view', label: 'View', showLabel: true, intent: 'brand' }
|
|
187
|
-
]
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
export const WithViewToggle = {
|
|
191
|
-
render: (args) => `
|
|
192
|
-
<eds-table
|
|
193
|
-
table-data='${JSON.stringify(args.data)}'
|
|
194
|
-
config='${JSON.stringify(args.config)}'
|
|
195
|
-
rows-per-page="${args.rowsPerPage}"
|
|
196
|
-
search-enabled="true"
|
|
197
|
-
show-view-toggle="true"
|
|
198
|
-
sorting-enabled="true"
|
|
199
|
-
theme="brand"
|
|
200
|
-
actions='${JSON.stringify(args.actions)}'
|
|
201
|
-
></eds-table>
|
|
202
|
-
`,
|
|
203
|
-
args: {
|
|
204
|
-
data: sampleData,
|
|
205
|
-
config: {
|
|
206
|
-
name: { format: 'bold' },
|
|
207
|
-
occupation: { format: 'uppercase' }
|
|
208
|
-
},
|
|
209
|
-
rowsPerPage: 5,
|
|
210
|
-
actions: [
|
|
211
|
-
{ name: 'view', label: 'View', icon: 'view', intent: 'brand' },
|
|
212
|
-
{ name: 'delete', label: 'Delete', type: 'checkbox' }
|
|
213
|
-
]
|
|
103
|
+
view: 'table',
|
|
104
|
+
showViewToggle: true,
|
|
105
|
+
actions: [{ name: 'view', label: 'View', showLabel: true, intent: 'brand' }]
|
|
214
106
|
}
|
|
215
107
|
};
|
|
@@ -36,7 +36,13 @@
|
|
|
36
36
|
border-radius: 8px;
|
|
37
37
|
font-size: 1.125rem;
|
|
38
38
|
cursor: pointer;
|
|
39
|
-
|
|
39
|
+
/* Transition ONLY color (hover effect). Background must not
|
|
40
|
+
animate — the active-state move is a decisive UI change that
|
|
41
|
+
has to land in the same frame as the focus outline; an
|
|
42
|
+
animated background can read as "ahead of" the outline during
|
|
43
|
+
rapid keyboard navigation. Outline is left unanimated for the
|
|
44
|
+
same reason. */
|
|
45
|
+
transition: color 0.15s ease;
|
|
40
46
|
border: none;
|
|
41
47
|
background: transparent;
|
|
42
48
|
font-family: 'IBM Plex Sans', sans-serif;
|
|
@@ -35,14 +35,28 @@ export class EdsTabs {
|
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Parses the `tabs` prop into an array of tab objects.
|
|
38
|
+
*
|
|
39
|
+
* Note: we deliberately do NOT clear `tabRefs` here. Consumers
|
|
40
|
+
* often re-pass `tabs` with an updated `active` flag every time
|
|
41
|
+
* the user switches tabs (Vue/React re-render on event). Wiping
|
|
42
|
+
* the refs leaves a window in which a queued focus() call sees
|
|
43
|
+
* `tabRefs[index] === undefined` and silently no-ops — focus
|
|
44
|
+
* gets stuck on the previous tab even though `aria-selected` and
|
|
45
|
+
* the background already moved. Stencil re-binds refs on render,
|
|
46
|
+
* so the array stays in sync without us emptying it; we only
|
|
47
|
+
* truncate when the new list is shorter to drop stale entries.
|
|
38
48
|
*/
|
|
39
49
|
parseTabs() {
|
|
40
50
|
this.parsedTabs = parseData(this.tabs);
|
|
41
|
-
this.tabRefs
|
|
51
|
+
if (this.tabRefs.length > this.parsedTabs.length) {
|
|
52
|
+
this.tabRefs.length = this.parsedTabs.length;
|
|
53
|
+
}
|
|
42
54
|
}
|
|
43
55
|
componentDidUpdate() {
|
|
44
|
-
|
|
45
|
-
|
|
56
|
+
// Same reasoning as parseTabs: only shrink, never re-allocate
|
|
57
|
+
// to nulls — that would re-introduce the silent-no-op window.
|
|
58
|
+
if (this.tabRefs.length > this.parsedTabs.length) {
|
|
59
|
+
this.tabRefs.length = this.parsedTabs.length;
|
|
46
60
|
}
|
|
47
61
|
}
|
|
48
62
|
setActiveIndex() {
|
|
@@ -53,6 +67,7 @@ export class EdsTabs {
|
|
|
53
67
|
}
|
|
54
68
|
}
|
|
55
69
|
handleTabClick(index, tabLabel, shouldFocus = true) {
|
|
70
|
+
var _a;
|
|
56
71
|
if (index < 0 || index >= this.parsedTabs.length) {
|
|
57
72
|
return;
|
|
58
73
|
}
|
|
@@ -67,11 +82,34 @@ export class EdsTabs {
|
|
|
67
82
|
action: 'click'
|
|
68
83
|
});
|
|
69
84
|
}
|
|
70
|
-
if (shouldFocus
|
|
71
|
-
|
|
85
|
+
if (shouldFocus) {
|
|
86
|
+
// Focus must move SYNCHRONOUSLY, while the keydown event
|
|
87
|
+
// that triggered this call is still on the stack. Otherwise
|
|
88
|
+
// the browser's `:focus-visible` heuristic doesn't flag the
|
|
89
|
+
// focus move as keyboard-driven and the outline never paints
|
|
90
|
+
// — accessibility regression (WCAG 2.4.7).
|
|
91
|
+
//
|
|
92
|
+
// We query by static id (`#tab-${index}`) instead of using
|
|
93
|
+
// `tabRefs[index]` because consumer-driven prop changes can
|
|
94
|
+
// briefly drop the cached ref. The button id is set in
|
|
95
|
+
// `render()` and doesn't depend on active state, so it is
|
|
96
|
+
// always findable.
|
|
97
|
+
const findBtn = () => { var _a; return ((_a = this.el.shadowRoot) !== null && _a !== void 0 ? _a : this.el).querySelector(`#tab-${index}`); };
|
|
98
|
+
(_a = findBtn()) === null || _a === void 0 ? void 0 : _a.focus();
|
|
99
|
+
// Belt-and-suspenders: if a consumer reacts to the `tab`
|
|
100
|
+
// event by re-rendering our buttons (rare, but possible
|
|
101
|
+
// when the `tabs` prop is recomputed), the sync focus above
|
|
102
|
+
// landed on a button that is now detached. Re-focus once
|
|
103
|
+
// the next frame's DOM is in place. We only act if focus
|
|
104
|
+
// genuinely isn't on the right element, to avoid a redundant
|
|
105
|
+
// focus call that would reset selection/IME state.
|
|
106
|
+
requestAnimationFrame(() => {
|
|
72
107
|
var _a;
|
|
73
|
-
|
|
74
|
-
|
|
108
|
+
const after = findBtn();
|
|
109
|
+
if (after && ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== after) {
|
|
110
|
+
after.focus();
|
|
111
|
+
}
|
|
112
|
+
});
|
|
75
113
|
}
|
|
76
114
|
}
|
|
77
115
|
onKeyDown(ev, idx) {
|
|
@@ -101,19 +139,12 @@ export class EdsTabs {
|
|
|
101
139
|
}
|
|
102
140
|
}
|
|
103
141
|
render() {
|
|
104
|
-
const containerClasses = [
|
|
105
|
-
|
|
106
|
-
`tabs-container-${this.variant}`
|
|
107
|
-
].join(' ');
|
|
108
|
-
return (h("div", { key: '66e0871d6cd917c15598b6e3ea80e5ff82970029', id: `${this.identifier}` }, h("div", { key: 'c65163e33fcf4960bbcc367a2abf62c0aec99446', class: containerClasses }, h("nav", { key: 'fae5e0f23904318299d60e1d3212f84b8c5a0bed', role: "tablist", class: "tabs-nav", "aria-label": this.navAriaLabel }, this.parsedTabs.map((tab, index) => {
|
|
142
|
+
const containerClasses = ['tabs-container', `tabs-container-${this.variant}`].join(' ');
|
|
143
|
+
return (h("div", { key: '39b1e8fc98303be43fbbd0e67807786fe0ad8fef', id: `${this.identifier}` }, h("div", { key: '3cef6bd5804c110e51560c7b58de5cb77eadbbb6', class: containerClasses }, h("nav", { key: 'b59ed6ad2fe067b2c39b1db43cd4242eec1b01bf', role: "tablist", class: "tabs-nav", "aria-label": this.navAriaLabel }, this.parsedTabs.map((tab, index) => {
|
|
109
144
|
const isActive = index === this.activeIndex;
|
|
110
|
-
const tabClasses = [
|
|
111
|
-
'tab',
|
|
112
|
-
`tab-${this.variant}`,
|
|
113
|
-
isActive ? 'tab-active' : ''
|
|
114
|
-
].filter(Boolean).join(' ');
|
|
145
|
+
const tabClasses = ['tab', `tab-${this.variant}`, isActive ? 'tab-active' : ''].filter(Boolean).join(' ');
|
|
115
146
|
return (h("button", { class: tabClasses, type: "button", role: "tab", "aria-selected": isActive ? 'true' : 'false', tabIndex: isActive ? 0 : -1, "aria-label": tab.ariaLabel || tab.label, "aria-controls": `panel-${index}`, id: `tab-${index}`, ref: (el) => this.setTabRef(el, index), onClick: () => this.handleTabClick(index, tab.label, true), onKeyDown: (e) => this.onKeyDown(e, index) }, tab.label || tab.ariaLabel));
|
|
116
|
-
}))), h("div", { key: '
|
|
147
|
+
}))), h("div", { key: '224717af5f59fbea2683dd33144760be8c553bb8', class: "tab-panels" }, this.parsedTabs.map((_, index) => (h("div", { role: "tabpanel", id: `panel-${index}`, "aria-labelledby": `tab-${index}`, hidden: index !== this.activeIndex, tabIndex: index === this.activeIndex ? 0 : -1 }, h("slot", { name: `panel-${index}` })))))));
|
|
117
148
|
}
|
|
118
149
|
static get is() { return "eds-tabs"; }
|
|
119
150
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,9 +63,9 @@ const createTabsStory = (args, panelContents) => {
|
|
|
63
63
|
return container;
|
|
64
64
|
};
|
|
65
65
|
const defaultPanels = [
|
|
66
|
-
{ title: 'Home', body:
|
|
66
|
+
{ title: 'Home', body: "Welcome to our homepage! Here's the latest news and updates." },
|
|
67
67
|
{ title: 'Profile', body: 'See and update your profile settings.' },
|
|
68
|
-
{ title: 'Settings', body:
|
|
68
|
+
{ title: 'Settings', body: "Update the app's settings." }
|
|
69
69
|
];
|
|
70
70
|
export const Default = {
|
|
71
71
|
render: (args) => createTabsStory(args, defaultPanels)
|
|
@@ -35,7 +35,7 @@ export class EdsTag {
|
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
37
|
const classes = tagStyles({ intent: this.intent, size: this.size });
|
|
38
|
-
return (h("span", { key: '
|
|
38
|
+
return (h("span", { key: 'f9399ed92717576781bff9fb5f117743d50720af', class: classes }, h("span", { key: '9500083dfbddd73539de9e1c5b738bf7a3415624', style: { position: 'relative', zIndex: '1' } }, this.label)));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "eds-tag"; }
|
|
41
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -41,7 +41,7 @@ export class EdsTimeline {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h("div", { key: '
|
|
44
|
+
return (h("div", { key: '3816dfeeec536ae803b069e5f5e5112f476dffed', class: "max-w-sidebar mx-auto px-4 py-8" }, h("div", { key: '360b8c6752eab781870de60aa1f89889eff644d3', class: "relative" }, h("div", { key: 'eda9ed9904dfe7c8c0fff2295666666cfbd3763a', class: "absolute w-4 left-1/2 transform -translate-x-1/2 bg-strong h-full z-0" }), h("div", { key: '5f7b736ed512cf4752c66c8a0c9010822d8b4f44', class: "space-y-16" }, this.parsedEvents.map((event, index) => (h("div", { class: "relative flex" }, h("div", { class: `w-1/2 ${index % 2 === 0 ? 'pr-4' : ''}` }, index % 2 === 0 && (h("eds-card-generic", { title: event.title, url: "#", description: event.description, intent: "secondary", tags: JSON.stringify(event.completed
|
|
45
45
|
? [{ label: 'completed', style: 'accent' }]
|
|
46
46
|
: [{ label: 'pending', style: 'default' }]), onClick: () => this.handleEventClick(event) }))), h("div", { class: "flex items-center justify-center relative" }, event.completed ? (h("div", { class: "w-32 h-32 bg-accent rounded-full shadow flex items-center justify-center" })) : (h("div", { class: "w-32 h-32 bg-strong rounded-full shadow flex items-center justify-center" }))), h("div", { class: `w-1/2 ${index % 2 !== 0 ? 'pl-4' : ''}` }, index % 2 !== 0 && (h("eds-card-generic", { title: event.title, url: "#", description: event.description, intent: "secondary", tags: JSON.stringify(event.completed
|
|
47
47
|
? [{ label: 'completed', style: 'accent' }]
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
/* Block host so the banner variant fills its container in normal flow. The
|
|
2
|
+
toast variant is used inside a flex column (toast manager), where flex items
|
|
3
|
+
are blockified regardless, so this is safe for both. */
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
}
|
|
7
|
+
|
|
1
8
|
.relative {
|
|
2
9
|
position: relative;
|
|
3
10
|
}
|
|
@@ -148,4 +155,143 @@
|
|
|
148
155
|
|
|
149
156
|
.hover\:opacity-100:hover {
|
|
150
157
|
opacity: 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* ============================================================================
|
|
161
|
+
Banner variant — richer inline status banner. Per-intent tone is expressed
|
|
162
|
+
through CSS custom properties so the structural rules stay intent-agnostic.
|
|
163
|
+
Semantic colours are deliberate (warn=amber, error=red); brand green never
|
|
164
|
+
signals "safe" or "blocked" on its own.
|
|
165
|
+
========================================================================== */
|
|
166
|
+
.banner {
|
|
167
|
+
/* neutral defaults; overridden per intent below */
|
|
168
|
+
--rail: #7a7b7a;
|
|
169
|
+
--surface: #ffffff;
|
|
170
|
+
--line: #e2e2e2;
|
|
171
|
+
--icon-bg: #f0f0f0;
|
|
172
|
+
--icon-fg: #5a5f5c;
|
|
173
|
+
--title: #07140d;
|
|
174
|
+
--msg: #8a8c8a;
|
|
175
|
+
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-wrap: wrap;
|
|
178
|
+
align-items: center;
|
|
179
|
+
gap: 14px;
|
|
180
|
+
background: var(--surface);
|
|
181
|
+
border: 1px solid var(--line);
|
|
182
|
+
border-left: 3px solid var(--rail);
|
|
183
|
+
border-radius: 12px;
|
|
184
|
+
padding: 15px 18px;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.banner--brand,
|
|
188
|
+
.banner--info {
|
|
189
|
+
--rail: var(--brand-green, #00ff9d);
|
|
190
|
+
--icon-bg: rgba(0, 255, 157, 0.12);
|
|
191
|
+
--icon-fg: var(--green-d, #00c87b);
|
|
192
|
+
--title: var(--brand-black, #07140d);
|
|
193
|
+
--msg: #8a8c8a;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.banner--success {
|
|
197
|
+
--rail: var(--green-d, #00c87b);
|
|
198
|
+
--surface: #f0fbf6;
|
|
199
|
+
--line: #cdeede;
|
|
200
|
+
--icon-bg: rgba(0, 200, 123, 0.12);
|
|
201
|
+
--icon-fg: var(--green-d, #00c87b);
|
|
202
|
+
--title: #0a6b46;
|
|
203
|
+
--msg: #5a7a6c;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.banner--warning {
|
|
207
|
+
--rail: #b26b00;
|
|
208
|
+
--surface: #fff6e6;
|
|
209
|
+
--line: #f0dcb4;
|
|
210
|
+
--icon-bg: rgba(178, 107, 0, 0.12);
|
|
211
|
+
--icon-fg: #b26b00;
|
|
212
|
+
--title: #b26b00;
|
|
213
|
+
--msg: #8a6a2a;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.banner--error {
|
|
217
|
+
--rail: #c0392b;
|
|
218
|
+
--surface: #fdf0ee;
|
|
219
|
+
--line: #f2cfc9;
|
|
220
|
+
--icon-bg: rgba(192, 57, 43, 0.1);
|
|
221
|
+
--icon-fg: #c0392b;
|
|
222
|
+
--title: #c0392b;
|
|
223
|
+
--msg: #8d5049;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.banner-ic {
|
|
227
|
+
flex: 0 0 auto;
|
|
228
|
+
width: 38px;
|
|
229
|
+
height: 38px;
|
|
230
|
+
border-radius: 10px;
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
background: var(--icon-bg);
|
|
235
|
+
color: var(--icon-fg);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.banner-copy {
|
|
239
|
+
flex: 1 1 auto;
|
|
240
|
+
min-width: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.banner-title {
|
|
244
|
+
font-family: var(--sans, 'IBM Plex Sans', system-ui, sans-serif);
|
|
245
|
+
font-size: 14.5px;
|
|
246
|
+
font-weight: 600;
|
|
247
|
+
color: var(--title);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.banner-msg {
|
|
251
|
+
font-family: var(--mono, 'IBM Plex Mono', ui-monospace, monospace);
|
|
252
|
+
font-size: 10.5px;
|
|
253
|
+
letter-spacing: 0.04em;
|
|
254
|
+
color: var(--msg);
|
|
255
|
+
line-height: 1.45;
|
|
256
|
+
margin-top: 3px;
|
|
257
|
+
}
|
|
258
|
+
/* When there's no heading, let the message read as the primary line. */
|
|
259
|
+
.banner-title + .banner-msg {
|
|
260
|
+
margin-top: 3px;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* Compact inline actions: they sit on the top row next to the dismiss, so the
|
|
264
|
+
banner stays a single tidy row (the copy shrinks to make room). */
|
|
265
|
+
.banner-actions {
|
|
266
|
+
flex: 0 0 auto;
|
|
267
|
+
display: flex;
|
|
268
|
+
align-items: center;
|
|
269
|
+
gap: 16px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.banner-x {
|
|
273
|
+
flex: 0 0 auto;
|
|
274
|
+
border: none;
|
|
275
|
+
background: transparent;
|
|
276
|
+
color: var(--msg);
|
|
277
|
+
cursor: pointer;
|
|
278
|
+
display: inline-flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
justify-content: center;
|
|
281
|
+
padding: 4px;
|
|
282
|
+
border-radius: 6px;
|
|
283
|
+
opacity: 0.6;
|
|
284
|
+
transition: opacity 0.14s, background 0.14s;
|
|
285
|
+
}
|
|
286
|
+
.banner-x:hover {
|
|
287
|
+
opacity: 1;
|
|
288
|
+
background: rgba(0, 0, 0, 0.05);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/* Narrow screens: keep it compact — the copy (min-width:0) absorbs the width so
|
|
292
|
+
the actions + dismiss stay inline on the top row rather than wrapping. */
|
|
293
|
+
@media (max-width: 1024px) {
|
|
294
|
+
.banner-actions {
|
|
295
|
+
gap: 12px;
|
|
296
|
+
}
|
|
151
297
|
}
|
|
@@ -7,6 +7,8 @@ const toastStyles = cva(['relative bottom-4 w-auto rounded-xs p-12'], {
|
|
|
7
7
|
success: 'bg-success text-dark',
|
|
8
8
|
error: 'bg-error text-dark',
|
|
9
9
|
warning: 'bg-warning text-dark',
|
|
10
|
+
info: 'bg-dark text-dark',
|
|
11
|
+
neutral: 'bg-dark text-dark',
|
|
10
12
|
brand: 'bg-strongest text-accent',
|
|
11
13
|
brandInverse: 'bg-inverse text-default'
|
|
12
14
|
}
|
|
@@ -15,6 +17,16 @@ const toastStyles = cva(['relative bottom-4 w-auto rounded-xs p-12'], {
|
|
|
15
17
|
intent: 'default'
|
|
16
18
|
}
|
|
17
19
|
});
|
|
20
|
+
/** Fallback leading icon per intent for the `banner` variant. */
|
|
21
|
+
const DEFAULT_BANNER_ICON = {
|
|
22
|
+
default: 'information',
|
|
23
|
+
neutral: 'information',
|
|
24
|
+
info: 'information',
|
|
25
|
+
brand: 'information',
|
|
26
|
+
success: 'checkmark',
|
|
27
|
+
warning: 'warning',
|
|
28
|
+
error: 'warning'
|
|
29
|
+
};
|
|
18
30
|
export class EdsToast {
|
|
19
31
|
constructor() {
|
|
20
32
|
/**
|
|
@@ -26,12 +38,23 @@ export class EdsToast {
|
|
|
26
38
|
};
|
|
27
39
|
this.message = undefined;
|
|
28
40
|
this.intent = 'default';
|
|
41
|
+
this.variant = 'toast';
|
|
42
|
+
this.heading = undefined;
|
|
43
|
+
this.icon = undefined;
|
|
44
|
+
this.dismissible = false;
|
|
29
45
|
this.duration = undefined;
|
|
30
46
|
this.visible = true;
|
|
47
|
+
this.hasActions = false;
|
|
48
|
+
}
|
|
49
|
+
componentWillLoad() {
|
|
50
|
+
// Slotted actions live in light DOM (children with slot="actions").
|
|
51
|
+
this.hasActions = !!this.el.querySelector('[slot="actions"]');
|
|
31
52
|
}
|
|
32
53
|
componentDidLoad() {
|
|
33
54
|
const btn = this.el.shadowRoot.querySelector('eds-button');
|
|
34
|
-
|
|
55
|
+
if (btn) {
|
|
56
|
+
this.emitContext(btn);
|
|
57
|
+
}
|
|
35
58
|
}
|
|
36
59
|
/**
|
|
37
60
|
* Emits a custom event called `parentContext` for a given button element.
|
|
@@ -57,10 +80,18 @@ export class EdsToast {
|
|
|
57
80
|
// Clear the timeout when the component is removed
|
|
58
81
|
clearTimeout(this.dismissTimeout);
|
|
59
82
|
}
|
|
83
|
+
renderBanner() {
|
|
84
|
+
const iconName = this.icon || DEFAULT_BANNER_ICON[this.intent] || 'information';
|
|
85
|
+
const showClose = this.dismissible || (this.duration && this.duration > 0);
|
|
86
|
+
return (h("div", { class: `banner banner--${this.intent}`, role: "status", "aria-live": "polite" }, h("span", { class: "banner-ic", "aria-hidden": "true" }, h("eds-icon-wrapper", { name: iconName, size: 20 })), h("div", { class: "banner-copy" }, this.heading && h("div", { class: "banner-title" }, this.heading), h("div", { class: "banner-msg" }, this.message)), this.hasActions && (h("div", { class: "banner-actions" }, h("slot", { name: "actions" }))), showClose && (h("button", { type: "button", class: "banner-x", "aria-label": "Dismiss", onClick: () => this.dismissToast() }, h("eds-icon-wrapper", { name: "close", size: 16 })))));
|
|
87
|
+
}
|
|
60
88
|
render() {
|
|
61
89
|
if (!this.visible) {
|
|
62
90
|
return null;
|
|
63
91
|
}
|
|
92
|
+
if (this.variant === 'banner') {
|
|
93
|
+
return this.renderBanner();
|
|
94
|
+
}
|
|
64
95
|
const classes = toastStyles({ intent: this.intent });
|
|
65
96
|
return (h("div", { class: classes, role: "alert", "aria-live": "assertive" }, h("div", { class: "flex items-center justify-between gap-4" }, h("span", { class: "f-ui-02" }, this.message), h("eds-button", { intent: "ghost", size: "large", icon: "close", "aria-label": "Close Toast", onClick: () => this.dismissToast(), "extra-class": "ml-8" }))));
|
|
66
97
|
}
|
|
@@ -99,8 +130,8 @@ export class EdsToast {
|
|
|
99
130
|
"type": "string",
|
|
100
131
|
"mutable": false,
|
|
101
132
|
"complexType": {
|
|
102
|
-
"original": "'default' | 'success' | 'error' | 'warning' | 'brand' | 'brandInverse'",
|
|
103
|
-
"resolved": "\"brand\" | \"brandInverse\" | \"default\" | \"error\" | \"success\" | \"warning\"",
|
|
133
|
+
"original": "'default' | 'success' | 'error' | 'warning' | 'info' | 'neutral' | 'brand' | 'brandInverse'",
|
|
134
|
+
"resolved": "\"brand\" | \"brandInverse\" | \"default\" | \"error\" | \"info\" | \"neutral\" | \"success\" | \"warning\"",
|
|
104
135
|
"references": {}
|
|
105
136
|
},
|
|
106
137
|
"required": false,
|
|
@@ -113,6 +144,76 @@ export class EdsToast {
|
|
|
113
144
|
"reflect": false,
|
|
114
145
|
"defaultValue": "'default'"
|
|
115
146
|
},
|
|
147
|
+
"variant": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "'toast' | 'banner'",
|
|
152
|
+
"resolved": "\"banner\" | \"toast\"",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": "Visual variant:\n- \"toast\": the classic compact pill (message + close). Default; used by the\n global toast manager.\n- \"banner\": a richer inline banner \u2014 leading icon in a tinted square, a bold\n heading over a mono message, a coloured left rail on a tinted surface, an\n optional actions slot and an optional dismiss button. Use for persistent,\n in-page status (form expiry, saved draft, etc.)."
|
|
160
|
+
},
|
|
161
|
+
"attribute": "variant",
|
|
162
|
+
"reflect": false,
|
|
163
|
+
"defaultValue": "'toast'"
|
|
164
|
+
},
|
|
165
|
+
"heading": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "string",
|
|
170
|
+
"resolved": "string",
|
|
171
|
+
"references": {}
|
|
172
|
+
},
|
|
173
|
+
"required": false,
|
|
174
|
+
"optional": true,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": "Bold heading shown above the message. Banner variant only."
|
|
178
|
+
},
|
|
179
|
+
"attribute": "heading",
|
|
180
|
+
"reflect": false
|
|
181
|
+
},
|
|
182
|
+
"icon": {
|
|
183
|
+
"type": "string",
|
|
184
|
+
"mutable": false,
|
|
185
|
+
"complexType": {
|
|
186
|
+
"original": "string",
|
|
187
|
+
"resolved": "string",
|
|
188
|
+
"references": {}
|
|
189
|
+
},
|
|
190
|
+
"required": false,
|
|
191
|
+
"optional": true,
|
|
192
|
+
"docs": {
|
|
193
|
+
"tags": [],
|
|
194
|
+
"text": "Leading icon name (from the EBRAINS icon set). Banner variant only.\nFalls back to a sensible default per intent when omitted."
|
|
195
|
+
},
|
|
196
|
+
"attribute": "icon",
|
|
197
|
+
"reflect": false
|
|
198
|
+
},
|
|
199
|
+
"dismissible": {
|
|
200
|
+
"type": "boolean",
|
|
201
|
+
"mutable": false,
|
|
202
|
+
"complexType": {
|
|
203
|
+
"original": "boolean",
|
|
204
|
+
"resolved": "boolean",
|
|
205
|
+
"references": {}
|
|
206
|
+
},
|
|
207
|
+
"required": false,
|
|
208
|
+
"optional": false,
|
|
209
|
+
"docs": {
|
|
210
|
+
"tags": [],
|
|
211
|
+
"text": "Show a dismiss (\u00D7) button regardless of `duration`. The `toast` variant\nalready shows one whenever `duration` is set; set this for a persistent\nbanner the user can still close."
|
|
212
|
+
},
|
|
213
|
+
"attribute": "dismissible",
|
|
214
|
+
"reflect": false,
|
|
215
|
+
"defaultValue": "false"
|
|
216
|
+
},
|
|
116
217
|
"duration": {
|
|
117
218
|
"type": "number",
|
|
118
219
|
"mutable": false,
|
|
@@ -134,7 +235,8 @@ export class EdsToast {
|
|
|
134
235
|
}
|
|
135
236
|
static get states() {
|
|
136
237
|
return {
|
|
137
|
-
"visible": {}
|
|
238
|
+
"visible": {},
|
|
239
|
+
"hasActions": {}
|
|
138
240
|
};
|
|
139
241
|
}
|
|
140
242
|
static get events() {
|