@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
|
@@ -45,7 +45,7 @@ const EdsInputRange = /*@__PURE__*/ proxyCustomElement(class EdsInputRange exten
|
|
|
45
45
|
render() {
|
|
46
46
|
var _a;
|
|
47
47
|
const currentValue = (_a = this.sliderVal) !== null && _a !== void 0 ? _a : Math.round(this.min + (this.max - this.min) / 2);
|
|
48
|
-
return (h("div", { key: '
|
|
48
|
+
return (h("div", { key: '231ae0f34900dfa3b8edeb9745ce07220735c613', class: "relative flex flex-col items-start" }, h("input", { key: '2cbfbbb410694a4764f44c26a74f4cbca9b98f3c', id: this.inputId || this.name, name: this.name, min: this.min, max: this.max, step: this.step, value: currentValue, required: this.required, disabled: this.disabled, type: "range", class: "w-full py-6 input", tabindex: "0", role: "slider", "aria-describedby": `desc_${this.name}`, "aria-valuemin": this.min, "aria-valuemax": this.max, "aria-valuenow": currentValue, onInput: this.onInput, onChange: this.onChange }), h("p", { key: '8e7036cbaeebb62c6cd4b7f2105d3fa487ad463e', id: `desc_${this.name}`, class: "block f-ui-05 mt-4 text-light" }, "Current value: ", currentValue)));
|
|
49
49
|
}
|
|
50
50
|
get el() { return this; }
|
|
51
51
|
static get watchers() { return {
|
|
@@ -1,4 +1,103 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as sendAnalytics } from './analytics.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './eds-icon-wrapper2.js';
|
|
4
|
+
|
|
5
|
+
const EdsInputSearch$1 = /*@__PURE__*/ proxyCustomElement(class EdsInputSearch extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.search = createEvent(this, "search", 7);
|
|
10
|
+
/**
|
|
11
|
+
* Keydown event listener to detect Command+K (Mac) or Ctrl+K (Windows/Linux)
|
|
12
|
+
* and focus the input element when triggered.
|
|
13
|
+
*
|
|
14
|
+
* @param e - The keyboard event.
|
|
15
|
+
*/
|
|
16
|
+
this.keydownListener = (e) => {
|
|
17
|
+
// Check for Command+K (Mac) or Ctrl+K (Windows/Linux)
|
|
18
|
+
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') {
|
|
19
|
+
e.preventDefault();
|
|
20
|
+
// Focus the input if it's available and not disabled
|
|
21
|
+
if (this.inputElement && !this.disabled) {
|
|
22
|
+
this.inputElement.focus();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
/*onInput = (e: any) => {
|
|
27
|
+
// eslint-disable-next-line
|
|
28
|
+
console.log('on input:', e);
|
|
29
|
+
};*/
|
|
30
|
+
this.onChange = (e) => {
|
|
31
|
+
// eslint-disable-next-line
|
|
32
|
+
this.search.emit({
|
|
33
|
+
event: 'change',
|
|
34
|
+
value: e.target.value
|
|
35
|
+
});
|
|
36
|
+
sendAnalytics({
|
|
37
|
+
category: 'ui-component',
|
|
38
|
+
parentContext: null,
|
|
39
|
+
tag: this.el.tagName.toLowerCase(),
|
|
40
|
+
name: e.target.value || '',
|
|
41
|
+
action: 'search'
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
this.name = undefined;
|
|
45
|
+
this.inputId = 'search-main';
|
|
46
|
+
this.placeholder = 'Search...';
|
|
47
|
+
this.value = undefined;
|
|
48
|
+
this.disabled = false;
|
|
49
|
+
this.required = false;
|
|
50
|
+
this.decorate = undefined;
|
|
51
|
+
this.label = 'Search';
|
|
52
|
+
}
|
|
53
|
+
componentDidLoad() {
|
|
54
|
+
// Assign the native input element after the component loads
|
|
55
|
+
this.inputElement = this.el.querySelector('input');
|
|
56
|
+
document.addEventListener('keydown', this.keydownListener);
|
|
57
|
+
}
|
|
58
|
+
disconnectedCallback() {
|
|
59
|
+
// Clean up the event listener when the component is removed
|
|
60
|
+
document.removeEventListener('keydown', this.keydownListener);
|
|
61
|
+
}
|
|
62
|
+
async getInputElement() {
|
|
63
|
+
// Return the native input element
|
|
64
|
+
return this.inputElement;
|
|
65
|
+
}
|
|
66
|
+
render() {
|
|
67
|
+
return (h("div", { key: '52676b3559e14b5153f7d8f0fa6cd12e49354d87', class: "relative flex items-center" }, h("eds-icon-wrapper", { key: '754e8753607c01dab63d156d306f3325547049aa', name: "search", class: "absolute top-1/2 left-[14px] -translate-y-1/2 text-lightest", "aria-hidden": "true" }), h("input", { key: 'b49d523195711316c0817de67776d379a6c7248b', id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.value || '', required: this.required, disabled: this.disabled, type: "search", "aria-label": this.placeholder, class: `input pl-36 ${this.decorate}`,
|
|
68
|
+
//onInput={this.onInput}
|
|
69
|
+
onChange: this.onChange })));
|
|
70
|
+
}
|
|
71
|
+
get el() { return this; }
|
|
72
|
+
}, [0, "eds-input-search", {
|
|
73
|
+
"name": [1],
|
|
74
|
+
"inputId": [1, "input-id"],
|
|
75
|
+
"placeholder": [1],
|
|
76
|
+
"value": [1],
|
|
77
|
+
"disabled": [4],
|
|
78
|
+
"required": [4],
|
|
79
|
+
"decorate": [1],
|
|
80
|
+
"label": [1],
|
|
81
|
+
"getInputElement": [64]
|
|
82
|
+
}]);
|
|
83
|
+
function defineCustomElement$1() {
|
|
84
|
+
if (typeof customElements === "undefined") {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
const components = ["eds-input-search", "eds-icon-wrapper"];
|
|
88
|
+
components.forEach(tagName => { switch (tagName) {
|
|
89
|
+
case "eds-input-search":
|
|
90
|
+
if (!customElements.get(tagName)) {
|
|
91
|
+
customElements.define(tagName, EdsInputSearch$1);
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case "eds-icon-wrapper":
|
|
95
|
+
if (!customElements.get(tagName)) {
|
|
96
|
+
defineCustomElement$2();
|
|
97
|
+
}
|
|
98
|
+
break;
|
|
99
|
+
} });
|
|
100
|
+
}
|
|
2
101
|
|
|
3
102
|
const EdsInputSearch = EdsInputSearch$1;
|
|
4
103
|
const defineCustomElement = defineCustomElement$1;
|
|
@@ -24,12 +24,12 @@ const EdsInputSelect = /*@__PURE__*/ proxyCustomElement(class EdsInputSelect ext
|
|
|
24
24
|
const selectId = this.inputId || this.name;
|
|
25
25
|
const placeholderText = this.placeholder || `Pick from the list`;
|
|
26
26
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : undefined;
|
|
27
|
-
return (h("div", { key: '
|
|
27
|
+
return (h("div", { key: '8365ffbc8f6f6386edfc1626d16c9152fd3cce9f', class: "relative" }, h("select", { key: '52e712898a3251cea5447a379886449175e7c8b8', id: selectId, name: this.name, class: {
|
|
28
28
|
input: true,
|
|
29
29
|
'input-error': this.error,
|
|
30
30
|
'px-4': true,
|
|
31
31
|
'py-2': true
|
|
32
|
-
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, h("option", { key: '
|
|
32
|
+
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, h("option", { key: 'd52c376ffb683abc0dec72177dba445273d148f7', value: "", disabled: true, selected: !this.value || this.value === '' }, placeholderText), this.options.map((opt, index) => (h("option", { key: index, value: opt.value, selected: opt.value === this.value }, opt.label)))), h("span", { key: 'fecbcb47793f8a57de44711b33d3650be5297aa7', class: "bg-dark rounded-xs absolute top-1/2 right-[6px] flex h-28 w-28 -translate-y-1/2 items-center justify-center" }, h("eds-icon-wrapper", { key: '4fda1345a62eeb212093057382d877f31bb6112d', class: "w-20 h-20", name: "chevron-right" }))));
|
|
33
33
|
}
|
|
34
34
|
}, [0, "eds-input-select", {
|
|
35
35
|
"inputId": [1, "input-id"],
|
|
@@ -29,6 +29,7 @@ const EdsInput = /*@__PURE__*/ proxyCustomElement(class EdsInput extends HTMLEle
|
|
|
29
29
|
this.min = undefined;
|
|
30
30
|
this.max = undefined;
|
|
31
31
|
this.step = undefined;
|
|
32
|
+
this.inputTabIndex = undefined;
|
|
32
33
|
this.innerVal = '';
|
|
33
34
|
this.maxLengthReached = false;
|
|
34
35
|
}
|
|
@@ -51,7 +52,7 @@ const EdsInput = /*@__PURE__*/ proxyCustomElement(class EdsInput extends HTMLEle
|
|
|
51
52
|
render() {
|
|
52
53
|
const withIcon = !!this.icon;
|
|
53
54
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : '';
|
|
54
|
-
return (h("div", { key: '
|
|
55
|
+
return (h("div", { key: '0261b14034860a2f59dde8de72d6729ec411d2cf', class: "relative flex items-center" }, this.type === 'textarea' ? (h("textarea", { id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, class: `min-h-80 input input-textarea ${withIcon ? 'input-with-icon' : ''} ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput })) : this.type === 'select' ? (h("select", { id: this.inputId || this.name, name: this.name, required: this.required, disabled: this.disabled, class: `input input-select ${this.error ? 'input-error' : ''} ${this.extraClass}`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, onInput: this.handleInput, onChange: this.handleInput }, this.options.map((option) => (h("option", { value: option.value, selected: option.value === this.innerVal, key: option.value }, option.label))))) : (h("input", Object.assign({ id: this.inputId || this.name, name: this.name, placeholder: this.placeholder, value: this.innerVal.toString(), required: this.required, disabled: this.disabled, type: this.type, tabindex: this.inputTabIndex, checked: ['radio', 'checkbox'].includes(this.type) ? this.checked : undefined }, (this.type === 'number'
|
|
55
56
|
? {
|
|
56
57
|
min: this.min,
|
|
57
58
|
max: this.max,
|
|
@@ -62,7 +63,7 @@ const EdsInput = /*@__PURE__*/ proxyCustomElement(class EdsInput extends HTMLEle
|
|
|
62
63
|
input ${this.type === 'radio' ? 'input-radio' : this.type === 'checkbox' ? 'input-checkbox' : ''}
|
|
63
64
|
${withIcon && this.type !== 'radio' && this.type !== 'checkbox' ? 'input-icon pl-36' : ''}
|
|
64
65
|
${this.error ? 'input-error' : ''}
|
|
65
|
-
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (h("span", { key: '
|
|
66
|
+
`, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, maxlength: this.maxLength, onInput: this.handleInput, onChange: this.handleInput }))), this.maxLength && this.type === 'textarea' && (h("span", { key: 'f2a7b410ee586d3266d05d422f3376488392fc6b', class: `input-counter f-ui-05 absolute bottom-8 right-8 ${this.maxLengthReached ? 'input-counter-error' : ''}` }, this.maxLength)), this.icon && (h("eds-icon-wrapper", { key: '37581bbd64652b25a00a401ab359736169814b1f', class: `absolute top-1/2 left-[12px] -translate-y-1/2 ${this.disabled ? 'text-lightest' : 'text-lightest'}`, name: this.icon }))));
|
|
66
67
|
}
|
|
67
68
|
get el() { return this; }
|
|
68
69
|
static get watchers() { return {
|
|
@@ -86,6 +87,7 @@ const EdsInput = /*@__PURE__*/ proxyCustomElement(class EdsInput extends HTMLEle
|
|
|
86
87
|
"min": [2],
|
|
87
88
|
"max": [2],
|
|
88
89
|
"step": [2],
|
|
90
|
+
"inputTabIndex": [2, "input-tab-index"],
|
|
89
91
|
"innerVal": [32],
|
|
90
92
|
"maxLengthReached": [32]
|
|
91
93
|
}, undefined, {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface EdsKgLearningResources extends Components.EdsKgLearningResources, HTMLElement {}
|
|
4
|
+
export const EdsKgLearningResources: {
|
|
5
|
+
prototype: EdsKgLearningResources;
|
|
6
|
+
new (): EdsKgLearningResources;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$8 } from './eds-accordion2.js';
|
|
3
|
+
import { d as defineCustomElement$7 } from './eds-alert2.js';
|
|
4
|
+
import { d as defineCustomElement$6 } from './eds-button2.js';
|
|
5
|
+
import { d as defineCustomElement$5 } from './eds-icon-wrapper2.js';
|
|
6
|
+
import { d as defineCustomElement$4 } from './eds-link2.js';
|
|
7
|
+
import { d as defineCustomElement$3 } from './eds-spinner2.js';
|
|
8
|
+
import { d as defineCustomElement$2 } from './eds-tag2.js';
|
|
9
|
+
|
|
10
|
+
const edsKgLearningResourcesCss = ":host{display:block;font-family:var(--plex-sans, 'IBM Plex Sans', system-ui, sans-serif);color:var(--brand-black, #07140D)}.lr-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0.75rem;margin-bottom:1.5rem}.lr-heading{font-family:var(--inter, 'Inter', sans-serif);font-weight:300;font-size:1.75rem;line-height:110%;margin:0;color:var(--brand-black, #07140D)}.summary{display:flex;gap:0.5rem}.filters{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:0.75rem;margin-bottom:1.5rem;align-items:flex-end}.filter-search{grid-column:span 2}.filter-select{grid-column:span 1}.accordion-list{display:flex;flex-direction:column;gap:0.5rem}.resources-content{padding-top:0.5rem}.kg-link{margin-bottom:1rem}.resources-table{width:100%;border-collapse:collapse;font-size:0.875rem}.resources-table thead th{text-align:left;font-family:var(--plex-sans, 'IBM Plex Sans', system-ui, sans-serif);font-weight:500;font-size:0.75rem;text-transform:uppercase;letter-spacing:0.04em;color:var(--grey-dark, #7A7B7A);padding:0.5rem 0.75rem;border-bottom:1px solid rgba(0, 0, 0, 0.1)}.resource-row{transition:background-color 0.2s ease}.resource-row--clickable{cursor:pointer}.resource-row--clickable:hover{background-color:rgba(0, 255, 157, 0.04)}.resource-row td{padding:0.625rem 0.75rem;border-bottom:1px solid rgba(0, 0, 0, 0.04);vertical-align:top}.resource-row:last-child td{border-bottom:none}.resource-name{font-weight:500;font-size:1.0625rem;color:var(--brand-black, #07140D);transition:color 0.2s ease}.resource-row--clickable:hover .resource-name{color:var(--brand-green-dark, #00C87B)}.resource-desc{margin:0.25rem 0 0;font-size:0.9375rem;color:var(--grey-dark, #7A7B7A);line-height:145%;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.col-name{width:auto}.col-type{width:160px;white-space:nowrap}.col-level{width:110px;white-space:nowrap}.loading{position:relative;min-height:8rem;padding:1rem 1.25rem;color:var(--grey-dark, #7A7B7A);font-size:0.9375rem;border:1px solid rgba(0, 0, 0, 0.08);border-radius:0.25rem;background-color:rgba(0, 0, 0, 0.02)}.no-results{padding:2rem;text-align:center;color:var(--grey-dark, #7A7B7A);font-size:0.875rem}@media (max-width: 750px){.lr-header{flex-direction:column;align-items:flex-start}.filters{grid-template-columns:1fr}.filter-search,.filter-select{grid-column:span 1}.col-type,.col-level{width:auto}.resources-table thead{display:none}.resource-row{display:flex;flex-wrap:wrap;gap:0.375rem;padding:0.625rem 0;border-bottom:1px solid rgba(0, 0, 0, 0.04)}.resource-row td{border:none;padding:0}.col-name{width:100%}}";
|
|
11
|
+
const EdsKgLearningResourcesStyle0 = edsKgLearningResourcesCss;
|
|
12
|
+
|
|
13
|
+
let cachedData = null;
|
|
14
|
+
let cacheTimestamp = 0;
|
|
15
|
+
const CACHE_TTL = 10 * 60 * 1000;
|
|
16
|
+
const EdsKgLearningResources$1 = /*@__PURE__*/ proxyCustomElement(class EdsKgLearningResources extends HTMLElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.__registerHost();
|
|
20
|
+
this.__attachShadow();
|
|
21
|
+
this.apiEndpoint = '/api/v1/kg/learning-resources/cached';
|
|
22
|
+
this.resolveNames = true;
|
|
23
|
+
this.size = 500;
|
|
24
|
+
this.heading = '';
|
|
25
|
+
this.variant = 'inverse';
|
|
26
|
+
this.loading = false;
|
|
27
|
+
this.error = '';
|
|
28
|
+
this.software = [];
|
|
29
|
+
this.meta = null;
|
|
30
|
+
this.filterType = '';
|
|
31
|
+
this.filterLevel = '';
|
|
32
|
+
this.searchQuery = '';
|
|
33
|
+
}
|
|
34
|
+
componentWillLoad() {
|
|
35
|
+
this.fetchData();
|
|
36
|
+
}
|
|
37
|
+
async fetchData() {
|
|
38
|
+
const now = Date.now();
|
|
39
|
+
if (cachedData && (now - cacheTimestamp) < CACHE_TTL) {
|
|
40
|
+
this.software = cachedData;
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
this.loading = true;
|
|
44
|
+
this.error = '';
|
|
45
|
+
try {
|
|
46
|
+
const params = new URLSearchParams({
|
|
47
|
+
size: this.size.toString(),
|
|
48
|
+
resolve_names: this.resolveNames.toString(),
|
|
49
|
+
});
|
|
50
|
+
const response = await fetch(`${this.apiEndpoint}?${params}`);
|
|
51
|
+
if (!response.ok) {
|
|
52
|
+
throw new Error(`Failed to fetch: ${response.statusText}`);
|
|
53
|
+
}
|
|
54
|
+
const data = await response.json();
|
|
55
|
+
this.software = data.data || [];
|
|
56
|
+
this.meta = data.meta || null;
|
|
57
|
+
cachedData = this.software;
|
|
58
|
+
cacheTimestamp = now;
|
|
59
|
+
}
|
|
60
|
+
catch (err) {
|
|
61
|
+
this.error = err instanceof Error ? err.message : 'Failed to load learning resources';
|
|
62
|
+
}
|
|
63
|
+
finally {
|
|
64
|
+
this.loading = false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
getFilteredSoftware() {
|
|
68
|
+
let filtered = this.software;
|
|
69
|
+
if (this.filterType) {
|
|
70
|
+
filtered = filtered.filter(sw => sw.learning_resources_types.includes(this.filterType));
|
|
71
|
+
}
|
|
72
|
+
if (this.filterLevel) {
|
|
73
|
+
filtered = filtered.filter(sw => sw.learning_resources_levels.includes(this.filterLevel));
|
|
74
|
+
}
|
|
75
|
+
if (this.searchQuery) {
|
|
76
|
+
const q = this.searchQuery.toLowerCase();
|
|
77
|
+
filtered = filtered.filter(sw => sw.name.toLowerCase().includes(q) ||
|
|
78
|
+
sw.learning_resources.some(lr => {
|
|
79
|
+
var _a, _b;
|
|
80
|
+
return ((_a = lr.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(q)) ||
|
|
81
|
+
((_b = lr.abstract) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(q));
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
return filtered;
|
|
85
|
+
}
|
|
86
|
+
getFilteredResources(resources) {
|
|
87
|
+
let filtered = resources;
|
|
88
|
+
if (this.filterType) {
|
|
89
|
+
filtered = filtered.filter(lr => lr.type === this.filterType);
|
|
90
|
+
}
|
|
91
|
+
if (this.filterLevel) {
|
|
92
|
+
filtered = filtered.filter(lr => lr.educational_level === this.filterLevel);
|
|
93
|
+
}
|
|
94
|
+
return filtered;
|
|
95
|
+
}
|
|
96
|
+
/* TODO: Uncomment when filters are enabled
|
|
97
|
+
private getAllTypes(): string[] {
|
|
98
|
+
const types = new Set<string>();
|
|
99
|
+
this.software.forEach(sw =>
|
|
100
|
+
sw.learning_resources_types.forEach(t => types.add(t))
|
|
101
|
+
);
|
|
102
|
+
return Array.from(types).sort();
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
private getAllLevels(): string[] {
|
|
106
|
+
const levels = new Set<string>();
|
|
107
|
+
this.software.forEach(sw =>
|
|
108
|
+
sw.learning_resources_levels.forEach(l => levels.add(l))
|
|
109
|
+
);
|
|
110
|
+
return Array.from(levels).sort();
|
|
111
|
+
}
|
|
112
|
+
*/
|
|
113
|
+
getTagIntent(type) {
|
|
114
|
+
const map = {
|
|
115
|
+
'interactive tutorial': 'brand',
|
|
116
|
+
'video tutorial': 'primary',
|
|
117
|
+
'user documentation': 'dark',
|
|
118
|
+
'video presentation': 'inverse',
|
|
119
|
+
'slide deck': 'strong',
|
|
120
|
+
};
|
|
121
|
+
return map[type] || 'brand-dark';
|
|
122
|
+
}
|
|
123
|
+
getLevelTagIntent(level) {
|
|
124
|
+
const map = {
|
|
125
|
+
'beginner': 'brand',
|
|
126
|
+
'intermediate': 'dark',
|
|
127
|
+
'advanced': 'strong',
|
|
128
|
+
};
|
|
129
|
+
return map[level] || 'brand-dark';
|
|
130
|
+
}
|
|
131
|
+
renderAccordionDescription(sw) {
|
|
132
|
+
const count = sw.learning_resources_count;
|
|
133
|
+
const types = sw.learning_resources_types.join(', ');
|
|
134
|
+
return `${count} resource${count !== 1 ? 's' : ''} — ${types}`;
|
|
135
|
+
}
|
|
136
|
+
renderResources(sw) {
|
|
137
|
+
const filtered = this.getFilteredResources(sw.learning_resources);
|
|
138
|
+
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: () => {
|
|
139
|
+
if (lr.iri) {
|
|
140
|
+
window.open(lr.iri, '_blank', 'noopener,noreferrer');
|
|
141
|
+
}
|
|
142
|
+
} }, 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."))));
|
|
143
|
+
}
|
|
144
|
+
render() {
|
|
145
|
+
// Always render the same outer scaffold (header + content area) so the
|
|
146
|
+
// heading sits in identical position across loading / error / loaded
|
|
147
|
+
// states and the spinner appears where the accordion list will render.
|
|
148
|
+
const filtered = !this.loading && !this.error ? this.getFilteredSoftware() : [];
|
|
149
|
+
// const allTypes = this.getAllTypes();
|
|
150
|
+
// const allLevels = this.getAllLevels();
|
|
151
|
+
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."))))));
|
|
152
|
+
}
|
|
153
|
+
get el() { return this; }
|
|
154
|
+
static get style() { return EdsKgLearningResourcesStyle0; }
|
|
155
|
+
}, [1, "eds-kg-learning-resources", {
|
|
156
|
+
"apiEndpoint": [1, "api-endpoint"],
|
|
157
|
+
"resolveNames": [4, "resolve-names"],
|
|
158
|
+
"size": [2],
|
|
159
|
+
"heading": [1],
|
|
160
|
+
"variant": [1],
|
|
161
|
+
"loading": [32],
|
|
162
|
+
"error": [32],
|
|
163
|
+
"software": [32],
|
|
164
|
+
"meta": [32],
|
|
165
|
+
"filterType": [32],
|
|
166
|
+
"filterLevel": [32],
|
|
167
|
+
"searchQuery": [32]
|
|
168
|
+
}]);
|
|
169
|
+
function defineCustomElement$1() {
|
|
170
|
+
if (typeof customElements === "undefined") {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const components = ["eds-kg-learning-resources", "eds-accordion", "eds-alert", "eds-button", "eds-icon-wrapper", "eds-link", "eds-spinner", "eds-tag"];
|
|
174
|
+
components.forEach(tagName => { switch (tagName) {
|
|
175
|
+
case "eds-kg-learning-resources":
|
|
176
|
+
if (!customElements.get(tagName)) {
|
|
177
|
+
customElements.define(tagName, EdsKgLearningResources$1);
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
case "eds-accordion":
|
|
181
|
+
if (!customElements.get(tagName)) {
|
|
182
|
+
defineCustomElement$8();
|
|
183
|
+
}
|
|
184
|
+
break;
|
|
185
|
+
case "eds-alert":
|
|
186
|
+
if (!customElements.get(tagName)) {
|
|
187
|
+
defineCustomElement$7();
|
|
188
|
+
}
|
|
189
|
+
break;
|
|
190
|
+
case "eds-button":
|
|
191
|
+
if (!customElements.get(tagName)) {
|
|
192
|
+
defineCustomElement$6();
|
|
193
|
+
}
|
|
194
|
+
break;
|
|
195
|
+
case "eds-icon-wrapper":
|
|
196
|
+
if (!customElements.get(tagName)) {
|
|
197
|
+
defineCustomElement$5();
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
case "eds-link":
|
|
201
|
+
if (!customElements.get(tagName)) {
|
|
202
|
+
defineCustomElement$4();
|
|
203
|
+
}
|
|
204
|
+
break;
|
|
205
|
+
case "eds-spinner":
|
|
206
|
+
if (!customElements.get(tagName)) {
|
|
207
|
+
defineCustomElement$3();
|
|
208
|
+
}
|
|
209
|
+
break;
|
|
210
|
+
case "eds-tag":
|
|
211
|
+
if (!customElements.get(tagName)) {
|
|
212
|
+
defineCustomElement$2();
|
|
213
|
+
}
|
|
214
|
+
break;
|
|
215
|
+
} });
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const EdsKgLearningResources = EdsKgLearningResources$1;
|
|
219
|
+
const defineCustomElement = defineCustomElement$1;
|
|
220
|
+
|
|
221
|
+
export { EdsKgLearningResources, defineCustomElement };
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { d as defineCustomElement$
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
10
|
-
import { d as defineCustomElement$3 } from './eds-input-search2.js';
|
|
2
|
+
import { d as defineCustomElement$a } from './eds-icon-wrapper2.js';
|
|
3
|
+
import { d as defineCustomElement$9 } from './eds-input2.js';
|
|
4
|
+
import { d as defineCustomElement$8 } from './eds-input-dropzone2.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './eds-input-field2.js';
|
|
6
|
+
import { d as defineCustomElement$6 } from './eds-input-file2.js';
|
|
7
|
+
import { d as defineCustomElement$5 } from './eds-input-footer2.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './eds-input-label2.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './eds-input-range2.js';
|
|
11
10
|
import { d as defineCustomElement$2 } from './eds-input-select2.js';
|
|
12
11
|
import { d as defineCustomElement$1 } from './eds-link2.js';
|
|
13
12
|
|
|
@@ -124,7 +123,7 @@ function defineCustomElement() {
|
|
|
124
123
|
if (typeof customElements === "undefined") {
|
|
125
124
|
return;
|
|
126
125
|
}
|
|
127
|
-
const components = ["eds-kg-web-services-select", "eds-icon-wrapper", "eds-input", "eds-input-dropzone", "eds-input-field", "eds-input-file", "eds-input-footer", "eds-input-label", "eds-input-range", "eds-input-
|
|
126
|
+
const components = ["eds-kg-web-services-select", "eds-icon-wrapper", "eds-input", "eds-input-dropzone", "eds-input-field", "eds-input-file", "eds-input-footer", "eds-input-label", "eds-input-range", "eds-input-select", "eds-link"];
|
|
128
127
|
components.forEach(tagName => { switch (tagName) {
|
|
129
128
|
case "eds-kg-web-services-select":
|
|
130
129
|
if (!customElements.get(tagName)) {
|
|
@@ -132,46 +131,41 @@ function defineCustomElement() {
|
|
|
132
131
|
}
|
|
133
132
|
break;
|
|
134
133
|
case "eds-icon-wrapper":
|
|
135
|
-
if (!customElements.get(tagName)) {
|
|
136
|
-
defineCustomElement$b();
|
|
137
|
-
}
|
|
138
|
-
break;
|
|
139
|
-
case "eds-input":
|
|
140
134
|
if (!customElements.get(tagName)) {
|
|
141
135
|
defineCustomElement$a();
|
|
142
136
|
}
|
|
143
137
|
break;
|
|
144
|
-
case "eds-input
|
|
138
|
+
case "eds-input":
|
|
145
139
|
if (!customElements.get(tagName)) {
|
|
146
140
|
defineCustomElement$9();
|
|
147
141
|
}
|
|
148
142
|
break;
|
|
149
|
-
case "eds-input-
|
|
143
|
+
case "eds-input-dropzone":
|
|
150
144
|
if (!customElements.get(tagName)) {
|
|
151
145
|
defineCustomElement$8();
|
|
152
146
|
}
|
|
153
147
|
break;
|
|
154
|
-
case "eds-input-
|
|
148
|
+
case "eds-input-field":
|
|
155
149
|
if (!customElements.get(tagName)) {
|
|
156
150
|
defineCustomElement$7();
|
|
157
151
|
}
|
|
158
152
|
break;
|
|
159
|
-
case "eds-input-
|
|
153
|
+
case "eds-input-file":
|
|
160
154
|
if (!customElements.get(tagName)) {
|
|
161
155
|
defineCustomElement$6();
|
|
162
156
|
}
|
|
163
157
|
break;
|
|
164
|
-
case "eds-input-
|
|
158
|
+
case "eds-input-footer":
|
|
165
159
|
if (!customElements.get(tagName)) {
|
|
166
160
|
defineCustomElement$5();
|
|
167
161
|
}
|
|
168
162
|
break;
|
|
169
|
-
case "eds-input-
|
|
163
|
+
case "eds-input-label":
|
|
170
164
|
if (!customElements.get(tagName)) {
|
|
171
165
|
defineCustomElement$4();
|
|
172
166
|
}
|
|
173
167
|
break;
|
|
174
|
-
case "eds-input-
|
|
168
|
+
case "eds-input-range":
|
|
175
169
|
if (!customElements.get(tagName)) {
|
|
176
170
|
defineCustomElement$3();
|
|
177
171
|
}
|
|
@@ -287,7 +287,7 @@ const EdsLink = /*@__PURE__*/ proxyCustomElement(class EdsLink extends HTMLEleme
|
|
|
287
287
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
288
288
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
289
289
|
: '';
|
|
290
|
-
return (h("a", { key: '
|
|
290
|
+
return (h("a", { key: 'd167c16280b7f0b4c1fcf14f0f0d3468111e715b', class: `${classes || ''}`, href: isInteractive ? safeUrl : undefined, target: this.external && isInteractive ? '_blank' : undefined, rel: this.external && isInteractive ? 'noopener noreferrer' : undefined, tabIndex: isInteractive ? 0 : -1, "aria-label": isIconOnly ? this.ariaLabel || 'Link' : undefined, "aria-disabled": this.disabled ? 'true' : undefined, "aria-current": this.current ? 'page' : undefined, role: this.disabled ? 'link' : undefined, download: this.download ? '' : undefined, onClick: (event) => this.handleClick(event), onKeyDown: (event) => this.handleKeyDown(event) }, h("span", { key: '000476a609888f5f848722015ce5e6137f26e371', class: "z-1 relative inline-flex items-center justify-center" }, this.renderLeftIcon(), this.label && (h("span", { key: '15232cde31d23c5a466189c69fbdb9db48f08274', class: `${labelClasses} ${this.icon ? (this.iconPos === 'right' ? (this.size === 'large' ? 'pr-4' : 'pr-2') : (this.size === 'large' ? 'pl-4' : 'pl-2')) : ''}` }, this.label)), this.renderRightIcon())));
|
|
291
291
|
}
|
|
292
292
|
get el() { return this; }
|
|
293
293
|
static get style() { return EdsLinkStyle0; }
|
|
@@ -43,7 +43,7 @@ const EdsLogo = /*@__PURE__*/ proxyCustomElement(class EdsLogo extends HTMLEleme
|
|
|
43
43
|
}
|
|
44
44
|
render() {
|
|
45
45
|
const logoContent = this.getLogo();
|
|
46
|
-
return (h("a", { key: '
|
|
46
|
+
return (h("a", { key: '3f8257c9481079f011278b114e13effe9057d823', href: this.href, onClick: () => this.handleClick(), class: "eds-logo-wrapper", "aria-label": this.label }, h("div", { key: '4dac45a1a0c38c6e1613995aad2005b41acac775', innerHTML: logoContent })));
|
|
47
47
|
}
|
|
48
48
|
get el() { return this; }
|
|
49
49
|
static get style() { return EdsLogoStyle0; }
|
|
@@ -4,7 +4,7 @@ import { d as defineCustomElement$3 } from './eds-accordion2.js';
|
|
|
4
4
|
import { d as defineCustomElement$2 } from './eds-button2.js';
|
|
5
5
|
import { d as defineCustomElement$1 } from './eds-icon-wrapper2.js';
|
|
6
6
|
|
|
7
|
-
const edsMatomoNoticeCss = "
|
|
7
|
+
const edsMatomoNoticeCss = ":host{display:block;background-color:var(--white, #FFFFFF);border-radius:16px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12);overflow:hidden}.flex{display:flex}.items-center{align-items:center}.gap-8{gap:0.5rem}";
|
|
8
8
|
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
9
9
|
|
|
10
10
|
const EdsMatomoNotice = /*@__PURE__*/ proxyCustomElement(class EdsMatomoNotice extends HTMLElement {
|
|
@@ -117,7 +117,13 @@ const EdsMatomoNotice = /*@__PURE__*/ proxyCustomElement(class EdsMatomoNotice e
|
|
|
117
117
|
if (!this.showNotice) {
|
|
118
118
|
return null;
|
|
119
119
|
}
|
|
120
|
-
return (
|
|
120
|
+
return (
|
|
121
|
+
// Content-only render — no positioning, no overlay, no sizing.
|
|
122
|
+
// The host application wraps this component in whatever positioned
|
|
123
|
+
// container makes sense (fixed bottom banner, modal, sidebar slot,
|
|
124
|
+
// etc.). See packages/shared-hugo/layouts/_default/baseof.html for
|
|
125
|
+
// the bottom-centered card wrapper used by handbook/eds-docs.
|
|
126
|
+
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() }))))));
|
|
121
127
|
}
|
|
122
128
|
get el() { return this; }
|
|
123
129
|
static get style() { return EdsMatomoNoticeStyle0; }
|
|
@@ -3,7 +3,7 @@ import { d as defineCustomElement$3 } from './eds-button2.js';
|
|
|
3
3
|
import { d as defineCustomElement$2 } from './eds-icon-wrapper2.js';
|
|
4
4
|
import { d as defineCustomElement$1 } from './eds-input-label2.js';
|
|
5
5
|
|
|
6
|
-
const edsNpsCss = ".flex{display:flex}.justify-between{justify-content:space-between}.mt-4{margin-top:0.25rem}.mt-8{margin-top:0.5rem}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.gap-2{gap:0.125rem}.gap-4{gap:0.25rem}.grid{display:grid}.grid-col-span-1{--container-grid-columns:1;grid-column:span 1 / span 1}.grid-cols-11{grid-template-columns:repeat(11, minmax(0, 1fr))}.grid-cols-11[class*=\"grid-line-x\"][class*=\"grid-line-x\"]>*:nth-child(n)::before{border-bottom-width:1px}.grid-cols-11[class*=\"grid-line-xfull\"]>*:nth-child(n)::before{inset-inline-start:calc(var(--inner-gutter) / -2);inset-inline-end:calc(var(--inner-gutter) / -2)}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+1)::before{inset-inline-start:0}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+11)::before{inset-inline-end:0}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+1):nth-last-child(-n+11)::before{border-bottom-width:0}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+1):nth-last-child(-n+11)~*::before{border-bottom-width:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(n)::after{border-inline-end-width:1px}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(11n+11)::after{border-inline-end-width:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(-n+11)::after{top:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(11n+1):nth-last-child(-n+11)::after{bottom:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(11n+1):nth-last-child(-n+11)~li::after{bottom:0}.f-ui-04{font-family:var(--f-ui-04-fontFamily);font-weight:var(--f-ui-04-fontWeight);font-size:var(--f-ui-04-fontSize);line-height:var(--f-ui-04-lineHeight);letter-spacing:var(--f-ui-04-letterSpacing)}.text-light{color:var(--grey-dark)}.flex-wrap{flex-wrap:wrap}";
|
|
6
|
+
const edsNpsCss = ".eds-nps__labels{padding-top:0.75rem;padding-bottom:0.5rem}.eds-nps__scale{display:block;width:fit-content;max-width:100%;padding-top:0.5rem;}#nps-buttons{gap:0.6rem}.eds-nps__btn{border-radius:9999px;transition:transform 0.15s ease-in-out}.eds-nps__btn.is-selected{transform:scale(1.12)}.flex{display:flex}.justify-between{justify-content:space-between}.mt-4{margin-top:0.25rem}.mt-8{margin-top:0.5rem}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.gap-2{gap:0.125rem}.gap-4{gap:0.25rem}.grid{display:grid}.grid-col-span-1{--container-grid-columns:1;grid-column:span 1 / span 1}.grid-cols-11{grid-template-columns:repeat(11, minmax(0, 1fr))}.grid-cols-11[class*=\"grid-line-x\"][class*=\"grid-line-x\"]>*:nth-child(n)::before{border-bottom-width:1px}.grid-cols-11[class*=\"grid-line-xfull\"]>*:nth-child(n)::before{inset-inline-start:calc(var(--inner-gutter) / -2);inset-inline-end:calc(var(--inner-gutter) / -2)}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+1)::before{inset-inline-start:0}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+11)::before{inset-inline-end:0}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+1):nth-last-child(-n+11)::before{border-bottom-width:0}.grid-cols-11[class*=\"grid-line-x\"]>*:nth-child(11n+1):nth-last-child(-n+11)~*::before{border-bottom-width:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(n)::after{border-inline-end-width:1px}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(11n+11)::after{border-inline-end-width:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(-n+11)::after{top:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(11n+1):nth-last-child(-n+11)::after{bottom:0}.grid-cols-11[class*=\"grid-line-y\"][class*=\"grid-line-y\"]>*:nth-child(11n+1):nth-last-child(-n+11)~li::after{bottom:0}.f-ui-04{font-family:var(--f-ui-04-fontFamily);font-weight:var(--f-ui-04-fontWeight);font-size:var(--f-ui-04-fontSize);line-height:var(--f-ui-04-lineHeight);letter-spacing:var(--f-ui-04-letterSpacing)}.text-light{color:var(--grey-dark)}.flex-wrap{flex-wrap:wrap}";
|
|
7
7
|
const EdsNpsStyle0 = edsNpsCss;
|
|
8
8
|
|
|
9
9
|
const EdsNps = /*@__PURE__*/ proxyCustomElement(class EdsNps extends HTMLElement {
|
|
@@ -86,14 +86,14 @@ const EdsNps = /*@__PURE__*/ proxyCustomElement(class EdsNps extends HTMLElement
|
|
|
86
86
|
}
|
|
87
87
|
render() {
|
|
88
88
|
const count = this.max - this.min + 1;
|
|
89
|
-
return (h("div", { key: '
|
|
89
|
+
return (h("div", { key: '412ddeabf0cc97829202063af25f17e3309b0754', class: "eds-nps" }, h("eds-input-label", { key: '100a47e710fa75d6a5761a87ca68e8bc8910e248', id: "nps-question", name: "nps-question", label: this.question }), h("div", { key: '9a7a63112e17f4c725005e1ae8e42c98107db7c4', class: "eds-nps__scale" }, h("div", { key: '501029dad573cd31d956ae3cae67f2db9f2649f1', id: "nps-buttons", role: "radiogroup", "aria-labelledby": "nps-question", onKeyDown: this.handleKeyNav, class: "flex flex-wrap gap-2 my-8" }, Array.from({ length: count }, (_, i) => {
|
|
90
90
|
const val = this.min + i;
|
|
91
91
|
const isSelected = val === this.internalValue;
|
|
92
92
|
const tabIndex = isSelected || (this.internalValue == null && i === 0) ? 0 : -1;
|
|
93
|
-
return (h("div", { class: "flex", key: val }, h("eds-button", { ref: (el) => (this.btnRefs[i] = el), size: "large", role: "radio", "aria-checked": isSelected ? 'true' : 'false', "aria-label": `${val}`, onClick: () => this.onSelect(val), tabIndex: tabIndex, intent: isSelected ? 'brand' : '
|
|
93
|
+
return (h("div", { class: "flex", key: val }, h("eds-button", { ref: (el) => (this.btnRefs[i] = el), size: "large", role: "radio", "aria-checked": isSelected ? 'true' : 'false', "aria-label": `${val}`, onClick: () => this.onSelect(val), tabIndex: tabIndex, intent: isSelected ? 'brand' : 'brandLight', class: isSelected ? 'eds-nps__btn is-selected' : 'eds-nps__btn', "extra-class": "!block !px-0 w-full", label: `${val}`, pill: true, onFocus: () => {
|
|
94
94
|
this.internalValue = val;
|
|
95
95
|
} })));
|
|
96
|
-
})), h("div", { key: '
|
|
96
|
+
})), h("div", { key: 'aa15457591f1edf6e59eed384bcfbb25d49c9fd5', class: "flex justify-between eds-nps__labels" }, h("span", { key: 'a468b290491e368e3084f17ce40c6aa39e00ad3a', class: "f-ui-04 text-light ml-4" }, this.leftLabel), h("span", { key: '146b9eea4bbc360f7765e69e319738c77beae69d', class: "f-ui-04 text-light mr-4" }, this.rightLabel)))));
|
|
97
97
|
}
|
|
98
98
|
get el() { return this; }
|
|
99
99
|
static get watchers() { return {
|
|
@@ -246,7 +246,7 @@ const EdsPagination = /*@__PURE__*/ proxyCustomElement(class EdsPagination exten
|
|
|
246
246
|
}
|
|
247
247
|
render() {
|
|
248
248
|
const navigableIndex = -1; // Track index for keyboard navigation
|
|
249
|
-
return (h("div", { key: '
|
|
249
|
+
return (h("div", { key: '5c11fd306f0ebf47a452e44d633e18b2e3860d78' }, this.total > 0 && this.mode === 'default' && (h("p", { key: 'fe8b7f7b6c7785152f1edd90a750f4a9a7e2768b', class: "f-ui-03 text-light mb-28 w-full text-center", "aria-live": "polite", id: "pagination-info" }, h("span", { key: '5e2c67535dbf765dc662770164404f0de69315a1', class: "text-light sr-only" }, "Results:"), this.pageResults())), this.mode === 'navigator' || (this.lastPage && this.lastPage > 1) ? (h("nav", { "aria-label": "Pagination Navigation", "aria-describedby": this.mode === 'default' ? 'pagination-info' : undefined, onKeyDown: this.handleKeyDown }, h("ul", { class: "flex items-center justify-center gap-x-8", role: "list" }, h("li", { class: "mr-auto" }, this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, h("eds-button", { label: this.prevLabel, disabled: this.mode === 'navigator' ? !this.prevUrl : this.isFirstPage(), "aria-label": "Go to previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "ghost", "extra-class": "!p-8 lg:!pr-12 pagination-button", onClick: (event) => {
|
|
250
250
|
if (this.mode === 'default' && !this.isFirstPage()) {
|
|
251
251
|
this.handlePageClick(event, (this.currentPage || 1) - 1);
|
|
252
252
|
}
|
|
@@ -255,7 +255,7 @@ const EdsPagination = /*@__PURE__*/ proxyCustomElement(class EdsPagination exten
|
|
|
255
255
|
: this.isFirstPage()
|
|
256
256
|
? '#'
|
|
257
257
|
: this.generateLink(this.currentPage - 1).url, disabled: this.mode === 'navigator' ? !this.prevUrl : this.isFirstPage(), "aria-label": "Go to previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "strong", "hide-label-on-small-screen": true, class: "!p-8 lg:!pr-12" }))), this.mode === 'default' &&
|
|
258
|
-
this.links.map((link, index) => (h("li", { key: index, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof link === 'string' ? (h("span", { class: "flex items-center justify-center", "aria-hidden": "true" }, link)) : this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, h("eds-button", { label: link.label, "aria-label": link.current ? `Current page, page ${link.label}` : `Go to page ${link.label}`, "aria-current": link.current ? 'page' : undefined, size: "small", "extra-class": "!p-8 pagination-button", intent: link.current ? '
|
|
258
|
+
this.links.map((link, index) => (h("li", { key: index, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof link === 'string' ? (h("span", { class: "flex items-center justify-center", "aria-hidden": "true" }, link)) : this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, h("eds-button", { label: link.label, "aria-label": link.current ? `Current page, page ${link.label}` : `Go to page ${link.label}`, "aria-current": link.current ? 'page' : undefined, size: "small", "extra-class": "!p-8 pagination-button", intent: link.current ? 'brand' : 'ghost', onClick: (event) => this.handlePageClick(event, parseInt(link.label)) }))) : (h("eds-link", { url: link.url, "aria-label": link.ariaLabel, label: link.label, current: link.current, "aria-current": link.current ? 'page' : undefined, size: "small", class: "!p-8", intent: link.current ? 'primary' : 'secondary', onClick: (event) => this.handlePageClick(event, parseInt(link.label)) }))))), h("li", { class: "ml-auto" }, this.useButtons ? (h("div", { class: "pagination-button-wrapper", onFocus: () => this.handleItemFocus(navigableIndex) }, h("eds-button", { label: this.nextLabel, disabled: this.mode === 'navigator' ? !this.nextUrl : this.isLastPage(), "aria-label": "Go to next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "ghost", "extra-class": "!p-8 lg:!pl-12 pagination-button", onClick: (event) => {
|
|
259
259
|
if (this.mode === 'default' && !this.isLastPage()) {
|
|
260
260
|
this.handlePageClick(event, (this.currentPage || 1) + 1);
|
|
261
261
|
}
|