@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,90 @@
|
|
|
1
|
+
const SAMPLE_OPTIONS = [
|
|
2
|
+
{ label: 'Austria', value: 'AT' },
|
|
3
|
+
{ label: 'Belgium', value: 'BE' },
|
|
4
|
+
{ label: 'France', value: 'FR' },
|
|
5
|
+
{ label: 'Germany', value: 'DE' },
|
|
6
|
+
{ label: 'Greece', value: 'GR' },
|
|
7
|
+
{ label: 'Italy', value: 'IT' },
|
|
8
|
+
{ label: 'Netherlands', value: 'NL' },
|
|
9
|
+
{ label: 'Spain', value: 'ES' },
|
|
10
|
+
{ label: 'Sweden', value: 'SE' },
|
|
11
|
+
{ label: 'Switzerland', value: 'CH' }
|
|
12
|
+
];
|
|
13
|
+
export default {
|
|
14
|
+
title: 'Components/Inputs/Search Select',
|
|
15
|
+
component: 'eds-search-select',
|
|
16
|
+
argTypes: {
|
|
17
|
+
name: { control: 'text', description: 'Name attribute for form submission.' },
|
|
18
|
+
label: { control: 'text', description: 'Field label.' },
|
|
19
|
+
placeholder: { control: 'text', description: 'Placeholder text.' },
|
|
20
|
+
hint: { control: 'text', description: 'Hint shown next to the label.' },
|
|
21
|
+
message: { control: 'text', description: 'Message shown below the field.' },
|
|
22
|
+
required: { control: 'boolean', description: 'If true, the field is required.' },
|
|
23
|
+
disabled: { control: 'boolean', description: 'If true, the field is disabled.' },
|
|
24
|
+
error: { control: 'boolean', description: 'Render the field in an error state.' },
|
|
25
|
+
errorMessage: { control: 'text', description: 'Error message shown when invalid.' },
|
|
26
|
+
multiple: { control: 'boolean', description: 'Allow selecting multiple values (renders tags).' },
|
|
27
|
+
options: {
|
|
28
|
+
control: 'object',
|
|
29
|
+
description: 'Inline options [{ label, value }]. Provide EITHER this OR `source` (a vetted server dataset name).'
|
|
30
|
+
},
|
|
31
|
+
source: {
|
|
32
|
+
control: 'text',
|
|
33
|
+
description: 'Named server dataset queried via the datasets API (e.g. "countries", "nationalities"). Requires the unified-api; leave empty to use inline `options`.'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
args: {
|
|
37
|
+
name: 'country',
|
|
38
|
+
label: 'Country',
|
|
39
|
+
placeholder: 'Search…',
|
|
40
|
+
required: false,
|
|
41
|
+
disabled: false,
|
|
42
|
+
error: false,
|
|
43
|
+
multiple: false,
|
|
44
|
+
options: SAMPLE_OPTIONS
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
// Build the element imperatively so `options` is assigned as a real array prop.
|
|
48
|
+
const renderSelect = (args) => {
|
|
49
|
+
const el = document.createElement('eds-search-select');
|
|
50
|
+
el.name = args.name;
|
|
51
|
+
if (args.label) {
|
|
52
|
+
el.label = args.label;
|
|
53
|
+
}
|
|
54
|
+
if (args.placeholder) {
|
|
55
|
+
el.placeholder = args.placeholder;
|
|
56
|
+
}
|
|
57
|
+
if (args.hint) {
|
|
58
|
+
el.hint = args.hint;
|
|
59
|
+
}
|
|
60
|
+
if (args.message) {
|
|
61
|
+
el.message = args.message;
|
|
62
|
+
}
|
|
63
|
+
el.required = !!args.required;
|
|
64
|
+
el.disabled = !!args.disabled;
|
|
65
|
+
el.error = !!args.error;
|
|
66
|
+
if (args.errorMessage) {
|
|
67
|
+
el.errorMessage = args.errorMessage;
|
|
68
|
+
}
|
|
69
|
+
el.multiple = !!args.multiple;
|
|
70
|
+
if (args.source) {
|
|
71
|
+
el.source = args.source;
|
|
72
|
+
}
|
|
73
|
+
else if (args.options) {
|
|
74
|
+
el.options = args.options;
|
|
75
|
+
}
|
|
76
|
+
return el;
|
|
77
|
+
};
|
|
78
|
+
/** Single-select with inline options (no backend required). */
|
|
79
|
+
export const Default = {
|
|
80
|
+
render: renderSelect
|
|
81
|
+
};
|
|
82
|
+
/** Multi-select — selected values render as removable tags. */
|
|
83
|
+
export const Multiple = {
|
|
84
|
+
render: renderSelect,
|
|
85
|
+
args: {
|
|
86
|
+
name: 'countries',
|
|
87
|
+
label: 'Countries',
|
|
88
|
+
multiple: true
|
|
89
|
+
}
|
|
90
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Official EBRAINS sphere mark, extracted from
|
|
4
|
+
* packages/assets/EBRAINS_logo_25/new_ebrains_logo_rgb/250901_new_ebrains_logo_rgb_positive.svg
|
|
5
|
+
* (the gradient-filled wave segments only — wordmark dropped).
|
|
6
|
+
*
|
|
7
|
+
* Gradient ids carry a `__UID__` placeholder so each badge instance can
|
|
8
|
+
* namespace them (no <defs> collisions when several badges share a page).
|
|
9
|
+
* Gradient template inheritance uses SVG2 `href` (no xlink namespace needed).
|
|
10
|
+
* Use markDefs() inside the badge <defs> and markGroup() in the body.
|
|
11
|
+
*/
|
|
12
|
+
const MARK_DEFS = `<linearGradient id="__UID__Unbenannter_Verlauf_29" x1="-26.7" y1="64.8" x2="155" y2="-19.9" gradientUnits="userSpaceOnUse"> <stop offset="0" stop-color="#03a98f"/> <stop offset=".1" stop-color="#10a97b"/> <stop offset=".3" stop-color="#23aa5f"/> <stop offset="1" stop-color="#00ff9d"/> </linearGradient><linearGradient id="__UID__Unbenannter_Verlauf_291" x1="38.6" y1="205" x2="220.3" y2="120.2" href="#__UID__Unbenannter_Verlauf_29"/><linearGradient id="__UID__Unbenannter_Verlauf_292" x1="33" y1="193" x2="214.8" y2="108.3" href="#__UID__Unbenannter_Verlauf_29"/><linearGradient id="__UID__Unbenannter_Verlauf_293" x1="-3.5" y1="114.7" x2="178.3" y2="30" href="#__UID__Unbenannter_Verlauf_29"/><linearGradient id="__UID__Unbenannter_Verlauf_294" x1="4.5" y1="131.8" x2="186.2" y2="47.1" href="#__UID__Unbenannter_Verlauf_29"/><linearGradient id="__UID__Unbenannter_Verlauf_295" x1="28.6" y1="183.6" x2="210.4" y2="98.9" href="#__UID__Unbenannter_Verlauf_29"/><linearGradient id="__UID__Unbenannter_Verlauf_296" x1="3.8" y1="130.3" x2="185.5" y2="45.5" href="#__UID__Unbenannter_Verlauf_29"/><linearGradient id="__UID__Unbenannter_Verlauf_297" x1="18" y1="160.6" x2="199.7" y2="75.9" href="#__UID__Unbenannter_Verlauf_29"/>`;
|
|
13
|
+
const MARK_PATHS = `<path fill="url(#__UID__Unbenannter_Verlauf_29)" d="M67.3,19.9c11.2-2.3,22.5-1,32.1,1.5.8.2,1.2-.8.5-1.3-11.6-7.3-20.9-11.4-26.6-13.5l-18.3,4.9c-3.4.9-6.4,2.7-8.9,5.1l-29.6,29.6c-2.5,2.5-4.2,5.5-5.1,8.9l-.7,2.6c1.7-1.5,3.4-3.2,5.2-4.9,12.6-12,29.9-28.4,51.3-32.9Z"/><path fill="url(#__UID__Unbenannter_Verlauf_291)" d="M33.8,172.2l12.3,12.3c2.5,2.5,5.5,4.2,8.9,5.1l40.4,10.8c3.4.9,6.9.9,10.2,0l40.4-10.8c3.4-.9,6.4-2.7,8.9-5.1l2.8-2.8c-80-32.2-119-12.3-123.9-9.5Z"/><path fill="url(#__UID__Unbenannter_Verlauf_292)" d="M97.7,137.4c-25.1.2-51.1.4-78.8,19.8l10.5,10.5h.1c2-1.5,42.4-27.9,132.8,9.1h.2c0,.1,18.6-18.4,18.6-18.4-7.8-2.8-58.6-21-83.1-21h-.3Z"/><path fill="url(#__UID__Unbenannter_Verlauf_293)" d="M137.2,41h0c2.6,2.4,5.3,5,8,7.7,26.3,26.3,43.8,37.2,53.9,41.8l-9.5-35.5c-.9-3.4-2.7-6.4-5.1-8.9l-29.6-29.6c-2.5-2.5-5.5-4.2-8.9-5.1L105.7.7c-3.4-.9-6.9-.9-10.2,0l-12.1,3.2c12.4,5.6,31.5,16.5,53.7,37,0,0,.1.1.2.2Z"/><path fill="url(#__UID__Unbenannter_Verlauf_294)" d="M132.7,86.1c4.9,1.6,26.3,12,26.3,12,1.7.7,7.3,3.3,8.9,4.1.7.3,1.3-.6.8-1.1-1.5-1.4-5.8-5-10.9-8.6,0,0-21.8-15.4-27.2-18.5-7.8-4.3-47.4-26.7-81.3-10C25.8,75.6,8,89.7.6,96c-.8,3.2-.7,6.5.1,9.7l3.4,12.8c7.2-6.7,20.2-17.2,40.4-28.2,35.4-19.2,61.9-12.8,88.2-4.2Z"/><path fill="url(#__UID__Unbenannter_Verlauf_295)" d="M55.9,128c-3.1,1.7-17.5,10.3-17.5,10.3,0,0-4.9,3-.2,1.9,2-.5,7.8-3.1,9.7-3.6,0,0,19.1-7,49.8-5.4.1,0,.2,0,.4,0,27.6,0,84.2,21,86.6,21.9l1.1.5c1.8-2.2,3.2-4.7,3.9-7.5l2.7-10.2c-14.1-5.9-55.1-22.3-81-22.3s-55.3,14.3-55.5,14.4Z"/><path fill="url(#__UID__Unbenannter_Verlauf_296)" d="M131.7,44.5c-2-1.7-4.9-3.9-8.5-6.3-1.8-1.3-3.6-2.3-5.4-3.2-8.1-4.1-29.1-13.1-49.2-9-19.7,4.1-35.5,19.2-48.2,31.3-4.7,4.5-8.7,8.3-12.4,11.1l-4.6,17.2c9.4-7.4,24.4-18,43.2-27.2,36.9-18.1,79.2,5.4,87.3,10.3,12.1,7.3,47.9,34.4,64,46.8l2.6-9.8c.7-2.5.8-5,.5-7.5-10.4-3.8-29.7-14.5-60.2-45-3.1-3.1-6.1-5.9-9.1-8.6Z"/><path fill="url(#__UID__Unbenannter_Verlauf_297)" d="M47.5,95.8c-22.1,12-35.5,23.6-41.5,29.6l5.5,20.7c.3,1.2.8,2.4,1.4,3.5,9.5-9.3,38.6-26.3,39.8-27,1-.6,25.6-15.3,58.7-15.3s67.5,16,82.6,22.4l1.1-4.2c-9.9-6.7-37.4-24.5-64.4-33.5-24.9-8.3-50-14.3-83.2,3.8Z"/>`;
|
|
14
|
+
/** Gradient <defs> for the mark, namespaced with `uid`. */
|
|
15
|
+
export function markDefs(uid) {
|
|
16
|
+
return MARK_DEFS.replace(/__UID__/g, uid);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The mark paths wrapped in a positioned, scaled group.
|
|
20
|
+
* The source artwork lives in a ~201×201 canvas; `size` is the rendered px.
|
|
21
|
+
*/
|
|
22
|
+
export function markGroup(uid, x, y, size = 16) {
|
|
23
|
+
const s = (size / 201.1).toFixed(4);
|
|
24
|
+
const paths = MARK_PATHS.replace(/__UID__/g, uid);
|
|
25
|
+
return `<g transform="translate(${x},${y}) scale(${s})">${paths}</g>`;
|
|
26
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* ============================================
|
|
2
|
+
EDS TRL BADGE — EBRAINS visual system
|
|
3
|
+
Renders a self-contained inline SVG (colours/fonts baked into the
|
|
4
|
+
markup so it embeds identically anywhere). The host only handles
|
|
5
|
+
layout + the optional link wrapper.
|
|
6
|
+
============================================ */
|
|
7
|
+
|
|
8
|
+
:host {
|
|
9
|
+
display: inline-block;
|
|
10
|
+
line-height: 0; /* no descender gap under the inline SVG */
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.link {
|
|
14
|
+
display: inline-block;
|
|
15
|
+
line-height: 0;
|
|
16
|
+
text-decoration: none;
|
|
17
|
+
color: inherit;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.link svg {
|
|
21
|
+
display: block;
|
|
22
|
+
}
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { markDefs, markGroup } from "./ebrains-mark";
|
|
3
|
+
let _uid = 0;
|
|
4
|
+
/**
|
|
5
|
+
* `EdsTrlBadge` — public EBRAINS TRL badge, aligned with the EBRAINS visual
|
|
6
|
+
* system (Black `#07140D`, Green `#00FF9D`, Dark Green `#00C87B`, Grey
|
|
7
|
+
* `#7A7B7A`, IBM Plex Mono) and using the **official EBRAINS sphere mark**.
|
|
8
|
+
*
|
|
9
|
+
* Renders a self-contained inline `<svg>` (same markup the server-side
|
|
10
|
+
* `badge.svg` endpoint emits), so it embeds anywhere and stays crisp.
|
|
11
|
+
*
|
|
12
|
+
* Variants:
|
|
13
|
+
* - `tone` — CI-style label + value pill (dark or light `theme`).
|
|
14
|
+
* - `full` — single bar with the full string.
|
|
15
|
+
* - `pill` — compact rounded "TRL 7".
|
|
16
|
+
* - `outline` — thin border, transparent fill, mono caps (dark or light).
|
|
17
|
+
* - `scale` — nine readiness pips showing position on the 1–9 scale.
|
|
18
|
+
*
|
|
19
|
+
* The value/pip colour encodes maturity within the brand palette:
|
|
20
|
+
* TRL 7–9 → green, 4–6 → dark green, 1–3 → grey.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* <eds-trl-badge level={7} assessed="2026-06" methodology="v8.2"></eds-trl-badge>
|
|
24
|
+
* <eds-trl-badge level={7} variant="outline" theme="light"></eds-trl-badge>
|
|
25
|
+
* <eds-trl-badge level={7} variant="scale" size={32}></eds-trl-badge>
|
|
26
|
+
*/
|
|
27
|
+
export class EdsTrlBadge {
|
|
28
|
+
constructor() {
|
|
29
|
+
/** Per-instance suffix so the mark's gradient ids never collide. */
|
|
30
|
+
this.uid = `trl${++_uid}-`;
|
|
31
|
+
this.level = undefined;
|
|
32
|
+
this.assessed = undefined;
|
|
33
|
+
this.methodology = undefined;
|
|
34
|
+
this.theme = 'dark';
|
|
35
|
+
this.variant = 'tone';
|
|
36
|
+
this.size = undefined;
|
|
37
|
+
this.label = 'EBRAINS TRL';
|
|
38
|
+
this.href = undefined;
|
|
39
|
+
}
|
|
40
|
+
esc(s) {
|
|
41
|
+
return String(s).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
42
|
+
}
|
|
43
|
+
/** Maturity tier → value/pip colour (brand palette). */
|
|
44
|
+
levelColor() {
|
|
45
|
+
const n = Number(this.level);
|
|
46
|
+
if (n >= 7) {
|
|
47
|
+
return '#00FF9D';
|
|
48
|
+
}
|
|
49
|
+
if (n >= 4) {
|
|
50
|
+
return '#00C87B';
|
|
51
|
+
}
|
|
52
|
+
return '#7A7B7A';
|
|
53
|
+
}
|
|
54
|
+
/** Readable value text on a coloured segment (black on green, light on grey). */
|
|
55
|
+
valueText() {
|
|
56
|
+
return Number(this.level) >= 4 ? '#07140D' : '#ECECEC';
|
|
57
|
+
}
|
|
58
|
+
fullText() {
|
|
59
|
+
const parts = [`${this.label} ${this.level}`];
|
|
60
|
+
if (this.assessed) {
|
|
61
|
+
parts.push(`assessed ${this.assessed}`);
|
|
62
|
+
}
|
|
63
|
+
if (this.methodology) {
|
|
64
|
+
parts.push(`methodology ${this.methodology}`);
|
|
65
|
+
}
|
|
66
|
+
return parts.join(' · ');
|
|
67
|
+
}
|
|
68
|
+
/** Build the inner markup + intrinsic dimensions for the chosen variant. */
|
|
69
|
+
build() {
|
|
70
|
+
const CW = EdsTrlBadge.CW;
|
|
71
|
+
const uid = this.uid;
|
|
72
|
+
const clip = `${uid}clip`;
|
|
73
|
+
const valColor = this.levelColor();
|
|
74
|
+
const logoSpace = 28; // 8 margin + ~16 mark + 4 gap
|
|
75
|
+
const mono = `font-family="'IBM Plex Mono',monospace"`;
|
|
76
|
+
const lvl = this.esc(String(this.level));
|
|
77
|
+
if (this.variant === 'full') {
|
|
78
|
+
const tail = (this.assessed ? ` · assessed ${this.esc(this.assessed)}` : '') +
|
|
79
|
+
(this.methodology ? ` · methodology ${this.esc(this.methodology)}` : '');
|
|
80
|
+
const w = Math.ceil(logoSpace + this.fullText().length * CW + 10);
|
|
81
|
+
const inner = `<defs><clipPath id="${clip}"><rect width="${w}" height="24" rx="6"/></clipPath>${markDefs(uid)}</defs>` +
|
|
82
|
+
`<g clip-path="url(#${clip})"><rect width="${w}" height="24" fill="#07140D"/></g>${markGroup(uid, 8, 4, 16)}` +
|
|
83
|
+
`<text x="30" y="15.5" ${mono} font-size="11" letter-spacing=".2">` +
|
|
84
|
+
`<tspan fill="#ECECEC">${this.esc(this.label)} </tspan>` +
|
|
85
|
+
`<tspan fill="${valColor}" font-weight="600">${lvl}</tspan>` +
|
|
86
|
+
`<tspan fill="#7A7B7A">${this.esc(tail)}</tspan></text>`;
|
|
87
|
+
return { w, h: 24, inner };
|
|
88
|
+
}
|
|
89
|
+
if (this.variant === 'pill') {
|
|
90
|
+
const txt = `TRL ${this.level}`;
|
|
91
|
+
const w = Math.ceil(logoSpace + txt.length * CW + 14);
|
|
92
|
+
const tx = logoSpace + (w - logoSpace) / 2 - 4;
|
|
93
|
+
const inner = `<defs>${markDefs(uid)}</defs>` +
|
|
94
|
+
`<rect width="${w}" height="24" rx="12" fill="#07140D"/>${markGroup(uid, 7, 4, 16)}` +
|
|
95
|
+
`<text x="${tx}" y="16" ${mono} font-size="11" font-weight="500" letter-spacing=".5" text-anchor="middle">` +
|
|
96
|
+
`<tspan fill="#ECECEC">TRL </tspan><tspan fill="${valColor}" font-weight="600">${lvl}</tspan></text>`;
|
|
97
|
+
return { w, h: 24, inner };
|
|
98
|
+
}
|
|
99
|
+
if (this.variant === 'outline') {
|
|
100
|
+
const dark = this.theme !== 'light';
|
|
101
|
+
const bg = dark ? '#0c1c14' : '#ffffff';
|
|
102
|
+
const stroke = dark ? '#34473d' : '#07140D';
|
|
103
|
+
const labelColor = dark ? '#ECECEC' : '#07140D';
|
|
104
|
+
const sep = dark ? '#5a6b62' : '#9aa39d';
|
|
105
|
+
const value = dark ? valColor : Number(this.level) >= 4 ? '#00966a' : '#7A7B7A';
|
|
106
|
+
const w = Math.ceil(logoSpace + `${this.label} · ${this.level}`.length * CW + 12);
|
|
107
|
+
const inner = `<defs>${markDefs(uid)}</defs>` +
|
|
108
|
+
`<rect x=".5" y=".5" width="${w - 1}" height="23" rx="6" fill="${bg}" stroke="${stroke}"/>${markGroup(uid, 8, 4, 16)}` +
|
|
109
|
+
`<text x="30" y="16" ${mono} font-size="11" letter-spacing=".3">` +
|
|
110
|
+
`<tspan fill="${labelColor}">${this.esc(this.label)} </tspan>` +
|
|
111
|
+
`<tspan fill="${sep}">· </tspan>` +
|
|
112
|
+
`<tspan fill="${value}" font-weight="600">${lvl}</tspan></text>`;
|
|
113
|
+
return { w, h: 24, inner };
|
|
114
|
+
}
|
|
115
|
+
if (this.variant === 'scale') {
|
|
116
|
+
const dark = this.theme !== 'light';
|
|
117
|
+
const bg = dark ? '#07140D' : '#ECECEC';
|
|
118
|
+
const labelColor = dark ? '#ECECEC' : '#07140D';
|
|
119
|
+
const emptyPip = dark ? '#2f4339' : '#c4ccc7';
|
|
120
|
+
const sep = dark ? '#5a6b62' : '#9aa39d';
|
|
121
|
+
const n = Math.max(0, Math.min(9, Number(this.level) || 0));
|
|
122
|
+
const pipStart = Math.ceil(30 + this.label.length * CW + 12);
|
|
123
|
+
const pipStep = 9, pipW = 6, pipH = 8, pipY = 9;
|
|
124
|
+
let pips = '';
|
|
125
|
+
for (let i = 0; i < 9; i++) {
|
|
126
|
+
const x = pipStart + i * pipStep;
|
|
127
|
+
pips += `<rect x="${x}" y="${pipY}" width="${pipW}" height="${pipH}" rx="1" fill="${i < n ? valColor : emptyPip}"/>`;
|
|
128
|
+
}
|
|
129
|
+
const valueX = pipStart + 9 * pipStep + 5;
|
|
130
|
+
const w = Math.ceil(valueX + `${this.level}/9`.length * CW + 8);
|
|
131
|
+
const inner = `<defs>${markDefs(uid)}</defs>` +
|
|
132
|
+
`<rect width="${w}" height="26" rx="6" fill="${bg}"/>${markGroup(uid, 8, 5, 16)}` +
|
|
133
|
+
`<text x="30" y="17" ${mono} font-size="11" letter-spacing=".3" fill="${labelColor}">${this.esc(this.label)}</text>` +
|
|
134
|
+
`<g>${pips}</g>` +
|
|
135
|
+
`<text x="${valueX}" y="17" ${mono} font-size="11" font-weight="500">` +
|
|
136
|
+
`<tspan fill="${valColor}">${lvl}</tspan><tspan fill="${sep}">/9</tspan></text>`;
|
|
137
|
+
return { w, h: 26, inner };
|
|
138
|
+
}
|
|
139
|
+
// tone (default) — dark or light theme
|
|
140
|
+
const dark = this.theme !== 'light';
|
|
141
|
+
const labelBg = dark ? '#07140D' : '#ECECEC';
|
|
142
|
+
const labelTextColor = dark ? '#ECECEC' : '#07140D';
|
|
143
|
+
const valTextColor = dark ? this.valueText() : '#07140D';
|
|
144
|
+
const labelSegW = Math.ceil(logoSpace + this.label.length * CW + 12);
|
|
145
|
+
const valSegW = Math.ceil(12 + String(this.level).length * CW + 12);
|
|
146
|
+
const w = labelSegW + valSegW;
|
|
147
|
+
const inner = `<defs><clipPath id="${clip}"><rect width="${w}" height="24" rx="6"/></clipPath>${markDefs(uid)}</defs>` +
|
|
148
|
+
`<g clip-path="url(#${clip})"><rect width="${labelSegW}" height="24" fill="${labelBg}"/>` +
|
|
149
|
+
`<rect x="${labelSegW}" width="${valSegW}" height="24" fill="${valColor}"/></g>${markGroup(uid, 8, 4, 16)}` +
|
|
150
|
+
`<text x="${logoSpace + (labelSegW - logoSpace) / 2}" y="16" ${mono} font-size="11" letter-spacing=".4" fill="${labelTextColor}" text-anchor="middle">${this.esc(this.label)}</text>` +
|
|
151
|
+
`<text x="${labelSegW + valSegW / 2}" y="16" ${mono} font-size="11" font-weight="600" fill="${valTextColor}" text-anchor="middle">${lvl}</text>`;
|
|
152
|
+
return { w, h: 24, inner };
|
|
153
|
+
}
|
|
154
|
+
buildSvg() {
|
|
155
|
+
const { w, h, inner } = this.build();
|
|
156
|
+
const aria = this.esc(this.fullText());
|
|
157
|
+
const k = this.size ? this.size / h : 1;
|
|
158
|
+
const outW = Math.round(w * k);
|
|
159
|
+
const outH = Math.round(h * k);
|
|
160
|
+
return (`<svg xmlns="http://www.w3.org/2000/svg" width="${outW}" height="${outH}" ` +
|
|
161
|
+
`viewBox="0 0 ${w} ${h}" role="img" aria-label="${aria}"><title>${aria}</title>${inner}</svg>`);
|
|
162
|
+
}
|
|
163
|
+
render() {
|
|
164
|
+
const svg = this.buildSvg();
|
|
165
|
+
return (h(Host, { key: '8da5cadf8dc1cef28dd16902013905bfefdd67aa' }, this.href ? (h("a", { class: "link", href: this.href, "aria-label": this.fullText(), innerHTML: svg })) : (h("span", { class: "link", innerHTML: svg }))));
|
|
166
|
+
}
|
|
167
|
+
static get is() { return "eds-trl-badge"; }
|
|
168
|
+
static get encapsulation() { return "shadow"; }
|
|
169
|
+
static get originalStyleUrls() {
|
|
170
|
+
return {
|
|
171
|
+
"$": ["eds-trl-badge.css"]
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
static get styleUrls() {
|
|
175
|
+
return {
|
|
176
|
+
"$": ["eds-trl-badge.css"]
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
static get properties() {
|
|
180
|
+
return {
|
|
181
|
+
"level": {
|
|
182
|
+
"type": "number",
|
|
183
|
+
"mutable": false,
|
|
184
|
+
"complexType": {
|
|
185
|
+
"original": "number",
|
|
186
|
+
"resolved": "number",
|
|
187
|
+
"references": {}
|
|
188
|
+
},
|
|
189
|
+
"required": true,
|
|
190
|
+
"optional": false,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": "TRL level, 1\u20139."
|
|
194
|
+
},
|
|
195
|
+
"attribute": "level",
|
|
196
|
+
"reflect": false
|
|
197
|
+
},
|
|
198
|
+
"assessed": {
|
|
199
|
+
"type": "string",
|
|
200
|
+
"mutable": false,
|
|
201
|
+
"complexType": {
|
|
202
|
+
"original": "string",
|
|
203
|
+
"resolved": "string",
|
|
204
|
+
"references": {}
|
|
205
|
+
},
|
|
206
|
+
"required": false,
|
|
207
|
+
"optional": true,
|
|
208
|
+
"docs": {
|
|
209
|
+
"tags": [],
|
|
210
|
+
"text": "Assessment month, e.g. \"2026-06\"."
|
|
211
|
+
},
|
|
212
|
+
"attribute": "assessed",
|
|
213
|
+
"reflect": false
|
|
214
|
+
},
|
|
215
|
+
"methodology": {
|
|
216
|
+
"type": "string",
|
|
217
|
+
"mutable": false,
|
|
218
|
+
"complexType": {
|
|
219
|
+
"original": "string",
|
|
220
|
+
"resolved": "string",
|
|
221
|
+
"references": {}
|
|
222
|
+
},
|
|
223
|
+
"required": false,
|
|
224
|
+
"optional": true,
|
|
225
|
+
"docs": {
|
|
226
|
+
"tags": [],
|
|
227
|
+
"text": "Methodology version, e.g. \"v8.2\"."
|
|
228
|
+
},
|
|
229
|
+
"attribute": "methodology",
|
|
230
|
+
"reflect": false
|
|
231
|
+
},
|
|
232
|
+
"theme": {
|
|
233
|
+
"type": "string",
|
|
234
|
+
"mutable": false,
|
|
235
|
+
"complexType": {
|
|
236
|
+
"original": "'dark' | 'light'",
|
|
237
|
+
"resolved": "\"dark\" | \"light\"",
|
|
238
|
+
"references": {}
|
|
239
|
+
},
|
|
240
|
+
"required": false,
|
|
241
|
+
"optional": false,
|
|
242
|
+
"docs": {
|
|
243
|
+
"tags": [],
|
|
244
|
+
"text": "Colour theme for the `tone` / `outline` / `scale` variants."
|
|
245
|
+
},
|
|
246
|
+
"attribute": "theme",
|
|
247
|
+
"reflect": false,
|
|
248
|
+
"defaultValue": "'dark'"
|
|
249
|
+
},
|
|
250
|
+
"variant": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"mutable": false,
|
|
253
|
+
"complexType": {
|
|
254
|
+
"original": "'tone' | 'full' | 'pill' | 'outline' | 'scale'",
|
|
255
|
+
"resolved": "\"full\" | \"outline\" | \"pill\" | \"scale\" | \"tone\"",
|
|
256
|
+
"references": {}
|
|
257
|
+
},
|
|
258
|
+
"required": false,
|
|
259
|
+
"optional": false,
|
|
260
|
+
"docs": {
|
|
261
|
+
"tags": [],
|
|
262
|
+
"text": "'tone' | 'full' | 'pill' | 'outline' | 'scale'."
|
|
263
|
+
},
|
|
264
|
+
"attribute": "variant",
|
|
265
|
+
"reflect": false,
|
|
266
|
+
"defaultValue": "'tone'"
|
|
267
|
+
},
|
|
268
|
+
"size": {
|
|
269
|
+
"type": "number",
|
|
270
|
+
"mutable": false,
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "number",
|
|
273
|
+
"resolved": "number",
|
|
274
|
+
"references": {}
|
|
275
|
+
},
|
|
276
|
+
"required": false,
|
|
277
|
+
"optional": true,
|
|
278
|
+
"docs": {
|
|
279
|
+
"tags": [],
|
|
280
|
+
"text": "Rendered height in px. Scales the whole badge crisply (viewBox is fixed)."
|
|
281
|
+
},
|
|
282
|
+
"attribute": "size",
|
|
283
|
+
"reflect": false
|
|
284
|
+
},
|
|
285
|
+
"label": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "string",
|
|
290
|
+
"resolved": "string",
|
|
291
|
+
"references": {}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": false,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [],
|
|
297
|
+
"text": "Left-segment / leading label."
|
|
298
|
+
},
|
|
299
|
+
"attribute": "label",
|
|
300
|
+
"reflect": false,
|
|
301
|
+
"defaultValue": "'EBRAINS TRL'"
|
|
302
|
+
},
|
|
303
|
+
"href": {
|
|
304
|
+
"type": "string",
|
|
305
|
+
"mutable": false,
|
|
306
|
+
"complexType": {
|
|
307
|
+
"original": "string",
|
|
308
|
+
"resolved": "string",
|
|
309
|
+
"references": {}
|
|
310
|
+
},
|
|
311
|
+
"required": false,
|
|
312
|
+
"optional": true,
|
|
313
|
+
"docs": {
|
|
314
|
+
"tags": [],
|
|
315
|
+
"text": "Optional link (methodology or service page)."
|
|
316
|
+
},
|
|
317
|
+
"attribute": "href",
|
|
318
|
+
"reflect": false
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
// IBM Plex Mono advance width at 11px (used to size segments to the text).
|
|
324
|
+
EdsTrlBadge.CW = 6.8;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Shared UI/TRL Badge',
|
|
3
|
+
component: 'eds-trl-badge',
|
|
4
|
+
argTypes: {
|
|
5
|
+
level: { control: { type: 'number', min: 1, max: 9 }, description: 'TRL level (1–9).' },
|
|
6
|
+
assessed: { control: 'text', description: 'Assessment month, e.g. "2026-06".' },
|
|
7
|
+
methodology: { control: 'text', description: 'Methodology version, e.g. "v8.2".' },
|
|
8
|
+
theme: { control: 'select', options: ['dark', 'light'], description: 'Theme (tone/outline/scale).' },
|
|
9
|
+
variant: { control: 'select', options: ['tone', 'full', 'pill', 'outline', 'scale'], description: 'Badge shape.' },
|
|
10
|
+
size: {
|
|
11
|
+
control: { type: 'number', min: 16, max: 96 },
|
|
12
|
+
description: 'Rendered height in px (scales the whole badge).'
|
|
13
|
+
},
|
|
14
|
+
href: { control: 'text', description: 'Optional link.' },
|
|
15
|
+
label: { control: 'text', description: 'Leading label.' }
|
|
16
|
+
},
|
|
17
|
+
args: {
|
|
18
|
+
level: 7,
|
|
19
|
+
assessed: '2026-06',
|
|
20
|
+
methodology: 'v8.2',
|
|
21
|
+
theme: 'dark',
|
|
22
|
+
variant: 'tone',
|
|
23
|
+
size: undefined,
|
|
24
|
+
href: '',
|
|
25
|
+
label: 'EBRAINS TRL'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const render = (args) => `
|
|
29
|
+
<eds-trl-badge
|
|
30
|
+
level="${args.level}"
|
|
31
|
+
assessed="${args.assessed || ''}"
|
|
32
|
+
methodology="${args.methodology || ''}"
|
|
33
|
+
theme="${args.theme}"
|
|
34
|
+
variant="${args.variant}"
|
|
35
|
+
${args.size ? `size="${args.size}"` : ''}
|
|
36
|
+
href="${args.href || ''}"
|
|
37
|
+
label="${args.label}">
|
|
38
|
+
</eds-trl-badge>`;
|
|
39
|
+
export const ToneDark = { render };
|
|
40
|
+
export const ToneLight = { args: { theme: 'light' }, render };
|
|
41
|
+
export const FullMetadata = { args: { variant: 'full' }, render };
|
|
42
|
+
export const Pill = { args: { variant: 'pill' }, render };
|
|
43
|
+
export const OutlineDark = { args: { variant: 'outline' }, render };
|
|
44
|
+
export const OutlineLight = { args: { variant: 'outline', theme: 'light' }, render };
|
|
45
|
+
export const ReadinessScale = { args: { variant: 'scale' }, render };
|
|
46
|
+
export const Sized = { args: { variant: 'scale', size: 40 }, render };
|
|
47
|
+
export const MaturityTiers = {
|
|
48
|
+
render: () => `
|
|
49
|
+
<div style="display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:#07140D; padding:20px; border-radius:12px;">
|
|
50
|
+
<eds-trl-badge level="9" variant="scale"></eds-trl-badge>
|
|
51
|
+
<eds-trl-badge level="5" variant="scale"></eds-trl-badge>
|
|
52
|
+
<eds-trl-badge level="2" variant="scale"></eds-trl-badge>
|
|
53
|
+
</div>`
|
|
54
|
+
};
|
|
55
|
+
export const AllStories = {
|
|
56
|
+
render: () => `
|
|
57
|
+
<div style="display:flex; flex-wrap:wrap; gap:24px; padding:20px;">
|
|
58
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
59
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Tone Dark</p>
|
|
60
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="dark" variant="tone" label="EBRAINS TRL"></eds-trl-badge>
|
|
61
|
+
</div>
|
|
62
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
63
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Tone Light</p>
|
|
64
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="light" variant="tone" label="EBRAINS TRL"></eds-trl-badge>
|
|
65
|
+
</div>
|
|
66
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
67
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Full Metadata</p>
|
|
68
|
+
<eds-trl-badge level="7" assessed="2026-06" theme="dark" variant="full" label="EBRAINS TRL"></eds-trl-badge>
|
|
69
|
+
</div>
|
|
70
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
71
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Pill</p>
|
|
72
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="dark" variant="pill" label="EBRAINS TRL"></eds-trl-badge>
|
|
73
|
+
</div>
|
|
74
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
75
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Outline Dark</p>
|
|
76
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="dark" variant="outline" label="EBRAINS TRL"></eds-trl-badge>
|
|
77
|
+
</div>
|
|
78
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
79
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Outline Light</p>
|
|
80
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="light" variant="outline" label="EBRAINS TRL"></eds-trl-badge>
|
|
81
|
+
</div>
|
|
82
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
83
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Readiness Scale</p>
|
|
84
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="dark" variant="scale" label="EBRAINS TRL"></eds-trl-badge>
|
|
85
|
+
</div>
|
|
86
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
87
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Sized</p>
|
|
88
|
+
<eds-trl-badge level="7" assessed="2026-06" methodology="v8.2" theme="dark" variant="scale" size="40" label="EBRAINS TRL"></eds-trl-badge>
|
|
89
|
+
</div>
|
|
90
|
+
<div style="display:flex; flex-direction:column; gap:8px; min-width:220px;">
|
|
91
|
+
<p style="margin:0; font-weight:600; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:#5b6b62;">Maturity Tiers</p>
|
|
92
|
+
<div style="display:flex; gap:12px; align-items:center; flex-wrap:wrap; background:#07140D; padding:20px; border-radius:12px;">
|
|
93
|
+
<eds-trl-badge level="9" variant="scale"></eds-trl-badge>
|
|
94
|
+
<eds-trl-badge level="5" variant="scale"></eds-trl-badge>
|
|
95
|
+
<eds-trl-badge level="2" variant="scale"></eds-trl-badge>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>`
|
|
99
|
+
};
|
|
@@ -27,7 +27,7 @@ export class EdsAppRoot {
|
|
|
27
27
|
this.combinedInitPromise = Promise.all([initKeycloakPromise, authStatusPromise]);
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h("div", { key: '
|
|
30
|
+
return (h("div", { key: 'c856dc661c22b74baee69d195ef92ab1e24bceae' }, h("eds-splash-screen", { key: '62689cd4fdee56d667071bad596037342812b7a6', inverse: true, initPromise: this.combinedInitPromise }), h("eds-login", { key: 'af2257c63a00025dbddbc2bd4bc7c08391ead2aa', "keycloak-url": "http://localhost:8080", "keycloak-realm": "nigeor-realm", "keycloak-client-id": "stencil-app" }), h("main", { key: '8a2768437fb21855da535b8ea706f7cb3a17a36a' }, this.isAuthenticated ? h("h1", null, "Welcome, authenticated user!") : h("h1", null, "Please log in."))));
|
|
31
31
|
}
|
|
32
32
|
static get is() { return "eds-app-root"; }
|
|
33
33
|
static get encapsulation() { return "shadow"; }
|
|
@@ -43,7 +43,8 @@ isFieldVisible) {
|
|
|
43
43
|
delete errors[field.name];
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
|
-
|
|
46
|
+
// 'content' is a presentational text block — no input, never validated.
|
|
47
|
+
if (field.type !== 'hidden' && field.type !== 'content') {
|
|
47
48
|
if ((field.type === 'checkbox' || field.type === 'radio') && !field.options) {
|
|
48
49
|
// Single checkbox or radio without multiple options
|
|
49
50
|
const fieldErrors = validateSingleBox(field.name, field.required, formEl);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* safeInlineFormat — the single, audited text→HTML formatter used everywhere a
|
|
3
|
+
* form renders author-supplied text via innerHTML (form/step description, Text
|
|
4
|
+
* Blocks, and field messages).
|
|
5
|
+
*
|
|
6
|
+
* SECURITY: escape-first, then a tiny whitelisted inline subset. Because all of
|
|
7
|
+
* &, <, >, " are turned into entities BEFORE any markup is generated, author
|
|
8
|
+
* text can never inject a tag or attribute — the only HTML produced is the
|
|
9
|
+
* <strong>, <a> and <br> emitted here. Links are restricted to http/https/mailto
|
|
10
|
+
* (others fall back to plain text), URLs cannot contain whitespace or a quote,
|
|
11
|
+
* and external links get rel="noopener noreferrer".
|
|
12
|
+
*
|
|
13
|
+
* DO NOT reorder: escaping MUST happen before tag generation, or the guarantee
|
|
14
|
+
* breaks. Keep this in sync with the JS mirror in
|
|
15
|
+
* apps/live/forms-app/src/utils/descriptionFormat.ts.
|
|
16
|
+
*
|
|
17
|
+
* **bold** → <strong>bold</strong>
|
|
18
|
+
* [label](url) → <a href="url" …>label</a> (http/https/mailto only)
|
|
19
|
+
* newline → <br>
|
|
20
|
+
*/
|
|
21
|
+
export function safeInlineFormat(text) {
|
|
22
|
+
if (!text) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
let s = String(text).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
26
|
+
// bold
|
|
27
|
+
s = s.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>');
|
|
28
|
+
// links — safe schemes only; otherwise drop to the plain label
|
|
29
|
+
s = s.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (_m, label, url) => /^(https?:|mailto:)/i.test(url)
|
|
30
|
+
? `<a href="${url}" target="_blank" rel="noopener noreferrer" class="eds-desc-link">${label}</a>`
|
|
31
|
+
: label);
|
|
32
|
+
// newlines → line breaks
|
|
33
|
+
s = s.replace(/\n/g, '<br>');
|
|
34
|
+
return s;
|
|
35
|
+
}
|
|
@@ -150,7 +150,7 @@ const ComponentsSection$1 = /*@__PURE__*/ proxyCustomElement(class ComponentsSec
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
render() {
|
|
153
|
-
return h("div", { key: '
|
|
153
|
+
return h("div", { key: 'bc06ee85e7b45c9d45afa416ecb839c0a10aa576', class: "container" }, this.renderContent());
|
|
154
154
|
}
|
|
155
155
|
}, [0, "components-section", {
|
|
156
156
|
"tabIndex": [2, "tab-index"]
|