@ebrains/components 2.1.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 +4 -6
- 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/download-9d17d025.js +20 -0
- package/dist/cjs/{eds-accordion_33.cjs.entry.js → eds-accordion_36.cjs.entry.js} +590 -110
- 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 -5
- package/dist/cjs/eds-frame.cjs.entry.js +2 -2
- package/dist/cjs/eds-fullscreen-menu.cjs.entry.js +9 -4
- 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 +18 -0
- 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 +3 -5
- 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} +8 -11
- 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 +4 -20
- 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 +2 -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 +36 -0
- 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 +4 -4
- package/dist/collection/components/eds-pagination/eds-pagination.css +12 -0
- package/dist/collection/components/eds-pagination/eds-pagination.js +2 -2
- package/dist/collection/components/eds-progress-bar/eds-progress-bar.js +1 -1
- 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-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.css +4 -0
- package/dist/collection/components/eds-table/eds-table.js +8 -6
- 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.css +5 -0
- package/dist/collection/components/eds-tooltip/eds-tooltip.js +2 -2
- 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/components-section/functional/overview.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 +7 -6
- package/dist/collection/shared-ui/eds-form/eds-form.css +72 -0
- package/dist/collection/shared-ui/eds-form/eds-form.js +128 -7
- package/dist/collection/shared-ui/eds-form/eds-form.stories.js +32 -3
- package/dist/collection/shared-ui/eds-frame/eds-frame.js +1 -1
- package/dist/collection/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.js +50 -16
- 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-matomo-notice/eds-matomo-notice.js +20 -8
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.css +0 -20
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.js +1 -3
- package/dist/collection/shared-ui/eds-social-networks/eds-social-networks.stories.js +6 -7
- package/dist/collection/shared-ui/eds-steps/eds-steps.css +138 -92
- package/dist/collection/shared-ui/eds-steps/eds-steps.js +265 -40
- package/dist/collection/shared-ui/eds-steps/eds-steps.stories.js +71 -7
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.css +47 -34
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.js +227 -19
- package/dist/collection/shared-ui/eds-steps-v2/eds-steps-v2.stories.js +65 -4
- 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 +82 -1
- package/dist/collection/shared-ui/examples/eds-app-root/eds-app-root.js +1 -1
- package/dist/collection/utils/eds-form/formValidators.js +4 -3
- package/dist/components/components-section.js +3 -5
- package/dist/components/components.css +3 -3
- 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/download.js +18 -0
- 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 -4
- package/dist/components/eds-form.js +61 -11
- package/dist/components/eds-frame.js +1 -1
- package/dist/components/eds-fullscreen-menu.js +8 -3
- 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.d.ts +11 -0
- package/dist/components/eds-icon-download.js +33 -0
- 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 +4 -4
- package/dist/components/eds-pagination2.js +3 -3
- package/dist/components/eds-progress-bar2.js +1 -1
- package/dist/components/eds-rating2.js +2 -2
- 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 +2 -4
- package/dist/components/eds-spinner2.js +1 -1
- package/dist/components/eds-steps-v2.js +67 -13
- package/dist/components/eds-steps2.js +85 -35
- package/dist/components/eds-switch.js +2 -2
- package/dist/components/eds-table2.js +36 -28
- 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-tooltip.js +1 -50
- package/dist/components/eds-tooltip2.js +52 -0
- package/dist/components/eds-trl.js +33 -27
- package/dist/components/eds-user.js +20 -2
- package/dist/components/incorrect-use-of-colors.js +1 -1
- package/dist/components/logo-space.js +31 -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-03714413.entry.js +1 -0
- package/dist/components/{p-67ec46b4.entry.js → p-06428b6c.entry.js} +1 -1
- package/dist/components/{p-7a3f2576.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-0da7d1c9.js +1 -0
- package/dist/components/p-1297d926.entry.js +1 -0
- package/dist/components/p-1928711b.entry.js +1 -0
- package/dist/components/{p-2ef4dd11.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-8627afc0.entry.js → p-219842c0.entry.js} +1 -1
- package/dist/components/p-21b5ca1f.entry.js +1 -0
- 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-37a3d3ba.entry.js +1 -0
- package/dist/components/p-3a295312.entry.js +1 -0
- package/dist/components/p-3ff1f198.entry.js +1 -0
- 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-e5892379.entry.js → p-71e9b1e9.entry.js} +1 -1
- package/dist/components/p-71f4afdf.entry.js +1 -0
- 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-5f348b0e.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-b88a2267.entry.js → p-9c68934f.entry.js} +1 -1
- package/dist/components/{p-b9a1aba3.entry.js → p-a258d382.entry.js} +1 -1
- package/dist/components/p-a82fc224.entry.js +1 -0
- package/dist/components/p-ad0519b7.entry.js +1 -0
- package/dist/components/p-b15b11de.entry.js +9 -0
- package/dist/components/p-b56a3fc9.entry.js +1 -0
- package/dist/components/{p-09079c5c.entry.js → p-b9b6ac74.entry.js} +1 -1
- package/dist/components/p-b9bd1209.entry.js +1 -0
- package/dist/components/{p-9c1c5e8d.entry.js → p-bce8a58d.entry.js} +1 -1
- package/dist/components/{p-2e0c3fc4.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-d95d7353.entry.js → p-c5d6c2a5.entry.js} +1 -1
- package/dist/components/p-c6f5d9df.entry.js +1 -0
- package/dist/components/p-c770c97b.entry.js +1 -0
- package/dist/components/{p-706a106c.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-743f9f8f.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-e210ddbb.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-4c84fcf4.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 +32 -42
- 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 +4 -6
- 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/download-47746956.js +18 -0
- package/dist/esm/{eds-accordion_33.entry.js → eds-accordion_36.entry.js} +588 -111
- 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 -5
- package/dist/esm/eds-frame.entry.js +2 -2
- package/dist/esm/eds-fullscreen-menu.entry.js +9 -4
- 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 +14 -0
- 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 +3 -5
- 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} +8 -11
- 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 +3 -19
- 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 +679 -236
- package/dist/hydrate/index.mjs +679 -236
- 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-icons/eds-icon-download/eds-icon-download.d.ts +10 -0
- package/dist/types/components/eds-table/eds-table.d.ts +20 -4
- package/dist/types/components/eds-tag/eds-tag.d.ts +1 -1
- package/dist/types/components.d.ts +455 -55
- package/dist/types/shared-ui/eds-footer/eds-footer.d.ts +4 -2
- package/dist/types/shared-ui/eds-form/eds-form.d.ts +18 -1
- package/dist/types/shared-ui/eds-form/eds-form.stories.d.ts +19 -0
- package/dist/types/shared-ui/eds-fullscreen-menu/eds-fullscreen-menu.d.ts +44 -13
- 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-matomo-notice/eds-matomo-notice.d.ts +11 -3
- package/dist/types/shared-ui/eds-social-networks/eds-social-networks.d.ts +0 -2
- package/dist/types/shared-ui/eds-social-networks/eds-social-networks.stories.d.ts +1 -1
- package/dist/types/shared-ui/eds-steps/eds-steps.d.ts +73 -24
- package/dist/types/shared-ui/eds-steps/eds-steps.stories.d.ts +58 -0
- package/dist/types/shared-ui/eds-steps-v2/eds-steps-v2.d.ts +44 -19
- package/dist/types/shared-ui/eds-steps-v2/eds-steps-v2.stories.d.ts +33 -0
- package/dist/types/shared-ui/eds-user/eds-user.d.ts +9 -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/cjs/eds-tooltip.cjs.entry.js +0 -38
- package/dist/components/p-05654483.entry.js +0 -1
- package/dist/components/p-10997947.entry.js +0 -1
- package/dist/components/p-19e69c03.entry.js +0 -1
- package/dist/components/p-1ab1ea29.entry.js +0 -1
- package/dist/components/p-1bcf743d.entry.js +0 -1
- package/dist/components/p-1d18106d.entry.js +0 -1
- package/dist/components/p-3360e1e2.entry.js +0 -1
- package/dist/components/p-38bc21e9.entry.js +0 -1
- package/dist/components/p-3b29e0fd.entry.js +0 -1
- package/dist/components/p-42457a0f.entry.js +0 -1
- package/dist/components/p-4a6a72db.entry.js +0 -1
- package/dist/components/p-4b33909d.entry.js +0 -1
- package/dist/components/p-4bf4bc93.entry.js +0 -1
- package/dist/components/p-5367bb59.entry.js +0 -1
- package/dist/components/p-547a53d6.entry.js +0 -1
- package/dist/components/p-560fc3a4.entry.js +0 -1
- package/dist/components/p-5a58f1c1.entry.js +0 -1
- package/dist/components/p-5b55f951.entry.js +0 -1
- package/dist/components/p-5ba49cf2.entry.js +0 -1
- package/dist/components/p-5dd85979.entry.js +0 -1
- package/dist/components/p-634b6ca2.entry.js +0 -1
- package/dist/components/p-6614881d.entry.js +0 -1
- package/dist/components/p-6b988c76.entry.js +0 -1
- package/dist/components/p-6cd6ff0c.entry.js +0 -1
- package/dist/components/p-71ee4af2.entry.js +0 -1
- package/dist/components/p-789f54cb.entry.js +0 -1
- package/dist/components/p-7a5623b5.entry.js +0 -1
- package/dist/components/p-7ca6db64.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-89048f87.entry.js +0 -1
- package/dist/components/p-8cf98230.entry.js +0 -1
- package/dist/components/p-8d363a3c.entry.js +0 -1
- package/dist/components/p-9261d27c.entry.js +0 -1
- package/dist/components/p-97323c46.entry.js +0 -1
- package/dist/components/p-9b90296c.entry.js +0 -1
- package/dist/components/p-9cb14b1f.entry.js +0 -1
- package/dist/components/p-9f0a34b4.entry.js +0 -1
- package/dist/components/p-a8ca8346.entry.js +0 -1
- package/dist/components/p-ab3b0a53.entry.js +0 -1
- package/dist/components/p-b0d38b78.entry.js +0 -1
- package/dist/components/p-b6ee4250.entry.js +0 -1
- package/dist/components/p-b9fdcb1b.entry.js +0 -1
- package/dist/components/p-ba9f41de.entry.js +0 -1
- package/dist/components/p-beacaa4f.entry.js +0 -1
- package/dist/components/p-bfa23535.entry.js +0 -1
- package/dist/components/p-c4ac0528.entry.js +0 -1
- package/dist/components/p-cb114bf4.entry.js +0 -1
- package/dist/components/p-cd05a97b.entry.js +0 -1
- package/dist/components/p-cd787744.entry.js +0 -1
- package/dist/components/p-cdc1c8e8.entry.js +0 -1
- package/dist/components/p-d1d1943b.entry.js +0 -1
- package/dist/components/p-e0ada7e0.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-ec706eed.entry.js +0 -1
- package/dist/components/p-f32963ff.entry.js +0 -9
- package/dist/components/p-f40dd50d.entry.js +0 -1
- package/dist/components/p-f6012c17.entry.js +0 -1
- package/dist/components/p-fcba31fa.entry.js +0 -1
- package/dist/esm/eds-spinner.entry.js +0 -84
- package/dist/esm/eds-tooltip.entry.js +0 -34
|
@@ -155,9 +155,10 @@ isFieldVisible) {
|
|
|
155
155
|
const npsEl = findNpsElement(formEl);
|
|
156
156
|
if (npsEl && npsEl.shadowRoot) {
|
|
157
157
|
const raw = (_a = npsEl.shadowRoot
|
|
158
|
-
.querySelector('
|
|
159
|
-
const
|
|
160
|
-
|
|
158
|
+
.querySelector('eds-button[tabindex="0"]')) === null || _a === void 0 ? void 0 : _a.getAttribute('aria-label');
|
|
159
|
+
const parsed = raw !== null ? parseInt(raw, 10) : NaN;
|
|
160
|
+
const value = Number.isInteger(parsed) && parsed >= 0 && parsed <= 10 ? parsed : NaN;
|
|
161
|
+
if (isNaN(value)) {
|
|
161
162
|
// eslint-disable-next-line
|
|
162
163
|
if (field.required) {
|
|
163
164
|
errors[field.name] = ['This field is required.'];
|
|
@@ -223,7 +224,7 @@ function getFormInitData({ initData, parsedFields, currentValues
|
|
|
223
224
|
return { updatedValues };
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
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-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:var(--f-heading-04-fontWeight);font-size:var(--f-heading-04-fontSize);line-height:var(--f-heading-04-lineHeight);letter-spacing:var(--f-heading-04-letterSpacing)}.rounded-sm{border-radius:8px}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-2{border-width:2px}.mt-20{margin-top:1.25rem}.mt-32{margin-top:2rem}.mb-32{margin-bottom:2rem}.pt-28{padding-top:1.75rem}.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-24{row-gap:1.5rem}.border-group{border-left:1px solid var(--soft-color, #ddd);padding-left:1rem}";
|
|
227
|
+
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:var(--f-heading-04-fontWeight);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:var(--f-heading-05-fontWeight);font-size:var(--f-heading-05-fontSize);line-height:var(--f-heading-05-lineHeight);letter-spacing:var(--f-heading-05-letterSpacing)}.text-light{color:var(--grey-700)}.rounded-sm{border-radius:8px}.border-softer{border-color:rgba(0, 0, 0, .1)}.border-2{border-width:2px}.mt-20{margin-top:1.25rem}.mt-32{margin-top:2rem}.mb-32{margin-bottom:2rem}.pt-28{padding-top:1.75rem}.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-24{row-gap:1.5rem}.border-group{border-left:1px solid var(--soft-color, #ddd);padding-left:1rem}.bg-inverse{background-color:var(--white)}.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(--green-500)}.effect-focus-within:focus-within{outline-style:solid}.relative{position:relative}.rounded-lg{border-radius:16px}.px-16{padding-left:1rem;padding-right:1rem}.pb-16{padding-bottom:1rem}.p-32{padding:2rem}";
|
|
227
228
|
const EdsFormStyle0 = edsFormCss;
|
|
228
229
|
|
|
229
230
|
const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLElement {
|
|
@@ -233,13 +234,17 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
233
234
|
this.__attachShadow();
|
|
234
235
|
this.form = createEvent(this, "form", 7);
|
|
235
236
|
this.name = 'eds-form';
|
|
237
|
+
this.title = 'Form Title';
|
|
238
|
+
this.description = 'Form Description';
|
|
236
239
|
this.setFormUrl = true;
|
|
237
240
|
this.formBtn = true;
|
|
238
241
|
this.formBtnLabel = 'Submit';
|
|
242
|
+
this.buttonIntent = 'primary';
|
|
239
243
|
this.errorMessage = 'Some fields in your form are incorrect.';
|
|
240
244
|
this.fields = [];
|
|
241
245
|
this.groups = [];
|
|
242
246
|
this.initData = {};
|
|
247
|
+
this.formStyle = 'default';
|
|
243
248
|
this.values = {};
|
|
244
249
|
this.isSubmitting = false;
|
|
245
250
|
this.hasError = false;
|
|
@@ -361,6 +366,7 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
361
366
|
return formData;
|
|
362
367
|
}
|
|
363
368
|
makeFormData() {
|
|
369
|
+
var _a;
|
|
364
370
|
const formData = new FormData();
|
|
365
371
|
// Add the form name
|
|
366
372
|
formData.append('form_name', this.name);
|
|
@@ -372,6 +378,37 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
372
378
|
// Append each key-value pair to the FormData object.
|
|
373
379
|
formData.append(key, this.values[key]);
|
|
374
380
|
});
|
|
381
|
+
// 2) Only do the (slower) DOM scan if we actually have file fields in the config
|
|
382
|
+
const hasFileField = (_a = this.parsedFields) === null || _a === void 0 ? void 0 : _a.some((f) => (f === null || f === void 0 ? void 0 : f.type) === 'file');
|
|
383
|
+
if (hasFileField && this.formEl) {
|
|
384
|
+
// Find file inputs inside each eds-input-field's shadowRoot
|
|
385
|
+
const hosts = Array.from(this.formEl.querySelectorAll('eds-input-field'));
|
|
386
|
+
hosts.forEach((host) => {
|
|
387
|
+
const root = host.shadowRoot;
|
|
388
|
+
if (!root)
|
|
389
|
+
return;
|
|
390
|
+
const fileInputs = Array.from(root.querySelectorAll('input[type="file"][name]'));
|
|
391
|
+
console.log(fileInputs);
|
|
392
|
+
fileInputs.forEach((fi) => {
|
|
393
|
+
const name = fi.name;
|
|
394
|
+
const files = fi.files ? Array.from(fi.files) : [];
|
|
395
|
+
if (files.length > 0) {
|
|
396
|
+
// Append each file under the same field name (backend can use request.files.getlist(name))
|
|
397
|
+
files.forEach((file) => formData.append(name, file));
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
// (Optional) mark that this payload includes files (handy in logs / policies)
|
|
402
|
+
// formData.set('_has_files', '1');
|
|
403
|
+
}
|
|
404
|
+
formData.forEach((value, key) => {
|
|
405
|
+
if (value instanceof File) {
|
|
406
|
+
console.log(`File field: ${key}, File name: ${value.name}, File size: ${value.size}`);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
console.log(`Field: ${key}, Value: ${value}`);
|
|
410
|
+
}
|
|
411
|
+
});
|
|
375
412
|
return formData;
|
|
376
413
|
}
|
|
377
414
|
handleChange(e, field) {
|
|
@@ -482,11 +519,11 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
482
519
|
message: `${field.name} updated`
|
|
483
520
|
});
|
|
484
521
|
}
|
|
485
|
-
handleSubmit() {
|
|
522
|
+
handleSubmit(e) {
|
|
486
523
|
var _a, _b;
|
|
487
|
-
|
|
524
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
525
|
+
if (this.isSubmitting)
|
|
488
526
|
return;
|
|
489
|
-
}
|
|
490
527
|
this.isSubmitting = true;
|
|
491
528
|
this.validateForm();
|
|
492
529
|
if (this.hasError) {
|
|
@@ -537,10 +574,15 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
537
574
|
}
|
|
538
575
|
get groupedFields() {
|
|
539
576
|
const map = {};
|
|
540
|
-
// initialize buckets for each group
|
|
577
|
+
// initialize buckets for each declared group
|
|
541
578
|
this.parsedGroups.forEach((g) => (map[g.id] = []));
|
|
579
|
+
// always keep an ungrouped bucket
|
|
542
580
|
map['__ungrouped'] = [];
|
|
581
|
+
// only bucket fields that are currently visible
|
|
543
582
|
this.parsedFields.forEach((f) => {
|
|
583
|
+
if (!this.isFieldVisible(f)) {
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
544
586
|
const gid = f.groupId || '__ungrouped';
|
|
545
587
|
if (!map[gid]) {
|
|
546
588
|
map[gid] = [];
|
|
@@ -561,7 +603,7 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
561
603
|
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": (_a = this.errors[field.name]) === null || _a === void 0 ? void 0 : _a.join('<br/>'), error: !!this.errors[field.name], link: field.link }))));
|
|
562
604
|
}
|
|
563
605
|
else if (field.type === 'nps') {
|
|
564
|
-
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, onNps: (e) => this.handleNPS(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name,
|
|
606
|
+
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, onNps: (e) => this.handleNPS(e, field) }), h("div", { class: "mt-6" }, h("eds-input-footer", { id: `${field.name}-footer`, name: field.name, "error-message": (_b = this.errors[field.name]) === null || _b === void 0 ? void 0 : _b.join('<br/>'), error: !!this.errors[field.name] }))));
|
|
565
607
|
}
|
|
566
608
|
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, error: !!this.errors[field.name], errorMessage: (_c = this.errors[field.name]) === null || _c === void 0 ? void 0 : _c.join('<br/>'), options: field.options, onInput: (e) => this.handleInput(e, field), onChangeNative: (e) => this.handleChange(e, field) }));
|
|
567
609
|
}
|
|
@@ -572,9 +614,13 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
572
614
|
const hiddenFields = this.parsedFields.filter((field) => field.type === 'hidden');
|
|
573
615
|
//const otherFields = this.parsedFields.filter((field) => field.type !== 'hidden');
|
|
574
616
|
const buckets = this.groupedFields;
|
|
575
|
-
|
|
617
|
+
// build the shadow/bg classes if formStyle="shadow"
|
|
618
|
+
const styleClasses = this.formStyle === 'shadow'
|
|
619
|
+
? 'bg-inverse effect-shadow shadow-hover border-softer relative rounded-lg border-2 p-32'
|
|
620
|
+
: '';
|
|
621
|
+
return (h("form", { key: 'a2e7de988c60301b92f6b756702bfcc78e9f3d90', class: styleClasses, ref: (el) => (this.formEl = el), autocomplete: "on", onSubmit: this.handleSubmit }, h("div", { key: '22172631522aa6094d8b163b0774c57ef4404d60', class: "flex flex-col gap-y-24" }, this.title && (h("span", { key: '0597bbacbaf5f3d9ec1ab938cf755a10baafdf21', role: "heading", class: "f-heading-04" }, this.title)), this.description && h("span", { key: '5e636072bc2692071bd0b518af721999cc8b511e', class: "f-body-02 text-light" }, this.description), h("slot", { key: '79d21172208eb77ec6460e817d3c7bc3a680c806' })), hiddenFields.map((field, index) => (h("eds-input", { key: index, type: "hidden", name: field.name, value: field.value }))), this.parsedGroups
|
|
576
622
|
.filter((g) => Array.isArray(buckets[g.id]) && buckets[g.id].length > 0)
|
|
577
|
-
.map((g) => (h("div", { class: "
|
|
623
|
+
.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: 'b99941e53dec1c8c4e167d8588d6e86793838d1a', class: "flex flex-col mt-32 gap-y-24" }, buckets['__ungrouped'].map((f) => this.renderField(f))), this.formBtn && (h("div", { key: '27365a4d7d8150ff4e94ffb3d27d011400c8c412', class: "mt-32" }, h("eds-button", { key: '66f89292b95d9549e3718d7e499b0724762127c6', intent: this.buttonIntent, label: this.formBtnLabel, disabled: this.isSubmitting, loading: this.isSubmitting, onClick: () => this.handleSubmit() })))));
|
|
578
624
|
}
|
|
579
625
|
get el() { return this; }
|
|
580
626
|
static get watchers() { return {
|
|
@@ -584,13 +630,17 @@ const EdsForm$1 = /*@__PURE__*/ proxyCustomElement(class EdsForm extends HTMLEle
|
|
|
584
630
|
static get style() { return EdsFormStyle0; }
|
|
585
631
|
}, [1, "eds-form", {
|
|
586
632
|
"name": [1],
|
|
633
|
+
"title": [1],
|
|
634
|
+
"description": [1],
|
|
587
635
|
"setFormUrl": [4, "set-form-url"],
|
|
588
636
|
"formBtn": [4, "form-btn"],
|
|
589
637
|
"formBtnLabel": [1, "form-btn-label"],
|
|
638
|
+
"buttonIntent": [1, "button-intent"],
|
|
590
639
|
"errorMessage": [1, "error-message"],
|
|
591
640
|
"fields": [1],
|
|
592
641
|
"groups": [1],
|
|
593
642
|
"initData": [16],
|
|
643
|
+
"formStyle": [1, "form-style"],
|
|
594
644
|
"values": [32],
|
|
595
645
|
"isSubmitting": [32],
|
|
596
646
|
"hasError": [32],
|
|
@@ -76,7 +76,7 @@ const EdsFrame$1 = /*@__PURE__*/ proxyCustomElement(class EdsFrame extends HTMLE
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
render() {
|
|
79
|
-
return (h("div", { key: '
|
|
79
|
+
return (h("div", { key: '7b4f5eb19460a178b98586aa38088e3dc5625671', class: this.articleClasses() }, h("div", { key: '98aefbd4cab33f14c9aa3152c122a11b24df4a02', class: "effect-height flex items-center justify-between py-8 px-12" }, h("span", { key: 'd0cdd2f3354bddc99030ee5215f2bc24b139a261', class: "f-ui-02" }, this.frameLabel), !this.iframeError && this.url && this.urlLabel ? (h("eds-link", { label: this.urlLabel, url: this.url, intent: this.intent, class: "ml-auto", external: true, disabled: false, icon: "arrow-diagonal" })) : null), h("div", { key: '030c560bbd0209160c92bc2d152f8d42484dc86b', class: "border-softer" }, this.iframeError ? (h("div", { class: "container ml-8 mr-8 mt-16" }, this.errorMessage)) : (h("iframe", { src: this.frameSrc, width: "100%", height: this.getFrameHeight(), title: this.frameLabel, frameBorder: "0", allowFullScreen: true })))));
|
|
80
80
|
}
|
|
81
81
|
get el() { return this; }
|
|
82
82
|
static get style() { return EdsFrameStyle0; }
|
|
@@ -25,11 +25,16 @@ const EdsFullscreenMenu$1 = /*@__PURE__*/ proxyCustomElement(class EdsFullscreen
|
|
|
25
25
|
this.isMenuOpen = false;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
* Listens
|
|
29
|
-
*
|
|
28
|
+
* Listens on `body` for `toggleheadermenu` to open/close the menu.
|
|
29
|
+
* The event detail should be a boolean (`true` = open, `false` = close).
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```js
|
|
33
|
+
* document.body.dispatchEvent(new CustomEvent('toggleheadermenu', { detail: true }));
|
|
34
|
+
* ```
|
|
30
35
|
*/
|
|
31
36
|
handleToggleMenu(event) {
|
|
32
|
-
this.isMenuOpen = event.detail;
|
|
37
|
+
this.isMenuOpen = !!event.detail;
|
|
33
38
|
}
|
|
34
39
|
/** Opens the menu */
|
|
35
40
|
openMenu() {
|
|
@@ -50,7 +50,7 @@ const EdsGauge$1 = /*@__PURE__*/ proxyCustomElement(class EdsGauge extends HTMLE
|
|
|
50
50
|
const textStyle = {
|
|
51
51
|
fontSize: `${fontSize}px`
|
|
52
52
|
};
|
|
53
|
-
return (h("div", { key: '
|
|
53
|
+
return (h("div", { key: '8834b0fc3cb78c0e7926392d04229d67d8deab90', role: "progressbar", "aria-valuemin": this.valueMin, "aria-valuemax": this.valueMax, "aria-valuenow": clamped, "aria-label": `Gauge value: ${clamped} of ${this.valueMax}`, class: "relative inline-block rounded-full overflow-hidden", style: containerStyle }, h("div", { key: 'f9ad68bd6bf19bceb46df1cfe16cdbbc2375099c', class: "absolute bg-inverse rounded-full", style: maskStyle }), h("div", { key: '64a2ba3ba2f104fa018f81949cdabc0fc53eea42', class: "absolute inset-0 flex items-center justify-center" }, h("span", { key: 'ae66f977802793f4e10210e75ddfa53839a9ff6e', class: "f-body-01 text-default", style: textStyle }, clamped))));
|
|
54
54
|
}
|
|
55
55
|
static get style() { return EdsGaugeStyle0; }
|
|
56
56
|
}, [1, "eds-gauge", {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface EdsGlobalSearch extends Components.EdsGlobalSearch, HTMLElement {}
|
|
4
|
+
export const EdsGlobalSearch: {
|
|
5
|
+
prototype: EdsGlobalSearch;
|
|
6
|
+
new (): EdsGlobalSearch;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { s as sendAnalytics } from './analytics.js';
|
|
3
|
+
import { d as defineCustomElement$b } from './eds-icon-wrapper2.js';
|
|
4
|
+
import { d as defineCustomElement$a } from './eds-input2.js';
|
|
5
|
+
import { d as defineCustomElement$9 } from './eds-input-field2.js';
|
|
6
|
+
import { d as defineCustomElement$8 } from './eds-input-footer2.js';
|
|
7
|
+
import { d as defineCustomElement$7 } from './eds-input-label2.js';
|
|
8
|
+
import { d as defineCustomElement$6 } from './eds-input-range2.js';
|
|
9
|
+
import { d as defineCustomElement$5 } from './eds-input-search2.js';
|
|
10
|
+
import { d as defineCustomElement$4 } from './eds-input-select2.js';
|
|
11
|
+
import { d as defineCustomElement$3 } from './eds-spinner2.js';
|
|
12
|
+
import { d as defineCustomElement$2 } from './eds-tag2.js';
|
|
13
|
+
|
|
14
|
+
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:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);max-height:500px;overflow:hidden;z-index:9999;display:flex;flex-direction:column}.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:10px 14px;cursor:pointer;transition:background-color 0.15s ease;border-left:3px solid transparent;overflow:hidden;word-wrap:break-word;word-break:break-word}.result-item:hover,.result-item--selected{background-color:var(--grey-200);border-left-color:var(--green-600)}.result-header{display:flex;align-items:center;justify-content:space-between}.result-snippet{font-size:13px;color:#616161;line-height:1.4;margin:0;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.dropdown-footer{border-top:1px solid #e0e0e0;padding:8px 16px;background:#fafafa;flex-shrink:0}.footer-hint{font-size:11px;color:#757575;display:flex;align-items:center;gap:4px;flex-wrap:wrap}kbd{display:inline-block;padding:2px 5px;font-size:10px;font-family:monospace;line-height:1;color:#424242;background-color:#f5f5f5;border:1px solid #bdbdbd;border-radius:3px;box-shadow:0 1px 0 rgba(0, 0, 0, 0.1)}.dropdown-results::-webkit-scrollbar{width:8px}.dropdown-results::-webkit-scrollbar-track{background:#f5f5f5}.dropdown-results::-webkit-scrollbar-thumb{background:#bdbdbd;border-radius:4px}.dropdown-results::-webkit-scrollbar-thumb:hover{background:#9e9e9e}.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)}";
|
|
15
|
+
const EdsGlobalSearchStyle0 = edsGlobalSearchCss;
|
|
16
|
+
|
|
17
|
+
const EdsGlobalSearch$1 = /*@__PURE__*/ proxyCustomElement(class EdsGlobalSearch extends HTMLElement {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.__registerHost();
|
|
21
|
+
this.__attachShadow();
|
|
22
|
+
this.resultSelected = createEvent(this, "resultSelected", 7);
|
|
23
|
+
this.searchClosed = createEvent(this, "searchClosed", 7);
|
|
24
|
+
this.handleInput = (event) => {
|
|
25
|
+
var _a;
|
|
26
|
+
const target = event.target;
|
|
27
|
+
this.query = target.value;
|
|
28
|
+
if (this.debounceTimer) {
|
|
29
|
+
clearTimeout(this.debounceTimer);
|
|
30
|
+
}
|
|
31
|
+
if (!this.query.trim()) {
|
|
32
|
+
this.results = [];
|
|
33
|
+
this.hasSearched = false;
|
|
34
|
+
this.showDropdown = false;
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
sendAnalytics({
|
|
38
|
+
category: 'shared-ui',
|
|
39
|
+
parentContext: null,
|
|
40
|
+
tag: this.el.tagName.toLowerCase(),
|
|
41
|
+
name: `search-input: ${(_a = this.query) === null || _a === void 0 ? void 0 : _a.toLowerCase()}` ||
|
|
42
|
+
'unknow seach input query',
|
|
43
|
+
action: 'click',
|
|
44
|
+
});
|
|
45
|
+
this.debounceTimer = window.setTimeout(() => {
|
|
46
|
+
this.runSearch();
|
|
47
|
+
}, this.debounceDelay);
|
|
48
|
+
};
|
|
49
|
+
this.apiEndpoint = '/api/v1/global-search';
|
|
50
|
+
this.placeholder = 'Search Handbook + Design...';
|
|
51
|
+
this.limit = 20;
|
|
52
|
+
this.debounceDelay = 300;
|
|
53
|
+
this.query = '';
|
|
54
|
+
this.results = [];
|
|
55
|
+
this.loading = false;
|
|
56
|
+
this.error = '';
|
|
57
|
+
this.hasSearched = false;
|
|
58
|
+
this.showDropdown = false;
|
|
59
|
+
this.selectedIndex = -1;
|
|
60
|
+
}
|
|
61
|
+
componentDidLoad() {
|
|
62
|
+
// Focus input if needed
|
|
63
|
+
if (this.inputRef) {
|
|
64
|
+
this.inputRef.focus();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
disconnectedCallback() {
|
|
68
|
+
if (this.debounceTimer) {
|
|
69
|
+
clearTimeout(this.debounceTimer);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
handleDocumentClick(event) {
|
|
73
|
+
const path = event.composedPath();
|
|
74
|
+
if (!path.includes(this.el)) {
|
|
75
|
+
this.showDropdown = false;
|
|
76
|
+
this.selectedIndex = -1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
handleKeydown(event) {
|
|
80
|
+
if (!this.showDropdown || this.results.length === 0) {
|
|
81
|
+
if (event.key === 'Escape') {
|
|
82
|
+
this.searchClosed.emit();
|
|
83
|
+
}
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
switch (event.key) {
|
|
87
|
+
case 'ArrowDown':
|
|
88
|
+
event.preventDefault();
|
|
89
|
+
this.selectedIndex = Math.min(this.selectedIndex + 1, this.results.length - 1);
|
|
90
|
+
this.scrollToSelected();
|
|
91
|
+
break;
|
|
92
|
+
case 'ArrowUp':
|
|
93
|
+
event.preventDefault();
|
|
94
|
+
this.selectedIndex = Math.max(this.selectedIndex - 1, -1);
|
|
95
|
+
this.scrollToSelected();
|
|
96
|
+
break;
|
|
97
|
+
case 'Enter':
|
|
98
|
+
event.preventDefault();
|
|
99
|
+
if (this.selectedIndex >= 0 &&
|
|
100
|
+
this.selectedIndex < this.results.length) {
|
|
101
|
+
this.selectResult(this.results[this.selectedIndex]);
|
|
102
|
+
}
|
|
103
|
+
break;
|
|
104
|
+
case 'Escape':
|
|
105
|
+
this.showDropdown = false;
|
|
106
|
+
this.selectedIndex = -1;
|
|
107
|
+
this.searchClosed.emit();
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
async runSearch() {
|
|
112
|
+
var _a;
|
|
113
|
+
const query = this.query.trim();
|
|
114
|
+
if (!query) {
|
|
115
|
+
this.results = [];
|
|
116
|
+
this.hasSearched = false;
|
|
117
|
+
this.showDropdown = false;
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.loading = true;
|
|
121
|
+
this.error = '';
|
|
122
|
+
try {
|
|
123
|
+
const response = await fetch(`${this.apiEndpoint}?q=${encodeURIComponent(query)}&limit=${this.limit}`);
|
|
124
|
+
if (!response.ok) {
|
|
125
|
+
throw new Error('Search failed');
|
|
126
|
+
}
|
|
127
|
+
const data = await response.json();
|
|
128
|
+
this.results = (_a = data.items) !== null && _a !== void 0 ? _a : [];
|
|
129
|
+
this.hasSearched = true;
|
|
130
|
+
this.showDropdown = true;
|
|
131
|
+
this.selectedIndex = -1;
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
console.error('Search error:', err);
|
|
135
|
+
this.error = 'Search failed. Please try again.';
|
|
136
|
+
this.results = [];
|
|
137
|
+
this.showDropdown = true;
|
|
138
|
+
}
|
|
139
|
+
finally {
|
|
140
|
+
this.loading = false;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
selectResult(result) {
|
|
144
|
+
this.resultSelected.emit(result);
|
|
145
|
+
this.searchClosed.emit();
|
|
146
|
+
sendAnalytics({
|
|
147
|
+
category: 'shared-ui',
|
|
148
|
+
parentContext: null,
|
|
149
|
+
tag: this.el.tagName.toLowerCase(),
|
|
150
|
+
name: `search-select: ${result.url}` || 'unknow search result selection',
|
|
151
|
+
action: 'click',
|
|
152
|
+
});
|
|
153
|
+
window.open(result.url, '_blank', 'noopener,noreferrer');
|
|
154
|
+
}
|
|
155
|
+
scrollToSelected() {
|
|
156
|
+
if (this.selectedIndex >= 0 && this.dropdownRef) {
|
|
157
|
+
const selectedItem = this.dropdownRef.querySelector(`[data-index="${this.selectedIndex}"]`);
|
|
158
|
+
if (selectedItem) {
|
|
159
|
+
selectedItem.scrollIntoView({ block: 'nearest', behavior: 'smooth' });
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
stripHtml(html) {
|
|
164
|
+
const div = document.createElement('div');
|
|
165
|
+
div.innerHTML = html;
|
|
166
|
+
return div.textContent || div.innerText || '';
|
|
167
|
+
}
|
|
168
|
+
get hasResults() {
|
|
169
|
+
return this.results.length > 0;
|
|
170
|
+
}
|
|
171
|
+
get showEmpty() {
|
|
172
|
+
return (this.hasSearched && !this.loading && !this.hasResults && this.query.trim());
|
|
173
|
+
}
|
|
174
|
+
render() {
|
|
175
|
+
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: {
|
|
176
|
+
'result-item': true,
|
|
177
|
+
'result-item--selected': index === this.selectedIndex,
|
|
178
|
+
}, 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")))))));
|
|
179
|
+
}
|
|
180
|
+
get el() { return this; }
|
|
181
|
+
static get style() { return EdsGlobalSearchStyle0; }
|
|
182
|
+
}, [1, "eds-global-search", {
|
|
183
|
+
"apiEndpoint": [1, "api-endpoint"],
|
|
184
|
+
"placeholder": [1],
|
|
185
|
+
"limit": [2],
|
|
186
|
+
"debounceDelay": [2, "debounce-delay"],
|
|
187
|
+
"query": [32],
|
|
188
|
+
"results": [32],
|
|
189
|
+
"loading": [32],
|
|
190
|
+
"error": [32],
|
|
191
|
+
"hasSearched": [32],
|
|
192
|
+
"showDropdown": [32],
|
|
193
|
+
"selectedIndex": [32]
|
|
194
|
+
}, [[4, "click", "handleDocumentClick"], [0, "keydown", "handleKeydown"]]]);
|
|
195
|
+
function defineCustomElement$1() {
|
|
196
|
+
if (typeof customElements === "undefined") {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const components = ["eds-global-search", "eds-icon-wrapper", "eds-input", "eds-input-field", "eds-input-footer", "eds-input-label", "eds-input-range", "eds-input-search", "eds-input-select", "eds-spinner", "eds-tag"];
|
|
200
|
+
components.forEach(tagName => { switch (tagName) {
|
|
201
|
+
case "eds-global-search":
|
|
202
|
+
if (!customElements.get(tagName)) {
|
|
203
|
+
customElements.define(tagName, EdsGlobalSearch$1);
|
|
204
|
+
}
|
|
205
|
+
break;
|
|
206
|
+
case "eds-icon-wrapper":
|
|
207
|
+
if (!customElements.get(tagName)) {
|
|
208
|
+
defineCustomElement$b();
|
|
209
|
+
}
|
|
210
|
+
break;
|
|
211
|
+
case "eds-input":
|
|
212
|
+
if (!customElements.get(tagName)) {
|
|
213
|
+
defineCustomElement$a();
|
|
214
|
+
}
|
|
215
|
+
break;
|
|
216
|
+
case "eds-input-field":
|
|
217
|
+
if (!customElements.get(tagName)) {
|
|
218
|
+
defineCustomElement$9();
|
|
219
|
+
}
|
|
220
|
+
break;
|
|
221
|
+
case "eds-input-footer":
|
|
222
|
+
if (!customElements.get(tagName)) {
|
|
223
|
+
defineCustomElement$8();
|
|
224
|
+
}
|
|
225
|
+
break;
|
|
226
|
+
case "eds-input-label":
|
|
227
|
+
if (!customElements.get(tagName)) {
|
|
228
|
+
defineCustomElement$7();
|
|
229
|
+
}
|
|
230
|
+
break;
|
|
231
|
+
case "eds-input-range":
|
|
232
|
+
if (!customElements.get(tagName)) {
|
|
233
|
+
defineCustomElement$6();
|
|
234
|
+
}
|
|
235
|
+
break;
|
|
236
|
+
case "eds-input-search":
|
|
237
|
+
if (!customElements.get(tagName)) {
|
|
238
|
+
defineCustomElement$5();
|
|
239
|
+
}
|
|
240
|
+
break;
|
|
241
|
+
case "eds-input-select":
|
|
242
|
+
if (!customElements.get(tagName)) {
|
|
243
|
+
defineCustomElement$4();
|
|
244
|
+
}
|
|
245
|
+
break;
|
|
246
|
+
case "eds-spinner":
|
|
247
|
+
if (!customElements.get(tagName)) {
|
|
248
|
+
defineCustomElement$3();
|
|
249
|
+
}
|
|
250
|
+
break;
|
|
251
|
+
case "eds-tag":
|
|
252
|
+
if (!customElements.get(tagName)) {
|
|
253
|
+
defineCustomElement$2();
|
|
254
|
+
}
|
|
255
|
+
break;
|
|
256
|
+
} });
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
const EdsGlobalSearch = EdsGlobalSearch$1;
|
|
260
|
+
const defineCustomElement = defineCustomElement$1;
|
|
261
|
+
|
|
262
|
+
export { EdsGlobalSearch, defineCustomElement };
|
|
@@ -55,7 +55,7 @@ const EdsHeader$1 = /*@__PURE__*/ proxyCustomElement(class EdsHeader extends HTM
|
|
|
55
55
|
const classes = variantClasses[this.headerVariant] || variantClasses.default;
|
|
56
56
|
// Logo color variant: default and inverse use 'color', strong uses 'color-white'
|
|
57
57
|
const logoType = this.headerVariant === 'strong' ? 'color-white' : 'color';
|
|
58
|
-
return (h("header", { key: '
|
|
58
|
+
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() })))));
|
|
59
59
|
}
|
|
60
60
|
get hostEl() { return this; }
|
|
61
61
|
static get style() { return EdsHeaderStyle0; }
|
|
@@ -8,7 +8,7 @@ const EdsIconArrowDiagonal$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconArr
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: 'f638b55d0ab199bbd7a52d099aa1242410ae1892', class: this.class, innerHTML: arrowDiagonal });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-arrow-diagonal", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconArrowRight$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconArrowR
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '476da936a6861dc0a5db691cee31559c845766a2', class: this.class, innerHTML: arrowRight });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-arrow-right", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconBin$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconBin extends H
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '8bc63b5438fa6bf2ffa729afd07a793b96f3167d', class: this.class, innerHTML: bin });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-bin", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconBluesky$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconBluesky e
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: 'b42f25c9a2405c94d83c917026f376c9803058d1', class: this.class, innerHTML: bluesky });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-bluesky", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconBookmark$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconBookmark
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '3a7cb54b31e70a446b093453389432938c2fd9d8', class: this.class, innerHTML: bookmark });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-bookmark", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconChevronDown$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconChevr
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '49925425ac1fd676eb96b973b1419f1f2aec1c81', class: this.class, innerHTML: chevronDown });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-chevron-down", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconChevronLeft$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconChevr
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '38d849e3d7e2b2f5e7df8a5624bcf988b3046b11', class: this.class, innerHTML: chevronLeft });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-chevron-left", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconChevronRight$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconChev
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '5368c37dc49fa654d75f42a774a9a3ad93db5261', class: this.class, innerHTML: chevronRight });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-chevron-right", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconChevronUp$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconChevron
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: '6479f32960c973174c4577beef2f7df7b0baebd4', class: this.class, innerHTML: chevronUp });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-chevron-up", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconClone$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconClone exten
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: 'a31ea2174a7c266b62264dad10c486f7dc27f043', class: this.class, innerHTML: clone });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-clone", {
|
|
14
14
|
"class": [1]
|
|
@@ -8,7 +8,7 @@ const EdsIconClose$1 = /*@__PURE__*/ proxyCustomElement(class EdsIconClose exten
|
|
|
8
8
|
this.class = '';
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return h("span", { key: '
|
|
11
|
+
return h("span", { key: 'b4283a9fbc348923169a4d56ad6f3b5aad4a13c8', class: this.class, innerHTML: close });
|
|
12
12
|
}
|
|
13
13
|
}, [0, "eds-icon-close", {
|
|
14
14
|
"class": [1]
|