@ebrains/components 2.2.0 → 2.3.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 +15 -15
- package/dist/cjs/components-section.cjs.entry.js +2 -2
- package/dist/cjs/components.cjs.js +2 -2
- package/dist/cjs/correct-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/docs-palettes.cjs.entry.js +2 -2
- package/dist/cjs/docs-tokens.cjs.entry.js +2 -2
- package/dist/cjs/{eds-accordion_34.cjs.entry.js → eds-accordion_36.cjs.entry.js} +460 -64
- package/dist/cjs/eds-app-root.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-desc_2.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-generic.cjs.entry.js +3 -3
- package/dist/cjs/eds-card-project.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-section.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-tags.cjs.entry.js +2 -2
- package/dist/cjs/eds-card-tool.cjs.entry.js +2 -2
- package/dist/cjs/eds-cookies-preference.cjs.entry.js +2 -2
- package/dist/cjs/eds-feedback.cjs.entry.js +2 -2
- package/dist/cjs/eds-footer.cjs.entry.js +3 -3
- package/dist/cjs/eds-frame.cjs.entry.js +2 -2
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +1 -1
- package/dist/cjs/eds-gauge.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-arrow-diagonal.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-arrow-right.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bin.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bluesky.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-bookmark.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-down.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-left.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-right.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-chevron-up.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-clone.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-close.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-copy.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-download.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-draft.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-edit.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-eu.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-external.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-facebook.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-gitlab.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-linkedin.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-loader.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-mastodon.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-menu.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-minus.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-more.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-paper.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-plus.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-portal.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-private.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-public.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-search.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-star.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-start.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-success.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-thumbs-down.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-thumbs-up.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-tutorial.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-twitter.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-unknown.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-updown.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-user.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-view.cjs.entry.js +2 -2
- package/dist/cjs/eds-icon-youtube.cjs.entry.js +2 -2
- package/dist/cjs/eds-modal.cjs.entry.js +4 -4
- package/dist/cjs/eds-pie.cjs.entry.js +1 -1
- package/dist/cjs/eds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/eds-section-core_2.cjs.entry.js +4 -4
- package/dist/cjs/eds-social-networks.cjs.entry.js +2 -2
- package/dist/cjs/eds-splash-screen.cjs.entry.js +1 -1
- package/dist/cjs/eds-timeline.cjs.entry.js +2 -2
- package/dist/cjs/eds-toast-manager.cjs.entry.js +2 -2
- package/dist/cjs/eds-trl.cjs.entry.js +2 -2
- package/dist/cjs/incorrect-use-of-colors.cjs.entry.js +2 -2
- package/dist/cjs/{index-0249a32e.js → index-50bc1aa4.js} +4 -7
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/logo-space.cjs.entry.js +2 -2
- package/dist/cjs/logo-variations-horizontal_2.cjs.entry.js +3 -3
- package/dist/cjs/logo-variations-tabs.cjs.entry.js +2 -2
- package/dist/cjs/logo-wrong-usage.cjs.entry.js +2 -2
- package/dist/cjs/svg-repository.cjs.entry.js +2 -2
- package/dist/cjs/token-list_3.cjs.entry.js +4 -4
- package/dist/cjs/token-ratios.cjs.entry.js +2 -2
- package/dist/cjs/token-spacing.cjs.entry.js +2 -2
- package/dist/cjs/token-typography.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/eds-accordion/eds-accordion.js +2 -2
- package/dist/collection/components/eds-alert/eds-alert.js +2 -2
- package/dist/collection/components/eds-avatar/eds-avatar.js +1 -1
- 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.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-desc/eds-card-desc.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-tags/eds-card-tags.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-composer/eds-card-title/eds-card-title.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.css +8 -0
- package/dist/collection/components/eds-cards/eds-card-generic/eds-card-generic.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-project/eds-card-project.js +1 -1
- package/dist/collection/components/eds-cards/eds-card-tool/eds-card-tool.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 +127 -11
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-down/eds-icon-chevron-down.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-left/eds-icon-chevron-left.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-right/eds-icon-chevron-right.js +1 -1
- package/dist/collection/components/eds-icons/chevron/eds-icon-chevron-up/eds-icon-chevron-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-diagonal/eds-icon-arrow-diagonal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-arrow-right/eds-icon-arrow-right.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-bin/eds-icon-bin.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-bookmark/eds-icon-bookmark.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-clone/eds-icon-clone.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-close/eds-icon-close.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-copy/eds-icon-copy.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-download/eds-icon-download.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-draft/eds-icon-draft.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-edit/eds-icon-edit.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-eu/eds-icon-eu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-external/eds-icon-external.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-gitlab/eds-icon-gitlab.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-loader/eds-icon-loader.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-menu/eds-icon-menu.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-minus/eds-icon-minus.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-more/eds-icon-more.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-paper/eds-icon-paper.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-plus/eds-icon-plus.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-portal/eds-icon-portal.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-private/eds-icon-private.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-public/eds-icon-public.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-search/eds-icon-search.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-star/eds-icon-star.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-start/eds-icon-start.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-success/eds-icon-success.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-down/eds-icon-thumbs-down.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-thumbs-up/eds-icon-thumbs-up.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-tutorial/eds-icon-tutorial.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-unknown/eds-icon-unknown.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-updown/eds-icon-updown.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-user/eds-icon-user.js +1 -1
- package/dist/collection/components/eds-icons/eds-icon-view/eds-icon-view.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-input-elements/eds-input/eds-input.js +2 -2
- package/dist/collection/components/eds-input-elements/eds-input-footer/eds-input-footer.js +1 -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-select/eds-input-select.js +2 -2
- package/dist/collection/components/eds-input-field/eds-input-field.js +2 -2
- package/dist/collection/components/eds-link/eds-link.js +1 -1
- package/dist/collection/components/eds-logo/eds-logo.js +1 -1
- package/dist/collection/components/eds-modal/eds-modal.css +41 -22
- package/dist/collection/components/eds-modal/eds-modal.js +2 -2
- package/dist/collection/components/eds-nps/eds-nps.js +2 -2
- package/dist/collection/components/eds-pagination/eds-pagination.js +1 -1
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- package/dist/collection/components/eds-rating/eds-rating.js +1 -1
- 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-spinner/eds-spinner.js +1 -1
- package/dist/collection/components/eds-switch/eds-switch.js +2 -2
- package/dist/collection/components/eds-table/eds-table.js +3 -3
- package/dist/collection/components/eds-tag/eds-tag.js +3 -3
- package/dist/collection/components/eds-timeline/eds-timeline.js +1 -1
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +1 -1
- package/dist/collection/components/eds-trl/eds-trl.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-card-section/eds-card-section.js +1 -1
- package/dist/collection/shared-ui/eds-cookies-preference/eds-cookies-preference.js +1 -1
- package/dist/collection/shared-ui/eds-feedback/eds-feedback.js +1 -1
- package/dist/collection/shared-ui/eds-footer/eds-footer.js +2 -2
- package/dist/collection/shared-ui/eds-form/eds-form.js +48 -10
- package/dist/collection/shared-ui/eds-frame/eds-frame.js +1 -1
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.css +222 -0
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.js +309 -0
- package/dist/collection/shared-ui/eds-global-search/eds-global-search.stories.js +277 -0
- package/dist/collection/shared-ui/eds-header/eds-header.js +1 -1
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -1
- package/dist/collection/shared-ui/eds-steps/eds-steps.css +3 -1
- package/dist/collection/shared-ui/eds-steps/eds-steps.js +36 -5
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.css +3 -1
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.js +38 -6
- package/dist/collection/shared-ui/eds-tabs/eds-tabs.js +2 -2
- package/dist/collection/shared-ui/eds-toast-manager/eds-toast-manager.js +1 -1
- package/dist/collection/shared-ui/eds-user/eds-user.js +49 -2
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/components/components-section.js +1 -1
- package/dist/components/components.css +3 -0
- 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-alert2.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 +1 -1
- package/dist/components/eds-card-desc2.js +1 -1
- package/dist/components/eds-card-generic2.js +2 -2
- package/dist/components/eds-card-project.js +1 -1
- package/dist/components/eds-card-section.js +1 -1
- package/dist/components/eds-card-tags.js +1 -1
- package/dist/components/eds-card-title2.js +1 -1
- package/dist/components/eds-card-tool.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 +53 -7
- package/dist/components/eds-feedback.js +1 -1
- package/dist/components/eds-footer2.js +2 -2
- package/dist/components/eds-form.js +39 -7
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-gauge.js +1 -1
- package/dist/components/eds-global-search.d.ts +11 -0
- package/dist/components/eds-global-search.js +262 -0
- package/dist/components/eds-header.js +1 -1
- package/dist/components/eds-icon-arrow-diagonal.js +1 -1
- package/dist/components/eds-icon-arrow-right.js +1 -1
- package/dist/components/eds-icon-bin.js +1 -1
- package/dist/components/eds-icon-bluesky.js +1 -1
- package/dist/components/eds-icon-bookmark.js +1 -1
- package/dist/components/eds-icon-chevron-down.js +1 -1
- package/dist/components/eds-icon-chevron-left.js +1 -1
- package/dist/components/eds-icon-chevron-right.js +1 -1
- package/dist/components/eds-icon-chevron-up.js +1 -1
- package/dist/components/eds-icon-clone.js +1 -1
- package/dist/components/eds-icon-close.js +1 -1
- package/dist/components/eds-icon-copy.js +1 -1
- package/dist/components/eds-icon-download.js +1 -1
- package/dist/components/eds-icon-draft.js +1 -1
- package/dist/components/eds-icon-edit.js +1 -1
- package/dist/components/eds-icon-eu.js +1 -1
- package/dist/components/eds-icon-external.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-loader.js +1 -1
- package/dist/components/eds-icon-mastodon.js +1 -1
- package/dist/components/eds-icon-menu.js +1 -1
- package/dist/components/eds-icon-minus.js +1 -1
- package/dist/components/eds-icon-more.js +1 -1
- package/dist/components/eds-icon-paper.js +1 -1
- package/dist/components/eds-icon-plus.js +1 -1
- package/dist/components/eds-icon-portal.js +1 -1
- package/dist/components/eds-icon-private.js +1 -1
- package/dist/components/eds-icon-public.js +1 -1
- package/dist/components/eds-icon-search.js +1 -1
- package/dist/components/eds-icon-star.js +1 -1
- package/dist/components/eds-icon-start.js +1 -1
- package/dist/components/eds-icon-success.js +1 -1
- package/dist/components/eds-icon-thumbs-down.js +1 -1
- package/dist/components/eds-icon-thumbs-up.js +1 -1
- package/dist/components/eds-icon-tutorial.js +1 -1
- package/dist/components/eds-icon-twitter.js +1 -1
- package/dist/components/eds-icon-unknown.js +1 -1
- package/dist/components/eds-icon-updown.js +1 -1
- package/dist/components/eds-icon-user.js +1 -1
- package/dist/components/eds-icon-view.js +1 -1
- package/dist/components/eds-icon-youtube.js +1 -1
- package/dist/components/eds-img2.js +2 -2
- package/dist/components/eds-input-field2.js +2 -2
- package/dist/components/eds-input-footer2.js +1 -1
- package/dist/components/eds-input-label2.js +1 -1
- package/dist/components/eds-input-range2.js +1 -1
- package/dist/components/eds-input-search2.js +1 -1
- package/dist/components/eds-input-select2.js +2 -2
- package/dist/components/eds-input2.js +2 -2
- package/dist/components/eds-link2.js +1 -1
- package/dist/components/eds-logo2.js +1 -1
- package/dist/components/eds-modal.js +3 -3
- package/dist/components/eds-nps2.js +2 -2
- package/dist/components/eds-pagination2.js +1 -1
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating2.js +1 -1
- package/dist/components/eds-section-core2.js +1 -1
- package/dist/components/eds-section-heading2.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 +39 -7
- package/dist/components/eds-steps2.js +37 -6
- package/dist/components/eds-switch.js +2 -2
- package/dist/components/eds-table2.js +3 -3
- package/dist/components/eds-tabs.js +2 -2
- 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.js +1 -1
- package/dist/components/eds-user.js +12 -2
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +1 -1
- 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-03714413.entry.js +1 -0
- package/dist/components/{p-ff902c98.entry.js → p-06428b6c.entry.js} +1 -1
- package/dist/components/{p-c66f4dd8.entry.js → p-067a184b.entry.js} +1 -1
- package/dist/components/p-097665cb.entry.js +1 -0
- package/dist/components/p-09f1b358.entry.js +1 -0
- package/dist/components/{p-28ec52a7.entry.js → p-1297d926.entry.js} +1 -1
- package/dist/components/p-1928711b.entry.js +1 -0
- package/dist/components/{p-4c618a35.entry.js → p-1fad228f.entry.js} +1 -1
- package/dist/components/p-204f97de.entry.js +1 -0
- package/dist/components/p-20e385b8.entry.js +1 -0
- package/dist/components/{p-58c8c0d7.entry.js → p-219842c0.entry.js} +1 -1
- package/dist/components/{p-870001ee.entry.js → p-21b5ca1f.entry.js} +1 -1
- package/dist/components/{p-efbc374c.js → p-271c61ff.js} +1 -1
- package/dist/components/p-290b3d61.entry.js +1 -0
- package/dist/components/p-2db9f80a.entry.js +1 -0
- package/dist/components/p-354857a8.entry.js +1 -0
- package/dist/components/{p-36db7db0.entry.js → p-37a3d3ba.entry.js} +1 -1
- package/dist/components/p-3a295312.entry.js +1 -0
- package/dist/components/{p-171f8e6b.entry.js → p-3ff1f198.entry.js} +1 -1
- package/dist/components/p-404b4dec.entry.js +1 -0
- package/dist/components/p-422c08a9.entry.js +1 -0
- package/dist/components/p-44cc0966.entry.js +1 -0
- package/dist/components/p-473aeaa0.entry.js +1 -0
- package/dist/components/p-4b2d40d4.entry.js +1 -0
- package/dist/components/{p-d1927da7.entry.js → p-4beb1e06.entry.js} +1 -1
- package/dist/components/p-4faa0047.entry.js +1 -0
- package/dist/components/p-552125e3.entry.js +1 -0
- package/dist/components/p-5db8003b.entry.js +1 -0
- package/dist/components/p-5ea2afdf.entry.js +1 -0
- package/dist/components/p-5f2bb217.entry.js +1 -0
- package/dist/components/p-65d1c8e9.entry.js +1 -0
- package/dist/components/p-67823a16.entry.js +1 -0
- package/dist/components/p-69db1210.entry.js +1 -0
- package/dist/components/p-701dc6d8.entry.js +1 -0
- package/dist/components/{p-7032a73b.entry.js → p-71e9b1e9.entry.js} +1 -1
- package/dist/components/{p-dbe11048.entry.js → p-71f4afdf.entry.js} +1 -1
- package/dist/components/p-73daee37.entry.js +1 -0
- package/dist/components/p-77143afc.entry.js +1 -0
- package/dist/components/p-7a137d91.entry.js +1 -0
- package/dist/components/p-7a34b267.entry.js +1 -0
- package/dist/components/{p-b31babda.entry.js → p-7ada2015.entry.js} +1 -1
- package/dist/components/p-81cce4f8.entry.js +1 -0
- package/dist/components/{p-d2e485a1.entry.js → p-83dde536.entry.js} +1 -1
- package/dist/components/p-84a04d37.entry.js +1 -0
- package/dist/components/p-8d66718e.entry.js +1 -0
- package/dist/components/p-9154e892.entry.js +1 -0
- package/dist/components/{p-5479e43b.entry.js → p-9385c5fd.entry.js} +1 -1
- package/dist/components/p-98501e25.entry.js +1 -0
- package/dist/components/p-98d79948.entry.js +1 -0
- package/dist/components/p-9992fbdb.entry.js +1 -0
- package/dist/components/{p-8edd07db.entry.js → p-9c68934f.entry.js} +1 -1
- package/dist/components/{p-a5fd4fc9.entry.js → p-a258d382.entry.js} +1 -1
- package/dist/components/p-a82fc224.entry.js +1 -0
- package/dist/components/{p-8fb1eb43.entry.js → p-ad0519b7.entry.js} +1 -1
- package/dist/components/p-b15b11de.entry.js +9 -0
- package/dist/components/p-b56a3fc9.entry.js +1 -0
- package/dist/components/p-b9b6ac74.entry.js +1 -0
- package/dist/components/{p-4db384d9.entry.js → p-b9bd1209.entry.js} +1 -1
- package/dist/components/{p-9c1c5e8d.entry.js → p-bce8a58d.entry.js} +1 -1
- package/dist/components/{p-8eced026.entry.js → p-c12b0af1.entry.js} +1 -1
- package/dist/components/{p-265150a1.entry.js → p-c51b90c2.entry.js} +1 -1
- package/dist/components/{p-1b032aa8.entry.js → p-c5d6c2a5.entry.js} +1 -1
- package/dist/components/p-c6f5d9df.entry.js +1 -0
- package/dist/components/{p-da0e9a75.entry.js → p-c770c97b.entry.js} +1 -1
- package/dist/components/{p-6a2d1e11.entry.js → p-c8cba3a9.entry.js} +1 -1
- package/dist/components/{p-64b7a6fc.entry.js → p-ca91952b.entry.js} +1 -1
- package/dist/components/p-cba7d276.entry.js +1 -0
- package/dist/components/p-cffb13fa.entry.js +1 -0
- package/dist/components/p-d3cbc8f9.entry.js +1 -0
- package/dist/components/{p-d3391236.entry.js → p-d650c6c3.entry.js} +1 -1
- package/dist/components/p-d6a6879c.entry.js +1 -0
- package/dist/components/p-d9e02227.entry.js +1 -0
- package/dist/components/{p-79afd8aa.entry.js → p-da96c7cd.entry.js} +1 -1
- package/dist/components/{p-50d7eed9.entry.js → p-dd34feaa.entry.js} +1 -1
- package/dist/components/p-df18ffd1.entry.js +1 -0
- package/dist/components/p-e3b89fab.entry.js +1 -0
- package/dist/components/p-e696531f.entry.js +1 -0
- package/dist/components/{p-dd28ab38.entry.js → p-e7b7179f.entry.js} +1 -1
- package/dist/components/p-e8bc4649.entry.js +1 -0
- package/dist/components/p-ef86f330.entry.js +1 -0
- package/dist/components/p-f5470900.entry.js +1 -0
- package/dist/components/p-ff433e09.entry.js +1 -0
- package/dist/components/primary.js +1 -1
- package/dist/components/primary2.js +1 -1
- package/dist/components/secondary.js +1 -1
- package/dist/components/secondary2.js +7 -7
- package/dist/components/support.js +1 -1
- package/dist/components/support2.js +3 -3
- package/dist/components/svg-repository.js +1 -1
- 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 +15 -15
- package/dist/esm/components-section.entry.js +2 -2
- package/dist/esm/components.js +3 -3
- package/dist/esm/correct-use-of-colors.entry.js +2 -2
- package/dist/esm/docs-palettes.entry.js +2 -2
- package/dist/esm/docs-tokens.entry.js +2 -2
- package/dist/esm/{eds-accordion_34.entry.js → eds-accordion_36.entry.js} +459 -65
- package/dist/esm/eds-app-root.entry.js +2 -2
- package/dist/esm/eds-card-desc_2.entry.js +3 -3
- package/dist/esm/eds-card-generic.entry.js +3 -3
- package/dist/esm/eds-card-project.entry.js +2 -2
- package/dist/esm/eds-card-section.entry.js +2 -2
- package/dist/esm/eds-card-tags.entry.js +2 -2
- package/dist/esm/eds-card-tool.entry.js +2 -2
- package/dist/esm/eds-cookies-preference.entry.js +2 -2
- package/dist/esm/eds-feedback.entry.js +2 -2
- package/dist/esm/eds-footer.entry.js +3 -3
- package/dist/esm/eds-frame.entry.js +2 -2
- package/dist/esm/eds-fullscreen-menu.entry.js +1 -1
- package/dist/esm/eds-gauge.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-diagonal.entry.js +2 -2
- package/dist/esm/eds-icon-arrow-right.entry.js +2 -2
- package/dist/esm/eds-icon-bin.entry.js +2 -2
- package/dist/esm/eds-icon-bluesky.entry.js +2 -2
- package/dist/esm/eds-icon-bookmark.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-down.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-left.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-right.entry.js +2 -2
- package/dist/esm/eds-icon-chevron-up.entry.js +2 -2
- package/dist/esm/eds-icon-clone.entry.js +2 -2
- package/dist/esm/eds-icon-close.entry.js +2 -2
- package/dist/esm/eds-icon-copy.entry.js +2 -2
- package/dist/esm/eds-icon-download.entry.js +2 -2
- package/dist/esm/eds-icon-draft.entry.js +2 -2
- package/dist/esm/eds-icon-edit.entry.js +2 -2
- package/dist/esm/eds-icon-eu.entry.js +2 -2
- package/dist/esm/eds-icon-external.entry.js +2 -2
- package/dist/esm/eds-icon-facebook.entry.js +2 -2
- package/dist/esm/eds-icon-gitlab.entry.js +2 -2
- package/dist/esm/eds-icon-linkedin.entry.js +2 -2
- package/dist/esm/eds-icon-loader.entry.js +2 -2
- package/dist/esm/eds-icon-mastodon.entry.js +2 -2
- package/dist/esm/eds-icon-menu.entry.js +2 -2
- package/dist/esm/eds-icon-minus.entry.js +2 -2
- package/dist/esm/eds-icon-more.entry.js +2 -2
- package/dist/esm/eds-icon-paper.entry.js +2 -2
- package/dist/esm/eds-icon-plus.entry.js +2 -2
- package/dist/esm/eds-icon-portal.entry.js +2 -2
- package/dist/esm/eds-icon-private.entry.js +2 -2
- package/dist/esm/eds-icon-public.entry.js +2 -2
- package/dist/esm/eds-icon-search.entry.js +2 -2
- package/dist/esm/eds-icon-star.entry.js +2 -2
- package/dist/esm/eds-icon-start.entry.js +2 -2
- package/dist/esm/eds-icon-success.entry.js +2 -2
- package/dist/esm/eds-icon-thumbs-down.entry.js +2 -2
- package/dist/esm/eds-icon-thumbs-up.entry.js +2 -2
- package/dist/esm/eds-icon-tutorial.entry.js +2 -2
- package/dist/esm/eds-icon-twitter.entry.js +2 -2
- package/dist/esm/eds-icon-unknown.entry.js +2 -2
- package/dist/esm/eds-icon-updown.entry.js +2 -2
- package/dist/esm/eds-icon-user.entry.js +2 -2
- package/dist/esm/eds-icon-view.entry.js +2 -2
- package/dist/esm/eds-icon-youtube.entry.js +2 -2
- package/dist/esm/eds-modal.entry.js +4 -4
- package/dist/esm/eds-pie.entry.js +1 -1
- package/dist/esm/eds-progress-bar.entry.js +2 -2
- package/dist/esm/eds-section-core_2.entry.js +4 -4
- package/dist/esm/eds-social-networks.entry.js +2 -2
- package/dist/esm/eds-splash-screen.entry.js +1 -1
- package/dist/esm/eds-timeline.entry.js +2 -2
- package/dist/esm/eds-toast-manager.entry.js +2 -2
- package/dist/esm/eds-trl.entry.js +2 -2
- package/dist/esm/incorrect-use-of-colors.entry.js +2 -2
- package/dist/esm/{index-e84b871c.js → index-870ab08f.js} +4 -7
- package/dist/esm/loader.js +3 -3
- package/dist/esm/logo-space.entry.js +2 -2
- package/dist/esm/logo-variations-horizontal_2.entry.js +3 -3
- package/dist/esm/logo-variations-tabs.entry.js +2 -2
- package/dist/esm/logo-wrong-usage.entry.js +2 -2
- package/dist/esm/svg-repository.entry.js +2 -2
- package/dist/esm/token-list_3.entry.js +4 -4
- package/dist/esm/token-ratios.entry.js +2 -2
- package/dist/esm/token-spacing.entry.js +2 -2
- package/dist/esm/token-typography.entry.js +2 -2
- package/dist/hydrate/index.js +525 -174
- package/dist/hydrate/index.mjs +525 -174
- package/dist/types/components/eds-cards/eds-card-generic/eds-card-generic.d.ts +1 -0
- package/dist/types/components/eds-dropdown/eds-dropdown.d.ts +27 -6
- package/dist/types/components/eds-tag/eds-tag.d.ts +1 -1
- package/dist/types/components.d.ts +168 -27
- package/dist/types/shared-ui/eds-form/eds-form.d.ts +2 -2
- package/dist/types/shared-ui/eds-global-search/eds-global-search.d.ts +72 -0
- package/dist/types/shared-ui/eds-global-search/eds-global-search.stories.d.ts +40 -0
- package/dist/types/shared-ui/eds-steps/eds-steps.d.ts +2 -1
- package/dist/types/shared-ui/eds-steps-v2/eds-steps-v2.d.ts +2 -0
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +4 -0
- package/dist/types/types/global.d.ts +11 -0
- package/package.json +1 -1
- package/dist/cjs/eds-spinner.cjs.entry.js +0 -88
- package/dist/components/p-0452fe52.entry.js +0 -1
- package/dist/components/p-04f288b1.entry.js +0 -1
- package/dist/components/p-06951aa3.entry.js +0 -1
- package/dist/components/p-101392d0.entry.js +0 -1
- package/dist/components/p-19e69c03.entry.js +0 -1
- package/dist/components/p-2f712656.entry.js +0 -1
- package/dist/components/p-3097c321.entry.js +0 -1
- package/dist/components/p-38b0ea8d.entry.js +0 -1
- package/dist/components/p-3b551ade.entry.js +0 -9
- package/dist/components/p-3fa4a703.entry.js +0 -1
- package/dist/components/p-3fa54526.entry.js +0 -1
- package/dist/components/p-42680319.entry.js +0 -1
- package/dist/components/p-4d207d0e.entry.js +0 -1
- package/dist/components/p-5367bb59.entry.js +0 -1
- package/dist/components/p-5a88cdc2.entry.js +0 -1
- package/dist/components/p-5b574bb2.entry.js +0 -1
- package/dist/components/p-5ec9fc29.entry.js +0 -1
- package/dist/components/p-5f350866.entry.js +0 -1
- package/dist/components/p-5ff10b6f.entry.js +0 -1
- package/dist/components/p-6420754e.entry.js +0 -1
- package/dist/components/p-6614881d.entry.js +0 -1
- package/dist/components/p-68a2cd95.entry.js +0 -1
- package/dist/components/p-6b988c76.entry.js +0 -1
- package/dist/components/p-7272628d.entry.js +0 -1
- package/dist/components/p-78c348e2.entry.js +0 -1
- package/dist/components/p-7a5623b5.entry.js +0 -1
- package/dist/components/p-7fa46b01.entry.js +0 -1
- package/dist/components/p-86eff0cb.entry.js +0 -1
- package/dist/components/p-88eeaeca.entry.js +0 -1
- package/dist/components/p-8b7910d2.entry.js +0 -1
- package/dist/components/p-8cf98230.entry.js +0 -1
- package/dist/components/p-8ef68d8a.entry.js +0 -1
- package/dist/components/p-9261d27c.entry.js +0 -1
- package/dist/components/p-94a223ec.entry.js +0 -1
- package/dist/components/p-9cb14b1f.entry.js +0 -1
- package/dist/components/p-a6586448.entry.js +0 -1
- package/dist/components/p-ad7d603b.entry.js +0 -1
- package/dist/components/p-b24ef7f7.entry.js +0 -1
- package/dist/components/p-baa2df0b.entry.js +0 -1
- package/dist/components/p-bfe9d934.entry.js +0 -1
- package/dist/components/p-c1943b8f.entry.js +0 -1
- package/dist/components/p-e42ac312.entry.js +0 -1
- package/dist/components/p-e6c3f38c.entry.js +0 -1
- package/dist/components/p-e7c37e5b.entry.js +0 -1
- package/dist/components/p-e8374410.entry.js +0 -1
- package/dist/components/p-e90da4ba.entry.js +0 -1
- package/dist/components/p-e9cd3c4b.entry.js +0 -1
- package/dist/components/p-ebd59113.entry.js +0 -1
- package/dist/components/p-f092b706.entry.js +0 -1
- package/dist/components/p-f29e7506.entry.js +0 -1
- package/dist/components/p-f40dd50d.entry.js +0 -1
- package/dist/components/p-fc099d59.entry.js +0 -1
- package/dist/components/p-fda3da92.entry.js +0 -1
- package/dist/esm/eds-spinner.entry.js +0 -84
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
import { h, } from "@stencil/core";
|
|
2
|
+
import { sendAnalytics } from "../../utils/analytics";
|
|
3
|
+
export class EdsGlobalSearch {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.handleInput = (event) => {
|
|
6
|
+
var _a;
|
|
7
|
+
const target = event.target;
|
|
8
|
+
this.query = target.value;
|
|
9
|
+
if (this.debounceTimer) {
|
|
10
|
+
clearTimeout(this.debounceTimer);
|
|
11
|
+
}
|
|
12
|
+
if (!this.query.trim()) {
|
|
13
|
+
this.results = [];
|
|
14
|
+
this.hasSearched = false;
|
|
15
|
+
this.showDropdown = false;
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
sendAnalytics({
|
|
19
|
+
category: 'shared-ui',
|
|
20
|
+
parentContext: null,
|
|
21
|
+
tag: this.el.tagName.toLowerCase(),
|
|
22
|
+
name: `search-input: ${(_a = this.query) === null || _a === void 0 ? void 0 : _a.toLowerCase()}` ||
|
|
23
|
+
'unknow seach input query',
|
|
24
|
+
action: 'click',
|
|
25
|
+
});
|
|
26
|
+
this.debounceTimer = window.setTimeout(() => {
|
|
27
|
+
this.runSearch();
|
|
28
|
+
}, this.debounceDelay);
|
|
29
|
+
};
|
|
30
|
+
this.apiEndpoint = '/api/v1/global-search';
|
|
31
|
+
this.placeholder = 'Search Handbook + Design...';
|
|
32
|
+
this.limit = 20;
|
|
33
|
+
this.debounceDelay = 300;
|
|
34
|
+
this.query = '';
|
|
35
|
+
this.results = [];
|
|
36
|
+
this.loading = false;
|
|
37
|
+
this.error = '';
|
|
38
|
+
this.hasSearched = false;
|
|
39
|
+
this.showDropdown = false;
|
|
40
|
+
this.selectedIndex = -1;
|
|
41
|
+
}
|
|
42
|
+
componentDidLoad() {
|
|
43
|
+
// Focus input if needed
|
|
44
|
+
if (this.inputRef) {
|
|
45
|
+
this.inputRef.focus();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
disconnectedCallback() {
|
|
49
|
+
if (this.debounceTimer) {
|
|
50
|
+
clearTimeout(this.debounceTimer);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
handleDocumentClick(event) {
|
|
54
|
+
const path = event.composedPath();
|
|
55
|
+
if (!path.includes(this.el)) {
|
|
56
|
+
this.showDropdown = false;
|
|
57
|
+
this.selectedIndex = -1;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
handleKeydown(event) {
|
|
61
|
+
if (!this.showDropdown || this.results.length === 0) {
|
|
62
|
+
if (event.key === 'Escape') {
|
|
63
|
+
this.searchClosed.emit();
|
|
64
|
+
}
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
switch (event.key) {
|
|
68
|
+
case 'ArrowDown':
|
|
69
|
+
event.preventDefault();
|
|
70
|
+
this.selectedIndex = Math.min(this.selectedIndex + 1, this.results.length - 1);
|
|
71
|
+
this.scrollToSelected();
|
|
72
|
+
break;
|
|
73
|
+
case 'ArrowUp':
|
|
74
|
+
event.preventDefault();
|
|
75
|
+
this.selectedIndex = Math.max(this.selectedIndex - 1, -1);
|
|
76
|
+
this.scrollToSelected();
|
|
77
|
+
break;
|
|
78
|
+
case 'Enter':
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
if (this.selectedIndex >= 0 &&
|
|
81
|
+
this.selectedIndex < this.results.length) {
|
|
82
|
+
this.selectResult(this.results[this.selectedIndex]);
|
|
83
|
+
}
|
|
84
|
+
break;
|
|
85
|
+
case 'Escape':
|
|
86
|
+
this.showDropdown = false;
|
|
87
|
+
this.selectedIndex = -1;
|
|
88
|
+
this.searchClosed.emit();
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async runSearch() {
|
|
93
|
+
var _a;
|
|
94
|
+
const query = this.query.trim();
|
|
95
|
+
if (!query) {
|
|
96
|
+
this.results = [];
|
|
97
|
+
this.hasSearched = false;
|
|
98
|
+
this.showDropdown = false;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
this.loading = true;
|
|
102
|
+
this.error = '';
|
|
103
|
+
try {
|
|
104
|
+
const response = await fetch(`${this.apiEndpoint}?q=${encodeURIComponent(query)}&limit=${this.limit}`);
|
|
105
|
+
if (!response.ok) {
|
|
106
|
+
throw new Error('Search failed');
|
|
107
|
+
}
|
|
108
|
+
const data = await response.json();
|
|
109
|
+
this.results = (_a = data.items) !== null && _a !== void 0 ? _a : [];
|
|
110
|
+
this.hasSearched = true;
|
|
111
|
+
this.showDropdown = true;
|
|
112
|
+
this.selectedIndex = -1;
|
|
113
|
+
}
|
|
114
|
+
catch (err) {
|
|
115
|
+
console.error('Search error:', err);
|
|
116
|
+
this.error = 'Search failed. Please try again.';
|
|
117
|
+
this.results = [];
|
|
118
|
+
this.showDropdown = true;
|
|
119
|
+
}
|
|
120
|
+
finally {
|
|
121
|
+
this.loading = false;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
selectResult(result) {
|
|
125
|
+
this.resultSelected.emit(result);
|
|
126
|
+
this.searchClosed.emit();
|
|
127
|
+
sendAnalytics({
|
|
128
|
+
category: 'shared-ui',
|
|
129
|
+
parentContext: null,
|
|
130
|
+
tag: this.el.tagName.toLowerCase(),
|
|
131
|
+
name: `search-select: ${result.url}` || 'unknow search result selection',
|
|
132
|
+
action: 'click',
|
|
133
|
+
});
|
|
134
|
+
window.open(result.url, '_blank', 'noopener,noreferrer');
|
|
135
|
+
}
|
|
136
|
+
scrollToSelected() {
|
|
137
|
+
if (this.selectedIndex >= 0 && this.dropdownRef) {
|
|
138
|
+
const selectedItem = this.dropdownRef.querySelector(`[data-index="${this.selectedIndex}"]`);
|
|
139
|
+
if (selectedItem) {
|
|
140
|
+
selectedItem.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
stripHtml(html) {
|
|
145
|
+
const div = document.createElement('div');
|
|
146
|
+
div.innerHTML = html;
|
|
147
|
+
return div.textContent || div.innerText || '';
|
|
148
|
+
}
|
|
149
|
+
get hasResults() {
|
|
150
|
+
return this.results.length > 0;
|
|
151
|
+
}
|
|
152
|
+
get showEmpty() {
|
|
153
|
+
return (this.hasSearched && !this.loading && !this.hasResults && this.query.trim());
|
|
154
|
+
}
|
|
155
|
+
render() {
|
|
156
|
+
return (h("div", { key: '8fb5d13cbb123d7a6d6a26d0ba59d4c6d1660216', class: "search-wrapper" }, h("eds-input-field", { key: 'a8bf5d6f4aa5746e144b82fad60b77697d0fdb99', icon: "search", "input-id": "search-global", type: "text", name: "search-box-global", placeholder: this.placeholder, value: this.query, onInput: this.handleInput }), this.showDropdown && (h("div", { key: '553cb12c9b2aa9ecfbcf9c1eee9ff9a44549e35a', class: "search-dropdown", ref: (el) => (this.dropdownRef = el) }, this.loading && (h("div", { key: '4f40853beecd11f8812fd97cf07d2394e7b73466', class: "flex text-center justify-center p-64" }, h("eds-spinner", { key: '307a3ba3ec2d296f31f8e5cf1a696786387ea8fa', variant: "primary", size: "sm" }))), this.error && !this.loading && (h("div", { key: '46fc2ed3f48237864c62ce52d5789b72ab007f61', class: "flex text-center justify-center p-16" }, h("span", { key: 'b555370d936f99234d9be576d04766bc674bfd24', class: "text-error f-body-02" }, this.error))), this.showEmpty && (h("div", { key: '7464c4850872ce8dcee55c189b1e78baa1799f14', class: "dropdown-state" }, h("eds-icon-wrapper", { key: '989282ef0fc8fde7018bb80ab172773cc2107942', icon: "search" }), h("div", { key: 'efbdbd61312b7de43c4f9944cbd573573ec22f11' }, h("p", { key: 'fb8bf8c76f101a182f2f0e0c9beac642a872d4cb', class: "f-body-02" }, "No results found"), h("p", { key: '003a1facf39b7efe8f61c58518e7fdef4779f9c3', class: "f-ui-04 text-lightest" }, "Try different keywords")))), this.hasResults && !this.loading && (h("ul", { key: '01b48376f9b290218f93eed314bcc71fa15f83ef', class: "dropdown-results" }, this.results.map((result, index) => (h("li", { key: result.id, "data-index": index, class: {
|
|
157
|
+
'result-item': true,
|
|
158
|
+
'result-item--selected': index === this.selectedIndex,
|
|
159
|
+
}, onClick: () => this.selectResult(result), onMouseEnter: () => (this.selectedIndex = index) }, h("div", { class: "result-header" }, h("span", { class: "f-body-02" }, result.title)), h("div", { class: "inline" }, h("eds-tag", { intent: "accent", label: result.source }), result.section && (h("span", { class: "result-badge" }, result.section)), h("span", { class: "f-ui-03-light text-lighter ml-8" }, result.url)), result.snippet && (h("p", { class: "result-snippet" }, this.stripHtml(result.snippet)))))))), this.hasResults && !this.loading && (h("div", { key: '3730704ff20781f23403df56a452bf586c06a688', class: "dropdown-footer" }, h("span", { key: '981e0fb42c24116a2b7caa1a341db1435fb57298', class: "footer-hint" }, h("kbd", { key: 'a3afa1202d694af3f87c736f8384b11497729d2c' }, "\u2191"), " ", h("kbd", { key: '4158766047e73eef837b3a7be415b52792473f3e' }, "\u2193"), " navigate \u2022 ", h("kbd", { key: '49dc09c928a6f0d69e4c95cee7ba5b655dfcd56c' }, "\u21B5"), " select \u2022", ' ', h("kbd", { key: '8da9b6f1bef58c7633a484f63e63920646d6b675' }, "esc"), " close")))))));
|
|
160
|
+
}
|
|
161
|
+
static get is() { return "eds-global-search"; }
|
|
162
|
+
static get encapsulation() { return "shadow"; }
|
|
163
|
+
static get originalStyleUrls() {
|
|
164
|
+
return {
|
|
165
|
+
"$": ["eds-global-search.css"]
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
static get styleUrls() {
|
|
169
|
+
return {
|
|
170
|
+
"$": ["eds-global-search.css"]
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
static get properties() {
|
|
174
|
+
return {
|
|
175
|
+
"apiEndpoint": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "string",
|
|
180
|
+
"resolved": "string",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "API endpoint for search"
|
|
188
|
+
},
|
|
189
|
+
"attribute": "api-endpoint",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "'/api/v1/global-search'"
|
|
192
|
+
},
|
|
193
|
+
"placeholder": {
|
|
194
|
+
"type": "string",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "string",
|
|
198
|
+
"resolved": "string",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": false,
|
|
202
|
+
"optional": false,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": "Placeholder text for the input"
|
|
206
|
+
},
|
|
207
|
+
"attribute": "placeholder",
|
|
208
|
+
"reflect": false,
|
|
209
|
+
"defaultValue": "'Search Handbook + Design...'"
|
|
210
|
+
},
|
|
211
|
+
"limit": {
|
|
212
|
+
"type": "number",
|
|
213
|
+
"mutable": false,
|
|
214
|
+
"complexType": {
|
|
215
|
+
"original": "number",
|
|
216
|
+
"resolved": "number",
|
|
217
|
+
"references": {}
|
|
218
|
+
},
|
|
219
|
+
"required": false,
|
|
220
|
+
"optional": false,
|
|
221
|
+
"docs": {
|
|
222
|
+
"tags": [],
|
|
223
|
+
"text": "Maximum number of results to fetch"
|
|
224
|
+
},
|
|
225
|
+
"attribute": "limit",
|
|
226
|
+
"reflect": false,
|
|
227
|
+
"defaultValue": "20"
|
|
228
|
+
},
|
|
229
|
+
"debounceDelay": {
|
|
230
|
+
"type": "number",
|
|
231
|
+
"mutable": false,
|
|
232
|
+
"complexType": {
|
|
233
|
+
"original": "number",
|
|
234
|
+
"resolved": "number",
|
|
235
|
+
"references": {}
|
|
236
|
+
},
|
|
237
|
+
"required": false,
|
|
238
|
+
"optional": false,
|
|
239
|
+
"docs": {
|
|
240
|
+
"tags": [],
|
|
241
|
+
"text": "Debounce delay in milliseconds"
|
|
242
|
+
},
|
|
243
|
+
"attribute": "debounce-delay",
|
|
244
|
+
"reflect": false,
|
|
245
|
+
"defaultValue": "300"
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
static get states() {
|
|
250
|
+
return {
|
|
251
|
+
"query": {},
|
|
252
|
+
"results": {},
|
|
253
|
+
"loading": {},
|
|
254
|
+
"error": {},
|
|
255
|
+
"hasSearched": {},
|
|
256
|
+
"showDropdown": {},
|
|
257
|
+
"selectedIndex": {}
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
static get events() {
|
|
261
|
+
return [{
|
|
262
|
+
"method": "resultSelected",
|
|
263
|
+
"name": "resultSelected",
|
|
264
|
+
"bubbles": true,
|
|
265
|
+
"cancelable": true,
|
|
266
|
+
"composed": true,
|
|
267
|
+
"docs": {
|
|
268
|
+
"tags": [],
|
|
269
|
+
"text": "Emitted when a result is selected"
|
|
270
|
+
},
|
|
271
|
+
"complexType": {
|
|
272
|
+
"original": "{\n id: string;\n title: string;\n url: string;\n section: string;\n tags: string[];\n date: string | null;\n source: string;\n snippet: string;\n score: number | null;\n }",
|
|
273
|
+
"resolved": "{ id: string; title: string; url: string; section: string; tags: string[]; date: string; source: string; snippet: string; score: number; }",
|
|
274
|
+
"references": {}
|
|
275
|
+
}
|
|
276
|
+
}, {
|
|
277
|
+
"method": "searchClosed",
|
|
278
|
+
"name": "searchClosed",
|
|
279
|
+
"bubbles": true,
|
|
280
|
+
"cancelable": true,
|
|
281
|
+
"composed": true,
|
|
282
|
+
"docs": {
|
|
283
|
+
"tags": [],
|
|
284
|
+
"text": "Emitted when search is closed (for expandable mode)"
|
|
285
|
+
},
|
|
286
|
+
"complexType": {
|
|
287
|
+
"original": "void",
|
|
288
|
+
"resolved": "void",
|
|
289
|
+
"references": {}
|
|
290
|
+
}
|
|
291
|
+
}];
|
|
292
|
+
}
|
|
293
|
+
static get elementRef() { return "el"; }
|
|
294
|
+
static get listeners() {
|
|
295
|
+
return [{
|
|
296
|
+
"name": "click",
|
|
297
|
+
"method": "handleDocumentClick",
|
|
298
|
+
"target": "document",
|
|
299
|
+
"capture": false,
|
|
300
|
+
"passive": false
|
|
301
|
+
}, {
|
|
302
|
+
"name": "keydown",
|
|
303
|
+
"method": "handleKeydown",
|
|
304
|
+
"target": undefined,
|
|
305
|
+
"capture": false,
|
|
306
|
+
"passive": false
|
|
307
|
+
}];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
import { html } from "lit-html";
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Shared UI/Global Search',
|
|
4
|
+
component: 'eds-global-search',
|
|
5
|
+
argTypes: {
|
|
6
|
+
apiEndpoint: {
|
|
7
|
+
control: 'text',
|
|
8
|
+
description: 'API endpoint for search',
|
|
9
|
+
defaultValue: '/api/v1/global-search'
|
|
10
|
+
},
|
|
11
|
+
placeholder: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'Placeholder text for the search input',
|
|
14
|
+
defaultValue: 'Search Handbook + Design...'
|
|
15
|
+
},
|
|
16
|
+
limit: {
|
|
17
|
+
control: 'number',
|
|
18
|
+
description: 'Maximum number of results to fetch',
|
|
19
|
+
defaultValue: 20
|
|
20
|
+
},
|
|
21
|
+
debounceDelay: {
|
|
22
|
+
control: 'number',
|
|
23
|
+
description: 'Debounce delay in milliseconds',
|
|
24
|
+
defaultValue: 300
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const Template = (args) => html `
|
|
29
|
+
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
|
|
30
|
+
<eds-global-search
|
|
31
|
+
api-endpoint="${args.apiEndpoint}"
|
|
32
|
+
placeholder="${args.placeholder}"
|
|
33
|
+
limit="${args.limit}"
|
|
34
|
+
debounce-delay="${args.debounceDelay}"
|
|
35
|
+
@resultSelected="${(e) => console.log('Result selected:', e.detail)}"
|
|
36
|
+
@searchClosed="${() => console.log('Search closed')}"
|
|
37
|
+
></eds-global-search>
|
|
38
|
+
</div>
|
|
39
|
+
`;
|
|
40
|
+
export const Default = Template.bind({});
|
|
41
|
+
Default.args = {
|
|
42
|
+
apiEndpoint: '/api/v1/global-search',
|
|
43
|
+
placeholder: 'Search Handbook + Design...',
|
|
44
|
+
limit: 20,
|
|
45
|
+
debounceDelay: 300
|
|
46
|
+
};
|
|
47
|
+
const MockedTemplate = (args) => {
|
|
48
|
+
// Mock fetch for demonstration
|
|
49
|
+
if (typeof window !== 'undefined' && !window.__searchMocked) {
|
|
50
|
+
window.__searchMocked = true;
|
|
51
|
+
const originalFetch = window.fetch;
|
|
52
|
+
window.fetch = function (url, options) {
|
|
53
|
+
if (url.toString().includes('mock-api')) {
|
|
54
|
+
return Promise.resolve(new Response(JSON.stringify({
|
|
55
|
+
items: [
|
|
56
|
+
{
|
|
57
|
+
id: '1',
|
|
58
|
+
title: 'Getting Started Guide',
|
|
59
|
+
url: 'https://example.com/docs/getting-started',
|
|
60
|
+
section: 'Documentation',
|
|
61
|
+
tags: ['guide', 'intro'],
|
|
62
|
+
date: '2024-01-15',
|
|
63
|
+
source: 'Handbook',
|
|
64
|
+
snippet: 'Learn how to get started with our platform. This comprehensive guide covers installation, setup, and your first project.',
|
|
65
|
+
score: 95
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: '2',
|
|
69
|
+
title: 'Design System Colors',
|
|
70
|
+
url: 'https://example.com/design/colors',
|
|
71
|
+
section: 'Design',
|
|
72
|
+
tags: ['colors', 'palette'],
|
|
73
|
+
date: '2024-02-10',
|
|
74
|
+
source: 'Design System',
|
|
75
|
+
snippet: 'Explore our color palette and learn how to apply colors consistently across your designs.',
|
|
76
|
+
score: 88
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: '3',
|
|
80
|
+
title: 'Component Library',
|
|
81
|
+
url: 'https://example.com/components',
|
|
82
|
+
section: 'Components',
|
|
83
|
+
tags: ['ui', 'library'],
|
|
84
|
+
date: '2024-03-05',
|
|
85
|
+
source: 'Handbook',
|
|
86
|
+
snippet: 'Browse our collection of reusable UI components with examples and best practices.',
|
|
87
|
+
score: 92
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
id: '4',
|
|
91
|
+
title: 'API Reference',
|
|
92
|
+
url: 'https://example.com/api/reference',
|
|
93
|
+
section: 'API',
|
|
94
|
+
tags: ['api', 'reference'],
|
|
95
|
+
date: '2024-01-20',
|
|
96
|
+
source: 'Documentation',
|
|
97
|
+
snippet: 'Complete API reference with endpoints, parameters, and response formats.',
|
|
98
|
+
score: 90
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
id: '5',
|
|
102
|
+
title: 'Typography Guidelines',
|
|
103
|
+
url: 'https://example.com/design/typography',
|
|
104
|
+
section: 'Design',
|
|
105
|
+
tags: ['fonts', 'text'],
|
|
106
|
+
date: '2024-02-28',
|
|
107
|
+
source: 'Design System',
|
|
108
|
+
snippet: 'Typography scale, font families, and text styling guidelines for consistent designs.',
|
|
109
|
+
score: 85
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
}), {
|
|
113
|
+
status: 200,
|
|
114
|
+
statusText: 'OK',
|
|
115
|
+
headers: { 'Content-Type': 'application/json' }
|
|
116
|
+
}));
|
|
117
|
+
}
|
|
118
|
+
return originalFetch(url, options);
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return html `
|
|
122
|
+
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
|
|
123
|
+
<p style="margin-bottom: 16px; color: #666; font-size: 14px;">
|
|
124
|
+
<strong>Demo mode:</strong> Type anything in the search box to see mocked results.
|
|
125
|
+
</p>
|
|
126
|
+
<eds-global-search
|
|
127
|
+
api-endpoint="${args.apiEndpoint}"
|
|
128
|
+
placeholder="${args.placeholder}"
|
|
129
|
+
limit="${args.limit}"
|
|
130
|
+
debounce-delay="${args.debounceDelay}"
|
|
131
|
+
@resultSelected="${(e) => {
|
|
132
|
+
console.log('Result selected:', e.detail);
|
|
133
|
+
alert(`Selected: ${e.detail.title}`);
|
|
134
|
+
}}"
|
|
135
|
+
@searchClosed="${() => console.log('Search closed')}"
|
|
136
|
+
></eds-global-search>
|
|
137
|
+
</div>
|
|
138
|
+
`;
|
|
139
|
+
};
|
|
140
|
+
export const WithMockedData = MockedTemplate.bind({});
|
|
141
|
+
WithMockedData.args = {
|
|
142
|
+
apiEndpoint: '/mock-api/search',
|
|
143
|
+
placeholder: 'Try searching for anything...',
|
|
144
|
+
limit: 20,
|
|
145
|
+
debounceDelay: 300
|
|
146
|
+
};
|
|
147
|
+
WithMockedData.parameters = {
|
|
148
|
+
docs: {
|
|
149
|
+
description: {
|
|
150
|
+
story: 'Interactive demo with mocked search results. Type any query to see sample results.'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const ErrorTemplate = (args) => {
|
|
155
|
+
// Mock an API error
|
|
156
|
+
if (typeof window !== 'undefined' && !window.__searchErrorMocked) {
|
|
157
|
+
window.__searchErrorMocked = true;
|
|
158
|
+
const originalFetch = window.fetch;
|
|
159
|
+
window.fetch = function (url, options) {
|
|
160
|
+
if (url.toString().includes('error-api')) {
|
|
161
|
+
return Promise.resolve(new Response(JSON.stringify({ error: 'Internal Server Error' }), {
|
|
162
|
+
status: 500,
|
|
163
|
+
statusText: 'Internal Server Error',
|
|
164
|
+
headers: { 'Content-Type': 'application/json' }
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
return originalFetch(url, options);
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
return html `
|
|
171
|
+
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
|
|
172
|
+
<p style="margin-bottom: 16px; color: #666; font-size: 14px;">
|
|
173
|
+
<strong>Error state demo:</strong> Search will always fail to show error handling.
|
|
174
|
+
</p>
|
|
175
|
+
<eds-global-search
|
|
176
|
+
api-endpoint="${args.apiEndpoint}"
|
|
177
|
+
placeholder="${args.placeholder}"
|
|
178
|
+
limit="${args.limit}"
|
|
179
|
+
debounce-delay="${args.debounceDelay}"
|
|
180
|
+
></eds-global-search>
|
|
181
|
+
</div>
|
|
182
|
+
`;
|
|
183
|
+
};
|
|
184
|
+
export const ErrorState = ErrorTemplate.bind({});
|
|
185
|
+
ErrorState.args = {
|
|
186
|
+
apiEndpoint: '/error-api/search',
|
|
187
|
+
placeholder: 'Search to see error state...',
|
|
188
|
+
limit: 20,
|
|
189
|
+
debounceDelay: 300
|
|
190
|
+
};
|
|
191
|
+
ErrorState.parameters = {
|
|
192
|
+
docs: {
|
|
193
|
+
description: {
|
|
194
|
+
story: 'Demonstrates the error state when the API request fails.'
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
const KeyboardNavigationTemplate = (args) => {
|
|
199
|
+
// Mock data for keyboard navigation demo
|
|
200
|
+
if (typeof window !== 'undefined' && !window.__searchKeyboardMocked) {
|
|
201
|
+
window.__searchKeyboardMocked = true;
|
|
202
|
+
const originalFetch = window.fetch;
|
|
203
|
+
window.fetch = function (url, options) {
|
|
204
|
+
if (url.toString().includes('keyboard-api')) {
|
|
205
|
+
return Promise.resolve(new Response(JSON.stringify({
|
|
206
|
+
items: [
|
|
207
|
+
{
|
|
208
|
+
id: '1',
|
|
209
|
+
title: 'First Result',
|
|
210
|
+
url: 'https://example.com/first',
|
|
211
|
+
section: 'Section A',
|
|
212
|
+
tags: [],
|
|
213
|
+
date: null,
|
|
214
|
+
source: 'Handbook',
|
|
215
|
+
snippet: 'Use arrow keys to navigate between results.',
|
|
216
|
+
score: 95
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: '2',
|
|
220
|
+
title: 'Second Result',
|
|
221
|
+
url: 'https://example.com/second',
|
|
222
|
+
section: 'Section B',
|
|
223
|
+
tags: [],
|
|
224
|
+
date: null,
|
|
225
|
+
source: 'Handbook',
|
|
226
|
+
snippet: 'Press Enter to select a highlighted result.',
|
|
227
|
+
score: 90
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
id: '3',
|
|
231
|
+
title: 'Third Result',
|
|
232
|
+
url: 'https://example.com/third',
|
|
233
|
+
section: 'Section C',
|
|
234
|
+
tags: [],
|
|
235
|
+
date: null,
|
|
236
|
+
source: 'Documentation',
|
|
237
|
+
snippet: 'Press Escape to close the dropdown.',
|
|
238
|
+
score: 85
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}), {
|
|
242
|
+
status: 200,
|
|
243
|
+
statusText: 'OK',
|
|
244
|
+
headers: { 'Content-Type': 'application/json' }
|
|
245
|
+
}));
|
|
246
|
+
}
|
|
247
|
+
return originalFetch(url, options);
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
return html `
|
|
251
|
+
<div style="max-width: 600px; margin: 0 auto; padding: 20px;">
|
|
252
|
+
<p style="margin-bottom: 16px; color: #666; font-size: 14px;">
|
|
253
|
+
<strong>Keyboard navigation demo:</strong> Type to search, then use ↑↓ arrow keys to navigate, Enter to select, or Esc to close.
|
|
254
|
+
</p>
|
|
255
|
+
<eds-global-search
|
|
256
|
+
api-endpoint="${args.apiEndpoint}"
|
|
257
|
+
placeholder="${args.placeholder}"
|
|
258
|
+
limit="${args.limit}"
|
|
259
|
+
debounce-delay="${args.debounceDelay}"
|
|
260
|
+
></eds-global-search>
|
|
261
|
+
</div>
|
|
262
|
+
`;
|
|
263
|
+
};
|
|
264
|
+
export const KeyboardNavigation = KeyboardNavigationTemplate.bind({});
|
|
265
|
+
KeyboardNavigation.args = {
|
|
266
|
+
apiEndpoint: '/keyboard-api/search',
|
|
267
|
+
placeholder: 'Try keyboard navigation...',
|
|
268
|
+
limit: 20,
|
|
269
|
+
debounceDelay: 300
|
|
270
|
+
};
|
|
271
|
+
KeyboardNavigation.parameters = {
|
|
272
|
+
docs: {
|
|
273
|
+
description: {
|
|
274
|
+
story: 'Demonstrates keyboard navigation through search results. Use arrow keys to navigate, Enter to select, and Escape to close.'
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
};
|
|
@@ -56,7 +56,7 @@ export class EdsHeader {
|
|
|
56
56
|
const classes = variantClasses[this.headerVariant] || variantClasses.default;
|
|
57
57
|
// Logo color variant: default and inverse use 'color', strong uses 'color-white'
|
|
58
58
|
const logoType = this.headerVariant === 'strong' ? 'color-white' : 'color';
|
|
59
|
-
return (h("header", { key: '
|
|
59
|
+
return (h("header", { key: '937c78379bb6f3a97705862b2fa3f0f6ddd76d4c', class: `flex items-center justify-between relative z-10 ${classes}` }, h("div", { key: 'd94837e8414d558f02039501d7b01ab550275ca7', class: "mr-auto w-[200px] h-[85px]" }, h("eds-logo", { key: '02711bc6d80075a215761ce79698555f7b31bffa', type: logoType, href: this.homeUrl })), this.parsedLinks && (h("nav", { key: 'e3f0033cce5a6145a4f457d1c2c7aebb767593f7', class: "absolute left-1/2 top-1/2 grow -translate-x-1/2 -translate-y-1/2 justify-center hidden md:flex" }, h("ul", { key: '85008ed8ceb8eca869d8730b38a8aa37aeb757ff', class: "flex gap-x-2" }, this.parsedLinks.map((link) => (h("eds-link", { label: link.label, "aria-label": link.label, url: link.url, intent: "ghost", size: "large", icon: link.icon, external: link.external, "extra-class": "after:effect-opacity aria-current-page:bg-darker whitespace-nowrap !text-current after:!border-transparent after:opacity-0 hover:after:!border-transparent hover:after:opacity-100" })))))), h("slot", { key: '35eb7af751f3da381fada990118fa0a37ce150b1' }), this.menuEnabled && (h("div", { key: '121bba2b027fc21e8c77054f3de533e40fad6b96', class: "md:hidden flex overflow-hidden px-16" }, h("eds-button", { key: '00774810aabf8fa292ecca2210bcd9542a7cb0c2', "aria-label": "Menu", intent: this.headerVariant === 'default' ? 'ghost' : 'ghostInverse', icon: "menu", size: "small", onClick: () => this.handleToggleMenu() })))));
|
|
60
60
|
}
|
|
61
61
|
static get is() { return "eds-header"; }
|
|
62
62
|
static get encapsulation() { return "shadow"; }
|
|
@@ -51,7 +51,7 @@ export class EdsSocialNetworks {
|
|
|
51
51
|
* Each social network link uses the `eds-link` component with specific classes and styles.
|
|
52
52
|
*/
|
|
53
53
|
render() {
|
|
54
|
-
return (h("nav", { key: '
|
|
54
|
+
return (h("nav", { key: '907adc08d4e02f34994a057146a60b734d6ab81b', "aria-label": "Social media" }, h("p", { key: 'a3620851f2e31d662a812ac74e831f023d2646a4', class: "f-ui-02" }, this.heading), h("ul", { key: 'b8fece03b5ed995a9dba78cf0445a4eb46787bdc', class: "mt-12 flex gap-4" }, this.socialNetworks.map((network, index) => (h("li", { key: index }, h("eds-link", { "extra-class": "effect-color effect-focus text-lighter hover:text-default flex items-center justify-center rounded-sm", external: true, "aria-label": `EBRAINS on ${network.label}`, url: network.url, icon: network.icon, intent: "strong" })))))));
|
|
55
55
|
}
|
|
56
56
|
static get is() { return "eds-social-networks"; }
|
|
57
57
|
static get encapsulation() { return "shadow"; }
|