@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
|
@@ -4,7 +4,7 @@ import { p as parseData } from './sharedUtils-a550989c.js';
|
|
|
4
4
|
import { l as logoNegative } from './negative-84eec72e.js';
|
|
5
5
|
import { l as logoPositive } from './positive-cc986d7c.js';
|
|
6
6
|
|
|
7
|
-
const edsAccordionCss = ":host{display:block;width:100%}.accordion-card{border-radius:16px;padding:1.5rem;transition:all 0.4s ease;position:relative;overflow:hidden;border:1px solid rgba(0, 0, 0, 0.1)}.accordion-card-default{background:var(--brand-black);color:var(--white)}.accordion-card-default:hover{border-color:rgba(0, 255, 157, 0.4);box-shadow:0 4px 20px rgba(0, 0, 0, 0.1)}.accordion-card-default .accordion-title{color:var(--white)}.accordion-card-default .accordion-description{color:var(--grey-light)}.accordion-card-default .accordion-chevron{color:var(--white)}.accordion-card-default .accordion-content{color:var(--grey-light)}.accordion-card-inverse{background:var(--white);color:var(--brand-black)}.accordion-card-inverse:hover{border-color:rgba(0, 255, 157, 0.4);box-shadow:0 4px 20px rgba(0, 0, 0, 0.1)}.accordion-card-inverse .accordion-title{color:var(--brand-black)}.accordion-card-inverse .accordion-description{color:var(--grey-
|
|
7
|
+
const edsAccordionCss = ":host{display:block;width:100%}.accordion-card{border-radius:16px;padding:1.5rem;transition:all 0.4s ease;position:relative;overflow:hidden;border:1px solid rgba(0, 0, 0, 0.1)}.accordion-card-default{background:var(--brand-black);color:var(--white)}.accordion-card-default:hover{border-color:rgba(0, 255, 157, 0.4);box-shadow:0 4px 20px rgba(0, 0, 0, 0.1)}.accordion-card-default .accordion-title{color:var(--white)}.accordion-card-default .accordion-description{color:var(--grey-light)}.accordion-card-default .accordion-chevron{color:var(--white)}.accordion-card-default .accordion-content{color:var(--grey-light)}.accordion-card-inverse{background:var(--white);color:var(--brand-black)}.accordion-card-inverse:hover{border-color:rgba(0, 255, 157, 0.4);box-shadow:0 4px 20px rgba(0, 0, 0, 0.1)}.accordion-card-inverse .accordion-title{color:var(--brand-black)}.accordion-card-inverse .accordion-description{color:var(--grey-700)}.accordion-card-inverse .accordion-chevron{color:var(--brand-black)}.accordion-card-inverse .accordion-content{color:var(--grey-700)}.accordion-header{display:flex;align-items:center;gap:1rem;cursor:pointer;width:100%;background:none;border:none;padding:0;text-align:left;-webkit-user-select:none;user-select:none}.accordion-header:focus-visible{outline:2px solid var(--brand-green);outline-offset:2px;border-radius:8px}.accordion-icon{width:48px;height:48px;min-width:48px;display:flex;align-items:center;justify-content:center;background:rgba(0, 255, 157, 0.1);border-radius:12px;color:var(--brand-green);flex-shrink:0}.accordion-card-inverse .accordion-icon{background:rgba(0, 0, 0, 0.05);color:var(--brand-black)}.accordion-header-text{flex-grow:1;min-width:0}.accordion-title{font-family:'Inter', var(--f-heading-fontFamily);font-weight:300;font-size:1.25rem;line-height:1.4;margin:0}.accordion-description{font-family:'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size:0.9375rem;line-height:1.6;margin-top:0.25rem;margin-bottom:0}.accordion-chevron{flex-shrink:0;transition:transform 0.3s ease}.accordion-panel{display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.4s ease}.accordion-panel.expanded{grid-template-rows:1fr}.accordion-panel-inner{overflow:hidden}.accordion-content{padding-top:1rem;font-family:'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size:0.9375rem;line-height:1.6}.line-clamp-1{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}@media (max-width: 768px){.accordion-card{padding:1.25rem}.accordion-icon{width:40px;height:40px;min-width:40px}.accordion-title{font-size:1.125rem}.accordion-header{gap:0.75rem}}h3,p{margin:0}";
|
|
8
8
|
const EdsAccordionStyle0 = edsAccordionCss;
|
|
9
9
|
|
|
10
10
|
const EdsAccordion = class {
|
|
@@ -52,7 +52,7 @@ const EdsAccordion = class {
|
|
|
52
52
|
'accordion-card',
|
|
53
53
|
`accordion-card-${this.variant}`
|
|
54
54
|
].join(' ');
|
|
55
|
-
return (h("div", { key: '
|
|
55
|
+
return (h("div", { key: '08061b87dfd54b49f8aa782f29e2a9c5c8bcd2ef', class: cardClasses }, h("div", { key: '728033232d8e6aa348bc98d028a5bd62d32fd934', class: "accordion-header", onClick: this.handleClick, onKeyDown: this.handleKeyDown, role: "button", tabindex: 0, "aria-expanded": String(this.isExpanded), "aria-controls": "accordionSection" }, this.icon && (h("div", { key: 'eeb4260c955a2d4394bc3663dc749afc45b6f87f', class: "accordion-icon" }, h("eds-icon-wrapper", { key: '0896625a235bda97a098ac7b9a4ebec00e5fa587', name: this.icon, size: 24 }))), h("div", { key: '3e6b85780bc597a84dc0eb5d2526f9e54c16148d', class: "accordion-header-text" }, h("h3", { key: 'b5c5c0023bc23dc225183736f02683134a40da93', class: "accordion-title" }, this.heading), this.description && (h("p", { key: 'eb04c90cef03a838a4f852b988f3a9984e593120', class: `accordion-description ${!this.isExpanded && this.clampText ? 'line-clamp-1' : ''}` }, this.description))), h("eds-icon-wrapper", { key: '583d0bcc82a178c2a47eef586aede9c87e8ea456', name: this.toggleIcon, size: 20, class: "accordion-chevron" })), h("section", { key: '8f820377d639ced2d0a4fe505452b6b408640400', id: "accordionSection", "aria-hidden": String(!this.isExpanded), class: `accordion-panel ${this.isExpanded ? 'expanded' : ''}` }, h("div", { key: 'd41dc9c3ef21f14df3ca25138440356703fa35ed', class: "accordion-panel-inner" }, h("div", { key: '156c3c9b139efcb964525147338ecdeeca538123', class: "accordion-content" }, h("slot", { key: 'b19b54c279cca1a32b4ed0f5b0a319d87b7bf937' }))))));
|
|
56
56
|
}
|
|
57
57
|
get el() { return getElement(this); }
|
|
58
58
|
};
|
|
@@ -168,7 +168,7 @@ const EdsAvatar = class {
|
|
|
168
168
|
* @returns {JSX.Element} The rendered avatar component.
|
|
169
169
|
*/
|
|
170
170
|
render() {
|
|
171
|
-
return (h("div", { key: '
|
|
171
|
+
return (h("div", { key: '36f8cb598e0e53793ce8a49e9e2419f41ba8f160', class: this.containerClasses }, this.picture ? (h("eds-img", { src: this.picture, width: 54, height: 54, sizes: "120px", alt: `${this.firstName} ${this.lastName}`, lazyload: true, withBg: true })) : (h("abbr", { title: this.computedInitials || `${this.firstName} ${this.lastName}`, class: "!no-underline f-ui-01" }, this.computedInitials))));
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
EdsAvatar.style = EdsAvatarStyle0;
|
|
@@ -182,7 +182,7 @@ const EdsBlockBreak = class {
|
|
|
182
182
|
this.inverse = false;
|
|
183
183
|
}
|
|
184
184
|
render() {
|
|
185
|
-
return h("hr", { key: '
|
|
185
|
+
return h("hr", { key: '2531c44fa20745f7860e4647f77ffa038a56d832', class: `${this.inverse ? 'border-default' : 'border-softer'} my-16 inline-block w-full border-t-2` });
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
188
|
EdsBlockBreak.style = EdsBlockBreakStyle0;
|
|
@@ -302,7 +302,7 @@ const EdsBreadcrumb = class {
|
|
|
302
302
|
*/
|
|
303
303
|
render() {
|
|
304
304
|
const itemsToRender = this.getTruncatedItems();
|
|
305
|
-
return (h("nav", { key: '
|
|
305
|
+
return (h("nav", { key: '95c13ac07de20bc04fb57ee990e5d21f928f3a86', "aria-label": "Breadcrumb" }, h("ol", { key: '2a03ff53ac27eaa5e37ddfef32e9a4fe322755dd', class: "flex items-center space-x-2" }, itemsToRender.map((item, index) => {
|
|
306
306
|
const isLast = index === itemsToRender.length - 1;
|
|
307
307
|
return (h("li", { class: "flex items-center" }, !item.isHidden ? ((() => {
|
|
308
308
|
const { fullLabel } = this.getLabels(item, isLast);
|
|
@@ -369,14 +369,17 @@ const cva = (base, config)=>{
|
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
371
|
|
|
372
|
-
const edsButtonCss = "/* ============================================\n EDS BUTTON - NEW EBRAINS VISUAL SYSTEM\n ============================================ */\n\n*,\n::before,\n::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor;\n}\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\n 1. Change the font styles in all browsers.\n 2. Remove the margin in Firefox and Safari.\n 3. Remove default padding in all browsers.\n */\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n color: inherit;\n margin: 0;\n padding: 0;\n}\n\n/*\n Remove the inheritance of text transform in Edge and Firefox.\n */\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n 1. Correct the inability to style clickable types in iOS and Safari.\n 2. Remove default button styles.\n */\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button;\n /* 1 */\n background-color: transparent;\n /* 2 */\n background-image: none;\n /* 2 */\n}\n\np {\n margin: 0;\n}\n\n/*\n Set the default cursor for buttons.\n */\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\n Make sure disabled buttons don't get the pointer cursor.\n */\n:disabled {\n cursor: default;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n/* ============================================\n TYPOGRAPHY CLASSES\n ============================================ */\n\n.f-body-01 {\n font-family: var(--f-body-01-fontFamily);\n font-weight: var(--f-body-01-fontWeight);\n font-size: var(--f-body-01-fontSize);\n line-height: var(--f-body-01-lineHeight);\n letter-spacing: var(--f-body-01-letterSpacing);\n}\n\n.f-body-02 {\n font-family: var(--f-body-02-fontFamily);\n font-weight: var(--f-body-02-fontWeight);\n font-size: var(--f-body-02-fontSize);\n line-height: var(--f-body-02-lineHeight);\n letter-spacing: var(--f-body-02-letterSpacing);\n}\n\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n\n.f-ui-02 {\n font-family: var(--f-ui-02-fontFamily);\n font-weight: var(--f-ui-02-fontWeight);\n font-size: var(--f-ui-02-fontSize);\n line-height: var(--f-ui-02-lineHeight);\n letter-spacing: var(--f-ui-02-letterSpacing);\n}\n\n/* ============================================\n BUTTON BORDER EFFECTS - NEW SYSTEM\n ============================================ */\n\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n position: absolute;\n inset: 0rem;\n z-index: 1;\n border-radius: 8px;\n border-width: 2px;\n border-color: rgba(7, 20, 13, 1); /* brand-black with opacity */\n content: '';\n }\n}\n\n.border-inside-inverse {\n position: relative;\n\n &::after {\n pointer-events: none;\n position: absolute;\n inset: 0rem;\n z-index: 1;\n border-radius: 8px;\n border-width: 2px;\n border-color: rgba(255, 255, 255, 1); /* white border */\n content: '';\n }\n}\n\n.border-inside-pill {\n &::after {\n border-radius: 100px; /* pill shape */\n content: '';\n }\n}\n\n.border-inside-inverse.border-inside-pill {\n &::after {\n border-radius: 100px; /* pill shape for inverse border */\n }\n}\n\n/* ============================================\n LOADER SPINNER\n ============================================ */\n\n.loader {\n box-sizing: border-box;\n display: inline-block;\n height: 1rem;\n width: 1rem;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.loader {\n animation: spin 1s linear infinite;\n border-radius: 9999px;\n border: 3px solid rgba(7, 20, 13, 0.3); /* brand-black */\n border-bottom-color: #07140D; /* brand-black */\n}\n\n/* ============================================\n TRANSITIONS & EFFECTS\n ============================================ */\n\n.effect-color {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n.effect-focus {\n outline-width: 3px;\n outline-offset: 2px;\n outline-color: var(--brand-green); /* NEW: brand-green for focus */\n}\n\n.effect-focus:focus-visible {\n outline-style: solid;\n}\n\n.effect-focus-within {\n outline-width: 3px;\n outline-offset: 2px;\n outline-color: var(--brand-green); /* NEW: brand-green for focus */\n}\n\n.effect-focus-within:focus-within {\n outline-style: solid;\n}\n\n/* ============================================\n BRAND HOVER TRANSFORM EFFECT\n ============================================ */\n.brand-hover-transform {\n transition-property: transform, box-shadow, color, background-color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n}\n\n.brand-hover-transform:hover {\n transform: translateY(-2px);\n box-shadow: 0 8px 20px rgba(0, 255, 157, 0.3);\n}\n\n.brand-hover-transform[aria-disabled=\"true\"]:hover,\n.brand-hover-transform:disabled:hover {\n transform: none;\n box-shadow: none;\n}\n\n/* Secondary Inverse Transform Effect */\n.secondary-inverse-transform {\n transition-property: transform, background-color, color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n}\n\n.secondary-inverse-transform:hover {\n transform: translateY(-2px);\n}\n\n.secondary-inverse-transform[aria-disabled=\"true\"]:hover,\n.secondary-inverse-transform:disabled:hover {\n transform: none;\n}\n\n/* ============================================\n UTILITY CLASSES\n ============================================ */\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.pointer-events-none {\n pointer-events: none;\n}\n\n.static {\n position: static;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.sticky {\n position: sticky;\n}\n\n.inset-0 {\n inset: 0rem;\n}\n\n.inset-x-16 {\n left: 1rem;\n right: 1rem;\n}\n\n/* ============================================\n POSITIONING\n ============================================ */\n\n.-top-8 {\n top: -0.5rem;\n}\n\n.left-0 {\n left: 0rem;\n}\n\n.left-1\\/2 {\n left: 50%;\n}\n\n.left-4 {\n left: 0.25rem;\n}\n\n.left-\\[4px\\] {\n left: 4px;\n}\n\n.right-0 {\n right: 0rem;\n}\n\n.right-4 {\n right: 0.25rem;\n}\n\n.right-8 {\n right: 0.5rem;\n}\n\n.right-\\[6px\\] {\n right: 6px;\n}\n\n.top-0 {\n top: 0rem;\n}\n\n.top-1\\/2 {\n top: 50%;\n}\n\n/* ============================================\n SPACING\n ============================================ */\n\n.m-0 {\n margin: 0rem;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.-ml-16 {\n margin-left: -1rem;\n}\n\n.-mr-16 {\n margin-right: -1rem;\n}\n\n.ml-0 {\n margin-left: 0rem;\n}\n\n.ml-4 {\n margin-left: 0.25rem;\n}\n\n.ml-64 {\n margin-left: 4rem;\n}\n\n.ml-8 {\n margin-left: 0.5rem;\n}\n\n.ml-auto {\n margin-left: auto;\n}\n\n.mr-4 {\n margin-right: 0.25rem;\n}\n\n.mr-8 {\n margin-right: 0.5rem;\n}\n\n.mr-auto {\n margin-right: auto;\n}\n\n/* ============================================\n DISPLAY\n ============================================ */\n\n.block {\n display: block;\n}\n\n.\\!block {\n display: block !important;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.hidden {\n display: none;\n}\n\n/* ============================================\n DIMENSIONS\n ============================================ */\n\n.h-20 {\n height: 1.25rem;\n}\n\n.h-24 {\n height: 1.5rem;\n}\n\n.h-36 {\n height: 2.25rem;\n}\n\n.h-40 {\n height: 2.5rem;\n}\n\n.h-44 {\n height: 2.75rem;\n}\n\n.h-48 {\n height: 3rem;\n}\n\n.h-auto {\n height: auto;\n}\n\n.h-full {\n height: 100%;\n}\n\n.\\!min-h-20 {\n min-height: 1.25rem !important;\n}\n\n.min-h-screen {\n min-height: 100vh;\n}\n\n.w-20 {\n width: 1.25rem;\n}\n\n.w-24 {\n width: 1.5rem;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-auto {\n width: auto;\n}\n\n/* ============================================\n FLEXBOX\n ============================================ */\n\n.flex-none {\n flex: none;\n}\n\n.grow {\n flex-grow: 1;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-4 {\n gap: 0.25rem;\n}\n\n.gap-8 {\n gap: 0.5rem;\n}\n\n.space-x-2> :not([hidden])~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.125rem * var(--tw-space-x-reverse));\n margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));\n}\n\n/* ============================================\n OVERFLOW\n ============================================ */\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-x-auto {\n overflow-x: auto;\n}\n\n.overflow-x-hidden {\n overflow-x: hidden;\n}\n\n.overflow-y-scroll {\n overflow-y: scroll;\n}\n\n/* ============================================\n TEXT\n ============================================ */\n\n.whitespace-nowrap {\n white-space: nowrap;\n}\n\n.break-words {\n overflow-wrap: break-word;\n}\n\n/* ============================================\n BORDERS & RADIUS - NEW SYSTEM\n ============================================ */\n\n.rounded {\n border-radius: 0.25rem;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-lg {\n border-radius: 16px;\n}\n\n.rounded-md {\n border-radius: 12px;\n}\n\n.rounded-pill {\n border-radius: 100px; /* NEW: pill shape */\n}\n\n.rounded-sm {\n border-radius: 8px;\n}\n\n.rounded-xxs {\n border-radius: 2px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-\\[\\#0034CB\\] {\n --tw-border-opacity: 1;\n border-color: rgb(0 52 203 / var(--tw-border-opacity));\n}\n\n.border-\\[\\#d2d2d2\\] {\n --tw-border-opacity: 1;\n border-color: rgb(210 210 210 / var(--tw-border-opacity));\n}\n\n.border-softest {\n border-color: var(--grey-light);\n}\n\n.border-b-softer {\n border-bottom-color: rgba(7, 20, 13, 0.1); /* NEW: brand-black */\n}\n\n/* ============================================\n BACKGROUNDS - NEW EBRAINS COLORS\n ============================================ */\n\n/* Accent backgrounds - NEW green */\n.\\!bg-accent-dark {\n background-color: var(--brand-green-dark) !important; /* NEW: #00C87B */\n}\n\n.bg-accent {\n background-color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.bg-accent-dark {\n background-color: var(--brand-green-dark); /* NEW: #00C87B */\n}\n\n/* Neutral backgrounds - NEW simplified greys */\n.\\!bg-darker {\n background-color: var(--grey-dark) !important; /* NEW: #7A7B7A */\n}\n\n.bg-dark {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.bg-darker {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n/* Strong backgrounds - NEW brand-black */\n.\\!bg-strong-dark {\n background-color: var(--brand-black) !important; /* NEW: #07140D */\n}\n\n.bg-strong {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.bg-strong-dark {\n background-color: var(--brand-black); /* NEW: #07140D */\n}\n\n.bg-stronger {\n background-color: var(--brand-black); /* NEW: #07140D */\n}\n\n.bg-strongest {\n background-color: var(--brand-black); /* NEW: #07140D (was pure black) */\n}\n\n/* Overlay */\n.bg-overlay {\n background-color: rgba(7, 20, 13, 0.25); /* NEW: brand-black overlay */\n}\n\n/* ============================================\n PADDING\n ============================================ */\n\n.p-12 {\n padding: 0.75rem;\n}\n\n.p-6 {\n padding: 0.375rem;\n}\n\n.p-8 {\n padding: 0.5rem;\n}\n\n.\\!px-0 {\n padding-left: 0rem !important;\n padding-right: 0rem !important;\n}\n\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n.px-16 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.px-32 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n.pl-2 {\n padding-left: 0.125rem;\n}\n\n.pl-4 {\n padding-left: 0.25rem;\n}\n\n.pl-8 {\n padding-left: 0.5rem;\n}\n\n.pr-2 {\n padding-right: 0.125rem;\n}\n\n.pr-4 {\n padding-right: 0.25rem;\n}\n\n.pr-8 {\n padding-right: 0.5rem;\n}\n\n/* ============================================\n TEXT COLORS - NEW SYSTEM\n ============================================ */\n\n.\\!text-current {\n color: currentColor !important;\n}\n\n.text-accent {\n color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.text-current {\n color: currentColor;\n}\n\n.text-default {\n color: var(--brand-black); /* NEW: #07140D (was pure black) */\n}\n\n.text-inverse {\n color: var(--white);\n}\n\n.text-light {\n color: var(--grey-dark); /* NEW: simplified to grey-dark */\n}\n\n\n.text-lightest {\n color: var(--grey-light); /* NEW: simplified to grey-dark */\n}\n\n/* ============================================\n OPACITY\n ============================================ */\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-20 {\n opacity: 20;\n}\n\n/* ============================================\n SHADOWS - NEW SYSTEM\n ============================================ */\n\n.shadow {\n --tw-shadow: 0 1px 3px rgba(7, 20, 13, 0.1); /* NEW: brand-black */\n --tw-shadow-colored: 0 1px 3px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow-accent {\n --tw-shadow: 0 0 16px rgba(0, 255, 157, 0.5); /* NEW: brand-green glow */\n --tw-shadow-colored: 0 0 16px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.underline-offset-4 {\n text-underline-offset: 0.2em;\n}\n\n.\\@container {\n container-type: inline-size;\n}\n\n/* ============================================\n PSEUDO-ELEMENT EFFECTS\n ============================================ */\n\n.after\\:effect-opacity::after {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n.even\\:bg-inverse-softer:nth-child(even) {\n background-color: rgba(255, 255, 255, .15);\n}\n\n.invalid\\:text-lightest:invalid {\n color: var(--grey-dark); /* NEW: simplified */\n}\n\n/* ============================================\n INTERACTIVE STATES - NEW COLORS\n ============================================ */\n\n.focus-within\\:bg-transparent:focus-within {\n background-color: transparent;\n}\n\n/* Hover states with NEW colors */\n\n.hover\\:border-0::hover {\n border-width: 0px;\n}\n\n.hover\\:border-accent::hover {\n border-color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.hover\\:text-default:hover {\n color: var(--brand-black);\n}\n\n.hover\\:text-light:hover {\n color: var(--grey-dark);\n}\n\n.hover\\:text-inverse:hover {\n color: var(--white);\n}\n\n\n.hover\\:bg-accent:hover {\n background-color: var(--brand-green); /* NEW: #00C87B */\n}\n\n.hover\\:bg-accent-dark:hover {\n background-color: var(--brand-green-dark); /* NEW: #00C87B */\n}\n\n.hover\\:bg-dark:hover {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.hover\\:bg-darker:hover {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.hover\\:bg-default:hover {\n background-color: var(--grey-light);\n}\n\n.hover\\:bg-inverse:hover {\n background-color: var(--white);\n}\n\n.hover\\:bg-strong-dark:hover {\n background-color: var(--brand-black); /* NEW: #07140D */\n}\n\n.hover\\:bg-transparent:hover {\n background-color: transparent;\n}\n\n.hover\\:bg-strongest:hover {\n background-color: var(--brand-black);\n}\n\n.hover\\:text-default:hover {\n color: var(--brand-black); /* NEW: #07140D */\n}\n\n.hover\\:text-lighter:hover {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.hover\\:\\!underline:hover {\n text-decoration-line: underline !important;\n}\n\n.hover\\:no-underline:hover {\n text-decoration-line: none;\n}\n\n.hover\\:shadow-hover:hover {\n --tw-shadow: 0 8px 24px rgba(7, 20, 13, 0.2); /* NEW: brand-black */\n --tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.focus\\:shadow-none:focus {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n/* ============================================\n DISABLED STATES - NEW COLORS\n ============================================ */\n\n.disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n\n.disabled\\:bg-dark:disabled {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.disabled\\:text-lightest:disabled {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.aria-disabled\\:cursor-not-allowed[aria-disabled=\"true\"] {\n cursor: not-allowed;\n}\n\n.aria-disabled\\:\\!border-transparent[aria-disabled=\"true\"] {\n border-color: transparent !important;\n}\n\n.aria-disabled\\:bg-dark[aria-disabled=\"true\"] {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.aria-disabled\\:bg-transparent[aria-disabled=\"true\"] {\n background-color: transparent;\n}\n\n.aria-disabled\\:text-light[aria-disabled=\"true\"] {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.aria-disabled\\:text-lightest[aria-disabled=\"true\"] {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.aria-disabled\\:line-through[aria-disabled=\"true\"] {\n text-decoration-line: line-through;\n}\n\n.aria-disabled\\:shadow-none[aria-disabled=\"true\"] {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.aria-current-page\\:bg-darker[aria-current=\"page\"] {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n/* ============================================\n AFTER PSEUDO-ELEMENTS\n ============================================ */\n\n.after\\:absolute::after {\n position: absolute;\n}\n\n.after\\:inset-0::after {\n inset: 0rem;\n}\n\n.after\\:inset-x-0::after {\n left: 0rem;\n right: 0rem;\n}\n\n.after\\:bottom-0::after {\n bottom: 0rem;\n}\n\n.after\\:left-16::after {\n left: 1rem;\n}\n\n.after\\:right-16::after {\n right: 1rem;\n}\n\n.after\\:z-10::after {\n z-index: 10;\n}\n\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n\n.after\\:rounded-t-lg::after {\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n}\n\n.after\\:border-3::after {\n border-width: 3px;\n}\n\n.after\\:border-b-2::after {\n border-bottom-width: 2px;\n}\n\n.after\\:\\!border-transparent::after {\n border-color: transparent !important;\n}\n\n.after\\:border-accent::after {\n border-color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.after\\:border-accent-dark::after {\n border-color: var(--brand-green-dark); /* NEW: #00FF9D */\n}\n\n.after\\:border-soft::after {\n border-color: var(--grey-dark);\n}\n\n.after\\:border-softest::after {\n border-color: var(--grey-light);\n}\n\n.after\\:opacity-0::after {\n opacity: 0;\n}\n\n.after\\:content-\\[\\'\\'\\]::after {\n --tw-content: '';\n content: var(--tw-content);\n}\n\n.hover\\:text-accent:hover {\n color: var(--brand-green);\n}\n\n.hover\\:after\\:\\border-accent:hover::after {\n border-color: var(--brand-green);\n}\n\n.hover\\:after\\:\\!border-transparent:hover::after {\n border-color: transparent !important;\n}\n\n.hover\\:after\\:opacity-100:hover::after {\n opacity: 1;\n}\n\n.focus-visible\\:after\\:opacity-100:focus-visible::after {\n opacity: 1;\n}\n\n.aria-disabled\\:after\\:\\!border-transparent[aria-disabled=\"true\"]::after {\n border-color: transparent !important;\n}\n\n.aria-disabled\\:after\\:\\!border-0[aria-disabled=\"true\"]::after {\n border-width: 0 !important;\n}\n\n.hover\\:before\\:opacity-100:hover::before {\n opacity: 1;\n}\n\n/* ============================================\n CTA BUTTON STYLES\n ============================================ */\n\n/* CTA link style */\n.cta-link {\n font-family: 'IBM Plex Mono', monospace;\n font-size: var(--f-ui-01-fontSize);\n color: var(--grey-dark);\n text-decoration: none;\n transition: color 0.3s ease;\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.cta-link:hover {\n color: var(--brand-green);\n}\n\n/* CTA brand link style - always green */\n.cta-link-brand {\n font-family: 'IBM Plex Mono', monospace;\n font-size: var(--f-ui-02-fontSize);\n color: var(--brand-green);\n text-decoration: none;\n transition: color 0.3s ease;\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.cta-link-brand:hover {\n color: var(--brand-green-dark);\n}\n\n@media (min-width: 750px) {\n .md\\:w-full {\n width: 100%;\n }\n\n .md\\:flex {\n display: flex;\n }\n}";
|
|
372
|
+
const edsButtonCss = "/* ============================================\n EDS BUTTON - NEW EBRAINS VISUAL SYSTEM\n ============================================ */\n\n*,\n::before,\n::after {\n box-sizing: border-box;\n border-width: 0;\n border-style: solid;\n border-color: currentColor;\n}\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\n 1. Change the font styles in all browsers.\n 2. Remove the margin in Firefox and Safari.\n 3. Remove default padding in all browsers.\n */\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit;\n font-feature-settings: inherit;\n font-variation-settings: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n color: inherit;\n margin: 0;\n padding: 0;\n}\n\n/*\n Remove the inheritance of text transform in Edge and Firefox.\n */\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n 1. Correct the inability to style clickable types in iOS and Safari.\n 2. Remove default button styles.\n */\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button;\n /* 1 */\n background-color: transparent;\n /* 2 */\n background-image: none;\n /* 2 */\n}\n\np {\n margin: 0;\n}\n\n/*\n Set the default cursor for buttons.\n */\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\n Make sure disabled buttons don't get the pointer cursor.\n */\n:disabled {\n cursor: default;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n/* ============================================\n TYPOGRAPHY CLASSES\n ============================================ */\n\n.f-body-01 {\n font-family: var(--f-body-01-fontFamily);\n font-weight: var(--f-body-01-fontWeight);\n font-size: var(--f-body-01-fontSize);\n line-height: var(--f-body-01-lineHeight);\n letter-spacing: var(--f-body-01-letterSpacing);\n}\n\n.f-body-02 {\n font-family: var(--f-body-02-fontFamily);\n font-weight: var(--f-body-02-fontWeight);\n font-size: var(--f-body-02-fontSize);\n line-height: var(--f-body-02-lineHeight);\n letter-spacing: var(--f-body-02-letterSpacing);\n}\n\n.f-ui-01 {\n font-family: var(--f-ui-01-fontFamily);\n font-weight: var(--f-ui-01-fontWeight);\n font-size: var(--f-ui-01-fontSize);\n line-height: var(--f-ui-01-lineHeight);\n letter-spacing: var(--f-ui-01-letterSpacing);\n}\n\n.f-ui-02 {\n font-family: var(--f-ui-02-fontFamily);\n font-weight: var(--f-ui-02-fontWeight);\n font-size: var(--f-ui-02-fontSize);\n line-height: var(--f-ui-02-lineHeight);\n letter-spacing: var(--f-ui-02-letterSpacing);\n}\n\n/* ============================================\n BUTTON BORDER EFFECTS - NEW SYSTEM\n ============================================ */\n\n.border-inside {\n position: relative;\n\n &::after {\n pointer-events: none;\n position: absolute;\n inset: 0rem;\n z-index: 1;\n border-radius: 8px;\n border-width: 2px;\n border-color: rgba(7, 20, 13, 1); /* brand-black with opacity */\n content: '';\n }\n}\n\n.border-inside-inverse {\n position: relative;\n\n &::after {\n pointer-events: none;\n position: absolute;\n inset: 0rem;\n z-index: 1;\n border-radius: 8px;\n border-width: 2px;\n border-color: rgba(255, 255, 255, 1); /* white border */\n content: '';\n }\n}\n\n.border-inside-pill {\n &::after {\n border-radius: 100px; /* pill shape */\n content: '';\n }\n}\n\n.border-inside-inverse.border-inside-pill {\n &::after {\n border-radius: 100px; /* pill shape for inverse border */\n }\n}\n\n/* ============================================\n LOADER SPINNER\n ============================================ */\n\n.loader {\n box-sizing: border-box;\n display: inline-block;\n height: 1rem;\n width: 1rem;\n}\n\n@keyframes spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n.loader {\n animation: spin 1s linear infinite;\n border-radius: 9999px;\n border: 3px solid rgba(7, 20, 13, 0.3); /* brand-black */\n border-bottom-color: #07140D; /* brand-black */\n}\n\n/* ============================================\n TRANSITIONS & EFFECTS\n ============================================ */\n\n.effect-color {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n.effect-focus {\n outline-width: 3px;\n outline-offset: 2px;\n outline-color: var(--brand-green); /* NEW: brand-green for focus */\n}\n\n.effect-focus:focus-visible {\n outline-style: solid;\n}\n\n.effect-focus-within {\n outline-width: 3px;\n outline-offset: 2px;\n outline-color: var(--brand-green); /* NEW: brand-green for focus */\n}\n\n.effect-focus-within:focus-within {\n outline-style: solid;\n}\n\n/* ============================================\n BRAND HOVER TRANSFORM EFFECT\n ============================================ */\n.brand-hover-transform {\n transition-property: transform, box-shadow, color, background-color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n}\n\n.brand-hover-transform:hover {\n transform: translateY(-2px);\n box-shadow: 0 8px 20px rgba(0, 255, 157, 0.3);\n}\n\n.brand-hover-transform[aria-disabled=\"true\"]:hover,\n.brand-hover-transform:disabled:hover {\n transform: none;\n box-shadow: none;\n}\n\n/* Secondary Inverse Transform Effect */\n.secondary-inverse-transform {\n transition-property: transform, background-color, color;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n}\n\n.secondary-inverse-transform:hover {\n transform: translateY(-2px);\n}\n\n.secondary-inverse-transform[aria-disabled=\"true\"]:hover,\n.secondary-inverse-transform:disabled:hover {\n transform: none;\n}\n\n/* ============================================\n UTILITY CLASSES\n ============================================ */\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.pointer-events-none {\n pointer-events: none;\n}\n\n.static {\n position: static;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.sticky {\n position: sticky;\n}\n\n.inset-0 {\n inset: 0rem;\n}\n\n.inset-x-16 {\n left: 1rem;\n right: 1rem;\n}\n\n/* ============================================\n POSITIONING\n ============================================ */\n\n.-top-8 {\n top: -0.5rem;\n}\n\n.left-0 {\n left: 0rem;\n}\n\n.left-1\\/2 {\n left: 50%;\n}\n\n.left-4 {\n left: 0.25rem;\n}\n\n.left-\\[4px\\] {\n left: 4px;\n}\n\n.right-0 {\n right: 0rem;\n}\n\n.right-4 {\n right: 0.25rem;\n}\n\n.right-8 {\n right: 0.5rem;\n}\n\n.right-\\[6px\\] {\n right: 6px;\n}\n\n.top-0 {\n top: 0rem;\n}\n\n.top-1\\/2 {\n top: 50%;\n}\n\n/* ============================================\n SPACING\n ============================================ */\n\n.m-0 {\n margin: 0rem;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.-ml-16 {\n margin-left: -1rem;\n}\n\n.-mr-16 {\n margin-right: -1rem;\n}\n\n.ml-0 {\n margin-left: 0rem;\n}\n\n.ml-4 {\n margin-left: 0.25rem;\n}\n\n.ml-64 {\n margin-left: 4rem;\n}\n\n.ml-8 {\n margin-left: 0.5rem;\n}\n\n.ml-auto {\n margin-left: auto;\n}\n\n.mr-4 {\n margin-right: 0.25rem;\n}\n\n.mr-8 {\n margin-right: 0.5rem;\n}\n\n.mr-auto {\n margin-right: auto;\n}\n\n/* ============================================\n DISPLAY\n ============================================ */\n\n.block {\n display: block;\n}\n\n.\\!block {\n display: block !important;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.inline {\n display: inline;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.hidden {\n display: none;\n}\n\n/* ============================================\n DIMENSIONS\n ============================================ */\n\n.h-20 {\n height: 1.25rem;\n}\n\n.h-24 {\n height: 1.5rem;\n}\n\n.h-36 {\n height: 2.25rem;\n}\n\n.h-40 {\n height: 2.5rem;\n}\n\n.h-44 {\n height: 2.75rem;\n}\n\n/* Min-height variants — used for button sizing so a label that wraps to\n two lines grows (with its py-12 padding) instead of being clipped at a\n fixed height. Single-line buttons keep the same height. */\n.min-h-36 {\n min-height: 2.25rem;\n}\n\n.min-h-44 {\n min-height: 2.75rem;\n}\n\n.h-48 {\n height: 3rem;\n}\n\n.h-auto {\n height: auto;\n}\n\n.h-full {\n height: 100%;\n}\n\n.\\!min-h-20 {\n min-height: 1.25rem !important;\n}\n\n.min-h-screen {\n min-height: 100vh;\n}\n\n.w-20 {\n width: 1.25rem;\n}\n\n.w-24 {\n width: 1.5rem;\n}\n\n.w-full {\n width: 100%;\n}\n\n.w-auto {\n width: auto;\n}\n\n/* ============================================\n FLEXBOX\n ============================================ */\n\n.flex-none {\n flex: none;\n}\n\n.grow {\n flex-grow: 1;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.resize {\n resize: both;\n}\n\n.flex-row {\n flex-direction: row;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.flex-wrap {\n flex-wrap: wrap;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-4 {\n gap: 0.25rem;\n}\n\n.gap-8 {\n gap: 0.5rem;\n}\n\n.space-x-2> :not([hidden])~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.125rem * var(--tw-space-x-reverse));\n margin-left: calc(0.125rem * calc(1 - var(--tw-space-x-reverse)));\n}\n\n/* ============================================\n OVERFLOW\n ============================================ */\n\n.overflow-hidden {\n overflow: hidden;\n}\n\n.overflow-x-auto {\n overflow-x: auto;\n}\n\n.overflow-x-hidden {\n overflow-x: hidden;\n}\n\n.overflow-y-scroll {\n overflow-y: scroll;\n}\n\n/* ============================================\n TEXT\n ============================================ */\n\n.whitespace-nowrap {\n white-space: nowrap;\n}\n\n.break-words {\n overflow-wrap: break-word;\n}\n\n/* ============================================\n BORDERS & RADIUS - NEW SYSTEM\n ============================================ */\n\n.rounded {\n border-radius: 0.25rem;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.rounded-lg {\n border-radius: 16px;\n}\n\n.rounded-md {\n border-radius: 12px;\n}\n\n.rounded-pill {\n border-radius: 100px; /* NEW: pill shape */\n}\n\n.rounded-sm {\n border-radius: 8px;\n}\n\n.rounded-xxs {\n border-radius: 2px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-\\[\\#0034CB\\] {\n --tw-border-opacity: 1;\n border-color: rgb(0 52 203 / var(--tw-border-opacity));\n}\n\n.border-\\[\\#d2d2d2\\] {\n --tw-border-opacity: 1;\n border-color: rgb(210 210 210 / var(--tw-border-opacity));\n}\n\n.border-softest {\n border-color: var(--grey-light);\n}\n\n.border-b-softer {\n border-bottom-color: rgba(7, 20, 13, 0.1); /* NEW: brand-black */\n}\n\n/* ============================================\n BACKGROUNDS - NEW EBRAINS COLORS\n ============================================ */\n\n/* Accent backgrounds - NEW green */\n.\\!bg-accent-dark {\n background-color: var(--brand-green-dark) !important; /* NEW: #00C87B */\n}\n\n.bg-accent {\n background-color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.bg-brand-light {\n background-color: var(--green-200); /* light brand tint #d3ffdc — brandLight intent */\n}\n\n.bg-accent-dark {\n background-color: var(--brand-green-dark); /* NEW: #00C87B */\n}\n\n/* Neutral backgrounds - NEW simplified greys */\n.\\!bg-darker {\n background-color: var(--grey-dark) !important; /* NEW: #7A7B7A */\n}\n\n.bg-dark {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.bg-darker {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n/* Strong backgrounds - NEW brand-black */\n.\\!bg-strong-dark {\n background-color: var(--brand-black) !important; /* NEW: #07140D */\n}\n\n.bg-strong {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.bg-strong-dark {\n background-color: var(--brand-black); /* NEW: #07140D */\n}\n\n.bg-stronger {\n background-color: var(--brand-black); /* NEW: #07140D */\n}\n\n.bg-strongest {\n background-color: var(--brand-black); /* NEW: #07140D (was pure black) */\n}\n\n/* Overlay */\n.bg-overlay {\n background-color: rgba(7, 20, 13, 0.25); /* NEW: brand-black overlay */\n}\n\n/* ============================================\n PADDING\n ============================================ */\n\n.p-12 {\n padding: 0.75rem;\n}\n\n.p-6 {\n padding: 0.375rem;\n}\n\n.p-8 {\n padding: 0.5rem;\n}\n\n.\\!px-0 {\n padding-left: 0rem !important;\n padding-right: 0rem !important;\n}\n\n.px-12 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n\n.px-16 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n\n.px-32 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n\n.py-8 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-12 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n\n.pl-2 {\n padding-left: 0.125rem;\n}\n\n.pl-4 {\n padding-left: 0.25rem;\n}\n\n.pl-8 {\n padding-left: 0.5rem;\n}\n\n.pr-2 {\n padding-right: 0.125rem;\n}\n\n.pr-4 {\n padding-right: 0.25rem;\n}\n\n.pr-8 {\n padding-right: 0.5rem;\n}\n\n/* ============================================\n TEXT COLORS - NEW SYSTEM\n ============================================ */\n\n.\\!text-current {\n color: currentColor !important;\n}\n\n.text-accent {\n color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.text-current {\n color: currentColor;\n}\n\n.text-default {\n color: var(--brand-black); /* NEW: #07140D (was pure black) */\n}\n\n.text-inverse {\n color: var(--white);\n}\n\n.text-light {\n color: var(--grey-dark); /* NEW: simplified to grey-dark */\n}\n\n\n.text-lightest {\n color: var(--grey-light); /* NEW: simplified to grey-dark */\n}\n\n/* ============================================\n OPACITY\n ============================================ */\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-20 {\n opacity: 20;\n}\n\n/* ============================================\n SHADOWS - NEW SYSTEM\n ============================================ */\n\n.shadow {\n --tw-shadow: 0 1px 3px rgba(7, 20, 13, 0.1); /* NEW: brand-black */\n --tw-shadow-colored: 0 1px 3px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.shadow-accent {\n --tw-shadow: 0 0 16px rgba(0, 255, 157, 0.5); /* NEW: brand-green glow */\n --tw-shadow-colored: 0 0 16px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.underline-offset-4 {\n text-underline-offset: 0.2em;\n}\n\n.\\@container {\n container-type: inline-size;\n}\n\n/* ============================================\n PSEUDO-ELEMENT EFFECTS\n ============================================ */\n\n.after\\:effect-opacity::after {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 300ms;\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n\n.even\\:bg-inverse-softer:nth-child(even) {\n background-color: rgba(255, 255, 255, .15);\n}\n\n.invalid\\:text-lightest:invalid {\n color: var(--grey-dark); /* NEW: simplified */\n}\n\n/* ============================================\n INTERACTIVE STATES - NEW COLORS\n ============================================ */\n\n.focus-within\\:bg-transparent:focus-within {\n background-color: transparent;\n}\n\n/* Hover states with NEW colors */\n\n.hover\\:border-0::hover {\n border-width: 0px;\n}\n\n.hover\\:border-accent::hover {\n border-color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.hover\\:text-default:hover {\n color: var(--brand-black);\n}\n\n.hover\\:text-light:hover {\n color: var(--grey-dark);\n}\n\n.hover\\:text-inverse:hover {\n color: var(--white);\n}\n\n\n.hover\\:bg-accent:hover {\n background-color: var(--brand-green); /* NEW: #00C87B */\n}\n\n.hover\\:bg-accent-dark:hover {\n background-color: var(--brand-green-dark); /* NEW: #00C87B */\n}\n\n.hover\\:bg-dark:hover {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.hover\\:bg-darker:hover {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.hover\\:bg-default:hover {\n background-color: var(--grey-light);\n}\n\n.hover\\:bg-inverse:hover {\n background-color: var(--white);\n}\n\n.hover\\:bg-strong-dark:hover {\n background-color: var(--brand-black); /* NEW: #07140D */\n}\n\n.hover\\:bg-transparent:hover {\n background-color: transparent;\n}\n\n.hover\\:bg-strongest:hover {\n background-color: var(--brand-black);\n}\n\n.hover\\:text-default:hover {\n color: var(--brand-black); /* NEW: #07140D */\n}\n\n.hover\\:text-lighter:hover {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.hover\\:\\!underline:hover {\n text-decoration-line: underline !important;\n}\n\n.hover\\:no-underline:hover {\n text-decoration-line: none;\n}\n\n.hover\\:shadow-hover:hover {\n --tw-shadow: 0 8px 24px rgba(7, 20, 13, 0.2); /* NEW: brand-black */\n --tw-shadow-colored: 0 8px 24px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.focus\\:shadow-none:focus {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n/* ============================================\n DISABLED STATES - NEW COLORS\n ============================================ */\n\n.disabled\\:cursor-not-allowed:disabled {\n cursor: not-allowed;\n}\n\n.disabled\\:bg-dark:disabled {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.disabled\\:text-lightest:disabled {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.aria-disabled\\:cursor-not-allowed[aria-disabled=\"true\"] {\n cursor: not-allowed;\n}\n\n.aria-disabled\\:\\!border-transparent[aria-disabled=\"true\"] {\n border-color: transparent !important;\n}\n\n.aria-disabled\\:bg-dark[aria-disabled=\"true\"] {\n background-color: var(--grey-light); /* NEW: #ECECEC */\n}\n\n.aria-disabled\\:bg-transparent[aria-disabled=\"true\"] {\n background-color: transparent;\n}\n\n.aria-disabled\\:text-light[aria-disabled=\"true\"] {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.aria-disabled\\:text-lightest[aria-disabled=\"true\"] {\n color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n.aria-disabled\\:line-through[aria-disabled=\"true\"] {\n text-decoration-line: line-through;\n}\n\n.aria-disabled\\:shadow-none[aria-disabled=\"true\"] {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.aria-current-page\\:bg-darker[aria-current=\"page\"] {\n background-color: var(--grey-dark); /* NEW: #7A7B7A */\n}\n\n/* ============================================\n AFTER PSEUDO-ELEMENTS\n ============================================ */\n\n.after\\:absolute::after {\n position: absolute;\n}\n\n.after\\:inset-0::after {\n inset: 0rem;\n}\n\n.after\\:inset-x-0::after {\n left: 0rem;\n right: 0rem;\n}\n\n.after\\:bottom-0::after {\n bottom: 0rem;\n}\n\n.after\\:left-16::after {\n left: 1rem;\n}\n\n.after\\:right-16::after {\n right: 1rem;\n}\n\n.after\\:z-10::after {\n z-index: 10;\n}\n\n.after\\:rounded-lg::after {\n border-radius: 16px;\n}\n\n.after\\:rounded-t-lg::after {\n border-top-left-radius: 16px;\n border-top-right-radius: 16px;\n}\n\n.after\\:border-3::after {\n border-width: 3px;\n}\n\n.after\\:border-b-2::after {\n border-bottom-width: 2px;\n}\n\n.after\\:\\!border-transparent::after {\n border-color: transparent !important;\n}\n\n.after\\:border-accent::after {\n border-color: var(--brand-green); /* NEW: #00FF9D */\n}\n\n.after\\:border-accent-dark::after {\n border-color: var(--brand-green-dark); /* NEW: #00FF9D */\n}\n\n.after\\:border-soft::after {\n border-color: var(--grey-dark);\n}\n\n.after\\:border-softest::after {\n border-color: var(--grey-light);\n}\n\n.after\\:opacity-0::after {\n opacity: 0;\n}\n\n.after\\:content-\\[\\'\\'\\]::after {\n --tw-content: '';\n content: var(--tw-content);\n}\n\n.hover\\:text-accent:hover {\n color: var(--brand-green);\n}\n\n.hover\\:after\\:\\border-accent:hover::after {\n border-color: var(--brand-green);\n}\n\n.hover\\:after\\:\\!border-transparent:hover::after {\n border-color: transparent !important;\n}\n\n.hover\\:after\\:opacity-100:hover::after {\n opacity: 1;\n}\n\n.focus-visible\\:after\\:opacity-100:focus-visible::after {\n opacity: 1;\n}\n\n.aria-disabled\\:after\\:\\!border-transparent[aria-disabled=\"true\"]::after {\n border-color: transparent !important;\n}\n\n.aria-disabled\\:after\\:\\!border-0[aria-disabled=\"true\"]::after {\n border-width: 0 !important;\n}\n\n.hover\\:before\\:opacity-100:hover::before {\n opacity: 1;\n}\n\n/* ============================================\n CTA BUTTON STYLES\n ============================================ */\n\n/* CTA link style */\n.cta-link {\n font-family: 'IBM Plex Mono', monospace;\n font-size: var(--f-ui-01-fontSize);\n color: var(--grey-dark);\n text-decoration: none;\n transition: color 0.3s ease;\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n}\n\n.cta-link:hover {\n color: var(--brand-green);\n}\n\n/* CTA brand link style - always green */\n.cta-link-brand {\n font-family: 'IBM Plex Mono', monospace;\n font-size: var(--f-ui-02-fontSize);\n color: var(--brand-green);\n text-decoration: none;\n transition: color 0.3s ease;\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n}\n\n.cta-link-brand:hover {\n color: var(--brand-green-dark);\n}\n\n@media (min-width: 750px) {\n .md\\:w-full {\n width: 100%;\n }\n\n .md\\:flex {\n display: flex;\n }\n}";
|
|
373
373
|
const EdsButtonStyle0 = edsButtonCss;
|
|
374
374
|
|
|
375
375
|
const EdsButton = class {
|
|
376
376
|
constructor(hostRef) {
|
|
377
377
|
registerInstance(this, hostRef);
|
|
378
378
|
this.button = cva([
|
|
379
|
-
'relative items-center
|
|
379
|
+
'relative items-center cursor-pointer',
|
|
380
|
+
// Brand-green focus-visible outline (rules live in eds-button.css);
|
|
381
|
+
// without this class keyboard focus falls back to the browser ring.
|
|
382
|
+
'effect-focus',
|
|
380
383
|
'aria-disabled:text-lightest aria-disabled:bg-dark aria-disabled:cursor-not-allowed',
|
|
381
384
|
'disabled:text-lightest disabled:bg-dark disabled:cursor-not-allowed'
|
|
382
385
|
], {
|
|
@@ -388,6 +391,10 @@ const EdsButton = class {
|
|
|
388
391
|
ghost: '',
|
|
389
392
|
ghostInverse: 'text-inverse',
|
|
390
393
|
brand: 'bg-accent text-default hover:bg-strongest hover:text-inverse aria-disabled:shadow-none',
|
|
394
|
+
// Light-green tint with brand-black text — an on-brand "unselected"
|
|
395
|
+
// state (e.g. eds-rating / eds-nps) that brightens to solid brand on
|
|
396
|
+
// hover/selection. Lives start-to-finish in the brand palette.
|
|
397
|
+
brandLight: 'bg-brand-light text-default hover:bg-accent hover:text-default aria-disabled:shadow-none',
|
|
391
398
|
brandInverse: 'bg-accent text-default hover:bg-inverse hover:text-default aria-disabled:shadow-none',
|
|
392
399
|
neutral: 'bg-darker after:border-softest bg-inverse hover:bg-dark hover:text-light text-inverse aria-disabled:shadow-none',
|
|
393
400
|
cta: [
|
|
@@ -406,8 +413,8 @@ const EdsButton = class {
|
|
|
406
413
|
true: ''
|
|
407
414
|
},
|
|
408
415
|
size: {
|
|
409
|
-
small: 'h-36 f-ui-02',
|
|
410
|
-
large: 'h-44 f-ui-01'
|
|
416
|
+
small: 'min-h-36 f-ui-02 py-8',
|
|
417
|
+
large: 'min-h-44 f-ui-01 py-12'
|
|
411
418
|
},
|
|
412
419
|
hasIcon: {
|
|
413
420
|
true: '',
|
|
@@ -580,7 +587,7 @@ const EdsButton = class {
|
|
|
580
587
|
const loaderBottomColor = this.intent === 'primary' || this.intent === 'secondaryInverse'
|
|
581
588
|
? '#FFFFFF' // White for dark backgrounds
|
|
582
589
|
: '#07140D'; // Brand-black for light backgrounds (secondary, brand, etc.)
|
|
583
|
-
return (h(Host, { key: '
|
|
590
|
+
return (h(Host, { key: '263f3fd25c17d5f9d8ddcfcc57848d6c8e729994' }, h(ElementType, { key: '9c9f68e332ca6fe14387fc239e880069596b0072', tabindex: isInteractive ? '0' : '-1', "aria-label": this.label ? undefined : this.ariaLabel, "aria-disabled": this.disabled || this.loading ? 'true' : undefined, "aria-busy": this.loading ? 'true' : undefined, disabled: this.elementType === 'button' ? this.disabled || this.loading : undefined, role: this.elementType === 'a' ? 'button' : undefined, class: `${classes || ''}`, onClick: (event) => this.handleClick(event), onKeyDown: (event) => this.handleKeyDown(event) }, this.label && (h("span", { key: '285a0b07089eb7ebab3bd439000ea89c454164d0', class: `${this.loading ? 'opacity-0' : ''} ${this.icon && (this.intent !== 'cta' && this.intent !== 'cta-brand') ? (this.iconPos === 'right' ? (this.size === 'large' ? 'pr-4' : 'pr-2') : (this.size === 'large' ? 'pl-4' : 'pl-2')) : ''}`, "aria-hidden": this.loading ? 'true' : undefined }, this.label)), this.loading && (h("span", { key: '36da873de3be79f2cfc3e4851dadd953e17109dc', class: "absolute inset-0 flex items-center justify-center", "aria-hidden": "true" }, h("span", { key: '961913b2c22e6bd803c6639e617129843c877bfe', class: "loader", style: {
|
|
584
591
|
border: `3px solid ${loaderBorderColor}`,
|
|
585
592
|
borderBottomColor: loaderBottomColor
|
|
586
593
|
} }))), this.icon ? (h("eds-icon-wrapper", { name: this.icon, size: 20, "aria-hidden": "true" })) : null)));
|
|
@@ -624,7 +631,7 @@ const EdsCardApp = class {
|
|
|
624
631
|
};
|
|
625
632
|
EdsCardApp.style = EdsCardAppStyle0;
|
|
626
633
|
|
|
627
|
-
const edsCardCtaCss = ":host{display:flex;height:100%}.cta-container{height:auto;text-align:center;border-radius:16px;padding:1.5rem;position:relative;overflow:hidden;display:flex;flex-direction:column;flex-grow:1;justify-content:
|
|
634
|
+
const edsCardCtaCss = ":host{display:flex;height:100%}.cta-container{height:auto;text-align:center;border-radius:16px;padding:1.5rem;position:relative;overflow:hidden;display:flex;flex-direction:column;flex-grow:1;justify-content:flex-start}.cta-container-default{background-color:var(--brand-black);border:1px solid rgba(0, 255, 157, 0.25)}.cta-container-default .cta-title{color:var(--white)}.cta-container-default .cta-description{color:var(--grey-light)}.cta-container-default .cta-link{color:var(--grey-dark)}.cta-container-inverse{background-color:var(--white);border:1px solid rgba(0, 255, 157, 0.15)}.cta-container-inverse .cta-title{color:var(--brand-black)}.cta-container-inverse .cta-description{color:var(--grey-dark)}.cta-container-inverse .cta-link{color:var(--grey-dark)}.cta-container::before{content:'';position:absolute;top:-50%;left:-50%;width:200%;height:200%;background:radial-gradient(circle at center, rgba(0, 255, 157, 0.1) 0%, transparent 50%);animation:rotate 20s linear infinite;pointer-events:none}@keyframes rotate{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}.cta-content{position:relative;z-index:1;width:100%;flex-grow:1;display:flex;flex-direction:column}.cta-title{font-family:'Inter', var(--f-heading-fontFamily);font-weight:300;font-size:clamp(1.5rem, 4vw, 2rem);letter-spacing:-0.02em;margin-bottom:1rem;line-height:1.2}.cta-description{font-family:'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;font-size:1rem;margin:0 0 1.5rem;line-height:1.6}.cta-actions{display:flex;gap:1rem;justify-content:center;margin-bottom:1.5rem;flex-wrap:wrap;margin-top:auto}.cta-links{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}@media (max-width: 768px){.cta-container{padding:1.5rem}.cta-title{font-size:1.25rem}.cta-description{font-size:0.875rem;margin-bottom:1rem}.cta-actions{gap:0.75rem;margin-bottom:1rem}.cta-links{gap:0.75rem}}";
|
|
628
635
|
const EdsCardCtaStyle0 = edsCardCtaCss;
|
|
629
636
|
|
|
630
637
|
const EdsCardCta = class {
|
|
@@ -664,7 +671,7 @@ const EdsCardCta = class {
|
|
|
664
671
|
const primaryButtonIntent = this.variant === 'default' ? 'brandInverse' : 'brand';
|
|
665
672
|
const secondaryButtonIntent = this.variant === 'default' ? 'secondaryInverse' : 'secondary';
|
|
666
673
|
const linkIntent = this.variant === 'default' ? 'cta' : 'underline';
|
|
667
|
-
return (h("div", { key: 'ee2163e6096ad05dc55ac40c6626236723a23b72', class: containerClasses }, h("div", { key: 'f51481133015ef5eafce48bab525cf166c000e3a', class: "cta-content" }, h("h2", { key: '577441d8bc7cb4c906408faf995e106ef2779e8b', class: "cta-title", innerHTML: this.title }), h("p", { key: 'b8cbcf891b95f82c3dd57f1db9335f55c1d7162c', class: "cta-description" }, this.description), h("div", { key: 'f167262a521b9e15176a4fc65e3e45a8cf24feb1', class: "cta-actions" }, h("eds-button", { key: '
|
|
674
|
+
return (h("div", { key: 'ee2163e6096ad05dc55ac40c6626236723a23b72', class: containerClasses }, h("div", { key: 'f51481133015ef5eafce48bab525cf166c000e3a', class: "cta-content" }, h("h2", { key: '577441d8bc7cb4c906408faf995e106ef2779e8b', class: "cta-title", innerHTML: this.title }), h("p", { key: 'b8cbcf891b95f82c3dd57f1db9335f55c1d7162c', class: "cta-description" }, this.description), h("div", { key: 'f167262a521b9e15176a4fc65e3e45a8cf24feb1', class: "cta-actions" }, h("slot", { key: 'c114de9b72bf56a2bda67d21aab0a1a24efba2e4', name: "actions" }, h("eds-button", { key: '75c4508fad3377ae1788bca7cda5f8315c8301a3', label: this.primaryButtonText, intent: primaryButtonIntent, icon: "arrow-right", "icon-pos": "right", size: "large", triggerClick: this.handlePrimaryClick }), this.secondaryButtonText && (h("eds-button", { key: '2c6de6b1032c62619b7225d3f7cbc04617fca465', label: this.secondaryButtonText, intent: secondaryButtonIntent, size: "large", triggerClick: this.handleSecondaryClick })))), this.parsedLinks && this.parsedLinks.length > 0 && (h("div", { key: 'a78f81632c85cb729d738b0bb533d260bc7e3727', class: "cta-links" }, this.parsedLinks.map((link, index) => (h("eds-link", { key: index, label: link.label, url: link.url, intent: linkIntent }))))))));
|
|
668
675
|
}
|
|
669
676
|
get el() { return getElement(this); }
|
|
670
677
|
};
|
|
@@ -685,7 +692,7 @@ const EdsCardDesc = class {
|
|
|
685
692
|
return this.truncate && this.truncateLines ? `line-clamp-${this.truncateLines}` : '';
|
|
686
693
|
}
|
|
687
694
|
render() {
|
|
688
|
-
return (h("p", { key: '
|
|
695
|
+
return (h("p", { key: 'd7d9f5d40d82700388753a165a998574bd69e674', class: `f-body-02 ${this.intent === 'secondary' ? 'text-inverse' : 'text-default'}` }, h("span", { key: 'bff2551896e726ce02a78b448a0e3f2a3df0c697', class: this.getTruncateClass() }, this.description)));
|
|
689
696
|
}
|
|
690
697
|
};
|
|
691
698
|
EdsCardDesc.style = EdsCardDescStyle0;
|
|
@@ -708,7 +715,7 @@ const EdsCardFeature = class {
|
|
|
708
715
|
'feature-card',
|
|
709
716
|
`feature-card-${this.variant}`
|
|
710
717
|
].join(' ');
|
|
711
|
-
return (h("div", { key: '
|
|
718
|
+
return (h("div", { key: 'f76c056bbca7b38892cdecf56291fe3882c9e3bb', class: cardClasses }, this.icon && (h("div", { key: '9e22a5f6c5e30b55c4bac84f5f11f773b1b37ab9', class: "feature-icon" }, h("eds-icon-wrapper", { key: '64154c38f3655cb55f14c2963a62ead699d8a533', name: this.icon, size: 24 }))), h("h3", { key: '99ed95a90796dbb6baa3f73cb2830fcd0954328c', class: "feature-title" }, this.title), h("p", { key: 'f91109a10f62a58d8b650987fbbf1a5a4f68beaa', class: "feature-description" }, this.description), this.url && (h("eds-link", { key: 'b94b57e5385da9db54a3767d0413349000add755', label: this.linkText, url: this.url, intent: "cta", icon: "arrow-right", "icon-pos": "right" }))));
|
|
712
719
|
}
|
|
713
720
|
get el() { return getElement(this); }
|
|
714
721
|
};
|
|
@@ -792,7 +799,7 @@ const EdsCardGeneric = class {
|
|
|
792
799
|
this.isHovered = false;
|
|
793
800
|
}
|
|
794
801
|
render() {
|
|
795
|
-
return (h("article", { key: '
|
|
802
|
+
return (h("article", { key: '6efb0c2c0c3d196b9759307bb98f4bf1e12504d5', class: this.articleClasses(), onClick: this.url ? () => this.handleClick() : undefined, onMouseEnter: this.url ? () => this.handleMouseEnter() : undefined, onMouseLeave: this.url ? () => this.handleMouseLeave() : undefined }, this.icon && (h("div", { key: '9c29cae822923b524668da65f3e341f9626d7e95', class: "card-icon-wrapper" }, h("eds-icon-wrapper", { key: '104a3551d3d8b910528dd43e8a12494faf4764a0', name: this.icon, size: 32 }))), h("div", { key: 'cc9d326aa6e55d1ed26b73f46d5fbb8087d55bf0', class: "p-12 flex flex-col grow" }, this.parsedTags && this.parsedTags.length > 0 && (h("div", { key: 'f740e184ec400d6083d04e4fa99259aa061c5dbf', class: "flex mb-12 gap-x-4" }, this.parsedTags.map((tag, index) => (h("eds-tag", { key: index, intent: tag.intent, label: tag.label, size: tag.size }))))), h("eds-card-title", { key: 'e263ce9bd116857648439bf9f356fc110e048547', title: this.title, url: this.url, intent: this.intent, size: this.titleSize }), this.description && (h("div", { key: 'aa6687dc61c548dd52e2d2f3eb9598f85c2af0a5', class: "mt-8" }, this.description && (h("eds-card-desc", { key: '8b82f70b5dc513396d08affc4958d9c1040583d6', "truncate-lines": "3", description: this.description, intent: this.intent })))), h("slot", { key: 'ff4d0ba6184b01b80e44c78a7cccec124f2b1706', name: "card" }), this.url && (h("div", { key: '889b5fbaf026df0e826626020ff201d06f047cc8', class: `flex items-center justify-between mt-auto pt-16 ${this.getLearnMoreColor()}` }, h("span", { key: '3a5b5d603a7f3d852b5e92ba57f7214f7b9754ec', class: "f-ui-01" }, "Learn more"), h("eds-icon-wrapper", { key: 'de15571bd4892f72646c205b14105f328d5a596d', name: this.isHovered ? 'arrow-right' : 'arrow-up-right', size: 32 }))))));
|
|
796
803
|
}
|
|
797
804
|
get el() { return getElement(this); }
|
|
798
805
|
};
|
|
@@ -837,7 +844,7 @@ const EdsCardHero = class {
|
|
|
837
844
|
`hero-card-${this.variant}`,
|
|
838
845
|
this.url ? 'hero-card-clickable' : ''
|
|
839
846
|
].filter(Boolean).join(' ');
|
|
840
|
-
return (h("div", { key: '
|
|
847
|
+
return (h("div", { key: 'c92f2acc8065b4142b28ca213abbb646e61f44fc', class: cardClasses, onClick: () => this.handleClick() }, h("div", { key: '38b8ec832d05a4891646ac31f24d32f62c5ac2e1', class: "card-category" }, this.category), h("div", { key: 'd356e4651ed9d136c72c519ecb9b484570c9b3be', class: "card-title" }, this.title), this.description && (h("div", { key: '52afdf7988667f73d8725e6a5f5b7816d4b38b30', class: "card-description" }, this.description)), this.parsedTags && this.parsedTags.length > 0 && (h("div", { key: 'a50fb41278d3b98da7054e0bee52d2a98ab5d8f3', class: "card-tags" }, this.parsedTags.map((tag, index) => (h("span", { key: index, class: "card-tag" }, tag.label)))))));
|
|
841
848
|
}
|
|
842
849
|
get el() { return getElement(this); }
|
|
843
850
|
};
|
|
@@ -875,7 +882,7 @@ const EdsCardStat = class {
|
|
|
875
882
|
`stat-card-${this.variant}`,
|
|
876
883
|
this.url ? 'stat-card-clickable' : ''
|
|
877
884
|
].filter(Boolean).join(' ');
|
|
878
|
-
const content = (h("div", { key: '
|
|
885
|
+
const content = (h("div", { key: 'f1dadeadd1d893b7a33aa92772baf7245954f6e7', class: cardClasses, onClick: () => this.handleClick() }, h("div", { key: '6adb8cc68740cd2dabf0bacf0af446e1499171a8', class: "stat-number" }, this.number), h("div", { key: 'adc7a8ffd44bceda51fcb98f68cfc8d7e454db5f', class: "stat-label" }, this.label), this.description && (h("div", { key: 'f70549244277e2c08c7bd94a1d297c00655faff5', class: "stat-description" }, this.description))));
|
|
879
886
|
return content;
|
|
880
887
|
}
|
|
881
888
|
get el() { return getElement(this); }
|
|
@@ -3398,7 +3405,7 @@ const EdsCodeBlock = class {
|
|
|
3398
3405
|
return this.code; // Fallback if language is not provided or unsupported
|
|
3399
3406
|
}
|
|
3400
3407
|
render() {
|
|
3401
|
-
return (h("div", { key: '
|
|
3408
|
+
return (h("div", { key: '4d73fa52c489b6995dd8a6d83c05e323bb1f5431', class: "relative bg-strongest rounded-sm" }, h("div", { key: 'c0df3237009310833b417f5ede5b7c204f2752bc', class: "text-inverse flex justify-between items-center p-8" }, this.language ? (h("span", { class: "f-ui-03" }, this.language.toUpperCase())) : (h("pre", { class: "bg-stronger pl-8", role: "region", "aria-label": "Code block without language" }, h("code", { innerHTML: this.getHighlightedCode() }))), h("span", { key: '016505a0749baaa52c6e4aa77f00b4da31e7ec45', "aria-hidden": "true", class: "w-20 h-20 mt-8" }, h("eds-icon-wrapper", { key: '21474f1b28af95251aca639c349aaac489d8519b', name: this.copied ? 'checkmark-filled' : 'copy', onClick: () => this.copyToClipboard() })), h("span", { key: '64450529ad3cf3dab7e74f8455307cdb3298bbc4', class: "sr-only" }, "Copy Code")), this.language && (h("pre", { key: 'affcb4719ef29d7ed9ed676eab975c98ceca31fa', class: `language-${this.language} bg-stronger pl-8 pb-8`, role: "region", "aria-label": `Code block in ${this.language}` }, h("code", { key: '43fa1b80c2e02233076c4da15a5aa04f0b49bfc3', innerHTML: this.getHighlightedCode() })))));
|
|
3402
3409
|
}
|
|
3403
3410
|
get el() { return getElement(this); }
|
|
3404
3411
|
};
|
|
@@ -3421,6 +3428,13 @@ const EdsDropdown = class {
|
|
|
3421
3428
|
if (this.isOpen) {
|
|
3422
3429
|
// refresh focusables each open in case slot changed
|
|
3423
3430
|
this.focusableItems = Array.from(((_a = this.panelEl) === null || _a === void 0 ? void 0 : _a.querySelectorAll('a, button, [role="menuitem"]')) || []);
|
|
3431
|
+
// The panel declares role="menu"; slotted links/buttons need
|
|
3432
|
+
// role="menuitem" or screen readers announce an empty menu.
|
|
3433
|
+
this.focusableItems.forEach((item) => {
|
|
3434
|
+
if (!item.hasAttribute('role')) {
|
|
3435
|
+
item.setAttribute('role', 'menuitem');
|
|
3436
|
+
}
|
|
3437
|
+
});
|
|
3424
3438
|
this.focusIndex = this.focusableItems.length ? 0 : -1;
|
|
3425
3439
|
this.focusItem();
|
|
3426
3440
|
}
|
|
@@ -3459,7 +3473,6 @@ const EdsDropdown = class {
|
|
|
3459
3473
|
const path = (e.composedPath && e.composedPath()) || [];
|
|
3460
3474
|
if (!path.includes(this.host)) {
|
|
3461
3475
|
this.closeDropdown();
|
|
3462
|
-
this.dropdown.emit({ expanded: false });
|
|
3463
3476
|
}
|
|
3464
3477
|
}
|
|
3465
3478
|
/**
|
|
@@ -3467,12 +3480,22 @@ const EdsDropdown = class {
|
|
|
3467
3480
|
* @param {KeyboardEvent} event - The keyboard event.
|
|
3468
3481
|
*/
|
|
3469
3482
|
handleKeyDown(event) {
|
|
3483
|
+
var _a;
|
|
3470
3484
|
if (this.isOpen) {
|
|
3471
3485
|
const key = event.key;
|
|
3472
3486
|
switch (key) {
|
|
3473
3487
|
case 'Tab':
|
|
3488
|
+
// ARIA menu pattern: Tab does not walk the items — it closes
|
|
3489
|
+
// the menu and lets focus continue to the next element on the
|
|
3490
|
+
// page (no preventDefault on purpose).
|
|
3474
3491
|
this.closeDropdown();
|
|
3475
|
-
|
|
3492
|
+
break;
|
|
3493
|
+
case 'Escape':
|
|
3494
|
+
// Close and hand focus back to the trigger so keyboard users
|
|
3495
|
+
// can back out without committing to a Tab.
|
|
3496
|
+
event.preventDefault();
|
|
3497
|
+
this.closeDropdown();
|
|
3498
|
+
(_a = this.buttonEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3476
3499
|
break;
|
|
3477
3500
|
case 'ArrowUp':
|
|
3478
3501
|
event.preventDefault();
|
|
@@ -3484,6 +3507,16 @@ const EdsDropdown = class {
|
|
|
3484
3507
|
this.focusIndex = (this.focusIndex + 1) % this.focusableItems.length;
|
|
3485
3508
|
this.focusItem();
|
|
3486
3509
|
break;
|
|
3510
|
+
case 'Home':
|
|
3511
|
+
event.preventDefault();
|
|
3512
|
+
this.focusIndex = this.focusableItems.length ? 0 : -1;
|
|
3513
|
+
this.focusItem();
|
|
3514
|
+
break;
|
|
3515
|
+
case 'End':
|
|
3516
|
+
event.preventDefault();
|
|
3517
|
+
this.focusIndex = this.focusableItems.length - 1;
|
|
3518
|
+
this.focusItem();
|
|
3519
|
+
break;
|
|
3487
3520
|
}
|
|
3488
3521
|
}
|
|
3489
3522
|
}
|
|
@@ -3551,51 +3584,123 @@ const EdsDropdown = class {
|
|
|
3551
3584
|
* @returns {JSX.Element} The rendered dropdown component.
|
|
3552
3585
|
*/
|
|
3553
3586
|
render() {
|
|
3554
|
-
return (h("div", { key: '
|
|
3587
|
+
return (h("div", { key: '1ce4926a15ac67d653ef03de877e64be83f61b4e', class: "z-focus relative", ref: (el) => (this.dropdownContent = el) }, h("eds-button", { key: '8b45fc57c018dd620701b2b9db5403c30f88a6ed', ref: (el) => (this.buttonEl = el), label: this.label, "aria-label": this.ariaLabel, icon: this.icon, iconSmall: false, intent: this.intent, onClick: this.handleClick, "aria-expanded": this.isOpen.toString(), "aria-haspopup": "menu", size: "small", pill: true }), h("nav", { key: '35854d55ea595e35513348bf36145794b2c57007', ref: (el) => (this.panelEl = el), role: "menu", class: {
|
|
3555
3588
|
'shadow-small bg-inverse border-softest z-10 z-on-top absolute top-full mt-4 flex flex-col gap-y-4 border-2 p-8': true,
|
|
3556
3589
|
'left-4': this.dropdownPos === 'left' && this.dropdownOffset,
|
|
3557
3590
|
'left-0': this.dropdownPos === 'left' && !this.dropdownOffset,
|
|
3558
3591
|
'right-4': this.dropdownPos === 'right' && this.dropdownOffset,
|
|
3559
3592
|
'right-0': this.dropdownPos === 'right' && !this.dropdownOffset
|
|
3560
|
-
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, h("slot", { key: '
|
|
3593
|
+
}, style: { display: this.isOpen ? 'block' : 'none' }, "aria-label": "Dropdown", "aria-hidden": !this.isOpen }, h("slot", { key: 'd6b153bb5968fa958be4d96d60cce774a9a0713c' }))));
|
|
3561
3594
|
}
|
|
3562
3595
|
get host() { return getElement(this); }
|
|
3563
3596
|
};
|
|
3564
3597
|
EdsDropdown.style = EdsDropdownStyle0;
|
|
3565
3598
|
|
|
3566
|
-
const edsFooterCss = "p{margin:0}
|
|
3599
|
+
const edsFooterCss = ":host{display:block}p{margin:0}ul{list-style:none;padding:0;margin:0}.eds-footer-root{position:relative;padding:4rem 4rem 2rem;border-top:1px solid rgba(0, 0, 0, 0.06);font-family:var(--f-ui-02-fontFamily)}.eds-footer-root.theme-inverse{background-color:var(--brand-black, #000000);color:var(--grey-light, rgba(255, 255, 255, 0.7));border-top-color:rgba(255, 255, 255, 0.06)}.eds-footer-root.theme-default{background-color:var(--white, #ffffff);color:var(--grey-dark, #4b5563);border-top-color:rgba(0, 0, 0, 0.06)}.footer-container{max-width:1400px;margin:0 auto}.footer-grid{display:grid;grid-template-columns:2fr repeat(3, 1fr);gap:4rem;margin-bottom:4rem}.footer-brand-row{display:flex;align-items:center;gap:1rem}.footer-flag-link{display:inline-block;width:54px;flex-shrink:0;border-radius:4px}.footer-flag-link:focus-visible{outline:3px solid var(--brand-green);outline-offset:2px}.footer-flag-svg{height:auto;width:100%;display:block}.footer-funded{font-size:0.875rem;line-height:1.6;max-width:300px}.theme-inverse .footer-funded{color:var(--grey-dark, rgba(255, 255, 255, 0.55))}.theme-default .footer-funded{color:var(--grey-dark, #4b5563)}.footer-copyright{font-size:0.875rem;margin-top:0.75rem}.theme-inverse .footer-copyright{color:var(--grey-dark, rgba(255, 255, 255, 0.55))}.theme-default .footer-copyright{color:var(--grey-dark, #4b5563)}.footer-column-heading{font-size:0.8125rem;font-weight:500;margin:0 0 1.5rem 0}.theme-inverse .footer-column-heading{color:var(--white, #ffffff)}.theme-default .footer-column-heading{color:var(--brand-black, #111827)}.footer-column-list li{margin-bottom:0.75rem}.footer-column-list li:last-child{margin-bottom:0}.footer-link,.footer-text-item{font-size:0.875rem;text-decoration:none;transition:color 0.3s ease}.footer-link{cursor:pointer}.theme-inverse .footer-link,.theme-inverse .footer-text-item{color:var(--grey-dark, rgba(255, 255, 255, 0.55))}.theme-default .footer-link,.theme-default .footer-text-item{color:var(--grey-dark, #4b5563)}.footer-link:hover{color:var(--brand-green)}.footer-link:focus-visible{outline:2px solid var(--brand-green);outline-offset:2px;border-radius:2px}.footer-social{padding-bottom:2rem;margin-bottom:2rem}.theme-inverse .footer-social{border-bottom:1px solid rgba(255, 255, 255, 0.06)}.theme-default .footer-social{border-bottom:1px solid rgba(0, 0, 0, 0.06)}.footer-back-to-top{position:absolute;top:1.5rem;right:2rem;opacity:0;transition:opacity 75ms cubic-bezier(0.4, 0, 0.2, 1)}@media (max-width: 1200px){.footer-grid{grid-template-columns:repeat(2, 1fr);gap:3rem}}@media (max-width: 768px){.eds-footer-root{padding:3rem 2rem 2rem}.footer-grid{grid-template-columns:1fr;gap:2rem;margin-bottom:2rem}.footer-funded{max-width:none}}";
|
|
3567
3600
|
const EdsFooterStyle0 = edsFooterCss;
|
|
3568
3601
|
|
|
3602
|
+
/**
|
|
3603
|
+
* EBRAINS-wide default link columns. Used when a consumer doesn't pass
|
|
3604
|
+
* the `columns` prop. URLs are absolute so the same footer renders
|
|
3605
|
+
* correctly from any app's domain (handbook.ebrains.eu, forms.ebrains.eu,
|
|
3606
|
+
* design.ebrains.eu, …) — the previous eds-docs design used relative
|
|
3607
|
+
* paths which only worked from design.ebrains.eu itself.
|
|
3608
|
+
*
|
|
3609
|
+
* If EBRAINS adds / renames a canonical resource, change it here once
|
|
3610
|
+
* and every consumer's footer updates on the next component release.
|
|
3611
|
+
*/
|
|
3612
|
+
const DEFAULT_COLUMNS = [
|
|
3613
|
+
{
|
|
3614
|
+
heading: 'Resources',
|
|
3615
|
+
links: [
|
|
3616
|
+
{ label: 'Documentation', href: 'https://design.ebrains.eu/get-started/', external: true },
|
|
3617
|
+
{ label: 'Components', href: 'https://design.ebrains.eu/ui-components/', external: true },
|
|
3618
|
+
{ label: 'Foundations', href: 'https://design.ebrains.eu/foundations/', external: true },
|
|
3619
|
+
{ label: 'Analytics', href: 'https://design.ebrains.eu/analytics/', external: true },
|
|
3620
|
+
],
|
|
3621
|
+
},
|
|
3622
|
+
{
|
|
3623
|
+
heading: 'Community',
|
|
3624
|
+
links: [
|
|
3625
|
+
{ label: 'GitLab', href: 'https://gitlab.ebrains.eu/ri/tech-hub/ebrains-ui-ecosystem/', external: true },
|
|
3626
|
+
{ label: 'Storybook', href: 'https://storybook.design.ebrains.eu', external: true },
|
|
3627
|
+
{ label: 'Report Issues', href: 'https://gitlab.ebrains.eu/ri/tech-hub/ebrains-ui-ecosystem/-/issues', external: true },
|
|
3628
|
+
{ label: 'Contribute', href: 'https://design.ebrains.eu/get-started/contributing/', external: true },
|
|
3629
|
+
],
|
|
3630
|
+
},
|
|
3631
|
+
{
|
|
3632
|
+
heading: 'Legal',
|
|
3633
|
+
links: [
|
|
3634
|
+
{ label: 'MIT License' },
|
|
3635
|
+
{ label: 'Cookie Preferences', action: 'cookies' },
|
|
3636
|
+
],
|
|
3637
|
+
},
|
|
3638
|
+
];
|
|
3569
3639
|
const EdsFooter = class {
|
|
3570
3640
|
constructor(hostRef) {
|
|
3571
3641
|
registerInstance(this, hostRef);
|
|
3572
3642
|
this.cookies = createEvent(this, "cookies", 7);
|
|
3573
|
-
/**
|
|
3574
|
-
* Scrolls the page smoothly back to the top.
|
|
3575
|
-
* Called when the "Back to top" button is clicked.
|
|
3576
|
-
* @private
|
|
3577
|
-
*/
|
|
3578
3643
|
this.backToTop = () => {
|
|
3579
3644
|
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
3580
3645
|
};
|
|
3646
|
+
this.emitCookies = () => {
|
|
3647
|
+
this.cookies.emit('toggle');
|
|
3648
|
+
};
|
|
3581
3649
|
this.social = false;
|
|
3582
|
-
this.variant = '
|
|
3650
|
+
this.variant = 'inverse';
|
|
3583
3651
|
this.enableScrollTop = false;
|
|
3584
3652
|
this.fundedBy = 'EBRAINS is funded by the Horizon Europe Framework Programme.';
|
|
3585
3653
|
this.rightsReserved = `${new Date().getFullYear()} EBRAINS. All rights reserved.`;
|
|
3586
|
-
this.cookiesPreferences = '
|
|
3654
|
+
this.cookiesPreferences = 'Cookie Preferences';
|
|
3587
3655
|
this.enableCookiesSettings = false;
|
|
3588
3656
|
this.backToTopAriaLabel = 'Back to Top';
|
|
3589
|
-
this.
|
|
3657
|
+
this.columns = undefined;
|
|
3658
|
+
this.resolvedColumns = DEFAULT_COLUMNS;
|
|
3659
|
+
}
|
|
3660
|
+
componentWillLoad() {
|
|
3661
|
+
this.resolvedColumns = this.parseColumns(this.columns);
|
|
3662
|
+
}
|
|
3663
|
+
onColumnsChange(value) {
|
|
3664
|
+
this.resolvedColumns = this.parseColumns(value);
|
|
3665
|
+
}
|
|
3666
|
+
/**
|
|
3667
|
+
* Resolve the `columns` prop to a usable array.
|
|
3668
|
+
* - undefined / null → defaults
|
|
3669
|
+
* - JSON-parseable str → parsed array
|
|
3670
|
+
* - already an array → used as-is
|
|
3671
|
+
* - anything else (malformed JSON, wrong shape) → defaults + console warning
|
|
3672
|
+
*
|
|
3673
|
+
* Defensive parsing so a typo in a Hugo template's attribute doesn't
|
|
3674
|
+
* render an empty footer in production. Failure logs a warning but
|
|
3675
|
+
* keeps the footer working with sensible defaults.
|
|
3676
|
+
*/
|
|
3677
|
+
parseColumns(value) {
|
|
3678
|
+
if (value === undefined || value === null || value === '')
|
|
3679
|
+
return DEFAULT_COLUMNS;
|
|
3680
|
+
if (Array.isArray(value))
|
|
3681
|
+
return value;
|
|
3682
|
+
if (typeof value === 'string') {
|
|
3683
|
+
try {
|
|
3684
|
+
const parsed = JSON.parse(value);
|
|
3685
|
+
if (Array.isArray(parsed))
|
|
3686
|
+
return parsed;
|
|
3687
|
+
console.warn('eds-footer: `columns` JSON parsed but is not an array; using defaults');
|
|
3688
|
+
return DEFAULT_COLUMNS;
|
|
3689
|
+
}
|
|
3690
|
+
catch (e) {
|
|
3691
|
+
console.warn('eds-footer: failed to parse `columns` JSON, using defaults', e);
|
|
3692
|
+
return DEFAULT_COLUMNS;
|
|
3693
|
+
}
|
|
3694
|
+
}
|
|
3695
|
+
return DEFAULT_COLUMNS;
|
|
3590
3696
|
}
|
|
3591
3697
|
componentDidLoad() {
|
|
3592
3698
|
var _a;
|
|
3593
3699
|
this.backBtn = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#toTop');
|
|
3594
3700
|
}
|
|
3595
3701
|
handleScroll() {
|
|
3596
|
-
if (!this.backBtn)
|
|
3702
|
+
if (!this.backBtn)
|
|
3597
3703
|
return;
|
|
3598
|
-
}
|
|
3599
3704
|
const shouldShow = window.scrollY > 100 && document.body.scrollHeight > window.innerHeight;
|
|
3600
3705
|
this.backBtn.style.opacity = shouldShow ? '1' : '0';
|
|
3601
3706
|
this.backBtn.style.pointerEvents = shouldShow ? 'auto' : 'none';
|
|
@@ -3605,26 +3710,40 @@ const EdsFooter = class {
|
|
|
3605
3710
|
btn.setAttribute('tabindex', shouldShow ? '0' : '-1');
|
|
3606
3711
|
}
|
|
3607
3712
|
}
|
|
3608
|
-
toggleCookiesConsent() {
|
|
3609
|
-
this.cookies.emit('toggle');
|
|
3610
|
-
}
|
|
3611
3713
|
/**
|
|
3612
|
-
*
|
|
3613
|
-
*
|
|
3614
|
-
*
|
|
3714
|
+
* Render one link inside a column.
|
|
3715
|
+
* - `action: 'cookies'` → button-like anchor that fires the cookies event
|
|
3716
|
+
* - `href` present → real anchor (target=_blank when `external`)
|
|
3717
|
+
* - neither → plain text span (e.g. "MIT License")
|
|
3615
3718
|
*/
|
|
3719
|
+
renderLink(link, index) {
|
|
3720
|
+
if (link.action === 'cookies') {
|
|
3721
|
+
if (!this.enableCookiesSettings)
|
|
3722
|
+
return null;
|
|
3723
|
+
return (h("li", { key: `cookies-${index}` }, h("a", { href: "javascript:void(0)", class: "footer-link", onClick: this.emitCookies, role: "button" }, this.cookiesPreferences || link.label)));
|
|
3724
|
+
}
|
|
3725
|
+
if (link.href) {
|
|
3726
|
+
const external = link.external === true;
|
|
3727
|
+
return (h("li", { key: `${link.label}-${index}` }, h("a", Object.assign({ class: "footer-link", href: link.href }, (external ? { target: '_blank', rel: 'noopener noreferrer' } : {})), link.label)));
|
|
3728
|
+
}
|
|
3729
|
+
return (h("li", { key: `text-${index}` }, h("span", { class: "footer-text-item" }, link.label)));
|
|
3730
|
+
}
|
|
3616
3731
|
render() {
|
|
3617
3732
|
const year = new Date().getFullYear();
|
|
3618
3733
|
const rights = this.rightsReserved || `${year} EBRAINS. All rights reserved.`;
|
|
3619
3734
|
const isInverse = this.variant === 'inverse';
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3735
|
+
// Class hooks driven by variant — the CSS file styles each
|
|
3736
|
+
// selector independently rather than relying on prop-based
|
|
3737
|
+
// inline styles, so theme tokens stay overridable from outside
|
|
3738
|
+
// via the host's CSS custom properties.
|
|
3739
|
+
const rootClasses = ['eds-footer-root', isInverse ? 'theme-inverse' : 'theme-default']
|
|
3740
|
+
.join(' ');
|
|
3741
|
+
return (h("footer", { key: 'b09063376e3bd78845302473a96884bd473cea09', class: rootClasses }, this.social ? (h("div", { class: "footer-social" }, h("div", { class: "footer-container" }, h("eds-social-networks", { variant: this.variant })))) : null, h("div", { key: '3aeb8f496bb4c3c73da907ba9b9fbb72841be213', class: "footer-container" }, h("div", { key: 'e7e33ce7dee8079a9aff17d45963dfaff9576121', class: "footer-grid" }, h("div", { key: 'e6fc738e086774e114c5ceef1b82fea2e2840990', class: "footer-brand" }, h("div", { key: '96f7030269174c122ffe0117897a79b00020dd29', class: "footer-brand-row" }, h("a", { key: '5967c33efff435ceee2a45c21cae67749b91b9ba', target: "_blank", rel: "noopener noreferrer", class: "footer-flag-link", href: "https://research-and-innovation.ec.europa.eu/funding/funding-opportunities/funding-programmes-and-open-calls/horizon-europe_en", "aria-label": "Learn about Horizon Europe funding" }, h("svg", { key: '3de7debe64d431152e47a4daefb7c9facf7bf951', class: "footer-flag-svg", width: "63", height: "50", viewBox: "0 0 640 480", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '50e3f0c5ae41e3e7cc5689ddf01a8944a6c5d2eb', d: "M0 0h640v480H0V0z", fill: "#039" }), h("path", { key: '2c0f61e6de734d7214accd10cefd3a39e31f36a1', d: "M325.032 93.15l17.513-.398-14.401 9.972 5.789 16.53L320 108.639l-13.933 10.615 5.789-16.531-14.399-9.97 17.51.396L320 76.374l5.032 16.775zm0 284.444l17.513-.398-14.401 9.972 5.789 16.53L320 393.083l-13.933 10.615 5.789-16.531-14.399-9.97 17.51.397L320 360.818l5.032 16.776zm-147.25-158.983l5.029 16.761 17.511-.397-14.4 9.969 5.79 16.533-13.933-10.616-13.932 10.616 5.788-16.531-14.401-9.971 17.511.397 5.028-16.761.004-.015.001.003.001-.003.003.015zm77.885-105.334l17.511-.397-14.401 9.971 5.79 16.531-13.932-10.614-13.933 10.615 5.788-16.531-14.4-9.971h.005l-.003-.001 17.51.397 5.033-16.775 5.032 16.775zm-52.729 52.729l17.511-.398h.002l-14.402 9.971 5.79 16.531-13.933-10.615-13.932 10.615 5.789-16.532-14.4-9.97 17.51.397 5.033-16.776 5.032 16.777zm-5.001 125.803l5.027 16.759 17.513-.397-14.401 9.971 5.79 16.531-.005-.005.003.006-13.932-10.615-13.933 10.615 5.788-16.532-14.398-9.97 17.51.396 5.029-16.759.004-.016v.003l.002-.003.003.016zm51.445 47.71l5.027 16.76 17.513-.397-14.401 9.97 5.791 16.532-.004-.004.002.004-13.933-10.615-13.933 10.615 5.788-16.532-14.398-9.97 17.51.397 5.029-16.76.004-.016v.003l.002-.003.003.016zm217.873-104.147l17.511-.397-14.401 9.969 5.79 16.533-13.934-10.616-13.931 10.616 5.789-16.533-14.399-9.969 17.509.397 5.034-16.776 5.032 16.776zm-63.958-95.997l-5.786-16.522 14.401-9.972-17.511.398-5.033-16.778-5.034 16.777-17.51-.398 14.4 9.972-5.789 16.53 13.932-10.614 13.934 10.614-.004-.007zm38.797 42.122l13.934 10.614-.004-.007-5.787-16.524 14.401-9.971-17.51.399-5.033-16.778-5.033 16.777-17.51-.398h-.001l14.399 9.972-5.787 16.529 13.931-10.613zm5.007 127.071l17.51-.397-14.4 9.971 5.79 16.531-13.933-10.614-13.932 10.615 5.788-16.531-14.401-9.971h.005l-.003-.001 17.51.397 5.033-16.775 5.033 16.775zm-51.446 47.711l17.511-.397-14.4 9.97 5.79 16.532-13.933-10.615-13.933 10.615 5.789-16.531-14.401-9.971h.002l17.51.397 5.033-16.776 5.032 16.776z", fill: "#FC0" }))), h("p", { key: '9ff8e10db0e213754bfc73bcce1b3dd36bc62e30', class: "footer-funded" }, this.fundedBy)), h("p", { key: 'a24c4fbfe48c4c3c8d076f24da9c84b739a982d8', class: "footer-copyright" }, "\u00A9 ", rights)), this.resolvedColumns.map((col, ci) => (h("div", { class: "footer-column", key: `col-${ci}` }, h("h4", { class: "footer-column-heading" }, col.heading), h("ul", { class: "footer-column-list" }, (col.links || []).map((link, li) => this.renderLink(link, li)))))))), this.enableScrollTop ? (h("div", { id: "toTop", class: "footer-back-to-top" }, h("eds-button", { id: "backToTop", "aria-label": this.backToTopAriaLabel, intent: isInverse ? 'ghostInverse' : 'ghost', size: "large", icon: "chevron-up", onClick: this.backToTop, tabindex: "-1" }))) : null));
|
|
3626
3742
|
}
|
|
3627
3743
|
get el() { return getElement(this); }
|
|
3744
|
+
static get watchers() { return {
|
|
3745
|
+
"columns": ["onColumnsChange"]
|
|
3746
|
+
}; }
|
|
3628
3747
|
};
|
|
3629
3748
|
EdsFooter.style = EdsFooterStyle0;
|
|
3630
3749
|
|
|
@@ -3757,7 +3876,8 @@ isFieldVisible) {
|
|
|
3757
3876
|
delete errors[field.name];
|
|
3758
3877
|
return;
|
|
3759
3878
|
}
|
|
3760
|
-
|
|
3879
|
+
// 'content' is a presentational text block — no input, never validated.
|
|
3880
|
+
if (field.type !== 'hidden' && field.type !== 'content') {
|
|
3761
3881
|
if ((field.type === 'checkbox' || field.type === 'radio') && !field.options) {
|
|
3762
3882
|
// Single checkbox or radio without multiple options
|
|
3763
3883
|
const fieldErrors = validateSingleBox(field.name, field.required, formEl);
|
|
@@ -3824,6 +3944,46 @@ isFieldVisible) {
|
|
|
3824
3944
|
return { errors, hasError };
|
|
3825
3945
|
}
|
|
3826
3946
|
|
|
3947
|
+
/**
|
|
3948
|
+
* safeInlineFormat — the single, audited text→HTML formatter used everywhere a
|
|
3949
|
+
* form renders author-supplied text via innerHTML (form/step description, Text
|
|
3950
|
+
* Blocks, and field messages).
|
|
3951
|
+
*
|
|
3952
|
+
* SECURITY: escape-first, then a tiny whitelisted inline subset. Because all of
|
|
3953
|
+
* &, <, >, " are turned into entities BEFORE any markup is generated, author
|
|
3954
|
+
* text can never inject a tag or attribute — the only HTML produced is the
|
|
3955
|
+
* <strong>, <a> and <br> emitted here. Links are restricted to http/https/mailto
|
|
3956
|
+
* (others fall back to plain text), URLs cannot contain whitespace or a quote,
|
|
3957
|
+
* and external links get rel="noopener noreferrer".
|
|
3958
|
+
*
|
|
3959
|
+
* DO NOT reorder: escaping MUST happen before tag generation, or the guarantee
|
|
3960
|
+
* breaks. Keep this in sync with the JS mirror in
|
|
3961
|
+
* apps/live/forms-app/src/utils/descriptionFormat.ts.
|
|
3962
|
+
*
|
|
3963
|
+
* **bold** → <strong>bold</strong>
|
|
3964
|
+
* [label](url) → <a href="url" …>label</a> (http/https/mailto only)
|
|
3965
|
+
* newline → <br>
|
|
3966
|
+
*/
|
|
3967
|
+
function safeInlineFormat(text) {
|
|
3968
|
+
if (!text) {
|
|
3969
|
+
return '';
|
|
3970
|
+
}
|
|
3971
|
+
let s = String(text)
|
|
3972
|
+
.replace(/&/g, '&')
|
|
3973
|
+
.replace(/</g, '<')
|
|
3974
|
+
.replace(/>/g, '>')
|
|
3975
|
+
.replace(/"/g, '"');
|
|
3976
|
+
// bold
|
|
3977
|
+
s = s.replace(/\*\*([^*]+)\*\*/g, '<strong>$1</strong>');
|
|
3978
|
+
// links — safe schemes only; otherwise drop to the plain label
|
|
3979
|
+
s = s.replace(/\[([^\]]+)\]\(([^)\s]+)\)/g, (_m, label, url) => /^(https?:|mailto:)/i.test(url)
|
|
3980
|
+
? `<a href="${url}" target="_blank" rel="noopener noreferrer" class="eds-desc-link">${label}</a>`
|
|
3981
|
+
: label);
|
|
3982
|
+
// newlines → line breaks
|
|
3983
|
+
s = s.replace(/\n/g, '<br>');
|
|
3984
|
+
return s;
|
|
3985
|
+
}
|
|
3986
|
+
|
|
3827
3987
|
/**
|
|
3828
3988
|
* Validates a field based on its type and returns an array of error messages.
|
|
3829
3989
|
* @param field - The field configuration object.
|
|
@@ -3858,7 +4018,7 @@ function getFormInitData({ initData, parsedFields, currentValues
|
|
|
3858
4018
|
return { updatedValues };
|
|
3859
4019
|
}
|
|
3860
4020
|
|
|
3861
|
-
const edsFormCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-body-01 b,.f-body-01 strong{font-weight:var(--f-body-01---bold-weight, bold)}.f-body-02 b,.f-body-02 strong{font-weight:var(--f-body-02---bold-weight, bold)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:600;font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:600;font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing);overflow:visible}.text-light{color:var(--grey-dark)}.rounded-xs{border-radius:4px}.rounded-sm{border-radius:8px}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-2{border-width:2px}.border-t-2{border-top-width:2px}.mt-20{margin-top:1.25rem}.mt-32{margin-top:2rem}.mt-64{margin-top:4rem}.mb-32{margin-bottom:2rem}.pt-28{padding-top:1.75rem}.pt-32{padding-top:2rem}.pt-64{padding-top:4rem}.pl-8{padding-left:0.5rem}.pl-16{padding-left:1rem}.border-l-2{border-left-width:2px}.gap-y-8{row-gap:0.5rem}.gap-y-16{row-gap:1rem}.gap-y-20{row-gap:1.25rem}.gap-y-24{row-gap:1.5rem}.border-group{border-left:1px solid var(--soft-color, #ddd);padding-left:1rem}.bg-inverse{background-color:var(--white)}.form-brand{box-shadow:0 2px 12px rgba(0, 0, 0, 0.08);border-left:4px solid var(--brand-green);animation:fadeInUp 0.6s ease}@keyframes fadeInUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.shadow-hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--brand-green)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.rounded-sm{border-radius:8px}.rounded-lg{border-radius:16px}.px-16{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:0.25rem}.pb-16{padding-bottom:1rem}.p-32{padding:2rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.w-full{width:100%}.justify-between{justify-content:space-between}.items-center{align-items:center}@media (min-width: 750px){.md\\:flex-row-reverse{flex-direction:row-reverse}.md\\:justify-between{justify-content:space-between}.md\\:gap-y-0{row-gap:0}.md\\:w-auto{width:auto}.md\\:mt-64{margin-top:4rem}.md\\:pt-64{padding-top:4rem}}";
|
|
4021
|
+
const edsFormCss = ".container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.flex{display:flex}.flex-col{flex-direction:column}.f-body-01{font-family:var(--f-body-01-fontFamily);font-weight:var(--f-body-01-fontWeight);font-size:var(--f-body-01-fontSize);line-height:var(--f-body-01-lineHeight);letter-spacing:var(--f-body-01-letterSpacing)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-body-01 b,.f-body-01 strong{font-weight:var(--f-body-01---bold-weight, bold)}.f-body-02 b,.f-body-02 strong{font-weight:var(--f-body-02---bold-weight, bold)}.f-heading-04{font-family:var(--f-heading-04-fontFamily);font-weight:600;font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.f-heading-05{font-family:var(--f-heading-05-fontFamily);font-weight:600;font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing);overflow:visible}.text-light{color:var(--grey-dark)}.rounded-xs{border-radius:4px}.rounded-sm{border-radius:8px}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-2{border-width:2px}.border-t-2{border-top-width:2px}.mt-20{margin-top:1.25rem}.mt-32{margin-top:2rem}.mt-64{margin-top:4rem}.mb-32{margin-bottom:2rem}.pt-28{padding-top:1.75rem}.pt-32{padding-top:2rem}.pt-64{padding-top:4rem}.pl-8{padding-left:0.5rem}.pl-16{padding-left:1rem}.border-l-2{border-left-width:2px}.gap-y-8{row-gap:0.5rem}.gap-y-16{row-gap:1rem}.gap-y-20{row-gap:1.25rem}.gap-y-24{row-gap:1.5rem}.border-group{border-left:1px solid var(--soft-color, #ddd);padding-left:1rem}.bg-inverse{background-color:var(--white)}.form-brand{box-shadow:0 2px 12px rgba(0, 0, 0, 0.08);border-left:4px solid var(--brand-green);animation:fadeInUp 0.6s ease}@keyframes fadeInUp{from{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}.effect-shadow{transition-property:box-shadow;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.shadow-hover{--tw-shadow:0px 0px 16px rgba(0, 0, 0, 0.2);--tw-shadow-colored:0px 0px 16px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.cursor-pointer{cursor:pointer}.effect-focus-within{outline-width:3px;outline-offset:2px;outline-color:var(--brand-green)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.rounded-sm{border-radius:8px}.rounded-lg{border-radius:16px}.px-16{padding-left:1rem;padding-right:1rem}.pb-4{padding-bottom:0.25rem}.pb-16{padding-bottom:1rem}.p-32{padding:2rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.w-full{width:100%}.justify-between{justify-content:space-between}.items-center{align-items:center}@media (min-width: 750px){.md\\:flex-row-reverse{flex-direction:row-reverse}.md\\:justify-between{justify-content:space-between}.md\\:gap-y-0{row-gap:0}.md\\:w-auto{width:auto}.md\\:mt-64{margin-top:4rem}.md\\:pt-64{padding-top:4rem}}.eds-desc-link{position:relative;display:inline-block;color:var(--brand-black);text-decoration:none}.eds-desc-link::after{content:'';position:absolute;bottom:-2px;left:0;width:0;height:2px;background-color:var(--brand-green);transition:width 0.3s ease}.eds-desc-link:hover::after{width:100%}.eds-desc-link:focus-visible::after{width:0}.eds-content-block{line-height:1.5;color:var(--brand-black, #07140d)}.eds-content-block strong{font-weight:600}.eds-content-block .eds-desc-link{font-weight:600}";
|
|
3862
4022
|
const EdsFormStyle0 = edsFormCss;
|
|
3863
4023
|
|
|
3864
4024
|
const EdsForm = class {
|
|
@@ -4046,7 +4206,20 @@ const EdsForm = class {
|
|
|
4046
4206
|
if (this.setFormUrl && typeof window !== 'undefined') {
|
|
4047
4207
|
formData.set('form_url', window.location.href);
|
|
4048
4208
|
}
|
|
4209
|
+
// Group fields by name so we can drop values for fields hidden by a condition.
|
|
4210
|
+
// A name may be reused across mutually-exclusive conditional variants (e.g. a
|
|
4211
|
+
// `web_app_url` shown for service_type=web_app AND another for =platform), so a
|
|
4212
|
+
// value is dropped ONLY when EVERY field with that name is hidden — if any
|
|
4213
|
+
// variant is visible, its value is kept.
|
|
4214
|
+
const fieldsByName = {};
|
|
4215
|
+
this.parsedFields.forEach((f) => {
|
|
4216
|
+
(fieldsByName[f.name] = fieldsByName[f.name] || []).push(f);
|
|
4217
|
+
});
|
|
4049
4218
|
Object.keys(this.values).forEach((key) => {
|
|
4219
|
+
const fields = fieldsByName[key];
|
|
4220
|
+
if (fields && fields.length && !fields.some((f) => this.isFieldVisible(f))) {
|
|
4221
|
+
return; // all fields with this name are conditionally hidden — skip
|
|
4222
|
+
}
|
|
4050
4223
|
const value = this.values[key];
|
|
4051
4224
|
// Handle File arrays (from file inputs)
|
|
4052
4225
|
if (Array.isArray(value)) {
|
|
@@ -4341,29 +4514,53 @@ const EdsForm = class {
|
|
|
4341
4514
|
return map;
|
|
4342
4515
|
}
|
|
4343
4516
|
renderField(field) {
|
|
4344
|
-
var _a, _b, _c, _d;
|
|
4517
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
4345
4518
|
if (!this.isFieldVisible(field)) {
|
|
4346
4519
|
return null;
|
|
4347
4520
|
}
|
|
4521
|
+
// 0) Presentational "Text Block" — static formatted text, NOT an input.
|
|
4522
|
+
// It has no value, is never added to the submission (makeFormData only
|
|
4523
|
+
// iterates this.values) and is never validated (see formValidators). The
|
|
4524
|
+
// text runs through formatDescription, which escapes HTML first, so author
|
|
4525
|
+
// content can never inject markup — only the **bold**/[link]/newline subset.
|
|
4526
|
+
if (field.type === 'content') {
|
|
4527
|
+
const raw = ((_b = (_a = field.content) !== null && _a !== void 0 ? _a : field.label) !== null && _b !== void 0 ? _b : '');
|
|
4528
|
+
return (h("div", { class: "eds-content-block f-body-02 text-default", key: field.name, innerHTML: this.formatDescription(raw) }));
|
|
4529
|
+
}
|
|
4348
4530
|
// 1) Handle rating
|
|
4349
4531
|
if (field.type === 'rating') {
|
|
4350
4532
|
// pull the current value (or zero)
|
|
4351
4533
|
const val = this.values[field.name] || 0;
|
|
4352
|
-
return (h("div", { class: "form-group rating-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `rating-${field.name}`, label: field.label, disabled: field.disabled, required: field.required }))), h("eds-rating", { id: `rating-${field.name}`, "rating-type": field.ratingType, "rating-count": field.ratingCount, "selected-rating": val, onRating: (e) => this.handleRating(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, message: field.message, "error-message": (
|
|
4534
|
+
return (h("div", { class: "form-group rating-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `rating-${field.name}`, label: field.label, disabled: field.disabled, required: field.required }))), h("eds-rating", { id: `rating-${field.name}`, "rating-type": field.ratingType, "rating-count": field.ratingCount, "selected-rating": val, onRating: (e) => this.handleRating(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, message: field.message, "error-message": (_c = this.errors[field.name]) === null || _c === void 0 ? void 0 : _c.join('<br/>'), error: !!this.errors[field.name], link: field.link }))));
|
|
4353
4535
|
}
|
|
4354
4536
|
else if (field.type === 'nps') {
|
|
4355
4537
|
// pull the current value (or null)
|
|
4356
4538
|
const val = this.values[field.name] !== undefined ? this.values[field.name] : null;
|
|
4357
|
-
return (h("div", { class: "form-group nps-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `nps-${field.name}`, label: field.question, disabled: field.disabled, required: field.required }))), h("eds-nps", { id: `nps-${field.name}`, "right-label": field.rightLabel, "left-label": field.leftLabel, "selected-value": val, onNps: (e) => this.handleNPS(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, "error-message": (
|
|
4539
|
+
return (h("div", { class: "form-group nps-field", key: field.name }, h("div", { class: "flex justify-between" }, field && (h("eds-input-label", { name: `nps-${field.name}`, label: field.question, disabled: field.disabled, required: field.required }))), h("eds-nps", { id: `nps-${field.name}`, "right-label": field.rightLabel, "left-label": field.leftLabel, "selected-value": val, onNps: (e) => this.handleNPS(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, "error-message": (_d = this.errors[field.name]) === null || _d === void 0 ? void 0 : _d.join('<br/>'), error: !!this.errors[field.name] }))));
|
|
4540
|
+
}
|
|
4541
|
+
else if (field.type === 'search-select') {
|
|
4542
|
+
return (h("eds-search-select", { key: field.name, name: field.name, label: field.label, source: field.source, options: field.options, multiple: !!field.multiple, "api-base": field.apiBase || '/api/v1', placeholder: field.placeholder, required: field.required, disabled: field.disabled, hint: field.hint, message: field.message, error: !!this.errors[field.name], "error-message": (_e = this.errors[field.name]) === null || _e === void 0 ? void 0 : _e.join('<br/>'), value: this.values[field.name], onEdsinput: (e) => this.handleInput(e, field), onEdschange: (e) => this.handleChange(e, field) }));
|
|
4358
4543
|
}
|
|
4359
4544
|
else if (field.type === 'kg-web-service') {
|
|
4360
|
-
return (h("eds-kg-web-services-select", { key: field.name, name: field.name, label: field.label, "api-endpoint": field.apiEndpoint || '/api/v1/kg/web-services/cached', placeholder: field.placeholder, required: field.required, disabled: field.disabled, hint: field.hint, message: field.message, error: !!this.errors[field.name], "error-message": (
|
|
4545
|
+
return (h("eds-kg-web-services-select", { key: field.name, name: field.name, label: field.label, "api-endpoint": field.apiEndpoint || '/api/v1/kg/web-services/cached', placeholder: field.placeholder, required: field.required, disabled: field.disabled, hint: field.hint, message: field.message, error: !!this.errors[field.name], "error-message": (_f = this.errors[field.name]) === null || _f === void 0 ? void 0 : _f.join('<br/>'), value: this.values[field.name], size: field.size || 500, onEdsinput: (e) => this.handleInput(e, field), onEdschange: (e) => this.handleChange(e, field) }));
|
|
4361
4546
|
}
|
|
4362
|
-
return (h("eds-input-field", { key: field.name, name: field.name, label: field.label, placeholder: field.placeholder, type: field.type, value: this.values[field.name], required: field.required, hint: field.hint, message: field.message, link: field.link, error: !!this.errors[field.name], errorMessage: (
|
|
4547
|
+
return (h("eds-input-field", { key: field.name, name: field.name, label: field.label, placeholder: field.placeholder, type: field.type, value: this.values[field.name], required: field.required, hint: field.hint, message: field.message, link: field.link, error: !!this.errors[field.name], errorMessage: (_g = this.errors[field.name]) === null || _g === void 0 ? void 0 : _g.join('<br/>'), options: field.options, onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field) }));
|
|
4363
4548
|
}
|
|
4364
4549
|
async getData() {
|
|
4365
4550
|
return this.makeFormData();
|
|
4366
4551
|
}
|
|
4552
|
+
/**
|
|
4553
|
+
* Render the form/step description with a small, safe subset of inline
|
|
4554
|
+
* formatting so authors can add links and emphasis:
|
|
4555
|
+
* **bold** → <strong>
|
|
4556
|
+
* [label](url) → <a> (only http/https/mailto; others render as text)
|
|
4557
|
+
* blank line / \n → paragraph / line break
|
|
4558
|
+
* HTML is escaped FIRST, so author text can never inject markup — only the
|
|
4559
|
+
* whitelisted patterns above produce tags.
|
|
4560
|
+
*/
|
|
4561
|
+
formatDescription(text) {
|
|
4562
|
+
return safeInlineFormat(text);
|
|
4563
|
+
}
|
|
4367
4564
|
render() {
|
|
4368
4565
|
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
4369
4566
|
//const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
@@ -4379,9 +4576,9 @@ const EdsForm = class {
|
|
|
4379
4576
|
else if (this.formStyle === 'brand') {
|
|
4380
4577
|
styleClasses = 'bg-inverse form-brand relative rounded-xs p-32';
|
|
4381
4578
|
}
|
|
4382
|
-
return (h("form", { key: '
|
|
4579
|
+
return (h("form", { key: '5717a276eb4bcb1b40bb6c3a3d68e2372ccf0b37', class: styleClasses, ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, h("div", { key: '8e9fec59b6cafccabbb67381a12541f12201cc48', class: "flex flex-col gap-y-20 overflow-visible" }, this.title && (h("span", { key: 'f47c68db954de63773257f9c898141be27278a00', role: "heading", class: "f-heading-05 pb-4 block" }, this.title)), this.description && h("span", { key: '4287bb5f9c31cf5d3953a032de4a8c269e1feb7e', class: "f-body-02 text-light", innerHTML: this.formatDescription(this.description) }), h("slot", { key: 'e9e52696eab6477354ac5ee6cbe08399483b1b37' })), hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), this.parsedGroups
|
|
4383
4580
|
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
4384
|
-
.map((g) => (h("div", { class: "mt-32", key: g.id }, h("span", { class: "f-body-02" }, h("b", null, g.title)), h("div", { class: "border-group mt-32 mb-32 flex flex-col gap-y-24" }, buckets[g.id].map((f) => this.renderField(f)))))), h("div", { key: '
|
|
4581
|
+
.map((g) => (h("div", { class: "mt-32", key: g.id }, h("span", { class: "f-body-02" }, h("b", null, g.title)), h("div", { class: "border-group mt-32 mb-32 flex flex-col gap-y-24" }, buckets[g.id].map((f) => this.renderField(f)))))), h("div", { key: '22d248217ea85d68e2be652ddcbfd13ed4775934', class: "flex flex-col mt-32 gap-y-24" }, buckets['__ungrouped'].map((f) => this.renderField(f))), (this.formBtn || this.clearBtn) && (h("div", { key: '101f9e275d68f59b762938ff3f7d7102660b80f0', class: "mt-32 md:mt-64 flex flex-col items-center md:flex-row-reverse md:justify-between gap-y-16 md:gap-y-0" }, this.formBtn && (h("eds-button", { key: '02d427d951c715634605b6977f61cee67abaa8b0', intent: this.buttonIntent, pill: true, label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, icon: 'arrow-right', size: "large", onClick: () => this.handleSubmit() })), this.clearBtn && (h("eds-button", { key: 'abf330715df3acf2a4bdc8d4f322fc13c70c267f', intent: "neutral", pill: true, size: "large", label: this.clearBtnLabel, disabled: this.isSubmitting || !this.values || Object.keys(this.values).length === 0, onClick: (e) => this.handleClear(e) }))))));
|
|
4385
4582
|
}
|
|
4386
4583
|
get el() { return getElement(this); }
|
|
4387
4584
|
static get watchers() { return {
|
|
@@ -4474,7 +4671,7 @@ const EdsFullscreenMenu = class {
|
|
|
4474
4671
|
};
|
|
4475
4672
|
EdsFullscreenMenu.style = EdsFullscreenMenuStyle0;
|
|
4476
4673
|
|
|
4477
|
-
const edsGlobalSearchCss = ":host{display:block;width:100%}p{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}.search-wrapper{position:relative;width:100%}.search-dropdown{position:absolute;top:calc(100% + 8px);left:0;right:0;background:white;border:1px solid #e0e0e0;border-radius:12px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12),\n 0 2px 8px rgba(0, 0, 0, 0.08),\n 0 0 0 1px rgba(0, 255, 157, 0.08);max-height:500px;overflow:hidden;z-index:9999;display:flex;flex-direction:column;animation:dropdownFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1)}.dropdown-state{display:flex;align-items:center;justify-content:center;gap:8px;padding:24px;color:#616161;font-size:14px}.dropdown-results{list-style:none;margin:0;overflow-y:auto;overflow-x:hidden;max-height:440px}.result-item{padding:7px 7px;cursor:pointer;border-left:4px solid transparent;margin-bottom:2px;transition:all 0.25s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden;word-wrap:break-word;word-break:break-word}.result-item:hover,.result-item--selected{background:linear-gradient(\n 90deg,\n rgba(0, 255, 157, 0.08) 0%,\n rgba(0, 255, 157, 0.03) 100%\n );border-left-color:var(--green-600);box-shadow:0 2px 8px rgba(0, 255, 157, 0.15)}.result-item:hover .result-title,.result-item--selected .result-title{color:var(--green-700)}.result-title{color:var(--black);transition:color 0.2s ease}.result-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.result-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}.result-badge{display:inline-block;padding:3px 8px;background:rgba(0, 255, 157, 0.12);color:var(--green-800);border-radius:4px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;transition:all 0.2s ease}.result-item:hover .result-badge,.result-item--selected .result-badge{background:rgba(0, 255, 157, 0.2);color:var(--green-900)}.result-url{font-size:12px;color:var(--grey-600)}.external-icon{display:inline-block;width:14px;height:14px;margin-left:4px;color:var(--green-600)}.result-snippet{font-size:13px;color:#616161;line-height:1.5;margin:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;transition:color 0.2s ease}.result-item:hover .result-snippet,.result-item--selected .result-snippet{color:#424242}.dropdown-footer{border-top:1px solid rgba(0, 255, 157, 0.15);padding:10px 16px;background:linear-gradient(\n 180deg,\n rgba(0, 255, 157, 0.02) 0%,\n rgba(0, 255, 157, 0.05) 100%\n );flex-shrink:0}.footer-hint{font-size:11px;color:#616161;display:flex;align-items:center;gap:6px;flex-wrap:wrap}kbd{display:inline-block;padding:3px 7px;font-size:11px;font-family:monospace;line-height:1.2;font-weight:500;color:var(--green-700);background:rgba(0, 255, 157, 0.1);border:1px solid rgba(0, 200, 123, 0.3);border-radius:4px;box-shadow:0 2px 0 rgba(0, 255, 157, 0.15),\n inset 0 1px 0 rgba(255, 255, 255, 0.5)}.dropdown-results::-webkit-scrollbar{width:8px}.dropdown-results::-webkit-scrollbar-track{background:rgba(0, 255, 157, 0.05);border-radius:4px}.dropdown-results::-webkit-scrollbar-thumb{background:#33FFB8;border-radius:4px}.dropdown-results::-webkit-scrollbar-thumb:hover{background:#00FF9D}.flex{display:flex}.inline-flex{display:inline-flex}.text-center{text-align:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-error{color:var(--red-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-4{margin-left:0.25rem}.ml-8{margin-left:0.5rem}.ml-16{margin-left:1rem}.p-16{padding:1rem}.p-64{padding:4rem}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.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)}";
|
|
4674
|
+
const edsGlobalSearchCss = ":host{display:block;width:100%}p{margin:0}ol,ul,menu{list-style:none;margin:0;padding:0}.search-wrapper{position:relative;width:100%}.search-pill{display:flex;align-items:center;gap:12px;height:48px;padding:0 18px;border-radius:999px;font-family:var(--plex-sans, 'IBM Plex Sans', system-ui, sans-serif);font-size:15px;cursor:text;transition:background 120ms ease, box-shadow 120ms ease, color 120ms ease}.search-pill .search-icon{flex-shrink:0}.search-pill .search-input{flex:1;min-width:0;border:0;background:transparent;outline:none;font:inherit;color:inherit;-webkit-appearance:none;appearance:none}.search-pill .search-input::-webkit-search-cancel-button{-webkit-appearance:none}.search-pill .search-kbd{flex-shrink:0;font-family:'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;font-size:11px;font-weight:500;line-height:1;padding:3px 6px;border-radius:4px;box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.05);letter-spacing:0.02em}.search-pill:focus-within .search-kbd{display:none}.search-pill .search-clear{flex-shrink:0;width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;padding:0;margin:0;border:0;border-radius:999px;background:transparent;color:inherit;cursor:pointer;opacity:0.7;transition:opacity 120ms ease, background 120ms ease}.search-pill .search-clear:hover{opacity:1;background:rgba(0, 0, 0, 0.06)}.search-pill .search-clear:focus-visible{outline:none;box-shadow:0 0 0 2px var(--brand-green, #00C87B);opacity:1}.search-pill--black .search-clear:hover{background:rgba(255, 255, 255, 0.10)}.search-pill--gray{background:var(--grey-light, #ECECEC);color:var(--grey-dark, #7A7B7A);border:0}.search-pill--gray:hover{background:#E0E0E0}.search-pill--gray .search-input{color:var(--brand-black, #07140D)}.search-pill--gray .search-input::placeholder{color:var(--grey-dark, #7A7B7A)}.search-pill--gray .search-kbd{color:var(--grey-dark, #7A7B7A);background:var(--white, #FFFFFF);border:1px solid #DCDCDC}.search-pill--gray:focus-within{background:var(--white, #FFFFFF);box-shadow:0 0 0 2px var(--brand-green, #00C87B)}.search-pill--white{background:var(--white, #FFFFFF);color:var(--grey-dark, #7A7B7A);border:1px solid var(--grey-light, #ECECEC)}.search-pill--white:hover{background:#FAFAFA}.search-pill--white .search-input{color:var(--brand-black, #07140D)}.search-pill--white .search-input::placeholder{color:var(--grey-dark, #7A7B7A)}.search-pill--white .search-kbd{color:var(--grey-dark, #7A7B7A);background:var(--grey-light, #ECECEC);border:1px solid #DCDCDC}.search-pill--white:focus-within{background:var(--white, #FFFFFF);box-shadow:0 0 0 2px var(--brand-green, #00C87B)}.search-pill--black{background:var(--brand-black, #07140D);color:rgba(255, 255, 255, 0.7);border:1px solid rgba(255, 255, 255, 0.12)}.search-pill--black:hover{background:#11221A}.search-pill--black .search-input{color:var(--white, #FFFFFF)}.search-pill--black .search-input::placeholder{color:rgba(255, 255, 255, 0.55)}.search-pill--black .search-kbd{color:rgba(255, 255, 255, 0.75);background:rgba(255, 255, 255, 0.08);border:1px solid rgba(255, 255, 255, 0.15)}.search-pill--black:focus-within{background:var(--brand-black, #07140D);box-shadow:0 0 0 2px var(--brand-green, #00C87B)}.search-dropdown{position:absolute;top:calc(100% + 8px);left:0;right:0;background:white;border:1px solid #e0e0e0;border-radius:12px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12),\n 0 2px 8px rgba(0, 0, 0, 0.08),\n 0 0 0 1px rgba(0, 255, 157, 0.08);max-height:500px;overflow:hidden;z-index:9999;display:flex;flex-direction:column;animation:dropdownFadeIn 0.25s cubic-bezier(0.4, 0, 0.2, 1)}.dropdown-state{display:flex;align-items:center;justify-content:center;gap:8px;padding:24px;color:#616161;font-size:14px}.dropdown-results{list-style:none;margin:0;overflow-y:auto;overflow-x:hidden;max-height:440px}.result-item{padding:7px 7px;cursor:pointer;border-left:4px solid transparent;margin-bottom:2px;transition:all 0.25s cubic-bezier(0.4, 0, 0.2, 1);overflow:hidden;word-wrap:break-word;word-break:break-word}.result-item:hover,.result-item--selected{background:linear-gradient(\n 90deg,\n rgba(0, 255, 157, 0.08) 0%,\n rgba(0, 255, 157, 0.03) 100%\n );border-left-color:var(--green-600);box-shadow:0 2px 8px rgba(0, 255, 157, 0.15)}.result-item:hover .result-title,.result-item--selected .result-title{color:var(--green-700)}.result-title{color:var(--black);transition:color 0.2s ease}.result-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}.result-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}.result-badge{display:inline-block;padding:3px 8px;background:rgba(0, 255, 157, 0.12);color:var(--green-800);border-radius:4px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;transition:all 0.2s ease}.result-badge--parent{background:rgba(120, 0, 255, 0.08);color:var(--purple-800, #6b21a8)}.result-badge--lr{background:rgba(0, 120, 255, 0.1);color:var(--blue-800, #1565c0)}.result-item:hover .result-badge,.result-item--selected .result-badge{background:rgba(0, 255, 157, 0.2);color:var(--green-900)}.result-item:hover .result-badge--parent,.result-item--selected .result-badge--parent{background:rgba(120, 0, 255, 0.15);color:var(--purple-900, #581c87)}.result-item:hover .result-badge--lr,.result-item--selected .result-badge--lr{background:rgba(0, 120, 255, 0.18);color:var(--blue-900, #0d47a1)}.result-url{font-size:12px;color:var(--grey-600)}.external-icon{display:inline-block;width:14px;height:14px;margin-left:4px;color:var(--green-600)}.result-snippet{font-size:13px;color:#616161;line-height:1.5;margin:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;transition:color 0.2s ease}.result-item:hover .result-snippet,.result-item--selected .result-snippet{color:#424242}.dropdown-footer{border-top:1px solid rgba(0, 255, 157, 0.15);padding:10px 16px;background:linear-gradient(\n 180deg,\n rgba(0, 255, 157, 0.02) 0%,\n rgba(0, 255, 157, 0.05) 100%\n );flex-shrink:0}.footer-hint{font-size:11px;color:#616161;display:flex;align-items:center;gap:6px;flex-wrap:wrap}kbd{display:inline-block;padding:3px 7px;font-size:11px;font-family:monospace;line-height:1.2;font-weight:500;color:var(--green-700);background:rgba(0, 255, 157, 0.1);border:1px solid rgba(0, 200, 123, 0.3);border-radius:4px;box-shadow:0 2px 0 rgba(0, 255, 157, 0.15),\n inset 0 1px 0 rgba(255, 255, 255, 0.5)}.dropdown-results::-webkit-scrollbar{width:8px}.dropdown-results::-webkit-scrollbar-track{background:rgba(0, 255, 157, 0.05);border-radius:4px}.dropdown-results::-webkit-scrollbar-thumb{background:#33FFB8;border-radius:4px}.dropdown-results::-webkit-scrollbar-thumb:hover{background:#00FF9D}.flex{display:flex}.inline-flex{display:inline-flex}.text-center{text-align:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-error{color:var(--red-700)}.text-lighter{color:var(--grey-600)}.text-lightest{color:var(--grey-500)}.ml-4{margin-left:0.25rem}.ml-8{margin-left:0.5rem}.ml-16{margin-left:1rem}.p-16{padding:1rem}.p-64{padding:4rem}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.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)}";
|
|
4478
4675
|
const EdsGlobalSearchStyle0 = edsGlobalSearchCss;
|
|
4479
4676
|
|
|
4480
4677
|
const EdsGlobalSearch = class {
|
|
@@ -4482,6 +4679,23 @@ const EdsGlobalSearch = class {
|
|
|
4482
4679
|
registerInstance(this, hostRef);
|
|
4483
4680
|
this.resultSelected = createEvent(this, "resultSelected", 7);
|
|
4484
4681
|
this.searchClosed = createEvent(this, "searchClosed", 7);
|
|
4682
|
+
/** Clear the current query and results; keep focus in the input so the
|
|
4683
|
+
* user can start typing again without an extra click. */
|
|
4684
|
+
this.handleClear = () => {
|
|
4685
|
+
if (this.debounceTimer) {
|
|
4686
|
+
clearTimeout(this.debounceTimer);
|
|
4687
|
+
}
|
|
4688
|
+
this.query = '';
|
|
4689
|
+
this.results = [];
|
|
4690
|
+
this.hasSearched = false;
|
|
4691
|
+
this.showDropdown = false;
|
|
4692
|
+
this.selectedIndex = -1;
|
|
4693
|
+
// Re-focus and reflect the empty value on the underlying DOM input.
|
|
4694
|
+
if (this.inputRef) {
|
|
4695
|
+
this.inputRef.value = '';
|
|
4696
|
+
this.inputRef.focus();
|
|
4697
|
+
}
|
|
4698
|
+
};
|
|
4485
4699
|
this.handleInput = (event) => {
|
|
4486
4700
|
var _a;
|
|
4487
4701
|
const target = event.target;
|
|
@@ -4514,6 +4728,7 @@ const EdsGlobalSearch = class {
|
|
|
4514
4728
|
this.currentOrigin = '';
|
|
4515
4729
|
this.currentSource = '';
|
|
4516
4730
|
this.authToken = '';
|
|
4731
|
+
this.variant = 'gray';
|
|
4517
4732
|
this.query = '';
|
|
4518
4733
|
this.results = [];
|
|
4519
4734
|
this.loading = false;
|
|
@@ -4523,15 +4738,26 @@ const EdsGlobalSearch = class {
|
|
|
4523
4738
|
this.selectedIndex = -1;
|
|
4524
4739
|
}
|
|
4525
4740
|
componentDidLoad() {
|
|
4526
|
-
//
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
|
|
4741
|
+
// ⌘K / Ctrl+K focuses the search pill from anywhere on the page.
|
|
4742
|
+
// Bound here (not via @Listen) so it works across shadow boundaries.
|
|
4743
|
+
this.cmdKListener = (event) => {
|
|
4744
|
+
var _a;
|
|
4745
|
+
const isMac = navigator.platform.toUpperCase().includes('MAC');
|
|
4746
|
+
const modifier = isMac ? event.metaKey : event.ctrlKey;
|
|
4747
|
+
if (modifier && event.key.toLowerCase() === 'k') {
|
|
4748
|
+
event.preventDefault();
|
|
4749
|
+
(_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.focus();
|
|
4750
|
+
}
|
|
4751
|
+
};
|
|
4752
|
+
document.addEventListener('keydown', this.cmdKListener);
|
|
4530
4753
|
}
|
|
4531
4754
|
disconnectedCallback() {
|
|
4532
4755
|
if (this.debounceTimer) {
|
|
4533
4756
|
clearTimeout(this.debounceTimer);
|
|
4534
4757
|
}
|
|
4758
|
+
if (this.cmdKListener) {
|
|
4759
|
+
document.removeEventListener('keydown', this.cmdKListener);
|
|
4760
|
+
}
|
|
4535
4761
|
}
|
|
4536
4762
|
handleDocumentClick(event) {
|
|
4537
4763
|
const path = event.composedPath();
|
|
@@ -4678,10 +4904,19 @@ const EdsGlobalSearch = class {
|
|
|
4678
4904
|
return this.hasSearched && !this.loading && !this.hasResults && this.query.trim();
|
|
4679
4905
|
}
|
|
4680
4906
|
render() {
|
|
4681
|
-
return (h("div", { key: '
|
|
4907
|
+
return (h("div", { key: '841c9a013a1c4cee9697f3465759bf638b28475e', class: "search-wrapper" }, h("label", { key: 'ff1b37fff6e94019d2da63060aba77d82ee1bafb', class: `search-pill search-pill--${this.variant}`, htmlFor: "search-global" }, h("svg", { key: '150aff8a31a68195e7b333b9bcfccbc3affb3901', class: "search-icon", width: "20", height: "20", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("circle", { key: 'cb424f39cd5f6316056dbcc6b80d11ce8ade1410', cx: "11", cy: "11", r: "7" }), h("line", { key: '004bce39d3a9ee7a53ef0e942cf986e38b76b921', x1: "20", y1: "20", x2: "16.5", y2: "16.5" })), h("input", { key: '97f4c012d7152f29fac9723ced4f06207b8a2453', id: "search-global", class: "search-input", type: "search", name: "search-box-global", placeholder: this.placeholder, value: this.query, autoComplete: "off", onInput: this.handleInput, ref: (el) => (this.inputRef = el) }), this.query && this.query.length > 0 ? (h("button", { type: "button", class: "search-clear", "aria-label": "Clear search", onMouseDown: (e) => e.preventDefault() /* keep focus in input */, onClick: () => this.handleClear() }, h("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.2", "stroke-linecap": "round", "stroke-linejoin": "round", "aria-hidden": "true" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" })))) : (h("kbd", { class: "search-kbd", "aria-hidden": "true" }, "\u2318K"))), this.showDropdown && (h("div", { key: '3354848b17ba065a64919defd74de0616a29c25c', class: "search-dropdown", ref: (el) => (this.dropdownRef = el) }, this.loading && (h("div", { key: '5c5f731e969f60c8c3d2ce21683fec35302a2954', class: "flex text-center justify-center p-64" }, h("eds-spinner", { key: '6d0b5223f03bb0ed2f83f2ab3c77cf4e116d87e7', variant: "primary", size: "sm" }))), this.error && !this.loading && (h("div", { key: '9cbca9b3f62c2969478e34a654a973196a5e9187', class: "flex text-center justify-center p-16" }, h("span", { key: 'ce2bd2f6c6b05fb5fdfec4da67460b72445970bc', class: "text-error f-body-02" }, this.error))), this.showEmpty && (h("div", { key: 'b7d446aa72732c9932c90bb5ef08a2f27c357ae4', class: "dropdown-state" }, h("eds-icon-wrapper", { key: 'ac5377b3efa4f26e10781f369843a69c3409ec83', name: "search" }), h("div", { key: '774784c1dbe4c6e6eda9e8d70833d0a2a6821b4f' }, h("p", { key: 'bbce9a267889eee40b54fd471f203b530de42a86', class: "f-body-02" }, "No results found"), h("p", { key: 'd440e4e0ff4f59ea14eef7aa5db0692c4a2352fa', class: "f-ui-04 text-lightest" }, "Try different keywords")))), this.hasResults && !this.loading && (h("ul", { key: 'b89e31f5931705e750f0f19fb159f93a05324e6d', class: "dropdown-results" }, this.results.map((result, index) => (h("li", { key: result.id, "data-index": index, class: {
|
|
4682
4908
|
'result-item': true,
|
|
4683
4909
|
'result-item--selected': index === this.selectedIndex
|
|
4684
|
-
}, onClick: () => this.selectResult(result), onMouseEnter: () => (this.selectedIndex = index) }, h("div", { class: "result-header" }, h("span", { class: "result-title f-body-02" }, result.title)), h("div", { class: "result-meta" },
|
|
4910
|
+
}, onClick: () => this.selectResult(result), onMouseEnter: () => (this.selectedIndex = index) }, h("div", { class: "result-header" }, h("span", { class: "result-title f-body-02" }, result.title)), h("div", { class: "result-meta" }, result.parent_software ? ([
|
|
4911
|
+
h("span", { class: "result-badge result-badge--parent" }, result.parent_software),
|
|
4912
|
+
result.section && h("span", { class: "result-badge result-badge--lr" }, result.section)
|
|
4913
|
+
]) : result.source === 'kg-services' ? ([
|
|
4914
|
+
h("span", { class: "result-badge" }, "EBRAINS KG"),
|
|
4915
|
+
result.section && h("span", { class: "result-badge" }, result.section)
|
|
4916
|
+
]) : ([
|
|
4917
|
+
h("span", { class: "result-badge" }, result.source),
|
|
4918
|
+
result.section && h("span", { class: "result-badge" }, result.section)
|
|
4919
|
+
]), h("span", { class: "result-url" }, result.url)), result.snippet && h("p", { class: "result-snippet" }, this.stripHtml(result.snippet))))))), this.hasResults && !this.loading && (h("div", { key: 'fd07f17d78ba2d95c30d95b35d89151b27e3a957', class: "dropdown-footer" }, h("span", { key: '20a6bc436e135e29b89a94b150c505bab6281d6f', class: "footer-hint" }, h("kbd", { key: '08e43dd318b0dde7d67f74731055e2bbc00bdc78' }, "\u2191"), " ", h("kbd", { key: '676535d717d5fb4b98cbf09050883630dbecaf6e' }, "\u2193"), " navigate \u2022 ", h("kbd", { key: 'cd9ac17223ae195b0508c7ea37ad2a9459341b8b' }, "\u21B5"), " select \u2022 ", h("kbd", { key: 'dbaa3eacc337eee81404518e9bd4c9b9fbc44205' }, "esc"), " close")))))));
|
|
4685
4920
|
}
|
|
4686
4921
|
get el() { return getElement(this); }
|
|
4687
4922
|
};
|
|
@@ -4733,7 +4968,7 @@ const EdsHeader = class {
|
|
|
4733
4968
|
const logoType = this.variant === 'strong' ? 'negative' : 'positive';
|
|
4734
4969
|
// Link intent based on header variant
|
|
4735
4970
|
const linkIntent = this.variant === 'strong' ? 'underlineInverse' : 'underline';
|
|
4736
|
-
return (h("header", { key: '
|
|
4971
|
+
return (h("header", { key: 'fd95f6b0126d620ab1d4f58240d471301d607fa5', role: "banner", class: `flex items-center justify-between relative z-10 ${classes}` }, h("div", { key: 'e7b1bd9a146543107d87ff6f4c8575ad63fc3889', class: "w-[250px]" }, h("div", { key: '257a8bf3d0efea39bd0e7f5c92d2a6bcbaa66d48', class: "p-[24px]" }, h("eds-logo", { key: '71365268524d0db6999dc6ff4a9227e388d53cdf', variant: logoType, href: this.url }))), this.parsedLinks && (h("nav", { key: '085b2bd5f667ea7e0be4de77cb4bd3d1a2bb6e3c', role: "navigation", "aria-label": "Primary", class: "flex-1 flex justify-center items-center hidden md:flex" }, h("ul", { key: 'b5c015e6e1fb376f6b48805cc5d0db436234a5fc', class: "flex gap-x-16" }, this.parsedLinks.map((link) => (h("eds-link", { label: link.label, "aria-label": link.label, url: link.url, intent: linkIntent, size: "large", icon: link.icon, external: link.external })))))), h("div", { key: '9bca10c081cd1b8157579fa587615538dc624817', class: "w-[250px] flex justify-end items-center" }, h("slot", { key: '360fb5fe76b41b2513cba2f8705ea5ea91cae9a9', name: "actions" })), this.menu && (h("div", { key: '7feaa2b97062e7ceb94bacc35e61a12edc0b2e54', class: "md:hidden flex overflow-hidden px-16" }, h("eds-button", { key: '706c1668e3b04517cfe0cb92da5b459980986df0', "aria-label": "Menu", intent: this.variant === 'strong' ? 'ghostInverse' : 'ghost', icon: "menu", size: "small", onClick: () => this.handleToggleMenu() })))));
|
|
4737
4972
|
}
|
|
4738
4973
|
get hostEl() { return getElement(this); }
|
|
4739
4974
|
};
|
|
@@ -7165,6 +7400,7 @@ const EdsIconWrapper = class {
|
|
|
7165
7400
|
registerInstance(this, hostRef);
|
|
7166
7401
|
this.name = undefined;
|
|
7167
7402
|
this.size = 20;
|
|
7403
|
+
this.label = undefined;
|
|
7168
7404
|
}
|
|
7169
7405
|
render() {
|
|
7170
7406
|
const iconSvg = ICONS[this.name];
|
|
@@ -7172,7 +7408,8 @@ const EdsIconWrapper = class {
|
|
|
7172
7408
|
console.warn(`Icon "${this.name}" not found in ICONS`);
|
|
7173
7409
|
return null;
|
|
7174
7410
|
}
|
|
7175
|
-
|
|
7411
|
+
const decorative = !this.label;
|
|
7412
|
+
return (h(Host, { role: decorative ? null : 'img', "aria-label": decorative ? null : this.label, "aria-hidden": decorative ? 'true' : null }, h("span", { class: `icon icon--${this.size}`, innerHTML: iconSvg })));
|
|
7176
7413
|
}
|
|
7177
7414
|
};
|
|
7178
7415
|
EdsIconWrapper.style = EdsIconWrapperStyle0;
|
|
@@ -7220,10 +7457,10 @@ const EdsImg = class {
|
|
|
7220
7457
|
imgOpts['loading'] = 'lazy';
|
|
7221
7458
|
imgOpts['decoding'] = 'async';
|
|
7222
7459
|
}
|
|
7223
|
-
return (h("div", { key: '
|
|
7460
|
+
return (h("div", { key: '122ae0673a7a2c9afd88cdcf8a83b52c11f0643e', class: {
|
|
7224
7461
|
'items-center justify-center': true,
|
|
7225
7462
|
'effect-bg-pattern': this.lazyload && this.showBg
|
|
7226
|
-
} }, h("picture", { key: '
|
|
7463
|
+
} }, h("picture", { key: 'b0bb1af0c95375db18bd45453016ee2fd78a6e2a' }, this.formats.map((format) => (h("source", { type: format.type, srcSet: format.srcset, media: format.media, sizes: this.sizes }))), h("img", Object.assign({ key: '2a8500ea92db1a846f0f6dbb41fa664c3d514f19', ref: (el) => (this.img = el), class: {
|
|
7227
7464
|
'effect-opacity object-cover object-center': true,
|
|
7228
7465
|
'opacity-100': this.loaded,
|
|
7229
7466
|
'opacity-0': !this.loaded
|
|
@@ -7260,6 +7497,7 @@ const EdsInput = class {
|
|
|
7260
7497
|
this.min = undefined;
|
|
7261
7498
|
this.max = undefined;
|
|
7262
7499
|
this.step = undefined;
|
|
7500
|
+
this.inputTabIndex = undefined;
|
|
7263
7501
|
this.innerVal = '';
|
|
7264
7502
|
this.maxLengthReached = false;
|
|
7265
7503
|
}
|
|
@@ -7282,7 +7520,7 @@ const EdsInput = class {
|
|
|
7282
7520
|
render() {
|
|
7283
7521
|
const withIcon = !!this.icon;
|
|
7284
7522
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : '';
|
|
7285
|
-
return (h("div", { key: '
|
|
7523
|
+
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'
|
|
7286
7524
|
? {
|
|
7287
7525
|
min: this.min,
|
|
7288
7526
|
max: this.max,
|
|
@@ -7293,7 +7531,7 @@ const EdsInput = class {
|
|
|
7293
7531
|
input ${this.type === 'radio' ? 'input-radio' : this.type === 'checkbox' ? 'input-checkbox' : ''}
|
|
7294
7532
|
${withIcon && this.type !== 'radio' && this.type !== 'checkbox' ? 'input-icon pl-36' : ''}
|
|
7295
7533
|
${this.error ? 'input-error' : ''}
|
|
7296
|
-
`, "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: '
|
|
7534
|
+
`, "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 }))));
|
|
7297
7535
|
}
|
|
7298
7536
|
get el() { return getElement(this); }
|
|
7299
7537
|
static get watchers() { return {
|
|
@@ -7398,7 +7636,7 @@ const EdsInputDropzone = class {
|
|
|
7398
7636
|
}
|
|
7399
7637
|
render() {
|
|
7400
7638
|
const dropzoneClass = `eds-input-dropzone ${this.isDragging ? 'dragging' : ''} ${this.disabled ? 'disabled' : ''}`;
|
|
7401
|
-
return (h("div", { key: '
|
|
7639
|
+
return (h("div", { key: '8c6d9cdd919e72f5e85a7b01a2db3cb6fadface0', class: "eds-input-dropzone-container" }, h("input", { key: 'fb643c39fa588971f825a01b20e8da6ac2da7d36', ref: (el) => (this.fileInputRef = el), type: "file", id: this.inputId || this.name, name: this.name, class: "eds-input-dropzone-hidden", disabled: this.disabled, required: this.required, multiple: this.multiple, accept: this.accept, onChange: this.handleFileSelect }), h("div", { key: 'fd000cfb95b10eb54798ea5575810692c8cce65d', class: dropzoneClass, onClick: this.handleDropzoneClick, onDragOver: this.handleDragOver, onDragLeave: this.handleDragLeave, onDrop: this.handleDrop }, h("svg", { key: 'ed7588f87e4182351f5301992ae582df1f21be5e', class: "dropzone-icon", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: '9977271ac6bb26c6d642708eb6a7d2f2ca242dcc', d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { key: 'f32b1ff2bea2718e075d78985837ba71acf23ce9', points: "17 8 12 3 7 8" }), h("line", { key: '326bc6f0e24c191a26859567653f807c81745a77', x1: "12", y1: "3", x2: "12", y2: "15" })), h("div", { key: 'f880855ecf537d527663101a5348591f975e7074', class: "dropzone-text" }, h("p", { key: '4747da3e157c6b1c3e56774867fc0258e2e77059', class: "dropzone-primary" }, this.primaryText), h("p", { key: '7852be7ecdcdfabf5fed632065b14128941461ee', class: "dropzone-secondary" }, this.secondaryText))), this.selectedFiles.length > 0 && (h("div", { key: '36347980293d2ea800a845a4ab5bb9c28fedc485', class: "eds-input-dropzone-chips" }, this.selectedFiles.map((item) => (h("div", { key: item.id, class: "eds-input-dropzone-chip" }, this.getFileIcon(item.file.name), h("span", { class: "eds-input-dropzone-chip-name" }, item.file.name), h("span", { class: "eds-input-dropzone-chip-size" }, this.formatFileSize(item.file.size)), h("button", { type: "button", class: "eds-input-dropzone-chip-remove", onClick: () => this.handleRemoveFile(item.id), disabled: this.disabled, "aria-label": `Remove ${item.file.name}` }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))))));
|
|
7402
7640
|
}
|
|
7403
7641
|
get hostEl() { return getElement(this); }
|
|
7404
7642
|
};
|
|
@@ -7525,9 +7763,12 @@ const EdsInputField = class {
|
|
|
7525
7763
|
return [];
|
|
7526
7764
|
}
|
|
7527
7765
|
render() {
|
|
7528
|
-
const inputOpts = Object.assign({ name: this.name, id: this.inputId, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleNativeInput, onChange: this.handleNativeChange, type: this.type, required: this.required, value: this.value, error: this.error,
|
|
7529
|
-
|
|
7530
|
-
|
|
7766
|
+
const inputOpts = Object.assign({ name: this.name, id: this.inputId, placeholder: this.placeholder, disabled: this.disabled, onInput: this.handleNativeInput, onChange: this.handleNativeChange, type: this.type, required: this.required, value: this.value, error: this.error,
|
|
7767
|
+
// Icons are only supported on text inputs for now — ignore the prop for
|
|
7768
|
+
// every other type so e.g. number/select/checkbox never render one.
|
|
7769
|
+
icon: this.type === 'text' ? this.icon : undefined, checked: this.checked }, (this.type === 'number' ? { min: this.min, max: this.max, step: this.step } : {}));
|
|
7770
|
+
return (h("div", { key: '2072cce16b572431b41363beff779d8631de7abc' }, this.type === 'checkbox' || this.type === 'radio' ? (this.parsedOptions.length > 0 ? (h("fieldset", { class: "space-y-4" }, (this.label || this.hint) && (h("div", { class: "flex justify-between mb-4" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint)))), this.parsedOptions.map((option) => (h("div", { class: "flex items-center gap-x-4 gap-y-4", key: option.value }, h("eds-input", Object.assign({}, inputOpts, { inputId: `${this.inputId || this.name}-${option.value}`, inputTabIndex: 0, value: option.value, checked: typeof this.value === 'string' && this.value.split(',').includes(String(option.value)) })), h("label", { htmlFor: `${this.inputId || this.name}-${option.value}`, class: `input-label-options ${this.disabled ? 'text-lighter' : ''}` }, option.label)))))) : (h("div", { class: "flex items-center gap-x-8" }, h("eds-input", Object.assign({}, inputOpts, { inputTabIndex: 0, value: this.value, checked: this.value === 'on' || this.checked })), this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required }))))) : (h("div", null, (this.label || this.hint) && (h("div", { class: "flex justify-between mb-4" }, this.label && (h("eds-input-label", { name: this.inputId || this.name, label: this.label, disabled: this.disabled, required: this.required })), this.hint && (h("p", { id: `${this.name}-hint`, class: "f-ui-05 text-lighter mt-8 ml-8" }, this.hint)))), this.type === 'select' ? (h("eds-input-select", Object.assign({}, inputOpts, { options: this.parsedOptions }))) : this.type === 'file' ? (h("eds-input-file", { name: this.name, inputId: this.inputId, disabled: this.disabled, required: this.required, multiple: true, onEdsfile: this.handleFileChange })) : this.type === 'dropzone' ? (h("eds-input-dropzone", { name: this.name, inputId: this.inputId, disabled: this.disabled, required: this.required, multiple: true, onEdsfile: this.handleFileChange })) : this.type === 'range' ? ((() => {
|
|
7771
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7531
7772
|
const rangeProps = {
|
|
7532
7773
|
name: inputOpts.name,
|
|
7533
7774
|
inputId: inputOpts.id || inputOpts.name,
|
|
@@ -7538,8 +7779,11 @@ const EdsInputField = class {
|
|
|
7538
7779
|
};
|
|
7539
7780
|
const opt = this.parsedOptions;
|
|
7540
7781
|
const numberValue = typeof this.value === 'string' ? parseFloat(this.value) : this.value;
|
|
7541
|
-
|
|
7542
|
-
|
|
7782
|
+
// Prefer the explicit min/max/step props (consistent with
|
|
7783
|
+
// type="number"); fall back to options[0..2].value for
|
|
7784
|
+
// backward compatibility with existing range fields.
|
|
7785
|
+
return (h("eds-input-range", Object.assign({}, rangeProps, { min: (_a = this.min) !== null && _a !== void 0 ? _a : (_b = opt[0]) === null || _b === void 0 ? void 0 : _b.value, max: (_c = this.max) !== null && _c !== void 0 ? _c : (_d = opt[1]) === null || _d === void 0 ? void 0 : _d.value, step: (_e = this.step) !== null && _e !== void 0 ? _e : (_f = opt[2]) === null || _f === void 0 ? void 0 : _f.value, value: numberValue })));
|
|
7786
|
+
})()) : (h("eds-input", Object.assign({}, inputOpts))))), h("div", { key: 'f3ab7ef07c5c35f6d5e5d7a3ec35f98fe133ab5b', class: "mt-6" }, h("eds-input-footer", { key: 'a72af69114cd3916e9ffa6ca8a65dced572dadf7', id: `${this.name}-footer`, name: this.name, message: this.message, "error-message": this.errorMessage, error: this.error, link: this.link }))));
|
|
7543
7787
|
}
|
|
7544
7788
|
static get delegatesFocus() { return true; }
|
|
7545
7789
|
get hostEl() { return getElement(this); }
|
|
@@ -7612,13 +7856,13 @@ const EdsInputFile = class {
|
|
|
7612
7856
|
}
|
|
7613
7857
|
render() {
|
|
7614
7858
|
const effectiveLabel = this.buttonLabel || (this.multiple ? 'Choose Files' : 'Choose File');
|
|
7615
|
-
return (h("div", { key: '
|
|
7859
|
+
return (h("div", { key: 'e02d98fbc01dbe7a89eeb3010f966ed4a373ede6', class: "eds-input-file-container" }, h("input", { key: '2013826fda9453aade4528c9f051aac98780662f', ref: (el) => (this.fileInputRef = el), type: "file", id: this.inputId || this.name, name: this.name, class: "eds-input-file-hidden", disabled: this.disabled, required: this.required, multiple: this.multiple, accept: this.accept, onChange: this.handleFileSelect }), h("button", { key: 'f5e5cf91376ccb69b39ef3c9b11095aca8bfb728', type: "button", class: "eds-input-file-btn", onClick: this.handleButtonClick, disabled: this.disabled }, h("svg", { key: '563066375b42d0a8c14f14ac9fdfb587539f4e76', viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { key: 'ebe5549fffa0c2453ab98891da75a464c09e9fa2', d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }), h("polyline", { key: '69036b82e15103e481770d0ef2c500b0dcad0399', points: "17 8 12 3 7 8" }), h("line", { key: 'e0531be95796ec6dc7f9fe359e4736a15a0e3640', x1: "12", y1: "3", x2: "12", y2: "15" })), effectiveLabel), this.selectedFiles.length > 0 && (h("div", { key: '62590fb46cee89d2524f1ede71c7af341c3e426a', class: "eds-input-file-chips" }, this.selectedFiles.map((item) => (h("div", { key: item.id, class: "eds-input-file-chip" }, this.getFileIcon(item.file.name), h("span", { class: "eds-input-file-chip-name" }, item.file.name), h("span", { class: "eds-input-file-chip-size" }, this.formatFileSize(item.file.size)), h("button", { type: "button", class: "eds-input-file-chip-remove", onClick: () => this.handleRemoveFile(item.id), disabled: this.disabled, "aria-label": `Remove ${item.file.name}` }, h("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2" }, h("line", { x1: "18", y1: "6", x2: "6", y2: "18" }), h("line", { x1: "6", y1: "6", x2: "18", y2: "18" }))))))))));
|
|
7616
7860
|
}
|
|
7617
7861
|
get hostEl() { return getElement(this); }
|
|
7618
7862
|
};
|
|
7619
7863
|
EdsInputFile.style = EdsInputFileStyle0;
|
|
7620
7864
|
|
|
7621
|
-
const edsInputFooterCss = "p{margin:0}.text-error{color:var(--red-700)}.flex{display:flex}.items-center{align-items:center}.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)}.ml-4{margin-left:0.25rem}.pt-4{padding-top:0.25rem}.mb-4{margin-bottom:0.25rem}.f-ui-05{font-family:var(--f-ui-05-fontFamily);font-weight:var(--f-ui-05-fontWeight);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);letter-spacing:var(--f-ui-05-letterSpacing)}.text-lighter{color:var(--grey-600)}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.hover\\:text-lighter:hover{color:var(--grey-600)}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}";
|
|
7865
|
+
const edsInputFooterCss = "p{margin:0}.eds-desc-link{position:relative;display:inline-block;color:var(--brand-black);text-decoration:none}.eds-desc-link::after{content:'';position:absolute;bottom:-2px;left:0;width:0;height:2px;background-color:var(--brand-green);transition:width 0.3s ease}.eds-desc-link:hover::after{width:100%}.eds-desc-link:focus-visible::after{width:0}eds-link{--f-ui-02-fontSize:var(--f-ui-04-fontSize)}.text-error{color:var(--red-700)}.flex{display:flex}.items-center{align-items:center}.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)}.ml-4{margin-left:0.25rem}.pt-4{padding-top:0.25rem}.mb-4{margin-bottom:0.25rem}.f-ui-05{font-family:var(--f-ui-05-fontFamily);font-weight:var(--f-ui-05-fontWeight);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);letter-spacing:var(--f-ui-05-letterSpacing)}.text-lighter{color:var(--grey-600)}.effect-color{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:300ms;transition-timing-function:cubic-bezier(0, 0, 0.2, 1)}.hover\\:text-lighter:hover{color:var(--grey-600)}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}";
|
|
7622
7866
|
const EdsInputFooterStyle0 = edsInputFooterCss;
|
|
7623
7867
|
|
|
7624
7868
|
const EdsInputFooter = class {
|
|
@@ -7631,7 +7875,7 @@ const EdsInputFooter = class {
|
|
|
7631
7875
|
this.link = undefined;
|
|
7632
7876
|
}
|
|
7633
7877
|
render() {
|
|
7634
|
-
return (h("div", { key: '
|
|
7878
|
+
return (h("div", { key: '866e375b5dd1d9c958f2255537e919a8c1f25dc7' }, this.error && this.errorMessage && (h("div", { key: '95d11c9cbb7746cc727ad9e037d00a28d9475bfc', id: `error_${this.name}`, class: "text-error flex items-center" }, h("eds-icon-wrapper", { key: 'face7f905ffa7c5f4dc7a7e6825d185e0d6b7901', name: "warning", size: 20 }), h("p", { key: '2011af93e06df1d91972843a510e843763f53b0b', class: "f-ui-04 ml-4 mb-4 pt-4", innerHTML: this.errorMessage }))), this.message && h("p", { key: '39d6833a30e7b93f75154a14bee1e6b4500575cb', id: `desc_${this.name}`, class: "f-ui-04 text-lighter", innerHTML: safeInlineFormat(this.message) }), this.link && (h("eds-link", { key: 'bfbf95e704574ada6f857ca08a90409ab38c1a5e', label: this.link.label, url: this.link.url, intent: "underline", size: "small", external: true }))));
|
|
7635
7879
|
}
|
|
7636
7880
|
};
|
|
7637
7881
|
EdsInputFooter.style = EdsInputFooterStyle0;
|
|
@@ -7648,7 +7892,7 @@ const EdsInputLabel = class {
|
|
|
7648
7892
|
this.disabled = false;
|
|
7649
7893
|
}
|
|
7650
7894
|
render() {
|
|
7651
|
-
return (h("label", { key: '
|
|
7895
|
+
return (h("label", { key: '40867ae01e94ab7a69b6f82658e4ee1b1e5b87cf', htmlFor: this.name, class: `input-label ${this.disabled ? 'text-lighter' : ''}` }, this.label, this.required && (h("span", { key: 'e3cfc44ea2a7f53f51c544648b3c635557cb8248' }, h("span", { key: 'ff7559b58cb22ce2a3066ed15e77f6088f299aaa', "aria-hidden": "true" }, "*"), h("span", { key: '2c831682aae410ac71589171e2b04981c60052bb', class: "sr-only" }, "required")))));
|
|
7652
7896
|
}
|
|
7653
7897
|
};
|
|
7654
7898
|
EdsInputLabel.style = EdsInputLabelStyle0;
|
|
@@ -7697,7 +7941,7 @@ const EdsInputRange = class {
|
|
|
7697
7941
|
render() {
|
|
7698
7942
|
var _a;
|
|
7699
7943
|
const currentValue = (_a = this.sliderVal) !== null && _a !== void 0 ? _a : Math.round(this.min + (this.max - this.min) / 2);
|
|
7700
|
-
return (h("div", { key: '
|
|
7944
|
+
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)));
|
|
7701
7945
|
}
|
|
7702
7946
|
get el() { return getElement(this); }
|
|
7703
7947
|
static get watchers() { return {
|
|
@@ -7705,74 +7949,6 @@ const EdsInputRange = class {
|
|
|
7705
7949
|
}; }
|
|
7706
7950
|
};
|
|
7707
7951
|
|
|
7708
|
-
const EdsInputSearch = class {
|
|
7709
|
-
constructor(hostRef) {
|
|
7710
|
-
registerInstance(this, hostRef);
|
|
7711
|
-
this.search = createEvent(this, "search", 7);
|
|
7712
|
-
/**
|
|
7713
|
-
* Keydown event listener to detect Command+K (Mac) or Ctrl+K (Windows/Linux)
|
|
7714
|
-
* and focus the input element when triggered.
|
|
7715
|
-
*
|
|
7716
|
-
* @param e - The keyboard event.
|
|
7717
|
-
*/
|
|
7718
|
-
this.keydownListener = (e) => {
|
|
7719
|
-
// Check for Command+K (Mac) or Ctrl+K (Windows/Linux)
|
|
7720
|
-
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'k') {
|
|
7721
|
-
e.preventDefault();
|
|
7722
|
-
// Focus the input if it's available and not disabled
|
|
7723
|
-
if (this.inputElement && !this.disabled) {
|
|
7724
|
-
this.inputElement.focus();
|
|
7725
|
-
}
|
|
7726
|
-
}
|
|
7727
|
-
};
|
|
7728
|
-
/*onInput = (e: any) => {
|
|
7729
|
-
// eslint-disable-next-line
|
|
7730
|
-
console.log('on input:', e);
|
|
7731
|
-
};*/
|
|
7732
|
-
this.onChange = (e) => {
|
|
7733
|
-
// eslint-disable-next-line
|
|
7734
|
-
this.search.emit({
|
|
7735
|
-
event: 'change',
|
|
7736
|
-
value: e.target.value
|
|
7737
|
-
});
|
|
7738
|
-
sendAnalytics({
|
|
7739
|
-
category: 'ui-component',
|
|
7740
|
-
parentContext: null,
|
|
7741
|
-
tag: this.el.tagName.toLowerCase(),
|
|
7742
|
-
name: e.target.value || '',
|
|
7743
|
-
action: 'search'
|
|
7744
|
-
});
|
|
7745
|
-
};
|
|
7746
|
-
this.name = undefined;
|
|
7747
|
-
this.inputId = 'search-main';
|
|
7748
|
-
this.placeholder = 'Search...';
|
|
7749
|
-
this.value = undefined;
|
|
7750
|
-
this.disabled = false;
|
|
7751
|
-
this.required = false;
|
|
7752
|
-
this.decorate = undefined;
|
|
7753
|
-
this.label = 'Search';
|
|
7754
|
-
}
|
|
7755
|
-
componentDidLoad() {
|
|
7756
|
-
// Assign the native input element after the component loads
|
|
7757
|
-
this.inputElement = this.el.querySelector('input');
|
|
7758
|
-
document.addEventListener('keydown', this.keydownListener);
|
|
7759
|
-
}
|
|
7760
|
-
disconnectedCallback() {
|
|
7761
|
-
// Clean up the event listener when the component is removed
|
|
7762
|
-
document.removeEventListener('keydown', this.keydownListener);
|
|
7763
|
-
}
|
|
7764
|
-
async getInputElement() {
|
|
7765
|
-
// Return the native input element
|
|
7766
|
-
return this.inputElement;
|
|
7767
|
-
}
|
|
7768
|
-
render() {
|
|
7769
|
-
return (h("div", { key: '849afaf3483b07fd2579d1138fbc1c1eee3930be', class: "relative flex items-center" }, h("eds-icon-wrapper", { key: '1b9a30ee46d4575116b585efe8a2d0c6d6b83b39', name: "search", class: "absolute top-1/2 left-[14px] -translate-y-1/2 text-lightest", "aria-hidden": "true" }), h("input", { key: '174fc93f10851aec47cb440895105c34600de601', 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}`,
|
|
7770
|
-
//onInput={this.onInput}
|
|
7771
|
-
onChange: this.onChange })));
|
|
7772
|
-
}
|
|
7773
|
-
get el() { return getElement(this); }
|
|
7774
|
-
};
|
|
7775
|
-
|
|
7776
7952
|
const EdsInputSelect = class {
|
|
7777
7953
|
constructor(hostRef) {
|
|
7778
7954
|
registerInstance(this, hostRef);
|
|
@@ -7795,15 +7971,160 @@ const EdsInputSelect = class {
|
|
|
7795
7971
|
const selectId = this.inputId || this.name;
|
|
7796
7972
|
const placeholderText = this.placeholder || `Pick from the list`;
|
|
7797
7973
|
const describedBy = this.hasMessage || this.error ? `${this.name}-error` : undefined;
|
|
7798
|
-
return (h("div", { key: '
|
|
7974
|
+
return (h("div", { key: '8365ffbc8f6f6386edfc1626d16c9152fd3cce9f', class: "relative" }, h("select", { key: '52e712898a3251cea5447a379886449175e7c8b8', id: selectId, name: this.name, class: {
|
|
7799
7975
|
input: true,
|
|
7800
7976
|
'input-error': this.error,
|
|
7801
7977
|
'px-4': true,
|
|
7802
7978
|
'py-2': true
|
|
7803
|
-
}, "aria-invalid": this.error ? 'true' : 'false', "aria-describedby": describedBy, disabled: this.disabled, required: this.required, onChange: this.handleChange }, h("option", { key: '
|
|
7979
|
+
}, "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" }))));
|
|
7804
7980
|
}
|
|
7805
7981
|
};
|
|
7806
7982
|
|
|
7983
|
+
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%}}";
|
|
7984
|
+
const EdsKgLearningResourcesStyle0 = edsKgLearningResourcesCss;
|
|
7985
|
+
|
|
7986
|
+
let cachedData = null;
|
|
7987
|
+
let cacheTimestamp = 0;
|
|
7988
|
+
const CACHE_TTL = 10 * 60 * 1000;
|
|
7989
|
+
const EdsKgLearningResources = class {
|
|
7990
|
+
constructor(hostRef) {
|
|
7991
|
+
registerInstance(this, hostRef);
|
|
7992
|
+
this.apiEndpoint = '/api/v1/kg/learning-resources/cached';
|
|
7993
|
+
this.resolveNames = true;
|
|
7994
|
+
this.size = 500;
|
|
7995
|
+
this.heading = '';
|
|
7996
|
+
this.variant = 'inverse';
|
|
7997
|
+
this.loading = false;
|
|
7998
|
+
this.error = '';
|
|
7999
|
+
this.software = [];
|
|
8000
|
+
this.meta = null;
|
|
8001
|
+
this.filterType = '';
|
|
8002
|
+
this.filterLevel = '';
|
|
8003
|
+
this.searchQuery = '';
|
|
8004
|
+
}
|
|
8005
|
+
componentWillLoad() {
|
|
8006
|
+
this.fetchData();
|
|
8007
|
+
}
|
|
8008
|
+
async fetchData() {
|
|
8009
|
+
const now = Date.now();
|
|
8010
|
+
if (cachedData && (now - cacheTimestamp) < CACHE_TTL) {
|
|
8011
|
+
this.software = cachedData;
|
|
8012
|
+
return;
|
|
8013
|
+
}
|
|
8014
|
+
this.loading = true;
|
|
8015
|
+
this.error = '';
|
|
8016
|
+
try {
|
|
8017
|
+
const params = new URLSearchParams({
|
|
8018
|
+
size: this.size.toString(),
|
|
8019
|
+
resolve_names: this.resolveNames.toString(),
|
|
8020
|
+
});
|
|
8021
|
+
const response = await fetch(`${this.apiEndpoint}?${params}`);
|
|
8022
|
+
if (!response.ok) {
|
|
8023
|
+
throw new Error(`Failed to fetch: ${response.statusText}`);
|
|
8024
|
+
}
|
|
8025
|
+
const data = await response.json();
|
|
8026
|
+
this.software = data.data || [];
|
|
8027
|
+
this.meta = data.meta || null;
|
|
8028
|
+
cachedData = this.software;
|
|
8029
|
+
cacheTimestamp = now;
|
|
8030
|
+
}
|
|
8031
|
+
catch (err) {
|
|
8032
|
+
this.error = err instanceof Error ? err.message : 'Failed to load learning resources';
|
|
8033
|
+
}
|
|
8034
|
+
finally {
|
|
8035
|
+
this.loading = false;
|
|
8036
|
+
}
|
|
8037
|
+
}
|
|
8038
|
+
getFilteredSoftware() {
|
|
8039
|
+
let filtered = this.software;
|
|
8040
|
+
if (this.filterType) {
|
|
8041
|
+
filtered = filtered.filter(sw => sw.learning_resources_types.includes(this.filterType));
|
|
8042
|
+
}
|
|
8043
|
+
if (this.filterLevel) {
|
|
8044
|
+
filtered = filtered.filter(sw => sw.learning_resources_levels.includes(this.filterLevel));
|
|
8045
|
+
}
|
|
8046
|
+
if (this.searchQuery) {
|
|
8047
|
+
const q = this.searchQuery.toLowerCase();
|
|
8048
|
+
filtered = filtered.filter(sw => sw.name.toLowerCase().includes(q) ||
|
|
8049
|
+
sw.learning_resources.some(lr => {
|
|
8050
|
+
var _a, _b;
|
|
8051
|
+
return ((_a = lr.name) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(q)) ||
|
|
8052
|
+
((_b = lr.abstract) === null || _b === void 0 ? void 0 : _b.toLowerCase().includes(q));
|
|
8053
|
+
}));
|
|
8054
|
+
}
|
|
8055
|
+
return filtered;
|
|
8056
|
+
}
|
|
8057
|
+
getFilteredResources(resources) {
|
|
8058
|
+
let filtered = resources;
|
|
8059
|
+
if (this.filterType) {
|
|
8060
|
+
filtered = filtered.filter(lr => lr.type === this.filterType);
|
|
8061
|
+
}
|
|
8062
|
+
if (this.filterLevel) {
|
|
8063
|
+
filtered = filtered.filter(lr => lr.educational_level === this.filterLevel);
|
|
8064
|
+
}
|
|
8065
|
+
return filtered;
|
|
8066
|
+
}
|
|
8067
|
+
/* TODO: Uncomment when filters are enabled
|
|
8068
|
+
private getAllTypes(): string[] {
|
|
8069
|
+
const types = new Set<string>();
|
|
8070
|
+
this.software.forEach(sw =>
|
|
8071
|
+
sw.learning_resources_types.forEach(t => types.add(t))
|
|
8072
|
+
);
|
|
8073
|
+
return Array.from(types).sort();
|
|
8074
|
+
}
|
|
8075
|
+
|
|
8076
|
+
private getAllLevels(): string[] {
|
|
8077
|
+
const levels = new Set<string>();
|
|
8078
|
+
this.software.forEach(sw =>
|
|
8079
|
+
sw.learning_resources_levels.forEach(l => levels.add(l))
|
|
8080
|
+
);
|
|
8081
|
+
return Array.from(levels).sort();
|
|
8082
|
+
}
|
|
8083
|
+
*/
|
|
8084
|
+
getTagIntent(type) {
|
|
8085
|
+
const map = {
|
|
8086
|
+
'interactive tutorial': 'brand',
|
|
8087
|
+
'video tutorial': 'primary',
|
|
8088
|
+
'user documentation': 'dark',
|
|
8089
|
+
'video presentation': 'inverse',
|
|
8090
|
+
'slide deck': 'strong',
|
|
8091
|
+
};
|
|
8092
|
+
return map[type] || 'brand-dark';
|
|
8093
|
+
}
|
|
8094
|
+
getLevelTagIntent(level) {
|
|
8095
|
+
const map = {
|
|
8096
|
+
'beginner': 'brand',
|
|
8097
|
+
'intermediate': 'dark',
|
|
8098
|
+
'advanced': 'strong',
|
|
8099
|
+
};
|
|
8100
|
+
return map[level] || 'brand-dark';
|
|
8101
|
+
}
|
|
8102
|
+
renderAccordionDescription(sw) {
|
|
8103
|
+
const count = sw.learning_resources_count;
|
|
8104
|
+
const types = sw.learning_resources_types.join(', ');
|
|
8105
|
+
return `${count} resource${count !== 1 ? 's' : ''} — ${types}`;
|
|
8106
|
+
}
|
|
8107
|
+
renderResources(sw) {
|
|
8108
|
+
const filtered = this.getFilteredResources(sw.learning_resources);
|
|
8109
|
+
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: () => {
|
|
8110
|
+
if (lr.iri) {
|
|
8111
|
+
window.open(lr.iri, '_blank', 'noopener,noreferrer');
|
|
8112
|
+
}
|
|
8113
|
+
} }, 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."))));
|
|
8114
|
+
}
|
|
8115
|
+
render() {
|
|
8116
|
+
// Always render the same outer scaffold (header + content area) so the
|
|
8117
|
+
// heading sits in identical position across loading / error / loaded
|
|
8118
|
+
// states and the spinner appears where the accordion list will render.
|
|
8119
|
+
const filtered = !this.loading && !this.error ? this.getFilteredSoftware() : [];
|
|
8120
|
+
// const allTypes = this.getAllTypes();
|
|
8121
|
+
// const allLevels = this.getAllLevels();
|
|
8122
|
+
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."))))));
|
|
8123
|
+
}
|
|
8124
|
+
get el() { return getElement(this); }
|
|
8125
|
+
};
|
|
8126
|
+
EdsKgLearningResources.style = EdsKgLearningResourcesStyle0;
|
|
8127
|
+
|
|
7807
8128
|
const edsKgWebServicesSelectCss = ".kg-web-services-select-container{width:100%}.loading-container,.error-container{width:100%}";
|
|
7808
8129
|
const EdsKgWebServicesSelectStyle0 = edsKgWebServicesSelectCss;
|
|
7809
8130
|
|
|
@@ -8177,7 +8498,7 @@ const EdsLink = class {
|
|
|
8177
8498
|
const labelClasses = this.hideLabelOnSmallScreen
|
|
8178
8499
|
? 'hidden lg:flex' // Tailwind example: hidden on small screens, visible on larger
|
|
8179
8500
|
: '';
|
|
8180
|
-
return (h("a", { key: '
|
|
8501
|
+
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())));
|
|
8181
8502
|
}
|
|
8182
8503
|
get el() { return getElement(this); }
|
|
8183
8504
|
};
|
|
@@ -8221,13 +8542,13 @@ const EdsLogo = class {
|
|
|
8221
8542
|
}
|
|
8222
8543
|
render() {
|
|
8223
8544
|
const logoContent = this.getLogo();
|
|
8224
|
-
return (h("a", { key: '
|
|
8545
|
+
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 })));
|
|
8225
8546
|
}
|
|
8226
8547
|
get el() { return getElement(this); }
|
|
8227
8548
|
};
|
|
8228
8549
|
EdsLogo.style = EdsLogoStyle0;
|
|
8229
8550
|
|
|
8230
|
-
const edsMatomoNoticeCss = "
|
|
8551
|
+
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}";
|
|
8231
8552
|
const EdsMatomoNoticeStyle0 = edsMatomoNoticeCss;
|
|
8232
8553
|
|
|
8233
8554
|
const EdsMatomoNotice = class {
|
|
@@ -8338,13 +8659,19 @@ const EdsMatomoNotice = class {
|
|
|
8338
8659
|
if (!this.showNotice) {
|
|
8339
8660
|
return null;
|
|
8340
8661
|
}
|
|
8341
|
-
return (
|
|
8662
|
+
return (
|
|
8663
|
+
// Content-only render — no positioning, no overlay, no sizing.
|
|
8664
|
+
// The host application wraps this component in whatever positioned
|
|
8665
|
+
// container makes sense (fixed bottom banner, modal, sidebar slot,
|
|
8666
|
+
// etc.). See packages/shared-hugo/layouts/_default/baseof.html for
|
|
8667
|
+
// the bottom-centered card wrapper used by handbook/eds-docs.
|
|
8668
|
+
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() }))))));
|
|
8342
8669
|
}
|
|
8343
8670
|
get el() { return getElement(this); }
|
|
8344
8671
|
};
|
|
8345
8672
|
EdsMatomoNotice.style = EdsMatomoNoticeStyle0;
|
|
8346
8673
|
|
|
8347
|
-
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}";
|
|
8674
|
+
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}";
|
|
8348
8675
|
const EdsNpsStyle0 = edsNpsCss;
|
|
8349
8676
|
|
|
8350
8677
|
const EdsNps = class {
|
|
@@ -8425,14 +8752,14 @@ const EdsNps = class {
|
|
|
8425
8752
|
}
|
|
8426
8753
|
render() {
|
|
8427
8754
|
const count = this.max - this.min + 1;
|
|
8428
|
-
return (h("div", { key: '
|
|
8755
|
+
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) => {
|
|
8429
8756
|
const val = this.min + i;
|
|
8430
8757
|
const isSelected = val === this.internalValue;
|
|
8431
8758
|
const tabIndex = isSelected || (this.internalValue == null && i === 0) ? 0 : -1;
|
|
8432
|
-
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' : '
|
|
8759
|
+
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: () => {
|
|
8433
8760
|
this.internalValue = val;
|
|
8434
8761
|
} })));
|
|
8435
|
-
})), h("div", { key: '
|
|
8762
|
+
})), 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)))));
|
|
8436
8763
|
}
|
|
8437
8764
|
get el() { return getElement(this); }
|
|
8438
8765
|
static get watchers() { return {
|
|
@@ -8682,7 +9009,7 @@ const EdsPagination = class {
|
|
|
8682
9009
|
}
|
|
8683
9010
|
render() {
|
|
8684
9011
|
const navigableIndex = -1; // Track index for keyboard navigation
|
|
8685
|
-
return (h("div", { key: '
|
|
9012
|
+
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) => {
|
|
8686
9013
|
if (this.mode === 'default' && !this.isFirstPage()) {
|
|
8687
9014
|
this.handlePageClick(event, (this.currentPage || 1) - 1);
|
|
8688
9015
|
}
|
|
@@ -8691,7 +9018,7 @@ const EdsPagination = class {
|
|
|
8691
9018
|
: this.isFirstPage()
|
|
8692
9019
|
? '#'
|
|
8693
9020
|
: 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' &&
|
|
8694
|
-
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 ? '
|
|
9021
|
+
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) => {
|
|
8695
9022
|
if (this.mode === 'default' && !this.isLastPage()) {
|
|
8696
9023
|
this.handlePageClick(event, (this.currentPage || 1) + 1);
|
|
8697
9024
|
}
|
|
@@ -8767,7 +9094,7 @@ const EdsProgressBar = class {
|
|
|
8767
9094
|
};
|
|
8768
9095
|
EdsProgressBar.style = EdsProgressBarStyle0;
|
|
8769
9096
|
|
|
8770
|
-
const edsRatingCss = ":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--brand-green);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}";
|
|
9097
|
+
const edsRatingCss = ":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--brand-green);}.star:hover,.star.filled:hover{transform:scale(1.2)}.eds-rating__btn{transition:transform 0.15s ease-in-out}.eds-rating__btn.is-selected{transform:scale(1.05)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}";
|
|
8771
9098
|
const EdsRatingStyle0 = edsRatingCss;
|
|
8772
9099
|
|
|
8773
9100
|
const EdsRating = class {
|
|
@@ -8846,12 +9173,12 @@ const EdsRating = class {
|
|
|
8846
9173
|
this.onSelect(next);
|
|
8847
9174
|
}
|
|
8848
9175
|
render() {
|
|
8849
|
-
return (h("div", { key: '
|
|
9176
|
+
return (h("div", { key: '01857f12c63fbe53b95152902ddba594aa736f6f', id: "rating-buttons", role: "group", "aria-labelledby": "rating", class: "stars flex space-x-1 my-8", onKeyDown: (e) => this.handleKeyNav(e) }, Array.from({ length: this.ratingCount }, (_, index) => {
|
|
8850
9177
|
const starRating = index + 1;
|
|
8851
9178
|
const isSelected = starRating <= this.internalRating;
|
|
8852
9179
|
// Use the mapping text if available; otherwise, fall back to a generic label.
|
|
8853
9180
|
const checked = this.internalRating === starRating;
|
|
8854
|
-
return (h("eds-button", { ref: (el) => (this.buttonRefs[index] = el), icon: this.ratingType, "aria-label": `${starRating} ${this.ratingType}${starRating > 1 ? 's' : ''}`, onClick: () => this.onSelect(starRating), tabIndex: checked || (this.internalRating === 0 && index === 0) ? 0 : -1, intent: isSelected ? 'brand' : '
|
|
9181
|
+
return (h("eds-button", { ref: (el) => (this.buttonRefs[index] = el), icon: this.ratingType, "aria-label": `${starRating} ${this.ratingType}${starRating > 1 ? 's' : ''}`, onClick: () => this.onSelect(starRating), tabIndex: checked || (this.internalRating === 0 && index === 0) ? 0 : -1, intent: isSelected ? 'brand' : 'brandLight', class: isSelected ? 'eds-rating__btn is-selected' : 'eds-rating__btn', size: "large" }));
|
|
8855
9182
|
})));
|
|
8856
9183
|
}
|
|
8857
9184
|
get el() { return getElement(this); }
|
|
@@ -8861,6 +9188,295 @@ const EdsRating = class {
|
|
|
8861
9188
|
};
|
|
8862
9189
|
EdsRating.style = EdsRatingStyle0;
|
|
8863
9190
|
|
|
9191
|
+
const edsSearchSelectCss = ":host{display:block;width:100%;font-family:var(--f-ui-02-fontFamily, 'IBM Plex Sans', system-ui, sans-serif)}.eds-ss{position:relative;display:block;width:100%}.eds-ss__labelrow{display:flex;justify-content:space-between;margin-bottom:0.25rem}.eds-ss__hint{margin-top:0.5rem;margin-left:0.5rem;font-family:var(--f-ui-05-fontFamily);font-weight:var(--f-ui-05-fontWeight);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);letter-spacing:var(--f-ui-05-letterSpacing);color:var(--grey-600)}.eds-ss__control{position:relative}.eds-ss__box{display:flex;flex-wrap:wrap;align-items:center;gap:0.35rem;width:100%;box-sizing:border-box;min-height:2.5rem;padding:6px 0.75rem;padding-right:3.75rem;border-width:2px;border-style:solid;border-color:rgba(0, 0, 0, 0.1);border-radius:8px;background:var(--white, #fff);transition-property:color, background-color, border-color;transition-timing-function:cubic-bezier(0, 0, 0.2, 1);transition-duration:300ms}.eds-ss__box:hover{border-color:var(--brand-black)}.eds-ss__box:focus-within{border-color:var(--brand-black);outline:3px solid var(--brand-green);outline-offset:2px}.eds-ss__box.is-error{border-color:var(--red-700)}.eds-ss__box.is-disabled{cursor:not-allowed;background-color:var(--grey-300)}.eds-ss__input{flex:1;min-width:6rem;border:none;outline:none;background:transparent;padding:4px 0;color:var(--brand-black);font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.eds-ss__input::placeholder{color:var(--grey-500)}.eds-ss__input:disabled{cursor:not-allowed;color:var(--grey-500)}.eds-ss__chip{display:inline-flex;align-items:center;gap:0.35rem;padding:4px 0.4rem 4px 0.7rem;background:rgba(0, 200, 123, 0.12);color:var(--brand-green-dark, #00A867);border-radius:6px;font-family:var(--f-ui-02-fontFamily);font-size:var(--f-ui-02-fontSize);font-weight:600;line-height:1.4;max-width:100%}.eds-ss__chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.eds-ss__chip-x{flex-shrink:0;border:none;background:none;cursor:pointer;color:var(--brand-green-dark, #00A867);font-size:1.2rem;line-height:1;padding:0 2px}.eds-ss__chip-x:hover{color:var(--brand-black, #07140D)}.eds-ss__clear,.eds-ss__chevron{position:absolute;top:50%;transform:translateY(-50%)}.eds-ss__chevron{right:6px;width:1.75rem;height:1.75rem;display:flex;align-items:center;justify-content:center;background-color:var(--grey-300);border-radius:4px;color:var(--brand-black);pointer-events:none}.eds-ss__clear{right:2.6rem;color:var(--grey-600, #6e6e6e);background:none;border:none;cursor:pointer;font-size:1.05rem;line-height:1}.eds-ss__clear:hover{color:var(--brand-black, #07140D)}.eds-ss__list{position:absolute;z-index:50;left:0;right:0;margin:0.25rem 0 0;padding:0.25rem;list-style:none;max-height:18rem;overflow-y:auto;background:var(--white, #fff);border:2px solid rgba(0, 0, 0, 0.1);border-radius:8px;box-shadow:0 8px 24px rgba(0, 0, 0, 0.12)}.eds-ss__option{padding:0.5rem 0.6rem;border-radius:6px;cursor:pointer;color:var(--brand-black, #07140D);font-family:var(--f-ui-02-fontFamily);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.eds-ss__option.is-active{background:rgba(0, 200, 123, 0.1)}.eds-ss__option.is-selected{font-weight:600;color:var(--brand-green-dark, #00A867)}.eds-ss__status,.eds-ss__more{padding:0.5rem 0.6rem;font-family:var(--f-ui-05-fontFamily);font-size:var(--f-ui-05-fontSize);line-height:var(--f-ui-05-lineHeight);color:var(--grey-600, #6e6e6e)}.eds-ss__status.is-error{color:var(--red-700, #d64545)}.eds-ss__more{border-top:1px solid rgba(0, 0, 0, 0.1);margin-top:0.25rem;font-style:italic}";
|
|
9192
|
+
const EdsSearchSelectStyle0 = edsSearchSelectCss;
|
|
9193
|
+
|
|
9194
|
+
const EdsSearchSelect = class {
|
|
9195
|
+
constructor(hostRef) {
|
|
9196
|
+
registerInstance(this, hostRef);
|
|
9197
|
+
this.edsinput = createEvent(this, "edsinput", 7);
|
|
9198
|
+
this.edschange = createEvent(this, "edschange", 7);
|
|
9199
|
+
this.debounceTimer = null;
|
|
9200
|
+
this.inlineOptions = [];
|
|
9201
|
+
this.listboxId = `eds-ss-list-${Math.round(performance.now())}`;
|
|
9202
|
+
// value -> label, so selected tags render readable labels even for remote
|
|
9203
|
+
// values whose label hasn't been fetched in the current page.
|
|
9204
|
+
this.labelCache = {};
|
|
9205
|
+
this.onInput = (e) => {
|
|
9206
|
+
this.query = e.target.value;
|
|
9207
|
+
this.open = true;
|
|
9208
|
+
this.activeIndex = -1;
|
|
9209
|
+
this.runSearch(this.query);
|
|
9210
|
+
};
|
|
9211
|
+
this.clear = () => {
|
|
9212
|
+
if (this.multiple) {
|
|
9213
|
+
this.value = [];
|
|
9214
|
+
this.emitValue([]);
|
|
9215
|
+
}
|
|
9216
|
+
else {
|
|
9217
|
+
this.value = undefined;
|
|
9218
|
+
this.selectedLabel = '';
|
|
9219
|
+
this.emitValue('');
|
|
9220
|
+
}
|
|
9221
|
+
this.query = '';
|
|
9222
|
+
};
|
|
9223
|
+
this.onKeyDown = (e) => {
|
|
9224
|
+
if (e.key === 'ArrowDown') {
|
|
9225
|
+
e.preventDefault();
|
|
9226
|
+
if (!this.open)
|
|
9227
|
+
return this.openMenu();
|
|
9228
|
+
this.activeIndex = Math.min(this.activeIndex + 1, this.visibleItems.length - 1);
|
|
9229
|
+
}
|
|
9230
|
+
else if (e.key === 'ArrowUp') {
|
|
9231
|
+
e.preventDefault();
|
|
9232
|
+
this.activeIndex = Math.max(this.activeIndex - 1, 0);
|
|
9233
|
+
}
|
|
9234
|
+
else if (e.key === 'Enter') {
|
|
9235
|
+
if (this.open && this.activeIndex >= 0) {
|
|
9236
|
+
e.preventDefault();
|
|
9237
|
+
this.select(this.visibleItems[this.activeIndex]);
|
|
9238
|
+
}
|
|
9239
|
+
}
|
|
9240
|
+
else if (e.key === 'Escape') {
|
|
9241
|
+
this.closeMenu();
|
|
9242
|
+
}
|
|
9243
|
+
else if (e.key === 'Backspace' && this.multiple && !this.query && this.selectedValues.length) {
|
|
9244
|
+
// Backspace on an empty query removes the last selected tag.
|
|
9245
|
+
this.removeValue(this.selectedValues[this.selectedValues.length - 1]);
|
|
9246
|
+
}
|
|
9247
|
+
};
|
|
9248
|
+
// Close when a click lands outside the component. Must be shadow-aware:
|
|
9249
|
+
// this component is nested inside eds-form's shadow root, so a document-level
|
|
9250
|
+
// listener sees the event retargeted to the OUTER host — `host.contains(target)`
|
|
9251
|
+
// would be false even for our own clicks and wrongly close on open. composedPath()
|
|
9252
|
+
// walks through every shadow boundary and contains our host iff the click was ours.
|
|
9253
|
+
this.onDocumentClick = (e) => {
|
|
9254
|
+
if (this.open && !e.composedPath().includes(this.host))
|
|
9255
|
+
this.closeMenu();
|
|
9256
|
+
};
|
|
9257
|
+
this.name = undefined;
|
|
9258
|
+
this.label = undefined;
|
|
9259
|
+
this.placeholder = 'Search…';
|
|
9260
|
+
this.required = false;
|
|
9261
|
+
this.disabled = false;
|
|
9262
|
+
this.hint = undefined;
|
|
9263
|
+
this.message = undefined;
|
|
9264
|
+
this.error = false;
|
|
9265
|
+
this.errorMessage = undefined;
|
|
9266
|
+
this.value = undefined;
|
|
9267
|
+
this.multiple = false;
|
|
9268
|
+
this.options = undefined;
|
|
9269
|
+
this.source = undefined;
|
|
9270
|
+
this.apiBase = '/api/v1';
|
|
9271
|
+
this.searchParam = 'q';
|
|
9272
|
+
this.limit = 50;
|
|
9273
|
+
this.debounceMs = 250;
|
|
9274
|
+
this.maxVisible = 100;
|
|
9275
|
+
this.open = false;
|
|
9276
|
+
this.query = '';
|
|
9277
|
+
this.loading = false;
|
|
9278
|
+
this.fetchError = '';
|
|
9279
|
+
this.items = [];
|
|
9280
|
+
this.total = 0;
|
|
9281
|
+
this.activeIndex = -1;
|
|
9282
|
+
this.selectedLabel = '';
|
|
9283
|
+
}
|
|
9284
|
+
componentWillLoad() {
|
|
9285
|
+
this.parseInlineOptions();
|
|
9286
|
+
this.resolveSelectedLabel();
|
|
9287
|
+
}
|
|
9288
|
+
onOptionsChange() {
|
|
9289
|
+
this.parseInlineOptions();
|
|
9290
|
+
this.resolveSelectedLabel();
|
|
9291
|
+
}
|
|
9292
|
+
onValueChange() {
|
|
9293
|
+
this.resolveSelectedLabel();
|
|
9294
|
+
}
|
|
9295
|
+
parseInlineOptions() {
|
|
9296
|
+
if (!this.options) {
|
|
9297
|
+
this.inlineOptions = [];
|
|
9298
|
+
return;
|
|
9299
|
+
}
|
|
9300
|
+
if (typeof this.options === 'string') {
|
|
9301
|
+
try {
|
|
9302
|
+
this.inlineOptions = JSON.parse(this.options) || [];
|
|
9303
|
+
}
|
|
9304
|
+
catch (_a) {
|
|
9305
|
+
this.inlineOptions = [];
|
|
9306
|
+
}
|
|
9307
|
+
}
|
|
9308
|
+
else {
|
|
9309
|
+
this.inlineOptions = this.options;
|
|
9310
|
+
}
|
|
9311
|
+
this.cacheLabels(this.inlineOptions);
|
|
9312
|
+
}
|
|
9313
|
+
cacheLabels(opts) {
|
|
9314
|
+
(opts || []).forEach((o) => {
|
|
9315
|
+
if (o && o.value != null)
|
|
9316
|
+
this.labelCache[String(o.value)] = o.label;
|
|
9317
|
+
});
|
|
9318
|
+
}
|
|
9319
|
+
/** The current selection as a value array (works for single + multi). */
|
|
9320
|
+
get selectedValues() {
|
|
9321
|
+
const v = this.value;
|
|
9322
|
+
if (Array.isArray(v))
|
|
9323
|
+
return v.map(String).filter((s) => s !== '');
|
|
9324
|
+
if (typeof v === 'string' && v !== '') {
|
|
9325
|
+
return this.multiple ? v.split(',').filter(Boolean) : [v];
|
|
9326
|
+
}
|
|
9327
|
+
return [];
|
|
9328
|
+
}
|
|
9329
|
+
labelFor(val) {
|
|
9330
|
+
var _a, _b;
|
|
9331
|
+
return (this.labelCache[String(val)] ||
|
|
9332
|
+
((_a = this.inlineOptions.find((o) => String(o.value) === String(val))) === null || _a === void 0 ? void 0 : _a.label) ||
|
|
9333
|
+
((_b = this.items.find((o) => String(o.value) === String(val))) === null || _b === void 0 ? void 0 : _b.label) ||
|
|
9334
|
+
String(val));
|
|
9335
|
+
}
|
|
9336
|
+
emitValue(v) {
|
|
9337
|
+
this.edsinput.emit({ value: v });
|
|
9338
|
+
this.edschange.emit({ value: v });
|
|
9339
|
+
}
|
|
9340
|
+
get isRemote() {
|
|
9341
|
+
return !!this.source && this.inlineOptions.length === 0;
|
|
9342
|
+
}
|
|
9343
|
+
resolveSelectedLabel() {
|
|
9344
|
+
if (!this.value) {
|
|
9345
|
+
this.selectedLabel = '';
|
|
9346
|
+
return;
|
|
9347
|
+
}
|
|
9348
|
+
// Inline: resolve label from the known list. Remote: best-effort — show the
|
|
9349
|
+
// value until/unless it appears in a fetched page.
|
|
9350
|
+
const pool = this.inlineOptions.length ? this.inlineOptions : this.items;
|
|
9351
|
+
const found = pool.find((o) => String(o.value) === String(this.value));
|
|
9352
|
+
this.selectedLabel = found ? found.label : String(this.value);
|
|
9353
|
+
}
|
|
9354
|
+
// --- Data --------------------------------------------------------------
|
|
9355
|
+
filterInline(q) {
|
|
9356
|
+
const needle = q.trim().toLowerCase();
|
|
9357
|
+
if (!needle)
|
|
9358
|
+
return this.inlineOptions;
|
|
9359
|
+
return this.inlineOptions.filter((o) => o.label.toLowerCase().includes(needle) ||
|
|
9360
|
+
String(o.value).toLowerCase().includes(needle));
|
|
9361
|
+
}
|
|
9362
|
+
async fetchRemote(q) {
|
|
9363
|
+
this.loading = true;
|
|
9364
|
+
this.fetchError = '';
|
|
9365
|
+
try {
|
|
9366
|
+
const params = new URLSearchParams({ [this.searchParam]: q, limit: String(this.limit) });
|
|
9367
|
+
const url = `${this.apiBase}/datasets/${encodeURIComponent(this.source)}/search?${params}`;
|
|
9368
|
+
const resp = await fetch(url);
|
|
9369
|
+
if (!resp.ok)
|
|
9370
|
+
throw new Error(`Search failed: ${resp.statusText}`);
|
|
9371
|
+
const data = await resp.json();
|
|
9372
|
+
this.items = data.items || [];
|
|
9373
|
+
this.cacheLabels(this.items);
|
|
9374
|
+
this.total = typeof data.total === 'number' ? data.total : this.items.length;
|
|
9375
|
+
this.resolveSelectedLabel();
|
|
9376
|
+
}
|
|
9377
|
+
catch (e) {
|
|
9378
|
+
this.fetchError = e instanceof Error ? e.message : 'Search failed';
|
|
9379
|
+
this.items = [];
|
|
9380
|
+
this.total = 0;
|
|
9381
|
+
}
|
|
9382
|
+
finally {
|
|
9383
|
+
this.loading = false;
|
|
9384
|
+
}
|
|
9385
|
+
}
|
|
9386
|
+
runSearch(q, immediate = false) {
|
|
9387
|
+
if (this.isRemote) {
|
|
9388
|
+
// Show the loading state synchronously so the debounce window renders
|
|
9389
|
+
// "Searching…" rather than a misleading "No matches" before the fetch.
|
|
9390
|
+
this.loading = true;
|
|
9391
|
+
clearTimeout(this.debounceTimer);
|
|
9392
|
+
if (immediate) {
|
|
9393
|
+
this.fetchRemote(q);
|
|
9394
|
+
}
|
|
9395
|
+
else {
|
|
9396
|
+
this.debounceTimer = setTimeout(() => this.fetchRemote(q), this.debounceMs);
|
|
9397
|
+
}
|
|
9398
|
+
}
|
|
9399
|
+
else {
|
|
9400
|
+
this.items = this.filterInline(q);
|
|
9401
|
+
this.total = this.items.length;
|
|
9402
|
+
}
|
|
9403
|
+
}
|
|
9404
|
+
// --- The capped, render-ready slice ------------------------------------
|
|
9405
|
+
get visibleItems() {
|
|
9406
|
+
return this.items.slice(0, this.maxVisible);
|
|
9407
|
+
}
|
|
9408
|
+
get hiddenCount() {
|
|
9409
|
+
return Math.max(0, this.total - this.visibleItems.length);
|
|
9410
|
+
}
|
|
9411
|
+
// --- Interaction -------------------------------------------------------
|
|
9412
|
+
openMenu() {
|
|
9413
|
+
if (this.disabled)
|
|
9414
|
+
return;
|
|
9415
|
+
this.open = true;
|
|
9416
|
+
this.activeIndex = -1;
|
|
9417
|
+
// Populate on first open (initial page for remote, full list for inline).
|
|
9418
|
+
// Immediate fetch on open — debounce only applies to typing.
|
|
9419
|
+
if (!this.items.length || this.isRemote)
|
|
9420
|
+
this.runSearch(this.query, true);
|
|
9421
|
+
}
|
|
9422
|
+
closeMenu() {
|
|
9423
|
+
this.open = false;
|
|
9424
|
+
this.activeIndex = -1;
|
|
9425
|
+
}
|
|
9426
|
+
select(opt) {
|
|
9427
|
+
this.labelCache[String(opt.value)] = opt.label;
|
|
9428
|
+
if (this.multiple) {
|
|
9429
|
+
const current = this.selectedValues;
|
|
9430
|
+
const key = String(opt.value);
|
|
9431
|
+
const next = current.includes(key)
|
|
9432
|
+
? current.filter((v) => v !== key) // toggle off if already chosen
|
|
9433
|
+
: [...current, key];
|
|
9434
|
+
this.value = next;
|
|
9435
|
+
this.query = '';
|
|
9436
|
+
this.emitValue(next);
|
|
9437
|
+
// Keep the menu open so more can be picked; reset the list to all results.
|
|
9438
|
+
this.runSearch('', true);
|
|
9439
|
+
return;
|
|
9440
|
+
}
|
|
9441
|
+
this.value = opt.value;
|
|
9442
|
+
this.selectedLabel = opt.label;
|
|
9443
|
+
this.query = '';
|
|
9444
|
+
this.closeMenu();
|
|
9445
|
+
this.emitValue(opt.value);
|
|
9446
|
+
}
|
|
9447
|
+
removeValue(val, e) {
|
|
9448
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
9449
|
+
const next = this.selectedValues.filter((v) => v !== String(val));
|
|
9450
|
+
this.value = next;
|
|
9451
|
+
this.emitValue(next);
|
|
9452
|
+
}
|
|
9453
|
+
connectedCallback() {
|
|
9454
|
+
document.addEventListener('click', this.onDocumentClick, true);
|
|
9455
|
+
}
|
|
9456
|
+
disconnectedCallback() {
|
|
9457
|
+
document.removeEventListener('click', this.onDocumentClick, true);
|
|
9458
|
+
clearTimeout(this.debounceTimer);
|
|
9459
|
+
}
|
|
9460
|
+
render() {
|
|
9461
|
+
const selected = this.selectedValues;
|
|
9462
|
+
const hasSelection = selected.length > 0;
|
|
9463
|
+
const inputValue = this.multiple ? this.query : (this.open ? this.query : this.selectedLabel);
|
|
9464
|
+
const placeholder = this.multiple
|
|
9465
|
+
? (hasSelection ? '' : this.placeholder)
|
|
9466
|
+
: (hasSelection && !this.open ? this.selectedLabel : this.placeholder);
|
|
9467
|
+
return (h("div", { key: 'f5224332aa395be2a9dd8a1312dcd1b631ad2129', class: "eds-ss" }, (this.label || this.hint) && (h("div", { key: 'e28da19abdedb4107a7b7be2a59e6444780f8251', class: "eds-ss__labelrow" }, this.label && (h("eds-input-label", { key: '81933dbc2d370b8ddbbf8f4286c3420e4f140ca7', name: `${this.name}-input`, label: this.label, required: this.required, disabled: this.disabled })), this.hint && (h("p", { key: '1ff5b7a62cc20bb2ce710ca2e06c728d94aef895', id: `${this.name}-hint`, class: "eds-ss__hint" }, this.hint)))), h("div", { key: '84fbdccc6326707ac854e06d7209dd149d9c26a7', class: "eds-ss__control relative" }, h("div", { key: 'ae99c3d9c706fa6619459d8d6c9baa3df610169e', class: { 'eds-ss__box': true, 'is-error': this.error || !!this.fetchError, 'is-disabled': this.disabled } }, this.multiple &&
|
|
9468
|
+
selected.map((v) => (h("span", { class: "eds-ss__chip", key: v }, h("span", { class: "eds-ss__chip-label" }, this.labelFor(v)), !this.disabled && (h("button", { type: "button", class: "eds-ss__chip-x", "aria-label": `Remove ${this.labelFor(v)}`, onMouseDown: (e) => { e.preventDefault(); this.removeValue(v, e); } }, "\u00D7"))))), h("input", { key: '18dcd5787c7636c09be7285fb85b77f5cae334c8', id: `${this.name}-input`, class: "eds-ss__input", type: "text", role: "combobox", autocomplete: "off", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": this.listboxId, "aria-autocomplete": "list", placeholder: placeholder, value: inputValue, disabled: this.disabled, required: this.required && !hasSelection, onFocus: () => this.openMenu(), onInput: this.onInput, onKeyDown: this.onKeyDown })), !this.multiple && hasSelection && !this.disabled && (h("button", { key: 'c927fa49fb58b7abec13f6d436f1d1452f9644c5', type: "button", class: "eds-ss__clear", "aria-label": "Clear selection", onClick: this.clear }, "\u00D7")), h("span", { key: 'bff4bf41fb388f849ef9c0928f4aa88e065d718d', class: "eds-ss__chevron", "aria-hidden": "true" }, h("eds-icon-wrapper", { key: '7871955d6fc5626914995d51c1b4b3511b60febe', name: "chevron-right", size: 20 }))), this.open && (h("ul", { key: 'e529fe82576be45a0e99d4a020aa4f721b71686b', class: "eds-ss__list", id: this.listboxId, role: "listbox" }, this.loading && h("li", { key: 'fe8d73dfa0d6a5cf7e9bea4220511a22489884f8', class: "eds-ss__status" }, "Searching\u2026"), !this.loading && this.fetchError && h("li", { key: 'b708b1de4eee8e45287fd23f0bf63327032616d6', class: "eds-ss__status is-error" }, this.fetchError), !this.loading && !this.fetchError && this.visibleItems.length === 0 && (h("li", { key: '9400ac7a022f38935f05df3705e2a65acb9d4a04', class: "eds-ss__status" }, "No matches")), !this.loading &&
|
|
9469
|
+
!this.fetchError &&
|
|
9470
|
+
this.visibleItems.map((opt, i) => (h("li", { key: opt.value, class: { 'eds-ss__option': true, 'is-active': i === this.activeIndex, 'is-selected': selected.includes(String(opt.value)) }, role: "option", "aria-selected": selected.includes(String(opt.value)) ? 'true' : 'false', onMouseEnter: () => (this.activeIndex = i), onMouseDown: (e) => { e.preventDefault(); this.select(opt); } }, opt.label))), !this.loading && !this.fetchError && this.hiddenCount > 0 && (h("li", { key: '8e82d65e9da3755ad10ffaf0fc4a45f5bc365a48', class: "eds-ss__more" }, "+", this.hiddenCount, " more \u2014 keep typing to narrow")))), h("eds-input-footer", { key: '0564f006a874a3556118ce99441cbfabc230ac57', name: this.name, message: this.message, error: this.error, "error-message": this.errorMessage })));
|
|
9471
|
+
}
|
|
9472
|
+
get host() { return getElement(this); }
|
|
9473
|
+
static get watchers() { return {
|
|
9474
|
+
"options": ["onOptionsChange"],
|
|
9475
|
+
"value": ["onValueChange"]
|
|
9476
|
+
}; }
|
|
9477
|
+
};
|
|
9478
|
+
EdsSearchSelect.style = EdsSearchSelectStyle0;
|
|
9479
|
+
|
|
8864
9480
|
const edsSidebarCss = ":host{display:block;width:100%;height:100%;overflow-y:auto;overflow-x:hidden;transition:width 0.3s ease}:host(.collapsed){width:4rem}:host::-webkit-scrollbar{width:8px}:host::-webkit-scrollbar-track{background:transparent}:host::-webkit-scrollbar-thumb{background:rgba(0, 0, 0, 0.2);border-radius:4px}:host::-webkit-scrollbar-thumb:hover{background:rgba(0, 0, 0, 0.3)}.sidebar-nav{padding:0.5rem 0}.sidebar-header{display:flex;justify-content:flex-end;padding:0.5rem 0.75rem;margin-bottom:0.5rem}:host(.collapsed) .sidebar-header{justify-content:center;padding:0.5rem}.collapse-toggle{display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;background:none;border:none;cursor:pointer;padding:0;border-radius:0.375rem;transition:background-color 0.15s ease;color:inherit}.collapse-toggle:hover{background-color:rgba(0, 0, 0, 0.08)}.collapse-toggle:focus-visible{outline:2px solid var(--eds-focus-color, #0066cc);outline-offset:2px}.sidebar-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:0.125rem}.sidebar-item{display:flex;flex-direction:column}.sidebar-item-content{display:flex;align-items:center;gap:0.5rem;padding:0.5rem 0.75rem;cursor:pointer;user-select:none;word-break:break-word;transition:background-color 0.15s ease;border-radius:0.375rem;margin:0 0.5rem;position:relative}:host(.collapsed) .sidebar-item-content{justify-content:center;padding:0.75rem;margin:0 0.5rem}.sidebar-item-content:hover{background-color:rgba(0, 0, 0, 0.04)}.sidebar-item-content:focus-visible{outline:2px solid var(--eds-focus-color, #0066cc);outline-offset:-2px;z-index:1}.sidebar-icon{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25rem;height:1.25rem}.sidebar-content-wrapper{display:flex;align-items:center;gap:0.5rem;flex:1;min-width:0}.sidebar-toggle{display:flex;align-items:center;justify-content:center;flex-shrink:0;width:1.25rem;height:1.25rem;padding:0;margin:-0.125rem 0;pointer-events:none}.sidebar-link-wrapper{flex:1;min-width:0;pointer-events:none}.sidebar-link{font-weight:400;pointer-events:none}.sidebar-children{list-style:none;margin:0.25rem 0 0 0;padding:0;display:flex;flex-direction:column;gap:0.125rem;overflow:hidden;animation:slideDown 0.2s ease}@keyframes slideDown{from{opacity:0;transform:translateY(-0.25rem)}to{opacity:1;transform:translateY(0)}}.sidebar-item.level-0 .sidebar-item-content{padding-left:0.75rem}:host(.collapsed) .sidebar-item.level-0 .sidebar-item-content{padding-left:0.75rem}.sidebar-item.level-1 .sidebar-item-content{padding-left:2rem}.sidebar-item.level-2 .sidebar-item-content{padding-left:3.25rem}.sidebar-item.level-3 .sidebar-item-content{padding-left:4.5rem}.sidebar-item.level-4 .sidebar-item-content{padding-left:5.75rem}.sidebar-item.level-5 .sidebar-item-content{padding-left:7rem}:host(.theme-default) .sidebar-item-content{border-radius:0.375rem;margin:0 0.5rem;padding:0.5rem 0.75rem}:host(.theme-default.collapsed) .sidebar-item-content{margin:0 0.5rem;border-radius:0.375rem}:host(.theme-default) .sidebar-item-content:hover{background-color:rgba(0, 0, 0, 0.04)}:host(.theme-default) .sidebar-item.active>.sidebar-item-content{background-color:transparent}:host(.theme-default) .sidebar-item.active>.sidebar-item-content .sidebar-link{font-weight:600}:host(.theme-default) .sidebar-item.level-0 .sidebar-item-content{padding-left:0.75rem}:host(.theme-default) .sidebar-item.level-1 .sidebar-item-content{padding-left:2rem}:host(.theme-default) .sidebar-item.level-2 .sidebar-item-content{padding-left:3.25rem}:host(.theme-default) .sidebar-item.level-3 .sidebar-item-content{padding-left:4.5rem}:host(.theme-default) .sidebar-item.level-4 .sidebar-item-content{padding-left:5.75rem}:host(.theme-minimal) .sidebar-item-content{border-radius:0;margin:0;padding-left:1rem;padding-right:1rem}:host(.theme-minimal.collapsed) .sidebar-item-content{margin:0 0.25rem;border-radius:0.375rem}:host(.theme-minimal) .sidebar-item-content:hover{background-color:rgba(0, 255, 157, 0.05);color:var(--brand-black, #07140D)}:host(.theme-minimal) .sidebar-item.active>.sidebar-item-content{background-color:rgba(0, 255, 157, 0.1);border-left:3px solid var(--brand-green-dark, #00C87B);padding-left:calc(1rem - 3px);color:var(--brand-black, #07140D);font-weight:500}:host(.theme-minimal.collapsed) .sidebar-item.active>.sidebar-item-content{border-left:none;border-radius:0.375rem;padding-left:0.75rem;background-color:rgba(0, 255, 157, 0.1);color:var(--brand-black, #07140D)}:host(.theme-minimal) .sidebar-item.level-1.active>.sidebar-item-content{padding-left:calc(2rem - 3px)}:host(.theme-minimal) .sidebar-item.level-2.active>.sidebar-item-content{padding-left:calc(3.25rem - 3px)}:host(.theme-minimal) .sidebar-item.level-3.active>.sidebar-item-content{padding-left:calc(4.5rem - 3px)}:host(.theme-minimal) .sidebar-item.level-4.active>.sidebar-item-content{padding-left:calc(5.75rem - 3px)}:host(.theme-minimal) .sidebar-item.level-0 .sidebar-item-content{padding-left:1rem}:host(.theme-minimal) .sidebar-item.level-1 .sidebar-item-content{padding-left:2rem}:host(.theme-minimal) .sidebar-item.level-2 .sidebar-item-content{padding-left:3.25rem}:host(.theme-minimal) .sidebar-item.level-3 .sidebar-item-content{padding-left:4.5rem}:host(.theme-minimal) .sidebar-item.level-4 .sidebar-item-content{padding-left:5.75rem}:host(.theme-minimal) .sidebar-children{position:relative}:host(.theme-ebrains) .sidebar-item-content{padding:0.5rem 1rem;border-radius:0.5rem;margin:0 0.5rem}:host(.theme-ebrains.collapsed) .sidebar-item-content{padding:0.75rem}:host(.theme-ebrains) .sidebar-item-content:hover{background-color:rgba(0, 0, 0, 0.05)}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content{background-color:var(--brand-green-dark, #22c55e);color:white}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content .sidebar-link{--eds-link-color:white;--eds-link-hover-color:white}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content .sidebar-toggle{color:white}:host(.theme-ebrains) .sidebar-item.active>.sidebar-item-content .sidebar-icon{color:white}:host(.theme-ebrains) .sidebar-item.level-0 .sidebar-item-content{padding-left:1rem}:host(.theme-ebrains) .sidebar-item.level-1 .sidebar-item-content{padding-left:2.25rem}:host(.theme-ebrains) .sidebar-item.level-2 .sidebar-item-content{padding-left:3.5rem}:host(.theme-ebrains) .sidebar-item.level-3 .sidebar-item-content{padding-left:4.75rem}:host(.theme-ebrains) .sidebar-item.level-4 .sidebar-item-content{padding-left:6rem}@media (prefers-color-scheme: dark){.collapse-toggle:hover{background-color:rgba(255, 255, 255, 0.08)}:host(.theme-default) .sidebar-item-content:hover{background-color:rgba(255, 255, 255, 0.05)}:host(.theme-default) .sidebar-item.active>.sidebar-item-content{background-color:rgba(0, 102, 204, 0.15)}:host(.theme-minimal) .sidebar-item-content:hover{background-color:rgba(255, 255, 255, 0.06)}:host::-webkit-scrollbar-thumb{background:rgba(255, 255, 255, 0.2)}:host::-webkit-scrollbar-thumb:hover{background:rgba(255, 255, 255, 0.3)}}.sidebar-toggle eds-icon-wrapper,.sidebar-icon eds-icon-wrapper,.collapse-toggle eds-icon-wrapper{transition:transform 0.15s ease;display:flex;align-items:center;justify-content:center}.sidebar-item-content:focus-visible .sidebar-link{text-decoration:underline}.sidebar-item.active>.sidebar-item-content .sidebar-link{font-weight:500}:host(.collapsed) .sidebar-item-content::after{content:attr(title);position:absolute;left:100%;top:50%;transform:translateY(-50%);margin-left:0.5rem;padding:0.5rem 0.75rem;background:rgba(0, 0, 0, 0.9);color:white;border-radius:0.375rem;white-space:nowrap;font-size:0.875rem;opacity:0;pointer-events:none;transition:opacity 0.2s ease;z-index:1000}:host(.collapsed) .sidebar-item-content:hover::after{opacity:1;transition-delay:0.3s}.-ml-4{margin-left:-0.25rem}.mt-2{margin-top:0.125rem}";
|
|
8865
9481
|
const EdsSidebarStyle0 = edsSidebarCss;
|
|
8866
9482
|
|
|
@@ -9012,10 +9628,10 @@ const EdsSidebar = class {
|
|
|
9012
9628
|
} }, hasChildren && (h("span", { class: "sidebar-toggle -ml-4", "aria-hidden": "true" }, h("eds-icon-wrapper", { name: isOpen ? 'chevron-down' : 'chevron-right' }))), h("span", { class: "sidebar-link-wrapper" }, h("eds-link", { label: item.title, url: item.url || '#', intent: isActive ? 'strong' : 'weak', size: "small", "aria-label": item.title, "extra-class": "sidebar-link", tabindex: "-1" }))), hasChildren && isOpen && (h("ul", { id: childrenId, class: "sidebar-children" }, item.children.map((child) => this.renderItem(child, level + 1))))));
|
|
9013
9629
|
}
|
|
9014
9630
|
render() {
|
|
9015
|
-
return (h(Host, { key: '
|
|
9631
|
+
return (h(Host, { key: 'f5221c19e8148ca62a76fb470a4aa6786c3e41b5', class: {
|
|
9016
9632
|
'eds-sidebar': true,
|
|
9017
9633
|
[`theme-${this.theme}`]: true
|
|
9018
|
-
} }, h("nav", { key: '
|
|
9634
|
+
} }, h("nav", { key: '0a975a10a3892f6eabaf2a1c2be21963f0e76549', class: "sidebar-nav", "aria-label": "Sidebar" }, h("ul", { key: '498436fa1f4ec7ff2f3feea843fe58b415d20a3f', class: "sidebar-list" }, this.parsedItems.map((item) => this.renderItem(item, 0))))));
|
|
9019
9635
|
}
|
|
9020
9636
|
get el() { return getElement(this); }
|
|
9021
9637
|
static get watchers() { return {
|
|
@@ -9081,7 +9697,7 @@ const EdsSocialNetworks = class {
|
|
|
9081
9697
|
const isInverse = this.variant === 'inverse';
|
|
9082
9698
|
const textClass = isInverse ? 'text-inverse' : '';
|
|
9083
9699
|
const linkIntent = isInverse ? 'inverse' : 'strong';
|
|
9084
|
-
return (h("nav", { key: '
|
|
9700
|
+
return (h("nav", { key: '924bdf5a32b65cd0968ad92461cb8203f3305fce', "aria-label": "Social media" }, h("p", { key: 'f406d71ed2d7ff9048e5db05f5ad62566081aa45', class: `f-ui-02 ${textClass}` }, this.heading), h("ul", { key: '40d000bc78780d7ec3c0c9bf2e10ec0a26f3b72e', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index) => (h("li", { key: index }, h("eds-link", { external: true, "aria-label": `EBRAINS on ${network.label}`, url: network.url, icon: network.icon, intent: linkIntent })))))));
|
|
9085
9701
|
}
|
|
9086
9702
|
};
|
|
9087
9703
|
EdsSocialNetworks.style = EdsSocialNetworksStyle0;
|
|
@@ -9162,7 +9778,7 @@ const EdsSpinner = class {
|
|
|
9162
9778
|
alignItems: 'center',
|
|
9163
9779
|
justifyContent: 'center'
|
|
9164
9780
|
};
|
|
9165
|
-
return (h(Host, { key: '
|
|
9781
|
+
return (h(Host, { key: 'c09fa07856848a03aab44bbb56ecdd66a986bb40' }, h("div", { key: '544c653e9e0457d2063eaefc5ff1fe88de89f14e', class: "spinner-overlay", style: overlayStyle }, h("span", { key: 'e389aa572863a265c9aa68d587ad744f1c8db0a7', class: "spinner", style: spinnerStyle }), this.message && h("p", { key: '5e554fe1b870e673c5b3da3ec2a227e92dd9863d', class: "f-ui-01" }, this.message))));
|
|
9166
9782
|
}
|
|
9167
9783
|
};
|
|
9168
9784
|
EdsSpinner.style = EdsSpinnerStyle0;
|
|
@@ -9611,7 +10227,7 @@ const EdsStepsV2 = class {
|
|
|
9611
10227
|
const steps = this.parsedSteps;
|
|
9612
10228
|
const marginClass = this.orientation === 'horizontal' ? 'mt-64' : 'mt-32';
|
|
9613
10229
|
const themeClass = this.theme === 'brand' ? 'theme-brand' : 'theme-default';
|
|
9614
|
-
return (h("div", { key: '
|
|
10230
|
+
return (h("div", { key: 'e1d78d18506adb662bbcc100f6f886e33c21a996', class: this.articleClasses() }, this.imageSrc ? (h("div", { class: "w-full mb-12 rounded-t-lg overflow-hidden border-2" }, h("eds-img", { src: this.imageSrc, width: this.imageWidth, "with-bg": "true", "lazy-load": "true", alt: "Step illustration" }))) : (this.message && (h("div", { class: `w-full ${this.theme === 'brand' ? 'bg-strongest' : 'bg-darker'} rounded-t-lg border-2` }, h("div", { class: "p-24" }, h("span", { class: `${this.theme === 'brand' ? 'text-accent' : 'text-inverse'} f-heading-04` }, this.message))))), h("div", { key: '5b69e2c641d96025b34377fc647679f94d0e4e44', class: "mt-16 pb-20 px-8" }, this.type === 'linear' && this.orientation === 'horizontal' ? (h("div", { class: `steps--horizontal ${themeClass}`, style: { '--step-count': steps.length.toString() } }, h("div", { class: "horizontal-indicators" }, steps.map((step, index) => this.renderHorizontalIndicator(step, index))), steps.map((step, index) => {
|
|
9615
10231
|
const isLast = index === steps.length - 1;
|
|
9616
10232
|
if (this.activeStep !== index) {
|
|
9617
10233
|
return null;
|
|
@@ -9716,7 +10332,7 @@ const EdsSwitch = class {
|
|
|
9716
10332
|
};
|
|
9717
10333
|
EdsSwitch.style = EdsSwitchStyle0;
|
|
9718
10334
|
|
|
9719
|
-
const edsTableCss = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}
|
|
10335
|
+
const edsTableCss = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}.brand-table-wrapper{margin-top:2rem;width:100%}.brand-table{width:100% !important;border-collapse:separate !important;border-spacing:0 !important;display:table !important;table-layout:fixed !important}.brand-thead{background:var(--grey-light)}.brand-header-row{border:none !important}.brand-header-row th{padding:1rem 1.5rem !important;text-align:center !important;font-weight:600 !important;font-size:0.9rem !important;text-transform:uppercase;letter-spacing:0.05em;color:var(--grey-dark) !important;border:none !important;overflow-wrap:break-word !important;word-wrap:break-word !important}.brand-header-row th:first-child{border-radius:0.5rem 0 0 0;padding-left:2rem !important}.brand-header-row th:last-child{border-radius:0 0.5rem 0 0;padding-right:2rem !important}.brand-row{border-bottom:1px solid var(--grey-light) !important;transition:all 0.3s ease;position:relative;background:transparent !important}.brand-row.has-actions{cursor:pointer}.brand-row:hover{background:rgba(0, 255, 157, 0.05) !important}.brand-row td{padding:1.5rem 1.5rem !important;border:none !important;vertical-align:middle;position:relative;z-index:1;overflow-wrap:break-word !important;word-wrap:break-word !important}.brand-row td:first-child{padding-left:2rem !important}.brand-row td:last-child{padding-right:2rem !important}.brand-row .actions-cell{text-align:right !important}.brand-table tr.brand-row{border-left:none;border-right:none;border-top:none}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.p-4{padding:0.25rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-8{padding-left:0.5rem;padding-right:0.5rem}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}.controls-container{display:flex;width:100%}.view-toggle-wrapper{flex-shrink:0}.search-wrapper{min-width:0}.card-grid{display:grid;grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));gap:1.5rem;margin-top:1.5rem}.data-card{background:var(--white);border:1px solid var(--grey-light);border-radius:0.75rem;padding:1.5rem;transition:all 0.3s ease;display:flex;flex-direction:column;gap:1rem}.data-card:hover{border-color:var(--brand-green);box-shadow:0 4px 12px rgba(0, 255, 157, 0.1);transform:translateY(-2px)}.card-content{display:flex;flex-direction:column;gap:0.75rem;flex:1}.card-field{display:flex;flex-direction:column;gap:0.25rem}.card-label{font-family:var(--f-ui-03-fontFamily);font-size:var(--f-ui-03-fontSize);font-weight:var(--f-ui-03-fontWeight);line-height:var(--f-ui-03-lineHeight);text-transform:uppercase;letter-spacing:0.05em;color:var(--grey-dark)}.card-value{font-family:var(--f-ui-02-fontFamily);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);color:var(--brand-black);word-wrap:break-word}.card-field:first-child .card-value{font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight)}.card-actions{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;gap:0.5rem;padding-top:0.75rem;border-top:1px solid var(--grey-light)}@media (min-width: 640px){.card-grid{grid-template-columns:repeat(auto-fill, minmax(320px, 1fr))}}@media (min-width: 1024px){.card-grid{grid-template-columns:repeat(auto-fill, minmax(350px, 1fr));gap:2rem}}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.items-start{align-items:flex-start}.items-center{align-items:center}.gap-16{gap:1rem}.mb-16{margin-bottom:1rem}.w-full{width:100%}.w-auto{width:auto}@media (min-width: 750px){.flex-md-row{flex-direction:row}.items-md-center{align-items:center}.w-md-auto{width:auto}.w-md-400{width:400px}}";
|
|
9720
10336
|
const EdsTableStyle0 = edsTableCss;
|
|
9721
10337
|
|
|
9722
10338
|
const EdsTable = class {
|
|
@@ -9788,11 +10404,10 @@ const EdsTable = class {
|
|
|
9788
10404
|
this.paginationEnabled = true;
|
|
9789
10405
|
this.searchEnabled = false;
|
|
9790
10406
|
this.hostWidth = undefined;
|
|
9791
|
-
this.columnSize = 'default';
|
|
9792
10407
|
this.actions = [];
|
|
9793
10408
|
this.actionTemplate = undefined;
|
|
9794
10409
|
this.sortingEnabled = false;
|
|
9795
|
-
this.theme = '
|
|
10410
|
+
this.theme = 'brand';
|
|
9796
10411
|
this.view = 'table';
|
|
9797
10412
|
this.showViewToggle = false;
|
|
9798
10413
|
this.parsedActions = [];
|
|
@@ -9824,6 +10439,8 @@ const EdsTable = class {
|
|
|
9824
10439
|
}
|
|
9825
10440
|
}
|
|
9826
10441
|
componentWillLoad() {
|
|
10442
|
+
// 'default' / 'color' themes are disabled — always render the brand theme.
|
|
10443
|
+
this.theme = 'brand';
|
|
9827
10444
|
this.parseConfig();
|
|
9828
10445
|
this.handleActionsChange();
|
|
9829
10446
|
this.parseData();
|
|
@@ -9959,19 +10576,6 @@ const EdsTable = class {
|
|
|
9959
10576
|
this.columns.push('actions');
|
|
9960
10577
|
}
|
|
9961
10578
|
}
|
|
9962
|
-
getVisibleColumnsCount() {
|
|
9963
|
-
return this.columns.filter((column) => { var _a; return !((_a = this.parsedConfig[column]) === null || _a === void 0 ? void 0 : _a.hidden); }).length;
|
|
9964
|
-
}
|
|
9965
|
-
divisionFactor() {
|
|
9966
|
-
let divisionFactor = 1;
|
|
9967
|
-
if (this.columnSize === 'medium') {
|
|
9968
|
-
divisionFactor = 2;
|
|
9969
|
-
}
|
|
9970
|
-
else if (this.columnSize === 'large') {
|
|
9971
|
-
divisionFactor = 4;
|
|
9972
|
-
}
|
|
9973
|
-
return divisionFactor;
|
|
9974
|
-
}
|
|
9975
10579
|
capitalize(str) {
|
|
9976
10580
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
9977
10581
|
}
|
|
@@ -10006,24 +10610,23 @@ const EdsTable = class {
|
|
|
10006
10610
|
const dataColumns = this.columns.filter((col) => { var _a; return col !== 'actions' && !((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden); });
|
|
10007
10611
|
return (h("div", { class: "card-grid" }, rows.map((row) => (h("div", { class: "data-card" }, h("div", { class: "card-content" }, dataColumns.map((col) => (h("div", { class: "card-field" }, h("span", { class: "card-label" }, this.capitalize(col)), h("span", { class: "card-value" }, this.renderCell(row[col], col)))))), this.parsedActions.length > 0 && (h("div", { class: "card-actions" }, this.parsedActions.map((act) => (h("span", null, this.renderSingleActionCell(act.name, row)))))))))));
|
|
10008
10612
|
}
|
|
10009
|
-
renderTableView(paginatedRows
|
|
10010
|
-
const columnWidth = visibleColumnsCount > 0 ? Math.floor((currentContainerWidth / visibleColumnsCount) * this.divisionFactor()) : 100;
|
|
10613
|
+
renderTableView(paginatedRows) {
|
|
10011
10614
|
return (h("div", { class: `mt-20 ${this.theme === 'brand' ? 'brand-table-wrapper' : ''}` }, h("table", { class: `${this.theme === 'brand' ? '' : 'block overflow-x-auto'} mt-6 p-0 ${this.theme === 'brand' ? 'brand-table' : ''}` }, h("thead", { class: this.theme === 'brand' ? 'brand-thead' : '' }, h("tr", { class: `m-0 p-0 border border-softer table-row-${this.theme} ${this.theme === 'brand' ? 'brand-header-row' : ''}` }, this.columns
|
|
10012
10615
|
.filter((col) => { var _a; return col === 'actions' || !((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden); })
|
|
10013
10616
|
.map((col) => {
|
|
10014
10617
|
if (col === 'actions') {
|
|
10015
|
-
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words"
|
|
10618
|
+
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words" }));
|
|
10016
10619
|
}
|
|
10017
|
-
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words"
|
|
10620
|
+
return (h("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words" }, h("div", { style: { display: 'flex', alignItems: 'center', justifyContent: 'center', gap: '0.25rem' } }, h("span", null, this.capitalize(col)), this.sortingEnabled && (h("eds-icon-wrapper", { name: this.sortColumn === col
|
|
10018
10621
|
? this.sortDirection === 'asc'
|
|
10019
10622
|
? 'chevron-up'
|
|
10020
10623
|
: 'chevron-down'
|
|
10021
10624
|
: 'chevron-down', "aria-label": `Sort by ${col}`, onClick: () => this.handleSort(col), style: { cursor: 'pointer' } })))));
|
|
10022
|
-
}))), h("tbody", null, paginatedRows.map((row) => (h("tr", { class: `m-0 p-0 border border-softer table-row-${this.theme} ${this.theme === 'brand' ? 'brand-row' : ''}` }, this.columns
|
|
10625
|
+
}))), h("tbody", null, paginatedRows.map((row) => (h("tr", { class: `m-0 p-0 border border-softer table-row-${this.theme} ${this.theme === 'brand' ? 'brand-row' : ''} ${this.parsedActions.length > 0 ? 'has-actions' : ''}` }, this.columns
|
|
10023
10626
|
.filter((col) => { var _a; return col === 'actions' || !((_a = this.parsedConfig[col]) === null || _a === void 0 ? void 0 : _a.hidden); })
|
|
10024
10627
|
.map((col) => {
|
|
10025
10628
|
if (col === 'actions') {
|
|
10026
|
-
return (h("td", { class: "text-center border border-softer m-0 f-ui-01 break-words actions-cell"
|
|
10629
|
+
return (h("td", { class: "text-center border border-softer m-0 f-ui-01 break-words actions-cell" }, h("div", { role: "toolbar", "aria-label": "Row actions", onKeyDown: this.onActionKeyDown, style: {
|
|
10027
10630
|
display: 'flex',
|
|
10028
10631
|
gap: '0.5rem',
|
|
10029
10632
|
justifyContent: 'center',
|
|
@@ -10031,18 +10634,16 @@ const EdsTable = class {
|
|
|
10031
10634
|
} }, this.parsedActions.map((act) => (h("span", { style: { whiteSpace: 'nowrap' } }, this.renderSingleActionCell(act.name, row)))))));
|
|
10032
10635
|
}
|
|
10033
10636
|
// Regular data cell
|
|
10034
|
-
return (h("td", { class: "text-center border border-softer m-0 py-8 f-ui-02 break-words"
|
|
10637
|
+
return (h("td", { class: "text-center border border-softer m-0 py-8 f-ui-02 break-words" }, this.renderCell(row[col], col)));
|
|
10035
10638
|
}))))))));
|
|
10036
10639
|
}
|
|
10037
10640
|
render() {
|
|
10038
|
-
const currentContainerWidth = this.hostWidth && this.hostWidth.trim() !== '' ? Number(this.hostWidth) : this.containerWidth || 400;
|
|
10039
|
-
const visibleColumnsCount = this.getVisibleColumnsCount();
|
|
10040
10641
|
const paginatedRows = this.getPaginatedRows();
|
|
10041
10642
|
const lastPage = Math.ceil(this.totalRows / this.rowsPerPage);
|
|
10042
10643
|
const showControls = this.showViewToggle || this.searchEnabled;
|
|
10043
|
-
return (h("div", { key: '
|
|
10644
|
+
return (h("div", { key: '1e8a2f5f19df240ee3a57951641b60b947342fad' }, showControls && (h("div", { key: '778fe091226330448bba089189e9dd6a6aa977a9', class: "controls-container flex-col flex-md-row items-start items-md-center justify-between gap-16 mb-16" }, this.showViewToggle && (h("div", { key: '7ef287464bb2fba846be5341f4bb0e71d982be0e', class: "view-toggle-wrapper" }, h("eds-switch", { key: '2d3a494a5b354a14c8e882a153633bd5e85a40ab', variant: "segmented", labelOff: "Table View", labelOn: "Card View", checked: this.view === 'card', onUiswitch: this.handleViewChange }))), this.searchEnabled && (h("div", { key: 'dfcf6d0bdc23cb10481121881a7656b02a0599c1', class: `search-wrapper w-full ${this.showViewToggle ? 'w-md-400' : ''}` }, h("eds-input-field", { key: 1, icon: "search", name: "search", "aria-label": "Search", type: "text", placeholder: "Search...", onInput: (event) => this.handleSearch(event) }))))), this.view === 'card'
|
|
10044
10645
|
? this.renderCardView(paginatedRows)
|
|
10045
|
-
: this.renderTableView(paginatedRows
|
|
10646
|
+
: this.renderTableView(paginatedRows), this.shouldEnablePagination() && (h("div", { key: '3f7faafdd6147855cb8812ff6303c335c7fd1f35', class: "mt-20" }, h("eds-pagination", { key: '17705ba01a8ca8cc79bacfce34e55f11ce53d70c', currentPage: this.currentPage, lastPage: lastPage, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })))));
|
|
10046
10647
|
}
|
|
10047
10648
|
get hostEl() { return getElement(this); }
|
|
10048
10649
|
static get watchers() { return {
|
|
@@ -10053,7 +10654,7 @@ const EdsTable = class {
|
|
|
10053
10654
|
};
|
|
10054
10655
|
EdsTable.style = EdsTableStyle0;
|
|
10055
10656
|
|
|
10056
|
-
const edsTabsCss = ":host{display:block}.tabs-container{display:flex;gap:0.25rem;padding:0.25rem;border-radius:10px;width:fit-content;margin-bottom:3rem}.tabs-container-default{background-color:var(--brand-black, #07140D);border:1px solid rgba(255, 255, 255, 0.06)}.tabs-container-inverse{background:rgba(0, 0, 0, 0.02);border:1px solid rgba(0, 0, 0, 0.06)}.tabs-nav{display:flex;gap:0.25rem}.tab{padding:0.625rem 1.25rem;border-radius:8px;font-size:1.125rem;cursor:pointer;transition:
|
|
10657
|
+
const edsTabsCss = ":host{display:block}.tabs-container{display:flex;gap:0.25rem;padding:0.25rem;border-radius:10px;width:fit-content;margin-bottom:3rem}.tabs-container-default{background-color:var(--brand-black, #07140D);border:1px solid rgba(255, 255, 255, 0.06)}.tabs-container-inverse{background:rgba(0, 0, 0, 0.02);border:1px solid rgba(0, 0, 0, 0.06)}.tabs-nav{display:flex;gap:0.25rem}.tab{padding:0.625rem 1.25rem;border-radius:8px;font-size:1.125rem;cursor:pointer;transition:color 0.15s ease;border:none;background:transparent;font-family:'IBM Plex Sans', sans-serif;white-space:nowrap;outline:none}.tab:focus-visible{outline:3px solid var(--brand-green);outline-offset:2px}.tab-default{color:var(--grey-700)}.tab-default:hover{color:var(--white)}.tab-default.tab-active{background:rgba(0, 255, 157, 0.1);color:var(--brand-green)}.tab-inverse{color:var(--grey-700)}.tab-inverse:hover{color:var(--brand-black)}.tab-inverse.tab-active{background:rgba(0, 200, 123, 0.1);color:var(--brand-green-dark)}.tab-panels{margin-top:2rem}.tab-panels>div{outline:none}.tab-panels>div:focus-visible{outline:3px solid var(--brand-green);outline-offset:2px;border-radius:4px}@media (max-width: 768px){.tabs-container{width:100%;overflow-x:auto}.tabs-nav{width:100%;min-width:fit-content}}";
|
|
10057
10658
|
const EdsTabsStyle0 = edsTabsCss;
|
|
10058
10659
|
|
|
10059
10660
|
const EdsTabs = class {
|
|
@@ -10080,14 +10681,28 @@ const EdsTabs = class {
|
|
|
10080
10681
|
}
|
|
10081
10682
|
/**
|
|
10082
10683
|
* Parses the `tabs` prop into an array of tab objects.
|
|
10684
|
+
*
|
|
10685
|
+
* Note: we deliberately do NOT clear `tabRefs` here. Consumers
|
|
10686
|
+
* often re-pass `tabs` with an updated `active` flag every time
|
|
10687
|
+
* the user switches tabs (Vue/React re-render on event). Wiping
|
|
10688
|
+
* the refs leaves a window in which a queued focus() call sees
|
|
10689
|
+
* `tabRefs[index] === undefined` and silently no-ops — focus
|
|
10690
|
+
* gets stuck on the previous tab even though `aria-selected` and
|
|
10691
|
+
* the background already moved. Stencil re-binds refs on render,
|
|
10692
|
+
* so the array stays in sync without us emptying it; we only
|
|
10693
|
+
* truncate when the new list is shorter to drop stale entries.
|
|
10083
10694
|
*/
|
|
10084
10695
|
parseTabs() {
|
|
10085
10696
|
this.parsedTabs = parseData(this.tabs);
|
|
10086
|
-
this.tabRefs
|
|
10697
|
+
if (this.tabRefs.length > this.parsedTabs.length) {
|
|
10698
|
+
this.tabRefs.length = this.parsedTabs.length;
|
|
10699
|
+
}
|
|
10087
10700
|
}
|
|
10088
10701
|
componentDidUpdate() {
|
|
10089
|
-
|
|
10090
|
-
|
|
10702
|
+
// Same reasoning as parseTabs: only shrink, never re-allocate
|
|
10703
|
+
// to nulls — that would re-introduce the silent-no-op window.
|
|
10704
|
+
if (this.tabRefs.length > this.parsedTabs.length) {
|
|
10705
|
+
this.tabRefs.length = this.parsedTabs.length;
|
|
10091
10706
|
}
|
|
10092
10707
|
}
|
|
10093
10708
|
setActiveIndex() {
|
|
@@ -10098,6 +10713,7 @@ const EdsTabs = class {
|
|
|
10098
10713
|
}
|
|
10099
10714
|
}
|
|
10100
10715
|
handleTabClick(index, tabLabel, shouldFocus = true) {
|
|
10716
|
+
var _a;
|
|
10101
10717
|
if (index < 0 || index >= this.parsedTabs.length) {
|
|
10102
10718
|
return;
|
|
10103
10719
|
}
|
|
@@ -10112,11 +10728,34 @@ const EdsTabs = class {
|
|
|
10112
10728
|
action: 'click'
|
|
10113
10729
|
});
|
|
10114
10730
|
}
|
|
10115
|
-
if (shouldFocus
|
|
10116
|
-
|
|
10731
|
+
if (shouldFocus) {
|
|
10732
|
+
// Focus must move SYNCHRONOUSLY, while the keydown event
|
|
10733
|
+
// that triggered this call is still on the stack. Otherwise
|
|
10734
|
+
// the browser's `:focus-visible` heuristic doesn't flag the
|
|
10735
|
+
// focus move as keyboard-driven and the outline never paints
|
|
10736
|
+
// — accessibility regression (WCAG 2.4.7).
|
|
10737
|
+
//
|
|
10738
|
+
// We query by static id (`#tab-${index}`) instead of using
|
|
10739
|
+
// `tabRefs[index]` because consumer-driven prop changes can
|
|
10740
|
+
// briefly drop the cached ref. The button id is set in
|
|
10741
|
+
// `render()` and doesn't depend on active state, so it is
|
|
10742
|
+
// always findable.
|
|
10743
|
+
const findBtn = () => { var _a; return ((_a = this.el.shadowRoot) !== null && _a !== void 0 ? _a : this.el).querySelector(`#tab-${index}`); };
|
|
10744
|
+
(_a = findBtn()) === null || _a === void 0 ? void 0 : _a.focus();
|
|
10745
|
+
// Belt-and-suspenders: if a consumer reacts to the `tab`
|
|
10746
|
+
// event by re-rendering our buttons (rare, but possible
|
|
10747
|
+
// when the `tabs` prop is recomputed), the sync focus above
|
|
10748
|
+
// landed on a button that is now detached. Re-focus once
|
|
10749
|
+
// the next frame's DOM is in place. We only act if focus
|
|
10750
|
+
// genuinely isn't on the right element, to avoid a redundant
|
|
10751
|
+
// focus call that would reset selection/IME state.
|
|
10752
|
+
requestAnimationFrame(() => {
|
|
10117
10753
|
var _a;
|
|
10118
|
-
|
|
10119
|
-
|
|
10754
|
+
const after = findBtn();
|
|
10755
|
+
if (after && ((_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement) !== after) {
|
|
10756
|
+
after.focus();
|
|
10757
|
+
}
|
|
10758
|
+
});
|
|
10120
10759
|
}
|
|
10121
10760
|
}
|
|
10122
10761
|
onKeyDown(ev, idx) {
|
|
@@ -10150,7 +10789,7 @@ const EdsTabs = class {
|
|
|
10150
10789
|
'tabs-container',
|
|
10151
10790
|
`tabs-container-${this.variant}`
|
|
10152
10791
|
].join(' ');
|
|
10153
|
-
return (h("div", { key: '
|
|
10792
|
+
return (h("div", { key: '646f43031cde2e0ab84d2830fd9477841b3c757b', id: `${this.identifier}` }, h("div", { key: '2eb01c96640c6fc602777f227525066e5970489e', class: containerClasses }, h("nav", { key: 'b419fc7414574ea70b19433a3c5daa63b5ad6652', role: "tablist", class: "tabs-nav", "aria-label": this.navAriaLabel }, this.parsedTabs.map((tab, index) => {
|
|
10154
10793
|
const isActive = index === this.activeIndex;
|
|
10155
10794
|
const tabClasses = [
|
|
10156
10795
|
'tab',
|
|
@@ -10158,7 +10797,7 @@ const EdsTabs = class {
|
|
|
10158
10797
|
isActive ? 'tab-active' : ''
|
|
10159
10798
|
].filter(Boolean).join(' ');
|
|
10160
10799
|
return (h("button", { class: tabClasses, type: "button", role: "tab", "aria-selected": isActive ? 'true' : 'false', tabIndex: isActive ? 0 : -1, "aria-label": tab.ariaLabel || tab.label, "aria-controls": `panel-${index}`, id: `tab-${index}`, ref: (el) => this.setTabRef(el, index), onClick: () => this.handleTabClick(index, tab.label, true), onKeyDown: (e) => this.onKeyDown(e, index) }, tab.label || tab.ariaLabel));
|
|
10161
|
-
}))), h("div", { key: '
|
|
10800
|
+
}))), h("div", { key: '0ce244b3d2b2120d1bdf127144e9b42e2ad34e52', class: "tab-panels" }, this.parsedTabs.map((_, index) => (h("div", { role: "tabpanel", id: `panel-${index}`, "aria-labelledby": `tab-${index}`, hidden: index !== this.activeIndex, tabIndex: index === this.activeIndex ? 0 : -1 }, h("slot", { name: `panel-${index}` })))))));
|
|
10162
10801
|
}
|
|
10163
10802
|
get el() { return getElement(this); }
|
|
10164
10803
|
static get watchers() { return {
|
|
@@ -10202,7 +10841,7 @@ const EdsTag = class {
|
|
|
10202
10841
|
}
|
|
10203
10842
|
render() {
|
|
10204
10843
|
const classes = tagStyles({ intent: this.intent, size: this.size });
|
|
10205
|
-
return (h("span", { key: '
|
|
10844
|
+
return (h("span", { key: '20e1625ac01b0dc1f40356d02622e0649faa7fa7', class: classes }, h("span", { key: '313c3f18c0a5df285afe6a40ded9e68035d9648f', style: { position: 'relative', zIndex: '1' } }, this.label)));
|
|
10206
10845
|
}
|
|
10207
10846
|
};
|
|
10208
10847
|
EdsTag.style = EdsTagStyle0;
|
|
@@ -10300,7 +10939,7 @@ const EdsTooltip = class {
|
|
|
10300
10939
|
}
|
|
10301
10940
|
render() {
|
|
10302
10941
|
const positionClass = this.position === 'bottom' ? 'top-full mt-2' : 'bottom-full mb-2';
|
|
10303
|
-
return (h("div", { key: '
|
|
10942
|
+
return (h("div", { key: '8b4396894b1ec7cc1c2d928ffa5b3d7628f8c4ee', class: "relative w-full inline-block group" }, h("slot", { key: 'c2547098aacc584960f217edcafeb060ce742adc' }), h("div", { key: '1e6beac7e4294456f7a6130c4b0573cce3e4b548', class: `absolute ${positionClass}
|
|
10304
10943
|
rounded-xs bg-strongest text-inverse
|
|
10305
10944
|
f-ui-03-light pointer-events-none
|
|
10306
10945
|
z-10 px-4 opacity-0 transition-opacity duration-150 ease-in-out
|
|
@@ -10355,10 +10994,10 @@ const EdsUser = class {
|
|
|
10355
10994
|
render() {
|
|
10356
10995
|
const user = this.parsedUser;
|
|
10357
10996
|
//const iconName = this.expanded ? 'chevron-down' : 'chevron-right';
|
|
10358
|
-
return (h("div", { key: '
|
|
10997
|
+
return (h("div", { key: '1a9c56a4868b68ea95fdbb19a61435f5fa23b1b5', class: "block" }, h("div", { key: '242beb1cf3dc3e545be84003615eaed119be3e20', class: "flex items-center" }, h("eds-dropdown", { key: 'e75e0305a60936df4deb5b012fa139ca9a6b024f', ref: (el) => (this.dropdownEl = el), intent: this.intent, "aria-label": "User Menu", "dropdown-pos": "right", "dropdown-offset": "false", icon: "user", label: this.dropdownLabel, class: "text-default", onDropdown: this.handleDropdown }, h("div", { key: '09c74d1320e9637e50f7e0f8482e435db7a3319a', class: "min-w-[280px] p-8" }, h("div", { key: 'fa70ecc13e477cf2d2ead8e8dbab4fa3c3587149', class: "flex gap-x-16", "data-dropdown-no-close": true }, h("eds-avatar", { key: '69f059e2002237dd874ba62952c2b014ad94cb8a', "first-name": user.given_name, "last-name": user.family_name, initials: this.initials, color: "black" }), h("div", { key: 'c300f3bbe7f57d82913cef614637188babb82818', class: "max-w-full" }, user.name && h("p", { key: 'dc1a4a26f6c1da6c6e88e5aae484ca2ada2864e6', class: "f-ui-01 text-default w-full text-ellipsis" }, user.name), user.preferred_username && h("p", { key: '76f94c7b0394125d9a6b547722df5545c6b479fd', class: "f-ui-03-light text-light mt-4" }, user.preferred_username), user.email && h("p", { key: '8be3fe5ba1c302d5ef9bfb6d563070c07ed722ca', class: "f-ui-03-light text-light mt-4" }, user.email))), h("div", { key: '191e365fa893122e09c07aa36d1fde5d28b9b3de', class: "text-default flex w-full flex-col gap-y-8" }, h("slot", { key: '8d3fbd032340d5c32fd93ab89b034e7de25ef2e3' })))))));
|
|
10359
10998
|
}
|
|
10360
10999
|
get hostEl() { return getElement(this); }
|
|
10361
11000
|
};
|
|
10362
11001
|
EdsUser.style = EdsUserStyle0;
|
|
10363
11002
|
|
|
10364
|
-
export { EdsAccordion as eds_accordion, EdsAlert as eds_alert, EdsAvatar as eds_avatar, EdsBlockBreak as eds_block_break, EdsBreadcrumb as eds_breadcrumb, EdsButton as eds_button, EdsCardApp as eds_card_app, EdsCardCta as eds_card_cta, EdsCardDesc as eds_card_desc, EdsCardFeature as eds_card_feature, EdsCardGeneric as eds_card_generic, EdsCardHero as eds_card_hero, EdsCardStat as eds_card_stat, EdsCardTitle as eds_card_title, EdsCodeBlock as eds_code_block, EdsDropdown as eds_dropdown, EdsFooter as eds_footer, EdsForm as eds_form, EdsFullscreenMenu as eds_fullscreen_menu, EdsGlobalSearch as eds_global_search, EdsHeader as eds_header, EdsIconWrapper as eds_icon_wrapper, EdsImg as eds_img, EdsInput as eds_input, EdsInputDropzone as eds_input_dropzone, EdsInputField as eds_input_field, EdsInputFile as eds_input_file, EdsInputFooter as eds_input_footer, EdsInputLabel as eds_input_label, EdsInputRange as eds_input_range,
|
|
11003
|
+
export { EdsAccordion as eds_accordion, EdsAlert as eds_alert, EdsAvatar as eds_avatar, EdsBlockBreak as eds_block_break, EdsBreadcrumb as eds_breadcrumb, EdsButton as eds_button, EdsCardApp as eds_card_app, EdsCardCta as eds_card_cta, EdsCardDesc as eds_card_desc, EdsCardFeature as eds_card_feature, EdsCardGeneric as eds_card_generic, EdsCardHero as eds_card_hero, EdsCardStat as eds_card_stat, EdsCardTitle as eds_card_title, EdsCodeBlock as eds_code_block, EdsDropdown as eds_dropdown, EdsFooter as eds_footer, EdsForm as eds_form, EdsFullscreenMenu as eds_fullscreen_menu, EdsGlobalSearch as eds_global_search, EdsHeader as eds_header, EdsIconWrapper as eds_icon_wrapper, EdsImg as eds_img, EdsInput as eds_input, EdsInputDropzone as eds_input_dropzone, EdsInputField as eds_input_field, EdsInputFile as eds_input_file, EdsInputFooter as eds_input_footer, EdsInputLabel as eds_input_label, EdsInputRange as eds_input_range, EdsInputSelect as eds_input_select, EdsKgLearningResources as eds_kg_learning_resources, EdsKgWebServicesSelect as eds_kg_web_services_select, EdsLink as eds_link, EdsLogo as eds_logo, EdsMatomoNotice as eds_matomo_notice, EdsNps as eds_nps, EdsPagination as eds_pagination, EdsProgressBar as eds_progress_bar, EdsRating as eds_rating, EdsSearchSelect as eds_search_select, EdsSidebar as eds_sidebar, EdsSocialNetworks as eds_social_networks, EdsSpinner as eds_spinner, EdsSteps as eds_steps, EdsStepsV2 as eds_steps_v2, EdsSwitch as eds_switch, EdsTable as eds_table, EdsTabs as eds_tabs, EdsTag as eds_tag, EdsToast as eds_toast, EdsTooltip as eds_tooltip, EdsUser as eds_user };
|