@ebrains/components 3.0.0 → 3.1.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} +847 -207
- 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 +9 -2
- 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-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 +181 -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 +1 -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 +1 -1
- 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 +1 -1
- package/dist/collection/components/eds-accordion/eds-accordion.stories.js +7 -19
- 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 +13 -6
- 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-cta/eds-card-cta.css +10 -1
- package/dist/collection/components/eds-cards/eds-card-cta/eds-card-cta.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-feature/eds-card-feature.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-hero/eds-card-hero.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-stat/eds-card-stat.js +1 -1
- package/dist/collection/components/eds-charts/eds-gauge/eds-gauge.js +1 -1
- 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 +173 -76
- package/dist/collection/components/eds-footer/eds-footer.stories.js +108 -15
- package/dist/collection/components/eds-form/eds-form.css +37 -1
- package/dist/collection/components/eds-form/eds-form.js +45 -7
- 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 +1 -1
- 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 +29 -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.js +1 -1
- package/dist/collection/components/eds-input-elements/eds-input-range/eds-input-range.js +1 -1
- 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 +2 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +11 -5
- package/dist/collection/components/eds-input-field/eds-input-field.stories.js +82 -130
- package/dist/collection/components/eds-input-file/eds-input-file.js +1 -1
- package/dist/collection/components/eds-link/eds-link.js +1 -1
- package/dist/collection/components/eds-link/eds-link.stories.js +13 -8
- package/dist/collection/components/eds-logo/eds-logo.js +1 -1
- package/dist/collection/components/eds-modal/eds-modal.stories.js +9 -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-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-v2/eds-steps-v2.js +1 -1
- package/dist/collection/components/eds-table/eds-table.css +21 -4
- package/dist/collection/components/eds-table/eds-table.js +17 -50
- package/dist/collection/components/eds-table/eds-table.stories.js +5 -109
- package/dist/collection/components/eds-tabs/eds-tabs.css +7 -1
- package/dist/collection/components/eds-tabs/eds-tabs.js +47 -9
- 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-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 +1 -1
- package/dist/collection/components/eds-user/eds-user.js +1 -1
- 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 +1 -1
- 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 +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/horizontal/logo-variations-horizontal.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-variations/vertical/logo-variations-vertical.js +1 -1
- package/dist/collection/eds-docs-ui/logo/logo-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 +8 -1
- 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 +62 -6
- 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 +257 -0
- 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-search-select/eds-search-select.css +203 -0
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.js +685 -0
- package/dist/collection/shared-ui/eds-search-select/eds-search-select.stories.js +85 -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 +321 -0
- package/dist/collection/shared-ui/eds-trl-badge/eds-trl-badge.stories.js +96 -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 +39 -0
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +3 -4
- 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 +2 -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 +12 -5
- package/dist/components/eds-card-cta.js +2 -2
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-feature.js +1 -1
- package/dist/components/eds-card-generic2.js +1 -1
- package/dist/components/eds-card-hero.js +1 -1
- package/dist/components/eds-card-stat.js +1 -1
- package/dist/components/eds-code-block2.js +1 -1
- 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 +115 -26
- package/dist/components/eds-form.js +61 -23
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gauge.js +1 -1
- package/dist/components/eds-gitlab-contributors.js +9 -2
- package/dist/components/eds-global-search.js +48 -69
- 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 +1 -1
- package/dist/components/eds-input-field2.js +25 -25
- package/dist/components/eds-input-file2.js +1 -1
- package/dist/components/eds-input-footer2.js +43 -3
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +1 -1
- package/dist/components/eds-input-search.js +100 -1
- package/dist/components/eds-input-select2.js +2 -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 +221 -0
- package/dist/components/eds-kg-web-services-select2.js +16 -22
- package/dist/components/eds-link2.js +1 -1
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-matomo-notice2.js +8 -2
- package/dist/components/eds-nps2.js +4 -4
- package/dist/components/eds-pagination2.js +2 -2
- 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 +361 -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 +1 -1
- package/dist/components/eds-table2.js +31 -53
- package/dist/components/eds-tabs.js +48 -10
- 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-tooltip2.js +1 -1
- package/dist/components/eds-trl-badge.d.ts +11 -0
- package/dist/components/eds-trl-badge.js +204 -0
- package/dist/components/eds-user.js +1 -1
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +19 -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-00ba405d.entry.js +1 -0
- package/dist/components/p-03342030.entry.js +1 -0
- package/dist/components/{p-0fe10e6c.entry.js → p-0e2bac0f.entry.js} +1 -1
- package/dist/components/{p-7aa4edef.entry.js → p-12acc48d.entry.js} +1 -1
- package/dist/components/p-18399fe1.entry.js +1 -0
- package/dist/components/p-1e6f0572.entry.js +1 -0
- package/dist/components/{p-c46675c8.entry.js → p-1fbcc480.entry.js} +1 -1
- package/dist/components/{p-dfe93385.entry.js → p-25729ade.entry.js} +1 -1
- package/dist/components/p-27e093c3.entry.js +1 -0
- package/dist/components/{p-a6dc1f88.entry.js → p-37ef07d9.entry.js} +1 -1
- package/dist/components/{p-74b9c9a8.entry.js → p-3d1bb2fe.entry.js} +1 -1
- package/dist/components/{p-940a2d42.entry.js → p-42791331.entry.js} +1 -1
- package/dist/components/p-5ff4b1d0.entry.js +1 -0
- package/dist/components/{p-d16b5363.entry.js → p-62580004.entry.js} +1 -1
- package/dist/components/{p-d2576747.entry.js → p-62f53e7a.entry.js} +1 -1
- package/dist/components/p-6be1730a.entry.js +1 -0
- package/dist/components/p-786ff09b.entry.js +1 -0
- package/dist/components/p-80a32e20.entry.js +1 -0
- package/dist/components/p-85476a6f.entry.js +9 -0
- package/dist/components/{p-a63e14bb.entry.js → p-8a483358.entry.js} +1 -1
- package/dist/components/{p-04e9c2d7.entry.js → p-b1a10842.entry.js} +1 -1
- package/dist/components/p-bdcb71e1.entry.js +1 -0
- package/dist/components/p-c2127276.entry.js +1 -0
- package/dist/components/p-c3ee9163.entry.js +1 -0
- package/dist/components/{p-f55dd314.entry.js → p-c4cfbf98.entry.js} +1 -1
- package/dist/components/p-c65082fe.entry.js +1 -0
- package/dist/components/p-cc096938.entry.js +1 -0
- package/dist/components/p-d59d6fda.entry.js +1 -0
- package/dist/components/p-e027bc90.entry.js +1 -0
- package/dist/components/{p-f364296f.entry.js → p-e339d0b5.entry.js} +1 -1
- package/dist/components/{p-0d7aee0b.entry.js → p-e4df206e.entry.js} +1 -1
- package/dist/components/{p-c2fc62f7.entry.js → p-e71a4f29.entry.js} +1 -1
- package/dist/components/{p-773bd015.entry.js → p-e9e6ec19.entry.js} +1 -1
- package/dist/components/p-f4d2f882.entry.js +1 -0
- package/dist/components/{p-d1b3aa52.entry.js → p-f9a9fa34.entry.js} +1 -1
- 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 +1 -1
- 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} +846 -207
- 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 +9 -2
- 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-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 +177 -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 +1 -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 +1 -1
- package/dist/hydrate/index.js +1222 -207
- package/dist/hydrate/index.mjs +1222 -207
- 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 +10 -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-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.d.ts +507 -86
- 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-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-7b93a385.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-f88b5f21.entry.js +0 -1
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
let cachedData = null;
|
|
3
|
+
let cacheTimestamp = 0;
|
|
4
|
+
const CACHE_TTL = 10 * 60 * 1000;
|
|
5
|
+
export class EdsKgLearningResources {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.apiEndpoint = '/api/v1/kg/learning-resources/cached';
|
|
8
|
+
this.resolveNames = true;
|
|
9
|
+
this.size = 500;
|
|
10
|
+
this.heading = '';
|
|
11
|
+
this.variant = 'inverse';
|
|
12
|
+
this.loading = false;
|
|
13
|
+
this.error = '';
|
|
14
|
+
this.software = [];
|
|
15
|
+
this.meta = null;
|
|
16
|
+
this.filterType = '';
|
|
17
|
+
this.filterLevel = '';
|
|
18
|
+
this.searchQuery = '';
|
|
19
|
+
}
|
|
20
|
+
componentWillLoad() {
|
|
21
|
+
this.fetchData();
|
|
22
|
+
}
|
|
23
|
+
async fetchData() {
|
|
24
|
+
const now = Date.now();
|
|
25
|
+
if (cachedData && (now - cacheTimestamp) < CACHE_TTL) {
|
|
26
|
+
this.software = cachedData;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
this.loading = true;
|
|
30
|
+
this.error = '';
|
|
31
|
+
try {
|
|
32
|
+
const params = new URLSearchParams({
|
|
33
|
+
size: this.size.toString(),
|
|
34
|
+
resolve_names: this.resolveNames.toString(),
|
|
35
|
+
});
|
|
36
|
+
const response = await fetch(`${this.apiEndpoint}?${params}`);
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
throw new Error(`Failed to fetch: ${response.statusText}`);
|
|
39
|
+
}
|
|
40
|
+
const data = await response.json();
|
|
41
|
+
this.software = data.data || [];
|
|
42
|
+
this.meta = data.meta || null;
|
|
43
|
+
cachedData = this.software;
|
|
44
|
+
cacheTimestamp = now;
|
|
45
|
+
}
|
|
46
|
+
catch (err) {
|
|
47
|
+
this.error = err instanceof Error ? err.message : 'Failed to load learning resources';
|
|
48
|
+
}
|
|
49
|
+
finally {
|
|
50
|
+
this.loading = false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
getFilteredSoftware() {
|
|
54
|
+
let filtered = this.software;
|
|
55
|
+
if (this.filterType) {
|
|
56
|
+
filtered = filtered.filter(sw => sw.learning_resources_types.includes(this.filterType));
|
|
57
|
+
}
|
|
58
|
+
if (this.filterLevel) {
|
|
59
|
+
filtered = filtered.filter(sw => sw.learning_resources_levels.includes(this.filterLevel));
|
|
60
|
+
}
|
|
61
|
+
if (this.searchQuery) {
|
|
62
|
+
const q = this.searchQuery.toLowerCase();
|
|
63
|
+
filtered = filtered.filter(sw => sw.name.toLowerCase().includes(q) ||
|
|
64
|
+
sw.learning_resources.some(lr => {
|
|
65
|
+
var _a, _b;
|
|
66
|
+
return ((_a = lr.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(q)) ||
|
|
67
|
+
((_b = lr.abstract) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(q));
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
return filtered;
|
|
71
|
+
}
|
|
72
|
+
getFilteredResources(resources) {
|
|
73
|
+
let filtered = resources;
|
|
74
|
+
if (this.filterType) {
|
|
75
|
+
filtered = filtered.filter(lr => lr.type === this.filterType);
|
|
76
|
+
}
|
|
77
|
+
if (this.filterLevel) {
|
|
78
|
+
filtered = filtered.filter(lr => lr.educational_level === this.filterLevel);
|
|
79
|
+
}
|
|
80
|
+
return filtered;
|
|
81
|
+
}
|
|
82
|
+
/* TODO: Uncomment when filters are enabled
|
|
83
|
+
private getAllTypes(): string[] {
|
|
84
|
+
const types = new Set<string>();
|
|
85
|
+
this.software.forEach(sw =>
|
|
86
|
+
sw.learning_resources_types.forEach(t => types.add(t))
|
|
87
|
+
);
|
|
88
|
+
return Array.from(types).sort();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private getAllLevels(): string[] {
|
|
92
|
+
const levels = new Set<string>();
|
|
93
|
+
this.software.forEach(sw =>
|
|
94
|
+
sw.learning_resources_levels.forEach(l => levels.add(l))
|
|
95
|
+
);
|
|
96
|
+
return Array.from(levels).sort();
|
|
97
|
+
}
|
|
98
|
+
*/
|
|
99
|
+
getTagIntent(type) {
|
|
100
|
+
const map = {
|
|
101
|
+
'interactive tutorial': 'brand',
|
|
102
|
+
'video tutorial': 'primary',
|
|
103
|
+
'user documentation': 'dark',
|
|
104
|
+
'video presentation': 'inverse',
|
|
105
|
+
'slide deck': 'strong',
|
|
106
|
+
};
|
|
107
|
+
return map[type] || 'brand-dark';
|
|
108
|
+
}
|
|
109
|
+
getLevelTagIntent(level) {
|
|
110
|
+
const map = {
|
|
111
|
+
'beginner': 'brand',
|
|
112
|
+
'intermediate': 'dark',
|
|
113
|
+
'advanced': 'strong',
|
|
114
|
+
};
|
|
115
|
+
return map[level] || 'brand-dark';
|
|
116
|
+
}
|
|
117
|
+
renderAccordionDescription(sw) {
|
|
118
|
+
const count = sw.learning_resources_count;
|
|
119
|
+
const types = sw.learning_resources_types.join(', ');
|
|
120
|
+
return `${count} resource${count !== 1 ? 's' : ''} — ${types}`;
|
|
121
|
+
}
|
|
122
|
+
renderResources(sw) {
|
|
123
|
+
const filtered = this.getFilteredResources(sw.learning_resources);
|
|
124
|
+
return (h("div", { class: "resources-content" }, sw.kg_search_url && (h("div", { class: "kg-link" }, h("eds-link", { url: sw.kg_search_url, label: "View in EBRAINS Knowledge Graph", intent: "cta", external: true }))), h("table", { class: "resources-table" }, h("thead", null, h("tr", null, h("th", { class: "col-name" }, "Name"), h("th", { class: "col-type" }, "Type"), h("th", { class: "col-level" }, "Level"))), h("tbody", null, filtered.map(lr => (h("tr", { class: `resource-row ${lr.iri ? 'resource-row--clickable' : ''}`, onClick: () => {
|
|
125
|
+
if (lr.iri) {
|
|
126
|
+
window.open(lr.iri, '_blank', 'noopener,noreferrer');
|
|
127
|
+
}
|
|
128
|
+
} }, h("td", { class: "col-name" }, h("span", { class: "resource-name" }, lr.name || 'Untitled'), lr.abstract && (h("p", { class: "resource-desc" }, lr.abstract))), h("td", { class: "col-type" }, lr.type && (h("eds-tag", { label: lr.type, intent: this.getTagIntent(lr.type), size: "medium" }))), h("td", { class: "col-level" }, lr.educational_level && (h("eds-tag", { label: lr.educational_level, intent: this.getLevelTagIntent(lr.educational_level), size: "medium" })))))))), filtered.length === 0 && (h("p", { class: "no-results" }, "No resources match the current filters."))));
|
|
129
|
+
}
|
|
130
|
+
render() {
|
|
131
|
+
// Always render the same outer scaffold (header + content area) so the
|
|
132
|
+
// heading sits in identical position across loading / error / loaded
|
|
133
|
+
// states and the spinner appears where the accordion list will render.
|
|
134
|
+
const filtered = !this.loading && !this.error ? this.getFilteredSoftware() : [];
|
|
135
|
+
// const allTypes = this.getAllTypes();
|
|
136
|
+
// const allLevels = this.getAllLevels();
|
|
137
|
+
return (h("div", { key: '154b59a74cb32996f1bee10ee7758d916bebdd43', class: "lr-container" }, h("div", { key: '0c5c04b65f0c4e4c032b1b1a7d96e98fd6775563', class: "lr-header" }, h("h2", { key: '01ef66537b31a63521f0406cd2ec9976b532d18f', class: "lr-heading" }, this.heading)), this.loading && (h("div", { key: '134ca8e5f7349127b40aa1ae0967cd12dc12cc0b', class: "loading", role: "status", "aria-live": "polite" }, h("eds-spinner", { key: 'a3a0621b6ea041f8da4ef6f36c1688974f3c5591', size: "sm", variant: "primary", background: "transparent", message: "Loading learning resources..." }))), this.error && !this.loading && (h("eds-alert", { key: 'a0334442c175374daf8ce2be4da60ac004e4d0e2', intent: "error", message: this.error })), !this.loading && !this.error && (h("div", { key: 'f2b8244f1ee5c052cabd5eec8cbfc36d06f4d08d', class: "accordion-list" }, filtered.map(sw => (h("eds-accordion", { heading: sw.name, description: this.renderAccordionDescription(sw), variant: this.variant, icon: "book", switchBg: true, clampText: false }, this.renderResources(sw)))), filtered.length === 0 && (h("p", { key: 'd572c9eb76279c93ba2bd5f0fae20b4e1d9fc816', class: "no-results" }, "No software matches the current filters."))))));
|
|
138
|
+
}
|
|
139
|
+
static get is() { return "eds-kg-learning-resources"; }
|
|
140
|
+
static get encapsulation() { return "shadow"; }
|
|
141
|
+
static get originalStyleUrls() {
|
|
142
|
+
return {
|
|
143
|
+
"$": ["eds-kg-learning-resources.css"]
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
static get styleUrls() {
|
|
147
|
+
return {
|
|
148
|
+
"$": ["eds-kg-learning-resources.css"]
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
static get properties() {
|
|
152
|
+
return {
|
|
153
|
+
"apiEndpoint": {
|
|
154
|
+
"type": "string",
|
|
155
|
+
"mutable": false,
|
|
156
|
+
"complexType": {
|
|
157
|
+
"original": "string",
|
|
158
|
+
"resolved": "string",
|
|
159
|
+
"references": {}
|
|
160
|
+
},
|
|
161
|
+
"required": false,
|
|
162
|
+
"optional": false,
|
|
163
|
+
"docs": {
|
|
164
|
+
"tags": [],
|
|
165
|
+
"text": "API endpoint for fetching learning resources"
|
|
166
|
+
},
|
|
167
|
+
"attribute": "api-endpoint",
|
|
168
|
+
"reflect": false,
|
|
169
|
+
"defaultValue": "'/api/v1/kg/learning-resources/cached'"
|
|
170
|
+
},
|
|
171
|
+
"resolveNames": {
|
|
172
|
+
"type": "boolean",
|
|
173
|
+
"mutable": false,
|
|
174
|
+
"complexType": {
|
|
175
|
+
"original": "boolean",
|
|
176
|
+
"resolved": "boolean",
|
|
177
|
+
"references": {}
|
|
178
|
+
},
|
|
179
|
+
"required": false,
|
|
180
|
+
"optional": false,
|
|
181
|
+
"docs": {
|
|
182
|
+
"tags": [],
|
|
183
|
+
"text": "Whether to resolve software names"
|
|
184
|
+
},
|
|
185
|
+
"attribute": "resolve-names",
|
|
186
|
+
"reflect": false,
|
|
187
|
+
"defaultValue": "true"
|
|
188
|
+
},
|
|
189
|
+
"size": {
|
|
190
|
+
"type": "number",
|
|
191
|
+
"mutable": false,
|
|
192
|
+
"complexType": {
|
|
193
|
+
"original": "number",
|
|
194
|
+
"resolved": "number",
|
|
195
|
+
"references": {}
|
|
196
|
+
},
|
|
197
|
+
"required": false,
|
|
198
|
+
"optional": false,
|
|
199
|
+
"docs": {
|
|
200
|
+
"tags": [],
|
|
201
|
+
"text": "Max resources to fetch"
|
|
202
|
+
},
|
|
203
|
+
"attribute": "size",
|
|
204
|
+
"reflect": false,
|
|
205
|
+
"defaultValue": "500"
|
|
206
|
+
},
|
|
207
|
+
"heading": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"mutable": false,
|
|
210
|
+
"complexType": {
|
|
211
|
+
"original": "string",
|
|
212
|
+
"resolved": "string",
|
|
213
|
+
"references": {}
|
|
214
|
+
},
|
|
215
|
+
"required": false,
|
|
216
|
+
"optional": false,
|
|
217
|
+
"docs": {
|
|
218
|
+
"tags": [],
|
|
219
|
+
"text": "Component heading"
|
|
220
|
+
},
|
|
221
|
+
"attribute": "heading",
|
|
222
|
+
"reflect": false,
|
|
223
|
+
"defaultValue": "''"
|
|
224
|
+
},
|
|
225
|
+
"variant": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"mutable": false,
|
|
228
|
+
"complexType": {
|
|
229
|
+
"original": "'default' | 'inverse'",
|
|
230
|
+
"resolved": "\"default\" | \"inverse\"",
|
|
231
|
+
"references": {}
|
|
232
|
+
},
|
|
233
|
+
"required": false,
|
|
234
|
+
"optional": false,
|
|
235
|
+
"docs": {
|
|
236
|
+
"tags": [],
|
|
237
|
+
"text": "Visual variant for accordions and cards"
|
|
238
|
+
},
|
|
239
|
+
"attribute": "variant",
|
|
240
|
+
"reflect": false,
|
|
241
|
+
"defaultValue": "'inverse'"
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
static get states() {
|
|
246
|
+
return {
|
|
247
|
+
"loading": {},
|
|
248
|
+
"error": {},
|
|
249
|
+
"software": {},
|
|
250
|
+
"meta": {},
|
|
251
|
+
"filterType": {},
|
|
252
|
+
"filterLevel": {},
|
|
253
|
+
"searchQuery": {}
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
static get elementRef() { return "el"; }
|
|
257
|
+
}
|
|
@@ -1,113 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
padding: 0.25rem;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.p-6 {
|
|
26
|
-
padding: 0.375rem;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.p-8 {
|
|
30
|
-
padding: 0.5rem;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.z-10 {
|
|
34
|
-
z-index: 10;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.z-\[999999\] {
|
|
38
|
-
z-index: 999999;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.left-0 {
|
|
42
|
-
left: 0rem;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.left-1\/2 {
|
|
46
|
-
left: 50%;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.grow {
|
|
50
|
-
flex-grow: 1;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.-translate-x-1\/2 {
|
|
54
|
-
--tw-translate-x: -50%;
|
|
55
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.-translate-y-1\/2 {
|
|
59
|
-
--tw-translate-y: -50%;
|
|
60
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.items-center {
|
|
64
|
-
align-items: center;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.justify-center {
|
|
68
|
-
justify-content: center;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.justify-between {
|
|
72
|
-
justify-content: space-between;
|
|
1
|
+
/*
|
|
2
|
+
* eds-matomo-notice is presentation-only: it renders the consent accordion
|
|
3
|
+
* and its buttons. The host application is responsible for positioning
|
|
4
|
+
* (fixed banner, centered card, modal, etc.). See
|
|
5
|
+
* packages/shared-hugo/layouts/_default/baseof.html for the default
|
|
6
|
+
* bottom-centered card wrapper used by handbook/eds-docs.
|
|
7
|
+
*
|
|
8
|
+
* The classes below are only the ones actually applied inside the
|
|
9
|
+
* shadow root — utility classes from the host page don't pierce shadow
|
|
10
|
+
* DOM, so they must be declared here.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
:host {
|
|
14
|
+
display: block;
|
|
15
|
+
background-color: var(--white, #FFFFFF);
|
|
16
|
+
/* Match the inner eds-accordion card radius (16px). A smaller host radius
|
|
17
|
+
clips the accordion's rounded border, making it look like the border
|
|
18
|
+
extends past the corners (in both the resting and hover states). */
|
|
19
|
+
border-radius: 16px;
|
|
20
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
21
|
+
overflow: hidden;
|
|
73
22
|
}
|
|
74
23
|
|
|
75
24
|
.flex {
|
|
76
25
|
display: flex;
|
|
77
26
|
}
|
|
78
27
|
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.gap-20 {
|
|
84
|
-
gap: 1.25rem;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.gap-4 {
|
|
88
|
-
gap: 0.25rem;
|
|
28
|
+
.items-center {
|
|
29
|
+
align-items: center;
|
|
89
30
|
}
|
|
90
31
|
|
|
91
32
|
.gap-8 {
|
|
92
33
|
gap: 0.5rem;
|
|
93
34
|
}
|
|
94
|
-
|
|
95
|
-
@media (min-width: 750px) {
|
|
96
|
-
.md\:left-1\/2 {
|
|
97
|
-
left: 50%;
|
|
98
|
-
}
|
|
99
|
-
.md\:flex {
|
|
100
|
-
display: flex;
|
|
101
|
-
}
|
|
102
|
-
.md\:hidden {
|
|
103
|
-
display: none;
|
|
104
|
-
}
|
|
105
|
-
.md\:-translate-x-1\/2 {
|
|
106
|
-
--tw-translate-x: -50%;
|
|
107
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
108
|
-
}
|
|
109
|
-
.md\:-translate-y-1\/2 {
|
|
110
|
-
--tw-translate-y: -50%;
|
|
111
|
-
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
112
|
-
}
|
|
113
|
-
}
|
|
@@ -106,7 +106,13 @@ export class EdsMatomoNotice {
|
|
|
106
106
|
if (!this.showNotice) {
|
|
107
107
|
return null;
|
|
108
108
|
}
|
|
109
|
-
return (
|
|
109
|
+
return (
|
|
110
|
+
// Content-only render — no positioning, no overlay, no sizing.
|
|
111
|
+
// The host application wraps this component in whatever positioned
|
|
112
|
+
// container makes sense (fixed bottom banner, modal, sidebar slot,
|
|
113
|
+
// etc.). See packages/shared-hugo/layouts/_default/baseof.html for
|
|
114
|
+
// the bottom-centered card wrapper used by handbook/eds-docs.
|
|
115
|
+
h("div", null, h("eds-accordion", { title: this.heading, description: this.hasCookieConsent() ? this.optOutMessage : this.description, switchBg: true, expanded: true }, this.hasCookieConsent() ? (h("div", { class: "flex items-center gap-8" }, this.optedOut() ? (h("eds-button", { intent: "brand", label: "Opt me in again", pill: true, "aria-label": "Opt me in again", onClick: () => this.optInAnalytics() })) : (h("eds-button", { intent: "brand", label: "Keep Me In", pill: true, "aria-label": "Keep Me In", onClick: () => this.keepMeIn() })), h("eds-button", { intent: "ghost", label: "Opt-out", pill: true, "aria-label": "Opt-out from analytics", onClick: () => this.optOutAnalytics() }))) : (h("div", { class: "flex items-center gap-8" }, h("eds-button", { intent: "brand", pill: true, label: "I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() }), h("eds-button", { intent: "ghost", pill: true, label: "No, thanks", "aria-label": "Opt-out from analytics", onClick: () => this.noThanks() }))))));
|
|
110
116
|
}
|
|
111
117
|
static get is() { return "eds-matomo-notice"; }
|
|
112
118
|
static get encapsulation() { return "shadow"; }
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
/* eds-search-select — shadow:true, fully self-contained (the global Tailwind
|
|
2
|
+
`.input` / utility classes can't pierce the shadow boundary, so everything is
|
|
3
|
+
replicated here). Design-token CSS variables DO inherit through shadow, so we
|
|
4
|
+
use the same tokens eds-input-field uses → identical look. The `.eds-ss__input`
|
|
5
|
+
rules below are a 1:1 copy of the compiled `.input` rule from eds-input-field. */
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
width: 100%;
|
|
10
|
+
font-family: var(--f-ui-02-fontFamily, 'IBM Plex Sans', system-ui, sans-serif);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.eds-ss {
|
|
14
|
+
position: relative;
|
|
15
|
+
display: block;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Label row: label left, hint pushed top-right (mirrors eds-input-field's
|
|
20
|
+
`flex justify-between mb-4`). */
|
|
21
|
+
.eds-ss__labelrow {
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: space-between;
|
|
24
|
+
margin-bottom: 0.25rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.eds-ss__hint {
|
|
28
|
+
margin-top: 0.5rem; /* mt-8 */
|
|
29
|
+
margin-left: 0.5rem; /* ml-8 */
|
|
30
|
+
font-family: var(--f-ui-05-fontFamily);
|
|
31
|
+
font-weight: var(--f-ui-05-fontWeight);
|
|
32
|
+
font-size: var(--f-ui-05-fontSize);
|
|
33
|
+
line-height: var(--f-ui-05-lineHeight);
|
|
34
|
+
letter-spacing: var(--f-ui-05-letterSpacing);
|
|
35
|
+
color: var(--grey-600);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.eds-ss__control {
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ---- The bordered box: 1:1 with the compiled EDS `.input` ----
|
|
43
|
+
In multi mode it flex-wraps tags + the input; in single mode it holds just
|
|
44
|
+
the input. The box owns the border/radius/height/focus so it looks identical
|
|
45
|
+
to an eds-input-field. */
|
|
46
|
+
.eds-ss__box {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-wrap: wrap;
|
|
49
|
+
align-items: center;
|
|
50
|
+
gap: 0.35rem;
|
|
51
|
+
width: 100%;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
min-height: 2.5rem;
|
|
54
|
+
padding: 6px 0.75rem;
|
|
55
|
+
/* extra right room for the clear + chevron-box overlay */
|
|
56
|
+
padding-right: 3.75rem;
|
|
57
|
+
border-width: 2px;
|
|
58
|
+
border-style: solid;
|
|
59
|
+
border-color: rgba(0, 0, 0, 0.1);
|
|
60
|
+
border-radius: 8px;
|
|
61
|
+
background: var(--white, #fff);
|
|
62
|
+
transition-property: color, background-color, border-color;
|
|
63
|
+
transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
64
|
+
transition-duration: 300ms;
|
|
65
|
+
}
|
|
66
|
+
.eds-ss__box:hover { border-color: var(--brand-black); }
|
|
67
|
+
.eds-ss__box:focus-within {
|
|
68
|
+
border-color: var(--brand-black);
|
|
69
|
+
outline: 3px solid var(--brand-green);
|
|
70
|
+
outline-offset: 2px;
|
|
71
|
+
}
|
|
72
|
+
.eds-ss__box.is-error { border-color: var(--red-700); }
|
|
73
|
+
.eds-ss__box.is-disabled {
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
background-color: var(--grey-300);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* The actual text input — transparent/borderless inside the box. */
|
|
79
|
+
.eds-ss__input {
|
|
80
|
+
flex: 1;
|
|
81
|
+
min-width: 6rem;
|
|
82
|
+
border: none;
|
|
83
|
+
outline: none;
|
|
84
|
+
background: transparent;
|
|
85
|
+
padding: 4px 0;
|
|
86
|
+
color: var(--brand-black);
|
|
87
|
+
font-family: var(--f-ui-02-light-fontFamily);
|
|
88
|
+
font-weight: var(--f-ui-02-light-fontWeight);
|
|
89
|
+
font-size: var(--f-ui-02-light-fontSize);
|
|
90
|
+
line-height: var(--f-ui-02-light-lineHeight);
|
|
91
|
+
letter-spacing: var(--f-ui-02-light-letterSpacing);
|
|
92
|
+
}
|
|
93
|
+
.eds-ss__input::placeholder { color: var(--grey-500); }
|
|
94
|
+
.eds-ss__input:disabled { cursor: not-allowed; color: var(--grey-500); }
|
|
95
|
+
|
|
96
|
+
/* ---- Selected tags (multi-select) ---- */
|
|
97
|
+
.eds-ss__chip {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 0.35rem;
|
|
101
|
+
padding: 4px 0.4rem 4px 0.7rem;
|
|
102
|
+
background: rgba(0, 200, 123, 0.12);
|
|
103
|
+
color: var(--brand-green-dark, #00A867);
|
|
104
|
+
border-radius: 6px;
|
|
105
|
+
font-family: var(--f-ui-02-fontFamily);
|
|
106
|
+
font-size: var(--f-ui-02-fontSize);
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
line-height: 1.4;
|
|
109
|
+
max-width: 100%;
|
|
110
|
+
}
|
|
111
|
+
.eds-ss__chip-label {
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
text-overflow: ellipsis;
|
|
114
|
+
white-space: nowrap;
|
|
115
|
+
}
|
|
116
|
+
.eds-ss__chip-x {
|
|
117
|
+
flex-shrink: 0;
|
|
118
|
+
border: none;
|
|
119
|
+
background: none;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
color: var(--brand-green-dark, #00A867);
|
|
122
|
+
font-size: 1.2rem;
|
|
123
|
+
line-height: 1;
|
|
124
|
+
padding: 0 2px;
|
|
125
|
+
}
|
|
126
|
+
.eds-ss__chip-x:hover { color: var(--brand-black, #07140D); }
|
|
127
|
+
|
|
128
|
+
/* ---- Clear + chevron overlay (right side of the input) ---- */
|
|
129
|
+
.eds-ss__clear,
|
|
130
|
+
.eds-ss__chevron {
|
|
131
|
+
position: absolute;
|
|
132
|
+
top: 50%;
|
|
133
|
+
transform: translateY(-50%);
|
|
134
|
+
}
|
|
135
|
+
/* Grey rounded box + icon — same affordance as eds-input-select (bg-dark =
|
|
136
|
+
--grey-300, rounded-xs = 4px). The icon inherits currentColor. */
|
|
137
|
+
.eds-ss__chevron {
|
|
138
|
+
right: 6px;
|
|
139
|
+
width: 1.75rem;
|
|
140
|
+
height: 1.75rem;
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: center;
|
|
144
|
+
background-color: var(--grey-300);
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
color: var(--brand-black);
|
|
147
|
+
pointer-events: none;
|
|
148
|
+
}
|
|
149
|
+
.eds-ss__clear {
|
|
150
|
+
right: 2.6rem; /* just left of the chevron box */
|
|
151
|
+
color: var(--grey-600, #6e6e6e);
|
|
152
|
+
background: none;
|
|
153
|
+
border: none;
|
|
154
|
+
cursor: pointer;
|
|
155
|
+
font-size: 1.05rem;
|
|
156
|
+
line-height: 1;
|
|
157
|
+
}
|
|
158
|
+
.eds-ss__clear:hover { color: var(--brand-black, #07140D); }
|
|
159
|
+
|
|
160
|
+
/* ---- Dropdown list: EDS tokens + the f-ui-02 body typography of inputs ---- */
|
|
161
|
+
.eds-ss__list {
|
|
162
|
+
position: absolute;
|
|
163
|
+
z-index: 50;
|
|
164
|
+
left: 0;
|
|
165
|
+
right: 0;
|
|
166
|
+
margin: 0.25rem 0 0;
|
|
167
|
+
padding: 0.25rem;
|
|
168
|
+
list-style: none;
|
|
169
|
+
max-height: 18rem;
|
|
170
|
+
overflow-y: auto;
|
|
171
|
+
background: var(--white, #fff);
|
|
172
|
+
border: 2px solid rgba(0, 0, 0, 0.1);
|
|
173
|
+
border-radius: 8px;
|
|
174
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.eds-ss__option {
|
|
178
|
+
padding: 0.5rem 0.6rem;
|
|
179
|
+
border-radius: 6px;
|
|
180
|
+
cursor: pointer;
|
|
181
|
+
color: var(--brand-black, #07140D);
|
|
182
|
+
font-family: var(--f-ui-02-fontFamily);
|
|
183
|
+
font-size: var(--f-ui-02-fontSize);
|
|
184
|
+
line-height: var(--f-ui-02-lineHeight);
|
|
185
|
+
letter-spacing: var(--f-ui-02-letterSpacing);
|
|
186
|
+
}
|
|
187
|
+
.eds-ss__option.is-active { background: rgba(0, 200, 123, 0.1); }
|
|
188
|
+
.eds-ss__option.is-selected { font-weight: 600; color: var(--brand-green-dark, #00A867); }
|
|
189
|
+
|
|
190
|
+
.eds-ss__status,
|
|
191
|
+
.eds-ss__more {
|
|
192
|
+
padding: 0.5rem 0.6rem;
|
|
193
|
+
font-family: var(--f-ui-05-fontFamily);
|
|
194
|
+
font-size: var(--f-ui-05-fontSize);
|
|
195
|
+
line-height: var(--f-ui-05-lineHeight);
|
|
196
|
+
color: var(--grey-600, #6e6e6e);
|
|
197
|
+
}
|
|
198
|
+
.eds-ss__status.is-error { color: var(--red-700, #d64545); }
|
|
199
|
+
.eds-ss__more {
|
|
200
|
+
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
|
201
|
+
margin-top: 0.25rem;
|
|
202
|
+
font-style: italic;
|
|
203
|
+
}
|